xsengine.h 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. /*
  2. * (C) Copyright 2002
  3. * Kyle Harris, Nexus Technologies, Inc. kharris@nexus-tech.net
  4. *
  5. * (C) Copyright 2002
  6. * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
  7. * Marius Groeger <mgroeger@sysgo.de>
  8. *
  9. * See file CREDITS for list of people who contributed to this
  10. * project.
  11. *
  12. * This program is free software; you can redistribute it and/or
  13. * modify it under the terms of the GNU General Public License as
  14. * published by the Free Software Foundation; either version 2 of
  15. * the License, or (at your option) any later version.
  16. *
  17. * This program is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. * GNU General Public License for more details.
  21. *
  22. * You should have received a copy of the GNU General Public License
  23. * along with this program; if not, write to the Free Software
  24. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  25. * MA 02111-1307 USA
  26. */
  27. #ifndef __CONFIG_H
  28. #define __CONFIG_H
  29. /*
  30. * If we are developing, we might want to start armboot from ram
  31. * so we MUST NOT initialize critical regs like mem-timing ...
  32. */
  33. #define CONFIG_INIT_CRITICAL /* undef for developing */
  34. /* High Level Configuration Options */
  35. #define CONFIG_PXA250 1 /* This is an PXA250 CPU */
  36. #define CONFIG_XSENGINE 1
  37. #define CONFIG_MMC 1
  38. #define BOARD_POST_INIT 1
  39. #undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */
  40. #define CFG_HZ 3686400 /* incrementer freq: 3.6864 MHz */
  41. #undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */
  42. #define CFG_HZ 3686400 /* incrementer freq: 3.6864 MHz */
  43. #define CFG_CPUSPEED 0x161 /* set core clock to 400/200/100 MHz */
  44. #define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */
  45. #define PHYS_SDRAM_1 0xa0000000 /* SDRAM Bank #1 */
  46. #define PHYS_SDRAM_1_SIZE 0x04000000 /* 64 MB */
  47. #define PHYS_SDRAM_2 0xa4000000 /* SDRAM Bank #2 */
  48. #define PHYS_SDRAM_2_SIZE 0x00000000 /* 0 MB */
  49. #define PHYS_SDRAM_3 0xa8000000 /* SDRAM Bank #3 */
  50. #define PHYS_SDRAM_3_SIZE 0x00000000 /* 0 MB */
  51. #define PHYS_SDRAM_4 0xac000000 /* SDRAM Bank #4 */
  52. #define PHYS_SDRAM_4_SIZE 0x00000000 /* 0 MB */
  53. #define CFG_DRAM_BASE 0xa0000000
  54. #define CFG_DRAM_SIZE 0x04000000
  55. /* FLASH organization */
  56. #define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */
  57. #define CFG_MAX_FLASH_SECT 128 /* max number of sectors on one chip */
  58. #define PHYS_FLASH_1 0x00000000 /* Flash Bank #1 */
  59. #define PHYS_FLASH_2 0x00000000 /* Flash Bank #2 */
  60. #define PHYS_FLASH_SECT_SIZE 0x00020000 /* 127 KB sectors */
  61. #define CFG_FLASH_BASE PHYS_FLASH_1
  62. #define CFG_JFFS2_NUM_BANKS 1
  63. #define CFG_JFFS2_FIRST_BANK 0
  64. #define CFG_JFFS_CUSTOM_PART 1
  65. /* Environment settings */
  66. #define CONFIG_ENV_OVERWRITE
  67. #define CFG_ENV_IS_IN_FLASH 1
  68. #define CFG_ENV_ADDR (PHYS_FLASH_1 + 0x40000) /* Addr of Environment Sector (after monitor)*/
  69. #define CFG_ENV_SECT_SIZE PHYS_FLASH_SECT_SIZE /* Size of the Environment Sector */
  70. #define CFG_ENV_SIZE 0x4000 /* 16kB Total Size of Environment Sector */
  71. /* timeout values are in ticks */
  72. #define CFG_FLASH_ERASE_TOUT (75*CFG_HZ) /* Timeout for Flash Erase */
  73. #define CFG_FLASH_WRITE_TOUT (50*CFG_HZ) /* Timeout for Flash Write */
  74. /* Size of malloc() pool */
  75. #define CFG_MALLOC_LEN (CFG_ENV_SIZE + 256*1024)
  76. #define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */
  77. /* Hardware drivers */
  78. #define CONFIG_DRIVER_SMC91111
  79. #define CONFIG_SMC91111_BASE 0x04000300
  80. #define CONFIG_SMC_USE_32_BIT 1
  81. /* select serial console configuration */
  82. #define CONFIG_FFUART 1
  83. /* allow to overwrite serial and ethaddr */
  84. #define CONFIG_BAUDRATE 115200
  85. #define CONFIG_COMMANDS (CONFIG_CMD_DFL | CFG_CMD_MMC | CFG_CMD_FAT | CFG_CMD_PING | CFG_CMD_JFFS2)
  86. /* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
  87. #include <cmd_confdefs.h>
  88. #define CONFIG_BOOTDELAY 3
  89. #define CONFIG_ETHADDR FF:FF:FF:FF:FF:FF
  90. #define CONFIG_NETMASK 255.255.255.0
  91. #define CONFIG_IPADDR 192.168.1.50
  92. #define CONFIG_SERVERIP 192.168.1.2
  93. #define CONFIG_BOOTARGS "root=/dev/mtdblock2 rootfstype=jffs2 console=ttyS1,115200"
  94. #define CONFIG_CMDLINE_TAG
  95. /* Miscellaneous configurable options */
  96. #define CFG_HUSH_PARSER 1
  97. #define CFG_PROMPT_HUSH_PS2 "> "
  98. #define CFG_LONGHELP /* undef to save memory */
  99. #define CFG_PROMPT "XS-Engine u-boot> " /* Monitor Command Prompt */
  100. #define CFG_CBSIZE 256 /* Console I/O Buffer Size */
  101. #define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */
  102. #define CFG_MAXARGS 16 /* max number of command args */
  103. #define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */
  104. #define CFG_MEMTEST_START 0xA0400000 /* memtest works on */
  105. #define CFG_MEMTEST_END 0xA0800000 /* 4 ... 8 MB in DRAM */
  106. #undef CFG_CLKS_IN_HZ /* everything, incl board info, in Hz */
  107. #define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } /* valid baudrates */
  108. #define CFG_MMC_BASE 0xF0000000
  109. #define CFG_LOAD_ADDR 0xA0000000 /* load kernel to this address */
  110. /* Stack sizes - The stack sizes are set up in start.S using the settings below */
  111. #define CONFIG_STACKSIZE (128*1024) /* regular stack */
  112. #ifdef CONFIG_USE_IRQ
  113. #define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */
  114. #define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */
  115. #endif
  116. /* GP set register */
  117. #define CFG_GPSR0_VAL 0x0000A000 /* CS1, PROG(FPGA) */
  118. #define CFG_GPSR1_VAL 0x00020000 /* nPWE */
  119. #define CFG_GPSR2_VAL 0x0000C000 /* CS2, CS3 */
  120. /* GP clear register */
  121. #define CFG_GPCR0_VAL 0x00000000
  122. #define CFG_GPCR1_VAL 0x00000000
  123. #define CFG_GPCR2_VAL 0x00000000
  124. /* GP direction register */
  125. #define CFG_GPDR0_VAL 0x0000A000 /* CS1, PROG(FPGA) */
  126. #define CFG_GPDR1_VAL 0x00022A80 /* nPWE, FFUART + BTUART pins */
  127. #define CFG_GPDR2_VAL 0x0000C000 /* CS2, CS3 */
  128. /* GP rising edge detect register */
  129. #define CFG_GRER0_VAL 0x00000000
  130. #define CFG_GRER1_VAL 0x00000000
  131. #define CFG_GRER2_VAL 0x00000000
  132. /* GP falling edge detect register */
  133. #define CFG_GFER0_VAL 0x00000000
  134. #define CFG_GFER1_VAL 0x00000000
  135. #define CFG_GFER2_VAL 0x00000000
  136. /* GP alternate function register */
  137. #define CFG_GAFR0_L_VAL 0x80000000 /* CS1 */
  138. #define CFG_GAFR0_U_VAL 0x00000010 /* RDY */
  139. #define CFG_GAFR1_L_VAL 0x09988050 /* FFUART + BTUART pins */
  140. #define CFG_GAFR1_U_VAL 0x00000008 /* nPWE */
  141. #define CFG_GAFR2_L_VAL 0xA0000000 /* CS2, CS3 */
  142. #define CFG_GAFR2_U_VAL 0x00000000
  143. #define CFG_PSSR_VAL 0x00000020 /* Power manager sleep status */
  144. #define CFG_CCCR_VAL 0x00000161 /* 100 MHz memory, 400 MHz CPU */
  145. #define CFG_CKEN_VAL 0x000000C0 /* BTUART and FFUART enabled */
  146. #define CFG_ICMR_VAL 0x00000000 /* No interrupts enabled */
  147. /* Memory settings */
  148. #define CFG_MSC0_VAL 0x25F425F0
  149. /* MDCNFG: SDRAM Configuration Register */
  150. #define CFG_MDCNFG_VAL 0x000009C9
  151. /* MDREFR: SDRAM Refresh Control Register */
  152. #define CFG_MDREFR_VAL 0x00018018
  153. /* MDMRS: Mode Register Set Configuration Register */
  154. #define CFG_MDMRS_VAL 0x00220022
  155. #endif /* __CONFIG_H */