This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM4378: Getting Kernel panic while upgrading to Linux Kernel 5.15 as VFS is not loading

Part Number: AM4378
Other Parts Discussed in Thread: TPS65218, CSD, AM4372

Hi,

    I have to upgrade Linux Kernel from version 5.4 to 5.15. While doing so I upgraded Buildroot from buildroot-2020.02.1 to buildroot-2021.08.3. With new buildroot I am able to get the old Kernel compiled and running successfully. When I compile with new Kernel 5.15 the code compiles however while running it goes into Kernel panic mode and hangs on there.

In between the Kernel throws exception (Highlighted in green) and again resumes further logging, is this the point where issue starts?

Is it some issue with clock/edma config also?

Also, have added debug msg in sd.c (Highlighted in yellow) and found that kmalloc call in mmc_sd_switch_hs function never returns.

This is the log


U-Boot SPL 2017.01 (Sep 26 2022 - 18:12:41)
Trying to boot from MMC1
reading u-boot.img
reading u-boot.img
reading u-boot.img
No matching DT out of these options:
tco_am437x_pascal


U-Boot 2017.01 (Sep 26 2022 - 18:12:41 +0530)

CPU : AM437X-GP rev 1.2
Model: TI AM437x GP EVM
DRAM: 512 MiB
PMIC: TPS65218
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
reading uboot.env

** Unable to read "uboot.env" from mmc0:1 **
Using default environment

Net: <ethaddr> not set. Validating first E-fuse MAC
Could not get PHY for cpsw: addr 0
cpsw, usb_ether
Hit any key to stop autoboot: 0
reading tco_fw_update.scr
** Unable to read file tco_fw_update.scr **
reading zImage
5344882 bytes read in 288 ms (17.7 MiB/s)

Starting kernel ...

