blob: 72e7a7dfd7bf6b7b4cc494fb05e3bb1a227e2b9b [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
Hubert Feurstein94150092009-10-07 08:36:07 +01005 * Manfred Gruber <m.gruber@tirol.com>
6 * Copyright (C) 2009 Contec Steuerungstechnik & Automation GmbH
7 * Hubert Feurstein <hubert.feurstein@contec.at>
Manfred Gruberd941caa2006-12-17 22:10:48 +01008 *
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.
12 */
13
Manfred Gruberd941caa2006-12-17 22:10:48 +010014#include <linux/kernel.h>
Hartley Sweeten583ddaf2009-07-06 17:39:50 +010015#include <linux/init.h>
Manfred Gruberd941caa2006-12-17 22:10:48 +010016#include <linux/platform_device.h>
Manfred Gruberd941caa2006-12-17 22:10:48 +010017#include <linux/mtd/physmap.h>
18
Russell Kinga09e64f2008-08-05 16:14:15 +010019#include <mach/hardware.h>
Manfred Gruberd941caa2006-12-17 22:10:48 +010020
Manfred Gruberd941caa2006-12-17 22:10:48 +010021#include <asm/mach-types.h>
Hartley Sweeten583ddaf2009-07-06 17:39:50 +010022#include <asm/mach/arch.h>
23
Manfred Gruberd941caa2006-12-17 22:10:48 +010024
25static struct ep93xx_eth_data micro9_eth_data = {
Hartley Sweetene48f3fa2008-12-08 17:57:22 +010026 .phy_id = 0x1f,
Manfred Gruberd941caa2006-12-17 22:10:48 +010027};
28
Manfred Gruberd941caa2006-12-17 22:10:48 +010029static void __init micro9_init(void)
30{
Hartley Sweetena0a08fd2008-10-04 20:01:49 +010031 ep93xx_register_eth(&micro9_eth_data, 1);
Manfred Gruberd941caa2006-12-17 22:10:48 +010032}
33
34/*
35 * Micro9-H
36 */
37#ifdef CONFIG_MACH_MICRO9H
38static struct physmap_flash_data micro9h_flash_data = {
Hartley Sweetene48f3fa2008-12-08 17:57:22 +010039 .width = 4,
Manfred Gruberd941caa2006-12-17 22:10:48 +010040};
41
42static struct resource micro9h_flash_resource = {
Hartley Sweetene48f3fa2008-12-08 17:57:22 +010043 .start = EP93XX_CS1_PHYS_BASE,
44 .end = EP93XX_CS1_PHYS_BASE + SZ_64M - 1,
45 .flags = IORESOURCE_MEM,
Manfred Gruberd941caa2006-12-17 22:10:48 +010046};
47
48static struct platform_device micro9h_flash = {
Hartley Sweetene48f3fa2008-12-08 17:57:22 +010049 .name = "physmap-flash",
50 .id = 0,
51 .dev = {
52 .platform_data = &micro9h_flash_data,
53 },
54 .num_resources = 1,
55 .resource = &micro9h_flash_resource,
Manfred Gruberd941caa2006-12-17 22:10:48 +010056};
57
58static void __init micro9h_init(void)
59{
Hartley Sweetene48f3fa2008-12-08 17:57:22 +010060 platform_device_register(&micro9h_flash);
Manfred Gruberd941caa2006-12-17 22:10:48 +010061}
62
63static void __init micro9h_init_machine(void)
64{
Hartley Sweetene48f3fa2008-12-08 17:57:22 +010065 ep93xx_init_devices();
66 micro9_init();
67 micro9h_init();
Manfred Gruberd941caa2006-12-17 22:10:48 +010068}
69
70MACHINE_START(MICRO9, "Contec Hypercontrol Micro9-H")
Hubert Feurstein94150092009-10-07 08:36:07 +010071 /* Maintainer: Hubert Feurstein <hubert.feurstein@contec.at> */
Hartley Sweetene48f3fa2008-12-08 17:57:22 +010072 .phys_io = EP93XX_APB_PHYS_BASE,
73 .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
74 .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100,
75 .map_io = ep93xx_map_io,
76 .init_irq = ep93xx_init_irq,
77 .timer = &ep93xx_timer,
78 .init_machine = micro9h_init_machine,
Manfred Gruberd941caa2006-12-17 22:10:48 +010079MACHINE_END
80#endif
81
82/*
83 * Micro9-M
84 */
85#ifdef CONFIG_MACH_MICRO9M
86static void __init micro9m_init_machine(void)
87{
Hartley Sweetene48f3fa2008-12-08 17:57:22 +010088 ep93xx_init_devices();
89 micro9_init();
Manfred Gruberd941caa2006-12-17 22:10:48 +010090}
91
92MACHINE_START(MICRO9M, "Contec Hypercontrol Micro9-M")
Hubert Feurstein94150092009-10-07 08:36:07 +010093 /* Maintainer: Hubert Feurstein <hubert.feurstein@contec.at> */
Hartley Sweetene48f3fa2008-12-08 17:57:22 +010094 .phys_io = EP93XX_APB_PHYS_BASE,
95 .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
96 .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100,
97 .map_io = ep93xx_map_io,
98 .init_irq = ep93xx_init_irq,
99 .timer = &ep93xx_timer,
100 .init_machine = micro9m_init_machine,
Manfred Gruberd941caa2006-12-17 22:10:48 +0100101MACHINE_END
102#endif
103
104/*
105 * Micro9-L
106 */
107#ifdef CONFIG_MACH_MICRO9L
108static void __init micro9l_init_machine(void)
109{
Hartley Sweetene48f3fa2008-12-08 17:57:22 +0100110 ep93xx_init_devices();
111 micro9_init();
Manfred Gruberd941caa2006-12-17 22:10:48 +0100112}
113
114MACHINE_START(MICRO9L, "Contec Hypercontrol Micro9-L")
Hubert Feurstein94150092009-10-07 08:36:07 +0100115 /* Maintainer: Hubert Feurstein <hubert.feurstein@contec.at> */
Hartley Sweetene48f3fa2008-12-08 17:57:22 +0100116 .phys_io = EP93XX_APB_PHYS_BASE,
117 .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
118 .boot_params = EP93XX_SDCE3_PHYS_BASE_SYNC + 0x100,
119 .map_io = ep93xx_map_io,
120 .init_irq = ep93xx_init_irq,
121 .timer = &ep93xx_timer,
122 .init_machine = micro9l_init_machine,
Manfred Gruberd941caa2006-12-17 22:10:48 +0100123MACHINE_END
124#endif
125