diff options
author | Ryan Mallon <ryan@bluewatersys.com> | 2010-01-21 19:42:02 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-01-25 16:14:29 -0500 |
commit | a3662f6bbe09a3ce7cccd622654822c0d378be2e (patch) | |
tree | 1437c48d8d34df41baea46893de6b54e04564de4 /arch/arm/mach-ep93xx | |
parent | bb06b737143bd35939e65b05e073019c5c451be9 (diff) |
ARM: 5892/1: ep93xx: Add support for Simplemachines Sim.One board
Add support for the Simplemachines EP9307 based Sim.One board.
Cc: Hartley Sweeten <hartleys@visionengravers.com>
Cc: Sergio Sorrenti <sergio.sorrenti@gmail.com>
Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
Acked-by: Hartley Sweeten <hartleys@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-ep93xx')
-rw-r--r-- | arch/arm/mach-ep93xx/Kconfig | 7 | ||||
-rw-r--r-- | arch/arm/mach-ep93xx/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-ep93xx/simone.c | 97 |
3 files changed, 105 insertions, 0 deletions
diff --git a/arch/arm/mach-ep93xx/Kconfig b/arch/arm/mach-ep93xx/Kconfig index 9167c3d2a5ed..5231a3a2c74b 100644 --- a/arch/arm/mach-ep93xx/Kconfig +++ b/arch/arm/mach-ep93xx/Kconfig | |||
@@ -161,6 +161,13 @@ config MACH_MICRO9S | |||
161 | Say 'Y' here if you want your kernel to support the | 161 | Say 'Y' here if you want your kernel to support the |
162 | Contec Micro9-Slim board. | 162 | Contec Micro9-Slim board. |
163 | 163 | ||
164 | config MACH_SIM_ONE | ||
165 | bool "Support Simplemachines Sim.One board" | ||
166 | depends on EP93XX_SDCE0_PHYS_OFFSET | ||
167 | help | ||
168 | Say 'Y' here if you want your kernel to support the | ||
169 | Simplemachines Sim.One board. | ||
170 | |||
164 | config MACH_TS72XX | 171 | config MACH_TS72XX |
165 | bool "Support Technologic Systems TS-72xx SBC" | 172 | bool "Support Technologic Systems TS-72xx SBC" |
166 | depends on EP93XX_SDCE3_SYNC_PHYS_OFFSET | 173 | depends on EP93XX_SDCE3_SYNC_PHYS_OFFSET |
diff --git a/arch/arm/mach-ep93xx/Makefile b/arch/arm/mach-ep93xx/Makefile index eae6199a9891..c731fa9789d1 100644 --- a/arch/arm/mach-ep93xx/Makefile +++ b/arch/arm/mach-ep93xx/Makefile | |||
@@ -10,4 +10,5 @@ obj-$(CONFIG_MACH_ADSSPHERE) += adssphere.o | |||
10 | obj-$(CONFIG_MACH_EDB93XX) += edb93xx.o | 10 | obj-$(CONFIG_MACH_EDB93XX) += edb93xx.o |
11 | obj-$(CONFIG_MACH_GESBC9312) += gesbc9312.o | 11 | obj-$(CONFIG_MACH_GESBC9312) += gesbc9312.o |
12 | obj-$(CONFIG_MACH_MICRO9) += micro9.o | 12 | obj-$(CONFIG_MACH_MICRO9) += micro9.o |
13 | obj-$(CONFIG_MACH_SIM_ONE) += simone.o | ||
13 | obj-$(CONFIG_MACH_TS72XX) += ts72xx.o | 14 | obj-$(CONFIG_MACH_TS72XX) += ts72xx.o |
diff --git a/arch/arm/mach-ep93xx/simone.c b/arch/arm/mach-ep93xx/simone.c new file mode 100644 index 000000000000..cd93990f1b99 --- /dev/null +++ b/arch/arm/mach-ep93xx/simone.c | |||
@@ -0,0 +1,97 @@ | |||
1 | /* | ||
2 | * arch/arm/mach-ep93xx/simone.c | ||
3 | * Simplemachines Sim.One support. | ||
4 | * | ||
5 | * Copyright (C) 2010 Ryan Mallon <ryan@bluewatersys.com> | ||
6 | * | ||
7 | * Based on the 2.6.24.7 support: | ||
8 | * Copyright (C) 2009 Simplemachines | ||
9 | * MMC support by Peter Ivanov <ivanovp@gmail.com>, 2007 | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License as published by | ||
13 | * the Free Software Foundation; either version 2 of the License, or (at | ||
14 | * your option) any later version. | ||
15 | * | ||
16 | */ | ||
17 | |||
18 | #include <linux/kernel.h> | ||
19 | #include <linux/init.h> | ||
20 | #include <linux/platform_device.h> | ||
21 | #include <linux/mtd/physmap.h> | ||
22 | #include <linux/gpio.h> | ||
23 | #include <linux/i2c.h> | ||
24 | #include <linux/i2c-gpio.h> | ||
25 | |||
26 | #include <mach/hardware.h> | ||
27 | #include <mach/fb.h> | ||
28 | |||
29 | #include <asm/mach-types.h> | ||
30 | #include <asm/mach/arch.h> | ||
31 | |||
32 | static struct physmap_flash_data simone_flash_data = { | ||
33 | .width = 2, | ||
34 | }; | ||
35 | |||
36 | static struct resource simone_flash_resource = { | ||
37 | .start = EP93XX_CS6_PHYS_BASE, | ||
38 | .end = EP93XX_CS6_PHYS_BASE + SZ_8M - 1, | ||
39 | .flags = IORESOURCE_MEM, | ||
40 | }; | ||
41 | |||
42 | static struct platform_device simone_flash = { | ||
43 | .name = "physmap-flash", | ||
44 | .id = 0, | ||
45 | .num_resources = 1, | ||
46 | .resource = &simone_flash_resource, | ||
47 | .dev = { | ||
48 | .platform_data = &simone_flash_data, | ||
49 | }, | ||
50 | }; | ||
51 | |||
52 | static struct ep93xx_eth_data simone_eth_data = { | ||
53 | .phy_id = 1, | ||
54 | }; | ||
55 | |||
56 | static struct ep93xxfb_mach_info simone_fb_info = { | ||
57 | .num_modes = EP93XXFB_USE_MODEDB, | ||
58 | .bpp = 16, | ||
59 | .flags = EP93XXFB_USE_SDCSN0 | EP93XXFB_PCLK_FALLING, | ||
60 | }; | ||
61 | |||
62 | static struct i2c_gpio_platform_data simone_i2c_gpio_data = { | ||
63 | .sda_pin = EP93XX_GPIO_LINE_EEDAT, | ||
64 | .sda_is_open_drain = 0, | ||
65 | .scl_pin = EP93XX_GPIO_LINE_EECLK, | ||
66 | .scl_is_open_drain = 0, | ||
67 | .udelay = 0, | ||
68 | .timeout = 0, | ||
69 | }; | ||
70 | |||
71 | static struct i2c_board_info __initdata simone_i2c_board_info[] = { | ||
72 | { | ||
73 | I2C_BOARD_INFO("ds1337", 0x68), | ||
74 | }, | ||
75 | }; | ||
76 | |||
77 | static void __init simone_init_machine(void) | ||
78 | { | ||
79 | ep93xx_init_devices(); | ||
80 | |||
81 | platform_device_register(&simone_flash); | ||
82 | ep93xx_register_eth(&simone_eth_data, 1); | ||
83 | ep93xx_register_fb(&simone_fb_info); | ||
84 | ep93xx_register_i2c(&simone_i2c_gpio_data, simone_i2c_board_info, | ||
85 | ARRAY_SIZE(simone_i2c_board_info)); | ||
86 | } | ||
87 | |||
88 | MACHINE_START(SIM_ONE, "Simplemachines Sim.One Board") | ||
89 | /* Maintainer: Ryan Mallon <ryan@bluewatersys.com> */ | ||
90 | .phys_io = EP93XX_APB_PHYS_BASE, | ||
91 | .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc, | ||
92 | .boot_params = EP93XX_SDCE0_PHYS_BASE + 0x100, | ||
93 | .map_io = ep93xx_map_io, | ||
94 | .init_irq = ep93xx_init_irq, | ||
95 | .timer = &ep93xx_timer, | ||
96 | .init_machine = simone_init_machine, | ||
97 | MACHINE_END | ||