Hugo Villeneuve | c7f879e | 2008-05-21 13:58:41 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2007 Sergey Kubushyn <ksi@koi8.net> |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU General Public License as |
| 6 | * published by the Free Software Foundation; either version 2 of |
| 7 | * the License, or (at your option) any later version. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software |
| 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
| 17 | * MA 02111-1307 USA |
| 18 | */ |
| 19 | |
| 20 | #ifndef __CONFIG_H |
| 21 | #define __CONFIG_H |
| 22 | #include <asm/sizes.h> |
| 23 | |
| 24 | /*=======*/ |
| 25 | /* Board */ |
| 26 | /*=======*/ |
| 27 | #define SFFSDR |
| 28 | #define CFG_NAND_LARGEPAGE |
| 29 | #define CFG_USE_NAND |
| 30 | /*===================*/ |
| 31 | /* SoC Configuration */ |
| 32 | /*===================*/ |
| 33 | #define CONFIG_ARM926EJS /* arm926ejs CPU core */ |
| 34 | #define CONFIG_SYS_CLK_FREQ 297000000 /* Arm Clock frequency */ |
| 35 | #define CFG_TIMERBASE 0x01c21400 /* use timer 0 */ |
| 36 | #define CFG_HZ_CLOCK 27000000 /* Timer Input clock freq */ |
| 37 | #define CFG_HZ 1000 |
| 38 | /*==================================================*/ |
| 39 | /* EEPROM definitions for Atmel 24LC64 EEPROM chip */ |
| 40 | /*==================================================*/ |
| 41 | #define CFG_I2C_EEPROM_ADDR_LEN 2 |
| 42 | #define CFG_I2C_EEPROM_ADDR 0x50 |
| 43 | #define CFG_EEPROM_PAGE_WRITE_BITS 5 |
| 44 | #define CFG_EEPROM_PAGE_WRITE_DELAY_MS 20 |
| 45 | /*=============*/ |
| 46 | /* Memory Info */ |
| 47 | /*=============*/ |
| 48 | #define CFG_MALLOC_LEN (0x10000 + 256*1024) /* malloc() len */ |
| 49 | #define CFG_GBL_DATA_SIZE 128 /* reserved for initial data */ |
| 50 | #define CFG_MEMTEST_START 0x80000000 /* memtest start address */ |
| 51 | #define CFG_MEMTEST_END 0x81000000 /* 16MB RAM test */ |
| 52 | #define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */ |
| 53 | #define CONFIG_STACKSIZE (256*1024) /* regular stack */ |
| 54 | #define PHYS_SDRAM_1 0x80000000 /* DDR Start */ |
| 55 | #define PHYS_SDRAM_1_SIZE 0x08000000 /* DDR size 128MB */ |
| 56 | #define DDR_4BANKS /* 4-bank DDR2 (128MB) */ |
| 57 | /*====================*/ |
| 58 | /* Serial Driver info */ |
| 59 | /*====================*/ |
| 60 | #define CFG_NS16550 |
| 61 | #define CFG_NS16550_SERIAL |
| 62 | #define CFG_NS16550_REG_SIZE 4 /* NS16550 register size */ |
| 63 | #define CFG_NS16550_COM1 0x01c20000 /* Base address of UART0 */ |
| 64 | #define CFG_NS16550_CLK 27000000 /* Input clock to NS16550 */ |
| 65 | #define CONFIG_CONS_INDEX 1 /* use UART0 for console */ |
| 66 | #define CONFIG_BAUDRATE 115200 /* Default baud rate */ |
| 67 | #define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } |
| 68 | /*===================*/ |
| 69 | /* I2C Configuration */ |
| 70 | /*===================*/ |
| 71 | #define CONFIG_HARD_I2C |
| 72 | #define CONFIG_DRIVER_DAVINCI_I2C |
| 73 | #define CFG_I2C_SPEED 80000 /* 100Kbps won't work, silicon bug */ |
| 74 | #define CFG_I2C_SLAVE 10 /* Bogus, master-only in U-Boot */ |
| 75 | /*==================================*/ |
| 76 | /* Network & Ethernet Configuration */ |
| 77 | /*==================================*/ |
| 78 | #define CONFIG_DRIVER_TI_EMAC |
| 79 | #define CONFIG_MII |
| 80 | #define CONFIG_BOOTP_DEFAULT |
| 81 | #define CONFIG_BOOTP_DNS |
| 82 | #define CONFIG_BOOTP_DNS2 |
| 83 | #define CONFIG_BOOTP_SEND_HOSTNAME |
| 84 | #define CONFIG_NET_RETRY_COUNT 10 |
| 85 | #define CONFIG_OVERWRITE_ETHADDR_ONCE |
| 86 | /*=====================*/ |
| 87 | /* Flash & Environment */ |
| 88 | /*=====================*/ |
| 89 | #undef CFG_ENV_IS_IN_FLASH |
| 90 | #define CFG_NO_FLASH |
| 91 | #define CFG_ENV_IS_IN_NAND /* U-Boot env in NAND Flash */ |
| 92 | #define CFG_ENV_SECT_SIZE 2048 /* Env sector Size */ |
| 93 | #define CFG_ENV_SIZE SZ_128K |
| 94 | #define CONFIG_SKIP_LOWLEVEL_INIT /* U-Boot is loaded by a bootloader */ |
| 95 | #define CONFIG_SKIP_RELOCATE_UBOOT /* to a proper address, init done */ |
| 96 | #define CFG_NAND_BASE 0x02000000 |
| 97 | #define CFG_NAND_HW_ECC |
| 98 | #define CFG_MAX_NAND_DEVICE 1 /* Max number of NAND devices */ |
| 99 | #define NAND_MAX_CHIPS 1 |
| 100 | #define CFG_ENV_OFFSET 0x0 /* Block 0--not used by bootcode */ |
| 101 | /*=====================*/ |
| 102 | /* Board related stuff */ |
| 103 | /*=====================*/ |
| 104 | /*==========================================*/ |
| 105 | /* I2C switch definitions for PCA9543 chip */ |
| 106 | /* on Lyrtech SFF SDR board. */ |
| 107 | /* This chip has a single register. */ |
| 108 | /*==========================================*/ |
| 109 | #define CFG_I2C_PCA9543_ADDR 0x70 |
| 110 | #define CFG_I2C_PCA9543_ADDR_LEN 0 |
| 111 | #define CFG_I2C_PCA9543_ENABLE_CH0 0x01 /* Enable channel 0. */ |
| 112 | /*==============================*/ |
| 113 | /* U-Boot general configuration */ |
| 114 | /*==============================*/ |
| 115 | #undef CONFIG_USE_IRQ /* No IRQ/FIQ in U-Boot */ |
| 116 | #define CONFIG_MISC_INIT_R |
| 117 | #undef CONFIG_BOOTDELAY |
| 118 | #define CONFIG_BOOTFILE "uImage" /* Boot file name */ |
| 119 | #define CFG_PROMPT "U-Boot > " /* Monitor Command Prompt */ |
| 120 | #define CFG_CBSIZE 1024 /* Console I/O Buffer Size */ |
| 121 | /* Print buffer size */ |
| 122 | #define CFG_PBSIZE (CFG_CBSIZE + sizeof(CFG_PROMPT) + 16) |
| 123 | #define CFG_MAXARGS 16 /* max number of command args */ |
| 124 | #define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */ |
| 125 | #define CFG_LOAD_ADDR 0x80700000 /* Default Linux kernel |
| 126 | * load address. */ |
| 127 | #define CONFIG_VERSION_VARIABLE |
| 128 | #define CONFIG_AUTO_COMPLETE /* Won't work with hush so far, |
| 129 | * may be later */ |
| 130 | #define CFG_HUSH_PARSER |
| 131 | #define CFG_PROMPT_HUSH_PS2 "> " |
| 132 | #define CONFIG_CMDLINE_EDITING |
| 133 | #define CFG_LONGHELP |
| 134 | #define CONFIG_CRC32_VERIFY |
| 135 | #define CONFIG_MX_CYCLIC |
| 136 | /* |
| 137 | * Define this to load an Integrity kernel. |
| 138 | * |
| 139 | #define CONFIG_CMD_ELF |
| 140 | */ |
| 141 | |
| 142 | /*===================*/ |
| 143 | /* Linux Information */ |
| 144 | /*===================*/ |
| 145 | #define LINUX_BOOT_PARAM_ADDR 0x80000100 |
| 146 | #define CONFIG_CMDLINE_TAG |
| 147 | #define CONFIG_SETUP_MEMORY_TAGS |
| 148 | #define CONFIG_BOOTARGS \ |
| 149 | "mem=56M console=ttyS0,115200n8 root=/dev/hda1 rw noinitrd ip=dhcp" |
| 150 | #define CONFIG_BOOTCOMMAND "setenv setboot setenv bootargs \\$(bootargs) video=dm64xxfb:output=\\$(videostd);run setboot" |
| 151 | |
| 152 | /*=================*/ |
| 153 | /* U-Boot commands */ |
| 154 | /*=================*/ |
| 155 | #include <config_cmd_default.h> |
| 156 | #define CONFIG_CMD_ASKENV |
| 157 | #define CONFIG_CMD_DHCP |
| 158 | #define CONFIG_CMD_DIAG |
| 159 | #define CONFIG_CMD_I2C |
| 160 | #define CONFIG_CMD_MII |
| 161 | #define CONFIG_CMD_PING |
| 162 | #define CONFIG_CMD_SAVES |
| 163 | #define CONFIG_CMD_NAND |
| 164 | #define CONFIG_CMD_EEPROM |
| 165 | #undef CONFIG_CMD_BDI |
| 166 | #undef CONFIG_CMD_FPGA |
| 167 | #undef CONFIG_CMD_SETGETDCR |
| 168 | #undef CONFIG_CMD_FLASH |
| 169 | #undef CONFIG_CMD_IMLS |
| 170 | /*=======================*/ |
| 171 | /* KGDB support (if any) */ |
| 172 | /*=======================*/ |
| 173 | #ifdef CONFIG_CMD_KGDB |
| 174 | #define CONFIG_KGDB_BAUDRATE 115200 /* speed to run kgdb serial port */ |
| 175 | #define CONFIG_KGDB_SER_INDEX 1 /* which serial port to use */ |
| 176 | #endif |
| 177 | #endif /* __CONFIG_H */ |