Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 1 | /* |
| 2 | * U-boot - Configuration file for BF537 STAMP board |
| 3 | */ |
| 4 | |
| 5 | #ifndef __CONFIG_BF537_H__ |
| 6 | #define __CONFIG_BF537_H__ |
| 7 | |
Mike Frysinger | f7ce12c | 2008-02-18 05:26:48 -0500 | [diff] [blame] | 8 | #include <asm/blackfin-config-pre.h> |
| 9 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 10 | #define CONFIG_SYS_LONGHELP 1 |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 11 | #define CONFIG_CMDLINE_EDITING 1 |
| 12 | #define CONFIG_BAUDRATE 57600 |
| 13 | /* Set default serial console for bf537 */ |
| 14 | #define CONFIG_UART_CONSOLE 0 |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 15 | #define CONFIG_BOOTDELAY 5 |
| 16 | /* define CONFIG_BF537_STAMP_LEDCMD to enable LED command*/ |
| 17 | /*#define CONFIG_BF537_STAMP_LEDCMD 1*/ |
| 18 | |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 19 | #define CONFIG_PANIC_HANG 1 |
| 20 | |
Mike Frysinger | f7ce12c | 2008-02-18 05:26:48 -0500 | [diff] [blame] | 21 | #define CONFIG_BFIN_CPU bf537-0.2 |
Mike Frysinger | 9171fc8 | 2008-03-30 15:46:13 -0400 | [diff] [blame] | 22 | #define CONFIG_BFIN_BOOT_MODE BFIN_BOOT_BYPASS |
| 23 | |
Mike Frysinger | f7ce12c | 2008-02-18 05:26:48 -0500 | [diff] [blame] | 24 | #define CONFIG_BFIN_MAC |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 25 | |
| 26 | /* This sets the default state of the cache on U-Boot's boot */ |
| 27 | #define CONFIG_ICACHE_ON |
| 28 | #define CONFIG_DCACHE_ON |
| 29 | |
| 30 | /* Define if want to do post memory test */ |
| 31 | #undef CONFIG_POST_TEST |
| 32 | |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 33 | #define CONFIG_RTC_BFIN 1 |
| 34 | #define CONFIG_BOOT_RETRY_TIME -1 /* Enable this if bootretry required, currently its disabled */ |
| 35 | |
| 36 | /* CONFIG_CLKIN_HZ is any value in Hz */ |
| 37 | #define CONFIG_CLKIN_HZ 25000000 |
| 38 | /* CONFIG_CLKIN_HALF controls what is passed to PLL 0=CLKIN */ |
| 39 | /* 1=CLKIN/2 */ |
| 40 | #define CONFIG_CLKIN_HALF 0 |
| 41 | /* CONFIG_PLL_BYPASS controls if the PLL is used 0=don't bypass */ |
| 42 | /* 1=bypass PLL*/ |
| 43 | #define CONFIG_PLL_BYPASS 0 |
| 44 | /* CONFIG_VCO_MULT controls what the multiplier of the PLL is. */ |
| 45 | /* Values can range from 1-64 */ |
| 46 | #define CONFIG_VCO_MULT 20 |
| 47 | /* CONFIG_CCLK_DIV controls what the core clock divider is */ |
| 48 | /* Values can be 1, 2, 4, or 8 ONLY */ |
| 49 | #define CONFIG_CCLK_DIV 1 |
| 50 | /* CONFIG_SCLK_DIV controls what the peripheral clock divider is*/ |
| 51 | /* Values can range from 1-15 */ |
| 52 | #define CONFIG_SCLK_DIV 5 |
| 53 | /* CONFIG_SPI_BAUD controls the SPI peripheral clock divider */ |
| 54 | /* Values can range from 2-65535 */ |
| 55 | /* SCK Frequency = SCLK / (2 * CONFIG_SPI_BAUD) */ |
| 56 | #define CONFIG_SPI_BAUD 2 |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 57 | #define CONFIG_SPI_BAUD_INITBLOCK 4 |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 58 | |
| 59 | #if ( CONFIG_CLKIN_HALF == 0 ) |
| 60 | #define CONFIG_VCO_HZ ( CONFIG_CLKIN_HZ * CONFIG_VCO_MULT ) |
| 61 | #else |
| 62 | #define CONFIG_VCO_HZ (( CONFIG_CLKIN_HZ * CONFIG_VCO_MULT ) / 2 ) |
| 63 | #endif |
| 64 | |
| 65 | #if (CONFIG_PLL_BYPASS == 0) |
| 66 | #define CONFIG_CCLK_HZ ( CONFIG_VCO_HZ / CONFIG_CCLK_DIV ) |
| 67 | #define CONFIG_SCLK_HZ ( CONFIG_VCO_HZ / CONFIG_SCLK_DIV ) |
| 68 | #else |
| 69 | #define CONFIG_CCLK_HZ CONFIG_CLKIN_HZ |
| 70 | #define CONFIG_SCLK_HZ CONFIG_CLKIN_HZ |
| 71 | #endif |
| 72 | |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 73 | #define CONFIG_MEM_SIZE 64 /* 128, 64, 32, 16 */ |
| 74 | #define CONFIG_MEM_ADD_WDTH 10 /* 8, 9, 10, 11 */ |
| 75 | #define CONFIG_MEM_MT48LC32M8A2_75 1 |
| 76 | |
| 77 | #define CONFIG_LOADS_ECHO 1 |
| 78 | |
| 79 | /* |
| 80 | * rarpb, bootp or dhcp commands will perform only a |
| 81 | * configuration lookup from the BOOTP/DHCP server |
| 82 | * but not try to load any image using TFTP |
| 83 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 84 | #define CONFIG_SYS_AUTOLOAD "no" |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 85 | |
| 86 | /* |
| 87 | * Network Settings |
| 88 | */ |
| 89 | /* network support */ |
Mike Frysinger | f7ce12c | 2008-02-18 05:26:48 -0500 | [diff] [blame] | 90 | #ifdef CONFIG_BFIN_MAC |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 91 | #define CONFIG_IPADDR 192.168.0.15 |
| 92 | #define CONFIG_NETMASK 255.255.255.0 |
| 93 | #define CONFIG_GATEWAYIP 192.168.0.1 |
| 94 | #define CONFIG_SERVERIP 192.168.0.2 |
| 95 | #define CONFIG_HOSTNAME BF537 |
| 96 | #endif |
| 97 | |
| 98 | #define CONFIG_ROOTPATH /romfs |
| 99 | /* Uncomment next line to use fixed MAC address */ |
| 100 | /* #define CONFIG_ETHADDR 02:80:ad:20:31:e8 */ |
| 101 | /* This is the routine that copies the MAC in Flash to the 'ethaddr' setting */ |
| 102 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 103 | #define CONFIG_SYS_LONGHELP 1 |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 104 | #define CONFIG_BOOTDELAY 5 |
| 105 | #define CONFIG_BOOT_RETRY_TIME -1 /* Enable this if bootretry required, currently its disabled */ |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 106 | #define CONFIG_BOOTCOMMAND "run ramboot" |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 107 | |
Mike Frysinger | 9171fc8 | 2008-03-30 15:46:13 -0400 | [diff] [blame] | 108 | #if defined(CONFIG_POST_TEST) |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 109 | /* POST support */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 110 | #define CONFIG_POST ( CONFIG_SYS_POST_MEMORY | \ |
| 111 | CONFIG_SYS_POST_UART | \ |
| 112 | CONFIG_SYS_POST_FLASH | \ |
| 113 | CONFIG_SYS_POST_ETHER | \ |
| 114 | CONFIG_SYS_POST_LED | \ |
| 115 | CONFIG_SYS_POST_BUTTON) |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 116 | #else |
| 117 | #undef CONFIG_POST |
| 118 | #endif |
| 119 | |
| 120 | #ifdef CONFIG_POST |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 121 | #define FLASH_START_POST_BLOCK 11 /* Should > = 11 */ |
| 122 | #define FLASH_END_POST_BLOCK 71 /* Should < = 71 */ |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 123 | #endif |
| 124 | |
| 125 | /* CF-CARD IDE-HDD Support */ |
| 126 | |
| 127 | /* #define CONFIG_BFIN_TRUE_IDE */ /* Add CF flash card support */ |
| 128 | /* #define CONFIG_BFIN_CF_IDE */ /* Add CF flash card support */ |
| 129 | /* #define CONFIG_BFIN_HDD_IDE */ /* Add IDE Disk Drive (HDD) support */ |
| 130 | |
| 131 | #if defined(CONFIG_BFIN_CF_IDE) || defined(CONFIG_BFIN_HDD_IDE) || defined(CONFIG_BFIN_TRUE_IDE) |
| 132 | # define CONFIG_BFIN_IDE 1 |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 133 | #endif |
| 134 | |
| 135 | /*#define CONFIG_BF537_NAND */ /* Add nand flash support */ |
| 136 | |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 137 | #define CONFIG_NETCONSOLE 1 |
| 138 | #define CONFIG_NET_MULTI 1 |
| 139 | |
Jon Loeliger | ba2351f | 2007-07-04 22:31:49 -0500 | [diff] [blame] | 140 | /* |
Jon Loeliger | 079a136 | 2007-07-10 10:12:10 -0500 | [diff] [blame] | 141 | * BOOTP options |
| 142 | */ |
| 143 | #define CONFIG_BOOTP_BOOTFILESIZE |
| 144 | #define CONFIG_BOOTP_BOOTPATH |
| 145 | #define CONFIG_BOOTP_GATEWAY |
| 146 | #define CONFIG_BOOTP_HOSTNAME |
| 147 | |
| 148 | |
| 149 | /* |
Jon Loeliger | ba2351f | 2007-07-04 22:31:49 -0500 | [diff] [blame] | 150 | * Command line configuration. |
| 151 | */ |
| 152 | #include <config_cmd_default.h> |
| 153 | |
Jon Loeliger | ba2351f | 2007-07-04 22:31:49 -0500 | [diff] [blame] | 154 | #define CONFIG_CMD_ELF |
| 155 | #define CONFIG_CMD_I2C |
| 156 | #define CONFIG_CMD_CACHE |
| 157 | #define CONFIG_CMD_JFFS2 |
| 158 | #define CONFIG_CMD_EEPROM |
| 159 | #define CONFIG_CMD_DATE |
| 160 | |
Mike Frysinger | f7ce12c | 2008-02-18 05:26:48 -0500 | [diff] [blame] | 161 | #ifndef CONFIG_BFIN_MAC |
Jon Loeliger | ba2351f | 2007-07-04 22:31:49 -0500 | [diff] [blame] | 162 | #undef CONFIG_CMD_NET |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 163 | #else |
Jon Loeliger | ba2351f | 2007-07-04 22:31:49 -0500 | [diff] [blame] | 164 | #define CONFIG_CMD_PING |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 165 | #endif |
| 166 | |
Jon Loeliger | ba2351f | 2007-07-04 22:31:49 -0500 | [diff] [blame] | 167 | #if defined(CONFIG_BFIN_CF_IDE) \ |
| 168 | || defined(CONFIG_BFIN_HDD_IDE) \ |
| 169 | || defined(CONFIG_BFIN_TRUE_IDE) |
| 170 | #define CONFIG_CMD_IDE |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 171 | #endif |
| 172 | |
Jon Loeliger | ba2351f | 2007-07-04 22:31:49 -0500 | [diff] [blame] | 173 | #define CONFIG_CMD_DHCP |
Jon Loeliger | af075ee | 2007-07-08 17:02:01 -0500 | [diff] [blame] | 174 | |
| 175 | #if defined(CONFIG_POST) |
| 176 | #define CONFIG_CMD_DIAG |
| 177 | #endif |
Jon Loeliger | ba2351f | 2007-07-04 22:31:49 -0500 | [diff] [blame] | 178 | |
| 179 | #ifdef CONFIG_BF537_NAND |
| 180 | #define CONFIG_CMD_NAND |
| 181 | #endif |
| 182 | |
Jon Loeliger | ba2351f | 2007-07-04 22:31:49 -0500 | [diff] [blame] | 183 | |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 184 | #define CONFIG_BOOTARGS "root=/dev/mtdblock0 rw console=ttyBF0,57600" |
| 185 | #define CONFIG_LOADADDR 0x1000000 |
| 186 | |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 187 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 188 | "ramargs=setenv bootargs root=/dev/mtdblock0 rw console=ttyBF0,57600\0" \ |
| 189 | "nfsargs=setenv bootargs root=/dev/nfs rw " \ |
| 190 | "nfsroot=$(serverip):$(rootpath) console=ttyBF0,57600\0"\ |
| 191 | "addip=setenv bootargs $(bootargs) " \ |
| 192 | "ip=$(ipaddr):$(serverip):$(gatewayip):$(netmask)" \ |
| 193 | ":$(hostname):eth0:off\0" \ |
| 194 | "ramboot=tftpboot $(loadaddr) linux;" \ |
| 195 | "run ramargs;run addip;bootelf\0" \ |
| 196 | "nfsboot=tftpboot $(loadaddr) linux;" \ |
| 197 | "run nfsargs;run addip;bootelf\0" \ |
| 198 | "flashboot=bootm 0x20100000\0" \ |
| 199 | "update=tftpboot $(loadaddr) u-boot.bin;" \ |
| 200 | "protect off 0x20000000 0x2007FFFF;" \ |
| 201 | "erase 0x20000000 0x2007FFFF;cp.b 0x1000000 0x20000000 $(filesize)\0" \ |
| 202 | "" |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 203 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 204 | #define CONFIG_SYS_PROMPT "bfin> " /* Monitor Command Prompt */ |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 205 | |
Jon Loeliger | ba2351f | 2007-07-04 22:31:49 -0500 | [diff] [blame] | 206 | #if defined(CONFIG_CMD_KGDB) |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 207 | #define CONFIG_SYS_CBSIZE 1024 /* Console I/O Buffer Size */ |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 208 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 209 | #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 210 | #endif |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 211 | #define CONFIG_SYS_MAX_RAM_SIZE (CONFIG_MEM_SIZE * 1024*1024) |
| 212 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE+sizeof(CONFIG_SYS_PROMPT)+16) /* Print Buffer Size */ |
| 213 | #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ |
| 214 | #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */ |
| 215 | #define CONFIG_SYS_MEMTEST_START 0x0 /* memtest works on */ |
| 216 | #define CONFIG_SYS_MEMTEST_END ( (CONFIG_MEM_SIZE - 1) * 1024*1024) /* 1 ... 63 MB in DRAM */ |
| 217 | #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR /* default load address */ |
| 218 | #define CONFIG_SYS_HZ 1000 /* decrementer freq: 10 ms ticks */ |
| 219 | #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } |
| 220 | #define CONFIG_SYS_SDRAM_BASE 0x00000000 |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 221 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 222 | #define CONFIG_SYS_FLASH_BASE 0x20000000 |
| 223 | #define CONFIG_SYS_FLASH_CFI /* The flash is CFI compatible */ |
Jean-Christophe PLAGNIOL-VILLARD | 00b1883 | 2008-08-13 01:40:42 +0200 | [diff] [blame] | 224 | #define CONFIG_FLASH_CFI_DRIVER /* Use common CFI driver */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 225 | #define CONFIG_SYS_FLASH_PROTECTION |
| 226 | #define CONFIG_SYS_MAX_FLASH_BANKS 1 |
| 227 | #define CONFIG_SYS_MAX_FLASH_SECT 71 /* some have 67 sectors (M29W320DB), but newer have 71 (M29W320EB) */ |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 228 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 229 | #define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */ |
| 230 | #define CONFIG_SYS_MONITOR_BASE (CONFIG_SYS_MAX_RAM_SIZE - CONFIG_SYS_MONITOR_LEN) |
| 231 | #define CONFIG_SYS_MALLOC_LEN (128 << 10) /* Reserve 128 kB for malloc() */ |
| 232 | #define CONFIG_SYS_MALLOC_BASE (CONFIG_SYS_MONITOR_BASE - CONFIG_SYS_MALLOC_LEN) |
| 233 | #define CONFIG_SYS_GBL_DATA_SIZE 0x4000 |
| 234 | #define CONFIG_SYS_GBL_DATA_ADDR (CONFIG_SYS_MALLOC_BASE - CONFIG_SYS_GBL_DATA_SIZE) |
| 235 | #define CONFIG_STACKBASE (CONFIG_SYS_GBL_DATA_ADDR - 4) |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 236 | |
Mike Frysinger | 9171fc8 | 2008-03-30 15:46:13 -0400 | [diff] [blame] | 237 | #if (CONFIG_BFIN_BOOT_MODE == BFIN_BOOT_SPI_MASTER) |
Jean-Christophe PLAGNIOL-VILLARD | bb1f8b4 | 2008-09-05 09:19:30 +0200 | [diff] [blame] | 238 | #define CONFIG_ENV_IS_IN_EEPROM 1 |
Jean-Christophe PLAGNIOL-VILLARD | 0e8d158 | 2008-09-10 22:48:06 +0200 | [diff] [blame] | 239 | #define CONFIG_ENV_OFFSET 0x4000 |
| 240 | #define CONFIG_ENV_HEADER (CONFIG_ENV_OFFSET + 0x16e) /* 0x12A is the length of LDR file header */ |
Mike Frysinger | 9171fc8 | 2008-03-30 15:46:13 -0400 | [diff] [blame] | 241 | #else |
Jean-Christophe PLAGNIOL-VILLARD | 5a1aceb | 2008-09-10 22:48:04 +0200 | [diff] [blame] | 242 | #define CONFIG_ENV_IS_IN_FLASH 1 |
Jean-Christophe PLAGNIOL-VILLARD | 0e8d158 | 2008-09-10 22:48:06 +0200 | [diff] [blame] | 243 | #define CONFIG_ENV_ADDR 0x20004000 |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 244 | #define CONFIG_ENV_OFFSET (CONFIG_ENV_ADDR - CONFIG_SYS_FLASH_BASE) |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 245 | #endif |
Jean-Christophe PLAGNIOL-VILLARD | 0e8d158 | 2008-09-10 22:48:06 +0200 | [diff] [blame] | 246 | #define CONFIG_ENV_SIZE 0x2000 |
| 247 | #define CONFIG_ENV_SECT_SIZE 0x2000 /* Total Size of Environment Sector */ |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 248 | #define ENV_IS_EMBEDDED |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 249 | |
| 250 | /* JFFS Partition offset set */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 251 | #define CONFIG_SYS_JFFS2_FIRST_BANK 0 |
| 252 | #define CONFIG_SYS_JFFS2_NUM_BANKS 1 |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 253 | /* 512k reserved for u-boot */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 254 | #define CONFIG_SYS_JFFS2_FIRST_SECTOR 15 |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 255 | |
| 256 | #define CONFIG_SPI |
| 257 | |
| 258 | /* |
| 259 | * Stack sizes |
| 260 | */ |
| 261 | #define CONFIG_STACKSIZE (128*1024) /* regular stack */ |
| 262 | |
| 263 | #define POLL_MODE 1 |
| 264 | #define FLASH_TOT_SECT 71 |
| 265 | #define FLASH_SIZE 0x400000 |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 266 | #define CONFIG_SYS_FLASH_SIZE 0x400000 |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 267 | |
| 268 | /* |
| 269 | * Board NAND Infomation |
| 270 | */ |
| 271 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 272 | #define CONFIG_SYS_NAND_ADDR 0x20212000 |
| 273 | #define CONFIG_SYS_NAND_BASE CONFIG_SYS_NAND_ADDR |
| 274 | #define CONFIG_SYS_MAX_NAND_DEVICE 1 |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 275 | #define SECTORSIZE 512 |
| 276 | #define ADDR_COLUMN 1 |
| 277 | #define ADDR_PAGE 2 |
| 278 | #define ADDR_COLUMN_PAGE 3 |
| 279 | #define NAND_ChipID_UNKNOWN 0x00 |
| 280 | #define NAND_MAX_FLOORS 1 |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 281 | #define BFIN_NAND_READY PF3 |
| 282 | |
Wolfgang Denk | 53677ef | 2008-05-20 16:00:29 +0200 | [diff] [blame] | 283 | #define NAND_WAIT_READY(nand) \ |
| 284 | do { \ |
| 285 | int timeout = 0; \ |
| 286 | while(!(*pPORTFIO & PF3)) \ |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 287 | if (timeout++ > 100000) \ |
| 288 | break; \ |
| 289 | } while (0) |
| 290 | |
| 291 | #define BFIN_NAND_CLE (1<<2) /* A2 -> Command Enable */ |
| 292 | #define BFIN_NAND_ALE (1<<1) /* A1 -> Address Enable */ |
| 293 | |
| 294 | #define WRITE_NAND_COMMAND(d, adr) do{ *(volatile __u8 *)((unsigned long)adr | BFIN_NAND_CLE) = (__u8)(d); } while(0) |
| 295 | #define WRITE_NAND_ADDRESS(d, adr) do{ *(volatile __u8 *)((unsigned long)adr | BFIN_NAND_ALE) = (__u8)(d); } while(0) |
| 296 | #define WRITE_NAND(d, adr) do{ *(volatile __u8 *)((unsigned long)adr) = (__u8)d; } while(0) |
| 297 | #define READ_NAND(adr) ((volatile unsigned char)(*(volatile __u8 *)(unsigned long)adr)) |
| 298 | |
| 299 | /* |
| 300 | * Initialize PSD4256 registers for using I2C |
| 301 | */ |
| 302 | #define CONFIG_MISC_INIT_R |
| 303 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 304 | #define CONFIG_SYS_BOOTM_LEN 0x4000000 /* Large Image Length, set to 64 Meg */ |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 305 | |
| 306 | /* |
| 307 | * I2C settings |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 308 | */ |
Mike Frysinger | be853bf | 2008-10-06 04:16:47 -0400 | [diff] [blame] | 309 | #define CONFIG_HARD_I2C 1 |
| 310 | #define CONFIG_BFIN_TWI_I2C 1 |
| 311 | #define CFG_I2C_SPEED 50000 |
| 312 | #define CFG_I2C_SLAVE 0 |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 313 | |
Mike Frysinger | 9171fc8 | 2008-03-30 15:46:13 -0400 | [diff] [blame] | 314 | #define CONFIG_EBIU_SDRRC_VAL 0x306 |
| 315 | #define CONFIG_EBIU_SDGCTL_VAL 0x91114d |
| 316 | #define CONFIG_EBIU_SDBCTL_VAL 0x25 |
| 317 | |
| 318 | #define CONFIG_EBIU_AMGCTL_VAL 0xFF |
| 319 | #define CONFIG_EBIU_AMBCTL0_VAL 0x7BB07BB0 |
| 320 | #define CONFIG_EBIU_AMBCTL1_VAL 0xFFC27BB0 |
| 321 | |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 322 | /* 0xFF, 0x7BB07BB0, 0x22547BB0 */ |
| 323 | /* #define AMGCTLVAL (AMBEN_P0 | AMBEN_P1 | AMBEN_P2 | AMCKEN) |
| 324 | #define AMBCTL0VAL (B1WAT_7 | B1RAT_11 | B1HT_2 | B1ST_3 | B1TT_4 | ~B1RDYPOL | \ |
| 325 | ~B1RDYEN | B0WAT_7 | B0RAT_11 | B0HT_2 | B0ST_3 | B0TT_4 | ~B0RDYPOL | ~B0RDYEN) |
| 326 | #define AMBCTL1VAL (B3WAT_2 | B3RAT_2 | B3HT_1 | B3ST_1 | B3TT_4 | B3RDYPOL | ~B3RDYEN | \ |
| 327 | B2WAT_7 | B2RAT_11 | B2HT_2 | B2ST_3 | B2TT_4 | ~B2RDYPOL | ~B2RDYEN) |
| 328 | */ |
| 329 | |
| 330 | #define AMGCTLVAL 0xFF |
| 331 | #define AMBCTL0VAL 0x7BB07BB0 |
| 332 | #define AMBCTL1VAL 0xFFC27BB0 |
| 333 | |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 334 | #if defined(CONFIG_BFIN_IDE) |
| 335 | |
| 336 | #define CONFIG_DOS_PARTITION 1 |
| 337 | /* |
| 338 | * IDE/ATA stuff |
| 339 | */ |
| 340 | #undef CONFIG_IDE_8xx_DIRECT /* no pcmcia interface required */ |
| 341 | #undef CONFIG_IDE_LED /* no led for ide supported */ |
| 342 | #undef CONFIG_IDE_RESET /* no reset for ide supported */ |
| 343 | |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 344 | #define CONFIG_SYS_IDE_MAXBUS 1 /* max. 1 IDE busses */ |
| 345 | #define CONFIG_SYS_IDE_MAXDEVICE (CONFIG_SYS_IDE_MAXBUS*1) /* max. 1 drives per IDE bus */ |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 346 | |
| 347 | #undef AMBCTL1VAL |
| 348 | #define AMBCTL1VAL 0xFFC3FFC3 |
| 349 | |
| 350 | #define CONFIG_CF_ATASEL_DIS 0x20311800 |
| 351 | #define CONFIG_CF_ATASEL_ENA 0x20311802 |
| 352 | |
| 353 | #if defined(CONFIG_BFIN_TRUE_IDE) |
| 354 | /* |
| 355 | * Note that these settings aren't for the most part used in include/ata.h |
| 356 | * when all of the ATA registers are setup |
| 357 | */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 358 | #define CONFIG_SYS_ATA_BASE_ADDR 0x2031C000 |
| 359 | #define CONFIG_SYS_ATA_IDE0_OFFSET 0x0000 |
| 360 | #define CONFIG_SYS_ATA_DATA_OFFSET 0x0020 /* Offset for data I/O */ |
| 361 | #define CONFIG_SYS_ATA_REG_OFFSET 0x0020 /* Offset for normal register accesses */ |
| 362 | #define CONFIG_SYS_ATA_ALT_OFFSET 0x001C /* Offset for alternate registers */ |
| 363 | #define CONFIG_SYS_ATA_STRIDE 2 /* CF.A0 --> Blackfin.Ax */ |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 364 | #endif /* CONFIG_BFIN_TRUE_IDE */ |
| 365 | |
| 366 | #if defined(CONFIG_BFIN_CF_IDE) /* USE CompactFlash Storage Card in the common memory space */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 367 | #define CONFIG_SYS_ATA_BASE_ADDR 0x20211800 |
| 368 | #define CONFIG_SYS_ATA_IDE0_OFFSET 0x0000 |
| 369 | #define CONFIG_SYS_ATA_DATA_OFFSET 0x0000 /* Offset for data I/O */ |
| 370 | #define CONFIG_SYS_ATA_REG_OFFSET 0x0000 /* Offset for normal register accesses */ |
| 371 | #define CONFIG_SYS_ATA_ALT_OFFSET 0x000E /* Offset for alternate registers */ |
| 372 | #define CONFIG_SYS_ATA_STRIDE 1 /* CF.A0 --> Blackfin.Ax */ |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 373 | #endif /* CONFIG_BFIN_CF_IDE */ |
| 374 | |
| 375 | #if defined(CONFIG_BFIN_HDD_IDE) /* USE TRUE IDE */ |
Jean-Christophe PLAGNIOL-VILLARD | 6d0f6bc | 2008-10-16 15:01:15 +0200 | [diff] [blame] | 376 | #define CONFIG_SYS_ATA_BASE_ADDR 0x20314000 |
| 377 | #define CONFIG_SYS_ATA_IDE0_OFFSET 0x0000 |
| 378 | #define CONFIG_SYS_ATA_DATA_OFFSET 0x0020 /* Offset for data I/O */ |
| 379 | #define CONFIG_SYS_ATA_REG_OFFSET 0x0020 /* Offset for normal register accesses */ |
| 380 | #define CONFIG_SYS_ATA_ALT_OFFSET 0x001C /* Offset for alternate registers */ |
| 381 | #define CONFIG_SYS_ATA_STRIDE 2 /* CF.A0 --> Blackfin.A1 */ |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 382 | |
| 383 | #undef CONFIG_SCLK_DIV |
| 384 | #define CONFIG_SCLK_DIV 8 |
| 385 | #endif /* CONFIG_BFIN_HDD_IDE */ |
| 386 | |
| 387 | #endif /*CONFIG_BFIN_IDE */ |
| 388 | |
Mike Frysinger | 9171fc8 | 2008-03-30 15:46:13 -0400 | [diff] [blame] | 389 | #include <asm/blackfin-config-post.h> |
| 390 | |
Aubrey Li | 26bf7de | 2007-03-19 01:24:52 +0800 | [diff] [blame] | 391 | #endif |