]>
Commit | Line | Data |
---|---|---|
cb82a532 | 1 | /* |
99fa97e9 AB |
2 | * (C) Copyright 2010 Andreas Bießmann <andreas.devel@gmail.com> |
3 | * | |
4 | * derived from previous work | |
5 | * | |
cb82a532 US |
6 | * (C) Copyright 2002 |
7 | * Sysgo Real-Time Solutions, GmbH <www.elinos.com> | |
8 | * Marius Groeger <mgroeger@sysgo.de> | |
9 | * | |
10 | * See file CREDITS for list of people who contributed to this | |
11 | * project. | |
12 | * | |
13 | * This program is free software; you can redistribute it and/or | |
14 | * modify it under the terms of the GNU General Public License as | |
15 | * published by the Free Software Foundation; either version 2 of | |
16 | * the License, or (at your option) any later version. | |
17 | * | |
18 | * This program is distributed in the hope that it will be useful, | |
19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
21 | * GNU General Public License for more details. | |
22 | * | |
23 | * You should have received a copy of the GNU General Public License | |
24 | * along with this program; if not, write to the Free Software | |
25 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | |
26 | * MA 02111-1307 USA | |
27 | */ | |
28 | ||
29 | #include <common.h> | |
c041e9d2 | 30 | #include <netdev.h> |
99fa97e9 AB |
31 | #include <asm/arch/hardware.h> |
32 | #include <asm/arch/at91_pio.h> | |
33 | #include <asm/arch/at91_pmc.h> | |
c041e9d2 | 34 | #include <asm/io.h> |
cb82a532 US |
35 | |
36 | DECLARE_GLOBAL_DATA_PTR; | |
37 | ||
38 | /* ------------------------------------------------------------------------- */ | |
99fa97e9 | 39 | int board_init(void) |
cb82a532 | 40 | { |
99fa97e9 | 41 | at91_pio_t *pio = (at91_pio_t *)AT91_PIO_BASE; |
cb82a532 US |
42 | |
43 | /* | |
44 | * Correct IRDA resistor problem | |
45 | * Set PA23_TXD in Output | |
46 | */ | |
99fa97e9 | 47 | writel(AT91_PMX_AA_TXD2, &pio->pioa.oer); |
cb82a532 US |
48 | |
49 | /* arch number of AT91RM9200EK-Board */ | |
50 | gd->bd->bi_arch_number = MACH_TYPE_AT91RM9200EK; | |
51 | /* adress of boot parameters */ | |
99fa97e9 | 52 | gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; |
cb82a532 US |
53 | |
54 | return 0; | |
55 | } | |
56 | ||
57 | int dram_init (void) | |
58 | { | |
99fa97e9 AB |
59 | /* dram_init must store complete ramsize in gd->ram_size */ |
60 | gd->ram_size = get_ram_size((volatile long *)CONFIG_SYS_SDRAM_BASE, | |
61 | CONFIG_SYS_SDRAM_SIZE); | |
cb82a532 US |
62 | return 0; |
63 | } | |
64 | ||
c041e9d2 JS |
65 | #ifdef CONFIG_DRIVER_AT91EMAC |
66 | int board_eth_init(bd_t *bis) | |
67 | { | |
99fa97e9 | 68 | return at91emac_register(bis, (u32) AT91_EMAC_BASE); |
c041e9d2 JS |
69 | } |
70 | #endif |