diff options
author | Paul Mackerras <paulus@samba.org> | 2007-05-10 13:08:37 +0200 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-05-10 13:08:37 +0200 |
commit | 2ecf042ef530dd0943e41d84b6344f507941af3e (patch) | |
tree | 73100361dd74e3f80f14c7c81ba4675948983f44 /arch/arm/mach-omap2/gpmc.c | |
parent | [POWERPC] CPM_UART: Removed __init from cpm_uart_init_portdesc to fix warning (diff) | |
parent | Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/rolan... (diff) | |
download | linux-2ecf042ef530dd0943e41d84b6344f507941af3e.tar.xz linux-2ecf042ef530dd0943e41d84b6344f507941af3e.zip |
Merge branch 'linux-2.6'
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) return l & (1 << 6); } -static void gpmc_cs_set_reserved(int cs, int reserved) +int gpmc_cs_set_reserved(int cs, int reserved) { + if (cs > GPMC_CS_NUM) + return -ENODEV; + gpmc_cs_map &= ~(1 << cs); gpmc_cs_map |= (reserved ? 1 : 0) << cs; + + return 0; } -static int gpmc_cs_reserved(int cs) +int gpmc_cs_reserved(int cs) { + if (cs > GPMC_CS_NUM) + return -ENODEV; + return gpmc_cs_map & (1 << cs); } |