[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 5.15.0 (ubuntu@ubuntu2004) (arm-buildroot-linux-gnueabihf-gcc.br_real (Buildroot -g481ecf3-dirty) 10.3.0, GNU ld (GNU Binutils) 2.37) #80 Tue Oct 11 16:32:01 IST 2022
[ 0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: abc Board Rev A
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] cma: Reserved 24 MiB at 0x9e800000
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x0000000080000000-0x000000009fffffff]
[ 0.000000] HighMem empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000080000000-0x000000009fffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x000000009fffffff]
[ 0.000000] CPU: All CPU(s) started in SVC mode.
[ 0.000000] AM437x ES1.2 (sgx neon)
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 130048
[ 0.000000] Kernel command line: root=/dev/mmcblk0p2 console=ttyS0,115200 norootwait vram=16M omapfb.vram=0:8M,1:4M,2:4M vt.global_cursor_default=0
[ 0.000000] Unknown command line parameters: norootwait vram=16M
[ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 481912K/524288K available (8192K kernel code, 408K rwdata, 2588K rodata, 1024K init, 197K bss, 17800K reserved, 24576K cma-reserved, 0K highmem)
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] L2C: platform modifies aux control register: 0x0e030000 -> 0x3e430000
[ 0.000000] L2C: DT/platform modifies aux control register: 0x0e030000 -> 0x3e430000
[ 0.000000] L2C-310 enabling early BRESP for Cortex-A9
[ 0.000000] OMAP L2C310: ROM does not support power control setting
[ 0.000000] L2C-310 dynamic clock gating disabled, standby mode disabled
[ 0.000000] L2C-310 cache controller enabled, 16 ways, 256 kB
[ 0.000000] L2C-310: CACHE_ID 0x410000c9, AUX_CTRL 0x4e430000
[ 0.000000] random: get_random_bytes called from start_kernel+0x470/0x620 with crng_init=0
[ 0.000000] /ocp@44000000/interconnect@44c00000/segment@100000/target-module@f0000/prcm@0/l4-rtc-cm@8500/l4-rtc-clkctrl@20 not found from clkctrl data.
[ 0.000000] TI gptimer clocksource: always-on /ocp@44000000/interconnect@44c00000/segment@200000/target-module@31000
[ 0.000001] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[ 0.000023] clocksource: dmtimer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000159] OMAP clocksource: 32k_counter at 32768 Hz
[ 0.000171] clocksource: 32k_counter: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 58327039986419 ns
[ 0.000490] TI gptimer clockevent: 24000000 Hz at /ocp@44000000/interconnect@48000000/segment@0/target-module@40000
[ 0.002040] Console: colour dummy device 80x30
[ 0.002120] Calibrating delay loop... 1594.16 BogoMIPS (lpj=7970816)
[ 0.087293] pid_max: default: 32768 minimum: 301
[ 0.087392] LSM: Security Framework initializing
[ 0.087484] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.087510] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.088276] CPU: Testing write buffer coherency: ok
[ 0.088349] CPU0: Spectre v2: using BPIALL workaround
[ 0.088937] Setting up static identity map for 0x80100000 - 0x80100060
[ 0.089580] devtmpfs: initialized
[ 0.102996] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[ 0.103295] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.103329] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[ 0.105120] pinctrl core: initialized pinctrl subsystem
[ 0.106349] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[ 0.108109] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.109007] thermal_sys: Registered thermal governor 'fair_share'
[ 0.109021] thermal_sys: Registered thermal governor 'step_wise'
[ 0.109034] thermal_sys: Registered thermal governor 'user_space'
[ 0.109618] cpuidle: using governor ladder
[ 0.109639] cpuidle: using governor menu
[ 0.132678] No ATAGs?
[ 0.132716] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[ 0.132732] hw-breakpoint: maximum watchpoint size is 4 bytes.
[ 0.140692] Kprobes globally optimized
[ 0.146787] iommu: Default domain type: Translated
[ 0.146816] iommu: DMA domain TLB invalidation policy: strict mode
[ 0.148401] SCSI subsystem initialized
[ 0.148638] usbcore: registered new interface driver usbfs
[ 0.148693] usbcore: registered new interface driver hub
[ 0.148744] usbcore: registered new device driver usb
[ 0.149101] mc: Linux media interface: v0.10
[ 0.149142] videodev: Linux video capture interface: v2.00
[ 0.149218] pps_core: LinuxPPS API ver. 1 registered
[ 0.149230] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.149256] PTP clock support registered
[ 0.150283] clocksource: Switched to clocksource dmtimer
[ 0.150608] VFS: Disk quotas dquot_6.6.0
[ 0.150687] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 0.157908] NET: Registered PF_INET protocol family
[ 0.158174] IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)
[ 0.158891] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[ 0.158937] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
[ 0.158983] TCP bind hash table entries: 4096 (order: 2, 16384 bytes, linear)
[ 0.159038] TCP: Hash tables configured (established 4096 bind 4096)
[ 0.159167] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[ 0.159195] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[ 0.159341] NET: Registered PF_UNIX/PF_LOCAL protocol family
[ 0.159909] RPC: Registered named UNIX socket transport module.
[ 0.159932] RPC: Registered udp transport module.
[ 0.159939] RPC: Registered tcp transport module.
[ 0.159947] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.161655] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[ 0.162686] NFS: Registering the id_resolver key type
[ 0.162737] Key type id_resolver registered
[ 0.162748] Key type id_legacy registered
[ 0.255634] NET: Registered PF_ALG protocol family
[ 0.255720] io scheduler mq-deadline registered
[ 0.255735] io scheduler kyber registered
[ 0.259676] panel-dpi display: failed to find video source
[ 0.260496] Serial: 8250/16550 driver, 10 ports, IRQ sharing disabled
[ 0.273558] brd: module loaded
[ 0.279767] loop: module loaded
[ 0.280982] libphy: Fixed MDIO Bus: probed
[ 0.281151] CAN device driver interface
[ 0.282179] usbcore: registered new interface driver usb-storage
[ 0.282514] i2c_dev: i2c /dev entries driver
[ 0.283460] ledtrig-cpu: registered to indicate activity on CPUs
[ 0.283832] usbcore: registered new interface driver usbhid
[ 0.283845] usbhid: USB HID core driver
[ 0.286013] Initializing XFRM netlink socket
[ 0.286057] NET: Registered PF_PACKET protocol family
[ 0.286090] NET: Registered PF_KEY protocol family
[ 0.286146] Bridge firewalling registered
[ 0.286157] can: controller area network core
[ 0.286221] NET: Registered PF_CAN protocol family
[ 0.286233] can: raw protocol
[ 0.286245] can: broadcast manager protocol
[ 0.286259] can: netlink gateway - max_hops=1
[ 0.286388] Key type dns_resolver registered
[ 0.286499] ThumbEE CPU extension supported.
[ 0.286517] Registering SWP/SWPB emulation handler
[ 0.286528] omap_voltage_late_init: Voltage driver support not added
[ 0.286819] PM: Cannot get wkup_m3_ipc handle
[ 0.300145] wkup_m3_rproc 44d00000.wkup_m3: Platform data missing!
[ 0.300187] remoteproc remoteproc0: releasing wkup_m3
[ 0.308984] input: ti-tsc as /devices/platform/44000000.ocp/44c00000.interconnect/44c00000.interconnect:segment@200000/44e0d000.target-module/44e0d000.tscadc/TI-am335x-tsc.0.auto/input/input0
[ 0.314715] pinctrl-single 44e10800.pinmux: 199 pins, size 796
[ 0.316629] wkup_m3_ipc 44e11324.wkup_m3_ipc: IPC Request for A8->M3 Channel failed! -517
[ 0.320129] ti-sysc 44e3e074.target-module: clock get error for fck: -517
[ 0.323692] omap8250 48022000.serial: No clock speed specified: using default: 48000000
[ 0.324317] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 61, base_baud = 3000000) is a 8250
[ 0.325984] omap8250 48024000.serial: No clock speed specified: using default: 48000000
[ 0.326547] 48024000.serial: ttyS2 at MMIO 0x48024000 (irq = 62, base_baud = 3000000) is a 8250
[ 0.328905] omap_i2c 4802a000.i2c: bus 1 rev0.12 at 400 kHz
[ 0.332385] rtc-pcf2123 spi1.1: spiclk 100 KHz.
[ 0.333349] rtc-pcf2123 spi1.1: registered as rtc0
[ 0.334081] rtc-pcf2123 spi1.1: hctosys: unable to read the hardware clock
[ 0.350718] OMAP GPIO hardware version 0.1
[ 0.356138] omap_hsmmc 48060000.mmc: RX DMA channel request failed
[ 0.358177] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
[ 0.368854] omap8250 481a8000.serial: No clock speed specified: using default: 48000000
[ 0.369478] 481a8000.serial: ttyS4 at MMIO 0x481a8000 (irq = 69, base_baud = 3000000) is a 8250
[ 0.377200] c_can_platform 481cc000.can: c_can_platform device registered (regs=(ptrval), irq=72)
[ 0.379272] c_can_platform 481d0000.can: c_can_platform device registered (regs=(ptrval), irq=73)
[ 0.381396] omap_hsmmc 481d8000.mmc: RX DMA channel request failed
[ 0.389721] omap_rng 48310000.rng: Random Number Generator ver. 20
[ 0.392151] random: fast init done
[ 0.392281] random: crng init done
[ 0.417886] debugfs: Directory '49000000.dma' with parent 'dmaengine' already present!
[ 0.417930] edma 49000000.dma: TI EDMA DMA engine driver // Is below part causing the Kernel panic?
[ 0.420629] ------------[ cut here ]------------
[ 0.420656] WARNING: CPU: 0 PID: 50 at drivers/clk/clk.c:824 clk_core_unprepare+0x148/0x14c
[ 0.420698] Unpreparing enabled l3s-clkctrl:01e0:0
[ 0.420707] Modules linked in:
[ 0.420724] CPU: 0 PID: 50 Comm: kworker/u2:1 Not tainted 5.15.0 #80
[ 0.420741] Hardware name: Generic AM43 (Flattened Device Tree)
[ 0.420755] Workqueue: events_unbound deferred_probe_work_func
[ 0.420801] [<c010cb54>] (unwind_backtrace) from [<c0109bd0>] (show_stack+0x10/0x14)
[ 0.420836] [<c0109bd0>] (show_stack) from [<c07fc1a0>] (__warn+0xc4/0x120)
[ 0.420874] [<c07fc1a0>] (__warn) from [<c07fc274>] (warn_slowpath_fmt+0x78/0xac)
[ 0.420898] [<c07fc274>] (warn_slowpath_fmt) from [<c045e548>] (clk_core_unprepare+0x148/0x14c)
[ 0.420924] [<c045e548>] (clk_core_unprepare) from [<c045e570>] (clk_unprepare+0x24/0x2c)
[ 0.420944] [<c045e570>] (clk_unprepare) from [<c040e47c>] (sysc_probe+0xc74/0x1588)
[ 0.420981] [<c040e47c>] (sysc_probe) from [<c051ef18>] (platform_probe+0x5c/0xb8)
[ 0.421007] [<c051ef18>] (platform_probe) from [<c051cb5c>] (really_probe.part.0+0x9c/0x32c)
[ 0.421034] [<c051cb5c>] (really_probe.part.0) from [<c051ce94>] (__driver_probe_device+0xa8/0x13c)
[ 0.421057] [<c051ce94>] (__driver_probe_device) from [<c051cf5c>] (driver_probe_device+0x34/0x108)
[ 0.421079] [<c051cf5c>] (driver_probe_device) from [<c051d50c>] (__device_attach_driver+0xb4/0xf8)
[ 0.421105] [<c051d50c>] (__device_attach_driver) from [<c051ac4c>] (bus_for_each_drv+0x80/0xd0)
[ 0.421130] [<c051ac4c>] (bus_for_each_drv) from [<c051d228>] (__device_attach+0xd0/0x194)
[ 0.421152] [<c051d228>] (__device_attach) from [<c051bccc>] (bus_probe_device+0x84/0x8c)
[ 0.421175] [<c051bccc>] (bus_probe_device) from [<c051c0f8>] (deferred_probe_work_func+0x78/0xa4)
[ 0.421197] [<c051c0f8>] (deferred_probe_work_func) from [<c013a040>] (process_one_work+0x198/0x410)
[ 0.421228] [<c013a040>] (process_one_work) from [<c013a334>] (worker_thread+0x7c/0x570)
[ 0.421249] [<c013a334>] (worker_thread) from [<c0140cb4>] (kthread+0x138/0x158)
[ 0.421273] [<c0140cb4>] (kthread) from [<c0100130>] (ret_from_fork+0x14/0x24)
[ 0.421293] Exception stack(0xc1279fb0 to 0xc1279ff8)
[ 0.421306] 9fa0: 00000000 00000000 00000000 00000000
[ 0.421321] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 0.421333] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 0.421343] ---[ end trace 9eacf7ddf25f03d0 ]---
[ 0.426392] pwm-backlight lcd_backlight: supply power not found, using dummy regulator
[ 0.427190] panel-dpi display: failed to find video source
[ 0.428220] PM: Cannot get wkup_m3_ipc handle
[ 0.430008] omap8250 44e09000.serial: No clock speed specified: using default: 48000000
[ 0.430648] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 56, base_baud = 3000000) is a 8250
[ 1.614790] printk: console [ttyS0] enabled
[ 1.653863] omap_i2c 44e0b000.i2c: bus 0 rev0.12 at 400 kHz
[ 1.661485] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[ 1.668632] ti-sysc 44e3e074.target-module: clock get error for fck: -517
[ 1.685206] xhci-hcd xhci-hcd.2.auto: xHCI Host Controller
[ 1.691291] xhci-hcd xhci-hcd.2.auto: new USB bus registered, assigned bus number 1
[ 1.699513] xhci-hcd xhci-hcd.2.auto: hcc params 0x0238f06d hci version 0x100 quirks 0x0000000002010010
[ 1.709361] xhci-hcd xhci-hcd.2.auto: irq 82, io mem 0x483d0000
[ 1.715617] xhci-hcd xhci-hcd.2.auto: xHCI Host Controller
[ 1.721267] xhci-hcd xhci-hcd.2.auto: new USB bus registered, assigned bus number 2
[ 1.729006] xhci-hcd xhci-hcd.2.auto: Host supports USB 3.0 SuperSpeed
[ 1.735732] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.15
[ 1.744065] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 1.751333] usb usb1: Product: xHCI Host Controller
[ 1.756234] usb usb1: Manufacturer: Linux 5.15.0 xhci-hcd
[ 1.761683] usb usb1: SerialNumber: xhci-hcd.2.auto
[ 1.767262] hub 1-0:1.0: USB hub found
[ 1.771132] hub 1-0:1.0: 1 port detected
[ 1.775696] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[ 1.784021] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.15
[ 1.792408] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 1.799668] usb usb2: Product: xHCI Host Controller
[ 1.804587] usb usb2: Manufacturer: Linux 5.15.0 xhci-hcd
[ 1.810012] usb usb2: SerialNumber: xhci-hcd.2.auto
[ 1.815742] hub 2-0:1.0: USB hub found
[ 1.819610] hub 2-0:1.0: 1 port detected
[ 1.824538] panel-dpi display: failed to find video source
[ 1.830438] PM: Cannot get wkup_m3_ipc handle
[ 1.835300] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[ 1.842515] ti-sysc 44e3e074.target-module: clock get error for fck: -517
[ 1.849768] panel-dpi display: failed to find video source
[ 1.855746] PM: Cannot get wkup_m3_ipc handle
[ 1.860545] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[ 1.867611] ti-sysc 44e3e074.target-module: clock get error for fck: -517
[ 1.875823] input: gpio-keys as /devices/platform/gpio-keys/input/input1
[ 1.883408] panel-dpi display: failed to find video source
[ 1.891446] PM: Cannot get wkup_m3_ipc handle
[ 1.896387] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[ 1.903623] ti-sysc 44e3e074.target-module: clock get error for fck: -517
[ 1.910516] mmc0: host does not support reading read-only switch, assuming write-enable // Check code snippet below
[ 1.918561] mmc0: Kiran Came till here 1
[ 1.922516] mmc0: Kiran Came till here 10
[ 1.926542] mmc0: Kiran Came till here ..10A
[ 1.930838] mmc0: Kiran Came till here ..10X
[ 1.936136] VFS: Cannot open root device "mmcblk0p2" or unknown-block(0,0): error -6
[ 1.943975] Please append a correct "root=" boot option; here are the available partitions:
[ 1.952395] 0100 16384 ram0
[ 1.952408] (driver?)
[ 1.958538] 0101 16384 ram1
[ 1.958545] (driver?)
[ 1.964687] 0102 16384 ram2
[ 1.964695] (driver?)
[ 1.970833] 0103 16384 ram3
[ 1.970840] (driver?)
[ 1.976967] 0104 16384 ram4
[ 1.976974] (driver?)
[ 1.983110] 0105 16384 ram5
[ 1.983117] (driver?)
[ 1.989243] 0106 16384 ram6
[ 1.989249] (driver?)
[ 1.995385] 0107 16384 ram7
[ 1.995391] (driver?)
[ 2.001528] 0108 16384 ram8
[ 2.001535] (driver?)
[ 2.007662] 0109 16384 ram9
[ 2.007668] (driver?)
[ 2.013804] 010a 16384 ram10
[ 2.013811] (driver?)
[ 2.020026] 010b 16384 ram11
[ 2.020032] (driver?)
[ 2.026254] 010c 16384 ram12
[ 2.026261] (driver?)
[ 2.032484] 010d 16384 ram13
[ 2.032491] (driver?)
[ 2.038705] 010e 16384 ram14
[ 2.038711] (driver?)
[ 2.044934] 010f 16384 ram15
[ 2.044940] (driver?)
[ 2.051174] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 2.059483] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---

