wdenk | 1cb8e98 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2002 |
| 3 | * Sysgo Real-Time Solutions, GmbH <www.elinos.com> |
| 4 | * Marius Groeger <mgroeger@sysgo.de> |
| 5 | * |
| 6 | * (C) Copyright 2002 |
| 7 | * David Mueller, ELSOFT AG, <d.mueller@elsoft.ch> |
| 8 | * |
| 9 | * See file CREDITS for list of people who contributed to this |
| 10 | * project. |
| 11 | * |
| 12 | * This program is free software; you can redistribute it and/or |
| 13 | * modify it under the terms of the GNU General Public License as |
| 14 | * published by the Free Software Foundation; either version 2 of |
| 15 | * the License, or (at your option) any later version. |
| 16 | * |
| 17 | * This program is distributed in the hope that it will be useful, |
| 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 20 | * GNU General Public License for more details. |
| 21 | * |
| 22 | * You should have received a copy of the GNU General Public License |
| 23 | * along with this program; if not, write to the Free Software |
| 24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
| 25 | * MA 02111-1307 USA |
| 26 | */ |
| 27 | |
| 28 | #include <common.h> |
Ben Warren | b1c0eaa | 2009-08-25 13:09:37 -0700 | [diff] [blame] | 29 | #include <netdev.h> |
kevin.morfitt@fearnside-systems.co.uk | ac67804 | 2009-11-17 18:30:34 +0900 | [diff] [blame] | 30 | #include <asm/arch/s3c24x0_cpu.h> |
Jean-Christophe PLAGNIOL-VILLARD | 28c3450 | 2009-05-16 12:14:56 +0200 | [diff] [blame] | 31 | #include <stdio_dev.h> |
wdenk | 1cb8e98 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 32 | #include <i2c.h> |
| 33 | |
| 34 | #include "vcma9.h" |
| 35 | #include "../common/common_util.h" |
| 36 | |
Wolfgang Denk | d87080b | 2006-03-31 18:32:53 +0200 | [diff] [blame] | 37 | DECLARE_GLOBAL_DATA_PTR; |
wdenk | 1cb8e98 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 38 | |
| 39 | #define FCLK_SPEED 1 |
| 40 | |
| 41 | #if FCLK_SPEED==0 /* Fout = 203MHz, Fin = 12MHz for Audio */ |
| 42 | #define M_MDIV 0xC3 |
| 43 | #define M_PDIV 0x4 |
| 44 | #define M_SDIV 0x1 |
| 45 | #elif FCLK_SPEED==1 /* Fout = 202.8MHz */ |
| 46 | #define M_MDIV 0xA1 |
| 47 | #define M_PDIV 0x3 |
| 48 | #define M_SDIV 0x1 |
| 49 | #endif |
| 50 | |
| 51 | #define USB_CLOCK 1 |
| 52 | |
| 53 | #if USB_CLOCK==0 |
| 54 | #define U_M_MDIV 0xA1 |
| 55 | #define U_M_PDIV 0x3 |
| 56 | #define U_M_SDIV 0x1 |
| 57 | #elif USB_CLOCK==1 |
| 58 | #define U_M_MDIV 0x48 |
| 59 | #define U_M_PDIV 0x3 |
| 60 | #define U_M_SDIV 0x2 |
| 61 | #endif |
| 62 | |
| 63 | static inline void delay(unsigned long loops) |
| 64 | { |
| 65 | __asm__ volatile ("1:\n" |
| 66 | "subs %0, %1, #1\n" |
| 67 | "bne 1b":"=r" (loops):"0" (loops)); |
| 68 | } |
| 69 | |
| 70 | /* |
| 71 | * Miscellaneous platform dependent initialisations |
| 72 | */ |
| 73 | |
| 74 | int board_init(void) |
| 75 | { |
kevin.morfitt@fearnside-systems.co.uk | eb0ae7f | 2009-10-10 13:33:11 +0900 | [diff] [blame] | 76 | struct s3c24x0_clock_power * const clk_power = |
| 77 | s3c24x0_get_base_clock_power(); |
| 78 | struct s3c24x0_gpio * const gpio = s3c24x0_get_base_gpio(); |
wdenk | 1cb8e98 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 79 | |
| 80 | /* to reduce PLL lock time, adjust the LOCKTIME register */ |
C Nauman | d9abba8 | 2010-10-26 23:04:31 +0900 | [diff] [blame] | 81 | clk_power->locktime = 0xFFFFFF; |
wdenk | 1cb8e98 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 82 | |
| 83 | /* configure MPLL */ |
C Nauman | d9abba8 | 2010-10-26 23:04:31 +0900 | [diff] [blame] | 84 | clk_power->mpllcon = ((M_MDIV << 12) + (M_PDIV << 4) + M_SDIV); |
wdenk | 1cb8e98 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 85 | |
| 86 | /* some delay between MPLL and UPLL */ |
| 87 | delay (4000); |
| 88 | |
| 89 | /* configure UPLL */ |
C Nauman | d9abba8 | 2010-10-26 23:04:31 +0900 | [diff] [blame] | 90 | clk_power->upllcon = ((U_M_MDIV << 12) + (U_M_PDIV << 4) + U_M_SDIV); |
wdenk | 1cb8e98 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 91 | |
| 92 | /* some delay between MPLL and UPLL */ |
| 93 | delay (8000); |
| 94 | |
| 95 | /* set up the I/O ports */ |
C Nauman | d9abba8 | 2010-10-26 23:04:31 +0900 | [diff] [blame] | 96 | gpio->gpacon = 0x007FFFFF; |
| 97 | gpio->gpbcon = 0x002AAAAA; |
| 98 | gpio->gpbup = 0x000002BF; |
| 99 | gpio->gpccon = 0xAAAAAAAA; |
| 100 | gpio->gpcup = 0x0000FFFF; |
| 101 | gpio->gpdcon = 0xAAAAAAAA; |
| 102 | gpio->gpdup = 0x0000FFFF; |
| 103 | gpio->gpecon = 0xAAAAAAAA; |
| 104 | gpio->gpeup = 0x000037F7; |
| 105 | gpio->gpfcon = 0x00000000; |
| 106 | gpio->gpfup = 0x00000000; |
| 107 | gpio->gpgcon = 0xFFEAFF5A; |
| 108 | gpio->gpgup = 0x0000F0DC; |
| 109 | gpio->gphcon = 0x0028AAAA; |
| 110 | gpio->gphup = 0x00000656; |
wdenk | 1cb8e98 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 111 | |
| 112 | /* setup correct IRQ modes for NIC */ |
C Nauman | d9abba8 | 2010-10-26 23:04:31 +0900 | [diff] [blame] | 113 | /* rising edge mode */ |
| 114 | gpio->extint2 = (gpio->extint2 & ~(7<<8)) | (4<<8); |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 115 | |
| 116 | /* select USB port 2 to be host or device (fix to host for now) */ |
C Nauman | d9abba8 | 2010-10-26 23:04:31 +0900 | [diff] [blame] | 117 | gpio->misccr |= 0x08; |
wdenk | 1cb8e98 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 118 | |
| 119 | /* init serial */ |
| 120 | gd->baudrate = CONFIG_BAUDRATE; |
| 121 | gd->have_console = 1; |
| 122 | serial_init(); |
| 123 | |
| 124 | /* arch number of VCMA9-Board */ |
wdenk | 731215e | 2004-10-10 18:41:04 +0000 | [diff] [blame] | 125 | gd->bd->bi_arch_number = MACH_TYPE_MPL_VCMA9; |
wdenk | 1cb8e98 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 126 | |
| 127 | /* adress of boot parameters */ |
| 128 | gd->bd->bi_boot_params = 0x30000100; |
| 129 | |
| 130 | icache_enable(); |
| 131 | dcache_enable(); |
| 132 | |
| 133 | return 0; |
| 134 | } |
| 135 | |
wdenk | 1cb8e98 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 136 | /* |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 137 | * NAND flash initialization. |
| 138 | */ |
Jon Loeliger | 3fe0010 | 2007-07-09 18:38:39 -0500 | [diff] [blame] | 139 | #if defined(CONFIG_CMD_NAND) |
wdenk | a43278a | 2003-09-11 19:48:06 +0000 | [diff] [blame] | 140 | extern ulong |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 141 | nand_probe(ulong physadr); |
| 142 | |
| 143 | |
| 144 | static inline void NF_Reset(void) |
| 145 | { |
| 146 | int i; |
| 147 | |
| 148 | NF_SetCE(NFCE_LOW); |
| 149 | NF_Cmd(0xFF); /* reset command */ |
| 150 | for(i = 0; i < 10; i++); /* tWB = 100ns. */ |
| 151 | NF_WaitRB(); /* wait 200~500us; */ |
| 152 | NF_SetCE(NFCE_HIGH); |
| 153 | } |
| 154 | |
| 155 | |
| 156 | static inline void NF_Init(void) |
| 157 | { |
wdenk | 531716e | 2003-09-13 19:01:12 +0000 | [diff] [blame] | 158 | #if 0 /* a little bit too optimistic */ |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 159 | #define TACLS 0 |
| 160 | #define TWRPH0 3 |
| 161 | #define TWRPH1 0 |
wdenk | 531716e | 2003-09-13 19:01:12 +0000 | [diff] [blame] | 162 | #else |
| 163 | #define TACLS 0 |
| 164 | #define TWRPH0 4 |
| 165 | #define TWRPH1 2 |
| 166 | #endif |
| 167 | |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 168 | NF_Conf((1<<15)|(0<<14)|(0<<13)|(1<<12)|(1<<11)|(TACLS<<8)|(TWRPH0<<4)|(TWRPH1<<0)); |
wdenk | 8bde7f7 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 169 | /*nand->NFCONF = (1<<15)|(1<<14)|(1<<13)|(1<<12)|(1<<11)|(TACLS<<8)|(TWRPH0<<4)|(TWRPH1<<0); */ |
| 170 | /* 1 1 1 1, 1 xxx, r xxx, r xxx */ |
| 171 | /* En 512B 4step ECCR nFCE=H tACLS tWRPH0 tWRPH1 */ |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 172 | |
| 173 | NF_Reset(); |
| 174 | } |
| 175 | |
| 176 | void |
| 177 | nand_init(void) |
| 178 | { |
kevin.morfitt@fearnside-systems.co.uk | eb0ae7f | 2009-10-10 13:33:11 +0900 | [diff] [blame] | 179 | struct s3c2410_nand * const nand = s3c2410_get_base_nand(); |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 180 | |
| 181 | NF_Init(); |
wdenk | a43278a | 2003-09-11 19:48:06 +0000 | [diff] [blame] | 182 | #ifdef DEBUG |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 183 | printf("NAND flash probing at 0x%.8lX\n", (ulong)nand); |
wdenk | a43278a | 2003-09-11 19:48:06 +0000 | [diff] [blame] | 184 | #endif |
wdenk | 531716e | 2003-09-13 19:01:12 +0000 | [diff] [blame] | 185 | printf ("%4lu MB\n", nand_probe((ulong)nand) >> 20); |
wdenk | 48b4261 | 2003-06-19 23:01:32 +0000 | [diff] [blame] | 186 | } |
| 187 | #endif |
| 188 | |
| 189 | /* |
wdenk | 1cb8e98 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 190 | * Get some Board/PLD Info |
| 191 | */ |
| 192 | |
wdenk | 531716e | 2003-09-13 19:01:12 +0000 | [diff] [blame] | 193 | static u8 Get_PLD_ID(void) |
wdenk | 1cb8e98 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 194 | { |
kevin.morfitt@fearnside-systems.co.uk | eb0ae7f | 2009-10-10 13:33:11 +0900 | [diff] [blame] | 195 | VCMA9_PLD * const pld = VCMA9_get_base_PLD(); |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 196 | |
wdenk | 531716e | 2003-09-13 19:01:12 +0000 | [diff] [blame] | 197 | return(pld->ID); |
wdenk | 1cb8e98 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 198 | } |
| 199 | |
wdenk | 531716e | 2003-09-13 19:01:12 +0000 | [diff] [blame] | 200 | static u8 Get_PLD_BOARD(void) |
wdenk | 1cb8e98 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 201 | { |
kevin.morfitt@fearnside-systems.co.uk | eb0ae7f | 2009-10-10 13:33:11 +0900 | [diff] [blame] | 202 | VCMA9_PLD * const pld = VCMA9_get_base_PLD(); |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 203 | |
wdenk | 531716e | 2003-09-13 19:01:12 +0000 | [diff] [blame] | 204 | return(pld->BOARD); |
wdenk | 1cb8e98 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 205 | } |
| 206 | |
wdenk | 531716e | 2003-09-13 19:01:12 +0000 | [diff] [blame] | 207 | static u8 Get_PLD_SDRAM(void) |
| 208 | { |
kevin.morfitt@fearnside-systems.co.uk | eb0ae7f | 2009-10-10 13:33:11 +0900 | [diff] [blame] | 209 | VCMA9_PLD * const pld = VCMA9_get_base_PLD(); |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 210 | |
wdenk | 531716e | 2003-09-13 19:01:12 +0000 | [diff] [blame] | 211 | return(pld->SDRAM); |
| 212 | } |
| 213 | |
| 214 | static u8 Get_PLD_Version(void) |
wdenk | 1cb8e98 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 215 | { |
| 216 | return((Get_PLD_ID() >> 4) & 0x0F); |
| 217 | } |
| 218 | |
wdenk | 531716e | 2003-09-13 19:01:12 +0000 | [diff] [blame] | 219 | static u8 Get_PLD_Revision(void) |
wdenk | 1cb8e98 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 220 | { |
| 221 | return(Get_PLD_ID() & 0x0F); |
| 222 | } |
| 223 | |
wdenk | 34b3049 | 2003-09-16 21:07:28 +0000 | [diff] [blame] | 224 | #if 0 /* not used */ |
wdenk | 1cb8e98 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 225 | static int Get_Board_Config(void) |
| 226 | { |
wdenk | 531716e | 2003-09-13 19:01:12 +0000 | [diff] [blame] | 227 | u8 config = Get_PLD_BOARD() & 0x03; |
wdenk | 1cb8e98 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 228 | |
| 229 | if (config == 3) |
| 230 | return 1; |
| 231 | else |
| 232 | return 0; |
| 233 | } |
wdenk | 34b3049 | 2003-09-16 21:07:28 +0000 | [diff] [blame] | 234 | #endif |
wdenk | 1cb8e98 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 235 | |
| 236 | static uchar Get_Board_PCB(void) |
| 237 | { |
| 238 | return(((Get_PLD_BOARD() >> 4) & 0x03) + 'A'); |
| 239 | } |
| 240 | |
wdenk | 531716e | 2003-09-13 19:01:12 +0000 | [diff] [blame] | 241 | static u8 Get_SDRAM_ChipNr(void) |
| 242 | { |
| 243 | switch ((Get_PLD_SDRAM() >> 4) & 0x0F) { |
| 244 | case 0: return 4; |
| 245 | case 1: return 1; |
| 246 | case 2: return 2; |
| 247 | default: return 0; |
| 248 | } |
| 249 | } |
| 250 | |
| 251 | static ulong Get_SDRAM_ChipSize(void) |
| 252 | { |
| 253 | switch (Get_PLD_SDRAM() & 0x0F) { |
| 254 | case 0: return 16 * (1024*1024); |
| 255 | case 1: return 32 * (1024*1024); |
| 256 | case 2: return 8 * (1024*1024); |
| 257 | case 3: return 8 * (1024*1024); |
| 258 | default: return 0; |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 259 | } |
wdenk | 531716e | 2003-09-13 19:01:12 +0000 | [diff] [blame] | 260 | } |
| 261 | static const char * Get_SDRAM_ChipGeom(void) |
| 262 | { |
| 263 | switch (Get_PLD_SDRAM() & 0x0F) { |
| 264 | case 0: return "4Mx8x4"; |
| 265 | case 1: return "8Mx8x4"; |
| 266 | case 2: return "2Mx8x4"; |
| 267 | case 3: return "4Mx8x2"; |
| 268 | default: return "unknown"; |
| 269 | } |
| 270 | } |
| 271 | |
| 272 | static void Show_VCMA9_Info(char *board_name, char *serial) |
| 273 | { |
| 274 | printf("Board: %s SN: %s PCB Rev: %c PLD(%d,%d)\n", |
| 275 | board_name, serial, Get_Board_PCB(), Get_PLD_Version(), Get_PLD_Revision()); |
| 276 | printf("SDRAM: %d chips %s\n", Get_SDRAM_ChipNr(), Get_SDRAM_ChipGeom()); |
| 277 | } |
| 278 | |
| 279 | int dram_init(void) |
| 280 | { |
wdenk | 531716e | 2003-09-13 19:01:12 +0000 | [diff] [blame] | 281 | gd->bd->bi_dram[0].start = PHYS_SDRAM_1; |
| 282 | gd->bd->bi_dram[0].size = Get_SDRAM_ChipSize() * Get_SDRAM_ChipNr(); |
| 283 | |
| 284 | return 0; |
| 285 | } |
| 286 | |
wdenk | 1cb8e98 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 287 | /* ------------------------------------------------------------------------- */ |
| 288 | |
| 289 | /* |
| 290 | * Check Board Identity: |
| 291 | */ |
| 292 | |
| 293 | int checkboard(void) |
| 294 | { |
Wolfgang Denk | fc19e36 | 2007-10-13 23:51:14 +0200 | [diff] [blame] | 295 | char s[50]; |
wdenk | 1cb8e98 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 296 | int i; |
| 297 | backup_t *b = (backup_t *) s; |
| 298 | |
Wolfgang Denk | cdb7497 | 2010-07-24 21:55:43 +0200 | [diff] [blame] | 299 | i = getenv_f("serial#", s, 32); |
wdenk | 1cb8e98 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 300 | if ((i < 0) || strncmp (s, "VCMA9", 5)) { |
| 301 | get_backup_values (b); |
| 302 | if (strncmp (b->signature, "MPL\0", 4) != 0) { |
| 303 | puts ("### No HW ID - assuming VCMA9"); |
| 304 | } else { |
| 305 | b->serial_name[5] = 0; |
wdenk | 531716e | 2003-09-13 19:01:12 +0000 | [diff] [blame] | 306 | Show_VCMA9_Info(b->serial_name, &b->serial_name[6]); |
wdenk | 1cb8e98 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 307 | } |
| 308 | } else { |
| 309 | s[5] = 0; |
wdenk | 531716e | 2003-09-13 19:01:12 +0000 | [diff] [blame] | 310 | Show_VCMA9_Info(s, &s[6]); |
wdenk | 1cb8e98 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 311 | } |
wdenk | 531716e | 2003-09-13 19:01:12 +0000 | [diff] [blame] | 312 | /*printf("\n");*/ |
wdenk | 1cb8e98 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 313 | return(0); |
| 314 | } |
| 315 | |
| 316 | |
wdenk | 1cb8e98 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 317 | int last_stage_init(void) |
| 318 | { |
wdenk | 531716e | 2003-09-13 19:01:12 +0000 | [diff] [blame] | 319 | checkboard(); |
Jean-Christophe PLAGNIOL-VILLARD | 28c3450 | 2009-05-16 12:14:56 +0200 | [diff] [blame] | 320 | stdio_print_current_devices(); |
wdenk | 1cb8e98 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 321 | check_env(); |
| 322 | return 0; |
| 323 | } |
| 324 | |
| 325 | /*************************************************************************** |
| 326 | * some helping routines |
| 327 | */ |
wdenk | a2663ea | 2003-12-07 18:32:37 +0000 | [diff] [blame] | 328 | #if !CONFIG_USB_KEYBOARD |
wdenk | 1cb8e98 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 329 | int overwrite_console(void) |
| 330 | { |
| 331 | /* return TRUE if console should be overwritten */ |
| 332 | return 0; |
| 333 | } |
wdenk | a2663ea | 2003-12-07 18:32:37 +0000 | [diff] [blame] | 334 | #endif |
wdenk | 1cb8e98 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 335 | |
| 336 | /************************************************************************ |
| 337 | * Print VCMA9 Info |
| 338 | ************************************************************************/ |
| 339 | void print_vcma9_info(void) |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 340 | { |
Wolfgang Denk | fc19e36 | 2007-10-13 23:51:14 +0200 | [diff] [blame] | 341 | char s[50]; |
wdenk | 531716e | 2003-09-13 19:01:12 +0000 | [diff] [blame] | 342 | int i; |
wdenk | 42d1f03 | 2003-10-15 23:53:47 +0000 | [diff] [blame] | 343 | |
Wolfgang Denk | cdb7497 | 2010-07-24 21:55:43 +0200 | [diff] [blame] | 344 | if ((i = getenv_f("serial#", s, 32)) < 0) { |
wdenk | 531716e | 2003-09-13 19:01:12 +0000 | [diff] [blame] | 345 | puts ("### No HW ID - assuming VCMA9"); |
| 346 | printf("i %d", i*24); |
| 347 | } else { |
| 348 | s[5] = 0; |
| 349 | Show_VCMA9_Info(s, &s[6]); |
| 350 | } |
wdenk | 1cb8e98 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 351 | } |
Ben Warren | b1c0eaa | 2009-08-25 13:09:37 -0700 | [diff] [blame] | 352 | |
| 353 | #ifdef CONFIG_CMD_NET |
| 354 | int board_eth_init(bd_t *bis) |
| 355 | { |
| 356 | int rc = 0; |
| 357 | #ifdef CONFIG_CS8900 |
| 358 | rc = cs8900_initialize(0, CONFIG_CS8900_BASE); |
| 359 | #endif |
| 360 | return rc; |
| 361 | } |
| 362 | #endif |
David Müller (ELSOFT AG) | 6d75484 | 2011-05-01 21:52:50 +0000 | [diff] [blame^] | 363 | |
| 364 | /* |
| 365 | * Hardcoded flash setup: |
| 366 | * Flash 0 is a non-CFI AMD AM29F400BB flash. |
| 367 | */ |
| 368 | ulong board_flash_get_legacy(ulong base, int banknum, flash_info_t *info) |
| 369 | { |
| 370 | info->portwidth = FLASH_CFI_16BIT; |
| 371 | info->chipwidth = FLASH_CFI_BY16; |
| 372 | info->interface = FLASH_CFI_X16; |
| 373 | return 1; |
| 374 | } |