lubbock.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * arch/arm/mach-pxa/include/mach/lubbock.h
  3. *
  4. * Author: Nicolas Pitre
  5. * Created: Jun 15, 2001
  6. * Copyright: MontaVista Software Inc.
  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. #include <mach/irqs.h>
  13. #define LUBBOCK_ETH_PHYS PXA_CS3_PHYS
  14. #define LUBBOCK_FPGA_PHYS PXA_CS2_PHYS
  15. #define LUBBOCK_FPGA_VIRT (0xf0000000)
  16. #define LUB_P2V(x) ((x) - LUBBOCK_FPGA_PHYS + LUBBOCK_FPGA_VIRT)
  17. #define LUB_V2P(x) ((x) - LUBBOCK_FPGA_VIRT + LUBBOCK_FPGA_PHYS)
  18. #ifndef __ASSEMBLY__
  19. # define __LUB_REG(x) (*((volatile unsigned long *)LUB_P2V(x)))
  20. #else
  21. # define __LUB_REG(x) LUB_P2V(x)
  22. #endif
  23. /* FPGA register virtual addresses */
  24. #define LUB_WHOAMI __LUB_REG(LUBBOCK_FPGA_PHYS + 0x000)
  25. #define LUB_DISC_BLNK_LED __LUB_REG(LUBBOCK_FPGA_PHYS + 0x040)
  26. #define LUB_CONF_SWITCHES __LUB_REG(LUBBOCK_FPGA_PHYS + 0x050)
  27. #define LUB_USER_SWITCHES __LUB_REG(LUBBOCK_FPGA_PHYS + 0x060)
  28. #define LUB_MISC_WR __LUB_REG(LUBBOCK_FPGA_PHYS + 0x080)
  29. #define LUB_MISC_RD __LUB_REG(LUBBOCK_FPGA_PHYS + 0x090)
  30. #define LUB_IRQ_MASK_EN __LUB_REG(LUBBOCK_FPGA_PHYS + 0x0c0)
  31. #define LUB_IRQ_SET_CLR __LUB_REG(LUBBOCK_FPGA_PHYS + 0x0d0)
  32. #define LUB_GP __LUB_REG(LUBBOCK_FPGA_PHYS + 0x100)
  33. /* Board specific IRQs */
  34. #define LUBBOCK_NR_IRQS IRQ_BOARD_START
  35. #define LUBBOCK_IRQ(x) (LUBBOCK_NR_IRQS + (x))
  36. #define LUBBOCK_SD_IRQ LUBBOCK_IRQ(0)
  37. #define LUBBOCK_SA1111_IRQ LUBBOCK_IRQ(1)
  38. #define LUBBOCK_USB_IRQ LUBBOCK_IRQ(2) /* usb connect */
  39. #define LUBBOCK_ETH_IRQ LUBBOCK_IRQ(3)
  40. #define LUBBOCK_UCB1400_IRQ LUBBOCK_IRQ(4)
  41. #define LUBBOCK_BB_IRQ LUBBOCK_IRQ(5)
  42. #define LUBBOCK_USB_DISC_IRQ LUBBOCK_IRQ(6) /* usb disconnect */
  43. #define LUBBOCK_LAST_IRQ LUBBOCK_IRQ(6)
  44. #define LUBBOCK_SA1111_IRQ_BASE (LUBBOCK_NR_IRQS + 32)
  45. #ifndef __ASSEMBLY__
  46. extern void lubbock_set_misc_wr(unsigned int mask, unsigned int set);
  47. #endif