gazerbeam.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. /*
  2. * (C) Copyright 2015
  3. * Dirk Eibach, Guntermann & Drunck GmbH, eibach@gdsys.de
  4. *
  5. *
  6. * SPDX-License-Identifier: GPL-2.0+
  7. */
  8. #ifndef __CONFIG_H
  9. #define __CONFIG_H
  10. /*
  11. * DDR Setup
  12. */
  13. #define CONFIG_SYS_SDRAM_BASE 0x00000000 /* DDR is system memory */
  14. /* TODO: Check: Can this be unified with CONFIG_SYS_SDRAM_BASE? */
  15. #define CONFIG_SYS_DDR_SDRAM_BASE CONFIG_SYS_SDRAM_BASE
  16. /*
  17. * Memory test
  18. * TODO: Migrate!
  19. */
  20. #define CONFIG_SYS_MEMTEST_START 0x00001000 /* memtest region */
  21. #define CONFIG_SYS_MEMTEST_END 0x07e00000
  22. /*
  23. * The reserved memory
  24. */
  25. #define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE /* start of monitor */
  26. #define CONFIG_SYS_MONITOR_LEN (512 * 1024) /* Reserve 512 kB for Mon */
  27. #define CONFIG_SYS_MALLOC_LEN (512 * 1024) /* Reserved for malloc */
  28. /*
  29. * Initial RAM Base Address Setup
  30. */
  31. #define CONFIG_SYS_INIT_RAM_LOCK
  32. #define CONFIG_SYS_INIT_RAM_ADDR 0xE6000000 /* Initial RAM address */
  33. #define CONFIG_SYS_INIT_RAM_SIZE 0x1000 /* Size of used area in RAM */
  34. #define CONFIG_SYS_GBL_DATA_OFFSET \
  35. (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
  36. /*
  37. * FLASH on the Local Bus
  38. */
  39. #define CONFIG_SYS_FLASH_BASE 0xFE000000 /* FLASH base address */
  40. #define CONFIG_SYS_FLASH_SIZE 8 /* FLASH size is up to 8M */
  41. #define CONFIG_SYS_MAX_FLASH_BANKS 1 /* number of banks */
  42. #define CONFIG_SYS_MAX_FLASH_SECT 135
  43. #define CONFIG_SYS_BAUDRATE_TABLE \
  44. {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200}
  45. /*
  46. * Environment
  47. */
  48. #define CONFIG_LOADS_ECHO /* echo on for serial download */
  49. #define CONFIG_SYS_LOADS_BAUD_CHANGE /* allow baudrate change */
  50. /*
  51. * Miscellaneous configurable options
  52. */
  53. #define CONFIG_SYS_LOAD_ADDR 0x2000000 /* default load address */
  54. #define CONFIG_SYS_HZ 1000 /* decrementer freq: 1ms ticks */
  55. #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */
  56. /* Print Buffer Size */
  57. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
  58. #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
  59. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
  60. /*
  61. * For booting Linux, the board info and command line data
  62. * have to be in the first 256 MB of memory, since this is
  63. * the maximum mapped by the Linux kernel during initialization.
  64. */
  65. #define CONFIG_SYS_BOOTMAPSZ (256 << 20) /* Initial Memory map for Linux */
  66. /*
  67. * Environment Configuration
  68. */
  69. #define CONFIG_ENV_OVERWRITE
  70. #define CONFIG_HAS_ETH0
  71. #define CONFIG_HAS_ETH1
  72. #define CONFIG_LOADADDR 800000 /* default location for tftp and bootm */
  73. /* TODO: Turn into string option and migrate to Kconfig */
  74. #define CONFIG_HOSTNAME "gazerbeam"
  75. #define CONFIG_ROOTPATH "/opt/nfsroot"
  76. #define CONFIG_BOOTFILE "uImage"
  77. #define CONFIG_EXTRA_ENV_SETTINGS \
  78. "netdev=eth0\0" \
  79. "consoledev=ttyS1\0" \
  80. "u-boot=u-boot.bin\0" \
  81. "kernel_addr=1000000\0" \
  82. "fdt_addr=C00000\0" \
  83. "fdtfile=hrcon.dtb\0" \
  84. "load=tftp ${loadaddr} ${u-boot}\0" \
  85. "update=protect off " __stringify(CONFIG_SYS_MONITOR_BASE) \
  86. " +${filesize};era " __stringify(CONFIG_SYS_MONITOR_BASE)\
  87. " +${filesize};cp.b ${fileaddr} " \
  88. __stringify(CONFIG_SYS_MONITOR_BASE) " ${filesize}\0" \
  89. "upd=run load update\0" \
  90. #define CONFIG_NFSBOOTCOMMAND \
  91. "setenv bootargs root=/dev/nfs rw " \
  92. "nfsroot=$serverip:$rootpath " \
  93. "ip=$ipaddr:$serverip:$gatewayip:$netmask:$hostname:$netdev:off " \
  94. "console=$consoledev,$baudrate $othbootargs;" \
  95. "tftp ${kernel_addr} $bootfile;" \
  96. "tftp ${fdt_addr} $fdtfile;" \
  97. "bootm ${kernel_addr} - ${fdt_addr}"
  98. #define CONFIG_MMCBOOTCOMMAND \
  99. "setenv bootargs root=/dev/mmcblk0p3 rw rootwait " \
  100. "console=$consoledev,$baudrate $othbootargs;" \
  101. "ext2load mmc 0:2 ${kernel_addr} $bootfile;" \
  102. "ext2load mmc 0:2 ${fdt_addr} $fdtfile;" \
  103. "bootm ${kernel_addr} - ${fdt_addr}"
  104. #define CONFIG_BOOTCOMMAND CONFIG_MMCBOOTCOMMAND
  105. #endif /* __CONFIG_H */