bamboo.h 4.0 KB

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