1 --- a/arch/arm/mach-ixp4xx/Kconfig
2 +++ b/arch/arm/mach-ixp4xx/Kconfig
4 WG302 v2 or WAG302 v2 Access Points. For more information
5 on this platform, see http://openwrt.org
7 +config MACH_PRONGHORNMETRO
8 + bool "Pronghorn Metro"
11 + Say 'Y' here if you want your kernel to support the ADI
12 + Engineering Pronghorn Metro Platform. For more
13 + information on this platform, see <file:Documentation/arm/IXP4xx>.
18 --- a/arch/arm/mach-ixp4xx/Makefile
19 +++ b/arch/arm/mach-ixp4xx/Makefile
21 obj-pci-$(CONFIG_MACH_GATEWAY7001) += gateway7001-pci.o
22 obj-pci-$(CONFIG_MACH_WG302V2) += wg302v2-pci.o
23 obj-pci-$(CONFIG_MACH_FSG) += fsg-pci.o
24 +obj-pci-$(CONFIG_MACH_PRONGHORNMETRO) += pronghornmetro-pci.o
29 obj-$(CONFIG_MACH_GATEWAY7001) += gateway7001-setup.o
30 obj-$(CONFIG_MACH_WG302V2) += wg302v2-setup.o
31 obj-$(CONFIG_MACH_FSG) += fsg-setup.o
32 +obj-$(CONFIG_MACH_PRONGHORNMETRO) += pronghornmetro-setup.o
34 obj-$(CONFIG_PCI) += $(obj-pci-$(CONFIG_PCI)) common-pci.o
35 obj-$(CONFIG_IXP4XX_QMGR) += ixp4xx_qmgr.o
37 +++ b/arch/arm/mach-ixp4xx/pronghornmetro-pci.c
40 + * arch/arch/mach-ixp4xx/pronghornmetro-pci.c
42 + * PCI setup routines for ADI Engineering Pronghorn Metro
44 + * Copyright (C) 2007 Imre Kaloz <kaloz@openwrt.org>
46 + * based on coyote-pci.c:
47 + * Copyright (C) 2002 Jungo Software Technologies.
48 + * Copyright (C) 2003 MontaVista Softwrae, Inc.
50 + * Maintainer: Imre Kaloz <kaloz@openwrt.org>
52 + * This program is free software; you can redistribute it and/or modify
53 + * it under the terms of the GNU General Public License version 2 as
54 + * published by the Free Software Foundation.
58 +#include <linux/kernel.h>
59 +#include <linux/pci.h>
60 +#include <linux/init.h>
61 +#include <linux/irq.h>
63 +#include <asm/mach-types.h>
64 +#include <asm/hardware.h>
67 +#include <asm/mach/pci.h>
69 +extern void ixp4xx_pci_preinit(void);
70 +extern int ixp4xx_setup(int nr, struct pci_sys_data *sys);
71 +extern struct pci_bus *ixp4xx_scan_bus(int nr, struct pci_sys_data *sys);
73 +void __init pronghornmetro_pci_preinit(void)
75 + set_irq_type(IRQ_IXP4XX_GPIO4, IRQT_LOW);
76 + set_irq_type(IRQ_IXP4XX_GPIO6, IRQT_LOW);
77 + set_irq_type(IRQ_IXP4XX_GPIO11, IRQT_LOW);
78 + set_irq_type(IRQ_IXP4XX_GPIO1, IRQT_LOW);
80 + ixp4xx_pci_preinit();
83 +static int __init pronghornmetro_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
86 + return IRQ_IXP4XX_GPIO4;
87 + else if (slot == 14)
88 + return IRQ_IXP4XX_GPIO6;
89 + else if (slot == 15)
90 + return IRQ_IXP4XX_GPIO11;
91 + else if (slot == 16)
92 + return IRQ_IXP4XX_GPIO1;
96 +struct hw_pci pronghornmetro_pci __initdata = {
97 + .nr_controllers = 1,
98 + .preinit = pronghornmetro_pci_preinit,
99 + .swizzle = pci_std_swizzle,
100 + .setup = ixp4xx_setup,
101 + .scan = ixp4xx_scan_bus,
102 + .map_irq = pronghornmetro_map_irq,
105 +int __init pronghornmetro_pci_init(void)
107 + if (machine_is_pronghorn_metro())
108 + pci_common_init(&pronghornmetro_pci);
112 +subsys_initcall(pronghornmetro_pci_init);
114 +++ b/arch/arm/mach-ixp4xx/pronghornmetro-setup.c
117 + * arch/arm/mach-ixp4xx/pronghornmetro-setup.c
119 + * Board setup for the ADI Engineering Pronghorn Metro
121 + * Copyright (C) 2007 Imre Kaloz <Kaloz@openwrt.org>
123 + * based on coyote-setup.c:
124 + * Copyright (C) 2003-2005 MontaVista Software, Inc.
126 + * Author: Imre Kaloz <Kaloz@openwrt.org>
129 +#include <linux/kernel.h>
130 +#include <linux/init.h>
131 +#include <linux/device.h>
132 +#include <linux/serial.h>
133 +#include <linux/tty.h>
134 +#include <linux/serial_8250.h>
135 +#include <linux/slab.h>
137 +#include <asm/types.h>
138 +#include <asm/setup.h>
139 +#include <asm/memory.h>
140 +#include <asm/hardware.h>
141 +#include <asm/irq.h>
142 +#include <asm/mach-types.h>
143 +#include <asm/mach/arch.h>
144 +#include <asm/mach/flash.h>
146 +static struct flash_platform_data pronghornmetro_flash_data = {
147 + .map_name = "cfi_probe",
151 +static struct resource pronghornmetro_flash_resource = {
152 + .flags = IORESOURCE_MEM,
155 +static struct platform_device pronghornmetro_flash = {
156 + .name = "IXP4XX-Flash",
159 + .platform_data = &pronghornmetro_flash_data,
161 + .num_resources = 1,
162 + .resource = &pronghornmetro_flash_resource,
165 +static struct resource pronghornmetro_uart_resource = {
166 + .start = IXP4XX_UART2_BASE_PHYS,
167 + .end = IXP4XX_UART2_BASE_PHYS + 0x0fff,
168 + .flags = IORESOURCE_MEM,
171 +static struct plat_serial8250_port pronghornmetro_uart_data[] = {
173 + .mapbase = IXP4XX_UART2_BASE_PHYS,
174 + .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
175 + .irq = IRQ_IXP4XX_UART2,
176 + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
177 + .iotype = UPIO_MEM,
179 + .uartclk = IXP4XX_UART_XTAL,
184 +static struct platform_device pronghornmetro_uart = {
185 + .name = "serial8250",
186 + .id = PLAT8250_DEV_PLATFORM,
188 + .platform_data = pronghornmetro_uart_data,
190 + .num_resources = 1,
191 + .resource = &pronghornmetro_uart_resource,
194 +static struct resource pronghornmetro_pata_resources[] = {
196 + .flags = IORESOURCE_MEM
199 + .flags = IORESOURCE_MEM,
203 + .start = IRQ_IXP4XX_GPIO0,
204 + .end = IRQ_IXP4XX_GPIO0,
205 + .flags = IORESOURCE_IRQ,
209 +static struct ixp4xx_pata_data pronghornmetro_pata_data = {
210 + .cs0_bits = 0xbfff0043,
211 + .cs1_bits = 0xbfff0043,
214 +static struct platform_device pronghornmetro_pata = {
215 + .name = "pata_ixp4xx_cf",
217 + .dev.platform_data = &pronghornmetro_pata_data,
218 + .num_resources = ARRAY_SIZE(pronghornmetro_pata_resources),
219 + .resource = pronghornmetro_pata_resources,
222 +static struct platform_device *pronghornmetro_devices[] __initdata = {
223 + &pronghornmetro_flash,
224 + &pronghornmetro_uart,
227 +static void __init pronghornmetro_init(void)
231 + pronghornmetro_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
232 + pronghornmetro_flash_resource.end = IXP4XX_EXP_BUS_BASE(0) + SZ_16M - 1;
234 + *IXP4XX_EXP_CS0 |= IXP4XX_FLASH_WRITABLE;
235 + *IXP4XX_EXP_CS1 = *IXP4XX_EXP_CS0;
237 + platform_add_devices(pronghornmetro_devices, ARRAY_SIZE(pronghornmetro_devices));
239 + pronghornmetro_pata_resources[0].start = IXP4XX_EXP_BUS_BASE(1);
240 + pronghornmetro_pata_resources[0].end = IXP4XX_EXP_BUS_END(1);
242 + pronghornmetro_pata_resources[1].start = IXP4XX_EXP_BUS_BASE(2);
243 + pronghornmetro_pata_resources[1].end = IXP4XX_EXP_BUS_END(2);
245 + pronghornmetro_pata_data.cs0_cfg = IXP4XX_EXP_CS1;
246 + pronghornmetro_pata_data.cs1_cfg = IXP4XX_EXP_CS2;
248 + platform_device_register(&pronghornmetro_pata);
251 +#ifdef CONFIG_MACH_PRONGHORNMETRO
252 +MACHINE_START(PRONGHORNMETRO, "ADI Engineering Pronghorn Metro")
253 + /* Maintainer: Imre Kaloz <kaloz@openwrt.org> */
254 + .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
255 + .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
256 + .map_io = ixp4xx_map_io,
257 + .init_irq = ixp4xx_init_irq,
258 + .timer = &ixp4xx_timer,
259 + .boot_params = 0x0100,
260 + .init_machine = pronghornmetro_init,
263 --- a/Documentation/arm/IXP4xx
264 +++ b/Documentation/arm/IXP4xx
266 the platform has two mini-PCI slots used for 802.11[bga] cards.
267 Finally, there is an IDE port hanging off the expansion bus.
269 +ADI Engineering Pronghorn Metro Platform
270 +http://www.adiengineering.com/php-bin/ecomm4/productDisplay.php?category_id=30&product_id=85
272 Gateworks Avila Network Platform
273 http://www.gateworks.com/avila_sbc.htm
275 --- a/include/asm-arm/arch-ixp4xx/uncompress.h
276 +++ b/include/asm-arm/arch-ixp4xx/uncompress.h
278 * Some boards are using UART2 as console
280 if (machine_is_adi_coyote() || machine_is_gtwx5715() ||
281 - machine_is_gateway7001() || machine_is_wg302v2())
282 + machine_is_gateway7001() || machine_is_wg302v2() ||
283 + machine_is_pronghorn_metro())
284 uart_base = (volatile u32*) IXP4XX_UART2_BASE_PHYS;
286 uart_base = (volatile u32*) IXP4XX_UART1_BASE_PHYS;