ARM: samsung: clock: add get_parent op

Add a get_parent clock op to allow the parent to be read from
the clock registers.  Clocks that do not have a get_parent op
will use the parent pointer from the clk struct.

Change-Id: I37cf5634a6141db2ca8c8110b014e979855efdf6
Signed-off-by: Colin Cross <ccross@android.com>
ARM: samsung: clock-clksrc: read registers to determine parent

Add a get_parent op to read the parent from the mux registers,
and modify the get_rate and set_rate ops to use the get_parent
op when it exists.
Fixes problems when the bootloader modifies the mux setting during
suspend.

Change-Id: I6e3a35c40ce981f7d42c1b9fb420f6ea4e4c470a
Signed-off-by: Colin Cross <ccross@android.com>
ARM: exynos: clock-exynos5: read registers to get mif clk rate

Modify exynos5_mif_get_rate to read the divider register and return
the rate calculated from the divider and the parent frequency.
Fixes problems where the bootloader modifies the divider register
during suspend.

Change-Id: If83f0213d860ae3501c450da8aec54b60d82f063
Signed-off-by: Colin Cross <ccross@android.com>
ARM: EXYNOS5: Fix the auto clear of CLK_SRC_TOP3 register.

This patch fixes the auto clear of CLK_SRC_TOP3 register.
The EXYNOS5250 is that set as '0' to CMU_SYSCLK_DISP1_SYS_PWR_REG,
CMU_SYSCLK_GSCL_SYS_PWR_REG and CMU_SYSCLK_MFC_SYS_PWR_REG when enter
low power mode(LPA and SLEEP). It changed source clock of the
corresponding bus clock to XXTI. It can be provide to wrong bus clock when
wakeup from low power mode. So, the source clocks of corresponding bus
clock should be restore after set as '1' to CMU_SYSCLK_XXX_SYS_PWR_REG
when wakeup from low power mode.

Change-Id: Ie8adf12cb0f0c5c17232edbe05b5ede39f6f5660
Signed-off-by: Taekki Kim <taekki.kim@samsung.com>
ARM: samsung: clock: add __clk_get_parent to use in clk ops

Add a __clk_get_parent function that assumes clocks_lock is
already taken, to allow clock operations that are already holding
their lock to get their parent.

Use the new function instead of open coding it in the clksrc
ops.

Change-Id: I0c72e65ee9d648e077ca3430b22849922feb937f
Signed-off-by: Colin Cross <ccross@android.com>
ARM: s5p: clock: use __clk_get_parent in the spdif ops

Use __clk_get_parent to avoid a deadlock when the spdif clk ops
try to get their parent with clocks_lock already held.

Change-Id: If4c219876d1514488a2bfed9681b0208d244ee82
Signed-off-by: Colin Cross <ccross@android.com>
ARM: exynos5: mct: write TCNTB in exynos4_tick_set_mode resume

TCNTB is reset during suspend and never restored.  Rewrite the
register in exynos4_tick_set_mode for CLOCK_EVT_MODE_RESUME.
Also move the write in exynos4_local_timer_setup to before
clockevents_register_device so it is set before the timer
is started.

Change-Id: I01921fcd37e6c93cafbaa58a62f0bd7161728916
Signed-off-by: Colin Cross <ccross@android.com>
usb: gadget: f_fs: Fix enumeration in fullspeed mode

ffs_func_eps_enable always take the highspeed usb_endpoint_descriptor
if it is available. Choose the correct usb_endpoint_descriptor
depending on the gadget speed instead.

Change-Id: I5b8444cfdf1b6fe1eef25525fb7a0a0f617a353e
Signed-off-by: Benoit Goby <benoit@android.com>
Merge branch 'android-3.4' into android-exynos-3.4
net: wireless: bcmdhd: Update to version 1.28.13-1

- Fix sending unproper value for connection status to CFG80211 layer
- Fix wl_scan_prep which can leave a hole in channel list if channel
  is a DFS channel and it is virtual interface scan
- SoftAP: Fix setting DTIM interval
- Fix len variable to be signed in dhdsdio_download_code_file
- Add ARP white packet filter list during P2P mode
- Add extra check if glom is NOT default to update bus:txglom

Change-Id: Ib1fd9f77eef2fb8333fb80e749fda5b7186aa83c
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Merge branch 'android-3.4' into android-exynos-3.4
ARM: EXYNOS: pm: Change the location of exynos5_pmu_sysclk_save function.

If the first time try to suspend, suspend is aborted after syscore ops
but before s3c_pm_enter, the value never have been saved and
exynos_pm_resume restore it with 0. It's not symmetric with
exynos_pm_prepare. So, the location of exynos5_pmu_sysclk_save move to
exynos_pm_suspend.

Change-Id: Ia66b590d45d860dfd409056477e322a0f2d17f17
Signed-off-by: Taekki Kim <taekki.kim@samsung.com>
cpufreq: interactive: always limit initial speed bump to hispeed

First bump speed up to hispeed_freq whenever the current speed is below
hispeed_freq, instead of only when the current speed is the minimum speed.
The previous code made it too difficult to use hispeed_freq as a common
intermediate speed on systems that frequently run at speeds between
minimum and hispeed_freq.

Change-Id: I04ec30bafabf5741e267ff289209b8c2d846824b
Signed-off-by: Todd Poynor <toddpoynor@google.com>
gpu: t6xx: apply ASV table

Apply ASV table for G3D.

Change-Id: I28a1f74b5d880678e828bbc2c589047d18908a71
Signed-off-by: Seho Kim <sh1645.kim@samsung.com>
gpu: t6xx: remove using vsync_hit in mali dvfs

vsync_hit is not used on Manta

Change-Id: I4702cf28b64304324c0472df0bdcb1aee5b1a3de
Signed-off-by: Seho Kim <sh1645.kim@samsung.com>
gpu: t6xx: fix mali pm error while entering suspend

Add mali notifier block to pm notifier to fix mali pm error,
while entering suspend.
When entering suspend, there is a case of trying to control voltage
after I2C block off.
This patch is to disable DVFS using pm notifier to avoid that case.

Change-Id: Id135311f0b0502eab1b95f6fd428ecc169802a0c
Signed-off-by: Seho Kim <sh1645.kim@samsung.com>
gpu: t6xx: time_in_state for monitoring GPU clock

update time_in_state to monitor GPU clock on console

Change-Id: Id45601dc21679d07e7766997e03331155c7f39f2
Signed-off-by: Seho Kim <sh1645.kim@samsung.com>
gpu: t6xx: change the interval for clock down

change clock down interval from 1s to 500ms

Change-Id: I9c30a572711ec92285bda9465e8276d948f6354b
Signed-off-by: Seho Kim <sh1645.kim@samsung.com>
gpu: t6xx: set gpu clock to 450Mhz when turning on GPU

Change-Id: I28fcbc257f39fd29aaf4b38ebf9b80f461ef281b
Signed-off-by: Seho Kim <sh1645.kim@samsung.com>
gpu: t6xx: clean up the unused code

remove unused code and define
re-arrange lines

Change-Id: I50ebd0b0b0ff264c71f7c5e3615fe6e19bbd731e
Signed-off-by: Seho Kim <sh1645.kim@samsung.com>