]> bbs.cooldavid.org Git - net-next-2.6.git/blame - arch/arm/mach-s3c2410/include/mach/gpio.h
Merge branches 'perf-fixes-for-linus' and 'x86-fixes-for-linus' of git://git.kernel...
[net-next-2.6.git] / arch / arm / mach-s3c2410 / include / mach / gpio.h
CommitLineData
a09e64fb 1/* arch/arm/mach-s3c2410/include/mach/gpio.h
390414ba 2 *
f348a2a2
BD
3 * Copyright (c) 2008 Simtec Electronics
4 * http://armlinux.simtec.co.uk/
5 * Ben Dooks <ben@simtec.co.uk>
390414ba 6 *
f348a2a2 7 * S3C2410 - GPIO lib support
390414ba
PZ
8 *
9 * This program is free software; you can redistribute it and/or modify
f348a2a2
BD
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12*/
390414ba 13
f348a2a2
BD
14#define gpio_get_value __gpio_get_value
15#define gpio_set_value __gpio_set_value
16#define gpio_cansleep __gpio_cansleep
4d316fc5 17#define gpio_to_irq __gpio_to_irq
390414ba 18
e2178d43
BD
19/* some boards require extra gpio capacity to support external
20 * devices that need GPIO.
21 */
22
a0026418
VK
23#ifdef CONFIG_CPU_S3C244X
24#define ARCH_NR_GPIOS (32 * 9 + CONFIG_S3C24XX_GPIO_EXTRA)
e0e451ea
YK
25#elif defined(CONFIG_CPU_S3C2443) || defined(CONFIG_CPU_S3C2416)
26#define ARCH_NR_GPIOS (32 * 12 + CONFIG_S3C24XX_GPIO_EXTRA)
a0026418 27#else
e2178d43 28#define ARCH_NR_GPIOS (256 + CONFIG_S3C24XX_GPIO_EXTRA)
a0026418 29#endif
e2178d43 30
f348a2a2 31#include <asm-generic/gpio.h>
67c2addc 32#include <mach/gpio-nrs.h>
ec976d6e 33#include <mach/gpio-fns.h>
67c2addc 34
e0e451ea
YK
35#ifdef CONFIG_CPU_S3C244X
36#define S3C_GPIO_END (S3C2410_GPJ(0) + 32)
37#elif defined(CONFIG_CPU_S3C2443) || defined(CONFIG_CPU_S3C2416)
38#define S3C_GPIO_END (S3C2410_GPM(0) + 32)
a0026418 39#else
e0e451ea 40#define S3C_GPIO_END (S3C2410_GPH(0) + 32)
a0026418 41#endif