linux/arch/arm
Jon Hunter b153883219 ARM: OMAP: Remove __omap_dm_timer_set_source function
The __omap_dm_timer_set_source() function is only used by the system timer
(clock-events and clock-source) code for OMAP2+ devices. Therefore, we can
remove this code from the dmtimer driver and move it to the system timer
code for OMAP2+ devices.

The current __omap_dm_timer_set_source() function calls clk_disable() before
calling clk_set_parent() and clk_enable() afterwards. We can avoid these calls
to clk_disable/enable by moving the calls to omap_hwmod_setup_one() and
omap_hwmod_enable() to after the call to clk_set_parent() in
omap_dm_timer_init_one().

The function omap_hwmod_setup_one() will enable the timers functional clock
and therefore increment the use-count of the functional clock to 1.
clk_set_parent() will fail if the use-count is not 0 when called. Hence, if
omap_hwmod_setup_one() is called before clk_set_parent(), we will need to call
clk_disable() before calling clk_set_parent() to decrement the use-count.
Hence, avoid these extra calls to disable and enable the functional clock by
moving the calls to omap_hwmod_setup_one() and omap_hwmod_enable() to after
clk_set_parent().

We can also remove the delay from the __omap_dm_timer_set_source() function
because enabling the clock will now be handled via the HWMOD framework by
calling omap_hwmod_setup_one(). Therefore, by moving the calls to
omap_hwmod_setup_one() and omap_hwmod_enable() to after the call to
clk_set_parent(), we can simply replace __omap_dm_timer_set_source() with
clk_set_parent().

It should be safe to move these hwmod calls to later in the
omap_dm_timer_init_one() because other calls to the hwmod layer that occur
before are just requesting resource information.

