aaed2000.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * arch/arm/mach-aaec2000/include/mach/aaed2000.h
  3. *
  4. * AAED-2000 specific bits definition
  5. *
  6. * Copyright (c) 2005 Nicolas Bellido Y Ortega
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. */
  12. #ifndef __ASM_ARCH_AAED2000_H
  13. #define __ASM_ARCH_AAED2000_H
  14. /* External GPIOs. */
  15. #define EXT_GPIO_PBASE AAEC_CS3
  16. #define EXT_GPIO_VBASE 0xf8100000
  17. #define EXT_GPIO_LENGTH 0x00001000
  18. #define __ext_gpio_p2v(x) ((x) - EXT_GPIO_PBASE + EXT_GPIO_VBASE)
  19. #define __ext_gpio_v2p(x) ((x) + EXT_GPIO_PBASE - EXT_GPIO_VBASE)
  20. #define __EXT_GPIO_REG(x) (*((volatile u32 *)__ext_gpio_p2v(x)))
  21. #define __EXT_GPIO_PREG(x) (__ext_gpio_v2p((u32)&(x)))
  22. #define AAED_EXT_GPIO __EXT_GPIO_REG(EXT_GPIO_PBASE)
  23. #define AAED_EGPIO_KBD_SCAN 0x00003fff /* Keyboard scan data */
  24. #define AAED_EGPIO_PWR_INT 0x00008fff /* Smart battery charger interrupt */
  25. #define AAED_EGPIO_SWITCHED 0x000f0000 /* DIP Switches */
  26. #define AAED_EGPIO_USB_VBUS 0x00400000 /* USB Vbus sense */
  27. #define AAED_EGPIO_LCD_PWR_EN 0x02000000 /* LCD and backlight PWR enable */
  28. #define AAED_EGPIO_nLED0 0x20000000 /* LED 0 */
  29. #define AAED_EGPIO_nLED1 0x20000000 /* LED 1 */
  30. #define AAED_EGPIO_nLED2 0x20000000 /* LED 2 */
  31. #endif /* __ARM_ARCH_AAED2000_H */