linux/drivers/staging
Sergio Paracuellos c7b65650c7 staging: mt7621-pci: avoid to re-disable clock for those pcies not in use
Clock driver for this SoC is using some gates to properly enabling
and disabling the access to peripherals. Those gates that are not
in use are properly being automatically disabled by the kernel.
Pcie driver is explicitly doing a 'clk_disable_unprepare' call for
gates of those pcies that are not used. Since kernel has already
disabled them, the following warnings appear:

WARNING: CPU: 0 PID: 1 at drivers/clk/clk.c:952 clk_core_disable+0xe4/0x100
pcie2 already disabled
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.14.0 #0
Stack : 81661680 80082d00 807c0000 00000004 00000000
        80a20000 80860000 80792380
        814503d4 80862e83 00000000 1431b70 81454360
        00000000 00000000 80792380
        81431a08 ffffefff fffffea 00000000 81431a14
        0000007b 80868820 ffffffff
        80792380 1431c70 803d7a24 00000009 807f3a74
        00000001 815df810 00000018 0000000 80a20000
...
Call Trace:
[<80007ed8>] show_stack+0x28/0xf0
[<80381e40>] dump_stack_lvl+0x60/0x80
[<8002cf90>] __warn+0xcc/0x140
[<8002d090>] warn_slowpath_fmt+0x8c/0xac
[<803d7a24>] clk_core_disable+0xe4/0x100
[<803da468>] clk_disable+0x38/0x58
[<804cb730>] mt7621_pci_probe+0x980/0xa50
[<8041e624>] platform_probe+0x50/0xbc
[<8041bfe4>] really_probe.part.0+0xa8/0x340
[<8041c3dc>] driver_probe_device+0x4c/0x154
[<8041cb88>] __driver_attach+0xb4/0x1b4
[<80419a38>] bus_for_each_dev+0x68/0xa4
[<8041b1e8>] bus_add_driver+0x134/0x214
[<8041d3bc>] driver_register+0x98/0x154
[<80001648>] do_one_initcall+0x50/0x1a8
[<808ea1fc>] kernel_init_freeable+0x270/0x30c
[<806dd9dc>] kernel_init+0x20/0x110
[<80002d98>] ret_from_kernel_thread+0x14/0x1c

WARNING: CPU: 0 PID: 1 at drivers/clk/clk.c:810 clk_core_unprepare+0xf4/0x194
pcie2 already unprepared
Modules linked in:
CPU: 0 PID: 1 Comm: swapper/0 Tainted: G        W 5.14.0 #0
Stack : 81661680 80082d00 807c0000 00000004 00000000
        00000000 81431bc4 80a20000
        80860000 80792380 814503d4 80862e83 00000000
        00000001 81431b70 81454360
        00000000 00000000 80792380 81431a08 ffffefff
        00000000 ffffffea 00000000
        81431a14 0000009b 80868820 ffffffff 80792380
        00000001 81431c70 803d7764
        00000009 807f3a74 00000001 815df810 00000018
        8040b36c 00000000 80a20000
...
Call Trace:
[<80007ed8>] show_stack+0x28/0xf0
[<80381e40>] dump_stack_lvl+0x60/0x80
[<8002cf90>] __warn+0xcc/0x140
[<8002d090>] warn_slowpath_fmt+0x8c/0xac
[<803d7764>] clk_core_unprepare+0xf4/0x194
[<803d97c4>] clk_unprepare+0x30/0x48
[<804cb738>] mt7621_pci_probe+0x988/0xa50
[<8041e624>] platform_probe+0x50/0xbc
[<8041bfe4>] really_probe.part.0+0xa8/0x340
[<8041c3dc>] driver_probe_device+0x4c/0x154
[<8041cb88>] __driver_attach+0xb4/0x1b4
[<80419a38>] bus_for_each_dev+0x68/0xa4
[<8041b1e8>] bus_add_driver+0x134/0x214
[<8041d3bc>] driver_register+0x98/0x154
[<80001648>] do_one_initcall+0x50/0x1a8
[<808ea1fc>] kernel_init_freeable+0x270/0x30c
[<806dd9dc>] kernel_init+0x20/0x110
[<80002d98>] ret_from_kernel_thread+0x14/0x1c

Avoid to explicitly disable already disabled pcie gates
fixes the problem.

