2002-10-11 08:43:32 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2002
|
|
|
|
* Kyle Harris, Nexus Technologies, Inc. kharris@nexus-tech.net
|
|
|
|
*
|
|
|
|
* (C) Copyright 2002
|
|
|
|
* Sysgo Real-Time Solutions, GmbH <www.elinos.com>
|
|
|
|
* Marius Groeger <mgroeger@sysgo.de>
|
|
|
|
*
|
|
|
|
* See file CREDITS for list of people who contributed to this
|
|
|
|
* project.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License as
|
|
|
|
* published by the Free Software Foundation; either version 2 of
|
|
|
|
* the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
|
|
|
* MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
2009-12-15 00:30:39 +00:00
|
|
|
#include <netdev.h>
|
2011-11-26 10:17:32 +00:00
|
|
|
#include <asm/arch/pxa.h>
|
2011-12-12 05:34:03 +00:00
|
|
|
#include <asm/arch/pxa-regs.h>
|
2012-09-30 10:09:49 +00:00
|
|
|
#include <asm/arch/regs-mmc.h>
|
2011-12-12 05:34:03 +00:00
|
|
|
#include <asm/io.h>
|
2002-10-11 08:43:32 +00:00
|
|
|
|
2006-03-31 16:32:53 +00:00
|
|
|
DECLARE_GLOBAL_DATA_PTR;
|
2002-10-11 08:43:32 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Miscelaneous platform dependent initialisations
|
|
|
|
*/
|
|
|
|
|
|
|
|
int board_init (void)
|
|
|
|
{
|
2010-10-20 18:55:44 +00:00
|
|
|
/* We have RAM, disable cache */
|
|
|
|
dcache_disable();
|
|
|
|
icache_disable();
|
2002-10-11 08:43:32 +00:00
|
|
|
|
|
|
|
/* arch number of Lubbock-Board */
|
2004-10-10 18:41:04 +00:00
|
|
|
gd->bd->bi_arch_number = MACH_TYPE_LUBBOCK;
|
2002-10-11 08:43:32 +00:00
|
|
|
|
|
|
|
/* adress of boot parameters */
|
|
|
|
gd->bd->bi_boot_params = 0xa0000100;
|
|
|
|
|
2011-12-12 05:34:03 +00:00
|
|
|
/* Configure GPIO6 and GPIO8 as OUT, AF1. */
|
|
|
|
setbits_le32(GPDR0, (1 << 6) | (1 << 8));
|
|
|
|
clrsetbits_le32(GAFR0_L, (3 << 12) | (3 << 16), (1 << 12) | (1 << 16));
|
|
|
|
|
2003-03-06 00:58:30 +00:00
|
|
|
return 0;
|
2002-10-11 08:43:32 +00:00
|
|
|
}
|
|
|
|
|
2012-09-30 10:09:49 +00:00
|
|
|
#ifdef CONFIG_CMD_MMC
|
|
|
|
int board_mmc_init(bd_t *bis)
|
|
|
|
{
|
|
|
|
pxa_mmc_register(0);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2004-01-20 23:12:12 +00:00
|
|
|
int board_late_init(void)
|
2003-06-15 22:40:42 +00:00
|
|
|
{
|
2004-01-20 23:12:12 +00:00
|
|
|
setenv("stdout", "serial");
|
|
|
|
setenv("stderr", "serial");
|
2003-06-15 22:40:42 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2010-10-20 18:55:44 +00:00
|
|
|
int dram_init(void)
|
|
|
|
{
|
2011-11-26 10:18:57 +00:00
|
|
|
pxa2xx_dram_init();
|
2010-10-20 18:55:44 +00:00
|
|
|
gd->ram_size = PHYS_SDRAM_1_SIZE;
|
|
|
|
return 0;
|
|
|
|
}
|
2003-06-15 22:40:42 +00:00
|
|
|
|
2010-10-20 18:55:44 +00:00
|
|
|
void dram_init_banksize(void)
|
2002-10-11 08:43:32 +00:00
|
|
|
{
|
|
|
|
gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
|
|
|
|
gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
|
|
|
|
}
|
2009-12-15 00:30:39 +00:00
|
|
|
|
|
|
|
#ifdef CONFIG_CMD_NET
|
|
|
|
int board_eth_init(bd_t *bis)
|
|
|
|
{
|
|
|
|
int rc = 0;
|
|
|
|
#ifdef CONFIG_LAN91C96
|
|
|
|
rc = lan91c96_initialize(0, CONFIG_LAN91C96_BASE);
|
|
|
|
#endif
|
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
#endif
|