Commits
Fancy Fang committed 452bdeaedd6
MLK-14240 video: mipi_dsi_northwest: fix access dsi register when clock disabled. In the mipi_dsi_shutdown() function, it accesses some dsi registers. But in some cases, the esc_clk may be disabled at this moment. So first enable this clock then do other shutdown works. Otherwise, it may cause kernel panic dump as belows when rebooting system: Unhandled fault: imprecise external abort (0x1c06) at 0x0033802c pgd = b0a24000 [0033802c] *pgd=908f1831, *pte=6320775f, *ppte=63207c7f Internal error: : 1c06 [#1] PREEMPT SMP ARM Modules linked in: CPU: 0 PID: 1059 Comm: reboot Not tainted 4.1.33-02248-g22f8d64-dirty #513 Hardware name: Freescale i.MX7ULP (Device Tree) task: b0f56600 ti: b08e8000 task.ti: b08e8000 PC is at mipi_dsi_pkt_write+0x38/0x1b0 LR is at mipi_dsi_wr_tx_header.constprop.2+0x6c/0x94 pc : [<802fda08>] lr : [<802fd8b8>] psr: 60070013 sp : b08e9c00 ip : 00000001 fp : 00000000 r10: 00000000 r9 : b024a810 r8 : b00c5044 r7 : 80cac4d8 r6 : 80bd2504 r5 : b024a810 r4 : b024a810 r3 : c0920000 r2 : 00000000 r1 : 60070013 r0 : 00000023 Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user Control: 10c53c7d Table: 90a2406a DAC: 00000015 Process reboot (pid: 1059, stack limit = 0xb08e8210) Stack: (0xb08e9c00 to 0xb08ea000) 9c00: 00000000 80066e30 00000000 b00c5000 20070113 b024a810 b024a810 b00c5010 9c20: 80cac4d8 b00c5044 80c54020 00000000 00000000 802fdba4 00000028 00000000 9c40: bf672edc 00000001 80bdff40 8007ad7c 8004993c 8082eb30 00000000 80be0140 9c60: 80bcddc0 80832cd8 80c517f1 80bcddc0 b08e9c70 80bdfb40 b0004c60 00000000 9c80: 00000009 00000000 00000009 00000000 80c576c0 00000000 80bd20a8 8003b9d8 9ca0: 00000000 b08e9d68 b08e9ca0 80c576c0 0000000a ffffb7c1 80bd2100 80bcbbe8 9cc0: 00000000 80bcd800 b0f56600 bf672800 b0f56648 b00fab08 b00fab10 8005fc30 9ce0: 00000017 00000000 00000000 8006ff84 c080200c 00000026 80bd2838 b08e9d28 9d00: 80361f04 80c586d6 80c586d6 8035b2a8 80361f04 b02b3610 80bd2504 001c0700 9d20: 003c0700 8036212c 80bff3b0 80c58198 80bdf8a0 20070093 00000199 8082e868 9d40: 00000000 80bdf8a0 80c58198 00000000 00000199 8082eadc 80c58198 8006e8b0 9d60: 00000400 80c5f48c 00000029 80c98ac8 80c58198 80c98098 60070013 00000000 9d80: 80bdf880 00000001 00000000 80c58198 00000000 00000029 00000001 80c58198 9da0: 00000029 00000001 00000000 8006e654 00000000 8006ee2c 00000000 00000000 9dc0: 00000000 00000000 80c98ae6 00000029 00000000 00000000 00000000 60070013 9de0: 00000000 00000000 00000000 8006f214 b024a810 b00c5010 80cac4d8 b00c5044 9e00: 80c54020 00000000 00000000 8006f238 80a580f0 b08e9e34 00000000 80824414 9e20: 80a58148 b08e9e34 b024a810 802fdc6c 80a580f0 80872338 00000000 802fdc80 9e40: 60070013 b024a810 b00c1a10 802fdd10 802fdcf0 b00c5010 b00c1a10 8038e8a8 9e60: b00c501c 8038b3cc 01234567 00000000 80bdee38 00000000 fee1dead 8000f644 9e80: b08e8000 800529cc 00000000 80052c24 bf699000 00000001 00000000 800b3498 9ea0: 00000000 bfca9160 bf699000 80bd04b8 bfca9160 00000000 80c50880 800b5460 9ec0: b08e9ed4 00000000 b08e9ec8 00000000 b074ad10 00000000 00359000 b074a7e8 9ee0: b08e9f20 b074ad10 b0a56e00 00351000 b074ad10 800d3cb8 b0a56e00 00000000 9f00: b074ad10 00351000 00000001 00000001 b08e9f24 b0001680 00000001 00000001 9f20: b08e9f34 bf672e00 b086a240 bf672e00 ae13f550 ae13f5a0 00080040 00000001 9f40: b086a240 ae1533f0 00000000 b07e1d90 ae13f550 40000010 b086a240 800ed1b0 9f60: 00000020 00000000 b0f569f8 00000000 b0f569f8 00000000 80c57c28 b0f56600 9f80: 00000000 8004f358 b086a240 b08e8000 8000f644 7eec5e14 00000003 00000000 9fa0: 00000058 8000f4c0 7eec5e14 00000003 fee1dead 28121969 01234567 00000000 9fc0: 7eec5e14 00000003 00000000 00000058 00000000 00000000 00000000 00000000 9fe0: 76f3ec10 7eec5c7c 00010fc8 76f3ec30 60070010 fee1dead 00000000 00000000 [<802fda08>] (mipi_dsi_pkt_write) from [<802fdba4>] (mipi_dsi_dcs_cmd.part.0+0x24/0x2c) [<802fdba4>] (mipi_dsi_dcs_cmd.part.0) from [<802fdc80>] (mipi_display_enter_sleep+0x30/0xa0) [<802fdc80>] (mipi_display_enter_sleep) from [<802fdd10>] (mipi_dsi_shutdown+0x20/0x9c) [<802fdd10>] (mipi_dsi_shutdown) from [<8038e8a8>] (platform_drv_shutdown+0x18/0x28) [<8038e8a8>] (platform_drv_shutdown) from [<8038b3cc>] (device_shutdown+0xdc/0x1e4) [<8038b3cc>] (device_shutdown) from [<800529cc>] (kernel_restart+0xc/0x50) [<800529cc>] (kernel_restart) from [<80052c24>] (SyS_reboot+0xc8/0x1b8) [<80052c24>] (SyS_reboot) from [<8000f4c0>] (ret_fast_syscall+0x0/0x3c) Code: e34860bd e58da000 e1a0200c ebffff90 (f57ff04e) ---[ end trace 9f61c48a242457f2 ]--- Signed-off-by: Fancy Fang <chen.fang@nxp.com>