Code snipper form sd.c in mmc driver for log reference:


/*
* Test if the card supports high-speed mode and, if so, switch to it.
*/
int mmc_sd_switch_hs(struct mmc_card *card)
{
int err;
u8 *status;

pr_warn("%s: Kiran Came till here ..10A\n", mmc_hostname(card->host));
if (card->scr.sda_vsn < SCR_SPEC_VER_1)
return 0;

// pr_warn("%s: Kiran Came till here ..10B\n", mmc_hostname(card->host));
if (!(card->csd.cmdclass & CCC_SWITCH))
return 0;

// pr_warn("%s: Kiran Came till here ..10C\n", mmc_hostname(card->host));
if (!(card->host->caps & MMC_CAP_SD_HIGHSPEED))
return 0;

// pr_warn("%s: Kiran Came till here ..10D\n", mmc_hostname(card->host));
if (card->sw_caps.hs_max_dtr == 0)
return 0;

pr_warn("%s: Kiran Came till here ..10X\n", mmc_hostname(card->host));
status = kmalloc(64, GFP_KERNEL); Hangs here

pr_warn("%s: Kiran Came till here ..10F\n", mmc_hostname(card->host));
if (!status)
return -ENOMEM;
pr_warn("Kiran Came till here calling mmc_sd_switch\n");
err = mmc_sd_switch(card, 1, 0, HIGH_SPEED_BUS_SPEED, status);
if (err)
goto out;

if ((status[16] & 0xF) != HIGH_SPEED_BUS_SPEED) {
pr_warn("%s: Problem switching card into high-speed mode!\n",
mmc_hostname(card->host));
err = 0;
} else {
err = 1;
pr_warn("%s: Kiran Came till here 21\n", mmc_hostname(card->host));
}

out:
pr_warn("%s: Kiran Came till here 22\n", mmc_hostname(card->host));
kfree(status);

return err;
}

