linux/arch/arm
Rajendra Nayak eeb6603fdd ARM: OMAP4: clock: Lock PLLs in the right sequence
On OMAP4 we have clk_set_rate()s being done for a few
DPLL clock nodes, as part of the clock init code, since
the bootloaders no longer locks these DPLLs.

So we have a clk_set_rate() done for a ABE DPLL node (which
inturn locks it) followed by a clk_set_rate() for the USB DPLL.

With USB DPLL being in bypass, we have this parent->child
relationship thats formed while the clocks get registered.

dpll_abe_ck
    |
    V
dpll_abe_x2_ck
    |
    V
dpll_abe_m3x2_ck
    |
    V
usb_hs_clk_div_ck
    |
    V
dpll_usb_ck

This is because usb_hs_clk_div_ck is bypass clock for dpll_usb_ck.

So with this parent->child relationship in place, a clk_set_rate()
on ABE DPLL results eventually in a clk_set_rate() call on USB DPLL,
because CCF does a clk_change_rate() (as part of clk_set_rate()) on
all downstream clocks resulting from a rate change on the top clock.

So its important that we lock USB DPLL before we lock ABE DPLL.
Without which we see these error logs at boot.
[These error logs will not be seen if using a bootloader that locks
USB DPLL]

[    0.000000] clock: dpll_usb_ck failed transition to 'locked'
[    0.000000] Division by zero in kernel.
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.10.0-03445-gfb2af00-dirty #7
[    0.000000] [<c001bfe8>] (unwind_backtrace+0x0/0xf4) from [<c001868c>] (show_stack+0x10/0x14)
[    0.000000] [<c001868c>] (show_stack+0x10/0x14) from [<c02deb28>] (Ldiv0+0x8/0x10)
[    0.000000] [<c02deb28>] (Ldiv0+0x8/0x10) from [<c0477030>] (clk_divider_set_rate+0x10/0x114)
[    0.000000] [<c0477030>] (clk_divider_set_rate+0x10/0x114) from [<c0476ef4>] (clk_change_rate+0x38/0xb8)
[    0.000000] [<c0476ef4>] (clk_change_rate+0x38/0xb8) from [<c0476f5c>] (clk_change_rate+0xa0/0xb8)
[    0.000000] Division by zero in kernel.
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.10.0-03445-gfb2af00-dirty #7
[    0.000000] [<c001bfe8>] (unwind_backtrace+0x0/0xf4) from [<c001868c>] (show_stack+0x10/0x14)
[    0.000000] [<c001868c>] (show_stack+0x10/0x14) from [<c02deb28>] (Ldiv0+0x8/0x10)
[    0.000000] [<c02deb28>] (Ldiv0+0x8/0x10) from [<c0477030>] (clk_divider_set_rate+0x10/0x114)
[    0.000000] [<c0477030>] (clk_divider_set_rate+0x10/0x114) from [<c0476ef4>] (clk_change_rate+0x38/0xb8)
[    0.000000] [<c0476ef4>] (clk_change_rate+0x38/0xb8) from [<c0476f5c>] (clk_change_rate+0xa0/0xb8)
[    0.000000] Division by zero in kernel.
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.10.0-03445-gfb2af00-dirty #7
[    0.000000] [<c001bfe8>] (unwind_backtrace+0x0/0xf4) from [<c001868c>] (show_stack+0x10/0x14)
[    0.000000] [<c001868c>] (show_stack+0x10/0x14) from [<c02deb28>] (Ldiv0+0x8/0x10)
[    0.000000] [<c02deb28>] (Ldiv0+0x8/0x10) from [<c0477030>] (clk_divider_set_rate+0x10/0x114)
[    0.000000] [<c0477030>] (clk_divider_set_rate+0x10/0x114) from [<c0476ef4>] (clk_change_rate+0x38/0xb8)
[    0.000000] [<c0476ef4>] (clk_change_rate+0x38/0xb8) from [<c0476f5c>] (clk_change_rate+0xa0/0xb8)
[    0.000000] Division by zero in kernel.
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.10.0-03445-gfb2af00-dirty #7
[    0.000000] [<c001bfe8>] (unwind_backtrace+0x0/0xf4) from [<c001868c>] (show_stack+0x10/0x14)
[    0.000000] [<c001868c>] (show_stack+0x10/0x14) from [<c02deb28>] (Ldiv0+0x8/0x10)
[    0.000000] [<c02deb28>] (Ldiv0+0x8/0x10) from [<c0477030>] (clk_divider_set_rate+0x10/0x114)
[    0.000000] [<c0477030>] (clk_divider_set_rate+0x10/0x114) from [<c0476ef4>] (clk_change_rate+0x38/0xb8)
[    0.000000] [<c0476ef4>] (clk_change_rate+0x38/0xb8) from [<c0476f5c>] (clk_change_rate+0xa0/0xb8)
[    0.000000] Division by zero in kernel.
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.10.0-03445-gfb2af00-dirty #7
[    0.000000] [<c001bfe8>] (unwind_backtrace+0x0/0xf4) from [<c001868c>] (show_stack+0x10/0x14)
[    0.000000] [<c001868c>] (show_stack+0x10/0x14) from [<c02deb28>] (Ldiv0+0x8/0x10)
[    0.000000] [<c02deb28>] (Ldiv0+0x8/0x10) from [<c0477030>] (clk_divider_set_rate+0x10/0x114)
[    0.000000] [<c0477030>] (clk_divider_set_rate+0x10/0x114) from [<c0476ef4>] (clk_change_rate+0x38/0xb8)
[    0.000000] [<c0476ef4>] (clk_change_rate+0x38/0xb8) from [<c0476f5c>] (clk_change_rate+0xa0/0xb8)
[    0.000000] Division by zero in kernel.
[    0.000000] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.10.0-03445-gfb2af00-dirty #7
[    0.000000] [<c001bfe8>] (unwind_backtrace+0x0/0xf4) from [<c001868c>] (show_stack+0x10/0x14)
[    0.000000] [<c001868c>] (show_stack+0x10/0x14) from [<c02deb28>] (Ldiv0+0x8/0x10)
[    0.000000] [<c02deb28>] (Ldiv0+0x8/0x10) from [<c0477030>] (clk_divider_set_rate+0x10/0x114)
[    0.000000] [<c0477030>] (clk_divider_set_rate+0x10/0x114) from [<c0476ef4>] (clk_change_rate+0x38/0xb8)
[    0.000000] [<c0476ef4>] (clk_change_rate+0x38/0xb8) from [<c0476f5c>] (clk_change_rate+0xa0/0xb8)
[    0.000000] clock: trace_clk_div_ck: could not find divisor for target rate 0 for parent pmd_trace_clk_mux_ck
[    0.000000] Division by zero in kernel.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
2013-08-23 04:48:42 -06:00
..
boot ARM: tegra: enable ULPI phy on Colibri T20 2013-08-04 13:52:10 -07:00
common Merge tag 'davinci-fixes-for-v3.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into fixes 2013-07-22 19:54:21 -07:00
configs ARM: multi_v7_defconfig: Select USB chipidea driver 2013-07-23 12:18:02 -07:00
crypto ARM: 7723/1: crypto: sha1-armv4-large.S: fix SP handling 2013-05-22 22:01:35 +01:00
include Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm 2013-08-16 16:52:29 -07:00
kernel perf/arm: Fix armpmu_map_hw_event() 2013-08-13 16:57:24 -07:00
kvm KVM fixes for 3.11 2013-07-03 13:21:40 -07:00
lib arm: delete __cpuinit/__CPUINIT usage from all ARM users 2013-07-14 19:36:52 -04:00
mach-at91 reboot: arm: change reboot_mode to use enum reboot_mode 2013-07-09 10:33:29 -07:00
mach-bcm ARM: bcm281xx: Remove init_irq declaration in machine description 2013-05-14 09:48:40 -07:00
mach-bcm2835 reboot: arm: change reboot_mode to use enum reboot_mode 2013-07-09 10:33:29 -07:00
mach-clps711x reboot: arm: change reboot_mode to use enum reboot_mode 2013-07-09 10:33:29 -07:00
mach-cns3xxx reboot: arm: change reboot_mode to use enum reboot_mode 2013-07-09 10:33:29 -07:00
mach-davinci ARM: davinci: make file local variables static 2013-07-16 20:38:44 +05:30
mach-dove Watchdog: allow orion_wdt to be built for Dove 2013-07-11 22:17:56 +02:00
mach-ebsa110 reboot: arm: change reboot_mode to use enum reboot_mode 2013-07-09 10:33:29 -07:00
mach-ep93xx reboot: arm: change reboot_mode to use enum reboot_mode 2013-07-09 10:33:29 -07:00
mach-exynos Samsung fixes for v3.11 2013-07-24 17:06:58 -07:00
mach-footbridge ARM: footbridge: fix overlapping PCI mappings 2013-07-22 20:00:47 -07:00
mach-gemini ARM: arm-soc cleanup for 3.10 2013-05-02 09:03:55 -07:00
mach-highbank ARM: highbank: Only touch common coherency control register fields 2013-07-22 20:03:59 -07:00
mach-imx The imx fixes for 3.11: 2013-07-22 19:58:02 -07:00
mach-integrator reboot: arm: change reboot_mode to use enum reboot_mode 2013-07-09 10:33:29 -07:00
mach-iop13xx reboot: arm: change reboot_mode to use enum reboot_mode 2013-07-09 10:33:29 -07:00
mach-iop32x reboot: arm: change reboot_mode to use enum reboot_mode 2013-07-09 10:33:29 -07:00
mach-iop33x
mach-ixp4xx ARM: SoC fixes for 3.11-rc 2013-07-13 15:00:26 -07:00
mach-keystone ARM: keystone: fix compilation warning 2013-07-23 11:03:54 -07:00
mach-kirkwood Watchdog: allow orion_wdt to be built for Dove 2013-07-11 22:17:56 +02:00
mach-ks8695 reboot: arm: change reboot_mode to use enum reboot_mode 2013-07-09 10:33:29 -07:00
mach-lpc32xx reboot: arm: change reboot_mode to use enum reboot_mode 2013-07-09 10:33:29 -07:00
mach-mmp reboot: arm: change reboot_mode to use enum reboot_mode 2013-07-09 10:33:29 -07:00
mach-msm Fixes for MSM for 3.11 2013-08-04 13:34:57 -07:00
mach-mv78xx0 reboot: arm: change reboot_mode to use enum reboot_mode 2013-07-09 10:33:29 -07:00
mach-mvebu arm: delete __cpuinit/__CPUINIT usage from all ARM users 2013-07-14 19:36:52 -04:00
mach-mxs Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-07-09 18:24:39 -07:00
mach-netx reboot: arm: change reboot_mode to use enum reboot_mode 2013-07-09 10:33:29 -07:00
mach-nomadik reboot: arm: change reboot_mode to use enum reboot_mode 2013-07-09 10:33:29 -07:00
mach-nspire arm: Add Initial TI-Nspire support 2013-06-21 20:06:30 +02:00
mach-omap1 reboot: arm: change reboot_mode to use enum reboot_mode 2013-07-09 10:33:29 -07:00
mach-omap2 ARM: OMAP4: clock: Lock PLLs in the right sequence 2013-08-23 04:48:42 -06:00
mach-orion5x Watchdog: allow orion_wdt to be built for Dove 2013-07-11 22:17:56 +02:00
mach-picoxcell reboot: arm: change reboot_mode to use enum reboot_mode 2013-07-09 10:33:29 -07:00
mach-prima2 arm: delete __cpuinit/__CPUINIT usage from all ARM users 2013-07-14 19:36:52 -04:00
mach-pxa ARM: pxa: propagate errors from regulator_enable() to pxamci 2013-07-23 12:15:15 -07:00
mach-realview reboot: arm: change reboot_mode to use enum reboot_mode 2013-07-09 10:33:29 -07:00
mach-rockchip arm: add basic support for Rockchip RK3066a boards 2013-06-21 09:21:02 +02:00
mach-rpc reboot: arm: change reboot_mode to use enum reboot_mode 2013-07-09 10:33:29 -07:00
mach-s3c24xx Samsung fixes for v3.11 2013-07-24 17:06:58 -07:00
mach-s3c64xx reboot: arm: change reboot_mode to use enum reboot_mode 2013-07-09 10:33:29 -07:00
mach-s5p64x0 reboot: arm: change reboot_mode to use enum reboot_mode 2013-07-09 10:33:29 -07:00
mach-s5pc100 reboot: arm: change reboot_mode to use enum reboot_mode 2013-07-09 10:33:29 -07:00
mach-s5pv210 For the 3.11 merge we only have one new MFD driver for the Kontron PLD. 2013-07-10 11:10:27 -07:00
mach-sa1100 reboot: arm: change reboot_mode to use enum reboot_mode 2013-07-09 10:33:29 -07:00
mach-shark reboot: arm: change reboot_mode to use enum reboot_mode 2013-07-09 10:33:29 -07:00
mach-shmobile Second round of Renesas ARM based SoC fixes for v3.11 2013-08-04 13:37:49 -07:00
mach-socfpga arm: delete __cpuinit/__CPUINIT usage from all ARM users 2013-07-14 19:36:52 -04:00
mach-spear arm: delete __cpuinit/__CPUINIT usage from all ARM users 2013-07-14 19:36:52 -04:00
mach-sti ARM: STi: remove sti_secondary_start from INIT section. 2013-08-04 13:40:55 -07:00
mach-sunxi reboot: arm: change reboot_mode to use enum reboot_mode 2013-07-09 10:33:29 -07:00
mach-tegra arm: delete __cpuinit/__CPUINIT usage from all ARM users 2013-07-14 19:36:52 -04:00
mach-u300 reboot: arm: change reboot_mode to use enum reboot_mode 2013-07-09 10:33:29 -07:00
mach-ux500 arm: delete __cpuinit/__CPUINIT usage from all ARM users 2013-07-14 19:36:52 -04:00
mach-versatile reboot: arm: change reboot_mode to use enum reboot_mode 2013-07-09 10:33:29 -07:00
mach-vexpress ARM SoC specific changes 2013-07-02 13:43:38 -07:00
mach-virt Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2013-07-03 09:46:29 -07:00
mach-vt8500 reboot: arm: change reboot_mode to use enum reboot_mode 2013-07-09 10:33:29 -07:00
mach-w90x900 reboot: arm: change reboot_mode to use enum reboot_mode 2013-07-09 10:33:29 -07:00
mach-zynq ARM: zynq: fix compilation warning 2013-07-23 11:04:04 -07:00
mm Merge branch 'security-fixes' into fixes 2013-08-01 20:51:13 +01:00
net arm: bpf_jit: can call module_free() from any context 2013-05-20 14:03:50 -07:00
nwfpe
oprofile
plat-iop reboot: arm: change reboot_mode to use enum reboot_mode 2013-07-09 10:33:29 -07:00
plat-omap Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-07-06 14:09:38 -07:00
plat-orion Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-07-06 14:09:38 -07:00
plat-pxa
plat-samsung ARM: SAMSUNG: Save/restore only selected uart's registers 2013-07-24 17:05:07 +09:00
plat-versatile arm: delete __cpuinit/__CPUINIT usage from all ARM users 2013-07-14 19:36:52 -04:00
tools
vfp ARM: 7729/1: vfp: ensure VFP_arch is non-zero when VFP is not supported 2013-05-22 22:01:37 +01:00
xen xen/arm,arm64: update xen_restart after ff701306cd and 7b6d864b48 2013-07-23 12:22:47 +00:00
Kconfig Merge branch 'fixes' of git://git.linaro.org/people/rmk/linux-arm 2013-08-02 14:37:45 -07:00
Kconfig-nommu ARM: mpu: Ensure that MPU depends on CPU_V7 2013-06-17 15:13:18 +01:00
Kconfig.debug ARM: document DEBUG_UNCOMPRESS Kconfig option 2013-07-22 12:03:50 +01:00
Makefile ARM: Fix sorting of machine- initializers 2013-07-27 00:45:45 +01:00