-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Medium
-
Linux Core SDK
-
LCPD-38670
-
09.02.00
-
11.02
-
When k3-am62-lp-sk-nand.dtso is loaded, the kernel boot log has the following messages related to GPMC. The last line "disabling cs 0" is confusing. And the address 0x11000000 in the last two lines is confusing too as it is not defined anywhere in kernel driver or device tree.
root@am62xx-evm:~# dmesg|grep gpmc [ 0.210802] omap-gpmc 3b000000.memory-controller: GPMC revision 6.0 [ 0.210826] gpmc_mem_root start 0x50000000, end 0x57ffffff, cs 0, base 0x11000000, size 0x1000000 [ 0.210835] gpmc_mem_init: disabling cs 0 mapped at 0x11000000-0x12000000
It appears the message is printed in gpmc_mem_init(), which is called before parsing the GPMC child DT nodes to initialize CS0 memory map. Proposing the following patch to suppress this message:
diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c index 2fec5c2855ee..d7e557e3656a 100644 --- a/drivers/memory/omap-gpmc.c +++ b/drivers/memory/omap-gpmc.c @@ -1478,6 +1478,12 @@ static void gpmc_mem_init(struct gpmc_device *gpmc) if (!gpmc_cs_mem_enabled(cs)) continue; gpmc_cs_get_memconf(cs, &base, &size); + + if (base < gpmc_mem_root.start || base > gpmc_mem_root.end) { + gpmc_cs_disable_mem(cs); + continue; + } + pr_info("gpmc_mem_root start 0x%llx, end 0x%llx, cs %d, base 0x%x, size 0x%x\n", gpmc_mem_root.start, gpmc_mem_root.end, cs, base, size); if (gpmc_cs_insert_mem(cs, base, size)) {