cancel
Showing results for 
Search instead for 
Did you mean: 

How to disable sdmmc1

Wjian.1
Associate II

Hi:

When I do not enable sdmmc1 in the device tree , a null pointer error will appear, as follows:

 Unable to handle kernel NULL pointer dereference at virtual address 00000020

[  4.406546] pgd = b1eff48d

[  4.409244] [00000020] *pgd=00000000

[  4.412826] Internal error: Oops: 17 [#1] PREEMPT SMP ARM

[  4.418223] Modules linked in:

[  4.421278] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 5.4.31 #1

[  4.426906] mmc0: new high speed SDIO card at address 0001

[  4.427205] Hardware name: STM32 (Device Tree Support)

[  4.437847] PC is at mp1_mgate_clk_disable_safe+0x38/0x8c

[  4.443241] LR is at mp1_mgate_clk_disable_safe+0x10/0x8c

[  4.448644] pc : [<c06304bc>]  lr : [<c0630494>]  psr: 60000093

[  4.454918] sp : df083eb0 ip : 00000000 fp : 00000008

[  4.460149] r10: 0000013a r9 : c11004a4 r8 : c115f858

[  4.465380] r7 : 00000000 r6 : 00000000 r5 : d1854cc0 r4 : d1852cc0

[  4.471919] r3 : 00000000 r2 : c131bb04 r1 : 00000001 r0 : d1852cc0

[  4.478459] Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment none

[  4.485693] Control: 10c5387d Table: d1c3c06a DAC: 00000051

[  4.491447] Process swapper/0 (pid: 1, stack limit = 0x078a7dc4)

[  4.497460] Stack: (0xdf083eb0 to 0xdf084000)

[  4.501823] 3ea0:                   60000013 d1854cc0 c12c07a0 00000000

[  4.510023] 3ec0: c115f858 c06280d0 d1854cc0 d1841240 ffffe000 00000000 c115f858 c0628018

[  4.518216] 3ee0: d1841240 c131a950 ffffe000 00000000 c115f858 c062a148 c12bdaa0 c062a110

[  4.526413] 3f00: ffffe000 c0102fa8 00000001 c0168738 c109a538 c1100400 c0f8dfb4 00000000

[  4.534606] 3f20: 00000007 00000007 00000000 c0f11e78 c0f0309c c0f03050 c11731f0 dffffdff

[  4.542801] 3f40: dffffe07 c1204e88 cccccccd 00000007 c12f18c0 c1204e88 c115f834 c1173e04

[  4.550998] 3f60: c12f18c0 c12f18c0 c115f838 c1101110 00000007 00000007 00000000 c11004a4

[  4.559191] 3f80: c0c022a8 00000000 c0c022a8 00000000 00000000 00000000 00000000 00000000

[  4.567387] 3fa0: 00000000 c0c022b0 00000000 c01010e8 00000000 00000000 00000000 00000000

[  4.575582] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

[  4.583776] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000

[  4.591993] [<c06304bc>] (mp1_mgate_clk_disable_safe) from [<c06280d0>] (clk_disable_unused_subtree+0xdc/0x260)

[  4.602087] [<c06280d0>] (clk_disable_unused_subtree) from [<c0628018>] (clk_disable_unused_subtree+0x24/0x260)

[  4.612200] [<c0628018>] (clk_disable_unused_subtree) from [<c062a148>] (clk_disable_unused+0x38/0x128)

[  4.621617] [<c062a148>] (clk_disable_unused) from [<c0102fa8>] (do_one_initcall+0x58/0x2b4)

[  4.630077] [<c0102fa8>] (do_one_initcall) from [<c1101110>] (kernel_init_freeable+0x1c8/0x264)

[  4.638790] [<c1101110>] (kernel_init_freeable) from [<c0c022b0>] (kernel_init+0x8/0x110)

[  4.646986] [<c0c022b0>] (kernel_init) from [<c01010e8>] (ret_from_fork+0x14/0x2c)

[  4.654558] Exception stack(0xdf083fb0 to 0xdf083ff8)

[  4.659618] 3fa0:                   00000000 00000000 00000000 00000000

[  4.667818] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

[  4.676008] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000

[  4.682637] Code: e5933004 e3530000 18bd81f0 e590606c (e5963020) 

[  4.688736] ---[ end trace e4f79bf44d365709 ]---

[  4.693361] note: swapper/0[1] exited with preempt_count 1

[  4.698849] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b

[  5.790685] SMP: failed to stop secondary CPUs

[  5.793669] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b ]---

How can I fix this problem? kernel version is 5.4.31

Best regard!​

1 REPLY 1
Wjian.1
Associate II

sdmmc1 device tree configuration:

&sdmmc1 {

   pinctrl-names = "default", "opendrain", "sleep";

   pinctrl-0 = <&sdmmc1_b4_pins_a>;

   pinctrl-1 = <&sdmmc1_b4_od_pins_a>;

   pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;

   broken-cd;

   st,neg-edge;

   bus-width = <4>;

   vmmc-supply = <&vdd_sd>;

   status = "disabled";

};