Fixes: cc4e864a5c ("staging: mt7621-pci: make use of kernel clock apis")
Reported-by: DENG Qingfang <dqfext@gmail.com>
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Link: https://lore.kernel.org/r/20210727054058.10612-1-sergio.paracuellos@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-27 15:48:43 +02:00
..
android staging: android: ashmem: add size field in procfs fdinfo 2021-06-18 13:02:40 +02:00
axis-fifo staging: axis-fifo: axis-fifo: Fix function naming in the documentation 2021-05-10 11:19:27 +02:00
board clkdev: remove CONFIG_CLKDEV_LOOKUP 2021-06-08 17:00:09 +02:00
clocking-wizard
emxx_udc staging: emxx_udc: fix alignment issues 2021-05-25 18:25:52 +02:00
fbtft staging: fbtft: Update TODO 2021-05-10 11:19:39 +02:00
fieldbus staging: fieldbus: anybus: Refuse registering drivers without .probe() 2021-05-10 11:19:41 +02:00
fwserial TTY / Serial patches for 5.14-rc1 2021-07-05 14:08:24 -07:00
gdm724x TTY / Serial patches for 5.14-rc1 2021-07-05 14:08:24 -07:00
greybus TTY / Serial patches for 5.14-rc1 2021-07-05 14:08:24 -07:00
gs_fpgaboot staging: fpgaboot: change FPGA indirect article to an 2021-06-09 14:26:54 +02:00
hikey9xx staging: hi6421-spmi-pmic: cleanup some macros 2021-06-25 10:02:57 +02:00
iio 1st set of new IIO/counter device support, features and cleanup for 5.14 2021-06-09 12:11:49 +02:00
ks7010 staging: ks7010: Wrap macro definitions in parenthesis 2021-06-18 13:02:54 +02:00
media media: hantro: add support for Rockchip RK3036 2021-06-17 11:00:43 +02:00
most staging: most: dim2: hal: Demote non-conformant kernel-doc headers 2021-05-10 11:19:26 +02:00
mt7621-dma
mt7621-dts Staging / IIO driver patches for 5.14-rc1 2021-07-05 14:01:53 -07:00
mt7621-pci staging: mt7621-pci: avoid to re-disable clock for those pcies not in use 2021-07-27 15:48:43 +02:00
netlogic
nvec staging: nvec: Fix a bunch of kernel-doc issues 2021-05-10 11:19:24 +02:00
octeon staging: octeon: ethernet-tx: Fix formatting issue in function header 2021-05-10 11:19:24 +02:00
octeon-usb staging: octeon-hcd: Directly include linux/of.h 2021-06-10 13:09:15 +01:00
olpc_dcon kernel.h: split out panic and oops helpers 2021-07-01 11:06:04 -07:00
pi433
qlge staging: qlge: change msleep to usleep_range 2021-06-14 16:40:34 +02:00
ralink-gdma staging: ralink-gdma: Remove incorrect author information 2021-06-09 12:07:52 +02:00
rtl8188eu staging: rtl8188eu: remove include/rtw_debug.h header 2021-06-25 09:03:51 +02:00
rtl8192e staging: rtl8192e: Fix shadowed variable name 2021-05-25 18:23:32 +02:00
rtl8192u staging: rtl8192u: fix spaces in r8192U_hw.h 2021-06-03 15:59:18 +02:00
rtl8712 staging: rtl8712: error handling refactoring 2021-07-27 15:15:24 +02:00
rtl8723bs staging: rtl8723bs: select CONFIG_CRYPTO_LIB_ARC4 2021-07-21 17:41:24 +02:00
rts5208 staging: rts5208: remove redundant continue statement 2021-06-18 13:02:47 +02:00
sm750fb staging: sm750fb: sm750_accel: Provide description for 'accel' and fix function naming 2021-05-10 11:19:25 +02:00
unisys staging: unisys: visorhba: Convert module from IDR to XArray 2021-06-15 13:55:11 +02:00
vc04_services staging: vchiq_core: introduce handle_poll 2021-06-04 15:10:03 +02:00
vme
vt6655 staging: vt6655: upc: Suppress set but not used warning in macro 2021-05-10 11:19:25 +02:00
vt6656
wfx Networking changes for 5.13. 2021-04-29 11:57:23 -07:00
wlan-ng staging: wlan-ng: silence incorrect type in argument 1 (different address spaces) 2021-05-10 11:19:33 +02:00
Kconfig staging: drop kpc2000 driver 2021-06-12 15:38:35 +02:00
Makefile staging: drop kpc2000 driver 2021-06-12 15:38:35 +02:00