am4372.dts

/*
* Device Tree Source for AM4372 SoC
*
* Copyright (C) 2013 Texas Instruments Incorporated - https://www.ti.com/
*
* This file is licensed under the terms of the GNU General Public License
* version 2. This program is licensed "as is" without any warranty of any
* kind, whether express or implied.
*/

#include <dt-bindings/bus/ti-sysc.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/am4.h>

/ {
compatible = "ti,am4372", "ti,am43";
interrupt-parent = <&wakeupgen>;
#address-cells = <1>;
#size-cells = <1>;
chosen { };

memory@0 {
device_type = "memory";
reg = <0 0>;
};

aliases {
i2c0 = &i2c0;
i2c1 = &i2c1;
i2c2 = &i2c2;
serial0 = &uart0;
serial1 = &uart1;
serial2 = &uart2;
serial3 = &uart3;
serial4 = &uart4;
serial5 = &uart5;
ethernet0 = &cpsw_port1;
ethernet1 = &cpsw_port2;
spi0 = &qspi;
};

cpus {
#address-cells = <1>;
#size-cells = <0>;
cpu: cpu@0 {
compatible = "arm,cortex-a9";
enable-method = "ti,am4372";
device_type = "cpu";
reg = <0>;

clocks = <&dpll_mpu_ck>;
clock-names = "cpu";

operating-points-v2 = <&cpu0_opp_table>;

clock-latency = <300000>; /* From omap-cpufreq driver */
cpu-idle-states = <&mpu_gate>;
};

idle-states {
mpu_gate: mpu_gate {
compatible = "arm,idle-state";
entry-latency-us = <40>;
exit-latency-us = <100>;
min-residency-us = <300>;
local-timer-stop;
};
};
};

cpu0_opp_table: opp-table {
compatible = "operating-points-v2-ti-cpu";
syscon = <&scm_conf>;

opp50-300000000 {
opp-hz = /bits/ 64 <300000000>;
opp-microvolt = <950000 931000 969000>;
opp-supported-hw = <0xFF 0x01>;
opp-suspend;
};

opp100-600000000 {
opp-hz = /bits/ 64 <600000000>;
opp-microvolt = <1100000 1078000 1122000>;
opp-supported-hw = <0xFF 0x04>;
};

opp120-720000000 {
opp-hz = /bits/ 64 <720000000>;
opp-microvolt = <1200000 1176000 1224000>;
opp-supported-hw = <0xFF 0x08>;
};

oppturbo-800000000 {
opp-hz = /bits/ 64 <800000000>;
opp-microvolt = <1260000 1234800 1285200>;
opp-supported-hw = <0xFF 0x10>;
};

oppnitro-1000000000 {
opp-hz = /bits/ 64 <1000000000>;
opp-microvolt = <1325000 1298500 1351500>;
opp-supported-hw = <0xFF 0x20>;
};
};

soc {
compatible = "ti,omap-infra";
mpu {
compatible = "ti,omap4-mpu";
ti,hwmods = "mpu";
pm-sram = <&pm_sram_code
&pm_sram_data>;
};
};

gic: interrupt-controller@48241000 {
compatible = "arm,cortex-a9-gic";
interrupt-controller;
#interrupt-cells = <3>;
reg = <0x48241000 0x1000>,
<0x48240100 0x0100>;
interrupt-parent = <&gic>;
};

wakeupgen: interrupt-controller@48281000 {
compatible = "ti,omap4-wugen-mpu";
interrupt-controller;
#interrupt-cells = <3>;
reg = <0x48281000 0x1000>;
interrupt-parent = <&gic>;
};

scu: scu@48240000 {
compatible = "arm,cortex-a9-scu";
reg = <0x48240000 0x100>;
};

global_timer: timer@48240200 {
compatible = "arm,cortex-a9-global-timer";
reg = <0x48240200 0x100>;
interrupts = <GIC_PPI 11 IRQ_TYPE_EDGE_RISING>;
interrupt-parent = <&gic>;
clocks = <&mpu_periphclk>;
};

local_timer: timer@48240600 {
compatible = "arm,cortex-a9-twd-timer";
reg = <0x48240600 0x100>;
interrupts = <GIC_PPI 13 IRQ_TYPE_EDGE_RISING>;
interrupt-parent = <&gic>;
clocks = <&mpu_periphclk>;
};

l2-cache-controller@48242000 {
compatible = "arm,pl310-cache";
reg = <0x48242000 0x1000>;
cache-unified;
cache-level = <2>;
};

ocp@44000000 {
compatible = "ti,am4372-l3-noc", "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
ranges;
ti,hwmods = "l3_main";
ti,no-idle;
reg = <0x44000000 0x400000
0x44800000 0x400000>;
interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;

l4_wkup: interconnect@44c00000 {
wkup_m3: wkup_m3@100000 {
compatible = "ti,am4372-wkup-m3";
reg = <0x100000 0x4000>,
<0x180000 0x2000>;
reg-names = "umem", "dmem";
ti,hwmods = "wkup_m3";
ti,pm-firmware = "am335x-pm-firmware.elf";
};
};
l4_per: interconnect@48000000 {
};
l4_fast: interconnect@4a000000 {
};

target-module@4c000000 {
compatible = "ti,sysc-omap4-simple", "ti,sysc";
reg = <0x4c000000 0x4>;
reg-names = "rev";
clocks = <&emif_clkctrl AM4_EMIF_EMIF_CLKCTRL 0>;
clock-names = "fck";
ti,no-idle;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x4c000000 0x1000000>;

emif: emif@0 {
compatible = "ti,emif-am4372";
reg = <0 0x1000000>;
interrupts = <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
sram = <&pm_sram_code
&pm_sram_data>;
};
};

target-module@49000000 {
compatible = "ti,sysc-omap4", "ti,sysc";
reg = <0x49000000 0x4>;
reg-names = "rev";
clocks = <&l3_clkctrl AM4_L3_TPCC_CLKCTRL 0>;
clock-names = "fck";
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x49000000 0x10000>;

edma: dma@0 {
compatible = "ti,edma3-tpcc";
reg = <0 0x10000>;
reg-names = "edma3_cc";
interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "edma3_ccint", "edma3_mperr",
"edma3_ccerrint";
dma-requests = <64>;
#dma-cells = <2>;

ti,tptcs = <&edma_tptc0 7>, <&edma_tptc1 5>,
<&edma_tptc2 0>;

ti,edma-memcpy-channels = <58 59>;
};
};

target-module@49800000 {
compatible = "ti,sysc-omap4", "ti,sysc";
reg = <0x49800000 0x4>,
<0x49800010 0x4>;
reg-names = "rev", "sysc";
ti,sysc-mask = <SYSC_OMAP4_SOFTRESET>;
ti,sysc-midle = <SYSC_IDLE_FORCE>;
ti,sysc-sidle = <SYSC_IDLE_FORCE>,
<SYSC_IDLE_SMART>;
clocks = <&l3_clkctrl AM4_L3_TPTC0_CLKCTRL 0>;
clock-names = "fck";
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x49800000 0x100000>;

edma_tptc0: dma@0 {
compatible = "ti,edma3-tptc";
reg = <0 0x100000>;
interrupts = <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "edma3_tcerrint";
};
};

target-module@49900000 {
compatible = "ti,sysc-omap4", "ti,sysc";
reg = <0x49900000 0x4>,
<0x49900010 0x4>;
reg-names = "rev", "sysc";
ti,sysc-mask = <SYSC_OMAP4_SOFTRESET>;
ti,sysc-midle = <SYSC_IDLE_FORCE>;
ti,sysc-sidle = <SYSC_IDLE_FORCE>,
<SYSC_IDLE_SMART>;
clocks = <&l3_clkctrl AM4_L3_TPTC1_CLKCTRL 0>;
clock-names = "fck";
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x49900000 0x100000>;

edma_tptc1: dma@0 {
compatible = "ti,edma3-tptc";
reg = <0 0x100000>;
interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "edma3_tcerrint";
};
};

target-module@49a00000 {
compatible = "ti,sysc-omap4", "ti,sysc";
reg = <0x49a00000 0x4>,
<0x49a00010 0x4>;
reg-names = "rev", "sysc";
ti,sysc-mask = <SYSC_OMAP4_SOFTRESET>;
ti,sysc-midle = <SYSC_IDLE_FORCE>;
ti,sysc-sidle = <SYSC_IDLE_FORCE>,
<SYSC_IDLE_SMART>;
clocks = <&l3_clkctrl AM4_L3_TPTC2_CLKCTRL 0>;
clock-names = "fck";
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x49a00000 0x100000>;

edma_tptc2: dma@0 {
compatible = "ti,edma3-tptc";
reg = <0 0x100000>;
interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "edma3_tcerrint";
};
};

target-module@47810000 {
compatible = "ti,sysc-omap2", "ti,sysc";
ti,hwmods = "mmc3";
reg = <0x478102fc 0x4>,
<0x47810110 0x4>,
<0x47810114 0x4>;
reg-names = "rev", "sysc", "syss";
ti,sysc-mask = <(SYSC_OMAP2_CLOCKACTIVITY |
SYSC_OMAP2_ENAWAKEUP |
SYSC_OMAP2_SOFTRESET |
SYSC_OMAP2_AUTOIDLE)>;
ti,sysc-sidle = <SYSC_IDLE_FORCE>,
<SYSC_IDLE_NO>,
<SYSC_IDLE_SMART>;
ti,syss-mask = <1>;
clocks = <&l3s_clkctrl AM4_L3S_MMC3_CLKCTRL 0>;
clock-names = "fck";
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x47810000 0x1000>;

mmc3: mmc@0 {
compatible = "ti,omap4-hsmmc";
ti,needs-special-reset;
interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
reg = <0x0 0x1000>;
status = "okay";
};
};

sham_target: target-module@53100000 {
compatible = "ti,sysc-omap3-sham", "ti,sysc";
reg = <0x53100100 0x4>,
<0x53100110 0x4>,
<0x53100114 0x4>;
reg-names = "rev", "sysc", "syss";
ti,sysc-mask = <(SYSC_OMAP2_SOFTRESET |
SYSC_OMAP2_AUTOIDLE)>;
ti,sysc-sidle = <SYSC_IDLE_FORCE>,
<SYSC_IDLE_NO>,
<SYSC_IDLE_SMART>;
ti,syss-mask = <1>;
/* Domains (P, C): per_pwrdm, l3_clkdm */
clocks = <&l3_clkctrl AM4_L3_SHAM_CLKCTRL 0>;
clock-names = "fck";
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x53100000 0x1000>;

sham: sham@0 {
compatible = "ti,omap5-sham";
reg = <0 0x300>;
dmas = <&edma 36 0>;
dma-names = "rx";
interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>;
};
};

aes_target: target-module@53501000 {
compatible = "ti,sysc-omap2", "ti,sysc";
reg = <0x53501080 0x4>,
<0x53501084 0x4>,
<0x53501088 0x4>;
reg-names = "rev", "sysc", "syss";
ti,sysc-mask = <(SYSC_OMAP2_SOFTRESET |
SYSC_OMAP2_AUTOIDLE)>;
ti,sysc-sidle = <SYSC_IDLE_FORCE>,
<SYSC_IDLE_NO>,
<SYSC_IDLE_SMART>,
<SYSC_IDLE_SMART_WKUP>;
ti,syss-mask = <1>;
/* Domains (P, C): per_pwrdm, l3_clkdm */
clocks = <&l3_clkctrl AM4_L3_AES_CLKCTRL 0>;
clock-names = "fck";
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x53501000 0x1000>;

aes: aes@0 {
compatible = "ti,omap4-aes";
reg = <0 0xa0>;
interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
dmas = <&edma 6 0>,
<&edma 5 0>;
dma-names = "tx", "rx";
};
};

des_target: target-module@53701000 {
compatible = "ti,sysc-omap2", "ti,sysc";
reg = <0x53701030 0x4>,
<0x53701034 0x4>,
<0x53701038 0x4>;
reg-names = "rev", "sysc", "syss";
ti,sysc-mask = <(SYSC_OMAP2_SOFTRESET |
SYSC_OMAP2_AUTOIDLE)>;
ti,sysc-sidle = <SYSC_IDLE_FORCE>,
<SYSC_IDLE_NO>,
<SYSC_IDLE_SMART>,
<SYSC_IDLE_SMART_WKUP>;
ti,syss-mask = <1>;
/* Domains (P, C): per_pwrdm, l3_clkdm */
clocks = <&l3_clkctrl AM4_L3_DES_CLKCTRL 0>;
clock-names = "fck";
#address-cells = <1>;
#size-cells = <1>;
ranges = <0 0x53701000 0x1000>;

des: des@0 {
compatible = "ti,omap4-des";
reg = <0 0xa0>;
interrupts = <GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>;
dmas = <&edma 34 0>,
<&edma 33 0>;
dma-names = "tx", "rx";
};
};

pruss_tm: target-module@54400000 {
compatible = "ti,sysc-pruss", "ti,sysc";
reg = <0x54426000 0x4>,
<0x54426004 0x4>;
reg-names = "rev", "sysc";
ti,sysc-mask = <(SYSC_PRUSS_STANDBY_INIT |
SYSC_PRUSS_SUB_MWAIT)>;
ti,sysc-midle = <SYSC_IDLE_FORCE>,
<SYSC_IDLE_NO>,
<SYSC_IDLE_SMART>;
ti,sysc-sidle = <SYSC_IDLE_FORCE>,
<SYSC_IDLE_NO>,
<SYSC_IDLE_SMART>;
clocks = <&pruss_ocp_clkctrl AM4_PRUSS_OCP_PRUSS_CLKCTRL 0>;
clock-names = "fck";
resets = <&prm_per 1>;
reset-names = "rstctrl";
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x54400000 0x80000>;

pruss1: pruss@0 {
compatible = "ti,am4376-pruss1";
reg = <0x0 0x40000>;
#address-cells = <1>;
#size-cells = <1>;
ranges;

pruss1_mem: memories@0 {
reg = <0x0 0x2000>,
<0x2000 0x2000>,
<0x10000 0x8000>;
reg-names = "dram0", "dram1",
"shrdram2";
};

pruss1_cfg: cfg@26000 {
compatible = "ti,pruss-cfg", "syscon";
reg = <0x26000 0x2000>;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x26000 0x2000>;

clocks {
#address-cells = <1>;
#size-cells = <0>;

pruss1_iepclk_mux: iepclk-mux@30 {
reg = <0x30>;
#clock-cells = <0>;
clocks = <&sysclk_div>, /* icss_iep_gclk */
<&pruss_ocp_gclk>; /* icss_ocp_gclk */
};
};
};

pruss1_mii_rt: mii-rt@32000 {
compatible = "ti,pruss-mii", "syscon";
reg = <0x32000 0x58>;
};

pruss1_intc: interrupt-controller@20000 {
compatible = "ti,pruss-intc";
reg = <0x20000 0x2000>;
interrupt-controller;
#interrupt-cells = <3>;
interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "host_intr0", "host_intr1",
"host_intr2", "host_intr3",
"host_intr4",
"host_intr6", "host_intr7";
ti,irqs-reserved = /bits/ 8 <0x20>; /* BIT(5) */
};

pru1_0: pru@34000 {
compatible = "ti,am4376-pru";
reg = <0x34000 0x3000>,
<0x22000 0x400>,
<0x22400 0x100>;
reg-names = "iram", "control", "debug";
firmware-name = "am437x-pru1_0-fw";
};

pru1_1: pru@38000 {
compatible = "ti,am4376-pru";
reg = <0x38000 0x3000>,
<0x24000 0x400>,
<0x24400 0x100>;
reg-names = "iram", "control", "debug";
firmware-name = "am437x-pru1_1-fw";
};

pruss1_mdio: mdio@32400 {
compatible = "ti,davinci_mdio";
reg = <0x32400 0x90>;
clocks = <&dpll_core_m4_ck>;
clock-names = "fck";
bus_freq = <1000000>;
#address-cells = <1>;
#size-cells = <0>;
};
};

pruss0: pruss@40000 {
compatible = "ti,am4376-pruss0";
reg = <0x40000 0x40000>;
#address-cells = <1>;
#size-cells = <1>;
ranges;

pruss0_mem: memories@40000 {
reg = <0x40000 0x1000>,
<0x42000 0x1000>;
reg-names = "dram0", "dram1";
};

pruss0_cfg: cfg@66000 {
compatible = "ti,pruss-cfg", "syscon";
reg = <0x66000 0x2000>;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x66000 0x2000>;

clocks {
#address-cells = <1>;
#size-cells = <0>;

pruss0_iepclk_mux: iepclk-mux@30 {
reg = <0x30>;
#clock-cells = <0>;
clocks = <&sysclk_div>, /* icss_iep_gclk */
<&pruss_ocp_gclk>; /* icss_ocp_gclk */
};
};
};

pruss0_mii_rt: mii-rt@72000 {
compatible = "ti,pruss-mii", "syscon";
reg = <0x72000 0x58>;
status = "disabled";
};

pruss0_intc: interrupt-controller@60000 {
compatible = "ti,pruss-intc";
reg = <0x60000 0x2000>;
interrupt-controller;
#interrupt-cells = <3>;
interrupts = <GIC_SPI 159 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 165 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "host_intr0", "host_intr1",
"host_intr2", "host_intr3",
"host_intr4",
"host_intr6", "host_intr7";
ti,irqs-reserved = /bits/ 8 <0x20>; /* BIT(5) */
};

pru0_0: pru@74000 {
compatible = "ti,am4376-pru";
reg = <0x74000 0x1000>,
<0x62000 0x400>,
<0x62400 0x100>;
reg-names = "iram", "control", "debug";
firmware-name = "am437x-pru0_0-fw";
};

pru0_1: pru@78000 {
compatible = "ti,am4376-pru";
reg = <0x78000 0x1000>,
<0x64000 0x400>,
<0x64400 0x100>;
reg-names = "iram", "control", "debug";
firmware-name = "am437x-pru0_1-fw";
};
};
};

target-module@50000000 {
compatible = "ti,sysc-omap2", "ti,sysc";
reg = <0x50000000 4>,
<0x50000010 4>,
<0x50000014 4>;
reg-names = "rev", "sysc", "syss";
ti,sysc-sidle = <SYSC_IDLE_FORCE>,
<SYSC_IDLE_NO>,
<SYSC_IDLE_SMART>;
ti,syss-mask = <1>;
clocks = <&l3s_clkctrl AM4_L3S_GPMC_CLKCTRL 0>;
clock-names = "fck";
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x50000000 0x50000000 0x00001000>, /* regs */
<0x00000000 0x00000000 0x40000000>; /* data */

gpmc: gpmc@50000000 {
compatible = "ti,am3352-gpmc";
dmas = <&edma 52 0>;
dma-names = "rxtx";
clocks = <&l3s_gclk>;
clock-names = "fck";
reg = <0x50000000 0x2000>;
interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>;
gpmc,num-cs = <7>;
gpmc,num-waitpins = <2>;
#address-cells = <2>;
#size-cells = <1>;
interrupt-controller;
#interrupt-cells = <2>;
gpio-controller;
#gpio-cells = <2>;
status = "disabled";
};
};

target-module@47900000 {
compatible = "ti,sysc-omap4", "ti,sysc";
reg = <0x47900000 0x4>,
<0x47900010 0x4>;
reg-names = "rev", "sysc";
ti,sysc-sidle = <SYSC_IDLE_FORCE>,
<SYSC_IDLE_NO>,
<SYSC_IDLE_SMART>,
<SYSC_IDLE_SMART_WKUP>;
clocks = <&l3s_clkctrl AM4_L3S_QSPI_CLKCTRL 0>;
clock-names = "fck";
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x47900000 0x1000>,
<0x30000000 0x30000000 0x4000000>;

qspi: spi@0 {
compatible = "ti,am4372-qspi";
reg = <0 0x100>,
<0x30000000 0x4000000>;
reg-names = "qspi_base", "qspi_mmap";
clocks = <&dpll_per_m2_div4_ck>;
clock-names = "fck";
#address-cells = <1>;
#size-cells = <0>;
interrupts = <0 138 0x4>;
num-cs = <4>;
};
};
/*
target-module@40300000 {
compatible = "ti,sysc-omap4-simple", "ti,sysc";
clocks = <&l3_clkctrl AM4_L3_OCMCRAM_CLKCTRL 0>;
clock-names = "fck";
ti,no-idle;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0 0x40300000 0x40000>;

ocmcram: sram@0 {
compatible = "mmio-sram";
reg = <0 0x40000>; /* 256k */
/* ranges = <0 0 0x40000>;
#address-cells = <1>;
#size-cells = <1>;

pm_sram_code: pm-code-sram@0 {
compatible = "ti,sram";
reg = <0x0 0x1000>;
protect-exec;
};

pm_sram_data: pm-data-sram@1000 {
compatible = "ti,sram";
reg = <0x1000 0x1000>;
pool;
};
};
};*/


ocmcram: ocmcram@40300000 {
compatible = "mmio-sram";
reg = <0x40300000 0x40000>; /* 256k */
ranges = <0x0 0x40300000 0x40000>;
#address-cells = <1>;
#size-cells = <1>;

pm_sram_code: pm-sram-code@0 {
compatible = "ti,sram";
reg = <0x0 0x1000>;
protect-exec;
};

pm_sram_data: pm-sram-data@1000 {
compatible = "ti,sram";
reg = <0x1000 0x1000>;
pool;
};
};

target-module@56000000 {
compatible = "ti,sysc-omap4", "ti,sysc";
reg = <0x5600fe00 0x4>,
<0x5600fe10 0x4>;
reg-names = "rev", "sysc";
ti,sysc-midle = <SYSC_IDLE_FORCE>,
<SYSC_IDLE_NO>,
<SYSC_IDLE_SMART>;
ti,sysc-sidle = <SYSC_IDLE_FORCE>,
<SYSC_IDLE_NO>,
<SYSC_IDLE_SMART>;
clocks = <&gfx_l3_clkctrl AM4_GFX_L3_GFX_CLKCTRL 0>;
clock-names = "fck";
power-domains = <&prm_gfx>;
resets = <&prm_gfx 0>;
reset-names = "rstctrl";
#address-cells = <1>;
#size-cells = <1>;
ranges = <0 0x56000000 0x1000000>;
};
};
};

