All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] OMAP: fix gpmc nand setup when no timings supplied
@ 2010-04-19  9:50 Mike Rapoport
  2010-04-22  5:19 ` Mike Rapoport
  0 siblings, 1 reply; 13+ messages in thread
From: Mike Rapoport @ 2010-04-19  9:50 UTC (permalink / raw)
  To: linux-omap; +Cc: Mike Rapoport

The gpmc nand infrastructure crashes when there no timing structure
supplied in the omap_nand_platform_data. Adding check for
gpmc_nand_data->gpmc_t pointer validity resolves the crash and allows to
continue nand initialization without modifying gpmc timings.

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
---
 arch/arm/mach-omap2/gpmc-nand.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c
index 64d74f0..3629da3 100644
--- a/arch/arm/mach-omap2/gpmc-nand.c
+++ b/arch/arm/mach-omap2/gpmc-nand.c
@@ -83,6 +83,11 @@ static int gpmc_nand_setup(void)
 {
 	struct device *dev = &gpmc_nand_device.dev;
 
+	if (!gpmc_nand_data->gpmc_t) {
+		dev_info(dev, "Keeping gpmc timings\n");
+		return 0;
+	}
+
 	/* Set timings in GPMC */
 	if (omap2_nand_gpmc_retime() < 0) {
 		dev_err(dev, "Unable to set gpmc timings\n");
-- 
1.6.6.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2010-04-28 15:41 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-19  9:50 [PATCH] OMAP: fix gpmc nand setup when no timings supplied Mike Rapoport
2010-04-22  5:19 ` Mike Rapoport
2010-04-22  6:41   ` Ghorai, Sukumar
2010-04-22  6:59     ` Mike Rapoport
2010-04-22  7:59       ` Ghorai, Sukumar
2010-04-22  8:45         ` Mike Rapoport
2010-04-26 18:14           ` Tony Lindgren
2010-04-27  5:07             ` Vimal Singh
2010-04-27  7:43             ` Mike Rapoport
2010-04-27 14:47               ` Tony Lindgren
2010-04-28 15:05                 ` Bug in omap2_nand_gpmc_retime? (was: Re: [PATCH] OMAP: fix gpmc nand setup when no timings supplied) Mike Rapoport
2010-04-28 15:26                   ` Vimal Singh
2010-04-28 15:40                     ` Bug in omap2_nand_gpmc_retime? Mike Rapoport

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.