fpga.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * Interrupt handler for OMAP-1510 FPGA
  3. *
  4. * Copyright (C) 2001 RidgeRun, Inc.
  5. * Author: Greg Lonnon <glonnon@ridgerun.com>
  6. *
  7. * Copyright (C) 2002 MontaVista Software, Inc.
  8. *
  9. * Separated FPGA interrupts from innovator1510.c and cleaned up for 2.6
  10. * Copyright (C) 2004 Nokia Corporation by Tony Lindrgen <tony@atomide.com>
  11. *
  12. * This program is free software; you can redistribute it and/or modify
  13. * it under the terms of the GNU General Public License version 2 as
  14. * published by the Free Software Foundation.
  15. */
  16. #ifndef __ASM_ARCH_OMAP_FPGA_H
  17. #define __ASM_ARCH_OMAP_FPGA_H
  18. /*
  19. * ---------------------------------------------------------------------------
  20. * H2/P2 Debug board FPGA
  21. * ---------------------------------------------------------------------------
  22. */
  23. /* maps in the FPGA registers and the ETHR registers */
  24. #define H2P2_DBG_FPGA_BASE 0xE8000000 /* VA */
  25. #define H2P2_DBG_FPGA_SIZE SZ_4K /* SIZE */
  26. #define H2P2_DBG_FPGA_START 0x04000000 /* PA */
  27. #define H2P2_DBG_FPGA_ETHR_START (H2P2_DBG_FPGA_START + 0x300)
  28. #define H2P2_DBG_FPGA_FPGA_REV IOMEM(H2P2_DBG_FPGA_BASE + 0x10) /* FPGA Revision */
  29. #define H2P2_DBG_FPGA_BOARD_REV IOMEM(H2P2_DBG_FPGA_BASE + 0x12) /* Board Revision */
  30. #define H2P2_DBG_FPGA_GPIO IOMEM(H2P2_DBG_FPGA_BASE + 0x14) /* GPIO outputs */
  31. #define H2P2_DBG_FPGA_LEDS IOMEM(H2P2_DBG_FPGA_BASE + 0x16) /* LEDs outputs */
  32. #define H2P2_DBG_FPGA_MISC_INPUTS IOMEM(H2P2_DBG_FPGA_BASE + 0x18) /* Misc inputs */
  33. #define H2P2_DBG_FPGA_LAN_STATUS IOMEM(H2P2_DBG_FPGA_BASE + 0x1A) /* LAN Status line */
  34. #define H2P2_DBG_FPGA_LAN_RESET IOMEM(H2P2_DBG_FPGA_BASE + 0x1C) /* LAN Reset line */
  35. /* LEDs definition on debug board (16 LEDs, all physically green) */
  36. #define H2P2_DBG_FPGA_LED_GREEN (1 << 15)
  37. #define H2P2_DBG_FPGA_LED_AMBER (1 << 14)
  38. #define H2P2_DBG_FPGA_LED_RED (1 << 13)
  39. #define H2P2_DBG_FPGA_LED_BLUE (1 << 12)
  40. /* cpu0 load-meter LEDs */
  41. #define H2P2_DBG_FPGA_LOAD_METER (1 << 0) // A bit of fun on our board ...
  42. #define H2P2_DBG_FPGA_LOAD_METER_SIZE 11
  43. #define H2P2_DBG_FPGA_LOAD_METER_MASK ((1 << H2P2_DBG_FPGA_LOAD_METER_SIZE) - 1)
  44. #define H2P2_DBG_FPGA_P2_LED_TIMER (1 << 0)
  45. #define H2P2_DBG_FPGA_P2_LED_IDLE (1 << 1)
  46. #endif