2005-09-01 18:42:52 -06:00
|
|
|
/***************************************************************************/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* linux/arch/m68knommu/platform/523x/config.c
|
|
|
|
*
|
2011-03-30 19:57:33 -06:00
|
|
|
* Sub-architcture dependent initialization code for the Freescale
|
2005-09-01 18:42:52 -06:00
|
|
|
* 523x CPUs.
|
|
|
|
*
|
|
|
|
* Copyright (C) 1999-2005, Greg Ungerer (gerg@snapgear.com)
|
|
|
|
* Copyright (C) 2001-2003, SnapGear Inc. (www.snapgear.com)
|
|
|
|
*/
|
|
|
|
|
|
|
|
/***************************************************************************/
|
|
|
|
|
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/param.h>
|
|
|
|
#include <linux/init.h>
|
2008-02-01 00:34:15 -07:00
|
|
|
#include <linux/io.h>
|
2005-09-01 18:42:52 -06:00
|
|
|
#include <asm/machdep.h>
|
|
|
|
#include <asm/coldfire.h>
|
|
|
|
#include <asm/mcfsim.h>
|
|
|
|
|
|
|
|
/***************************************************************************/
|
|
|
|
|
2011-12-23 19:56:10 -07:00
|
|
|
#ifdef CONFIG_SPI_COLDFIRE_QSPI
|
2010-01-22 13:43:03 -07:00
|
|
|
|
|
|
|
static void __init m523x_qspi_init(void)
|
|
|
|
{
|
|
|
|
u16 par;
|
|
|
|
|
|
|
|
/* setup QSPS pins for QSPI with gpio CS control */
|
|
|
|
writeb(0x1f, MCFGPIO_PAR_QSPI);
|
|
|
|
/* and CS2 & CS3 as gpio */
|
|
|
|
par = readw(MCFGPIO_PAR_TIMER);
|
|
|
|
par &= 0x3f3f;
|
|
|
|
writew(par, MCFGPIO_PAR_TIMER);
|
|
|
|
}
|
|
|
|
|
2011-12-23 19:56:10 -07:00
|
|
|
#endif /* CONFIG_SPI_COLDFIRE_QSPI */
|
2005-09-01 18:42:52 -06:00
|
|
|
|
2008-02-01 00:34:15 -07:00
|
|
|
/***************************************************************************/
|
|
|
|
|
2009-08-12 00:14:43 -06:00
|
|
|
static void __init m523x_fec_init(void)
|
|
|
|
{
|
|
|
|
u16 par;
|
|
|
|
u8 v;
|
|
|
|
|
|
|
|
/* Set multi-function pins to ethernet use */
|
|
|
|
par = readw(MCF_IPSBAR + 0x100082);
|
|
|
|
writew(par | 0xf00, MCF_IPSBAR + 0x100082);
|
|
|
|
v = readb(MCF_IPSBAR + 0x100078);
|
|
|
|
writeb(v | 0xc0, MCF_IPSBAR + 0x100078);
|
|
|
|
}
|
|
|
|
|
|
|
|
/***************************************************************************/
|
|
|
|
|
2008-02-01 00:34:15 -07:00
|
|
|
void __init config_BSP(char *commandp, int size)
|
2005-09-01 18:42:52 -06:00
|
|
|
{
|
2012-01-22 22:34:58 -07:00
|
|
|
mach_sched_init = hw_timer_init;
|
2011-12-23 20:00:02 -07:00
|
|
|
m523x_fec_init();
|
2011-12-23 19:56:10 -07:00
|
|
|
#ifdef CONFIG_SPI_COLDFIRE_QSPI
|
2010-01-22 13:43:03 -07:00
|
|
|
m523x_qspi_init();
|
|
|
|
#endif
|
2008-02-01 00:34:15 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
/***************************************************************************/
|