spear3xx.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. /*
  2. * (C) Copyright 2009
  3. * Vipin Kumar, STMicroelectronics, <vipin.kumar@st.com>
  4. *
  5. * See file CREDITS for list of people who contributed to this
  6. * project.
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License as
  10. * published by the Free Software Foundation; either version 2 of
  11. * the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  21. * MA 02111-1307 USA
  22. */
  23. #ifndef __CONFIG_H
  24. #define __CONFIG_H
  25. /*
  26. * High Level Configuration Options
  27. * (easy to change)
  28. */
  29. #if defined(CONFIG_spear300)
  30. #define CONFIG_SPEAR3XX 1
  31. #define CONFIG_SPEAR300 1
  32. #elif defined(CONFIG_spear310)
  33. #define CONFIG_SPEAR3XX 1
  34. #define CONFIG_SPEAR310 1
  35. #elif defined(CONFIG_spear320)
  36. #define CONFIG_SPEAR3XX 1
  37. #define CONFIG_SPEAR320 1
  38. #endif
  39. #include <configs/spear-common.h>
  40. /* Ethernet driver configuration */
  41. #define CONFIG_DW_ALTDESCRIPTOR 1
  42. /* Serial Configuration (PL011) */
  43. #define CONFIG_SYS_SERIAL0 0xD0000000
  44. #if defined(CONFIG_SPEAR300)
  45. #define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0}
  46. #elif defined(CONFIG_SPEAR310)
  47. #if (CONFIG_CONS_INDEX)
  48. #undef CONFIG_PL011_CLOCK
  49. #define CONFIG_PL011_CLOCK (83 * 1000 * 1000)
  50. #endif
  51. #define CONFIG_SYS_SERIAL1 0xB2000000
  52. #define CONFIG_SYS_SERIAL2 0xB2080000
  53. #define CONFIG_SYS_SERIAL3 0xB2100000
  54. #define CONFIG_SYS_SERIAL4 0xB2180000
  55. #define CONFIG_SYS_SERIAL5 0xB2200000
  56. #define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0, \
  57. (void *)CONFIG_SYS_SERIAL1, \
  58. (void *)CONFIG_SYS_SERIAL2, \
  59. (void *)CONFIG_SYS_SERIAL3, \
  60. (void *)CONFIG_SYS_SERIAL4, \
  61. (void *)CONFIG_SYS_SERIAL5 }
  62. #elif defined(CONFIG_SPEAR320)
  63. #if (CONFIG_CONS_INDEX)
  64. #undef CONFIG_PL011_CLOCK
  65. #define CONFIG_PL011_CLOCK (83 * 1000 * 1000)
  66. #endif
  67. #define CONFIG_SYS_SERIAL1 0xA3000000
  68. #define CONFIG_SYS_SERIAL2 0xA4000000
  69. #define CONFIG_PL01x_PORTS {(void *)CONFIG_SYS_SERIAL0, \
  70. (void *)CONFIG_SYS_SERIAL1, \
  71. (void *)CONFIG_SYS_SERIAL2 }
  72. #endif
  73. #if defined(CONFIG_SPEAR_EMI)
  74. #define CONFIG_SYS_FLASH_CFI
  75. #define CONFIG_FLASH_CFI_DRIVER
  76. #if defined(CONFIG_SPEAR310)
  77. #define CONFIG_SYS_FLASH_BASE 0x50000000
  78. #define CONFIG_SYS_CS1_FLASH_BASE 0x60000000
  79. #define CONFIG_SYS_CS2_FLASH_BASE 0x70000000
  80. #define CONFIG_SYS_CS3_FLASH_BASE 0x80000000
  81. #define CONFIG_SYS_CS4_FLASH_BASE 0x90000000
  82. #define CONFIG_SYS_CS5_FLASH_BASE 0xA0000000
  83. #define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE, \
  84. CONFIG_SYS_CS1_FLASH_BASE, \
  85. CONFIG_SYS_CS2_FLASH_BASE, \
  86. CONFIG_SYS_CS3_FLASH_BASE, \
  87. CONFIG_SYS_CS4_FLASH_BASE, \
  88. CONFIG_SYS_CS5_FLASH_BASE }
  89. #define CONFIG_SYS_MAX_FLASH_BANKS 6
  90. #elif defined(CONFIG_SPEAR320)
  91. #define CONFIG_SYS_FLASH_BASE 0x44000000
  92. #define CONFIG_SYS_CS1_FLASH_BASE 0x45000000
  93. #define CONFIG_SYS_CS2_FLASH_BASE 0x46000000
  94. #define CONFIG_SYS_CS3_FLASH_BASE 0x47000000
  95. #define CONFIG_SYS_FLASH_BANKS_LIST { CONFIG_SYS_FLASH_BASE, \
  96. CONFIG_SYS_CS1_FLASH_BASE, \
  97. CONFIG_SYS_CS2_FLASH_BASE, \
  98. CONFIG_SYS_CS3_FLASH_BASE }
  99. #define CONFIG_SYS_MAX_FLASH_BANKS 4
  100. #endif
  101. #define CONFIG_SYS_MAX_FLASH_SECT (127 + 8)
  102. #define CONFIG_SYS_FLASH_QUIET_TEST 1
  103. #endif
  104. /* NAND flash configuration */
  105. #define CONFIG_SYS_FSMC_NAND_SP
  106. #define CONFIG_SYS_FSMC_NAND_8BIT
  107. #if defined(CONFIG_SPEAR300)
  108. #define CONFIG_SYS_NAND_BASE (0x80000000)
  109. #elif defined(CONFIG_SPEAR310)
  110. #define CONFIG_SYS_NAND_BASE (0x40000000)
  111. #elif defined(CONFIG_SPEAR320)
  112. #define CONFIG_SYS_NAND_BASE (0x50000000)
  113. #endif
  114. #endif /* __CONFIG_H */