hardware.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * arch/xtensa/platform/xtavnet/include/platform/hardware.h
  3. *
  4. * This file is subject to the terms and conditions of the GNU General Public
  5. * License. See the file "COPYING" in the main directory of this archive
  6. * for more details.
  7. *
  8. * Copyright (C) 2006 Tensilica Inc.
  9. */
  10. /*
  11. * This file contains the hardware configuration of the XTAVNET boards.
  12. */
  13. #include <asm/types.h>
  14. #ifndef __XTENSA_XTAVNET_HARDWARE_H
  15. #define __XTENSA_XTAVNET_HARDWARE_H
  16. /* Default assignment of LX60 devices to external interrupts. */
  17. #ifdef CONFIG_XTENSA_MX
  18. #define DUART16552_INTNUM XCHAL_EXTINT3_NUM
  19. #define OETH_IRQ XCHAL_EXTINT4_NUM
  20. #define C67X00_IRQ XCHAL_EXTINT8_NUM
  21. #else
  22. #define DUART16552_INTNUM XCHAL_EXTINT0_NUM
  23. #define OETH_IRQ XCHAL_EXTINT1_NUM
  24. #define C67X00_IRQ XCHAL_EXTINT5_NUM
  25. #endif
  26. /*
  27. * Device addresses and parameters.
  28. */
  29. /* UART */
  30. #define DUART16552_PADDR (XCHAL_KIO_PADDR + 0x0D050020)
  31. /* Misc. */
  32. #define XTFPGA_FPGAREGS_VADDR IOADDR(0x0D020000)
  33. /* Clock frequency in Hz (read-only): */
  34. #define XTFPGA_CLKFRQ_VADDR (XTFPGA_FPGAREGS_VADDR + 0x04)
  35. /* Setting of 8 DIP switches: */
  36. #define DIP_SWITCHES_VADDR (XTFPGA_FPGAREGS_VADDR + 0x0C)
  37. /* Software reset (write 0xdead): */
  38. #define XTFPGA_SWRST_VADDR (XTFPGA_FPGAREGS_VADDR + 0x10)
  39. /* OpenCores Ethernet controller: */
  40. /* regs + RX/TX descriptors */
  41. #define OETH_REGS_PADDR (XCHAL_KIO_PADDR + 0x0D030000)
  42. #define OETH_REGS_SIZE 0x1000
  43. #define OETH_SRAMBUFF_PADDR (XCHAL_KIO_PADDR + 0x0D800000)
  44. /* 5*rx buffs + 5*tx buffs */
  45. #define OETH_SRAMBUFF_SIZE (5 * 0x600 + 5 * 0x600)
  46. #define C67X00_PADDR (XCHAL_KIO_PADDR + 0x0D0D0000)
  47. #define C67X00_SIZE 0x10
  48. #endif /* __XTENSA_XTAVNET_HARDWARE_H */