openrisc-generic.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. /*
  2. * (C) Copyright 2011, Stefan Kristiansson, stefan.kristianssons@saunalahti.fi
  3. *
  4. * See file CREDITS for list of people who contributed to this
  5. * project.
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation; either version 2 of
  10. * the License, or (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  20. * MA 02111-1307 USA
  21. */
  22. #ifndef __CONFIG_H
  23. #define __CONFIG_H
  24. /*
  25. * BOARD/CPU
  26. */
  27. #define CONFIG_SYS_CLK_FREQ 50000000
  28. #define CONFIG_SYS_RESET_ADDR 0x00000100
  29. #define CONFIG_SYS_SDRAM_BASE 0x00000000
  30. #define CONFIG_SYS_SDRAM_SIZE 0x02000000
  31. #define CONFIG_SYS_CACHELINE_SIZE 16
  32. #define CONFIG_SYS_UART_BASE 0x90000000
  33. #define CONFIG_SYS_UART_FREQ CONFIG_SYS_CLK_FREQ
  34. #define CONFIG_SYS_UART_BAUD 115200
  35. #define CONFIG_BOARD_NAME "OpenRISC Generic"
  36. #define CONFIG_SYS_NO_FLASH
  37. #define CONFIG_SYS_MAX_FLASH_SECT 0
  38. /*
  39. * SERIAL
  40. */
  41. # define CONFIG_SYS_NS16550
  42. # define CONFIG_SYS_NS16550_SERIAL
  43. # define CONFIG_SYS_NS16550_REG_SIZE 1
  44. # define CONFIG_CONS_INDEX 1
  45. # define CONFIG_SYS_NS16550_COM1 (0x90000000)
  46. # define CONFIG_SYS_NS16550_CLK CONFIG_SYS_CLK_FREQ
  47. #define CONFIG_BAUDRATE CONFIG_SYS_UART_BAUD
  48. #define CONFIG_SYS_BAUDRATE_TABLE {CONFIG_BAUDRATE}
  49. #define CONFIG_SYS_CONSOLE_INFO_QUIET /* Suppress console info */
  50. #define CONSOLE_ARG "console=console=ttyS0,115200\0"
  51. /*
  52. * Ethernet
  53. */
  54. #define CONFIG_ETHOC
  55. #define CONFIG_SYS_ETHOC_BASE 0x92000000
  56. #define CONFIG_BOOTFILE "boot.img"
  57. #define CONFIG_LOADADDR 0x100000 /* 1MB mark */
  58. /*
  59. * TIMER
  60. */
  61. #define CONFIG_SYS_HZ 1000
  62. #define CONFIG_SYS_OPENRISC_TMR_HZ 100
  63. /*
  64. * Memory organisation:
  65. *
  66. * RAM start ---------------------------
  67. * | ... |
  68. * ---------------------------
  69. * | Stack |
  70. * ---------------------------
  71. * | Global data |
  72. * ---------------------------
  73. * | Environment |
  74. * ---------------------------
  75. * | Monitor |
  76. * RAM end ---------------------------
  77. */
  78. /* We're running in RAM */
  79. #define CONFIG_MONITOR_IS_IN_RAM
  80. #define CONFIG_SYS_MONITOR_LEN 0x40000 /* Reserve 256k */
  81. #define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_SDRAM_BASE + \
  82. CONFIG_SYS_SDRAM_SIZE - \
  83. CONFIG_SYS_MONITOR_LEN)
  84. #define CONFIG_ENV_IS_NOWHERE
  85. #define CONFIG_ENV_SIZE 0x20000 /* Total Size of Environment, 128KB */
  86. #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SIZE)
  87. /*
  88. * Global data object and stack pointer
  89. */
  90. #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_ENV_ADDR \
  91. - GENERATED_GBL_DATA_SIZE)
  92. #define CONFIG_SYS_GBL_DATA_ADDR CONFIG_SYS_GBL_DATA_OFFSET
  93. #define CONFIG_SYS_INIT_SP_ADDR CONFIG_SYS_GBL_DATA_OFFSET
  94. #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET
  95. #define CONFIG_SYS_STACK_LENGTH 0x10000 /* 64KB */
  96. #define CONFIG_SYS_MALLOC_LEN 0x400000 /* 4MB */
  97. #define CONFIG_SYS_MALLOC_BASE (CONFIG_SYS_INIT_SP_OFFSET \
  98. - CONFIG_SYS_STACK_LENGTH \
  99. - CONFIG_SYS_MALLOC_LEN)
  100. /*
  101. * MISC
  102. */
  103. #define CONFIG_SYS_LONGHELP /* Provide extended help */
  104. #define CONFIG_SYS_PROMPT "==> " /* Command prompt */
  105. #define CONFIG_SYS_CBSIZE 256 /* Console I/O buf size */
  106. #define CONFIG_SYS_MAXARGS 16 /* Max command args */
  107. #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Bootarg buf size */
  108. #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
  109. sizeof(CONFIG_SYS_PROMPT) + \
  110. 16) /* Print buf size */
  111. #define CONFIG_SYS_LOAD_ADDR CONFIG_SYS_SDRAM_BASE
  112. #define CONFIG_SYS_MEMTEST_START (CONFIG_SYS_SDRAM_BASE + 0x2000)
  113. #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_INIT_SP_ADDR - 0x20000)
  114. #define CONFIG_CMDLINE_EDITING
  115. /*
  116. * Command line configuration.
  117. */
  118. #include <config_cmd_default.h>
  119. #define CONFIG_CMD_IRQ
  120. #define CONFIG_CMD_ELF
  121. #define CONFIG_CMD_BSP
  122. #define CONFIG_CMD_MII
  123. #define CONFIG_CMD_DHCP
  124. #define CONFIG_CMD_PING
  125. #define CONFIG_OF_LIBFDT
  126. #define CONFIG_LMB
  127. /*
  128. * BOOTP options
  129. */
  130. #define CONFIG_BOOTP_BOOTFILESIZE
  131. #define CONFIG_BOOTP_BOOTPATH
  132. #define CONFIG_BOOTP_GATEWAY
  133. #define CONFIG_BOOTP_HOSTNAME
  134. #endif /* __CONFIG_H */