1 --- a/arch/arm/mach-kirkwood/Makefile
2 +++ b/arch/arm/mach-kirkwood/Makefile
3 @@ -8,6 +8,7 @@ obj-$(CONFIG_MACH_SHEEVAPLUG) += sheeva
4 obj-$(CONFIG_MACH_ESATA_SHEEVAPLUG) += sheevaplug-setup.o
5 obj-$(CONFIG_MACH_GURUPLUG) += guruplug-setup.o
6 obj-$(CONFIG_MACH_DOCKSTAR) += dockstar-setup.o
7 +obj-$(CONFIG_MACH_ICONNECT) += iconnect-setup.o
8 obj-$(CONFIG_MACH_TS219) += ts219-setup.o tsx1x-common.o
9 obj-$(CONFIG_MACH_TS41X) += ts41x-setup.o tsx1x-common.o
10 obj-$(CONFIG_MACH_OPENRD) += openrd-setup.o
11 --- a/arch/arm/mach-kirkwood/Kconfig
12 +++ b/arch/arm/mach-kirkwood/Kconfig
13 @@ -130,6 +130,12 @@ config MACH_T5325
14 Say 'Y' here if you want your kernel to support the
18 + bool "Iomega iConnect Wireless"
20 + Say 'Y' here if you want your kernel to support the
21 + Iomega iConnect Wireless.
26 --- a/arch/arm/mach-kirkwood/mpp.h
27 +++ b/arch/arm/mach-kirkwood/mpp.h
29 #define MPP11_SATA0_ACTn MPP( 11, 0x5, 0, 1, 0, 1, 1, 1, 1 )
31 #define MPP12_GPO MPP( 12, 0x0, 0, 1, 1, 1, 1, 1, 1 )
32 +#define MPP12_GPIO MPP( 12, 0x0, 1, 1, 1, 1, 1, 1, 1 )
33 #define MPP12_SD_CLK MPP( 12, 0x1, 0, 1, 1, 1, 1, 1, 1 )
34 #define MPP12_AU_SPDIF0 MPP( 12, 0xa, 0, 1, 0, 0, 0, 0, 1 )
35 #define MPP12_SPI_MOSI MPP( 12, 0xb, 0, 1, 0, 0, 0, 0, 1 )
37 +++ b/arch/arm/mach-kirkwood/iconnect-setup.c
40 + * arch/arm/mach-kirkwood/iconnect-setup.c
42 + * Iomega iConnect Wireless
44 + * This file is licensed under the terms of the GNU General Public
45 + * License version 2. This program is licensed "as is" without any
46 + * warranty of any kind, whether express or implied.
49 +#include <linux/kernel.h>
50 +#include <linux/init.h>
51 +#include <linux/platform_device.h>
52 +#include <linux/irq.h>
53 +#include <linux/mtd/partitions.h>
54 +#include <linux/mv643xx_eth.h>
55 +#include <linux/ethtool.h>
56 +#include <linux/gpio.h>
57 +#include <linux/gpio_keys.h>
58 +#include <linux/input.h>
59 +#include <linux/leds.h>
60 +#include <asm/mach-types.h>
61 +#include <asm/mach/arch.h>
62 +#include <mach/kirkwood.h>
66 +static struct mtd_partition iconnect_nand_parts[] = {
73 + .offset = MTDPART_OFS_NXTBLK,
74 + .size = SZ_1M + SZ_2M
77 + .offset = MTDPART_OFS_NXTBLK,
81 + .offset = MTDPART_OFS_NXTBLK,
82 + .size = MTDPART_SIZ_FULL
86 +static struct mv643xx_eth_platform_data iconnect_ge00_data = {
87 + .phy_addr = MV643XX_ETH_PHY_ADDR(11),
90 +static struct gpio_led iconnect_led_pins[] = {
92 + .name = "iconnect:blue:power",
93 + .default_trigger = "default-on",
97 + .name = "iconnect:red:power",
101 + .name = "iconnect:blue:usb1",
105 + .name = "iconnect:blue:usb2",
109 + .name = "iconnect:blue:usb3",
113 + .name = "iconnect:blue:usb4",
117 + .name = "iconnect:blue:otb",
122 +static struct gpio_led_platform_data iconnect_led_data = {
123 + .leds = iconnect_led_pins,
124 + .num_leds = ARRAY_SIZE(iconnect_led_pins),
127 +static struct platform_device iconnect_leds = {
128 + .name = "leds-gpio",
131 + .platform_data = &iconnect_led_data,
135 +#define ICONNECT_GPIO_KEY_RESET 12
136 +#define ICONNECT_GPIO_KEY_OTB 35
138 +#define ICONNECT_SW_RESET 0x00
139 +#define ICONNECT_SW_OTB 0x01
141 +static struct gpio_keys_button iconnect_buttons[] = {
144 + .code = ICONNECT_SW_RESET,
145 + .gpio = ICONNECT_GPIO_KEY_RESET,
146 + .desc = "Reset Button",
148 + .debounce_interval = 100,
152 + .code = ICONNECT_SW_OTB,
153 + .gpio = ICONNECT_GPIO_KEY_OTB,
154 + .desc = "OTB Button",
156 + .debounce_interval = 100,
160 +static struct gpio_keys_platform_data iconnect_button_data = {
161 + .buttons = iconnect_buttons,
162 + .nbuttons = ARRAY_SIZE(iconnect_buttons),
165 +static struct platform_device iconnect_button_device = {
166 + .name = "gpio-keys",
168 + .num_resources = 0,
170 + .platform_data = &iconnect_button_data,
174 +static unsigned int iconnect_mpp_config[] __initdata = {
175 + MPP12_GPIO, /*Input for reset button*/
176 + MPP35_GPIO, /*Input for OTB button*/
187 +static void __init iconnect_init(void)
192 + * Basic setup. Needs to be called early.
195 + kirkwood_mpp_conf(iconnect_mpp_config);
197 + kirkwood_nand_init(ARRAY_AND_SIZE(iconnect_nand_parts), 25);
198 + kirkwood_ehci_init();
200 + kirkwood_ge00_init(&iconnect_ge00_data);
201 + kirkwood_pcie_id(&dev, &rev);
203 + kirkwood_uart0_init();
204 + kirkwood_i2c_init();
206 + platform_device_register(&iconnect_leds);
207 + platform_device_register(&iconnect_button_device);
210 +static int __init iconnect_pci_init(void)
212 + if (machine_is_iconnect())
213 + kirkwood_pcie_init(KW_PCIE0);
217 +subsys_initcall(iconnect_pci_init);
220 +MACHINE_START(ICONNECT, "Iomega iConnect Wireless")
221 + .boot_params = 0x00000100,
222 + .init_machine = iconnect_init,
223 + .map_io = kirkwood_map_io,
224 + .init_irq = kirkwood_init_irq,
225 + .timer = &kirkwood_timer,