loki.h 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. /*
  2. * arch/arm/mach-loki/include/mach/loki.h
  3. *
  4. * Generic definitions for Marvell Loki (88RC8480) SoC flavors
  5. *
  6. * This file is licensed under the terms of the GNU General Public
  7. * License version 2. This program is licensed "as is" without any
  8. * warranty of any kind, whether express or implied.
  9. */
  10. #ifndef __ASM_ARCH_LOKI_H
  11. #define __ASM_ARCH_LOKI_H
  12. /*
  13. * Marvell Loki (88RC8480) address maps.
  14. *
  15. * phys
  16. * d0000000 on-chip peripheral registers
  17. * e0000000 PCIe 0 Memory space
  18. * e8000000 PCIe 1 Memory space
  19. * f0000000 PCIe 0 I/O space
  20. * f0100000 PCIe 1 I/O space
  21. *
  22. * virt phys size
  23. * fed00000 d0000000 1M on-chip peripheral registers
  24. * fee00000 f0000000 64K PCIe 0 I/O space
  25. * fef00000 f0100000 64K PCIe 1 I/O space
  26. */
  27. #define LOKI_REGS_PHYS_BASE 0xd0000000
  28. #define LOKI_REGS_VIRT_BASE 0xfed00000
  29. #define LOKI_REGS_SIZE SZ_1M
  30. #define LOKI_PCIE0_IO_PHYS_BASE 0xf0000000
  31. #define LOKI_PCIE0_IO_VIRT_BASE 0xfee00000
  32. #define LOKI_PCIE0_IO_BUS_BASE 0x00000000
  33. #define LOKI_PCIE0_IO_SIZE SZ_64K
  34. #define LOKI_PCIE1_IO_PHYS_BASE 0xf0100000
  35. #define LOKI_PCIE1_IO_VIRT_BASE 0xfef00000
  36. #define LOKI_PCIE1_IO_BUS_BASE 0x00000000
  37. #define LOKI_PCIE1_IO_SIZE SZ_64K
  38. #define LOKI_PCIE0_MEM_PHYS_BASE 0xe0000000
  39. #define LOKI_PCIE0_MEM_SIZE SZ_128M
  40. #define LOKI_PCIE1_MEM_PHYS_BASE 0xe8000000
  41. #define LOKI_PCIE1_MEM_SIZE SZ_128M
  42. /*
  43. * Register Map
  44. */
  45. #define DEV_BUS_PHYS_BASE (LOKI_REGS_PHYS_BASE | 0x10000)
  46. #define DEV_BUS_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0x10000)
  47. #define UART0_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2000)
  48. #define UART0_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2000)
  49. #define UART1_PHYS_BASE (DEV_BUS_PHYS_BASE | 0x2100)
  50. #define UART1_VIRT_BASE (DEV_BUS_VIRT_BASE | 0x2100)
  51. #define BRIDGE_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0x20000)
  52. #define BRIDGE_REG(x) (BRIDGE_VIRT_BASE | (x))
  53. #define RSTOUTn_MASK (BRIDGE_VIRT_BASE | 0x0108)
  54. #define SOFT_RESET_OUT_EN 0x00000004
  55. #define SYSTEM_SOFT_RESET (BRIDGE_VIRT_BASE | 0x010c)
  56. #define SOFT_RESET 0x00000001
  57. #define BRIDGE_CAUSE (BRIDGE_VIRT_BASE | 0x0110)
  58. #define BRIDGE_MASK (BRIDGE_VIRT_BASE | 0x0114)
  59. #define BRIDGE_INT_TIMER0 0x0002
  60. #define BRIDGE_INT_TIMER1 0x0004
  61. #define BRIDGE_INT_TIMER1_CLR 0x0004
  62. #define IRQ_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0200)
  63. #define IRQ_CAUSE_OFF 0x0000
  64. #define IRQ_MASK_OFF 0x0004
  65. #define TIMER_VIRT_BASE (BRIDGE_VIRT_BASE | 0x0300)
  66. #define PCIE0_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0x30000)
  67. #define PCIE1_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0x40000)
  68. #define SAS0_PHYS_BASE (LOKI_REGS_PHYS_BASE | 0x80000)
  69. #define SAS1_PHYS_BASE (LOKI_REGS_PHYS_BASE | 0x90000)
  70. #define GE0_PHYS_BASE (LOKI_REGS_PHYS_BASE | 0xa0000)
  71. #define GE0_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0xa0000)
  72. #define GE1_PHYS_BASE (LOKI_REGS_PHYS_BASE | 0xb0000)
  73. #define GE1_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0xb0000)
  74. #define DDR_VIRT_BASE (LOKI_REGS_VIRT_BASE | 0xf0000)
  75. #define DDR_REG(x) (DDR_VIRT_BASE | (x))
  76. #define GPIO_MAX 8
  77. #endif