Stefan Kristiansson | f179cc6 | 2011-11-26 19:04:55 +0000 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2011, Stefan Kristiansson, stefan.kristianssons@saunalahti.fi |
| 3 | * |
Wolfgang Denk | 3765b3e | 2013-10-07 13:07:26 +0200 | [diff] [blame] | 4 | * SPDX-License-Identifier: GPL-2.0+ |
Stefan Kristiansson | f179cc6 | 2011-11-26 19:04:55 +0000 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #ifndef __CONFIG_H |
| 8 | #define __CONFIG_H |
| 9 | |
| 10 | /* |
| 11 | * BOARD/CPU |
| 12 | */ |
| 13 | |
| 14 | #define CONFIG_SYS_CLK_FREQ 50000000 |
| 15 | #define CONFIG_SYS_RESET_ADDR 0x00000100 |
| 16 | |
| 17 | #define CONFIG_SYS_SDRAM_BASE 0x00000000 |
| 18 | #define CONFIG_SYS_SDRAM_SIZE 0x02000000 |
| 19 | |
| 20 | #define CONFIG_SYS_CACHELINE_SIZE 16 |
| 21 | |
| 22 | #define CONFIG_SYS_UART_BASE 0x90000000 |
| 23 | #define CONFIG_SYS_UART_FREQ CONFIG_SYS_CLK_FREQ |
| 24 | #define CONFIG_SYS_UART_BAUD 115200 |
| 25 | |
| 26 | #define CONFIG_BOARD_NAME "OpenRISC Generic" |
| 27 | |
| 28 | #define CONFIG_SYS_NO_FLASH |
| 29 | #define CONFIG_SYS_MAX_FLASH_SECT 0 |
| 30 | |
| 31 | /* |
| 32 | * SERIAL |
| 33 | */ |
| 34 | # define CONFIG_SYS_NS16550 |
| 35 | # define CONFIG_SYS_NS16550_SERIAL |
| 36 | # define CONFIG_SYS_NS16550_REG_SIZE 1 |
| 37 | # define CONFIG_CONS_INDEX 1 |
| 38 | # define CONFIG_SYS_NS16550_COM1 (0x90000000) |
| 39 | # define CONFIG_SYS_NS16550_CLK CONFIG_SYS_CLK_FREQ |
| 40 | |
| 41 | #define CONFIG_BAUDRATE CONFIG_SYS_UART_BAUD |
| 42 | #define CONFIG_SYS_BAUDRATE_TABLE {CONFIG_BAUDRATE} |
| 43 | #define CONFIG_SYS_CONSOLE_INFO_QUIET /* Suppress console info */ |
| 44 | #define CONSOLE_ARG "console=console=ttyS0,115200\0" |
| 45 | |
| 46 | /* |
| 47 | * Ethernet |
| 48 | */ |
| 49 | #define CONFIG_ETHOC |
| 50 | #define CONFIG_SYS_ETHOC_BASE 0x92000000 |
| 51 | |
| 52 | #define CONFIG_BOOTFILE "boot.img" |
| 53 | #define CONFIG_LOADADDR 0x100000 /* 1MB mark */ |
| 54 | |
| 55 | /* |
| 56 | * TIMER |
| 57 | */ |
Stefan Kristiansson | f179cc6 | 2011-11-26 19:04:55 +0000 | [diff] [blame] | 58 | #define CONFIG_SYS_OPENRISC_TMR_HZ 100 |
| 59 | |
| 60 | /* |
| 61 | * Memory organisation: |
| 62 | * |
| 63 | * RAM start --------------------------- |
| 64 | * | ... | |
| 65 | * --------------------------- |
| 66 | * | Stack | |
| 67 | * --------------------------- |
| 68 | * | Global data | |
| 69 | * --------------------------- |
| 70 | * | Environment | |
| 71 | * --------------------------- |
| 72 | * | Monitor | |
| 73 | * RAM end --------------------------- |
| 74 | */ |
| 75 | /* We're running in RAM */ |
| 76 | #define CONFIG_MONITOR_IS_IN_RAM |
| 77 | #define CONFIG_SYS_MONITOR_LEN 0x40000 /* Reserve 256k */ |
| 78 | #define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_SDRAM_BASE + \ |
| 79 | CONFIG_SYS_SDRAM_SIZE - \ |
| 80 | CONFIG_SYS_MONITOR_LEN) |
| 81 | |
| 82 | #define CONFIG_ENV_IS_NOWHERE |
| 83 | #define CONFIG_ENV_SIZE 0x20000 /* Total Size of Environment, 128KB */ |
| 84 | #define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - CONFIG_ENV_SIZE) |
| 85 | |
| 86 | /* |
| 87 | * Global data object and stack pointer |
| 88 | */ |
| 89 | #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_ENV_ADDR \ |
| 90 | - GENERATED_GBL_DATA_SIZE) |
| 91 | #define CONFIG_SYS_GBL_DATA_ADDR CONFIG_SYS_GBL_DATA_OFFSET |
| 92 | #define CONFIG_SYS_INIT_SP_ADDR CONFIG_SYS_GBL_DATA_OFFSET |
| 93 | #define CONFIG_SYS_INIT_SP_OFFSET CONFIG_SYS_GBL_DATA_OFFSET |
| 94 | #define CONFIG_SYS_STACK_LENGTH 0x10000 /* 64KB */ |
| 95 | #define CONFIG_SYS_MALLOC_LEN 0x400000 /* 4MB */ |
| 96 | #define CONFIG_SYS_MALLOC_BASE (CONFIG_SYS_INIT_SP_OFFSET \ |
| 97 | - CONFIG_SYS_STACK_LENGTH \ |
| 98 | - CONFIG_SYS_MALLOC_LEN) |
| 99 | /* |
| 100 | * MISC |
| 101 | */ |
| 102 | #define CONFIG_SYS_LONGHELP /* Provide extended help */ |
Stefan Kristiansson | f179cc6 | 2011-11-26 19:04:55 +0000 | [diff] [blame] | 103 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O buf size */ |
| 104 | #define CONFIG_SYS_MAXARGS 16 /* Max command args */ |
| 105 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Bootarg buf size */ |
| 106 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ |
| 107 | sizeof(CONFIG_SYS_PROMPT) + \ |
| 108 | 16) /* Print buf size */ |
| 109 | #define CONFIG_SYS_LOAD_ADDR CONFIG_SYS_SDRAM_BASE |
| 110 | #define CONFIG_SYS_MEMTEST_START (CONFIG_SYS_SDRAM_BASE + 0x2000) |
| 111 | #define CONFIG_SYS_MEMTEST_END (CONFIG_SYS_INIT_SP_ADDR - 0x20000) |
| 112 | #define CONFIG_CMDLINE_EDITING |
| 113 | |
| 114 | /* |
| 115 | * Command line configuration. |
| 116 | */ |
| 117 | #include <config_cmd_default.h> |
| 118 | |
| 119 | |
| 120 | #define CONFIG_CMD_IRQ |
| 121 | #define CONFIG_CMD_ELF |
| 122 | #define CONFIG_CMD_BSP |
| 123 | |
| 124 | #define CONFIG_CMD_MII |
| 125 | #define CONFIG_CMD_DHCP |
| 126 | #define CONFIG_CMD_PING |
| 127 | |
| 128 | #define CONFIG_OF_LIBFDT |
| 129 | #define CONFIG_LMB |
| 130 | |
| 131 | /* |
| 132 | * BOOTP options |
| 133 | */ |
| 134 | #define CONFIG_BOOTP_BOOTFILESIZE |
| 135 | #define CONFIG_BOOTP_BOOTPATH |
| 136 | #define CONFIG_BOOTP_GATEWAY |
| 137 | #define CONFIG_BOOTP_HOSTNAME |
| 138 | |
| 139 | |
| 140 | #endif /* __CONFIG_H */ |