]>
Commit | Line | Data |
---|---|---|
cb82a532 | 1 | /* |
09c2b8f3 | 2 | * (C) Copyright 2010 Andreas Bießmann <andreas@biessmann.org> |
99fa97e9 AB |
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 | * | |
1a459660 | 10 | * SPDX-License-Identifier: GPL-2.0+ |
cb82a532 US |
11 | */ |
12 | ||
13 | #include <common.h> | |
c041e9d2 | 14 | #include <netdev.h> |
c62db35d | 15 | #include <asm/mach-types.h> |
99fa97e9 AB |
16 | #include <asm/arch/hardware.h> |
17 | #include <asm/arch/at91_pio.h> | |
3432a93b | 18 | #include <asm/arch/at91_common.h> |
c041e9d2 | 19 | #include <asm/io.h> |
cb82a532 US |
20 | |
21 | DECLARE_GLOBAL_DATA_PTR; | |
22 | ||
23 | /* ------------------------------------------------------------------------- */ | |
99fa97e9 | 24 | int board_init(void) |
cb82a532 | 25 | { |
99fa97e9 | 26 | at91_pio_t *pio = (at91_pio_t *)AT91_PIO_BASE; |
cb82a532 US |
27 | |
28 | /* | |
29 | * Correct IRDA resistor problem | |
30 | * Set PA23_TXD in Output | |
31 | */ | |
80733994 | 32 | writel(ATMEL_PMX_AA_TXD2, &pio->pioa.oer); |
cb82a532 US |
33 | |
34 | /* arch number of AT91RM9200EK-Board */ | |
35 | gd->bd->bi_arch_number = MACH_TYPE_AT91RM9200EK; | |
36 | /* adress of boot parameters */ | |
99fa97e9 | 37 | gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; |
cb82a532 US |
38 | |
39 | return 0; | |
40 | } | |
41 | ||
3432a93b AB |
42 | int board_early_init_f(void) |
43 | { | |
44 | at91_seriald_hw_init(); | |
45 | return 0; | |
46 | } | |
47 | ||
cb82a532 US |
48 | int dram_init (void) |
49 | { | |
99fa97e9 | 50 | /* dram_init must store complete ramsize in gd->ram_size */ |
a55d23cc | 51 | gd->ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE, |
99fa97e9 | 52 | CONFIG_SYS_SDRAM_SIZE); |
cb82a532 US |
53 | return 0; |
54 | } | |
55 | ||
c041e9d2 JS |
56 | #ifdef CONFIG_DRIVER_AT91EMAC |
57 | int board_eth_init(bd_t *bis) | |
58 | { | |
80733994 | 59 | return at91emac_register(bis, (u32) ATMEL_BASE_EMAC); |
c041e9d2 JS |
60 | } |
61 | #endif |