2008-08-05 15:14:15 +00:00
|
|
|
/* arch/arm/mach-s3c2410/include/mach/gpio.h
|
2007-02-12 08:53:15 +00:00
|
|
|
*
|
2008-07-03 10:24:25 +00:00
|
|
|
* Copyright (c) 2008 Simtec Electronics
|
|
|
|
* http://armlinux.simtec.co.uk/
|
|
|
|
* Ben Dooks <ben@simtec.co.uk>
|
2007-02-12 08:53:15 +00:00
|
|
|
*
|
2008-07-03 10:24:25 +00:00
|
|
|
* S3C2410 - GPIO lib support
|
2007-02-12 08:53:15 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
2008-07-03 10:24:25 +00:00
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*/
|
2007-02-12 08:53:15 +00:00
|
|
|
|
2008-07-03 10:24:25 +00:00
|
|
|
#define gpio_get_value __gpio_get_value
|
|
|
|
#define gpio_set_value __gpio_set_value
|
|
|
|
#define gpio_cansleep __gpio_cansleep
|
2009-01-08 12:33:11 +00:00
|
|
|
#define gpio_to_irq __gpio_to_irq
|
2007-02-12 08:53:15 +00:00
|
|
|
|
2008-11-10 10:59:32 +00:00
|
|
|
/* some boards require extra gpio capacity to support external
|
|
|
|
* devices that need GPIO.
|
|
|
|
*/
|
|
|
|
|
2010-05-12 07:22:41 +00:00
|
|
|
#ifdef CONFIG_CPU_S3C244X
|
|
|
|
#define ARCH_NR_GPIOS (32 * 9 + CONFIG_S3C24XX_GPIO_EXTRA)
|
2010-10-20 10:40:46 +00:00
|
|
|
#elif defined(CONFIG_CPU_S3C2443) || defined(CONFIG_CPU_S3C2416)
|
|
|
|
#define ARCH_NR_GPIOS (32 * 12 + CONFIG_S3C24XX_GPIO_EXTRA)
|
2010-05-12 07:22:41 +00:00
|
|
|
#else
|
2008-11-10 10:59:32 +00:00
|
|
|
#define ARCH_NR_GPIOS (256 + CONFIG_S3C24XX_GPIO_EXTRA)
|
2010-05-12 07:22:41 +00:00
|
|
|
#endif
|
2008-11-10 10:59:32 +00:00
|
|
|
|
2008-07-03 10:24:25 +00:00
|
|
|
#include <asm-generic/gpio.h>
|
2008-12-12 00:24:29 +00:00
|
|
|
#include <mach/gpio-nrs.h>
|
2009-05-13 21:52:24 +00:00
|
|
|
#include <mach/gpio-fns.h>
|
2008-12-12 00:24:29 +00:00
|
|
|
|
2010-10-20 10:40:46 +00:00
|
|
|
#ifdef CONFIG_CPU_S3C244X
|
|
|
|
#define S3C_GPIO_END (S3C2410_GPJ(0) + 32)
|
|
|
|
#elif defined(CONFIG_CPU_S3C2443) || defined(CONFIG_CPU_S3C2416)
|
|
|
|
#define S3C_GPIO_END (S3C2410_GPM(0) + 32)
|
2010-05-12 07:22:41 +00:00
|
|
|
#else
|
2010-10-20 10:40:46 +00:00
|
|
|
#define S3C_GPIO_END (S3C2410_GPH(0) + 32)
|
2010-05-12 07:22:41 +00:00
|
|
|
#endif
|