1 --- a/arch/arm/configs/ixp4xx_defconfig
2 +++ b/arch/arm/configs/ixp4xx_defconfig
3 @@ -157,6 +157,8 @@ CONFIG_ARCH_ADI_COYOTE=y
4 CONFIG_MACH_GATEWAY7001=y
7 +CONFIG_MACH_PRONGHORN=y
8 +CONFIG_MACH_PRONGHORNMETRO=y
10 CONFIG_MACH_IXDPG425=y
12 --- a/arch/arm/mach-ixp4xx/Kconfig
13 +++ b/arch/arm/mach-ixp4xx/Kconfig
14 @@ -65,6 +65,22 @@ config MACH_WG302V2
15 WG302 v2 or WAG302 v2 Access Points. For more information
16 on this platform, see http://openwrt.org
18 +config MACH_PRONGHORN
19 + bool "ADI Pronghorn series"
22 + Say 'Y' here if you want your kernel to support the ADI
23 + Engineering Pronghorn series. For more
24 + information on this platform, see http://www.adiengineering.com
27 +# There're only minimal differences kernel-wise between the Pronghorn and
28 +# Pronghorn Metro boards - they use different chip selects to drive the
29 +# CF slot connected to the expansion bus, so we just enable them together.
31 +config MACH_PRONGHORNMETRO
32 + def_bool MACH_PRONGHORN
37 --- a/arch/arm/mach-ixp4xx/Makefile
38 +++ b/arch/arm/mach-ixp4xx/Makefile
39 @@ -17,6 +17,7 @@ obj-pci-$(CONFIG_MACH_GATEWAY7001) += ga
40 obj-pci-$(CONFIG_MACH_WG302V1) += wg302v1-pci.o
41 obj-pci-$(CONFIG_MACH_WG302V2) += wg302v2-pci.o
42 obj-pci-$(CONFIG_MACH_FSG) += fsg-pci.o
43 +obj-pci-$(CONFIG_MACH_PRONGHORN) += pronghorn-pci.o
47 @@ -33,6 +34,7 @@ obj-$(CONFIG_MACH_WG302V1) += wg302v1-se
48 obj-$(CONFIG_MACH_WG302V2) += wg302v2-setup.o
49 obj-$(CONFIG_MACH_FSG) += fsg-setup.o
50 obj-$(CONFIG_MACH_GORAMO_MLR) += goramo_mlr.o
51 +obj-$(CONFIG_MACH_PRONGHORN) += pronghorn-setup.o
53 obj-$(CONFIG_PCI) += $(obj-pci-$(CONFIG_PCI)) common-pci.o
54 obj-$(CONFIG_IXP4XX_QMGR) += ixp4xx_qmgr.o
56 +++ b/arch/arm/mach-ixp4xx/pronghorn-pci.c
59 + * arch/arch/mach-ixp4xx/pronghorn-pci.c
61 + * PCI setup routines for ADI Engineering Pronghorn series
63 + * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
65 + * based on coyote-pci.c:
66 + * Copyright (C) 2002 Jungo Software Technologies.
67 + * Copyright (C) 2003 MontaVista Softwrae, Inc.
69 + * Maintainer: Imre Kaloz <kaloz@openwrt.org>
71 + * This program is free software; you can redistribute it and/or modify
72 + * it under the terms of the GNU General Public License version 2 as
73 + * published by the Free Software Foundation.
77 +#include <linux/kernel.h>
78 +#include <linux/pci.h>
79 +#include <linux/init.h>
80 +#include <linux/irq.h>
82 +#include <asm/mach-types.h>
83 +#include <mach/hardware.h>
85 +#include <asm/mach/pci.h>
87 +void __init pronghorn_pci_preinit(void)
89 + set_irq_type(IRQ_IXP4XX_GPIO4, IRQ_TYPE_LEVEL_LOW);
90 + set_irq_type(IRQ_IXP4XX_GPIO6, IRQ_TYPE_LEVEL_LOW);
91 + set_irq_type(IRQ_IXP4XX_GPIO11, IRQ_TYPE_LEVEL_LOW);
92 + set_irq_type(IRQ_IXP4XX_GPIO1, IRQ_TYPE_LEVEL_LOW);
94 + ixp4xx_pci_preinit();
97 +static int __init pronghorn_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
100 + return IRQ_IXP4XX_GPIO4;
101 + else if (slot == 14)
102 + return IRQ_IXP4XX_GPIO6;
103 + else if (slot == 15)
104 + return IRQ_IXP4XX_GPIO11;
105 + else if (slot == 16)
106 + return IRQ_IXP4XX_GPIO1;
111 +struct hw_pci pronghorn_pci __initdata = {
112 + .nr_controllers = 1,
113 + .preinit = pronghorn_pci_preinit,
114 + .swizzle = pci_std_swizzle,
115 + .setup = ixp4xx_setup,
116 + .scan = ixp4xx_scan_bus,
117 + .map_irq = pronghorn_map_irq,
120 +int __init pronghorn_pci_init(void)
122 + if (machine_is_pronghorn() || machine_is_pronghorn_metro())
123 + pci_common_init(&pronghorn_pci);
127 +subsys_initcall(pronghorn_pci_init);
129 +++ b/arch/arm/mach-ixp4xx/pronghorn-setup.c
132 + * arch/arm/mach-ixp4xx/pronghorn-setup.c
134 + * Board setup for the ADI Engineering Pronghorn series
136 + * Copyright (C) 2008 Imre Kaloz <Kaloz@openwrt.org>
138 + * based on coyote-setup.c:
139 + * Copyright (C) 2003-2005 MontaVista Software, Inc.
141 + * Author: Imre Kaloz <Kaloz@openwrt.org>
144 +#include <linux/kernel.h>
145 +#include <linux/init.h>
146 +#include <linux/device.h>
147 +#include <linux/serial.h>
148 +#include <linux/tty.h>
149 +#include <linux/serial_8250.h>
150 +#include <linux/slab.h>
151 +#include <linux/types.h>
152 +#include <linux/memory.h>
153 +#include <linux/i2c-gpio.h>
154 +#include <linux/leds.h>
156 +#include <asm/setup.h>
157 +#include <mach/hardware.h>
158 +#include <asm/irq.h>
159 +#include <asm/mach-types.h>
160 +#include <asm/mach/arch.h>
161 +#include <asm/mach/flash.h>
163 +static struct flash_platform_data pronghorn_flash_data = {
164 + .map_name = "cfi_probe",
168 +static struct resource pronghorn_flash_resource = {
169 + .flags = IORESOURCE_MEM,
172 +static struct platform_device pronghorn_flash = {
173 + .name = "IXP4XX-Flash",
176 + .platform_data = &pronghorn_flash_data,
178 + .num_resources = 1,
179 + .resource = &pronghorn_flash_resource,
182 +static struct resource pronghorn_uart_resources [] = {
184 + .start = IXP4XX_UART1_BASE_PHYS,
185 + .end = IXP4XX_UART1_BASE_PHYS + 0x0fff,
186 + .flags = IORESOURCE_MEM
189 + .start = IXP4XX_UART2_BASE_PHYS,
190 + .end = IXP4XX_UART2_BASE_PHYS + 0x0fff,
191 + .flags = IORESOURCE_MEM
195 +static struct plat_serial8250_port pronghorn_uart_data[] = {
197 + .mapbase = IXP4XX_UART1_BASE_PHYS,
198 + .membase = (char *)IXP4XX_UART1_BASE_VIRT + REG_OFFSET,
199 + .irq = IRQ_IXP4XX_UART1,
200 + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
201 + .iotype = UPIO_MEM,
203 + .uartclk = IXP4XX_UART_XTAL,
206 + .mapbase = IXP4XX_UART2_BASE_PHYS,
207 + .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
208 + .irq = IRQ_IXP4XX_UART2,
209 + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
210 + .iotype = UPIO_MEM,
212 + .uartclk = IXP4XX_UART_XTAL,
217 +static struct platform_device pronghorn_uart = {
218 + .name = "serial8250",
219 + .id = PLAT8250_DEV_PLATFORM,
221 + .platform_data = pronghorn_uart_data,
223 + .num_resources = 2,
224 + .resource = pronghorn_uart_resources,
227 +static struct i2c_gpio_platform_data pronghorn_i2c_gpio_data = {
232 +static struct platform_device pronghorn_i2c_gpio = {
233 + .name = "i2c-gpio",
236 + .platform_data = &pronghorn_i2c_gpio_data,
240 +static struct gpio_led pronghorn_led_pin[] = {
242 + .name = "pronghorn:green:status",
247 +static struct gpio_led_platform_data pronghorn_led_data = {
249 + .leds = pronghorn_led_pin,
252 +static struct platform_device pronghorn_led = {
253 + .name = "leds-gpio",
255 + .dev.platform_data = &pronghorn_led_data,
258 +static struct resource pronghorn_pata_resources[] = {
260 + .flags = IORESOURCE_MEM
263 + .flags = IORESOURCE_MEM,
267 + .start = IRQ_IXP4XX_GPIO0,
268 + .end = IRQ_IXP4XX_GPIO0,
269 + .flags = IORESOURCE_IRQ,
273 +static struct ixp4xx_pata_data pronghorn_pata_data = {
274 + .cs0_bits = 0xbfff0043,
275 + .cs1_bits = 0xbfff0043,
278 +static struct platform_device pronghorn_pata = {
279 + .name = "pata_ixp4xx_cf",
281 + .dev.platform_data = &pronghorn_pata_data,
282 + .num_resources = ARRAY_SIZE(pronghorn_pata_resources),
283 + .resource = pronghorn_pata_resources,
286 +static struct eth_plat_info pronghorn_plat_eth[] = {
298 +static struct platform_device pronghorn_eth[] = {
300 + .name = "ixp4xx_eth",
301 + .id = IXP4XX_ETH_NPEB,
302 + .dev.platform_data = pronghorn_plat_eth,
304 + .name = "ixp4xx_eth",
305 + .id = IXP4XX_ETH_NPEC,
306 + .dev.platform_data = pronghorn_plat_eth + 1,
310 +static struct platform_device *pronghorn_devices[] __initdata = {
318 +static void __init pronghorn_init(void)
322 + pronghorn_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
323 + pronghorn_flash_resource.end = IXP4XX_EXP_BUS_BASE(0) + SZ_32M - 1;
325 + *IXP4XX_EXP_CS0 |= IXP4XX_FLASH_WRITABLE;
326 + *IXP4XX_EXP_CS1 = *IXP4XX_EXP_CS0;
328 + platform_add_devices(pronghorn_devices, ARRAY_SIZE(pronghorn_devices));
330 + if (machine_is_pronghorn()) {
331 + pronghorn_pata_resources[0].start = IXP4XX_EXP_BUS_BASE(2);
332 + pronghorn_pata_resources[0].end = IXP4XX_EXP_BUS_END(2);
334 + pronghorn_pata_resources[1].start = IXP4XX_EXP_BUS_BASE(3);
335 + pronghorn_pata_resources[1].end = IXP4XX_EXP_BUS_END(3);
337 + pronghorn_pata_data.cs0_cfg = IXP4XX_EXP_CS2;
338 + pronghorn_pata_data.cs1_cfg = IXP4XX_EXP_CS3;
340 + pronghorn_pata_resources[0].start = IXP4XX_EXP_BUS_BASE(3);
341 + pronghorn_pata_resources[0].end = IXP4XX_EXP_BUS_END(3);
343 + pronghorn_pata_resources[1].start = IXP4XX_EXP_BUS_BASE(4);
344 + pronghorn_pata_resources[1].end = IXP4XX_EXP_BUS_END(4);
346 + pronghorn_pata_data.cs0_cfg = IXP4XX_EXP_CS3;
347 + pronghorn_pata_data.cs1_cfg = IXP4XX_EXP_CS4;
349 + platform_device_register(&pronghorn_i2c_gpio);
352 + platform_device_register(&pronghorn_pata);
355 +MACHINE_START(PRONGHORN, "ADI Engineering Pronghorn")
356 + /* Maintainer: Imre Kaloz <kaloz@openwrt.org> */
357 + .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
358 + .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
359 + .map_io = ixp4xx_map_io,
360 + .init_irq = ixp4xx_init_irq,
361 + .timer = &ixp4xx_timer,
362 + .boot_params = 0x0100,
363 + .init_machine = pronghorn_init,
366 +MACHINE_START(PRONGHORNMETRO, "ADI Engineering Pronghorn Metro")
367 + /* Maintainer: Imre Kaloz <kaloz@openwrt.org> */
368 + .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
369 + .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
370 + .map_io = ixp4xx_map_io,
371 + .init_irq = ixp4xx_init_irq,
372 + .timer = &ixp4xx_timer,
373 + .boot_params = 0x0100,
374 + .init_machine = pronghorn_init,
376 --- a/arch/arm/mach-ixp4xx/include/mach/uncompress.h
377 +++ b/arch/arm/mach-ixp4xx/include/mach/uncompress.h
378 @@ -41,7 +41,8 @@ static __inline__ void __arch_decomp_set
379 * Some boards are using UART2 as console
381 if (machine_is_adi_coyote() || machine_is_gtwx5715() ||
382 - machine_is_gateway7001() || machine_is_wg302v2())
383 + machine_is_gateway7001() || machine_is_wg302v2() ||
384 + machine_is_pronghorn() || machine_is_pronghorn_metro())
385 uart_base = (volatile u32*) IXP4XX_UART2_BASE_PHYS;
387 uart_base = (volatile u32*) IXP4XX_UART1_BASE_PHYS;