diff options
| -rw-r--r-- | drivers/memory/omap-gpmc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c index 3a27a84ad3ec..9426276dbe14 100644 --- a/drivers/memory/omap-gpmc.c +++ b/drivers/memory/omap-gpmc.c | |||
| @@ -2245,6 +2245,9 @@ void omap3_gpmc_save_context(void) | |||
| 2245 | { | 2245 | { |
| 2246 | int i; | 2246 | int i; |
| 2247 | 2247 | ||
| 2248 | if (!gpmc_base) | ||
| 2249 | return; | ||
| 2250 | |||
| 2248 | gpmc_context.sysconfig = gpmc_read_reg(GPMC_SYSCONFIG); | 2251 | gpmc_context.sysconfig = gpmc_read_reg(GPMC_SYSCONFIG); |
| 2249 | gpmc_context.irqenable = gpmc_read_reg(GPMC_IRQENABLE); | 2252 | gpmc_context.irqenable = gpmc_read_reg(GPMC_IRQENABLE); |
| 2250 | gpmc_context.timeout_ctrl = gpmc_read_reg(GPMC_TIMEOUT_CONTROL); | 2253 | gpmc_context.timeout_ctrl = gpmc_read_reg(GPMC_TIMEOUT_CONTROL); |
| @@ -2277,6 +2280,9 @@ void omap3_gpmc_restore_context(void) | |||
| 2277 | { | 2280 | { |
| 2278 | int i; | 2281 | int i; |
| 2279 | 2282 | ||
| 2283 | if (!gpmc_base) | ||
| 2284 | return; | ||
| 2285 | |||
| 2280 | gpmc_write_reg(GPMC_SYSCONFIG, gpmc_context.sysconfig); | 2286 | gpmc_write_reg(GPMC_SYSCONFIG, gpmc_context.sysconfig); |
| 2281 | gpmc_write_reg(GPMC_IRQENABLE, gpmc_context.irqenable); | 2287 | gpmc_write_reg(GPMC_IRQENABLE, gpmc_context.irqenable); |
| 2282 | gpmc_write_reg(GPMC_TIMEOUT_CONTROL, gpmc_context.timeout_ctrl); | 2288 | gpmc_write_reg(GPMC_TIMEOUT_CONTROL, gpmc_context.timeout_ctrl); |
