]> Git Repo - J-u-boot.git/blob - board/atmel/at91rm9200ek/at91rm9200ek.c
common: Drop asm/global_data.h from common header
[J-u-boot.git] / board / atmel / at91rm9200ek / at91rm9200ek.c
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  * (C) Copyright 2010 Andreas Bießmann <[email protected]>
4  *
5  * derived from previous work
6  *
7  * (C) Copyright 2002
8  * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
9  * Marius Groeger <[email protected]>
10  */
11
12 #include <common.h>
13 #include <init.h>
14 #include <net.h>
15 #include <netdev.h>
16 #include <asm/global_data.h>
17 #include <asm/mach-types.h>
18 #include <asm/arch/hardware.h>
19 #include <asm/arch/at91_pio.h>
20 #include <asm/arch/at91_common.h>
21 #include <asm/io.h>
22
23 DECLARE_GLOBAL_DATA_PTR;
24
25 /* ------------------------------------------------------------------------- */
26 int board_init(void)
27 {
28         at91_pio_t *pio = (at91_pio_t *)AT91_PIO_BASE;
29
30         /*
31          * Correct IRDA resistor problem
32          * Set PA23_TXD in Output
33          */
34         writel(ATMEL_PMX_AA_TXD2, &pio->pioa.oer);
35
36         /* arch number of AT91RM9200EK-Board */
37         gd->bd->bi_arch_number = MACH_TYPE_AT91RM9200EK;
38         /* adress of boot parameters */
39         gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
40
41         return 0;
42 }
43
44 int board_early_init_f(void)
45 {
46         at91_seriald_hw_init();
47         return 0;
48 }
49
50 int dram_init (void)
51 {
52         /* dram_init must store complete ramsize in gd->ram_size */
53         gd->ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE,
54                         CONFIG_SYS_SDRAM_SIZE);
55         return 0;
56 }
57
58 #ifdef CONFIG_DRIVER_AT91EMAC
59 int board_eth_init(struct bd_info *bis)
60 {
61         return at91emac_register(bis, (u32) ATMEL_BASE_EMAC);
62 }
63 #endif
This page took 0.030188 seconds and 4 git commands to generate.