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>
|
|
|
|
*
|
2013-07-08 07:37:19 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
2002-10-11 08:43:32 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#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
|