hardware.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. /* Memory configuration. */
  17. #define PLATFORM_DEFAULT_MEM_START __XTENSA_UL(CONFIG_DEFAULT_MEM_START)
  18. #define PLATFORM_DEFAULT_MEM_SIZE __XTENSA_UL(CONFIG_DEFAULT_MEM_SIZE)
  19. /* Interrupt configuration. */
  20. #define PLATFORM_NR_IRQS 10
  21. /* Default assignment of LX60 devices to external interrupts. */
  22. #ifdef CONFIG_XTENSA_MX
  23. #define DUART16552_INTNUM XCHAL_EXTINT3_NUM
  24. #define OETH_IRQ XCHAL_EXTINT4_NUM
  25. #else
  26. #define DUART16552_INTNUM XCHAL_EXTINT0_NUM
  27. #define OETH_IRQ XCHAL_EXTINT1_NUM
  28. #endif
  29. /*
  30. * Device addresses and parameters.
  31. */
  32. /* UART */
  33. #define DUART16552_PADDR (XCHAL_KIO_PADDR + 0x0D050020)
  34. /* Misc. */
  35. #define XTFPGA_FPGAREGS_VADDR IOADDR(0x0D020000)
  36. /* Clock frequency in Hz (read-only): */
  37. #define XTFPGA_CLKFRQ_VADDR (XTFPGA_FPGAREGS_VADDR + 0x04)
  38. /* Setting of 8 DIP switches: */
  39. #define DIP_SWITCHES_VADDR (XTFPGA_FPGAREGS_VADDR + 0x0C)
  40. /* Software reset (write 0xdead): */
  41. #define XTFPGA_SWRST_VADDR (XTFPGA_FPGAREGS_VADDR + 0x10)
  42. /* OpenCores Ethernet controller: */
  43. /* regs + RX/TX descriptors */
  44. #define OETH_REGS_PADDR (XCHAL_KIO_PADDR + 0x0D030000)
  45. #define OETH_REGS_SIZE 0x1000
  46. #define OETH_SRAMBUFF_PADDR (XCHAL_KIO_PADDR + 0x0D800000)
  47. /* 5*rx buffs + 5*tx buffs */
  48. #define OETH_SRAMBUFF_SIZE (5 * 0x600 + 5 * 0x600)
  49. #define C67X00_PADDR (XCHAL_KIO_PADDR + 0x0D0D0000)
  50. #define C67X00_SIZE 0x10
  51. #define C67X00_IRQ 5
  52. #endif /* __XTENSA_XTAVNET_HARDWARE_H */