Robert Marko
8b89c9e68a
clk: qcom: ipq8074: fix PCI-E clock oops
[ Upstream commit bf8f5182b8f59309809b41c1d1730ed9ca6134b1 ]
Fix PCI-E clock related kernel oops that are caused by a missing clock
parent.
pcie0_rchng_clk_src has num_parents set to 2 but only one parent is
actually set via parent_hws, it should also have "XO" defined.
This will cause the kernel to panic on a NULL pointer in
clk_core_get_parent_by_index().
So, to fix this utilize clk_parent_data to provide gcc_xo_gpll0 parent
data.
Since there is already an existing static const char * const gcc_xo_gpll0[]
used to provide the same parents via parent_names convert those users to
clk_parent_data as well.
Without this earlycon is needed to even catch the OOPS as it will reset
the board before serial is initialized with the following:
[ 0.232279] Unable to handle kernel paging request at virtual address 0000a00000000000
[ 0.232322] Mem abort info:
[ 0.239094] ESR = 0x96000004
[ 0.241778] EC = 0x25: DABT (current EL), IL = 32 bits
[ 0.244908] SET = 0, FnV = 0
[ 0.250377] EA = 0, S1PTW = 0
[ 0.253236] FSC = 0x04: level 0 translation fault
[ 0.256277] Data abort info:
[ 0.261141] ISV = 0, ISS = 0x00000004
[ 0.264262] CM = 0, WnR = 0
[ 0.267820] [0000a00000000000] address between user and kernel address ranges
[ 0.270954] Internal error: Oops: 96000004 [#1] SMP
[ 0.278067] Modules linked in:
[ 0.282751] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 5.15.10 #0
[ 0.285882] Hardware name: Xiaomi AX3600 (DT)
[ 0.292043] pstate: 20400005 (nzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 0.296299] pc : clk_core_get_parent_by_index+0x68/0xec
[ 0.303067] lr : __clk_register+0x1d8/0x820
[ 0.308273] sp : ffffffc01111b7d0
[ 0.312438] x29: ffffffc01111b7d0 x28: 0000000000000000 x27: 0000000000000040
[ 0.315919] x26: 0000000000000002 x25: 0000000000000000 x24: ffffff8000308800
[ 0.323037] x23: ffffff8000308850 x22: ffffff8000308880 x21: ffffff8000308828
[ 0.330155] x20: 0000000000000028 x19: ffffff8000309700 x18: 0000000000000020
[ 0.337272] x17: 000000005cc86990 x16: 0000000000000004 x15: ffffff80001d9d0a
[ 0.344391] x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000006
[ 0.351508] x11: 0000000000000003 x10: 0101010101010101 x9 : 0000000000000000
[ 0.358626] x8 : 7f7f7f7f7f7f7f7f x7 : 6468626f5e626266 x6 : 17000a3a403c1b06
[ 0.365744] x5 : 061b3c403a0a0017 x4 : 0000000000000000 x3 : 0000000000000001
[ 0.372863] x2 : 0000a00000000000 x1 : 0000000000000001 x0 : ffffff8000309700
[ 0.379982] Call trace:
[ 0.387091] clk_core_get_parent_by_index+0x68/0xec
[ 0.389351] __clk_register+0x1d8/0x820
[ 0.394210] devm_clk_hw_register+0x5c/0xe0
[ 0.398030] devm_clk_register_regmap+0x44/0x8c
[ 0.402198] qcom_cc_really_probe+0x17c/0x1d0
[ 0.406711] qcom_cc_probe+0x34/0x44
[ 0.411224] gcc_ipq8074_probe+0x18/0x30
[ 0.414869] platform_probe+0x68/0xe0
[ 0.418776] really_probe.part.0+0x9c/0x30c
[ 0.422336] __driver_probe_device+0x98/0x144
[ 0.426329] driver_probe_device+0x44/0x11c
[ 0.430842] __device_attach_driver+0xb4/0x120
[ 0.434836] bus_for_each_drv+0x68/0xb0
[ 0.439349] __device_attach+0xb0/0x170
[ 0.443081] device_initial_probe+0x14/0x20
[ 0.446901] bus_probe_device+0x9c/0xa4
[ 0.451067] device_add+0x35c/0x834
[ 0.454886] of_device_add+0x54/0x64
[ 0.458360] of_platform_device_create_pdata+0xc0/0x100
[ 0.462181] of_platform_bus_create+0x114/0x370
[ 0.467128] of_platform_bus_create+0x15c/0x370
[ 0.471641] of_platform_populate+0x50/0xcc
[ 0.476155] of_platform_default_populate_init+0xa8/0xc8
[ 0.480324] do_one_initcall+0x50/0x1b0
[ 0.485877] kernel_init_freeable+0x234/0x29c
[ 0.489436] kernel_init+0x24/0x120
[ 0.493948] ret_from_fork+0x10/0x20
[ 0.497253] Code: d50323bf d65f03c0 f94002a2 b4000302 (f9400042)
[ 0.501079] ---[ end trace 4ca7e1129da2abce ]---
Fixes: f0cfcf1a
("clk: qcom: ipq8074: Add missing clocks for pcie")
Signed-off-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20211220114119.465247-1-robimarko@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-08 14:40:24 +02:00
..
2021-07-14 16:56:31 +02:00
2019-05-21 10:50:46 +02:00
2021-11-18 14:04:21 +01:00
2019-06-19 17:09:55 +02:00
2019-10-16 16:17:50 -07:00
2020-10-13 19:48:34 -07:00
2022-01-27 10:53:45 +01:00
2019-05-21 10:50:46 +02:00
2020-10-22 12:53:28 -07:00
2019-05-21 10:50:46 +02:00
2019-11-27 08:14:17 -08:00
2020-06-14 01:57:21 +09:00
2022-01-27 10:54:04 +01:00
2022-03-02 11:42:46 +01:00
2021-09-30 10:11:04 +02:00
2019-05-30 11:26:32 -07:00
2020-10-20 11:46:47 -07:00
2022-01-27 10:54:21 +01:00
2019-12-23 18:53:13 -08:00
2021-02-03 23:28:44 +01:00
2021-11-18 14:04:14 +01:00
2019-05-30 11:26:37 -07:00
2019-05-30 11:26:37 -07:00
2019-06-05 17:37:15 +02:00
2020-10-13 19:49:11 -07:00
2022-04-08 14:40:24 +02:00
2021-09-03 10:09:26 +02:00
2021-09-18 13:40:11 +02:00
2021-05-19 10:13:19 +02:00
2020-06-25 15:04:13 -07:00
2020-10-13 19:54:30 -07:00
2021-10-20 11:44:58 +02:00
2020-07-16 12:32:26 -07:00
2020-06-10 11:42:19 -07:00
2020-07-16 12:32:25 -07:00
2020-04-14 09:21:05 +02:00
2021-03-04 11:37:58 +01:00
2021-08-12 13:22:04 +02:00
2020-12-30 11:53:58 +01:00
2022-04-08 14:39:50 +02:00
2020-01-04 23:27:15 -08:00
2020-09-10 00:57:42 -07:00
2020-08-15 08:18:22 -07:00
2019-08-16 10:20:15 -07:00
2019-06-05 17:37:13 +02:00
2021-05-14 09:50:26 +02:00
2020-04-13 12:20:06 -07:00
2019-11-26 10:02:48 -08:00
2019-09-06 15:17:02 -07:00
2021-11-26 10:39:12 +01:00
2020-10-13 19:44:40 -07:00
2019-06-19 17:09:55 +02:00
2020-01-24 07:22:47 +00:00
2022-01-27 10:54:09 +01:00
2019-09-17 13:26:31 -07:00
2020-07-10 17:15:34 -07:00
2019-09-06 10:31:16 -07:00
2019-05-30 11:26:32 -07:00
2020-08-22 12:38:06 +08:00
2018-12-11 09:57:47 -08:00
2021-08-12 13:22:11 +02:00
2021-03-04 11:38:06 +01:00
2019-06-19 17:09:55 +02:00
2020-09-22 12:44:14 -07:00
2019-05-15 13:21:37 -07:00
2020-09-22 12:44:14 -07:00
2019-05-15 13:21:37 -07:00
2020-12-30 11:53:42 +01:00
2020-07-16 12:35:15 -07:00
2020-07-10 17:15:34 -07:00
2019-06-05 17:36:37 +02:00
2019-05-30 11:29:52 -07:00
2020-05-28 21:06:39 -07:00
2019-08-16 10:20:07 -07:00
2019-02-06 10:35:03 -08:00
2019-08-16 10:20:15 -07:00
2019-05-15 13:21:37 -07:00
2020-01-06 23:10:05 -08:00
2019-05-30 11:29:22 -07:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:29:52 -07:00
2020-02-03 23:03:49 -08:00
2020-06-17 20:42:10 +02:00
2020-10-13 19:48:09 -07:00
2019-07-15 20:18:40 -07:00
2020-12-30 11:54:01 +01:00
2020-07-13 09:40:21 +01:00
2019-05-30 11:29:52 -07:00
2019-05-30 11:26:37 -07:00
2019-06-27 13:45:38 -07:00
2019-05-30 11:26:37 -07:00
2022-01-27 10:54:31 +01:00
2020-07-10 17:15:34 -07:00
2019-05-30 11:26:32 -07:00
2020-07-28 18:17:56 -07:00
2022-01-27 10:54:07 +01:00
2019-04-29 11:13:23 -07:00
2019-06-05 17:37:07 +02:00
2019-05-30 11:29:22 -07:00
2021-07-14 16:56:19 +02:00
2019-06-05 17:36:37 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:35 -07:00
2022-01-27 10:54:31 +01:00
2019-07-12 11:00:14 -07:00
2019-06-19 17:09:55 +02:00
2020-10-20 11:47:07 -07:00
2020-07-28 18:17:56 -07:00