#include "am437x-l4.dtsi"
#include "am43xx-clocks.dtsi"

&prcm {
prm_mpu: prm@300 {
compatible = "ti,am4-prm-inst", "ti,omap-prm-inst";
reg = <0x300 0x100>;
#power-domain-cells = <0>;
};

prm_gfx: prm@400 {
compatible = "ti,am4-prm-inst", "ti,omap-prm-inst";
reg = <0x400 0x100>;
#power-domain-cells = <0>;
#reset-cells = <1>;
};

prm_rtc: prm@500 {
compatible = "ti,am4-prm-inst", "ti,omap-prm-inst";
reg = <0x500 0x100>;
#power-domain-cells = <0>;
};

prm_tamper: prm@600 {
compatible = "ti,am4-prm-inst", "ti,omap-prm-inst";
reg = <0x600 0x100>;
#power-domain-cells = <0>;
};

prm_cefuse: prm@700 {
compatible = "ti,am4-prm-inst", "ti,omap-prm-inst";
reg = <0x700 0x100>;
#power-domain-cells = <0>;
};

prm_per: prm@800 {
compatible = "ti,am4-prm-inst", "ti,omap-prm-inst";
reg = <0x800 0x100>;
#reset-cells = <1>;
#power-domain-cells = <0>;
};

prm_wkup: prm@2000 {
compatible = "ti,am4-prm-inst", "ti,omap-prm-inst";
reg = <0x2000 0x100>;
#reset-cells = <1>;
#power-domain-cells = <0>;
};

prm_device: prm@4000 {
compatible = "ti,am4-prm-inst", "ti,omap-prm-inst";
reg = <0x4000 0x100>;
#reset-cells = <1>;
};
};