Testing includes boot testing on OMAP2420 H4, OMAP3430 SDP and OMAP4430 Blaze
with the following configurations:
1. CONFIG_OMAP_32K_TIMER=y
2. CONFIG_OMAP_32K_TIMER=y and boot parameter "clocksource=gp_timer"
3. CONFIG_OMAP_32K_TIMER not set
4. CONFIG_OMAP_32K_TIMER not set and boot parameter "clocksource=gp_timer"

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
2012-11-12 16:23:57 -06:00
..
boot ARM: dts: omap4-sdp: Add pinmux configuration for HDMI 2012-11-07 11:50:29 +01:00
common ARM: config: sort select statements alphanumerically 2012-10-13 17:11:28 +01:00
configs ARM: versatile: fix versatile_defconfig 2012-10-27 17:46:56 +02:00
crypto
include arm-soc: fixes for v3.7-rc3 2012-10-28 11:12:38 -07:00
kernel Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm 2012-10-25 15:59:34 -07:00
lib ARM: export default read_current_timer 2012-10-09 20:24:36 +02:00
mach-at91 ARM: at91: fix at91x40 build 2012-10-27 17:46:48 +02:00
mach-bcm2835 ARM: dtb: move all dtb targets to common Makefile 2012-09-20 22:58:17 -07:00
mach-clps711x ARM: config: sort select statements alphanumerically 2012-10-13 17:11:28 +01:00
mach-cns3xxx
mach-davinci ARM: config: sort select statements alphanumerically 2012-10-13 17:11:28 +01:00
mach-dove ARM: dove: Add crypto engine to DT 2012-10-17 17:20:01 +00:00
mach-ebsa110 ARM: soc: driver specific changes 2012-10-01 18:46:13 -07:00
mach-ep93xx ARM: soc: multiplatform enablement 2012-10-01 19:11:38 -07:00
mach-exynos ARM: EXYNOS: Set .smp field of machine descriptor for exynos4-dt 2012-10-22 08:16:44 +09:00
mach-footbridge ARM: config: sort select statements alphanumerically 2012-10-13 17:11:28 +01:00
mach-gemini
mach-h720x ARM: config: sort select statements alphanumerically 2012-10-13 17:11:28 +01:00
mach-highbank Merge branch 'for-v3.7' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping 2012-10-02 19:13:12 -07:00
mach-imx Revert "ARM i.MX25: Fix PWM per clock lookups" 2012-10-27 17:46:56 +02:00
mach-integrator ARM: integrator: use __iomem pointers for MMIO, part 2 2012-10-09 17:27:33 +02:00
mach-iop13xx Merge branch 'late/fixes' into fixes 2012-10-07 07:22:32 -07:00
mach-iop32x Merge branch 'cleanup/__iomem' into next/cleanup 2012-09-22 10:24:29 -07:00
mach-iop33x
mach-ixp4xx ARM: config: sort select statements alphanumerically 2012-10-13 17:11:28 +01:00
mach-kirkwood ARM: Kirkwood: fix disabling CACHE_FEROCEON_L2 2012-10-18 17:04:24 +00:00
mach-ks8695 Merge branch 'late/fixes' into fixes 2012-10-07 07:22:32 -07:00
mach-l7200/include/mach
mach-lpc32xx ARM: soc: multiplatform enablement 2012-10-01 19:11:38 -07:00
mach-mmp ARM: config: sort select statements alphanumerically 2012-10-13 17:11:28 +01:00
mach-msm ARM: config: sort select statements alphanumerically 2012-10-13 17:11:28 +01:00
mach-mv78xx0 Merge branch 'late/fixes' into fixes 2012-10-07 07:22:32 -07:00
mach-mvebu ARM: mvebu: fix build breaks from multi-platform conversion 2012-09-28 22:27:07 +02:00
mach-mxs ARM: soc: multiplatform enablement 2012-10-01 19:11:38 -07:00
mach-netx
mach-nomadik ARM: config: sort select statements alphanumerically 2012-10-13 17:11:28 +01:00
mach-omap1 ARM: OMAP: Remove omap_init_consistent_dma_size() 2012-11-06 16:01:19 -08:00
mach-omap2 ARM: OMAP: Remove __omap_dm_timer_set_source function 2012-11-12 16:23:57 -06:00
mach-orion5x ARM: soc: late platform updates 2012-10-07 20:55:16 +09:00
mach-picoxcell
mach-prima2 pinctrl: sirf: remove sirfsoc_gpio_set_pull function 2012-10-15 09:09:27 +02:00
mach-pxa ARM: config: sort select statements alphanumerically 2012-10-13 17:11:28 +01:00
mach-realview ARM: config: sort select statements alphanumerically 2012-10-13 17:11:28 +01:00
mach-rpc ARM: rpc: check device_register return code in ecard_probe 2012-10-07 10:33:09 +02:00
mach-s3c24xx Merge branch 'v3.7-samsung-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into fixes 2012-10-26 14:45:06 +02:00
mach-s3c64xx ARM: config: sort select statements alphanumerically 2012-10-13 17:11:28 +01:00
mach-s3c2410
mach-s3c2412 ARM: config: sort select statements alphanumerically 2012-10-13 17:11:28 +01:00
mach-s3c2440 ARM: config: sort select statements alphanumerically 2012-10-13 17:11:28 +01:00
mach-s5p64x0 ARM: SAMSUNG: Add naming of s3c64xx-spi devices 2012-10-17 16:47:32 +09:00
mach-s5pc100 ARM: SAMSUNG: Add naming of s3c64xx-spi devices 2012-10-17 16:47:32 +09:00
mach-s5pv210 ARM: SAMSUNG: Add naming of s3c64xx-spi devices 2012-10-17 16:47:32 +09:00
mach-sa1100 ARM: config: sort select statements alphanumerically 2012-10-13 17:11:28 +01:00
mach-shark Merge branch 'late/fixes' into fixes 2012-10-07 07:22:32 -07:00
mach-shmobile ARM: shmobile: r8a7779: I/O address abuse cleanup 2012-10-19 15:39:38 +09:00
mach-socfpga
mach-spear3xx
mach-spear6xx
mach-spear13xx ARM: SPEAr: Remove unused empty files 2012-10-25 16:34:18 +02:00
mach-tegra ARM: tegra: add tegra_timer clock 2012-10-16 11:15:05 -06:00
mach-u300 ARM: config: sort select statements alphanumerically 2012-10-13 17:11:28 +01:00
mach-ux500 ARM: ux500: Fix build error relating to IRQCHIP_SKIP_SET_WAKE 2012-10-25 08:43:49 +01:00
mach-versatile ARM: config: sort select statements alphanumerically 2012-10-13 17:11:28 +01:00
mach-vexpress Features: 2012-10-07 07:13:01 +09:00
mach-vt8500 arm: vt8500: Fix build warning in uncompress.h 2012-10-07 14:50:06 -07:00
mach-w90x900
mach-zynq
mm Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm 2012-10-25 15:59:34 -07:00
net
nwfpe
oprofile
plat-iop
plat-mxc ARM i.MX fixes for 3.7-rc 2012-10-25 15:57:40 +02:00
plat-nomadik ARM: config: sort select statements alphanumerically 2012-10-13 17:11:28 +01:00
plat-omap ARM: OMAP: Remove __omap_dm_timer_set_source function 2012-11-12 16:23:57 -06:00
plat-orion Merge branch 'samsung_platform_data' into staging/for_v3.7 2012-10-05 22:32:05 -03:00
plat-pxa
plat-s3c24xx ARM: config: sort select statements alphanumerically 2012-10-13 17:11:28 +01:00
plat-samsung ARM: SAMSUNG: Add naming of s3c64xx-spi devices 2012-10-17 16:47:32 +09:00
plat-spear ARM: config: sort select statements alphanumerically 2012-10-13 17:11:28 +01:00
plat-versatile Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2012-10-07 21:20:57 +09:00
tools ARM: be really quiet when building with 'make -s' 2012-10-09 20:29:05 +02:00
vfp
xen xen/arm: use the __HVC macro 2012-10-30 10:41:19 -04:00
Kconfig Merge branch 'omap-for-v3.8/cleanup-headers-prepare-multiplatform-v3' into omap-for-v3.8/dt 2012-11-09 14:54:17 -08:00
Kconfig-nommu
Kconfig.debug ARM: soc: multiplatform enablement 2012-10-01 19:11:38 -07:00
Makefile ARM: pass -marm to gcc by default for both C and assembler 2012-10-09 20:29:05 +02:00