diff options
Diffstat (limited to 'arch/arm/mach-omap2/gpmc.c')
-rw-r--r-- | arch/arm/mach-omap2/gpmc.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index d8f57824423f..54c836a98456 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c | |||
@@ -246,14 +246,22 @@ static int gpmc_cs_mem_enabled(int cs) | |||
246 | return l & (1 << 6); | 246 | return l & (1 << 6); |
247 | } | 247 | } |
248 | 248 | ||
249 | static void gpmc_cs_set_reserved(int cs, int reserved) | 249 | int gpmc_cs_set_reserved(int cs, int reserved) |
250 | { | 250 | { |
251 | if (cs > GPMC_CS_NUM) | ||
252 | return -ENODEV; | ||
253 | |||
251 | gpmc_cs_map &= ~(1 << cs); | 254 | gpmc_cs_map &= ~(1 << cs); |
252 | gpmc_cs_map |= (reserved ? 1 : 0) << cs; | 255 | gpmc_cs_map |= (reserved ? 1 : 0) << cs; |
256 | |||
257 | return 0; | ||
253 | } | 258 | } |
254 | 259 | ||
255 | static int gpmc_cs_reserved(int cs) | 260 | int gpmc_cs_reserved(int cs) |
256 | { | 261 | { |
262 | if (cs > GPMC_CS_NUM) | ||
263 | return -ENODEV; | ||
264 | |||
257 | return gpmc_cs_map & (1 << cs); | 265 | return gpmc_cs_map & (1 << cs); |
258 | } | 266 | } |
259 | 267 | ||