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 2/5] ARM: OMAP2+: gpmc: Error out if timings fail in gpmc_probe_generic_child()
Date: Tue, 21 Oct 2014 15:41:46 +0300 [thread overview]
Message-ID: <1413895309-9152-3-git-send-email-rogerq@ti.com> (raw)
In-Reply-To: <1413895309-9152-1-git-send-email-rogerq@ti.com>
gpmc_cs_set_timings() returns non-zero if there was
an error while setting the GPMC timings. e.g. Timing was too
large to be accomodated with current GPMC clock frequency and available
timing range. Fail in this case, else we risk operating a NOR device
with non compliant timings.
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
---
arch/arm/mach-omap2/gpmc.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index 45f680f..f5d9dd2 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -1562,7 +1562,12 @@ static int gpmc_probe_generic_child(struct platform_device *pdev,
goto err;
gpmc_read_timings_dt(child, &gpmc_t);
- gpmc_cs_set_timings(cs, &gpmc_t);
+ ret = gpmc_cs_set_timings(cs, &gpmc_t);
+ if (ret) {
+ dev_err(&pdev->dev, "failed to set gpmc timings for: %s\n",
+ child->name);
+ goto err;
+ }
no_timings:
if (of_platform_device_create(child, NULL, &pdev->dev))
--
1.8.3.2
next prev parent reply other threads:[~2014-10-21 12:41 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 ` Roger Quadros [this message]
2014-11-04 0:45 ` [PATCH 2/5] ARM: OMAP2+: gpmc: Error out if timings fail in gpmc_probe_generic_child() 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 ` [PATCH 3/5] ARM: OMAP2+: gpmc: Always enable A26-A11 for non NAND devices Roger Quadros
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-3-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).