Manfred Gruber | d941caa | 2006-12-17 22:10:48 +0100 | [diff] [blame] | 1 | /* |
| 2 | * linux/arch/arm/mach-ep93xx/micro9.c |
| 3 | * |
| 4 | * Copyright (C) 2006 Contec Steuerungstechnik & Automation GmbH |
Hubert Feurstein | 9415009 | 2009-10-07 08:36:07 +0100 | [diff] [blame^] | 5 | * Manfred Gruber <m.gruber@tirol.com> |
| 6 | * Copyright (C) 2009 Contec Steuerungstechnik & Automation GmbH |
| 7 | * Hubert Feurstein <hubert.feurstein@contec.at> |
Manfred Gruber | d941caa | 2006-12-17 22:10:48 +0100 | [diff] [blame] | 8 | * |
| 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 Gruber | d941caa | 2006-12-17 22:10:48 +0100 | [diff] [blame] | 14 | #include <linux/kernel.h> |
Hartley Sweeten | 583ddaf | 2009-07-06 17:39:50 +0100 | [diff] [blame] | 15 | #include <linux/init.h> |
Manfred Gruber | d941caa | 2006-12-17 22:10:48 +0100 | [diff] [blame] | 16 | #include <linux/platform_device.h> |
Manfred Gruber | d941caa | 2006-12-17 22:10:48 +0100 | [diff] [blame] | 17 | #include <linux/mtd/physmap.h> |
| 18 | |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 19 | #include <mach/hardware.h> |
Manfred Gruber | d941caa | 2006-12-17 22:10:48 +0100 | [diff] [blame] | 20 | |
Manfred Gruber | d941caa | 2006-12-17 22:10:48 +0100 | [diff] [blame] | 21 | #include <asm/mach-types.h> |
Hartley Sweeten | 583ddaf | 2009-07-06 17:39:50 +0100 | [diff] [blame] | 22 | #include <asm/mach/arch.h> |
| 23 | |
Manfred Gruber | d941caa | 2006-12-17 22:10:48 +0100 | [diff] [blame] | 24 | |
| 25 | static struct ep93xx_eth_data micro9_eth_data = { |
Hartley Sweeten | e48f3fa | 2008-12-08 17:57:22 +0100 | [diff] [blame] | 26 | .phy_id = 0x1f, |
Manfred Gruber | d941caa | 2006-12-17 22:10:48 +0100 | [diff] [blame] | 27 | }; |
| 28 | |
Manfred Gruber | d941caa | 2006-12-17 22:10:48 +0100 | [diff] [blame] | 29 | static void __init micro9_init(void) |
| 30 | { |
Hartley Sweeten | a0a08fd | 2008-10-04 20:01:49 +0100 | [diff] [blame] | 31 | ep93xx_register_eth(µ9_eth_data, 1); |
Manfred Gruber | d941caa | 2006-12-17 22:10:48 +0100 | [diff] [blame] | 32 | } |
| 33 | |
| 34 | /* |
| 35 | * Micro9-H |
| 36 | */ |
| 37 | #ifdef CONFIG_MACH_MICRO9H |
| 38 | static struct physmap_flash_data micro9h_flash_data = { |
Hartley Sweeten | e48f3fa | 2008-12-08 17:57:22 +0100 | [diff] [blame] | 39 | .width = 4, |
Manfred Gruber | d941caa | 2006-12-17 22:10:48 +0100 | [diff] [blame] | 40 | }; |
| 41 | |
| 42 | static struct resource micro9h_flash_resource = { |
Hartley Sweeten | e48f3fa | 2008-12-08 17:57:22 +0100 | [diff] [blame] | 43 | .start = EP93XX_CS1_PHYS_BASE, |
| 44 | .end = EP93XX_CS1_PHYS_BASE + SZ_64M - 1, |
| 45 | .flags = IORESOURCE_MEM, |
Manfred Gruber | d941caa | 2006-12-17 22:10:48 +0100 | [diff] [blame] | 46 | }; |
| 47 | |
| 48 | static struct platform_device micro9h_flash = { |
Hartley Sweeten | e48f3fa | 2008-12-08 17:57:22 +0100 | [diff] [blame] | 49 | .name = "physmap-flash", |
| 50 | .id = 0, |
| 51 | .dev = { |
| 52 | .platform_data = µ9h_flash_data, |
| 53 | }, |
| 54 | .num_resources = 1, |
| 55 | .resource = µ9h_flash_resource, |
Manfred Gruber | d941caa | 2006-12-17 22:10:48 +0100 | [diff] [blame] | 56 | }; |
| 57 | |
| 58 | static void __init micro9h_init(void) |
| 59 | { |
Hartley Sweeten | e48f3fa | 2008-12-08 17:57:22 +0100 | [diff] [blame] | 60 | platform_device_register(µ9h_flash); |
Manfred Gruber | d941caa | 2006-12-17 22:10:48 +0100 | [diff] [blame] | 61 | } |
| 62 | |
| 63 | static void __init micro9h_init_machine(void) |
| 64 | { |
Hartley Sweeten | e48f3fa | 2008-12-08 17:57:22 +0100 | [diff] [blame] | 65 | ep93xx_init_devices(); |
| 66 | micro9_init(); |
| 67 | micro9h_init(); |
Manfred Gruber | d941caa | 2006-12-17 22:10:48 +0100 | [diff] [blame] | 68 | } |
| 69 | |
| 70 | MACHINE_START(MICRO9, "Contec Hypercontrol Micro9-H") |
Hubert Feurstein | 9415009 | 2009-10-07 08:36:07 +0100 | [diff] [blame^] | 71 | /* Maintainer: Hubert Feurstein <hubert.feurstein@contec.at> */ |
Hartley Sweeten | e48f3fa | 2008-12-08 17:57:22 +0100 | [diff] [blame] | 72 | .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 Gruber | d941caa | 2006-12-17 22:10:48 +0100 | [diff] [blame] | 79 | MACHINE_END |
| 80 | #endif |
| 81 | |
| 82 | /* |
| 83 | * Micro9-M |
| 84 | */ |
| 85 | #ifdef CONFIG_MACH_MICRO9M |
| 86 | static void __init micro9m_init_machine(void) |
| 87 | { |
Hartley Sweeten | e48f3fa | 2008-12-08 17:57:22 +0100 | [diff] [blame] | 88 | ep93xx_init_devices(); |
| 89 | micro9_init(); |
Manfred Gruber | d941caa | 2006-12-17 22:10:48 +0100 | [diff] [blame] | 90 | } |
| 91 | |
| 92 | MACHINE_START(MICRO9M, "Contec Hypercontrol Micro9-M") |
Hubert Feurstein | 9415009 | 2009-10-07 08:36:07 +0100 | [diff] [blame^] | 93 | /* Maintainer: Hubert Feurstein <hubert.feurstein@contec.at> */ |
Hartley Sweeten | e48f3fa | 2008-12-08 17:57:22 +0100 | [diff] [blame] | 94 | .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 Gruber | d941caa | 2006-12-17 22:10:48 +0100 | [diff] [blame] | 101 | MACHINE_END |
| 102 | #endif |
| 103 | |
| 104 | /* |
| 105 | * Micro9-L |
| 106 | */ |
| 107 | #ifdef CONFIG_MACH_MICRO9L |
| 108 | static void __init micro9l_init_machine(void) |
| 109 | { |
Hartley Sweeten | e48f3fa | 2008-12-08 17:57:22 +0100 | [diff] [blame] | 110 | ep93xx_init_devices(); |
| 111 | micro9_init(); |
Manfred Gruber | d941caa | 2006-12-17 22:10:48 +0100 | [diff] [blame] | 112 | } |
| 113 | |
| 114 | MACHINE_START(MICRO9L, "Contec Hypercontrol Micro9-L") |
Hubert Feurstein | 9415009 | 2009-10-07 08:36:07 +0100 | [diff] [blame^] | 115 | /* Maintainer: Hubert Feurstein <hubert.feurstein@contec.at> */ |
Hartley Sweeten | e48f3fa | 2008-12-08 17:57:22 +0100 | [diff] [blame] | 116 | .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 Gruber | d941caa | 2006-12-17 22:10:48 +0100 | [diff] [blame] | 123 | MACHINE_END |
| 124 | #endif |
| 125 | |