[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <41d66042625157d089e9c9532030a6831e79c641.1350327324.git.richardcochran@gmail.com>
Date: Mon, 15 Oct 2012 21:16:31 +0200
From: Richard Cochran <richardcochran@...il.com>
To: <netdev@...r.kernel.org>
Cc: <linux-arm-kernel@...ts.infradead.org>,
Arnd Bergmann <arnd@...db.de>,
David Miller <davem@...emloft.net>,
Russell King <linux@....linux.org.uk>,
"hvaibhav@...com" <hvaibhav@...com>, Afzal Mohammed <afzal@...com>,
Tony Lindgren <tony@...mide.com>
Subject: [PATCH 1/5] ARM: OMAP2+: gpmc: Fix kernel BUG for DT boot mode
From: hvaibhav@...com <hvaibhav@...com>
With recent changes in omap gpmc driver code, in case of DT
boot mode, where bootloader does not configure gpmc cs space
will result into kernel BUG() inside gpmc_mem_init() function,
as gpmc cs0 gpmc_config7[0].csvalid bit is set to '1' and
gpmc_config7[0].baseaddress is set to '0' on reset.
This use-case is applicable for any board/EVM which doesn't have
any peripheral connected to gpmc cs0, for example BeagleXM and
BeagleBone, so DT boot mode fails.
This patch adds of_have_populated_dt() check before creating
device, so that for DT boot mode, gpmc probe will not be called
which is expected behavior, as gpmc is not supported yet from DT.
Signed-off-by: Vaibhav Hiremath <hvaibhav@...com>
Cc: Afzal Mohammed <afzal@...com>
Cc: Tony Lindgren <tony@...mide.com>
Cc Paul Walmsley <paul@...an.com>
---
arch/arm/mach-omap2/gpmc.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 5ac5cf3..90b033e 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -981,6 +981,10 @@ static int __init omap_gpmc_init(void)
struct platform_device *pdev;
char *oh_name = "gpmc";
+ /* If dtb is there, the devices will be created dynamically */
+ if (of_have_populated_dt())
+ return -ENODEV;
+
oh = omap_hwmod_lookup(oh_name);
if (!oh) {
pr_err("Could not look up %s\n", oh_name);
--
1.7.2.5
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists