2004-06-09 13:37:52 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2002
|
|
|
|
* Sysgo Real-Time Solutions, GmbH <www.elinos.com>
|
|
|
|
* Marius Groeger <mgroeger@sysgo.de>
|
|
|
|
*
|
|
|
|
* (C) Copyright 2002
|
2009-05-13 08:54:10 +00:00
|
|
|
* Gary Jennejohn, DENX Software Engineering, <garyj@denx.de>
|
2004-06-09 13:37:52 +00:00
|
|
|
*
|
|
|
|
* 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-10-05 05:37:03 +00:00
|
|
|
#include <netdev.h>
|
2004-06-09 13:37:52 +00:00
|
|
|
#if defined(CONFIG_LH7A400)
|
|
|
|
#include <lh7a400.h>
|
|
|
|
#elif defined(CONFIG_LH7A404)
|
|
|
|
#include <lh7a404.h>
|
|
|
|
#else
|
|
|
|
#error "No CPU defined!"
|
|
|
|
#endif
|
2004-06-10 21:55:33 +00:00
|
|
|
#include <asm/mach-types.h>
|
|
|
|
|
|
|
|
#include <lpd7a400_cpld.h>
|
2004-06-09 13:37:52 +00:00
|
|
|
|
2006-03-31 16:32:53 +00:00
|
|
|
DECLARE_GLOBAL_DATA_PTR;
|
|
|
|
|
2004-06-09 13:37:52 +00:00
|
|
|
/*
|
|
|
|
* Miscellaneous platform dependent initialisations
|
|
|
|
*/
|
|
|
|
|
|
|
|
int board_init (void)
|
|
|
|
{
|
|
|
|
/* set up the I/O ports */
|
|
|
|
|
|
|
|
/* enable flash programming */
|
|
|
|
*(LPD7A400_CPLD_REGPTR(LPD7A400_CPLD_FLASH_REG)) |= FLASH_FPEN;
|
|
|
|
|
|
|
|
/* Auto wakeup, LCD disable, WLAN enable */
|
|
|
|
*(LPD7A400_CPLD_REGPTR(LPD7A400_CPLD_CECTL_REG)) &=
|
|
|
|
~(CECTL_AWKP|CECTL_LCDV|CECTL_WLPE);
|
|
|
|
|
|
|
|
/* Status LED 2 on (leds are active low) */
|
|
|
|
*(LPD7A400_CPLD_REGPTR(LPD7A400_CPLD_EXTGPIO_REG)) =
|
|
|
|
(EXTGPIO_STATUS1|EXTGPIO_GPIO1) & ~(EXTGPIO_STATUS2);
|
|
|
|
|
2004-06-10 21:55:33 +00:00
|
|
|
#if defined(CONFIG_LH7A400)
|
2004-06-09 13:37:52 +00:00
|
|
|
/* arch number of Logic-Board - MACH_TYPE_LPD7A400 */
|
|
|
|
gd->bd->bi_arch_number = MACH_TYPE_LPD7A400;
|
|
|
|
#elif defined(CONFIG_LH7A404)
|
2004-06-10 21:55:33 +00:00
|
|
|
/* arch number of Logic-Board - MACH_TYPE_LPD7A400 */
|
|
|
|
gd->bd->bi_arch_number = MACH_TYPE_LPD7A404;
|
2004-06-09 13:37:52 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* adress of boot parameters */
|
|
|
|
gd->bd->bi_boot_params = 0xc0000100;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
int dram_init (void)
|
|
|
|
{
|
|
|
|
gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
|
|
|
|
gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
2009-10-05 05:37:03 +00:00
|
|
|
|
|
|
|
#ifdef CONFIG_CMD_NET
|
|
|
|
int board_eth_init(bd_t *bis)
|
|
|
|
{
|
|
|
|
int rc = 0;
|
|
|
|
#ifdef CONFIG_SMC91111
|
|
|
|
rc = smc91111_initialize(0, CONFIG_SMC91111_BASE);
|
|
|
|
#endif
|
|
|
|
return rc;
|
|
|
|
}
|
|
|
|
#endif
|