blob: 0a313e82fb7440054ebd604cbfdcbb0d15b0d66c [file] [log] [blame]
Manfred Gruberd941caa2006-12-17 22:10:48 +01001/*
2 * linux/arch/arm/mach-ep93xx/micro9.c
3 *
4 * Copyright (C) 2006 Contec Steuerungstechnik & Automation GmbH
5 * Manfred Gruber <manfred.gruber@contec.at>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
Manfred Gruberd941caa2006-12-17 22:10:48 +010012#include <linux/kernel.h>
Hartley Sweeten583ddaf2009-07-06 17:39:50 +010013#include <linux/init.h>
Manfred Gruberd941caa2006-12-17 22:10:48 +010014#include <linux/platform_device.h>
Manfred Gruberd941caa2006-12-17 22:10:48 +010015#include <linux/mtd/physmap.h>
16
Russell Kinga09e64f2008-08-05 16:14:15 +010017#include <mach/hardware.h>
Manfred Gruberd941caa2006-12-17 22:10:48 +010018
Manfred Gruberd941caa2006-12-17 22:10:48 +010019#include <asm/mach-types.h>
Hartley Sweeten583ddaf2009-07-06 17:39:50 +010020#include <asm/mach/arch.h>
21
Manfred Gruberd941caa2006-12-17 22:10:48 +010022
23static struct ep93xx_eth_data micro9_eth_data = {
Hartley Sweetene48f3fa2008-12-08 17:57:22 +010024 .phy_id = 0x1f,
Manfred Gruberd941caa2006-12-17 22:10:48 +010025};
26
Manfred Gruberd941caa2006-12-17 22:10:48 +010027static void __init micro9_init(void)
28{
Hartley Sweetena0a08fd2008-10-04 20:01:49 +010029 ep93xx_register_eth(&micro9_eth_data, 1);
Manfred Gruberd941caa2006-12-17 22:10:48 +010030}
31
32/*
33 * Micro9-H
34 */
35#ifdef CONFIG_MACH_MICRO9H
36static struct physmap_flash_data micro9h_flash_data = {
Hartley Sweetene48f3fa2008-12-08 17:57:22 +010037 .width = 4,
Manfred Gruberd941caa2006-12-17 22:10:48 +010038};
39
40static struct resource micro9h_flash_resource = {
Hartley Sweetene48f3fa2008-12-08 17:57:22 +010041 .start = EP93XX_CS1_PHYS_BASE,
42 .end = EP93XX_CS1_PHYS_BASE + SZ_64M - 1,
43 .flags = IORESOURCE_MEM,
Manfred Gruberd941caa2006-12-17 22:10:48 +010044};
45
46static struct platform_device micro9h_flash = {
Hartley Sweetene48f3fa2008-12-08 17:57:22 +010047 .name = "physmap-flash",
48 .id = 0,
49 .dev = {
50 .platform_data = &micro9h_flash_data,
51 },
52 .num_resources = 1,
53 .resource = &micro9h_flash_resource,
Manfred Gruberd941caa2006-12-17 22:10:48 +010054};
55
56static void __init micro9h_init(void)
57{
Hartley Sweetene48f3fa2008-12-08 17:57:22 +010058 platform_device_register(&micro9h_flash);
Manfred Gruberd941caa2006-12-17 22:10:48 +010059}
60
61static void __init micro9h_init_machine(void)
62{
Hartley Sweetene48f3fa2008-12-08 17:57:22 +010063 ep93xx_init_devices();
64 micro9_init();
65 micro9h_init();
Manfred Gruberd941caa2006-12-17 22:10:48 +010066}
67
68MACHINE_START(MICRO9, "Contec Hypercontrol Micro9-H")
Hartley Sweetene48f3fa2008-12-08 17:57:22 +010069 /* Maintainer: Manfred Gruber <manfred.gruber@contec.at> */
70 .phys_io = EP93XX_APB_PHYS_BASE,
71 .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
72 .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100,
73 .map_io = ep93xx_map_io,
74 .init_irq = ep93xx_init_irq,
75 .timer = &ep93xx_timer,
76 .init_machine = micro9h_init_machine,
Manfred Gruberd941caa2006-12-17 22:10:48 +010077MACHINE_END
78#endif
79
80/*
81 * Micro9-M
82 */
83#ifdef CONFIG_MACH_MICRO9M
84static void __init micro9m_init_machine(void)
85{
Hartley Sweetene48f3fa2008-12-08 17:57:22 +010086 ep93xx_init_devices();
87 micro9_init();
Manfred Gruberd941caa2006-12-17 22:10:48 +010088}
89
90MACHINE_START(MICRO9M, "Contec Hypercontrol Micro9-M")
Hartley Sweetene48f3fa2008-12-08 17:57:22 +010091 /* Maintainer: Manfred Gruber <manfred.gruber@contec.at> */
92 .phys_io = EP93XX_APB_PHYS_BASE,
93 .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
94 .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100,
95 .map_io = ep93xx_map_io,
96 .init_irq = ep93xx_init_irq,
97 .timer = &ep93xx_timer,
98 .init_machine = micro9m_init_machine,
Manfred Gruberd941caa2006-12-17 22:10:48 +010099MACHINE_END
100#endif
101
102/*
103 * Micro9-L
104 */
105#ifdef CONFIG_MACH_MICRO9L
106static void __init micro9l_init_machine(void)
107{
Hartley Sweetene48f3fa2008-12-08 17:57:22 +0100108 ep93xx_init_devices();
109 micro9_init();
Manfred Gruberd941caa2006-12-17 22:10:48 +0100110}
111
112MACHINE_START(MICRO9L, "Contec Hypercontrol Micro9-L")
Hartley Sweetene48f3fa2008-12-08 17:57:22 +0100113 /* Maintainer: Manfred Gruber <manfred.gruber@contec.at> */
114 .phys_io = EP93XX_APB_PHYS_BASE,
115 .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
116 .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100,
117 .map_io = ep93xx_map_io,
118 .init_irq = ep93xx_init_irq,
119 .timer = &ep93xx_timer,
120 .init_machine = micro9l_init_machine,
Manfred Gruberd941caa2006-12-17 22:10:48 +0100121MACHINE_END
122#endif
123