idmr.h 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. /*
  2. * Configuration settings for the iDMR board
  3. *
  4. * Based on MC5272C3, r5200 and M5271EVB board configs
  5. * (C) Copyright 2006 Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  6. * (C) Copyright 2006 Lab X Technologies <zachary.landau@labxtechnologies.com>
  7. * (C) Copyright 2003 Josef Baumgartner <josef.baumgartner@telex.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 _IDMR_H
  28. #define _IDMR_H
  29. /*
  30. * High Level Configuration Options (easy to change)
  31. */
  32. #define CONFIG_MCF52x2 /* define processor family */
  33. #define CONFIG_M5271 /* define processor type */
  34. #define CONFIG_IDMR /* define board type */
  35. #undef CONFIG_WATCHDOG /* disable watchdog */
  36. /*
  37. * Default environment settings
  38. */
  39. #define CONFIG_BOOTCOMMAND "run net_nfs"
  40. #define CONFIG_BOOTDELAY 5
  41. #define CONFIG_MCFUART
  42. #define CONFIG_SYS_UART_PORT (0)
  43. #define CONFIG_BAUDRATE 19200
  44. #define CONFIG_SYS_BAUDRATE_TABLE { 9600 , 19200 , 38400 , 57600, 115200 }
  45. #define CONFIG_ETHADDR 00:06:3b:01:41:55
  46. #define CONFIG_ETHPRIME
  47. #define CONFIG_IPADDR 192.168.30.1
  48. #define CONFIG_SERVERIP 192.168.1.1
  49. #define CONFIG_ROOTPATH
  50. #define CONFIG_GATEWAYIP 192.168.1.1
  51. #define CONFIG_NETMASK 255.255.0.0
  52. #define CONFIG_HOSTNAME idmr
  53. #define CONFIG_BOOTFILE /tftpboot/idmr/uImage
  54. #define CONFIG_PREBOOT "echo;echo Type \\\"run flash_nfs\\\" to mount root " \
  55. "filesystem over NFS; echo"
  56. #define CONFIG_MCFTMR
  57. #define CONFIG_EXTRA_ENV_SETTINGS \
  58. "netdev=eth0\0" \
  59. "ramargs=setenv bootargs root=/dev/ram rw\0" \
  60. "addip=setenv bootargs $(bootargs) " \
  61. "ip=$(ipaddr):$(serverip):$(gatewayip):" \
  62. "$(netmask):$(hostname):$(netdev):off panic=1\0" \
  63. "flash_nfs=run nfsargs addip;bootm $(kernel_addr)\0" \
  64. "flash_self=run ramargs addip;bootm $(kernel_addr) " \
  65. "$(ramdisk_addr)\0" \
  66. "net_nfs=tftp 200000 $(bootfile);run nfsargs addip;bootm\0" \
  67. "nfsargs=setenv bootargs root=/dev/nfs rw " \
  68. "nfsroot=$(serverip):$(rootpath)\0" \
  69. "ethact=FEC ETHERNET\0" \
  70. "update=prot off ff800000 ff81ffff; era ff800000 ff81ffff; " \
  71. "cp.b 200000 ff800000 $(filesize);" \
  72. "prot on ff800000 ff81ffff\0" \
  73. "load=tftp 200000 $(u-boot)\0" \
  74. "u-boot=/tftpboot/idmr/u-boot.bin\0" \
  75. ""
  76. /*
  77. * BOOTP options
  78. */
  79. #define CONFIG_BOOTP_BOOTFILESIZE
  80. #define CONFIG_BOOTP_BOOTPATH
  81. #define CONFIG_BOOTP_GATEWAY
  82. #define CONFIG_BOOTP_HOSTNAME
  83. /*
  84. * Command line configuration.
  85. */
  86. #include <config_cmd_default.h>
  87. #define CONFIG_CMD_PING
  88. #define CONFIG_CMD_JFFS2
  89. #define CONFIG_CMD_NET
  90. #undef CONFIG_CMD_LOADS
  91. #undef CONFIG_CMD_LOADB
  92. /*
  93. * Low Level Configuration Settings
  94. * (address mappings, register initial values, etc.)
  95. * You should know what you are doing if you make changes here.
  96. */
  97. /*
  98. * Configuration for environment, which occupies third sector in flash.
  99. */
  100. #ifndef CONFIG_MONITOR_IS_IN_RAM
  101. #define CONFIG_ENV_ADDR 0xff820000
  102. #define CONFIG_ENV_SECT_SIZE 0x10000
  103. #define CONFIG_ENV_SIZE 0x2000
  104. #define CONFIG_ENV_IS_IN_FLASH
  105. #else /* CONFIG_MONITOR_IS_IN_RAM */
  106. #define CONFIG_ENV_OFFSET 0x4000
  107. #define CONFIG_ENV_SECT_SIZE 0x2000
  108. #define CONFIG_ENV_IS_IN_FLASH
  109. #endif /* !CONFIG_MONITOR_IS_IN_RAM */
  110. #define CONFIG_SYS_USE_PPCENV /* Environment embedded in sect .ppcenv */
  111. #define CONFIG_SYS_PROMPT "=> "
  112. #define CONFIG_SYS_LONGHELP /* undef to save memory */
  113. #if defined(CONFIG_CMD_KGDB)
  114. #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
  115. #else
  116. #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
  117. #endif
  118. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */
  119. #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
  120. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
  121. #define CONFIG_SYS_LOAD_ADDR 0x00100000
  122. #define CONFIG_SYS_MEMTEST_START 0x400
  123. #define CONFIG_SYS_MEMTEST_END 0x380000
  124. #define CONFIG_SYS_HZ (50000000 / 64)
  125. #define CONFIG_SYS_CLK 100000000
  126. #define CONFIG_SYS_MBAR 0x40000000 /* Register Base Addrs */
  127. /*
  128. * Ethernet
  129. */
  130. #define CONFIG_MCFFEC
  131. #ifdef CONFIG_MCFFEC
  132. # define CONFIG_NET_MULTI 1
  133. # define CONFIG_MII 1
  134. # define CONFIG_MII_INIT 1
  135. # define CONFIG_SYS_DISCOVER_PHY
  136. # define CONFIG_SYS_RX_ETH_BUFFER 8
  137. # define CONFIG_SYS_FAULT_ECHO_LINK_DOWN
  138. # define CONFIG_SYS_FEC0_PINMUX 0
  139. # define CONFIG_SYS_FEC0_MIIBASE CONFIG_SYS_FEC0_IOBASE
  140. # define MCFFEC_TOUT_LOOP 50000
  141. /* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */
  142. # ifndef CONFIG_SYS_DISCOVER_PHY
  143. # define FECDUPLEX FULL
  144. # define FECSPEED _100BASET
  145. # else
  146. # ifndef CONFIG_SYS_FAULT_ECHO_LINK_DOWN
  147. # define CONFIG_SYS_FAULT_ECHO_LINK_DOWN
  148. # endif
  149. # endif /* CONFIG_SYS_DISCOVER_PHY */
  150. #endif
  151. /*
  152. * Definitions for initial stack pointer and data area (in DPRAM)
  153. */
  154. #define CONFIG_SYS_INIT_RAM_ADDR 0x20000000
  155. #define CONFIG_SYS_INIT_RAM_END 0x1000 /* End of used area in internal SRAM */
  156. #define CONFIG_SYS_GBL_DATA_SIZE 64 /* size in bytes reserved for initial data */
  157. #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_END - CONFIG_SYS_GBL_DATA_SIZE)
  158. #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
  159. /*
  160. * Start addresses for the final memory configuration
  161. * (Set up by the startup code)
  162. * Please note that CONFIG_SYS_SDRAM_BASE _must_ start at 0
  163. */
  164. #define CONFIG_SYS_SDRAM_BASE 0x00000000
  165. #define CONFIG_SYS_SDRAM_SIZE 16 /* SDRAM size in MB */
  166. #define CONFIG_SYS_FLASH_BASE 0xff800000
  167. #ifdef CONFIG_MONITOR_IS_IN_RAM
  168. #define CONFIG_SYS_MONITOR_BASE 0x20000
  169. #else /* !CONFIG_MONITOR_IS_IN_RAM */
  170. #define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_FLASH_BASE + 0x400)
  171. #endif /* CONFIG_MONITOR_IS_IN_RAM */
  172. #define CONFIG_SYS_MONITOR_LEN 0x20000
  173. #define CONFIG_SYS_MALLOC_LEN (256 << 10)
  174. #define CONFIG_SYS_BOOTPARAMS_LEN (64*1024)
  175. /*
  176. * For booting Linux, the board info and command line data
  177. * have to be in the first 8 MB of memory, since this is
  178. * the maximum mapped by the Linux kernel during initialization ??
  179. */
  180. #define CONFIG_SYS_BOOTMAPSZ (CONFIG_SYS_SDRAM_BASE + (CONFIG_SYS_SDRAM_SIZE << 20))
  181. /* FLASH organization */
  182. #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* max number of memory banks */
  183. #define CONFIG_SYS_MAX_FLASH_SECT 128 /* max number of sectors on one chip */
  184. #define CONFIG_SYS_FLASH_ERASE_TOUT 1000
  185. #define CONFIG_SYS_FLASH_SIZE 0x800000
  186. /*
  187. * #define CONFIG_SYS_FLASH_USE_BUFFER_WRITE 1
  188. */
  189. /* Cache Configuration */
  190. #define CONFIG_SYS_CACHELINE_SIZE 16
  191. /* Port configuration */
  192. #define CONFIG_SYS_FECI2C 0xF0
  193. /* Dynamic MTD partition support */
  194. #define CONFIG_CMD_MTDPARTS
  195. #define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
  196. #define CONFIG_FLASH_CFI_MTD
  197. #define MTDIDS_DEFAULT "nor0=idmr-0"
  198. #define MTDPARTS_DEFAULT "mtdparts=idmr-0:128k(u-boot)," \
  199. "64k(env)," \
  200. "640k(kernel)," \
  201. "2m(rootfs)," \
  202. "-(user)";
  203. #if defined(CONFIG_CMD_MII)
  204. #error "MII commands don't work on iDMR board and should not be enabled."
  205. #endif
  206. #endif /* _IDMR_H */