1 Index: linux-2.6.21.7/Documentation/arm/IXP4xx
2 ===================================================================
3 --- linux-2.6.21.7.orig/Documentation/arm/IXP4xx
4 +++ linux-2.6.21.7/Documentation/arm/IXP4xx
5 @@ -111,6 +111,9 @@ http://www.adiengineering.com/productsCo
6 the platform has two mini-PCI slots used for 802.11[bga] cards.
7 Finally, there is an IDE port hanging off the expansion bus.
9 +ADI Engineering Pronghorn Metro Platform
10 +http://www.adiengineering.com/php-bin/ecomm4/productDisplay.php?category_id=30&product_id=85
12 Gateworks Avila Network Platform
13 http://www.gateworks.com/avila_sbc.htm
15 Index: linux-2.6.21.7/arch/arm/mach-ixp4xx/Kconfig
16 ===================================================================
17 --- linux-2.6.21.7.orig/arch/arm/mach-ixp4xx/Kconfig
18 +++ linux-2.6.21.7/arch/arm/mach-ixp4xx/Kconfig
19 @@ -57,6 +57,14 @@ config MACH_WG302V2
20 WG302 v2 or WAG302 v2 Access Points. For more information
21 on this platform, see http://openwrt.org
23 +config MACH_PRONGHORNMETRO
24 + bool "Pronghorn Metro"
27 + Say 'Y' here if you want your kernel to support the ADI
28 + Engineering Pronghorn Metro Platform. For more
29 + information on this platform, see <file:Documentation/arm/IXP4xx>.
34 Index: linux-2.6.21.7/arch/arm/mach-ixp4xx/Makefile
35 ===================================================================
36 --- linux-2.6.21.7.orig/arch/arm/mach-ixp4xx/Makefile
37 +++ linux-2.6.21.7/arch/arm/mach-ixp4xx/Makefile
38 @@ -15,6 +15,7 @@ obj-pci-$(CONFIG_MACH_NAS100D) += nas10
39 obj-pci-$(CONFIG_MACH_DSMG600) += dsmg600-pci.o
40 obj-pci-$(CONFIG_MACH_GATEWAY7001) += gateway7001-pci.o
41 obj-pci-$(CONFIG_MACH_WG302V2) += wg302v2-pci.o
42 +obj-pci-$(CONFIG_MACH_PRONGHORNMETRO) += pronghornmetro-pci.o
46 @@ -28,5 +29,6 @@ obj-$(CONFIG_MACH_NAS100D) += nas100d-se
47 obj-$(CONFIG_MACH_DSMG600) += dsmg600-setup.o dsmg600-power.o
48 obj-$(CONFIG_MACH_GATEWAY7001) += gateway7001-setup.o
49 obj-$(CONFIG_MACH_WG302V2) += wg302v2-setup.o
50 +obj-$(CONFIG_MACH_PRONGHORNMETRO) += pronghornmetro-setup.o
52 obj-$(CONFIG_PCI) += $(obj-pci-$(CONFIG_PCI)) common-pci.o
53 Index: linux-2.6.21.7/arch/arm/mach-ixp4xx/pronghornmetro-pci.c
54 ===================================================================
56 +++ linux-2.6.21.7/arch/arm/mach-ixp4xx/pronghornmetro-pci.c
59 + * arch/arch/mach-ixp4xx/pronghornmetro-pci.c
61 + * PCI setup routines for ADI Engineering Pronghorn Metro
63 + * Copyright (C) 2007 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 <asm/hardware.h>
86 +#include <asm/mach/pci.h>
88 +extern void ixp4xx_pci_preinit(void);
89 +extern int ixp4xx_setup(int nr, struct pci_sys_data *sys);
90 +extern struct pci_bus *ixp4xx_scan_bus(int nr, struct pci_sys_data *sys);
92 +void __init pronghornmetro_pci_preinit(void)
94 + set_irq_type(IRQ_IXP4XX_GPIO4, IRQT_LOW);
95 + set_irq_type(IRQ_IXP4XX_GPIO6, IRQT_LOW);
96 + set_irq_type(IRQ_IXP4XX_GPIO11, IRQT_LOW);
97 + set_irq_type(IRQ_IXP4XX_GPIO1, IRQT_LOW);
99 + ixp4xx_pci_preinit();
102 +static int __init pronghornmetro_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
105 + return IRQ_IXP4XX_GPIO4;
106 + else if (slot == 14)
107 + return IRQ_IXP4XX_GPIO6;
108 + else if (slot == 15)
109 + return IRQ_IXP4XX_GPIO11;
110 + else if (slot == 16)
111 + return IRQ_IXP4XX_GPIO1;
115 +struct hw_pci pronghornmetro_pci __initdata = {
116 + .nr_controllers = 1,
117 + .preinit = pronghornmetro_pci_preinit,
118 + .swizzle = pci_std_swizzle,
119 + .setup = ixp4xx_setup,
120 + .scan = ixp4xx_scan_bus,
121 + .map_irq = pronghornmetro_map_irq,
124 +int __init pronghornmetro_pci_init(void)
126 + if (machine_is_pronghorn_metro())
127 + pci_common_init(&pronghornmetro_pci);
131 +subsys_initcall(pronghornmetro_pci_init);
132 Index: linux-2.6.21.7/arch/arm/mach-ixp4xx/pronghornmetro-setup.c
133 ===================================================================
135 +++ linux-2.6.21.7/arch/arm/mach-ixp4xx/pronghornmetro-setup.c
138 + * arch/arm/mach-ixp4xx/pronghornmetro-setup.c
140 + * Board setup for the ADI Engineering Pronghorn Metro
142 + * Copyright (C) 2007 Imre Kaloz <Kaloz@openwrt.org>
144 + * based on coyote-setup.c:
145 + * Copyright (C) 2003-2005 MontaVista Software, Inc.
147 + * Author: Imre Kaloz <Kaloz@openwrt.org>
150 +#include <linux/kernel.h>
151 +#include <linux/init.h>
152 +#include <linux/device.h>
153 +#include <linux/serial.h>
154 +#include <linux/tty.h>
155 +#include <linux/serial_8250.h>
156 +#include <linux/slab.h>
158 +#include <asm/types.h>
159 +#include <asm/setup.h>
160 +#include <asm/memory.h>
161 +#include <asm/hardware.h>
162 +#include <asm/irq.h>
163 +#include <asm/mach-types.h>
164 +#include <asm/mach/arch.h>
165 +#include <asm/mach/flash.h>
167 +static struct flash_platform_data pronghornmetro_flash_data = {
168 + .map_name = "cfi_probe",
172 +static struct resource pronghornmetro_flash_resource = {
173 + .flags = IORESOURCE_MEM,
176 +static struct platform_device pronghornmetro_flash = {
177 + .name = "IXP4XX-Flash",
180 + .platform_data = &pronghornmetro_flash_data,
182 + .num_resources = 1,
183 + .resource = &pronghornmetro_flash_resource,
186 +static struct resource pronghornmetro_uart_resource = {
187 + .start = IXP4XX_UART2_BASE_PHYS,
188 + .end = IXP4XX_UART2_BASE_PHYS + 0x0fff,
189 + .flags = IORESOURCE_MEM,
192 +static struct plat_serial8250_port pronghornmetro_uart_data[] = {
194 + .mapbase = IXP4XX_UART2_BASE_PHYS,
195 + .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
196 + .irq = IRQ_IXP4XX_UART2,
197 + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
198 + .iotype = UPIO_MEM,
200 + .uartclk = IXP4XX_UART_XTAL,
205 +static struct platform_device pronghornmetro_uart = {
206 + .name = "serial8250",
207 + .id = PLAT8250_DEV_PLATFORM,
209 + .platform_data = pronghornmetro_uart_data,
211 + .num_resources = 1,
212 + .resource = &pronghornmetro_uart_resource,
215 +static struct platform_device *pronghornmetro_devices[] __initdata = {
216 + &pronghornmetro_flash,
217 + &pronghornmetro_uart,
220 +static void __init pronghornmetro_init(void)
224 + pronghornmetro_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
225 + pronghornmetro_flash_resource.end = IXP4XX_EXP_BUS_BASE(0) + SZ_16M - 1;
227 + *IXP4XX_EXP_CS0 |= IXP4XX_FLASH_WRITABLE;
228 + *IXP4XX_EXP_CS1 = *IXP4XX_EXP_CS0;
230 + platform_add_devices(pronghornmetro_devices, ARRAY_SIZE(pronghornmetro_devices));
233 +#ifdef CONFIG_MACH_PRONGHORNMETRO
234 +MACHINE_START(PRONGHORNMETRO, "ADI Engineering Pronghorn Metro")
235 + /* Maintainer: Imre Kaloz <kaloz@openwrt.org> */
236 + .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
237 + .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
238 + .map_io = ixp4xx_map_io,
239 + .init_irq = ixp4xx_init_irq,
240 + .timer = &ixp4xx_timer,
241 + .boot_params = 0x0100,
242 + .init_machine = pronghornmetro_init,
245 Index: linux-2.6.21.7/include/asm-arm/arch-ixp4xx/uncompress.h
246 ===================================================================
247 --- linux-2.6.21.7.orig/include/asm-arm/arch-ixp4xx/uncompress.h
248 +++ linux-2.6.21.7/include/asm-arm/arch-ixp4xx/uncompress.h
249 @@ -40,7 +40,7 @@ static __inline__ void __arch_decomp_set
251 * Some boards are using UART2 as console
253 - if (machine_is_adi_coyote() || machine_is_gtwx5715() || machine_is_gateway7001() || machine_is_wg302v2())
254 + if (machine_is_adi_coyote() || machine_is_gtwx5715() || machine_is_gateway7001() || machine_is_wg302v2() || machine_is_pronghorn_metro())
255 uart_base = (volatile u32*) IXP4XX_UART2_BASE_PHYS;
257 uart_base = (volatile u32*) IXP4XX_UART1_BASE_PHYS;