Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Sedji Gaouaou | 538566d | 2009-07-09 10:16:29 +0200 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2007-2008 |
Stelian Pop | 5ee0c7f | 2011-11-01 00:00:39 +0100 | [diff] [blame] | 4 | * Stelian Pop <stelian@popies.net> |
Sedji Gaouaou | 538566d | 2009-07-09 10:16:29 +0200 | [diff] [blame] | 5 | * Lead Tech Design <www.leadtechdesign.com> |
Sedji Gaouaou | 538566d | 2009-07-09 10:16:29 +0200 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #include <common.h> |
Wenyou Yang | cf6667c | 2017-04-18 15:15:50 +0800 | [diff] [blame] | 9 | #include <debug_uart.h> |
Simon Glass | 8e16b1e | 2019-12-28 10:45:05 -0700 | [diff] [blame] | 10 | #include <init.h> |
Simon Glass | 0c36441 | 2019-12-28 10:44:48 -0700 | [diff] [blame] | 11 | #include <net.h> |
Simon Glass | f5c208d | 2019-11-14 12:57:20 -0700 | [diff] [blame] | 12 | #include <vsprintf.h> |
Simon Glass | 3ba929a | 2020-10-30 21:38:53 -0600 | [diff] [blame] | 13 | #include <asm/global_data.h> |
Thomas Petazzoni | a5e8576 | 2011-08-04 11:08:50 +0000 | [diff] [blame] | 14 | #include <asm/io.h> |
Bo Shen | c56e9f4 | 2015-03-27 14:23:34 +0800 | [diff] [blame] | 15 | #include <asm/arch/clk.h> |
Thomas Petazzoni | a5e8576 | 2011-08-04 11:08:50 +0000 | [diff] [blame] | 16 | #include <asm/arch/at91sam9g45_matrix.h> |
Sedji Gaouaou | 538566d | 2009-07-09 10:16:29 +0200 | [diff] [blame] | 17 | #include <asm/arch/at91sam9_smc.h> |
| 18 | #include <asm/arch/at91_common.h> |
Sedji Gaouaou | 538566d | 2009-07-09 10:16:29 +0200 | [diff] [blame] | 19 | #include <asm/arch/gpio.h> |
Thomas Petazzoni | a5e8576 | 2011-08-04 11:08:50 +0000 | [diff] [blame] | 20 | #include <asm/arch/clk.h> |
Sedji Gaouaou | 538566d | 2009-07-09 10:16:29 +0200 | [diff] [blame] | 21 | #include <lcd.h> |
Masahiro Yamada | 2b7a873 | 2017-11-30 13:45:24 +0900 | [diff] [blame] | 22 | #include <linux/mtd/rawnand.h> |
Sedji Gaouaou | 538566d | 2009-07-09 10:16:29 +0200 | [diff] [blame] | 23 | #include <atmel_lcdc.h> |
Simon Glass | 0ffb9d6 | 2017-05-31 19:47:48 -0600 | [diff] [blame] | 24 | #include <asm/mach-types.h> |
Sedji Gaouaou | 538566d | 2009-07-09 10:16:29 +0200 | [diff] [blame] | 25 | |
| 26 | DECLARE_GLOBAL_DATA_PTR; |
| 27 | |
| 28 | /* ------------------------------------------------------------------------- */ |
| 29 | /* |
| 30 | * Miscelaneous platform dependent initialisations |
| 31 | */ |
| 32 | |
| 33 | #ifdef CONFIG_CMD_NAND |
Thomas Petazzoni | a5e8576 | 2011-08-04 11:08:50 +0000 | [diff] [blame] | 34 | void at91sam9m10g45ek_nand_hw_init(void) |
Sedji Gaouaou | 538566d | 2009-07-09 10:16:29 +0200 | [diff] [blame] | 35 | { |
Thomas Petazzoni | a5e8576 | 2011-08-04 11:08:50 +0000 | [diff] [blame] | 36 | struct at91_smc *smc = (struct at91_smc *)ATMEL_BASE_SMC; |
| 37 | struct at91_matrix *matrix = (struct at91_matrix *)ATMEL_BASE_MATRIX; |
Sedji Gaouaou | 538566d | 2009-07-09 10:16:29 +0200 | [diff] [blame] | 38 | unsigned long csa; |
| 39 | |
| 40 | /* Enable CS3 */ |
Thomas Petazzoni | a5e8576 | 2011-08-04 11:08:50 +0000 | [diff] [blame] | 41 | csa = readl(&matrix->ebicsa); |
| 42 | csa |= AT91_MATRIX_EBI_CS3A_SMC_SMARTMEDIA; |
| 43 | writel(csa, &matrix->ebicsa); |
Sedji Gaouaou | 538566d | 2009-07-09 10:16:29 +0200 | [diff] [blame] | 44 | |
| 45 | /* Configure SMC CS3 for NAND/SmartMedia */ |
Thomas Petazzoni | a5e8576 | 2011-08-04 11:08:50 +0000 | [diff] [blame] | 46 | writel(AT91_SMC_SETUP_NWE(1) | AT91_SMC_SETUP_NCS_WR(0) | |
| 47 | AT91_SMC_SETUP_NRD(1) | AT91_SMC_SETUP_NCS_RD(0), |
| 48 | &smc->cs[3].setup); |
| 49 | writel(AT91_SMC_PULSE_NWE(4) | AT91_SMC_PULSE_NCS_WR(3) | |
| 50 | AT91_SMC_PULSE_NRD(3) | AT91_SMC_PULSE_NCS_RD(2), |
| 51 | &smc->cs[3].pulse); |
| 52 | writel(AT91_SMC_CYCLE_NWE(7) | AT91_SMC_CYCLE_NRD(4), |
| 53 | &smc->cs[3].cycle); |
| 54 | writel(AT91_SMC_MODE_RM_NRD | AT91_SMC_MODE_WM_NWE | |
| 55 | AT91_SMC_MODE_EXNW_DISABLE | |
Sedji Gaouaou | 538566d | 2009-07-09 10:16:29 +0200 | [diff] [blame] | 56 | #ifdef CONFIG_SYS_NAND_DBW_16 |
Thomas Petazzoni | a5e8576 | 2011-08-04 11:08:50 +0000 | [diff] [blame] | 57 | AT91_SMC_MODE_DBW_16 | |
Sedji Gaouaou | 538566d | 2009-07-09 10:16:29 +0200 | [diff] [blame] | 58 | #else /* CONFIG_SYS_NAND_DBW_8 */ |
Thomas Petazzoni | a5e8576 | 2011-08-04 11:08:50 +0000 | [diff] [blame] | 59 | AT91_SMC_MODE_DBW_8 | |
Sedji Gaouaou | 538566d | 2009-07-09 10:16:29 +0200 | [diff] [blame] | 60 | #endif |
Thomas Petazzoni | a5e8576 | 2011-08-04 11:08:50 +0000 | [diff] [blame] | 61 | AT91_SMC_MODE_TDF_CYCLE(3), |
| 62 | &smc->cs[3].mode); |
Sedji Gaouaou | 538566d | 2009-07-09 10:16:29 +0200 | [diff] [blame] | 63 | |
Wenyou Yang | 78f8976 | 2016-02-03 10:16:50 +0800 | [diff] [blame] | 64 | at91_periph_clk_enable(ATMEL_ID_PIOC); |
Sedji Gaouaou | 538566d | 2009-07-09 10:16:29 +0200 | [diff] [blame] | 65 | |
| 66 | /* Configure RDY/BSY */ |
| 67 | at91_set_gpio_input(CONFIG_SYS_NAND_READY_PIN, 1); |
| 68 | |
| 69 | /* Enable NandFlash */ |
| 70 | at91_set_gpio_output(CONFIG_SYS_NAND_ENABLE_PIN, 1); |
| 71 | } |
| 72 | #endif |
| 73 | |
Bo Shen | c56e9f4 | 2015-03-27 14:23:34 +0800 | [diff] [blame] | 74 | #if defined(CONFIG_SPL_BUILD) |
| 75 | #include <spl.h> |
| 76 | #include <nand.h> |
| 77 | |
| 78 | void at91_spl_board_init(void) |
| 79 | { |
| 80 | /* |
| 81 | * On the at91sam9m10g45ek board, the chip wm9711 stays in the |
| 82 | * test mode, so it needs do some action to exit test mode. |
| 83 | */ |
| 84 | at91_periph_clk_enable(ATMEL_ID_PIODE); |
| 85 | at91_set_gpio_output(AT91_PIN_PD7, 0); |
| 86 | at91_set_gpio_output(AT91_PIN_PD8, 0); |
| 87 | at91_set_pio_pullup(AT91_PIO_PORTD, 7, 1); |
| 88 | at91_set_pio_pullup(AT91_PIO_PORTD, 8, 1); |
| 89 | |
Wenyou Yang | e035ea7 | 2017-09-14 11:07:44 +0800 | [diff] [blame] | 90 | #ifdef CONFIG_SD_BOOT |
Bo Shen | c56e9f4 | 2015-03-27 14:23:34 +0800 | [diff] [blame] | 91 | at91_mci_hw_init(); |
Wenyou Yang | e035ea7 | 2017-09-14 11:07:44 +0800 | [diff] [blame] | 92 | #elif CONFIG_NAND_BOOT |
Bo Shen | c56e9f4 | 2015-03-27 14:23:34 +0800 | [diff] [blame] | 93 | at91sam9m10g45ek_nand_hw_init(); |
| 94 | #endif |
| 95 | } |
| 96 | |
| 97 | #include <asm/arch/atmel_mpddrc.h> |
Wenyou Yang | aa0a58d | 2016-02-01 18:12:15 +0800 | [diff] [blame] | 98 | static void ddr2_conf(struct atmel_mpddrc_config *ddr2) |
Bo Shen | c56e9f4 | 2015-03-27 14:23:34 +0800 | [diff] [blame] | 99 | { |
| 100 | ddr2->md = (ATMEL_MPDDRC_MD_DBW_16_BITS | ATMEL_MPDDRC_MD_DDR2_SDRAM); |
| 101 | |
| 102 | ddr2->cr = (ATMEL_MPDDRC_CR_NC_COL_10 | |
| 103 | ATMEL_MPDDRC_CR_NR_ROW_14 | |
| 104 | ATMEL_MPDDRC_CR_DQMS_SHARED | |
| 105 | ATMEL_MPDDRC_CR_CAS_DDR_CAS3); |
| 106 | |
| 107 | ddr2->rtr = 0x24b; |
| 108 | |
| 109 | ddr2->tpr0 = (6 << ATMEL_MPDDRC_TPR0_TRAS_OFFSET |/* 6*7.5 = 45 ns */ |
| 110 | 2 << ATMEL_MPDDRC_TPR0_TRCD_OFFSET |/* 2*7.5 = 15 ns */ |
| 111 | 2 << ATMEL_MPDDRC_TPR0_TWR_OFFSET | /* 2*7.5 = 15 ns */ |
| 112 | 8 << ATMEL_MPDDRC_TPR0_TRC_OFFSET | /* 8*7.5 = 60 ns */ |
| 113 | 2 << ATMEL_MPDDRC_TPR0_TRP_OFFSET | /* 2*7.5 = 15 ns */ |
| 114 | 1 << ATMEL_MPDDRC_TPR0_TRRD_OFFSET | /* 1*7.5= 7.5 ns*/ |
| 115 | 1 << ATMEL_MPDDRC_TPR0_TWTR_OFFSET | /* 1 clk cycle */ |
| 116 | 2 << ATMEL_MPDDRC_TPR0_TMRD_OFFSET); /* 2 clk cycles */ |
| 117 | |
| 118 | ddr2->tpr1 = (2 << ATMEL_MPDDRC_TPR1_TXP_OFFSET | /* 2*7.5 = 15 ns */ |
| 119 | 200 << ATMEL_MPDDRC_TPR1_TXSRD_OFFSET | |
| 120 | 16 << ATMEL_MPDDRC_TPR1_TXSNR_OFFSET | |
| 121 | 14 << ATMEL_MPDDRC_TPR1_TRFC_OFFSET); |
| 122 | |
| 123 | ddr2->tpr2 = (1 << ATMEL_MPDDRC_TPR2_TRTP_OFFSET | |
| 124 | 0 << ATMEL_MPDDRC_TPR2_TRPA_OFFSET | |
| 125 | 7 << ATMEL_MPDDRC_TPR2_TXARDS_OFFSET | |
| 126 | 2 << ATMEL_MPDDRC_TPR2_TXARD_OFFSET); |
| 127 | } |
| 128 | |
| 129 | void mem_init(void) |
| 130 | { |
Wenyou Yang | aa0a58d | 2016-02-01 18:12:15 +0800 | [diff] [blame] | 131 | struct atmel_mpddrc_config ddr2; |
Bo Shen | c56e9f4 | 2015-03-27 14:23:34 +0800 | [diff] [blame] | 132 | |
| 133 | ddr2_conf(&ddr2); |
| 134 | |
Wenyou Yang | 78f8976 | 2016-02-03 10:16:50 +0800 | [diff] [blame] | 135 | at91_system_clk_enable(AT91_PMC_DDR); |
Bo Shen | c56e9f4 | 2015-03-27 14:23:34 +0800 | [diff] [blame] | 136 | |
Bo Shen | c56e9f4 | 2015-03-27 14:23:34 +0800 | [diff] [blame] | 137 | /* DDRAM2 Controller initialize */ |
Erik van Luijk | 59d780a | 2015-08-13 15:43:18 +0200 | [diff] [blame] | 138 | ddr2_init(ATMEL_BASE_DDRSDRC0, ATMEL_BASE_CS6, &ddr2); |
Bo Shen | c56e9f4 | 2015-03-27 14:23:34 +0800 | [diff] [blame] | 139 | } |
| 140 | #endif |
| 141 | |
Sergey Matyukevich | d25010d | 2010-06-09 23:09:06 +0400 | [diff] [blame] | 142 | #ifdef CONFIG_CMD_USB |
| 143 | static void at91sam9m10g45ek_usb_hw_init(void) |
| 144 | { |
Wenyou Yang | 78f8976 | 2016-02-03 10:16:50 +0800 | [diff] [blame] | 145 | at91_periph_clk_enable(ATMEL_ID_PIODE); |
Sergey Matyukevich | d25010d | 2010-06-09 23:09:06 +0400 | [diff] [blame] | 146 | |
| 147 | at91_set_gpio_output(AT91_PIN_PD1, 0); |
| 148 | at91_set_gpio_output(AT91_PIN_PD3, 0); |
| 149 | } |
| 150 | #endif |
| 151 | |
Sedji Gaouaou | 538566d | 2009-07-09 10:16:29 +0200 | [diff] [blame] | 152 | #ifdef CONFIG_LCD |
| 153 | |
| 154 | vidinfo_t panel_info = { |
Jeroen Hofstee | e887b72 | 2014-06-10 00:16:23 +0200 | [diff] [blame] | 155 | .vl_col = 480, |
| 156 | .vl_row = 272, |
| 157 | .vl_clk = 9000000, |
| 158 | .vl_sync = ATMEL_LCDC_INVLINE_NORMAL | |
| 159 | ATMEL_LCDC_INVFRAME_NORMAL, |
| 160 | .vl_bpix = 3, |
| 161 | .vl_tft = 1, |
| 162 | .vl_hsync_len = 45, |
| 163 | .vl_left_margin = 1, |
| 164 | .vl_right_margin = 1, |
| 165 | .vl_vsync_len = 1, |
| 166 | .vl_upper_margin = 40, |
| 167 | .vl_lower_margin = 1, |
| 168 | .mmio = ATMEL_BASE_LCDC, |
Sedji Gaouaou | 538566d | 2009-07-09 10:16:29 +0200 | [diff] [blame] | 169 | }; |
| 170 | |
| 171 | |
| 172 | void lcd_enable(void) |
| 173 | { |
| 174 | at91_set_A_periph(AT91_PIN_PE6, 1); /* power up */ |
| 175 | } |
| 176 | |
| 177 | void lcd_disable(void) |
| 178 | { |
| 179 | at91_set_A_periph(AT91_PIN_PE6, 0); /* power down */ |
| 180 | } |
| 181 | |
| 182 | static void at91sam9m10g45ek_lcd_hw_init(void) |
| 183 | { |
| 184 | at91_set_A_periph(AT91_PIN_PE0, 0); /* LCDDPWR */ |
| 185 | at91_set_A_periph(AT91_PIN_PE2, 0); /* LCDCC */ |
| 186 | at91_set_A_periph(AT91_PIN_PE3, 0); /* LCDVSYNC */ |
| 187 | at91_set_A_periph(AT91_PIN_PE4, 0); /* LCDHSYNC */ |
| 188 | at91_set_A_periph(AT91_PIN_PE5, 0); /* LCDDOTCK */ |
| 189 | |
| 190 | at91_set_A_periph(AT91_PIN_PE7, 0); /* LCDD0 */ |
| 191 | at91_set_A_periph(AT91_PIN_PE8, 0); /* LCDD1 */ |
| 192 | at91_set_A_periph(AT91_PIN_PE9, 0); /* LCDD2 */ |
| 193 | at91_set_A_periph(AT91_PIN_PE10, 0); /* LCDD3 */ |
| 194 | at91_set_A_periph(AT91_PIN_PE11, 0); /* LCDD4 */ |
| 195 | at91_set_A_periph(AT91_PIN_PE12, 0); /* LCDD5 */ |
| 196 | at91_set_A_periph(AT91_PIN_PE13, 0); /* LCDD6 */ |
| 197 | at91_set_A_periph(AT91_PIN_PE14, 0); /* LCDD7 */ |
| 198 | at91_set_A_periph(AT91_PIN_PE15, 0); /* LCDD8 */ |
| 199 | at91_set_A_periph(AT91_PIN_PE16, 0); /* LCDD9 */ |
| 200 | at91_set_A_periph(AT91_PIN_PE17, 0); /* LCDD10 */ |
| 201 | at91_set_A_periph(AT91_PIN_PE18, 0); /* LCDD11 */ |
| 202 | at91_set_A_periph(AT91_PIN_PE19, 0); /* LCDD12 */ |
| 203 | at91_set_B_periph(AT91_PIN_PE20, 0); /* LCDD13 */ |
| 204 | at91_set_A_periph(AT91_PIN_PE21, 0); /* LCDD14 */ |
| 205 | at91_set_A_periph(AT91_PIN_PE22, 0); /* LCDD15 */ |
| 206 | at91_set_A_periph(AT91_PIN_PE23, 0); /* LCDD16 */ |
| 207 | at91_set_A_periph(AT91_PIN_PE24, 0); /* LCDD17 */ |
| 208 | at91_set_A_periph(AT91_PIN_PE25, 0); /* LCDD18 */ |
| 209 | at91_set_A_periph(AT91_PIN_PE26, 0); /* LCDD19 */ |
| 210 | at91_set_A_periph(AT91_PIN_PE27, 0); /* LCDD20 */ |
| 211 | at91_set_B_periph(AT91_PIN_PE28, 0); /* LCDD21 */ |
| 212 | at91_set_A_periph(AT91_PIN_PE29, 0); /* LCDD22 */ |
| 213 | at91_set_A_periph(AT91_PIN_PE30, 0); /* LCDD23 */ |
| 214 | |
Wenyou Yang | 78f8976 | 2016-02-03 10:16:50 +0800 | [diff] [blame] | 215 | at91_periph_clk_enable(ATMEL_ID_LCDC); |
Sedji Gaouaou | 538566d | 2009-07-09 10:16:29 +0200 | [diff] [blame] | 216 | |
| 217 | gd->fb_base = CONFIG_AT91SAM9G45_LCD_BASE; |
| 218 | } |
| 219 | |
| 220 | #ifdef CONFIG_LCD_INFO |
| 221 | #include <nand.h> |
| 222 | #include <version.h> |
| 223 | |
| 224 | void lcd_show_board_info(void) |
| 225 | { |
| 226 | ulong dram_size, nand_size; |
| 227 | int i; |
| 228 | char temp[32]; |
| 229 | |
| 230 | lcd_printf ("%s\n", U_BOOT_VERSION); |
| 231 | lcd_printf ("(C) 2008 ATMEL Corp\n"); |
| 232 | lcd_printf ("at91support@atmel.com\n"); |
| 233 | lcd_printf ("%s CPU at %s MHz\n", |
Thomas Petazzoni | a5e8576 | 2011-08-04 11:08:50 +0000 | [diff] [blame] | 234 | ATMEL_CPU_NAME, |
Sedji Gaouaou | 538566d | 2009-07-09 10:16:29 +0200 | [diff] [blame] | 235 | strmhz(temp, get_cpu_clk_rate())); |
| 236 | |
| 237 | dram_size = 0; |
| 238 | for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) |
| 239 | dram_size += gd->bd->bi_dram[i].size; |
| 240 | nand_size = 0; |
| 241 | for (i = 0; i < CONFIG_SYS_MAX_NAND_DEVICE; i++) |
Grygorii Strashko | 1e096a2 | 2017-06-26 19:13:03 -0500 | [diff] [blame] | 242 | nand_size += get_nand_dev_by_index(i)->size; |
Sedji Gaouaou | 538566d | 2009-07-09 10:16:29 +0200 | [diff] [blame] | 243 | lcd_printf (" %ld MB SDRAM, %ld MB NAND\n", |
| 244 | dram_size >> 20, |
| 245 | nand_size >> 20 ); |
| 246 | } |
| 247 | #endif /* CONFIG_LCD_INFO */ |
| 248 | #endif |
| 249 | |
Wenyou Yang | cf6667c | 2017-04-18 15:15:50 +0800 | [diff] [blame] | 250 | #ifdef CONFIG_DEBUG_UART_BOARD_INIT |
| 251 | void board_debug_uart_init(void) |
| 252 | { |
| 253 | at91_seriald_hw_init(); |
| 254 | } |
| 255 | #endif |
| 256 | |
| 257 | #ifdef CONFIG_BOARD_EARLY_INIT_F |
Thomas Petazzoni | a5e8576 | 2011-08-04 11:08:50 +0000 | [diff] [blame] | 258 | int board_early_init_f(void) |
| 259 | { |
Wenyou Yang | cf6667c | 2017-04-18 15:15:50 +0800 | [diff] [blame] | 260 | #ifdef CONFIG_DEBUG_UART |
| 261 | debug_uart_init(); |
| 262 | #endif |
Thomas Petazzoni | a5e8576 | 2011-08-04 11:08:50 +0000 | [diff] [blame] | 263 | return 0; |
| 264 | } |
Wenyou Yang | cf6667c | 2017-04-18 15:15:50 +0800 | [diff] [blame] | 265 | #endif |
Thomas Petazzoni | a5e8576 | 2011-08-04 11:08:50 +0000 | [diff] [blame] | 266 | |
Sedji Gaouaou | 538566d | 2009-07-09 10:16:29 +0200 | [diff] [blame] | 267 | int board_init(void) |
| 268 | { |
Sedji Gaouaou | 538566d | 2009-07-09 10:16:29 +0200 | [diff] [blame] | 269 | /* arch number of AT91SAM9M10G45EK-Board */ |
| 270 | #ifdef CONFIG_AT91SAM9M10G45EK |
| 271 | gd->bd->bi_arch_number = MACH_TYPE_AT91SAM9M10G45EK; |
| 272 | #elif defined CONFIG_AT91SAM9G45EKES |
| 273 | gd->bd->bi_arch_number = MACH_TYPE_AT91SAM9G45EKES; |
| 274 | #endif |
Thomas Petazzoni | a5e8576 | 2011-08-04 11:08:50 +0000 | [diff] [blame] | 275 | |
Sedji Gaouaou | 538566d | 2009-07-09 10:16:29 +0200 | [diff] [blame] | 276 | /* adress of boot parameters */ |
Thomas Petazzoni | a5e8576 | 2011-08-04 11:08:50 +0000 | [diff] [blame] | 277 | gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; |
Sedji Gaouaou | 538566d | 2009-07-09 10:16:29 +0200 | [diff] [blame] | 278 | |
Sedji Gaouaou | 538566d | 2009-07-09 10:16:29 +0200 | [diff] [blame] | 279 | #ifdef CONFIG_CMD_NAND |
| 280 | at91sam9m10g45ek_nand_hw_init(); |
| 281 | #endif |
Sergey Matyukevich | d25010d | 2010-06-09 23:09:06 +0400 | [diff] [blame] | 282 | #ifdef CONFIG_CMD_USB |
| 283 | at91sam9m10g45ek_usb_hw_init(); |
| 284 | #endif |
Sedji Gaouaou | 538566d | 2009-07-09 10:16:29 +0200 | [diff] [blame] | 285 | #ifdef CONFIG_LCD |
| 286 | at91sam9m10g45ek_lcd_hw_init(); |
| 287 | #endif |
| 288 | return 0; |
| 289 | } |
| 290 | |
| 291 | int dram_init(void) |
| 292 | { |
Thomas Petazzoni | a5e8576 | 2011-08-04 11:08:50 +0000 | [diff] [blame] | 293 | gd->ram_size = get_ram_size((void *) CONFIG_SYS_SDRAM_BASE, |
| 294 | CONFIG_SYS_SDRAM_SIZE); |
Sedji Gaouaou | 538566d | 2009-07-09 10:16:29 +0200 | [diff] [blame] | 295 | return 0; |
| 296 | } |
| 297 | |
| 298 | #ifdef CONFIG_RESET_PHY_R |
| 299 | void reset_phy(void) |
| 300 | { |
Sedji Gaouaou | 538566d | 2009-07-09 10:16:29 +0200 | [diff] [blame] | 301 | } |
| 302 | #endif |