gpio.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /* arch/arm/mach-s3c2410/include/mach/gpio.h
  2. *
  3. * Copyright (c) 2008 Simtec Electronics
  4. * http://armlinux.simtec.co.uk/
  5. * Ben Dooks <ben@simtec.co.uk>
  6. *
  7. * S3C2410 - GPIO lib support
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License version 2 as
  11. * published by the Free Software Foundation.
  12. */
  13. #define gpio_get_value __gpio_get_value
  14. #define gpio_set_value __gpio_set_value
  15. #define gpio_cansleep __gpio_cansleep
  16. #define gpio_to_irq __gpio_to_irq
  17. /* some boards require extra gpio capacity to support external
  18. * devices that need GPIO.
  19. */
  20. #ifdef CONFIG_CPU_S3C244X
  21. #define ARCH_NR_GPIOS (32 * 9 + CONFIG_S3C24XX_GPIO_EXTRA)
  22. #elif defined(CONFIG_CPU_S3C2443) || defined(CONFIG_CPU_S3C2416)
  23. #define ARCH_NR_GPIOS (32 * 12 + CONFIG_S3C24XX_GPIO_EXTRA)
  24. #else
  25. #define ARCH_NR_GPIOS (256 + CONFIG_S3C24XX_GPIO_EXTRA)
  26. #endif
  27. #include <asm-generic/gpio.h>
  28. #include <mach/gpio-nrs.h>
  29. #include <mach/gpio-fns.h>
  30. #ifdef CONFIG_CPU_S3C244X
  31. #define S3C_GPIO_END (S3C2410_GPJ(0) + 32)
  32. #elif defined(CONFIG_CPU_S3C2443) || defined(CONFIG_CPU_S3C2416)
  33. #define S3C_GPIO_END (S3C2410_GPM(0) + 32)
  34. #else
  35. #define S3C_GPIO_END (S3C2410_GPH(0) + 32)
  36. #endif