1 diff -Nur linux-2.6.21.1/Documentation/arm/IXP4xx linux-2.6.21.1-owrt/Documentation/arm/IXP4xx
2 --- linux-2.6.21.1/Documentation/arm/IXP4xx 2007-06-10 13:54:49.000000000 +0200
3 +++ linux-2.6.21.1-owrt/Documentation/arm/IXP4xx 2007-06-10 13:46:37.000000000 +0200
5 the platform has two mini-PCI slots used for 802.11[bga] cards.
6 Finally, there is an IDE port hanging off the expansion bus.
8 +ADI Engineering Pronghorn Metro Platform
9 +http://www.adiengineering.com/php-bin/ecomm4/productDisplay.php?category_id=30&product_id=85
11 Gateworks Avila Network Platform
12 http://www.gateworks.com/avila_sbc.htm
14 diff -Nur linux-2.6.21.1/arch/arm/mach-ixp4xx/Kconfig linux-2.6.21.1-owrt/arch/arm/mach-ixp4xx/Kconfig
15 --- linux-2.6.21.1/arch/arm/mach-ixp4xx/Kconfig 2007-06-10 13:54:47.000000000 +0200
16 +++ linux-2.6.21.1-owrt/arch/arm/mach-ixp4xx/Kconfig 2007-06-10 13:46:37.000000000 +0200
18 WG302 v2 or WAG302 v2 Access Points. For more information
19 on this platform, see http://openwrt.org
21 +config MACH_PRONGHORNMETRO
22 + bool "Pronghorn Metro"
25 + Say 'Y' here if you want your kernel to support the ADI
26 + Engineering Pronghorn Metro Platform. For more
27 + information on this platform, see <file:Documentation/arm/IXP4xx>.
32 diff -Nur linux-2.6.21.1/arch/arm/mach-ixp4xx/Makefile linux-2.6.21.1-owrt/arch/arm/mach-ixp4xx/Makefile
33 --- linux-2.6.21.1/arch/arm/mach-ixp4xx/Makefile 2007-06-10 13:54:47.000000000 +0200
34 +++ linux-2.6.21.1-owrt/arch/arm/mach-ixp4xx/Makefile 2007-06-10 13:46:37.000000000 +0200
36 obj-pci-$(CONFIG_MACH_NAS100D) += nas100d-pci.o
37 obj-pci-$(CONFIG_MACH_GATEWAY7001) += gateway7001-pci.o
38 obj-pci-$(CONFIG_MACH_WG302V2) += wg302v2-pci.o
39 +obj-pci-$(CONFIG_MACH_PRONGHORNMETRO) += pronghornmetro-pci.o
44 obj-$(CONFIG_MACH_NAS100D) += nas100d-setup.o nas100d-power.o
45 obj-$(CONFIG_MACH_GATEWAY7001) += gateway7001-setup.o
46 obj-$(CONFIG_MACH_WG302V2) += wg302v2-setup.o
47 +obj-$(CONFIG_MACH_PRONGHORNMETRO) += pronghornmetro-setup.o
49 obj-$(CONFIG_PCI) += $(obj-pci-$(CONFIG_PCI)) common-pci.o
50 diff -Nur linux-2.6.21.1/arch/arm/mach-ixp4xx/pronghornmetro-pci.c linux-2.6.21.1-owrt/arch/arm/mach-ixp4xx/pronghornmetro-pci.c
51 --- linux-2.6.21.1/arch/arm/mach-ixp4xx/pronghornmetro-pci.c 1970-01-01 01:00:00.000000000 +0100
52 +++ linux-2.6.21.1-owrt/arch/arm/mach-ixp4xx/pronghornmetro-pci.c 2007-06-10 13:50:08.000000000 +0200
55 + * arch/arch/mach-ixp4xx/pronghornmetro-pci.c
57 + * PCI setup routines for ADI Engineering Pronghorn Metro
59 + * Copyright (C) 2007 Imre Kaloz <kaloz@openwrt.org>
61 + * based on coyote-pci.c:
62 + * Copyright (C) 2002 Jungo Software Technologies.
63 + * Copyright (C) 2003 MontaVista Softwrae, Inc.
65 + * Maintainer: Imre Kaloz <kaloz@openwrt.org>
67 + * This program is free software; you can redistribute it and/or modify
68 + * it under the terms of the GNU General Public License version 2 as
69 + * published by the Free Software Foundation.
73 +#include <linux/kernel.h>
74 +#include <linux/pci.h>
75 +#include <linux/init.h>
76 +#include <linux/irq.h>
78 +#include <asm/mach-types.h>
79 +#include <asm/hardware.h>
82 +#include <asm/mach/pci.h>
84 +extern void ixp4xx_pci_preinit(void);
85 +extern int ixp4xx_setup(int nr, struct pci_sys_data *sys);
86 +extern struct pci_bus *ixp4xx_scan_bus(int nr, struct pci_sys_data *sys);
88 +void __init pronghornmetro_pci_preinit(void)
90 + set_irq_type(IRQ_IXP4XX_GPIO4, IRQT_LOW);
91 + set_irq_type(IRQ_IXP4XX_GPIO6, IRQT_LOW);
92 + set_irq_type(IRQ_IXP4XX_GPIO11, IRQT_LOW);
93 + set_irq_type(IRQ_IXP4XX_GPIO1, IRQT_LOW);
95 + ixp4xx_pci_preinit();
98 +static int __init pronghornmetro_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
101 + return IRQ_IXP4XX_GPIO4;
102 + else if (slot == 14)
103 + return IRQ_IXP4XX_GPIO6;
104 + else if (slot == 15)
105 + return IRQ_IXP4XX_GPIO11;
106 + else if (slot == 16)
107 + return IRQ_IXP4XX_GPIO1;
111 +struct hw_pci pronghornmetro_pci __initdata = {
112 + .nr_controllers = 1,
113 + .preinit = pronghornmetro_pci_preinit,
114 + .swizzle = pci_std_swizzle,
115 + .setup = ixp4xx_setup,
116 + .scan = ixp4xx_scan_bus,
117 + .map_irq = pronghornmetro_map_irq,
120 +int __init pronghornmetro_pci_init(void)
122 + if (machine_is_pronghorn_metro())
123 + pci_common_init(&pronghornmetro_pci);
127 +subsys_initcall(pronghornmetro_pci_init);
128 diff -Nur linux-2.6.21.1/arch/arm/mach-ixp4xx/pronghornmetro-setup.c linux-2.6.21.1-owrt/arch/arm/mach-ixp4xx/pronghornmetro-setup.c
129 --- linux-2.6.21.1/arch/arm/mach-ixp4xx/pronghornmetro-setup.c 1970-01-01 01:00:00.000000000 +0100
130 +++ linux-2.6.21.1-owrt/arch/arm/mach-ixp4xx/pronghornmetro-setup.c 2007-06-10 13:51:51.000000000 +0200
133 + * arch/arm/mach-ixp4xx/pronghornmetro-setup.c
135 + * Board setup for the ADI Engineering Pronghorn Metro
137 + * Copyright (C) 2007 Imre Kaloz <Kaloz@openwrt.org>
139 + * based on coyote-setup.c:
140 + * Copyright (C) 2003-2005 MontaVista Software, Inc.
142 + * Author: Imre Kaloz <Kaloz@openwrt.org>
145 +#include <linux/kernel.h>
146 +#include <linux/init.h>
147 +#include <linux/device.h>
148 +#include <linux/serial.h>
149 +#include <linux/tty.h>
150 +#include <linux/serial_8250.h>
151 +#include <linux/slab.h>
153 +#include <asm/types.h>
154 +#include <asm/setup.h>
155 +#include <asm/memory.h>
156 +#include <asm/hardware.h>
157 +#include <asm/irq.h>
158 +#include <asm/mach-types.h>
159 +#include <asm/mach/arch.h>
160 +#include <asm/mach/flash.h>
162 +static struct flash_platform_data pronghornmetro_flash_data = {
163 + .map_name = "cfi_probe",
167 +static struct resource pronghornmetro_flash_resource = {
168 + .flags = IORESOURCE_MEM,
171 +static struct platform_device pronghornmetro_flash = {
172 + .name = "IXP4XX-Flash",
175 + .platform_data = &pronghornmetro_flash_data,
177 + .num_resources = 1,
178 + .resource = &pronghornmetro_flash_resource,
181 +static struct resource pronghornmetro_uart_resource = {
182 + .start = IXP4XX_UART2_BASE_PHYS,
183 + .end = IXP4XX_UART2_BASE_PHYS + 0x0fff,
184 + .flags = IORESOURCE_MEM,
187 +static struct plat_serial8250_port pronghornmetro_uart_data[] = {
189 + .mapbase = IXP4XX_UART2_BASE_PHYS,
190 + .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
191 + .irq = IRQ_IXP4XX_UART2,
192 + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
193 + .iotype = UPIO_MEM,
195 + .uartclk = IXP4XX_UART_XTAL,
200 +static struct platform_device pronghornmetro_uart = {
201 + .name = "serial8250",
202 + .id = PLAT8250_DEV_PLATFORM,
204 + .platform_data = pronghornmetro_uart_data,
206 + .num_resources = 1,
207 + .resource = &pronghornmetro_uart_resource,
210 +static struct platform_device *pronghornmetro_devices[] __initdata = {
211 + &pronghornmetro_flash,
212 + &pronghornmetro_uart,
215 +static void __init pronghornmetro_init(void)
219 + pronghornmetro_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
220 + pronghornmetro_flash_resource.end = IXP4XX_EXP_BUS_BASE(0) + SZ_16M - 1;
222 + *IXP4XX_EXP_CS0 |= IXP4XX_FLASH_WRITABLE;
223 + *IXP4XX_EXP_CS1 = *IXP4XX_EXP_CS0;
225 + platform_add_devices(pronghornmetro_devices, ARRAY_SIZE(pronghornmetro_devices));
228 +#ifdef CONFIG_MACH_PRONGHORNMETRO
229 +MACHINE_START(PRONGHORNMETRO, "ADI Engineering Pronghorn Metro")
230 + /* Maintainer: Imre Kaloz <kaloz@openwrt.org> */
231 + .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
232 + .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
233 + .map_io = ixp4xx_map_io,
234 + .init_irq = ixp4xx_init_irq,
235 + .timer = &ixp4xx_timer,
236 + .boot_params = 0x0100,
237 + .init_machine = pronghornmetro_init,
240 diff -Nur linux-2.6.21.1/include/asm-arm/arch-ixp4xx/uncompress.h linux-2.6.21.1-owrt/include/asm-arm/arch-ixp4xx/uncompress.h
241 --- linux-2.6.21.1/include/asm-arm/arch-ixp4xx/uncompress.h 2007-06-10 13:54:52.000000000 +0200
242 +++ linux-2.6.21.1-owrt/include/asm-arm/arch-ixp4xx/uncompress.h 2007-06-10 13:49:37.000000000 +0200
245 * Some boards are using UART2 as console
247 - if (machine_is_adi_coyote() || machine_is_gtwx5715() || machine_is_gateway7001() || machine_is_wg302v2())
248 + if (machine_is_adi_coyote() || machine_is_gtwx5715() || machine_is_gateway7001() || machine_is_wg302v2() || machine_is_pronghorn_metro())
249 uart_base = (volatile u32*) IXP4XX_UART2_BASE_PHYS;
251 uart_base = (volatile u32*) IXP4XX_UART1_BASE_PHYS;