bamboo.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. /*
  2. * arch/ppc/platforms/bamboo.h
  3. *
  4. * Bamboo board definitions
  5. *
  6. * Wade Farnsworth <wfarnsworth@mvista.com>
  7. *
  8. * Copyright 2004 MontaVista Software Inc.
  9. *
  10. * This program is free software; you can redistribute it and/or modify it
  11. * under the terms of the GNU General Public License as published by the
  12. * Free Software Foundation; either version 2 of the License, or (at your
  13. * option) any later version.
  14. */
  15. #ifdef __KERNEL__
  16. #ifndef __ASM_BAMBOO_H__
  17. #define __ASM_BAMBOO_H__
  18. #include <linux/config.h>
  19. #include <platforms/4xx/ibm440ep.h>
  20. /* F/W TLB mapping used in bootloader glue to reset EMAC */
  21. #define PPC44x_EMAC0_MR0 0x0EF600E00
  22. /* Location of MAC addresses in PIBS image */
  23. #define PIBS_FLASH_BASE 0xfff00000
  24. #define PIBS_MAC_BASE (PIBS_FLASH_BASE+0xc0400)
  25. #define PIBS_MAC_SIZE 0x200
  26. #define PIBS_MAC_OFFSET 0x100
  27. /* Default clock rate */
  28. #define BAMBOO_TMRCLK 25000000
  29. /* RTC/NVRAM location */
  30. #define BAMBOO_RTC_ADDR 0x080000000ULL
  31. #define BAMBOO_RTC_SIZE 0x2000
  32. /* FPGA Registers */
  33. #define BAMBOO_FPGA_ADDR 0x080002000ULL
  34. #define BAMBOO_FPGA_CONFIG2_REG_ADDR (BAMBOO_FPGA_ADDR + 0x1)
  35. #define BAMBOO_FULL_DUPLEX_EN(x) (x & 0x08)
  36. #define BAMBOO_FORCE_100Mbps(x) (x & 0x04)
  37. #define BAMBOO_AUTONEGOTIATE(x) (x & 0x02)
  38. #define BAMBOO_FPGA_SETTING_REG_ADDR (BAMBOO_FPGA_ADDR + 0x3)
  39. #define BAMBOO_BOOT_SMALL_FLASH(x) (!(x & 0x80))
  40. #define BAMBOO_LARGE_FLASH_EN(x) (!(x & 0x40))
  41. #define BAMBOO_BOOT_NAND_FLASH(x) (!(x & 0x20))
  42. #define BAMBOO_FPGA_SELECTION1_REG_ADDR (BAMBOO_FPGA_ADDR + 0x4)
  43. #define BAMBOO_SEL_MII(x) (x & 0x80)
  44. #define BAMBOO_SEL_RMII(x) (x & 0x40)
  45. #define BAMBOO_SEL_SMII(x) (x & 0x20)
  46. /* Flash */
  47. #define BAMBOO_SMALL_FLASH_LOW 0x087f00000ULL
  48. #define BAMBOO_SMALL_FLASH_HIGH 0x0fff00000ULL
  49. #define BAMBOO_SMALL_FLASH_SIZE 0x100000
  50. #define BAMBOO_LARGE_FLASH_LOW 0x087800000ULL
  51. #define BAMBOO_LARGE_FLASH_HIGH1 0x0ff800000ULL
  52. #define BAMBOO_LARGE_FLASH_HIGH2 0x0ffc00000ULL
  53. #define BAMBOO_LARGE_FLASH_SIZE 0x400000
  54. #define BAMBOO_SRAM_LOW 0x087f00000ULL
  55. #define BAMBOO_SRAM_HIGH1 0x0fff00000ULL
  56. #define BAMBOO_SRAM_HIGH2 0x0ff800000ULL
  57. #define BAMBOO_SRAM_SIZE 0x100000
  58. #define BAMBOO_NAND_FLASH_REG_ADDR 0x090000000ULL
  59. #define BAMBOO_NAND_FLASH_REG_SIZE 0x2000
  60. /*
  61. * Serial port defines
  62. */
  63. #define RS_TABLE_SIZE 4
  64. #define UART0_IO_BASE 0xEF600300
  65. #define UART1_IO_BASE 0xEF600400
  66. #define UART2_IO_BASE 0xEF600500
  67. #define UART3_IO_BASE 0xEF600600
  68. #define BASE_BAUD 33177600/3/16
  69. #define UART0_INT 0
  70. #define UART1_INT 1
  71. #define UART2_INT 3
  72. #define UART3_INT 4
  73. #define STD_UART_OP(num) \
  74. { 0, BASE_BAUD, 0, UART##num##_INT, \
  75. (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST), \
  76. iomem_base: (void*)UART##num##_IO_BASE, \
  77. io_type: SERIAL_IO_MEM},
  78. #define SERIAL_PORT_DFNS \
  79. STD_UART_OP(0) \
  80. STD_UART_OP(1) \
  81. STD_UART_OP(2) \
  82. STD_UART_OP(3)
  83. /* PCI support */
  84. #define BAMBOO_PCI_CFGA_PLB32 0xeec00000
  85. #define BAMBOO_PCI_CFGD_PLB32 0xeec00004
  86. #define BAMBOO_PCI_IO_BASE 0x00000000e8000000ULL
  87. #define BAMBOO_PCI_IO_SIZE 0x00010000
  88. #define BAMBOO_PCI_MEM_OFFSET 0x00000000
  89. #define BAMBOO_PCI_PHY_MEM_BASE 0x00000000a0000000ULL
  90. #define BAMBOO_PCI_LOWER_IO 0x00000000
  91. #define BAMBOO_PCI_UPPER_IO 0x0000ffff
  92. #define BAMBOO_PCI_LOWER_MEM 0xa0000000
  93. #define BAMBOO_PCI_UPPER_MEM 0xafffffff
  94. #define BAMBOO_PCI_MEM_BASE 0xa0000000
  95. #define BAMBOO_PCIL0_BASE 0x00000000ef400000ULL
  96. #define BAMBOO_PCIL0_SIZE 0x40
  97. #define BAMBOO_PCIL0_PMM0LA 0x000
  98. #define BAMBOO_PCIL0_PMM0MA 0x004
  99. #define BAMBOO_PCIL0_PMM0PCILA 0x008
  100. #define BAMBOO_PCIL0_PMM0PCIHA 0x00C
  101. #define BAMBOO_PCIL0_PMM1LA 0x010
  102. #define BAMBOO_PCIL0_PMM1MA 0x014
  103. #define BAMBOO_PCIL0_PMM1PCILA 0x018
  104. #define BAMBOO_PCIL0_PMM1PCIHA 0x01C
  105. #define BAMBOO_PCIL0_PMM2LA 0x020
  106. #define BAMBOO_PCIL0_PMM2MA 0x024
  107. #define BAMBOO_PCIL0_PMM2PCILA 0x028
  108. #define BAMBOO_PCIL0_PMM2PCIHA 0x02C
  109. #define BAMBOO_PCIL0_PTM1MS 0x030
  110. #define BAMBOO_PCIL0_PTM1LA 0x034
  111. #define BAMBOO_PCIL0_PTM2MS 0x038
  112. #define BAMBOO_PCIL0_PTM2LA 0x03C
  113. #endif /* __ASM_BAMBOO_H__ */
  114. #endif /* __KERNEL__ */