MCR3000.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (C) 2010-2017 CS Systemes d'Information
  4. * Christophe Leroy <christophe.leroy@c-s.fr>
  5. */
  6. #ifndef __CONFIG_H
  7. #define __CONFIG_H
  8. /* High Level Configuration Options */
  9. #define CONFIG_MISC_INIT_R 1 /* Call misc_init_r */
  10. #define CONFIG_EXTRA_ENV_SETTINGS \
  11. "sdram_type=SDRAM\0" \
  12. "flash_type=AM29LV160DB\0" \
  13. "loadaddr=0x400000\0" \
  14. "filename=uImage.lzma\0" \
  15. "nfsroot=/opt/ofs\0" \
  16. "dhcp_ip=ip=:::::eth0:dhcp\0" \
  17. "console_args=console=ttyCPM0,115200N8\0" \
  18. "flashboot=setenv bootargs " \
  19. "${console_args} " \
  20. "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:" \
  21. "mcr3k:eth0:off;" \
  22. "${ofl_args}; " \
  23. "bootm 0x04060000 - 0x04050000\0" \
  24. "tftpboot=setenv bootargs " \
  25. "${console_args} " \
  26. "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:" \
  27. "mcr3k:eth0:off " \
  28. "${ofl_args}; " \
  29. "tftp ${loadaddr} ${filename};" \
  30. "tftp 0xf00000 mcr3000.dtb;" \
  31. "bootm ${loadaddr} - 0xf00000\0" \
  32. "netboot=dhcp ${loadaddr} ${filename};" \
  33. "tftp 0xf00000 mcr3000.dtb;" \
  34. "setenv bootargs " \
  35. "root=/dev/nfs rw " \
  36. "${console_args} " \
  37. "${dhcp_ip};" \
  38. "bootm ${loadaddr} - 0xf00000\0" \
  39. "nfsboot=setenv bootargs " \
  40. "root=/dev/nfs rw nfsroot=${serverip}:${nfsroot} " \
  41. "${console_args} " \
  42. "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:" \
  43. "mcr3k:eth0:off;" \
  44. "bootm 0x04060000 - 0x04050000\0" \
  45. "dhcpboot=dhcp ${loadaddr} ${filename};" \
  46. "tftp 0xf00000 mcr3000.dtb;" \
  47. "setenv bootargs " \
  48. "${console_args} " \
  49. "${dhcp_ip} " \
  50. "${ofl_args}; " \
  51. "bootm ${loadaddr} - 0xf00000\0"
  52. #define CONFIG_IPADDR 192.168.0.3
  53. #define CONFIG_SERVERIP 192.168.0.1
  54. #define CONFIG_NETMASK 255.0.0.0
  55. #define CONFIG_LOADS_ECHO 1 /* echo on for serial download */
  56. /* Miscellaneous configurable options */
  57. #define CONFIG_SYS_MEMTEST_START 0x00002000
  58. #define CONFIG_SYS_MEMTEST_END 0x00800000
  59. #define CONFIG_SYS_LOAD_ADDR 0x200000
  60. #define CONFIG_SYS_HZ 1000
  61. /* Definitions for initial stack pointer and data area (in DPRAM) */
  62. #define CONFIG_SYS_INIT_RAM_ADDR (CONFIG_SYS_IMMR + 0x2800)
  63. #define CONFIG_SYS_INIT_RAM_SIZE (0x2e00 - 0x2800)
  64. /* RAM configuration (note that CONFIG_SYS_SDRAM_BASE must be zero) */
  65. #define CONFIG_SYS_SDRAM_BASE 0x00000000
  66. /* FLASH organization */
  67. #define CONFIG_SYS_FLASH_BASE CONFIG_SYS_TEXT_BASE
  68. #define CONFIG_SYS_FLASH_CFI 1
  69. #define CONFIG_FLASH_CFI_DRIVER 1
  70. #define CONFIG_SYS_MAX_FLASH_BANKS 1
  71. #define CONFIG_SYS_MAX_FLASH_SECT 35
  72. #define CONFIG_SYS_FLASH_ERASE_TOUT 120000
  73. #define CONFIG_SYS_FLASH_WRITE_TOUT 500
  74. /*
  75. * For booting Linux, the board info and command line data
  76. * have to be in the first 8 MB of memory, since this is
  77. * the maximum mapped by the Linux kernel during initialization.
  78. */
  79. #define CONFIG_SYS_BOOTMAPSZ (8 << 20)
  80. #define CONFIG_SYS_MONITOR_LEN (320 << 10)
  81. #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE
  82. #define CONFIG_SYS_MALLOC_LEN (4096 << 10)
  83. /* Environment Configuration */
  84. /* environment is in FLASH */
  85. #define CONFIG_ENV_SECT_SIZE 0x2000
  86. #define CONFIG_ENV_OFFSET 0x4000
  87. #define CONFIG_ENV_OVERWRITE 1
  88. /* Ethernet configuration part */
  89. #define CONFIG_SYS_DISCOVER_PHY 1
  90. #define CONFIG_MII_INIT 1
  91. /* NAND configuration part */
  92. #define CONFIG_SYS_MAX_NAND_DEVICE 1
  93. #define CONFIG_SYS_NAND_MAX_CHIPS 1
  94. #define CONFIG_SYS_NAND_BASE 0x0C000000
  95. #endif /* __CONFIG_H */