From: Roger Quadros <rogerq@ti.com>
To: tony@atomide.com
Cc: pekon@pek-sem.com, javier@dowhile0.org,
linux-omap@vger.kernel.org, Roger Quadros <rogerq@ti.com>,
Sekhar Nori <nsekhar@ti.com>
Subject: [PATCH 3/5] ARM: OMAP2+: gpmc: Always enable A26-A11 for non NAND devices
Date: Tue, 21 Oct 2014 15:41:47 +0300 [thread overview]
Message-ID: <1413895309-9152-4-git-send-email-rogerq@ti.com> (raw)
In-Reply-To: <1413895309-9152-1-git-send-email-rogerq@ti.com>
Although RESET state of LIMITEDADDRESS bit in GPMC_CONFIG register
is 0 (i.e. A26-A11 enabled), faulty bootloaders might accidentally
set this bit. e.g. u-boot 2014.07 with CONFIG_NOR disabled.
Explicity disable LIMITEDADDRESS bit for non NAND devices so that
they can always work.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
---
arch/arm/mach-omap2/gpmc.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index f5d9dd2..0ba95d3 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -85,6 +85,8 @@
#define GPMC_ECC_CTRL_ECCREG8 0x008
#define GPMC_ECC_CTRL_ECCREG9 0x009
+#define GPMC_CONFIG_LIMITEDADDRESS BIT(1)
+
#define GPMC_CONFIG2_CSEXTRADELAY BIT(7)
#define GPMC_CONFIG3_ADVEXTRADELAY BIT(7)
#define GPMC_CONFIG4_OEEXTRADELAY BIT(7)
@@ -1501,6 +1503,7 @@ static int gpmc_probe_generic_child(struct platform_device *pdev,
struct resource res;
unsigned long base;
int ret, cs;
+ u32 val;
if (of_property_read_u32(child, "reg", &cs) < 0) {
dev_err(&pdev->dev, "%s has no 'reg' property\n",
@@ -1569,6 +1572,11 @@ static int gpmc_probe_generic_child(struct platform_device *pdev,
goto err;
}
+ /* Clear limited address i.e. enable A26-A11 */
+ val = gpmc_read_reg(GPMC_CONFIG);
+ val &= ~GPMC_CONFIG_LIMITEDADDRESS;
+ gpmc_write_reg(GPMC_CONFIG, val);
+
no_timings:
if (of_platform_device_create(child, NULL, &pdev->dev))
return 0;
--
1.8.3.2
next prev parent reply other threads:[~2014-10-21 12:42 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-21 12:41 [PATCH 0/5] ARM: OMAP2+: gpmc: configuration enhancements Roger Quadros
2014-10-21 12:41 ` [PATCH 1/5] ARM: OMAP2+: gpmc: Print error message in set_gpmc_timing_reg() Roger Quadros
2014-10-28 22:23 ` Tony Lindgren
2014-10-29 8:50 ` Roger Quadros
2014-10-29 14:13 ` Tony Lindgren
2014-11-04 19:59 ` pekon
2014-10-21 12:41 ` [PATCH 2/5] ARM: OMAP2+: gpmc: Error out if timings fail in gpmc_probe_generic_child() Roger Quadros
2014-11-04 0:45 ` Tony Lindgren
2014-11-04 1:14 ` Tony Lindgren
2014-11-04 9:03 ` Roger Quadros
2014-11-04 15:51 ` Tony Lindgren
2014-10-21 12:41 ` Roger Quadros [this message]
2014-10-21 12:41 ` [PATCH 4/5] ARM: OMAP2+: gpmc: Keep Chip Select disabled while configuring it Roger Quadros
2014-10-21 12:41 ` [PATCH 5/5] ARM: OMAP2+: gpmc: Sanity check GPMC fck on probe Roger Quadros
2014-10-30 15:10 ` [PATCH 0/5] ARM: OMAP2+: gpmc: configuration enhancements Tony Lindgren
2014-10-30 15:24 ` Roger Quadros
2014-11-04 17:49 ` Tony Lindgren
2014-11-05 12:46 ` Roger Quadros
2014-11-05 16:09 ` Tony Lindgren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1413895309-9152-4-git-send-email-rogerq@ti.com \
--to=rogerq@ti.com \
--cc=javier@dowhile0.org \
--cc=linux-omap@vger.kernel.org \
--cc=nsekhar@ti.com \
--cc=pekon@pek-sem.com \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).