2002-10-11 02:43:32 -06: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 01:37:19 -06:00
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
2002-10-11 02:43:32 -06:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
2009-12-14 17:30:39 -07:00
|
|
|
#include <netdev.h>
|
2011-11-26 03:17:32 -07:00
|
|
|
#include <asm/arch/pxa.h>
|
2011-12-11 22:34:03 -07:00
|
|
|
#include <asm/arch/pxa-regs.h>
|
2012-09-30 04:09:49 -06:00
|
|
|
#include <asm/arch/regs-mmc.h>
|
2011-12-11 22:34:03 -07:00
|
|
|
#include <asm/io.h>
|
2002-10-11 02:43:32 -06:00
|
|
|
|
2006-03-31 09:32:53 -07:00
|
|
|
DECLARE_GLOBAL_DATA_PTR;
|
2002-10-11 02:43:32 -06:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Miscelaneous platform dependent initialisations
|
|
|
|
*/
|
|
|
|
|
|
|
|
int board_init (void)
|
|
|
|
{
|
2010-10-20 12:55:44 -06:00
|
|
|
/* We have RAM, disable cache */
|
|
|
|
dcache_disable();
|
|
|
|
icache_disable();
|
2002-10-11 02:43:32 -06:00
|
|
|
|
|
|
|
/* arch number of Lubbock-Board */
|
2004-10-10 12:41:04 -06:00
|
|
|
gd->bd->bi_arch_number = MACH_TYPE_LUBBOCK;
|
2002-10-11 02:43:32 -06:00
|
|
|
|
|
|
|
/* adress of boot parameters */
|
|
|
|
gd->bd->bi_boot_params = 0xa0000100;
|
|
|
|
|
2011-12-11 22:34:03 -07: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-05 17:58:30 -07:00
|
|
|
return 0;
|
2002-10-11 02:43:32 -06:00
|
|
|
}
|
|
|
|
|
2012-09-30 04:09:49 -06:00
|
|
|
#ifdef CONFIG_CMD_MMC
|
|
|
|
int board_mmc_init(bd_t *bis)
|
|
|
|
{
|
|
|
|
pxa_mmc_register(0);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2004-01-20 16:12:12 -07:00
|
|
|
int board_late_init(void)
|
2003-06-15 16:40:42 -06:00
|
|
|
{
|
2004-01-20 16:12:12 -07:00
|
|
|
setenv("stdout", "serial");
|
|
|
|
setenv("stderr", "serial");
|
2003-06-15 16:40:42 -06:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2010-10-20 12:55:44 -06:00
|
|
|
int dram_init(void)
|
|
|
|
{
|
2011-11-26 03:18:57 -07:00
|
|
|
pxa2xx_dram_init();
|
2010-10-20 12:55:44 -06:00
|
|
|
gd->ram_size = PHYS_SDRAM_1_SIZE;
|
|
|
|
return 0;
|
|
|
|
}
|
2003-06-15 16:40:42 -06:00
|
|
|
|
2010-10-20 12:55:44 -06:00
|
|
|
void dram_init_banksize(void)
|
2002-10-11 02:43:32 -06:00
|
|
|
{
|
|
|
|
gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
|
|
|
|
gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
|
|
|
|
}
|
2009-12-14 17:30:39 -07: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
|