2 * linux/arch/arm/mach-ep93xx/micro9.c
4 * Copyright (C) 2006 Contec Steuerungstechnik & Automation GmbH
5 * Manfred Gruber <m.gruber@tirol.com>
6 * Copyright (C) 2009 Contec Steuerungstechnik & Automation GmbH
7 * Hubert Feurstein <hubert.feurstein@contec.at>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
14 #include <linux/kernel.h>
15 #include <linux/init.h>
16 #include <linux/platform_device.h>
21 #include <asm/mach-types.h>
22 #include <asm/mach/arch.h>
26 /*************************************************************************
29 * Micro9-High has up to 64MB of 32-bit flash on CS1
30 * Micro9-Mid has up to 64MB of either 32-bit or 16-bit flash on CS1
31 * Micro9-Lite uses a separate MTD map driver for flash support
32 * Micro9-Slim has up to 64MB of either 32-bit or 16-bit flash on CS1
33 *************************************************************************/
34 static unsigned int __init
micro9_detect_bootwidth(void)
38 /* Detect the bus width of the external flash memory */
39 v
= __raw_readl(EP93XX_SYSCON_SYSCFG
);
40 if (v
& EP93XX_SYSCON_SYSCFG_LCSN7
)
41 return 4; /* 32-bit */
43 return 2; /* 16-bit */
46 static void __init
micro9_register_flash(void)
50 if (machine_is_micro9())
52 else if (machine_is_micro9m() || machine_is_micro9s())
53 width
= micro9_detect_bootwidth();
58 ep93xx_register_flash(width
, EP93XX_CS1_PHYS_BASE
, SZ_64M
);
62 /*************************************************************************
64 *************************************************************************/
65 static struct ep93xx_eth_data __initdata micro9_eth_data
= {
70 static void __init
micro9_init_machine(void)
72 ep93xx_init_devices();
73 ep93xx_register_eth(µ9_eth_data
, 1);
74 micro9_register_flash();
78 #ifdef CONFIG_MACH_MICRO9H
79 MACHINE_START(MICRO9
, "Contec Micro9-High")
80 /* Maintainer: Hubert Feurstein <hubert.feurstein@contec.at> */
82 .map_io
= ep93xx_map_io
,
83 .init_irq
= ep93xx_init_irq
,
84 .init_time
= ep93xx_timer_init
,
85 .init_machine
= micro9_init_machine
,
86 .init_late
= ep93xx_init_late
,
87 .restart
= ep93xx_restart
,
91 #ifdef CONFIG_MACH_MICRO9M
92 MACHINE_START(MICRO9M
, "Contec Micro9-Mid")
93 /* Maintainer: Hubert Feurstein <hubert.feurstein@contec.at> */
95 .map_io
= ep93xx_map_io
,
96 .init_irq
= ep93xx_init_irq
,
97 .init_time
= ep93xx_timer_init
,
98 .init_machine
= micro9_init_machine
,
99 .init_late
= ep93xx_init_late
,
100 .restart
= ep93xx_restart
,
104 #ifdef CONFIG_MACH_MICRO9L
105 MACHINE_START(MICRO9L
, "Contec Micro9-Lite")
106 /* Maintainer: Hubert Feurstein <hubert.feurstein@contec.at> */
107 .atag_offset
= 0x100,
108 .map_io
= ep93xx_map_io
,
109 .init_irq
= ep93xx_init_irq
,
110 .init_time
= ep93xx_timer_init
,
111 .init_machine
= micro9_init_machine
,
112 .init_late
= ep93xx_init_late
,
113 .restart
= ep93xx_restart
,
117 #ifdef CONFIG_MACH_MICRO9S
118 MACHINE_START(MICRO9S
, "Contec Micro9-Slim")
119 /* Maintainer: Hubert Feurstein <hubert.feurstein@contec.at> */
120 .atag_offset
= 0x100,
121 .map_io
= ep93xx_map_io
,
122 .init_irq
= ep93xx_init_irq
,
123 .init_time
= ep93xx_timer_init
,
124 .init_machine
= micro9_init_machine
,
125 .init_late
= ep93xx_init_late
,
126 .restart
= ep93xx_restart
,