1 diff -Nur linux-2.6.23/arch/arm/mach-ixp4xx/Kconfig linux-2.6.23-owrt/arch/arm/mach-ixp4xx/Kconfig
2 --- linux-2.6.23/arch/arm/mach-ixp4xx/Kconfig 2007-10-22 14:47:50.000000000 +0200
3 +++ linux-2.6.23-owrt/arch/arm/mach-ixp4xx/Kconfig 2007-10-22 15:16:43.000000000 +0200
5 WG302 v2 or WAG302 v2 Access Points. For more information
6 on this platform, see http://openwrt.org
8 +config MACH_PRONGHORNMETRO
9 + bool "Pronghorn Metro"
12 + Say 'Y' here if you want your kernel to support the ADI
13 + Engineering Pronghorn Metro Platform. For more
14 + information on this platform, see <file:Documentation/arm/IXP4xx>.
19 diff -Nur linux-2.6.23/arch/arm/mach-ixp4xx/Makefile linux-2.6.23-owrt/arch/arm/mach-ixp4xx/Makefile
20 --- linux-2.6.23/arch/arm/mach-ixp4xx/Makefile 2007-10-22 14:47:50.000000000 +0200
21 +++ linux-2.6.23-owrt/arch/arm/mach-ixp4xx/Makefile 2007-10-22 15:26:15.000000000 +0200
23 obj-pci-$(CONFIG_MACH_GATEWAY7001) += gateway7001-pci.o
24 obj-pci-$(CONFIG_MACH_WG302V2) += wg302v2-pci.o
25 obj-pci-$(CONFIG_MACH_FSG) += fsg-pci.o
26 +obj-pci-$(CONFIG_MACH_PRONGHORNMETRO) += pronghornmetro-pci.o
31 obj-$(CONFIG_MACH_GATEWAY7001) += gateway7001-setup.o
32 obj-$(CONFIG_MACH_WG302V2) += wg302v2-setup.o
33 obj-$(CONFIG_MACH_FSG) += fsg-setup.o
34 +obj-$(CONFIG_MACH_PRONGHORNMETRO) += pronghornmetro-setup.o
36 obj-$(CONFIG_PCI) += $(obj-pci-$(CONFIG_PCI)) common-pci.o
37 obj-$(CONFIG_IXP4XX_QMGR) += ixp4xx_qmgr.o
38 diff -Nur linux-2.6.23/arch/arm/mach-ixp4xx/pronghornmetro-pci.c linux-2.6.23-owrt/arch/arm/mach-ixp4xx/pronghornmetro-pci.c
39 --- linux-2.6.23/arch/arm/mach-ixp4xx/pronghornmetro-pci.c 1970-01-01 01:00:00.000000000 +0100
40 +++ linux-2.6.23-owrt/arch/arm/mach-ixp4xx/pronghornmetro-pci.c 2007-10-22 15:16:43.000000000 +0200
43 + * arch/arch/mach-ixp4xx/pronghornmetro-pci.c
45 + * PCI setup routines for ADI Engineering Pronghorn Metro
47 + * Copyright (C) 2007 Imre Kaloz <kaloz@openwrt.org>
49 + * based on coyote-pci.c:
50 + * Copyright (C) 2002 Jungo Software Technologies.
51 + * Copyright (C) 2003 MontaVista Softwrae, Inc.
53 + * Maintainer: Imre Kaloz <kaloz@openwrt.org>
55 + * This program is free software; you can redistribute it and/or modify
56 + * it under the terms of the GNU General Public License version 2 as
57 + * published by the Free Software Foundation.
61 +#include <linux/kernel.h>
62 +#include <linux/pci.h>
63 +#include <linux/init.h>
64 +#include <linux/irq.h>
66 +#include <asm/mach-types.h>
67 +#include <asm/hardware.h>
70 +#include <asm/mach/pci.h>
72 +extern void ixp4xx_pci_preinit(void);
73 +extern int ixp4xx_setup(int nr, struct pci_sys_data *sys);
74 +extern struct pci_bus *ixp4xx_scan_bus(int nr, struct pci_sys_data *sys);
76 +void __init pronghornmetro_pci_preinit(void)
78 + set_irq_type(IRQ_IXP4XX_GPIO4, IRQT_LOW);
79 + set_irq_type(IRQ_IXP4XX_GPIO6, IRQT_LOW);
80 + set_irq_type(IRQ_IXP4XX_GPIO11, IRQT_LOW);
81 + set_irq_type(IRQ_IXP4XX_GPIO1, IRQT_LOW);
83 + ixp4xx_pci_preinit();
86 +static int __init pronghornmetro_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
89 + return IRQ_IXP4XX_GPIO4;
90 + else if (slot == 14)
91 + return IRQ_IXP4XX_GPIO6;
92 + else if (slot == 15)
93 + return IRQ_IXP4XX_GPIO11;
94 + else if (slot == 16)
95 + return IRQ_IXP4XX_GPIO1;
99 +struct hw_pci pronghornmetro_pci __initdata = {
100 + .nr_controllers = 1,
101 + .preinit = pronghornmetro_pci_preinit,
102 + .swizzle = pci_std_swizzle,
103 + .setup = ixp4xx_setup,
104 + .scan = ixp4xx_scan_bus,
105 + .map_irq = pronghornmetro_map_irq,
108 +int __init pronghornmetro_pci_init(void)
110 + if (machine_is_pronghorn_metro())
111 + pci_common_init(&pronghornmetro_pci);
115 +subsys_initcall(pronghornmetro_pci_init);
116 diff -Nur linux-2.6.23/arch/arm/mach-ixp4xx/pronghornmetro-setup.c linux-2.6.23-owrt/arch/arm/mach-ixp4xx/pronghornmetro-setup.c
117 --- linux-2.6.23/arch/arm/mach-ixp4xx/pronghornmetro-setup.c 1970-01-01 01:00:00.000000000 +0100
118 +++ linux-2.6.23-owrt/arch/arm/mach-ixp4xx/pronghornmetro-setup.c 2007-10-22 15:36:35.000000000 +0200
121 + * arch/arm/mach-ixp4xx/pronghornmetro-setup.c
123 + * Board setup for the ADI Engineering Pronghorn Metro
125 + * Copyright (C) 2007 Imre Kaloz <Kaloz@openwrt.org>
127 + * based on coyote-setup.c:
128 + * Copyright (C) 2003-2005 MontaVista Software, Inc.
130 + * Author: Imre Kaloz <Kaloz@openwrt.org>
133 +#include <linux/kernel.h>
134 +#include <linux/init.h>
135 +#include <linux/device.h>
136 +#include <linux/serial.h>
137 +#include <linux/tty.h>
138 +#include <linux/serial_8250.h>
139 +#include <linux/slab.h>
141 +#include <asm/types.h>
142 +#include <asm/setup.h>
143 +#include <asm/memory.h>
144 +#include <asm/hardware.h>
145 +#include <asm/irq.h>
146 +#include <asm/mach-types.h>
147 +#include <asm/mach/arch.h>
148 +#include <asm/mach/flash.h>
150 +static struct flash_platform_data pronghornmetro_flash_data = {
151 + .map_name = "cfi_probe",
155 +static struct resource pronghornmetro_flash_resource = {
156 + .flags = IORESOURCE_MEM,
159 +static struct platform_device pronghornmetro_flash = {
160 + .name = "IXP4XX-Flash",
163 + .platform_data = &pronghornmetro_flash_data,
165 + .num_resources = 1,
166 + .resource = &pronghornmetro_flash_resource,
169 +static struct resource pronghornmetro_uart_resource = {
170 + .start = IXP4XX_UART2_BASE_PHYS,
171 + .end = IXP4XX_UART2_BASE_PHYS + 0x0fff,
172 + .flags = IORESOURCE_MEM,
175 +static struct plat_serial8250_port pronghornmetro_uart_data[] = {
177 + .mapbase = IXP4XX_UART2_BASE_PHYS,
178 + .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
179 + .irq = IRQ_IXP4XX_UART2,
180 + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
181 + .iotype = UPIO_MEM,
183 + .uartclk = IXP4XX_UART_XTAL,
188 +static struct platform_device pronghornmetro_uart = {
189 + .name = "serial8250",
190 + .id = PLAT8250_DEV_PLATFORM,
192 + .platform_data = pronghornmetro_uart_data,
194 + .num_resources = 1,
195 + .resource = &pronghornmetro_uart_resource,
198 +static struct resource pronghornmetro_pata_resources[] = {
200 + .flags = IORESOURCE_MEM
203 + .flags = IORESOURCE_MEM,
207 + .start = IRQ_IXP4XX_GPIO0,
208 + .end = IRQ_IXP4XX_GPIO0,
209 + .flags = IORESOURCE_IRQ,
213 +static struct ixp4xx_pata_data pronghornmetro_pata_data = {
214 + .cs0_bits = 0xbfff0043,
215 + .cs1_bits = 0xbfff0043,
218 +static struct platform_device pronghornmetro_pata = {
219 + .name = "pata_ixp4xx_cf",
221 + .dev.platform_data = &pronghornmetro_pata_data,
222 + .num_resources = ARRAY_SIZE(pronghornmetro_pata_resources),
223 + .resource = pronghornmetro_pata_resources,
226 +static struct platform_device *pronghornmetro_devices[] __initdata = {
227 + &pronghornmetro_flash,
228 + &pronghornmetro_uart,
231 +static void __init pronghornmetro_init(void)
235 + pronghornmetro_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
236 + pronghornmetro_flash_resource.end = IXP4XX_EXP_BUS_BASE(0) + SZ_16M - 1;
238 + *IXP4XX_EXP_CS0 |= IXP4XX_FLASH_WRITABLE;
239 + *IXP4XX_EXP_CS1 = *IXP4XX_EXP_CS0;
241 + platform_add_devices(pronghornmetro_devices, ARRAY_SIZE(pronghornmetro_devices));
243 + pronghornmetro_pata_resources[0].start = IXP4XX_EXP_BUS_BASE(1);
244 + pronghornmetro_pata_resources[0].end = IXP4XX_EXP_BUS_END(1);
246 + pronghornmetro_pata_resources[1].start = IXP4XX_EXP_BUS_BASE(2);
247 + pronghornmetro_pata_resources[1].end = IXP4XX_EXP_BUS_END(2);
249 + pronghornmetro_pata_data.cs0_cfg = IXP4XX_EXP_CS1;
250 + pronghornmetro_pata_data.cs1_cfg = IXP4XX_EXP_CS2;
252 + platform_device_register(&pronghornmetro_pata);
255 +#ifdef CONFIG_MACH_PRONGHORNMETRO
256 +MACHINE_START(PRONGHORNMETRO, "ADI Engineering Pronghorn Metro")
257 + /* Maintainer: Imre Kaloz <kaloz@openwrt.org> */
258 + .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
259 + .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
260 + .map_io = ixp4xx_map_io,
261 + .init_irq = ixp4xx_init_irq,
262 + .timer = &ixp4xx_timer,
263 + .boot_params = 0x0100,
264 + .init_machine = pronghornmetro_init,
267 diff -Nur linux-2.6.23/Documentation/arm/IXP4xx linux-2.6.23-owrt/Documentation/arm/IXP4xx
268 --- linux-2.6.23/Documentation/arm/IXP4xx 2007-10-09 22:31:38.000000000 +0200
269 +++ linux-2.6.23-owrt/Documentation/arm/IXP4xx 2007-10-22 15:16:43.000000000 +0200
271 the platform has two mini-PCI slots used for 802.11[bga] cards.
272 Finally, there is an IDE port hanging off the expansion bus.
274 +ADI Engineering Pronghorn Metro Platform
275 +http://www.adiengineering.com/php-bin/ecomm4/productDisplay.php?category_id=30&product_id=85
277 Gateworks Avila Network Platform
278 http://www.gateworks.com/avila_sbc.htm
280 diff -Nur linux-2.6.23/include/asm-arm/arch-ixp4xx/uncompress.h linux-2.6.23-owrt/include/asm-arm/arch-ixp4xx/uncompress.h
281 --- linux-2.6.23/include/asm-arm/arch-ixp4xx/uncompress.h 2007-10-22 14:47:50.000000000 +0200
282 +++ linux-2.6.23-owrt/include/asm-arm/arch-ixp4xx/uncompress.h 2007-10-22 15:18:47.000000000 +0200
284 * Some boards are using UART2 as console
286 if (machine_is_adi_coyote() || machine_is_gtwx5715() ||
287 - machine_is_gateway7001() || machine_is_wg302v2())
288 + machine_is_gateway7001() || machine_is_wg302v2() ||
289 + machine_is_pronghorn_metro())
290 uart_base = (volatile u32*) IXP4XX_UART2_BASE_PHYS;
292 uart_base = (volatile u32*) IXP4XX_UART1_BASE_PHYS;