Skip to content

Commit

Permalink
omap: fix a gpmc nand problem
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
stanley.miao authored and Tony Lindgren committed Apr 23, 2010
1 parent 5241b6b commit 11e1ef2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/arm/mach-omap2/gpmc-nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 11e1ef2

Please sign in to comment.