1 diff -Nur linux-2.6.23.1/arch/arm/mach-ixp4xx/ap1000-setup.c linux-2.6.23.1-owrt/arch/arm/mach-ixp4xx/ap1000-setup.c
2 --- linux-2.6.23.1/arch/arm/mach-ixp4xx/ap1000-setup.c 1970-01-01 01:00:00.000000000 +0100
3 +++ linux-2.6.23.1-owrt/arch/arm/mach-ixp4xx/ap1000-setup.c 2007-11-14 13:58:58.000000000 +0100
6 + * arch/arm/mach-ixp4xx/ap1000-setup.c
10 + * Copyright (C) 2007 Imre Kaloz <Kaloz@openwrt.org>
12 + * based on ixdp425-setup.c:
13 + * Copyright (C) 2003-2005 MontaVista Software, Inc.
15 + * Author: Imre Kaloz <Kaloz@openwrt.org>
18 +#include <linux/kernel.h>
19 +#include <linux/init.h>
20 +#include <linux/device.h>
21 +#include <linux/serial.h>
22 +#include <linux/tty.h>
23 +#include <linux/serial_8250.h>
24 +#include <linux/slab.h>
26 +#include <asm/types.h>
27 +#include <asm/setup.h>
28 +#include <asm/memory.h>
29 +#include <asm/hardware.h>
30 +#include <asm/mach-types.h>
32 +#include <asm/mach/arch.h>
33 +#include <asm/mach/flash.h>
35 +static struct flash_platform_data ap1000_flash_data = {
36 + .map_name = "cfi_probe",
40 +static struct resource ap1000_flash_resource = {
41 + .flags = IORESOURCE_MEM,
44 +static struct platform_device ap1000_flash = {
45 + .name = "IXP4XX-Flash",
48 + .platform_data = &ap1000_flash_data,
51 + .resource = &ap1000_flash_resource,
54 +static struct resource ap1000_uart_resources[] = {
56 + .start = IXP4XX_UART1_BASE_PHYS,
57 + .end = IXP4XX_UART1_BASE_PHYS + 0x0fff,
58 + .flags = IORESOURCE_MEM
61 + .start = IXP4XX_UART2_BASE_PHYS,
62 + .end = IXP4XX_UART2_BASE_PHYS + 0x0fff,
63 + .flags = IORESOURCE_MEM
67 +static struct plat_serial8250_port ap1000_uart_data[] = {
69 + .mapbase = IXP4XX_UART1_BASE_PHYS,
70 + .membase = (char *)IXP4XX_UART1_BASE_VIRT + REG_OFFSET,
71 + .irq = IRQ_IXP4XX_UART1,
72 + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
75 + .uartclk = IXP4XX_UART_XTAL,
78 + .mapbase = IXP4XX_UART2_BASE_PHYS,
79 + .membase = (char *)IXP4XX_UART2_BASE_VIRT + REG_OFFSET,
80 + .irq = IRQ_IXP4XX_UART2,
81 + .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST,
84 + .uartclk = IXP4XX_UART_XTAL,
89 +static struct platform_device ap1000_uart = {
90 + .name = "serial8250",
91 + .id = PLAT8250_DEV_PLATFORM,
92 + .dev.platform_data = ap1000_uart_data,
94 + .resource = ap1000_uart_resources
97 +static struct platform_device *ap1000_devices[] __initdata = {
102 +static char ap1000_mem_fixup[] __initdata = "mem=64M ";
104 +static void __init ap1000_fixup(struct machine_desc *desc,
105 + struct tag *tags, char **cmdline, struct meminfo *mi)
108 + struct tag *t = tags;
109 + char *p = *cmdline;
111 + /* Find the end of the tags table, taking note of any cmdline tag. */
112 + for (; t->hdr.size; t = tag_next(t)) {
113 + if (t->hdr.tag == ATAG_CMDLINE) {
114 + p = t->u.cmdline.cmdline;
118 + /* Overwrite the end of the table with a new cmdline tag. */
119 + t->hdr.tag = ATAG_CMDLINE;
120 + t->hdr.size = (sizeof (struct tag_header) +
121 + strlen(ap1000_mem_fixup) + strlen(p) + 1 + 4) >> 2;
122 + strlcpy(t->u.cmdline.cmdline, ap1000_mem_fixup, COMMAND_LINE_SIZE);
123 + strlcpy(t->u.cmdline.cmdline + strlen(ap1000_mem_fixup), p,
124 + COMMAND_LINE_SIZE - strlen(ap1000_mem_fixup));
126 + /* Terminate the table. */
128 + t->hdr.tag = ATAG_NONE;
132 +static void __init ap1000_init(void)
136 + ap1000_flash_resource.start = IXP4XX_EXP_BUS_BASE(0);
137 + ap1000_flash_resource.end =
138 + IXP4XX_EXP_BUS_BASE(0) + ixp4xx_exp_bus_size - 1;
140 + platform_add_devices(ap1000_devices, ARRAY_SIZE(ap1000_devices));
143 +#ifdef CONFIG_MACH_AP1000
144 +MACHINE_START(AP1000, "Lanready AP-1000")
145 + /* Maintainer: Imre Kaloz <Kaloz@openwrt.org> */
146 + .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
147 + .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
148 + .fixup = ap1000_fixup,
149 + .map_io = ixp4xx_map_io,
150 + .init_irq = ixp4xx_init_irq,
151 + .timer = &ixp4xx_timer,
152 + .boot_params = 0x0100,
153 + .init_machine = ap1000_init,
156 diff -Nur linux-2.6.23.1/arch/arm/mach-ixp4xx/ixdp425-pci.c linux-2.6.23.1-owrt/arch/arm/mach-ixp4xx/ixdp425-pci.c
157 --- linux-2.6.23.1/arch/arm/mach-ixp4xx/ixdp425-pci.c 2007-11-14 13:15:50.000000000 +0100
158 +++ linux-2.6.23.1-owrt/arch/arm/mach-ixp4xx/ixdp425-pci.c 2007-11-14 13:27:16.000000000 +0100
160 int __init ixdp425_pci_init(void)
162 if (machine_is_ixdp425() || machine_is_ixcdp1100() ||
163 - machine_is_ixdp465() || machine_is_kixrp435() || machine_is_compex())
164 + machine_is_ixdp465() || machine_is_kixrp435() ||
165 + machine_is_compex() || machine_is_ap1000())
166 pci_common_init(&ixdp425_pci);
169 diff -Nur linux-2.6.23.1/arch/arm/mach-ixp4xx/Kconfig linux-2.6.23.1-owrt/arch/arm/mach-ixp4xx/Kconfig
170 --- linux-2.6.23.1/arch/arm/mach-ixp4xx/Kconfig 2007-11-14 13:15:50.000000000 +0100
171 +++ linux-2.6.23.1-owrt/arch/arm/mach-ixp4xx/Kconfig 2007-11-14 13:25:07.000000000 +0100
173 WRT300N v2 router. For more information on this
174 platform, see http://openwrt.org
177 + bool "Lanready AP-1000"
180 + Say 'Y' here if you want your kernel to support Lanready's
181 + AP1000 board. For more information on this
182 + platform, see http://openwrt.org
187 diff -Nur linux-2.6.23.1/arch/arm/mach-ixp4xx/Makefile linux-2.6.23.1-owrt/arch/arm/mach-ixp4xx/Makefile
188 --- linux-2.6.23.1/arch/arm/mach-ixp4xx/Makefile 2007-11-14 13:15:50.000000000 +0100
189 +++ linux-2.6.23.1-owrt/arch/arm/mach-ixp4xx/Makefile 2007-11-14 13:31:29.000000000 +0100
191 obj-pci-$(CONFIG_MACH_COMPEX) += ixdp425-pci.o
192 obj-pci-$(CONFIG_MACH_WRT300NV2) += wrt300nv2-pci.o
193 obj-pci-$(CONFIG_MACH_SIDEWINDER) += sidewinder-pci.o
194 +obj-pci-$(CONFIG_MACH_AP1000) += ixdp425-pci.o
199 obj-$(CONFIG_MACH_COMPEX) += compex-setup.o
200 obj-$(CONFIG_MACH_WRT300NV2) += wrt300nv2-setup.o
201 obj-$(CONFIG_MACH_SIDEWINDER) += sidewinder-setup.o
202 +obj-$(CONFIG_MACH_AP1000) += ap1000-setup.o
204 obj-$(CONFIG_PCI) += $(obj-pci-$(CONFIG_PCI)) common-pci.o
205 diff -Nur linux-2.6.23.1/arch/arm/tools/mach-types linux-2.6.23.1-owrt/arch/arm/tools/mach-types
206 --- linux-2.6.23.1/arch/arm/tools/mach-types 2007-11-14 13:15:50.000000000 +0100
207 +++ linux-2.6.23.1-owrt/arch/arm/tools/mach-types 2007-11-14 13:26:06.000000000 +0100
208 @@ -1367,3 +1367,4 @@
209 csb726 MACH_CSB726 CSB726 1359
210 tik27 MACH_TIK27 TIK27 1360
211 mx_uc7420 MACH_MX_UC7420 MX_UC7420 1361
212 +ap1000 MACH_AP1000 AP1000 1543