aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/gpmc-nand.c
diff options
context:
space:
mode:
authorstanley.miao <stanley.miao@windriver.com>2010-04-20 06:33:30 +0000
committerTony Lindgren <tony@atomide.com>2010-04-23 15:35:11 -0700
commit11e1ef2d105900a302b7ca92bcaf96a96d0274a1 (patch)
treefc5c88d701c276143ca396c6def1df5d614df05f /arch/arm/mach-omap2/gpmc-nand.c
parent5241b6b3bfa7be3661398cf93cb3dd187aeb65c6 (diff)
omap: fix a gpmc nand problem
If gpmc_t isn't given, we don't need to set timing for gpmc, or it will cause a Oops. Signed-off-by: Stanley.Miao <stanley.miao@windriver.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/gpmc-nand.c')
-rw-r--r--arch/arm/mach-omap2/gpmc-nand.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/gpmc-nand.c b/arch/arm/mach-omap2/gpmc-nand.c
index 64d74f05abb..e57fb29ff85 100644
--- a/arch/arm/mach-omap2/gpmc-nand.c
+++ b/arch/arm/mach-omap2/gpmc-nand.c
@@ -39,6 +39,9 @@ static int omap2_nand_gpmc_retime(void)
struct gpmc_timings t;
int err;
+ if (!gpmc_nand_data->gpmc_t)
+ return 0;
+
memset(&t, 0, sizeof(t));
t.sync_clk = gpmc_round_ns_to_ticks(gpmc_nand_data->gpmc_t->sync_clk);
t.cs_on = gpmc_round_ns_to_ticks(gpmc_nand_data->gpmc_t->cs_on);