]> git.ipfire.org Git - thirdparty/u-boot.git/blame - board/atmel/at91rm9200ek/at91rm9200ek.c
common: Drop net.h from common header
[thirdparty/u-boot.git] / board / atmel / at91rm9200ek / at91rm9200ek.c
CommitLineData
83d290c5 1// SPDX-License-Identifier: GPL-2.0+
cb82a532 2/*
09c2b8f3 3 * (C) Copyright 2010 Andreas Bießmann <andreas@biessmann.org>
99fa97e9
AB
4 *
5 * derived from previous work
6 *
cb82a532
US
7 * (C) Copyright 2002
8 * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
9 * Marius Groeger <mgroeger@sysgo.de>
cb82a532
US
10 */
11
12#include <common.h>
9b4a205f 13#include <init.h>
90526e9f 14#include <net.h>
c041e9d2 15#include <netdev.h>
c62db35d 16#include <asm/mach-types.h>
99fa97e9
AB
17#include <asm/arch/hardware.h>
18#include <asm/arch/at91_pio.h>
3432a93b 19#include <asm/arch/at91_common.h>
c041e9d2 20#include <asm/io.h>
cb82a532
US
21
22DECLARE_GLOBAL_DATA_PTR;
23
24/* ------------------------------------------------------------------------- */
99fa97e9 25int board_init(void)
cb82a532 26{
99fa97e9 27 at91_pio_t *pio = (at91_pio_t *)AT91_PIO_BASE;
cb82a532
US
28
29 /*
30 * Correct IRDA resistor problem
31 * Set PA23_TXD in Output
32 */
80733994 33 writel(ATMEL_PMX_AA_TXD2, &pio->pioa.oer);
cb82a532
US
34
35 /* arch number of AT91RM9200EK-Board */
36 gd->bd->bi_arch_number = MACH_TYPE_AT91RM9200EK;
37 /* adress of boot parameters */
99fa97e9 38 gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
cb82a532
US
39
40 return 0;
41}
42
3432a93b
AB
43int board_early_init_f(void)
44{
45 at91_seriald_hw_init();
46 return 0;
47}
48
cb82a532
US
49int dram_init (void)
50{
99fa97e9 51 /* dram_init must store complete ramsize in gd->ram_size */
a55d23cc 52 gd->ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE,
99fa97e9 53 CONFIG_SYS_SDRAM_SIZE);
cb82a532
US
54 return 0;
55}
56
c041e9d2
JS
57#ifdef CONFIG_DRIVER_AT91EMAC
58int board_eth_init(bd_t *bis)
59{
80733994 60 return at91emac_register(bis, (u32) ATMEL_BASE_EMAC);
c041e9d2
JS
61}
62#endif