blob: 6c79caa5f33da64e708789803994b40f59a0d4eb [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
12#include <linux/init.h>
13#include <linux/interrupt.h>
14#include <linux/ioport.h>
15#include <linux/kernel.h>
16#include <linux/mm.h>
17#include <linux/platform_device.h>
18#include <linux/sched.h>
Russell Kingfced80c2008-09-06 12:10:45 +010019#include <linux/io.h>
Manfred Gruberd941caa2006-12-17 22:10:48 +010020#include <linux/mtd/physmap.h>
21
Russell Kinga09e64f2008-08-05 16:14:15 +010022#include <mach/hardware.h>
Manfred Gruberd941caa2006-12-17 22:10:48 +010023
24#include <asm/mach/arch.h>
25#include <asm/mach-types.h>
26
27static struct ep93xx_eth_data micro9_eth_data = {
Hartley Sweetene48f3fa2008-12-08 17:57:22 +010028 .phy_id = 0x1f,
Manfred Gruberd941caa2006-12-17 22:10:48 +010029};
30
Manfred Gruberd941caa2006-12-17 22:10:48 +010031static void __init micro9_init(void)
32{
Hartley Sweetena0a08fd2008-10-04 20:01:49 +010033 ep93xx_register_eth(&micro9_eth_data, 1);
Manfred Gruberd941caa2006-12-17 22:10:48 +010034}
35
36/*
37 * Micro9-H
38 */
39#ifdef CONFIG_MACH_MICRO9H
40static struct physmap_flash_data micro9h_flash_data = {
Hartley Sweetene48f3fa2008-12-08 17:57:22 +010041 .width = 4,
Manfred Gruberd941caa2006-12-17 22:10:48 +010042};
43
44static struct resource micro9h_flash_resource = {
Hartley Sweetene48f3fa2008-12-08 17:57:22 +010045 .start = EP93XX_CS1_PHYS_BASE,
46 .end = EP93XX_CS1_PHYS_BASE + SZ_64M - 1,
47 .flags = IORESOURCE_MEM,
Manfred Gruberd941caa2006-12-17 22:10:48 +010048};
49
50static struct platform_device micro9h_flash = {
Hartley Sweetene48f3fa2008-12-08 17:57:22 +010051 .name = "physmap-flash",
52 .id = 0,
53 .dev = {
54 .platform_data = &micro9h_flash_data,
55 },
56 .num_resources = 1,
57 .resource = &micro9h_flash_resource,
Manfred Gruberd941caa2006-12-17 22:10:48 +010058};
59
60static void __init micro9h_init(void)
61{
Hartley Sweetene48f3fa2008-12-08 17:57:22 +010062 platform_device_register(&micro9h_flash);
Manfred Gruberd941caa2006-12-17 22:10:48 +010063}
64
65static void __init micro9h_init_machine(void)
66{
Hartley Sweetene48f3fa2008-12-08 17:57:22 +010067 ep93xx_init_devices();
68 micro9_init();
69 micro9h_init();
Manfred Gruberd941caa2006-12-17 22:10:48 +010070}
71
72MACHINE_START(MICRO9, "Contec Hypercontrol Micro9-H")
Hartley Sweetene48f3fa2008-12-08 17:57:22 +010073 /* Maintainer: Manfred Gruber <manfred.gruber@contec.at> */
74 .phys_io = EP93XX_APB_PHYS_BASE,
75 .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
76 .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100,
77 .map_io = ep93xx_map_io,
78 .init_irq = ep93xx_init_irq,
79 .timer = &ep93xx_timer,
80 .init_machine = micro9h_init_machine,
Manfred Gruberd941caa2006-12-17 22:10:48 +010081MACHINE_END
82#endif
83
84/*
85 * Micro9-M
86 */
87#ifdef CONFIG_MACH_MICRO9M
88static void __init micro9m_init_machine(void)
89{
Hartley Sweetene48f3fa2008-12-08 17:57:22 +010090 ep93xx_init_devices();
91 micro9_init();
Manfred Gruberd941caa2006-12-17 22:10:48 +010092}
93
94MACHINE_START(MICRO9M, "Contec Hypercontrol Micro9-M")
Hartley Sweetene48f3fa2008-12-08 17:57:22 +010095 /* Maintainer: Manfred Gruber <manfred.gruber@contec.at> */
96 .phys_io = EP93XX_APB_PHYS_BASE,
97 .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
98 .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100,
99 .map_io = ep93xx_map_io,
100 .init_irq = ep93xx_init_irq,
101 .timer = &ep93xx_timer,
102 .init_machine = micro9m_init_machine,
Manfred Gruberd941caa2006-12-17 22:10:48 +0100103MACHINE_END
104#endif
105
106/*
107 * Micro9-L
108 */
109#ifdef CONFIG_MACH_MICRO9L
110static void __init micro9l_init_machine(void)
111{
Hartley Sweetene48f3fa2008-12-08 17:57:22 +0100112 ep93xx_init_devices();
113 micro9_init();
Manfred Gruberd941caa2006-12-17 22:10:48 +0100114}
115
116MACHINE_START(MICRO9L, "Contec Hypercontrol Micro9-L")
Hartley Sweetene48f3fa2008-12-08 17:57:22 +0100117 /* Maintainer: Manfred Gruber <manfred.gruber@contec.at> */
118 .phys_io = EP93XX_APB_PHYS_BASE,
119 .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
120 .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100,
121 .map_io = ep93xx_map_io,
122 .init_irq = ep93xx_init_irq,
123 .timer = &ep93xx_timer,
124 .init_machine = micro9l_init_machine,
Manfred Gruberd941caa2006-12-17 22:10:48 +0100125MACHINE_END
126#endif
127