]>
git.ipfire.org Git - people/ms/u-boot.git/blob - board/eukrea/cpuat91/cpuat91.c
2 * (C) Copyright 2006-2010 Eukrea Electromatique <www.eukrea.com>
3 * Eric Benard <eric@eukrea.com>
4 * based on at91rm9200dk.c which is :
6 * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
7 * Marius Groeger <mgroeger@sysgo.de>
9 * SPDX-License-Identifier: GPL-2.0+
16 #include <asm/arch/hardware.h>
17 #include <asm/arch/at91_pio.h>
18 #include <asm/arch/at91_pmc.h>
19 #include <asm/arch/at91_common.h>
21 DECLARE_GLOBAL_DATA_PTR
;
23 /* ------------------------------------------------------------------------- */
25 * Miscelaneous platform dependent initialisations
30 /* arch number of CPUAT91-Board */
31 gd
->bd
->bi_arch_number
= MACH_TYPE_CPUAT91
;
32 /* adress of boot parameters */
33 gd
->bd
->bi_boot_params
= CONFIG_SYS_SDRAM_BASE
+ 0x100;
38 int board_early_init_f(void)
40 at91_seriald_hw_init();
47 /* dram_init must store complete ramsize in gd->ram_size */
48 gd
->ram_size
= get_ram_size((long *)CONFIG_SYS_SDRAM_BASE
,
49 CONFIG_SYS_SDRAM_SIZE
);
53 #ifdef CONFIG_DRIVER_AT91EMAC
54 int board_eth_init(bd_t
*bis
)
56 return at91emac_register(bis
, (u32
) ATMEL_BASE_EMAC
);
60 #ifdef CONFIG_SYS_I2C_SOFT
61 void i2c_init_board(void)
64 at91_pmc_t
*pmc
= (at91_pmc_t
*) ATMEL_BASE_PMC
;
65 at91_pio_t
*pio
= (at91_pio_t
*) ATMEL_BASE_PIO
;
67 writel(1 << AT91_ID_PIOA
, &pmc
->pcer
);
68 pin
= AT91_PMX_AA_TWD
| AT91_PMX_AA_TWCK
;
69 writel(pin
, &pio
->pioa
.idr
);
70 writel(pin
, &pio
->pioa
.pudr
);
71 writel(pin
, &pio
->pioa
.per
);
72 writel(pin
, &pio
->pioa
.oer
);
73 writel(pin
, &pio
->pioa
.sodr
);