MLK-18208-1 clk: imx: imx8qm: remove unused clocks

Latest SCFW has requirement that whenever trying
access a resource, its power MUST be turned ON,
otherwise, XRDC will block such access and cause
kernel dump like below, this patch removes those
unused clocks to avoid such dump during kernel clock
framework trying to disable unused clocks, as these
clocks' power domains are NOT enabled because no device
use them now.

[    7.300474] Unhandled fault: synchronous external abort (0x96000210) at 0xffff00000ab40000
[    7.308736] Internal error: : 96000210 [#1] PREEMPT SMP
[    7.313955] Modules linked in:
[    7.317018] CPU: 2 PID: 1 Comm: swapper/0 Not tainted 4.9.88-04869-ga28143b-dirty #127
[    7.324936] Hardware name: Freescale i.MX8QM MEK (DT)
[    7.329984] task: ffff8008f60a8000 task.stack: ffff8008f6034000
[    7.335910] PC is at clk_gate2_scu_is_enabled+0x30/0x74
[    7.341131] LR is at clk_gate2_scu_is_enabled+0x5c/0x74
[    7.346352] pc : [<ffff0000084f4664>] lr : [<ffff0000084f4690>] pstate: 800001c5
[    7.353743] sp : ffff8008f6037d40
[    7.357053] x29: ffff8008f6037d40 x28: ffff0000091e3508
[    7.362379] x27: ffff0000093ea000 x26: ffff00000918045c
[    7.367704] x25: ffff0000091e3560 x24: ffff0000093ea000
[    7.373030] x23: ffff0000091743f0 x22: ffff0000094152f8
[    7.378355] x21: ffff000009415000 x20: ffff8008f6575d00
[    7.383680] x19: ffff8008f65b9900 x18: ffff000008e102f8
[    7.389006] x17: 0000000000000000 x16: 0000000000000000
[    7.394331] x15: 0000000000000000 x14: 0000000000000000
[    7.399657] x13: 0000000000000007 x12: 00000000000002ce
[    7.404982] x11: 0000000000000006 x10: 00000000000002cf
[    7.410307] x9 : 0000000000000006 x8 : 2c6e69616d6f645f
[    7.415633] x7 : 0000000000000020 x6 : ffff000008cb1400
[    7.420958] x5 : 0000000000000008 x4 : 0000000000000000
[    7.426284] x3 : 0000000000000000 x2 : 0000000000000001
[    7.431609] x1 : ffff00000ab40000 x0 : 0000000000000000
[    7.436935]
[    7.438421] Process swapper/0 (pid: 1, stack limit = 0xffff8008f6034020)
[    7.445120] Stack: (0xffff8008f6037d40 to 0xffff8008f6038000)
[    7.450864] 7d40: ffff8008f6037d60 ffff0000084e1994 0000000000000140 ffff8008f663be00
[    7.458691] 7d60: ffff8008f6037d80 ffff0000084e1930 ffff8008f6575d00 ffff8008f663bd00
[    7.466518] 7d80: ffff8008f6037da0 ffff0000084e1a0c ffff8008f66455a8 ffff8008f663bd00
[    7.474346] 7da0: ffff8008f6037dd0 ffff000008084144 ffff8008f6034000 ffff0000084e19c8
[    7.482173] 7dc0: 0000000000000000 ffff0000091e34d0 ffff8008f6037e40 ffff000009180d00
[    7.490000] 7de0: ffff000009251028 0000000000000007 0000000000000198 ffff0000091e34d0
[    7.497828] 7e00: ffff8008f6037e00 ffff000008fd0198 ffff8008f6037e20 ffff000008fcf9e8
[    7.505655] 7e20: 0000000700000007 0000000000000000 0000000000000000 ffff0000091743f0
[    7.513483] 7e40: ffff8008f6037ea0 ffff000008c4b62c ffff000008c4b61c 0000000000000000
[    7.521310] 7e60: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[    7.529137] 7e80: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[    7.536965] 7ea0: 0000000000000000 ffff000008083820 ffff000008c4b61c 0000000000000000
[    7.544792] 7ec0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[    7.552619] 7ee0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[    7.560447] 7f00: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[    7.568274] 7f20: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[    7.576102] 7f40: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[    7.583929] 7f60: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[    7.591757] 7f80: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[    7.599584] 7fa0: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[    7.607411] 7fc0: 0000000000000000 0000000000000005 0000000000000000 0000000000000000
[    7.615239] 7fe0: 0000000000000000 0000000000000000 ffffffffffffffff 7fff7f7fffffffff
[    7.623065] Call trace:
[    7.625508] Exception stack(0xffff8008f6037b70 to 0xffff8008f6037ca0)
[    7.631945] 7b60:                                   ffff8008f65b9900 0000ffffffffffff
[    7.639773] 7b80: ffff8008f6037d40 ffff0000084f4664 0000000000000007 ffff000000000000
[    7.647600] 7ba0: ffff00000ab40000 0000000000000000 ffff0000093f41c8 00000000000001c0
[    7.655428] 7bc0: ffff8008f6037cc0 ffff8008f6037cc0 ffff8008f6037c80 00000000ffffffc8
[    7.663255] 7be0: ffff8008f6037c10 ffff00000816f824 ffff8008f6037cc0 ffff8008f6037cc0
[    7.671083] 7c00: ffff8008f6037c80 00000000ffffffc8 0000000000000000 ffff00000ab40000
[    7.678910] 7c20: 0000000000000001 0000000000000000 0000000000000000 0000000000000008
[    7.686737] 7c40: ffff000008cb1400 0000000000000020 2c6e69616d6f645f 0000000000000006
[    7.694565] 7c60: 00000000000002cf 0000000000000006 00000000000002ce 0000000000000007
[    7.702392] 7c80: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
[    7.710221] [<ffff0000084f4664>] clk_gate2_scu_is_enabled+0x30/0x74
[    7.716486] [<ffff0000084e1994>] clk_disable_unused_subtree+0x8c/0xc0
[    7.722930] [<ffff0000084e1930>] clk_disable_unused_subtree+0x28/0xc0
[    7.729367] [<ffff0000084e1a0c>] clk_disable_unused+0x44/0x130
[    7.735199] [<ffff000008084144>] do_one_initcall+0x38/0x128
[    7.740778] [<ffff000009180d00>] kernel_init_freeable+0x1ac/0x248
[    7.746875] [<ffff000008c4b62c>] kernel_init+0x10/0xf8
[    7.752015] [<ffff000008083820>] ret_from_fork+0x10/0x30
[    7.757325] Code: b9418420 35000200 f9400e61 b40001c1 (b9400021)
[    7.763429] ---[ end trace bfe5d53d2c12087e ]---
[    7.768052] note: swapper/0[1] exited with preempt_count 1
[    7.773559] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[    7.773559]
[    7.782689] SMP: stopping secondary CPUs
[    7.786616] Kernel Offset: disabled
[    7.790099] Memory Limit: none
[    7.793151] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
This commit is contained in:
Anson Huang 2018-05-07 13:01:24 +08:00 committed by Jason Liu
parent e0b9ee0d23
commit 4874b797d7

View file

@ -1,6 +1,6 @@
/*
* Copyright (C) 2016 Freescale Semiconductor, Inc.
* Copyright 2017 NXP
* Copyright 2017-2018 NXP
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -558,8 +558,6 @@ static int imx8qm_clk_probe(struct platform_device *pdev)
clks[IMX8QM_ROMCP_REG_CLK] = imx_clk_gate2_scu("romcp_reg_clk", "lsio_bus_clk_root", LPCG_ADDR(ROMCP_LPCG), 0x10, FUNCTION_NAME(PD_LSIO));
clks[IMX8QM_ROMCP_CLK] = imx_clk_gate2_scu("romcp_clk", "lsio_mem_clk_root", LPCG_ADDR(ROMCP_LPCG), 0x0, FUNCTION_NAME(PD_LSIO));
clks[IMX8QM_96KROM_CLK] = imx_clk_gate2_scu("96krom_clk", "lsio_mem_clk_root", LPCG_ADDR(ROMCP_LPCG), 0x4, FUNCTION_NAME(PD_LSIO));
clks[IMX8QM_OCRAM_MEM_CLK] = imx_clk_gate2_scu("ocram_lk", "lsio_mem_clk_root", LPCG_ADDR(OCRAM_LPCG), 0x4, FUNCTION_NAME(PD_LSIO));
clks[IMX8QM_OCRAM_CTRL_CLK] = imx_clk_gate2_scu("ocram_ctrl_clk", "lsio_mem_clk_root", LPCG_ADDR(OCRAM_LPCG), 0x0, FUNCTION_NAME(PD_LSIO));
/* Audio */
clks[IMX8QM_AUD_ACM_AUD_PLL_CLK0_CLK] = imx_clk_gate_scu("aud_acm_aud_pll_clk0_clk", "aud_acm_aud_pll_clk0_div", SC_R_AUDIO_PLL_0, SC_PM_CLK_MISC0, LPCG_ADDR(AUD_PLL_CLK0_LPCG), 0, 0);