Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: dts: keystone: k2l: fix kernel crash when clk_ignore_unused is not in bootargs

Currently kernel crash randomly when K2L EVM is booted without
clk_ignore_unused in the bootargs. This workaround is not needed
on other K2 devices such as K2HK and K2E and with this fix, we can
remove the workaround altogether. netcp driver on K2L uses linked
ram on OSR (On chip Static RAM) and requires the clock to this peripheral
enabled for proper functioning. This is the reason for the kernel crash.
So add the clock node to fix this issue.

While at it, remove the workaround documentation as well.

With the fix applied, clk_summary dump shows the clock to OSR enabled.

cat /sys/kernel/debug/clk/clk_summary
------cut--------------
tcp3d-1 0 0 399360000 0 0
tcp3d-0 0 0 399360000 0 0
osr 1 1 399360000 0 0
fftc-0 0 0 399360000 0 0
-----cut----------------
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Santosh Shilimkar <ssantosh@kernel.org>

authored by

Murali Karicheri and committed by
Santosh Shilimkar
17e846aa f7f2bccd

+1 -19
-18
Documentation/arm/keystone/Overview.txt
··· 49 49 The device tree documentation for the keystone machines are located at 50 50 Documentation/devicetree/bindings/arm/keystone/keystone.txt 51 51 52 - Known issues & workaround 53 - ------------------------- 54 - 55 - Some of the device drivers used on keystone are re-used from that from 56 - DaVinci and other TI SoCs. These device drivers may use clock APIs directly. 57 - Some of the keystone specific drivers such as netcp uses run time power 58 - management API instead to enable clock. As this API has limitations on 59 - keystone, following workaround is needed to boot Linux. 60 - 61 - Add 'clk_ignore_unused' to the bootargs env variable in u-boot. Otherwise 62 - clock frameworks will try to disable clocks that are unused and disable 63 - the hardware. This is because netcp related power domain and clock 64 - domains are enabled in u-boot as run time power management API currently 65 - doesn't enable clocks for netcp due to a limitation. This workaround is 66 - expected to be removed in the future when proper API support becomes 67 - available. Until then, this work around is needed. 68 - 69 - 70 52 Document Author 71 53 --------------- 72 54 Murali Karicheri <m-karicheri2@ti.com>
+1 -1
arch/arm/boot/dts/k2l-netcp.dtsi
··· 137 137 /* NetCP address range */ 138 138 ranges = <0 0x26000000 0x1000000>; 139 139 140 - clocks = <&papllclk>, <&clkcpgmac>, <&chipclk12>; 140 + clocks = <&clkosr>, <&papllclk>, <&clkcpgmac>, <&chipclk12>; 141 141 dma-coherent; 142 142 143 143 ti,navigator-dmas = <&dma_gbe 0>,