1 /***************************************************************************/
4 * linux/arch/m68knommu/platform/523x/config.c
6 * Sub-architcture dependant initialization code for the Freescale
9 * Copyright (C) 1999-2005, Greg Ungerer (gerg@snapgear.com)
10 * Copyright (C) 2001-2003, SnapGear Inc. (www.snapgear.com)
13 /***************************************************************************/
15 #include <linux/kernel.h>
16 #include <linux/param.h>
17 #include <linux/init.h>
19 #include <asm/machdep.h>
20 #include <asm/coldfire.h>
21 #include <asm/mcfsim.h>
22 #include <asm/mcfuart.h>
24 /***************************************************************************/
26 static struct mcf_platform_uart m523x_uart_platform
[] = {
28 .mapbase
= MCF_MBAR
+ MCFUART_BASE1
,
29 .irq
= MCFINT_VECBASE
+ MCFINT_UART0
,
32 .mapbase
= MCF_MBAR
+ MCFUART_BASE2
,
33 .irq
= MCFINT_VECBASE
+ MCFINT_UART0
+ 1,
36 .mapbase
= MCF_MBAR
+ MCFUART_BASE3
,
37 .irq
= MCFINT_VECBASE
+ MCFINT_UART0
+ 2,
42 static struct platform_device m523x_uart
= {
45 .dev
.platform_data
= m523x_uart_platform
,
48 static struct resource m523x_fec_resources
[] = {
50 .start
= MCF_MBAR
+ 0x1000,
51 .end
= MCF_MBAR
+ 0x1000 + 0x7ff,
52 .flags
= IORESOURCE_MEM
,
57 .flags
= IORESOURCE_IRQ
,
62 .flags
= IORESOURCE_IRQ
,
67 .flags
= IORESOURCE_IRQ
,
71 static struct platform_device m523x_fec
= {
74 .num_resources
= ARRAY_SIZE(m523x_fec_resources
),
75 .resource
= m523x_fec_resources
,
78 static struct platform_device
*m523x_devices
[] __initdata
= {
83 /***************************************************************************/
85 static void __init
m523x_fec_init(void)
90 /* Set multi-function pins to ethernet use */
91 par
= readw(MCF_IPSBAR
+ 0x100082);
92 writew(par
| 0xf00, MCF_IPSBAR
+ 0x100082);
93 v
= readb(MCF_IPSBAR
+ 0x100078);
94 writeb(v
| 0xc0, MCF_IPSBAR
+ 0x100078);
97 /***************************************************************************/
99 static void m523x_cpu_reset(void)
102 __raw_writeb(MCF_RCR_SWRESET
, MCF_IPSBAR
+ MCF_RCR
);
105 /***************************************************************************/
107 void __init
config_BSP(char *commandp
, int size
)
109 mach_reset
= m523x_cpu_reset
;
112 /***************************************************************************/
114 static int __init
init_BSP(void)
117 platform_add_devices(m523x_devices
, ARRAY_SIZE(m523x_devices
));
121 arch_initcall(init_BSP
);
123 /***************************************************************************/