/* Preferred always-on timer for clocksource */
&timer1_target {
ti,no-reset-on-init;
ti,no-idle;
clocks = <&l4_wkup_clkctrl AM4_L4_WKUP_TIMER1_CLKCTRL 0>,
<&l4_wkup_clkctrl AM4_L4_WKUP_L4_WKUP_CLKCTRL 0>;
clock-names = "fck", "ick";
timer@0 {
assigned-clocks = <&timer1_fck>;
assigned-clock-parents = <&sys_clkin_ck>;
};
};

/* Preferred timer for clockevent */
&timer2_target {
ti,no-reset-on-init;
ti,no-idle;
clocks = <&l4ls_clkctrl AM4_L4LS_TIMER2_CLKCTRL 0>,
<&l4ls_clkctrl AM4_L4LS_L4_LS_CLKCTRL 0>;
clock-names = "fck", "ick";
timer@0 {
assigned-clocks = <&timer2_fck>;
assigned-clock-parents = <&sys_clkin_ck>;
};
};

Thx,

Kiran.

  • Hi Kiran,

    Kernel v5.15 is not supported by TI, so we won't be able to provide much support on your issue, but I can tell that your kernel log doesn't have any message related to 'mmc', which basically means you didn't enable necessary mmc related kernel drivers or your board DTS does not configure your board SD card MMC correctly.