board-mx31pdk.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * Copyright 2008 Freescale Semiconductor, Inc. All Rights Reserved.
  3. */
  4. /*
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License version 2 as
  7. * published by the Free Software Foundation.
  8. */
  9. #ifndef __ASM_ARCH_MXC_BOARD_MX31PDK_H__
  10. #define __ASM_ARCH_MXC_BOARD_MX31PDK_H__
  11. /* Definitions for components on the Debug board */
  12. /* Base address of CPLD controller on the Debug board */
  13. #define DEBUG_BASE_ADDRESS CS5_IO_ADDRESS(CS5_BASE_ADDR)
  14. /* LAN9217 ethernet base address */
  15. #define LAN9217_BASE_ADDR CS5_BASE_ADDR
  16. /* CPLD config and interrupt base address */
  17. #define CPLD_ADDR (DEBUG_BASE_ADDRESS + 0x20000)
  18. /* LED switchs */
  19. #define CPLD_LED_REG (CPLD_ADDR + 0x00)
  20. /* buttons */
  21. #define CPLD_SWITCH_BUTTONS_REG (EXPIO_ADDR + 0x08)
  22. /* status, interrupt */
  23. #define CPLD_INT_STATUS_REG (CPLD_ADDR + 0x10)
  24. #define CPLD_INT_MASK_REG (CPLD_ADDR + 0x38)
  25. #define CPLD_INT_RESET_REG (CPLD_ADDR + 0x20)
  26. /* magic word for debug CPLD */
  27. #define CPLD_MAGIC_NUMBER1_REG (CPLD_ADDR + 0x40)
  28. #define CPLD_MAGIC_NUMBER2_REG (CPLD_ADDR + 0x48)
  29. /* CPLD code version */
  30. #define CPLD_CODE_VER_REG (CPLD_ADDR + 0x50)
  31. /* magic word for debug CPLD */
  32. #define CPLD_MAGIC_NUMBER3_REG (CPLD_ADDR + 0x58)
  33. /* module reset register */
  34. #define CPLD_MODULE_RESET_REG (CPLD_ADDR + 0x60)
  35. /* CPU ID and Personality ID */
  36. #define CPLD_MCU_BOARD_ID_REG (CPLD_ADDR + 0x68)
  37. /* CPLD IRQ line for external uart, external ethernet etc */
  38. #define EXPIO_PARENT_INT IOMUX_TO_IRQ(MX31_PIN_GPIO1_1)
  39. #define MXC_EXP_IO_BASE (MXC_BOARD_IRQ_START)
  40. #define MXC_IRQ_TO_EXPIO(irq) ((irq) - MXC_EXP_IO_BASE)
  41. #define EXPIO_INT_ENET (MXC_EXP_IO_BASE + 0)
  42. #define EXPIO_INT_XUART_A (MXC_EXP_IO_BASE + 1)
  43. #define EXPIO_INT_XUART_B (MXC_EXP_IO_BASE + 2)
  44. #define EXPIO_INT_BUTTON_A (MXC_EXP_IO_BASE + 3)
  45. #define EXPIO_INT_BUTTON_B (MXC_EXP_IO_BASE + 4)
  46. #define MXC_MAX_EXP_IO_LINES 16
  47. #endif /* __ASM_ARCH_MXC_BOARD_MX31PDK_H__ */