blob: ea684e949d080085c8456e14fd4f6c8f4d61e7e9 [file] [log] [blame]
Ulf Samuelssoncb82a532009-03-27 23:26:43 +01001/*
2 * (C) Copyright 2002
3 * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
4 * Marius Groeger <mgroeger@sysgo.de>
5 *
6 * See file CREDITS for list of people who contributed to this
7 * project.
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of
12 * the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
22 * MA 02111-1307 USA
23 */
24
25#include <common.h>
26#include <asm/arch/AT91RM9200.h>
27#include <at91rm9200_net.h>
28#include <dm9161.h>
29
30DECLARE_GLOBAL_DATA_PTR;
31
32/* ------------------------------------------------------------------------- */
33/*
34 * Miscelaneous platform dependent initialisations
35 */
36
37int board_init (void)
38{
39 /* Enable Ctrlc */
40 console_init_f ();
41
42 /*
43 * Correct IRDA resistor problem
44 * Set PA23_TXD in Output
45 */
46 writel(AT91C_PA23_TXD2, ((AT91PS_PIO) AT91C_BASE_PIOA)->PIO_OER);
47
48 /*
49 * memory and cpu-speed are setup before relocation
50 * so we do _nothing_ here
51 */
52
53 /* arch number of AT91RM9200EK-Board */
54 gd->bd->bi_arch_number = MACH_TYPE_AT91RM9200EK;
55 /* adress of boot parameters */
56 gd->bd->bi_boot_params = PHYS_SDRAM + 0x100;
57
58 return 0;
59}
60
61int dram_init (void)
62{
63 gd->bd->bi_dram[0].start = PHYS_SDRAM;
64 gd->bd->bi_dram[0].size = PHYS_SDRAM_SIZE;
65 return 0;
66}
67
68#if defined(CONFIG_DRIVER_ETHER) && defined(CONFIG_CMD_NET)
69/*
70 * Name:
71 * at91rm9200_GetPhyInterface
72 * Description:
73 * Initialise the interface functions to the PHY
74 * Arguments:
75 * None
76 * Return value:
77 * None
78 */
79void at91rm9200_GetPhyInterface(AT91PS_PhyOps p_phyops)
80{
81 p_phyops->Init = dm9161_InitPhy;
82 p_phyops->IsPhyConnected = dm9161_IsPhyConnected;
83 p_phyops->GetLinkSpeed = dm9161_GetLinkSpeed;
84 p_phyops->AutoNegotiate = dm9161_AutoNegotiate;
85}
86#endif