Stelian Pop | 8e429b3 | 2008-05-08 18:52:23 +0200 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2007-2008 |
| 3 | * Stelian Pop <stelian.pop@leadtechdesign.com> |
| 4 | * Lead Tech Design <www.leadtechdesign.com> |
| 5 | * |
| 6 | * See file CREDITS for list of people who contributed to this |
| 7 | * project. |
| 8 | * |
| 9 | * This program is free software; you can redistribute it and/or |
| 10 | * modify it under the terms of the GNU General Public License as |
| 11 | * published by the Free Software Foundation; either version 2 of |
| 12 | * the License, or (at your option) any later version. |
| 13 | * |
| 14 | * This program is distributed in the hope that it will be useful, |
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | * GNU General Public License for more details. |
| 18 | * |
| 19 | * You should have received a copy of the GNU General Public License |
| 20 | * along with this program; if not, write to the Free Software |
| 21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
| 22 | * MA 02111-1307 USA |
| 23 | */ |
| 24 | |
| 25 | #include <common.h> |
Stelian Pop | 56a2479 | 2008-05-08 14:52:31 +0200 | [diff] [blame] | 26 | #include <asm/sizes.h> |
Stelian Pop | 8e429b3 | 2008-05-08 18:52:23 +0200 | [diff] [blame] | 27 | #include <asm/arch/at91sam9263.h> |
Stelian Pop | 8e429b3 | 2008-05-08 18:52:23 +0200 | [diff] [blame] | 28 | #include <asm/arch/at91sam9_smc.h> |
Jean-Christophe PLAGNIOL-VILLARD | 1332a2a | 2009-03-21 21:07:59 +0100 | [diff] [blame] | 29 | #include <asm/arch/at91_common.h> |
Stelian Pop | 8e429b3 | 2008-05-08 18:52:23 +0200 | [diff] [blame] | 30 | #include <asm/arch/at91_pmc.h> |
| 31 | #include <asm/arch/at91_rstc.h> |
Jens Scharsig | 1b34f00 | 2010-02-03 22:47:18 +0100 | [diff] [blame] | 32 | #include <asm/arch/at91_matrix.h> |
| 33 | #include <asm/arch/at91_pio.h> |
Jean-Christophe PLAGNIOL-VILLARD | dc39ae9 | 2009-04-16 21:30:44 +0200 | [diff] [blame] | 34 | #include <asm/arch/clk.h> |
Stelian Pop | 8e429b3 | 2008-05-08 18:52:23 +0200 | [diff] [blame] | 35 | #include <asm/arch/io.h> |
Ben Warren | 3ae071e | 2008-08-12 22:11:53 -0700 | [diff] [blame] | 36 | #include <asm/arch/hardware.h> |
Stelian Pop | 56a2479 | 2008-05-08 14:52:31 +0200 | [diff] [blame] | 37 | #include <lcd.h> |
| 38 | #include <atmel_lcdc.h> |
Stelian Pop | 8e429b3 | 2008-05-08 18:52:23 +0200 | [diff] [blame] | 39 | #if defined(CONFIG_RESET_PHY_R) && defined(CONFIG_MACB) |
| 40 | #include <net.h> |
| 41 | #endif |
Ben Warren | 3ae071e | 2008-08-12 22:11:53 -0700 | [diff] [blame] | 42 | #include <netdev.h> |
Stelian Pop | 8e429b3 | 2008-05-08 18:52:23 +0200 | [diff] [blame] | 43 | |
| 44 | DECLARE_GLOBAL_DATA_PTR; |
| 45 | |
| 46 | /* ------------------------------------------------------------------------- */ |
| 47 | /* |
| 48 | * Miscelaneous platform dependent initialisations |
| 49 | */ |
| 50 | |
Stelian Pop | 8e429b3 | 2008-05-08 18:52:23 +0200 | [diff] [blame] | 51 | #ifdef CONFIG_CMD_NAND |
| 52 | static void at91sam9263ek_nand_hw_init(void) |
| 53 | { |
| 54 | unsigned long csa; |
Jens Scharsig | 1b34f00 | 2010-02-03 22:47:18 +0100 | [diff] [blame] | 55 | at91_smc_t *smc = (at91_smc_t *) AT91_SMC0_BASE; |
| 56 | at91_matrix_t *matrix = (at91_matrix_t *) AT91_MATRIX_BASE; |
| 57 | at91_pmc_t *pmc = (at91_pmc_t *) AT91_PMC_BASE; |
Stelian Pop | 8e429b3 | 2008-05-08 18:52:23 +0200 | [diff] [blame] | 58 | |
| 59 | /* Enable CS3 */ |
Jens Scharsig | 1b34f00 | 2010-02-03 22:47:18 +0100 | [diff] [blame] | 60 | csa = readl(&matrix->csa[0]) | AT91_MATRIX_CSA_EBI_CS3A; |
| 61 | writel(csa, &matrix->csa[0]); |
| 62 | |
| 63 | /* Enable CS3 */ |
Stelian Pop | 8e429b3 | 2008-05-08 18:52:23 +0200 | [diff] [blame] | 64 | |
| 65 | /* Configure SMC CS3 for NAND/SmartMedia */ |
Jens Scharsig | 1b34f00 | 2010-02-03 22:47:18 +0100 | [diff] [blame] | 66 | writel(AT91_SMC_SETUP_NWE(1) | AT91_SMC_SETUP_NCS_WR(0) | |
| 67 | AT91_SMC_SETUP_NRD(1) | AT91_SMC_SETUP_NCS_RD(0), |
| 68 | &smc->cs[3].setup); |
Stelian Pop | 8e429b3 | 2008-05-08 18:52:23 +0200 | [diff] [blame] | 69 | |
Jens Scharsig | 1b34f00 | 2010-02-03 22:47:18 +0100 | [diff] [blame] | 70 | writel(AT91_SMC_PULSE_NWE(3) | AT91_SMC_PULSE_NCS_WR(3) | |
| 71 | AT91_SMC_PULSE_NRD(3) | AT91_SMC_PULSE_NCS_RD(3), |
| 72 | &smc->cs[3].pulse); |
| 73 | |
| 74 | writel(AT91_SMC_CYCLE_NWE(5) | AT91_SMC_CYCLE_NRD(5), |
| 75 | &smc->cs[3].cycle); |
| 76 | writel(AT91_SMC_MODE_RM_NRD | AT91_SMC_MODE_WM_NWE | |
| 77 | AT91_SMC_MODE_EXNW_DISABLE | |
| 78 | #ifdef CONFIG_SYS_NAND_DBW_16 |
| 79 | AT91_SMC_MODE_DBW_16 | |
| 80 | #else /* CONFIG_SYS_NAND_DBW_8 */ |
| 81 | AT91_SMC_MODE_DBW_8 | |
| 82 | #endif |
| 83 | AT91_SMC_MODE_TDF_CYCLE(2), |
| 84 | &smc->cs[3].mode); |
| 85 | |
| 86 | writel(1 << AT91SAM9263_ID_PIOA | 1 << AT91SAM9263_ID_PIOCDE, |
| 87 | &pmc->pcer); |
Stelian Pop | 8e429b3 | 2008-05-08 18:52:23 +0200 | [diff] [blame] | 88 | |
| 89 | /* Configure RDY/BSY */ |
Jens Scharsig | 1b34f00 | 2010-02-03 22:47:18 +0100 | [diff] [blame] | 90 | at91_set_pio_input(CONFIG_SYS_NAND_READY_PIN, 1); |
Stelian Pop | 8e429b3 | 2008-05-08 18:52:23 +0200 | [diff] [blame] | 91 | |
| 92 | /* Enable NandFlash */ |
Jens Scharsig | 1b34f00 | 2010-02-03 22:47:18 +0100 | [diff] [blame] | 93 | at91_set_pio_output(CONFIG_SYS_NAND_ENABLE_PIN, 1); |
Stelian Pop | 8e429b3 | 2008-05-08 18:52:23 +0200 | [diff] [blame] | 94 | } |
| 95 | #endif |
| 96 | |
Stelian Pop | 8e429b3 | 2008-05-08 18:52:23 +0200 | [diff] [blame] | 97 | #ifdef CONFIG_MACB |
| 98 | static void at91sam9263ek_macb_hw_init(void) |
| 99 | { |
Jens Scharsig | 1b34f00 | 2010-02-03 22:47:18 +0100 | [diff] [blame] | 100 | unsigned long erstl; |
| 101 | at91_pmc_t *pmc = (at91_pmc_t *) AT91_PMC_BASE; |
| 102 | at91_pio_t *pio = (at91_pio_t *) AT91_PIO_BASE; |
| 103 | at91_rstc_t *rstc = (at91_rstc_t *) AT91_RSTC_BASE; |
Stelian Pop | 8e429b3 | 2008-05-08 18:52:23 +0200 | [diff] [blame] | 104 | /* Enable clock */ |
Jens Scharsig | 1b34f00 | 2010-02-03 22:47:18 +0100 | [diff] [blame] | 105 | writel(1 << AT91SAM9263_ID_EMAC, &pmc->pcer); |
Stelian Pop | 8e429b3 | 2008-05-08 18:52:23 +0200 | [diff] [blame] | 106 | |
| 107 | /* |
| 108 | * Disable pull-up on: |
| 109 | * RXDV (PC25) => PHY normal mode (not Test mode) |
| 110 | * ERX0 (PE25) => PHY ADDR0 |
| 111 | * ERX1 (PE26) => PHY ADDR1 => PHYADDR = 0x0 |
| 112 | * |
| 113 | * PHY has internal pull-down |
| 114 | */ |
Stelian Pop | 8e429b3 | 2008-05-08 18:52:23 +0200 | [diff] [blame] | 115 | |
Jens Scharsig | 1b34f00 | 2010-02-03 22:47:18 +0100 | [diff] [blame] | 116 | writel(1 << 25, &pio->pioc.pudr); |
| 117 | writel((1 << 25) | (1 <<26), &pio->pioe.pudr); |
| 118 | |
| 119 | erstl = readl(&rstc->mr) & AT91_RSTC_MR_ERSTL_MASK; |
Sedji Gaouaou | 0aafde1 | 2009-06-24 08:32:09 +0200 | [diff] [blame] | 120 | |
Stelian Pop | 8e429b3 | 2008-05-08 18:52:23 +0200 | [diff] [blame] | 121 | /* Need to reset PHY -> 500ms reset */ |
Jens Scharsig | 1b34f00 | 2010-02-03 22:47:18 +0100 | [diff] [blame] | 122 | writel(AT91_RSTC_KEY | AT91_RSTC_MR_ERSTL(0x0D) | |
| 123 | AT91_RSTC_MR_URSTEN, &rstc->mr); |
Stelian Pop | 8e429b3 | 2008-05-08 18:52:23 +0200 | [diff] [blame] | 124 | |
Jens Scharsig | 1b34f00 | 2010-02-03 22:47:18 +0100 | [diff] [blame] | 125 | writel(AT91_RSTC_KEY | AT91_RSTC_CR_EXTRST, &rstc->cr); |
Stelian Pop | 8e429b3 | 2008-05-08 18:52:23 +0200 | [diff] [blame] | 126 | /* Wait for end hardware reset */ |
Jens Scharsig | 1b34f00 | 2010-02-03 22:47:18 +0100 | [diff] [blame] | 127 | while (!(readl(&rstc->sr) & AT91_RSTC_SR_NRSTL)) |
| 128 | ; |
Stelian Pop | 8e429b3 | 2008-05-08 18:52:23 +0200 | [diff] [blame] | 129 | |
Stelian Pop | 19bd688 | 2008-05-22 00:15:40 +0200 | [diff] [blame] | 130 | /* Restore NRST value */ |
Jens Scharsig | 1b34f00 | 2010-02-03 22:47:18 +0100 | [diff] [blame] | 131 | writel(AT91_RSTC_KEY | erstl | AT91_RSTC_MR_URSTEN, &rstc->mr); |
Stelian Pop | 19bd688 | 2008-05-22 00:15:40 +0200 | [diff] [blame] | 132 | |
Stelian Pop | 8e429b3 | 2008-05-08 18:52:23 +0200 | [diff] [blame] | 133 | /* Re-enable pull-up */ |
Jens Scharsig | 1b34f00 | 2010-02-03 22:47:18 +0100 | [diff] [blame] | 134 | writel(1 << 25, &pio->pioc.puer); |
| 135 | writel((1 << 25) | (1 <<26), &pio->pioe.puer); |
Stelian Pop | 8e429b3 | 2008-05-08 18:52:23 +0200 | [diff] [blame] | 136 | |
Jean-Christophe PLAGNIOL-VILLARD | e2c0476 | 2009-03-21 21:08:00 +0100 | [diff] [blame] | 137 | at91_macb_hw_init(); |
Stelian Pop | 8e429b3 | 2008-05-08 18:52:23 +0200 | [diff] [blame] | 138 | } |
| 139 | #endif |
| 140 | |
Stelian Pop | 56a2479 | 2008-05-08 14:52:31 +0200 | [diff] [blame] | 141 | #ifdef CONFIG_LCD |
| 142 | vidinfo_t panel_info = { |
| 143 | vl_col: 240, |
| 144 | vl_row: 320, |
| 145 | vl_clk: 4965000, |
| 146 | vl_sync: ATMEL_LCDC_INVLINE_INVERTED | |
| 147 | ATMEL_LCDC_INVFRAME_INVERTED, |
| 148 | vl_bpix: 3, |
| 149 | vl_tft: 1, |
| 150 | vl_hsync_len: 5, |
| 151 | vl_left_margin: 1, |
| 152 | vl_right_margin:33, |
| 153 | vl_vsync_len: 1, |
| 154 | vl_upper_margin:1, |
| 155 | vl_lower_margin:0, |
| 156 | mmio: AT91SAM9263_LCDC_BASE, |
| 157 | }; |
| 158 | |
| 159 | void lcd_enable(void) |
| 160 | { |
Jens Scharsig | 1b34f00 | 2010-02-03 22:47:18 +0100 | [diff] [blame] | 161 | at91_set_pio_value(AT91_PIO_PORTA, 30, 1); /* power up */ |
Stelian Pop | 56a2479 | 2008-05-08 14:52:31 +0200 | [diff] [blame] | 162 | } |
| 163 | |
| 164 | void lcd_disable(void) |
| 165 | { |
Jens Scharsig | 1b34f00 | 2010-02-03 22:47:18 +0100 | [diff] [blame] | 166 | at91_set_pio_value(AT91_PIO_PORTA, 30, 0); /* power down */ |
Stelian Pop | 56a2479 | 2008-05-08 14:52:31 +0200 | [diff] [blame] | 167 | } |
| 168 | |
| 169 | static void at91sam9263ek_lcd_hw_init(void) |
| 170 | { |
Jens Scharsig | 1b34f00 | 2010-02-03 22:47:18 +0100 | [diff] [blame] | 171 | at91_pmc_t *pmc = (at91_pmc_t *) AT91_PMC_BASE; |
Stelian Pop | 56a2479 | 2008-05-08 14:52:31 +0200 | [diff] [blame] | 172 | |
Jens Scharsig | 1b34f00 | 2010-02-03 22:47:18 +0100 | [diff] [blame] | 173 | at91_set_a_periph(AT91_PIO_PORTC, 1, 0); /* LCDHSYNC */ |
| 174 | at91_set_a_periph(AT91_PIO_PORTC, 2, 0); /* LCDDOTCK */ |
| 175 | at91_set_a_periph(AT91_PIO_PORTC, 3, 0); /* LCDDEN */ |
| 176 | at91_set_b_periph(AT91_PIO_PORTB, 9, 0); /* LCDCC */ |
| 177 | at91_set_a_periph(AT91_PIO_PORTC, 6, 0); /* LCDD2 */ |
| 178 | at91_set_a_periph(AT91_PIO_PORTC, 7, 0); /* LCDD3 */ |
| 179 | at91_set_a_periph(AT91_PIO_PORTC, 8, 0); /* LCDD4 */ |
| 180 | at91_set_a_periph(AT91_PIO_PORTC, 9, 0); /* LCDD5 */ |
| 181 | at91_set_a_periph(AT91_PIO_PORTC, 10, 0); /* LCDD6 */ |
| 182 | at91_set_a_periph(AT91_PIO_PORTC, 11, 0); /* LCDD7 */ |
| 183 | at91_set_a_periph(AT91_PIO_PORTC, 14, 0); /* LCDD10 */ |
| 184 | at91_set_a_periph(AT91_PIO_PORTC, 15, 0); /* LCDD11 */ |
| 185 | at91_set_a_periph(AT91_PIO_PORTC, 16, 0); /* LCDD12 */ |
| 186 | at91_set_b_periph(AT91_PIO_PORTC, 12, 0); /* LCDD13 */ |
| 187 | at91_set_a_periph(AT91_PIO_PORTC, 18, 0); /* LCDD14 */ |
| 188 | at91_set_a_periph(AT91_PIO_PORTC, 19, 0); /* LCDD15 */ |
| 189 | at91_set_a_periph(AT91_PIO_PORTC, 22, 0); /* LCDD18 */ |
| 190 | at91_set_a_periph(AT91_PIO_PORTC, 23, 0); /* LCDD19 */ |
| 191 | at91_set_a_periph(AT91_PIO_PORTC, 24, 0); /* LCDD20 */ |
| 192 | at91_set_b_periph(AT91_PIO_PORTC, 17, 0); /* LCDD21 */ |
| 193 | at91_set_a_periph(AT91_PIO_PORTC, 26, 0); /* LCDD22 */ |
| 194 | at91_set_a_periph(AT91_PIO_PORTC, 27, 0); /* LCDD23 */ |
Stelian Pop | 56a2479 | 2008-05-08 14:52:31 +0200 | [diff] [blame] | 195 | |
Jens Scharsig | 1b34f00 | 2010-02-03 22:47:18 +0100 | [diff] [blame] | 196 | writel(1 << AT91SAM9263_ID_LCDC, &pmc->pcer); |
Stelian Pop | 56a2479 | 2008-05-08 14:52:31 +0200 | [diff] [blame] | 197 | gd->fb_base = AT91SAM9263_SRAM0_BASE; |
| 198 | } |
Haavard Skinnemoen | 6b59e03 | 2008-09-01 16:21:22 +0200 | [diff] [blame] | 199 | |
| 200 | #ifdef CONFIG_LCD_INFO |
| 201 | #include <nand.h> |
| 202 | #include <version.h> |
| 203 | |
Jean-Christophe PLAGNIOL-VILLARD | 1b3b7c6 | 2009-06-13 12:48:36 +0200 | [diff] [blame] | 204 | #ifndef CONFIG_SYS_NO_FLASH |
| 205 | extern flash_info_t flash_info[]; |
| 206 | #endif |
| 207 | |
Haavard Skinnemoen | 6b59e03 | 2008-09-01 16:21:22 +0200 | [diff] [blame] | 208 | void lcd_show_board_info(void) |
| 209 | { |
| 210 | ulong dram_size, nand_size; |
Jean-Christophe PLAGNIOL-VILLARD | 1b3b7c6 | 2009-06-13 12:48:36 +0200 | [diff] [blame] | 211 | #ifndef CONFIG_SYS_NO_FLASH |
| 212 | ulong flash_size; |
| 213 | #endif |
Haavard Skinnemoen | 6b59e03 | 2008-09-01 16:21:22 +0200 | [diff] [blame] | 214 | int i; |
| 215 | char temp[32]; |
| 216 | |
| 217 | lcd_printf ("%s\n", U_BOOT_VERSION); |
| 218 | lcd_printf ("(C) 2008 ATMEL Corp\n"); |
| 219 | lcd_printf ("at91support@atmel.com\n"); |
| 220 | lcd_printf ("%s CPU at %s MHz\n", |
Achim Ehrlich | 7c966a8 | 2010-02-24 10:29:16 +0100 | [diff] [blame] | 221 | CONFIG_SYS_AT91_CPU_NAME, |
Jean-Christophe PLAGNIOL-VILLARD | dc39ae9 | 2009-04-16 21:30:44 +0200 | [diff] [blame] | 222 | strmhz(temp, get_cpu_clk_rate())); |
Haavard Skinnemoen | 6b59e03 | 2008-09-01 16:21:22 +0200 | [diff] [blame] | 223 | |
| 224 | dram_size = 0; |
| 225 | for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) |
| 226 | dram_size += gd->bd->bi_dram[i].size; |
| 227 | nand_size = 0; |
| 228 | for (i = 0; i < CONFIG_SYS_MAX_NAND_DEVICE; i++) |
| 229 | nand_size += nand_info[i].size; |
Jean-Christophe PLAGNIOL-VILLARD | 1b3b7c6 | 2009-06-13 12:48:36 +0200 | [diff] [blame] | 230 | #ifndef CONFIG_SYS_NO_FLASH |
| 231 | flash_size = 0; |
| 232 | for (i = 0; i < CONFIG_SYS_MAX_FLASH_BANKS; i++) |
| 233 | flash_size += flash_info[i].size; |
| 234 | #endif |
| 235 | lcd_printf (" %ld MB SDRAM, %ld MB NAND", |
Haavard Skinnemoen | 6b59e03 | 2008-09-01 16:21:22 +0200 | [diff] [blame] | 236 | dram_size >> 20, |
| 237 | nand_size >> 20 ); |
Jean-Christophe PLAGNIOL-VILLARD | 1b3b7c6 | 2009-06-13 12:48:36 +0200 | [diff] [blame] | 238 | #ifndef CONFIG_SYS_NO_FLASH |
| 239 | lcd_printf (",\n %ld MB NOR", |
| 240 | flash_size >> 20); |
| 241 | #endif |
| 242 | lcd_puts ("\n"); |
Haavard Skinnemoen | 6b59e03 | 2008-09-01 16:21:22 +0200 | [diff] [blame] | 243 | } |
| 244 | #endif /* CONFIG_LCD_INFO */ |
Stelian Pop | 56a2479 | 2008-05-08 14:52:31 +0200 | [diff] [blame] | 245 | #endif |
| 246 | |
Stelian Pop | 8e429b3 | 2008-05-08 18:52:23 +0200 | [diff] [blame] | 247 | int board_init(void) |
| 248 | { |
| 249 | /* Enable Ctrlc */ |
| 250 | console_init_f(); |
| 251 | |
| 252 | /* arch number of AT91SAM9263EK-Board */ |
| 253 | gd->bd->bi_arch_number = MACH_TYPE_AT91SAM9263EK; |
| 254 | /* adress of boot parameters */ |
| 255 | gd->bd->bi_boot_params = PHYS_SDRAM + 0x100; |
| 256 | |
Jean-Christophe PLAGNIOL-VILLARD | 1332a2a | 2009-03-21 21:07:59 +0100 | [diff] [blame] | 257 | at91_serial_hw_init(); |
Stelian Pop | 8e429b3 | 2008-05-08 18:52:23 +0200 | [diff] [blame] | 258 | #ifdef CONFIG_CMD_NAND |
| 259 | at91sam9263ek_nand_hw_init(); |
| 260 | #endif |
| 261 | #ifdef CONFIG_HAS_DATAFLASH |
Jens Scharsig | 1b34f00 | 2010-02-03 22:47:18 +0100 | [diff] [blame] | 262 | at91_set_pio_output(AT91_PIO_PORTE, 20, 1); /* select spi0 clock */ |
Jean-Christophe PLAGNIOL-VILLARD | 7ebafb7 | 2009-03-21 21:07:59 +0100 | [diff] [blame] | 263 | at91_spi0_hw_init(1 << 0); |
Stelian Pop | 8e429b3 | 2008-05-08 18:52:23 +0200 | [diff] [blame] | 264 | #endif |
| 265 | #ifdef CONFIG_MACB |
| 266 | at91sam9263ek_macb_hw_init(); |
| 267 | #endif |
| 268 | #ifdef CONFIG_USB_OHCI_NEW |
Jean-Christophe PLAGNIOL-VILLARD | f3f91f8 | 2009-03-21 21:08:00 +0100 | [diff] [blame] | 269 | at91_uhp_hw_init(); |
Stelian Pop | 8e429b3 | 2008-05-08 18:52:23 +0200 | [diff] [blame] | 270 | #endif |
Stelian Pop | 56a2479 | 2008-05-08 14:52:31 +0200 | [diff] [blame] | 271 | #ifdef CONFIG_LCD |
| 272 | at91sam9263ek_lcd_hw_init(); |
| 273 | #endif |
Stelian Pop | 8e429b3 | 2008-05-08 18:52:23 +0200 | [diff] [blame] | 274 | return 0; |
| 275 | } |
| 276 | |
| 277 | int dram_init(void) |
| 278 | { |
| 279 | gd->bd->bi_dram[0].start = PHYS_SDRAM; |
| 280 | gd->bd->bi_dram[0].size = PHYS_SDRAM_SIZE; |
| 281 | return 0; |
| 282 | } |
| 283 | |
| 284 | #ifdef CONFIG_RESET_PHY_R |
| 285 | void reset_phy(void) |
| 286 | { |
Stelian Pop | 8e429b3 | 2008-05-08 18:52:23 +0200 | [diff] [blame] | 287 | } |
| 288 | #endif |
Ben Warren | 3ae071e | 2008-08-12 22:11:53 -0700 | [diff] [blame] | 289 | |
| 290 | int board_eth_init(bd_t *bis) |
| 291 | { |
| 292 | int rc = 0; |
| 293 | #ifdef CONFIG_MACB |
Jens Scharsig | 1b34f00 | 2010-02-03 22:47:18 +0100 | [diff] [blame] | 294 | rc = macb_eth_initialize(0, (void *) AT91_EMAC_BASE, 0x00); |
Ben Warren | 3ae071e | 2008-08-12 22:11:53 -0700 | [diff] [blame] | 295 | #endif |
| 296 | return rc; |
| 297 | } |