d144758b24b280b7dfbb34404b437842a43d4e07
[openwrt.git] / target / linux / xscale-2.6 / patches / 001-gateway_7001.patch
1 diff -Nur linux-2.6.17/arch/arm/boot/compressed/head-xscale.S linux-2.6.17-owrt/arch/arm/boot/compressed/head-xscale.S
2 --- linux-2.6.17/arch/arm/boot/compressed/head-xscale.S 2006-06-18 03:49:35.000000000 +0200
3 +++ linux-2.6.17-owrt/arch/arm/boot/compressed/head-xscale.S 2006-08-05 17:02:21.000000000 +0200
4 @@ -47,6 +47,11 @@
5 orr r7, r7, #(MACH_TYPE_GTWX5715 & 0xff00)
6 #endif
7
8 +#ifdef CONFIG_MACH_GATEWAY7001
9 + mov r7, #(MACH_TYPE_GATEWAY7001 & 0xff)
10 + orr r7, r7, #(MACH_TYPE_GATEWAY7001 & 0xff00)
11 +#endif
12 +
13 #ifdef CONFIG_ARCH_IXP2000
14 mov r1, #-1
15 mov r0, #0xd6000000
16 diff -Nur linux-2.6.17/arch/arm/mach-ixp4xx/coyote-setup.c linux-2.6.17-owrt/arch/arm/mach-ixp4xx/coyote-setup.c
17 --- linux-2.6.17/arch/arm/mach-ixp4xx/coyote-setup.c 2006-06-18 03:49:35.000000000 +0200
18 +++ linux-2.6.17-owrt/arch/arm/mach-ixp4xx/coyote-setup.c 2006-08-05 17:02:21.000000000 +0200
19 @@ -1,9 +1,10 @@
20 /*
21 * arch/arm/mach-ixp4xx/coyote-setup.c
22 *
23 - * Board setup for ADI Engineering and IXDGP425 boards
24 + * Board setup for ADI Engineering, IXDGP425 and Gateway 7001 boards
25 *
26 * Copyright (C) 2003-2005 MontaVista Software, Inc.
27 + * Copyright (C) 2006 Imre Kaloz <Kaloz@openwrt.org>
28 *
29 * Author: Deepak Saxena <dsaxena@plexity.net>
30 */
31 @@ -111,6 +112,19 @@
32 MACHINE_END
33 #endif
34
35 +#ifdef CONFIG_MACH_GATEWAY7001
36 +MACHINE_START(GATEWAY7001, "Gateway 7001")
37 + /* Maintainer: Imre Kaloz <kaloz@openwrt.org> */
38 + .phys_io = IXP4XX_PERIPHERAL_BASE_PHYS,
39 + .io_pg_offst = ((IXP4XX_PERIPHERAL_BASE_VIRT) >> 18) & 0xfffc,
40 + .map_io = ixp4xx_map_io,
41 + .init_irq = ixp4xx_init_irq,
42 + .timer = &ixp4xx_timer,
43 + .boot_params = 0x0100,
44 + .init_machine = coyote_init,
45 +MACHINE_END
46 +#endif
47 +
48 /*
49 * IXDPG425 is identical to Coyote except for which serial port
50 * is connected.
51 diff -Nur linux-2.6.17/arch/arm/mach-ixp4xx/gateway7001-pci.c linux-2.6.17-owrt/arch/arm/mach-ixp4xx/gateway7001-pci.c
52 --- linux-2.6.17/arch/arm/mach-ixp4xx/gateway7001-pci.c 1970-01-01 01:00:00.000000000 +0100
53 +++ linux-2.6.17-owrt/arch/arm/mach-ixp4xx/gateway7001-pci.c 2006-08-06 10:37:35.000000000 +0200
54 @@ -0,0 +1,67 @@
55 +/*
56 + * arch/arch/mach-ixp4xx/gateway7001-pci.c
57 + *
58 + * PCI setup routines for Gateway 7001
59 + *
60 + * Copyright (C) 2006 Imre Kaloz <kaloz@openwrt.org>
61 + *
62 + * based on coyote-pci.c:
63 + * Copyright (C) 2002 Jungo Software Technologies.
64 + * Copyright (C) 2003 MontaVista Softwrae, Inc.
65 + *
66 + * Maintainer: Imre Kaloz <kaloz@openwrt.org>
67 + *
68 + * This program is free software; you can redistribute it and/or modify
69 + * it under the terms of the GNU General Public License version 2 as
70 + * published by the Free Software Foundation.
71 + *
72 + */
73 +
74 +#include <linux/kernel.h>
75 +#include <linux/pci.h>
76 +#include <linux/init.h>
77 +
78 +#include <asm/mach-types.h>
79 +#include <asm/hardware.h>
80 +#include <asm/irq.h>
81 +
82 +#include <asm/mach/pci.h>
83 +
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);
87 +
88 +void __init gateway7001_pci_preinit(void)
89 +{
90 + set_irq_type(IRQ_IXP4XX_GPIO10, IRQT_LOW);
91 + set_irq_type(IRQ_IXP4XX_GPIO11, IRQT_LOW);
92 +
93 + ixp4xx_pci_preinit();
94 +}
95 +
96 +static int __init gateway7001_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
97 +{
98 + if (slot == 0)
99 + return IRQ_IXP4XX_GPIO10;
100 + else if (slot == 1)
101 + return IRQ_IXP4XX_GPIO11;
102 + else return -1;
103 +}
104 +
105 +struct hw_pci gateway7001_pci __initdata = {
106 + .nr_controllers = 1,
107 + .preinit = gateway7001_pci_preinit,
108 + .swizzle = pci_std_swizzle,
109 + .setup = ixp4xx_setup,
110 + .scan = ixp4xx_scan_bus,
111 + .map_irq = gateway7001_map_irq,
112 +};
113 +
114 +int __init gateway7001_pci_init(void)
115 +{
116 + if (machine_is_gateway7001())
117 + pci_common_init(&gateway7001_pci);
118 + return 0;
119 +}
120 +
121 +subsys_initcall(gateway7001_pci_init);
122 diff -Nur linux-2.6.17/arch/arm/mach-ixp4xx/Kconfig linux-2.6.17-owrt/arch/arm/mach-ixp4xx/Kconfig
123 --- linux-2.6.17/arch/arm/mach-ixp4xx/Kconfig 2006-06-18 03:49:35.000000000 +0200
124 +++ linux-2.6.17-owrt/arch/arm/mach-ixp4xx/Kconfig 2006-08-05 17:04:13.000000000 +0200
125 @@ -33,6 +33,14 @@
126 Engineering Coyote Gateway Reference Platform. For more
127 information on this platform, see <file:Documentation/arm/IXP4xx>.
128
129 +config MACH_GATEWAY7001
130 + bool "Gateway 7001"
131 + select PCI
132 + help
133 + Say 'Y' here if you want your kernel to support Gateway's
134 + 7001 Access Point. For more information on this platform,
135 + see http://openwrt.org
136 +
137 config ARCH_IXDP425
138 bool "IXDP425"
139 select PCI
140 diff -Nur linux-2.6.17/arch/arm/mach-ixp4xx/Makefile linux-2.6.17-owrt/arch/arm/mach-ixp4xx/Makefile
141 --- linux-2.6.17/arch/arm/mach-ixp4xx/Makefile 2006-06-18 03:49:35.000000000 +0200
142 +++ linux-2.6.17-owrt/arch/arm/mach-ixp4xx/Makefile 2006-08-05 17:02:21.000000000 +0200
143 @@ -11,4 +11,5 @@
144 obj-$(CONFIG_MACH_GTWX5715) += gtwx5715-pci.o gtwx5715-setup.o
145 obj-$(CONFIG_MACH_NSLU2) += nslu2-pci.o nslu2-setup.o nslu2-power.o
146 obj-$(CONFIG_MACH_NAS100D) += nas100d-pci.o nas100d-setup.o nas100d-power.o
147 +obj-$(CONFIG_MACH_GATEWAY7001) += gateway7001-pci.o coyote-setup.o
148
149 diff -Nur linux-2.6.17/include/asm-arm/arch-ixp4xx/uncompress.h linux-2.6.17-owrt/include/asm-arm/arch-ixp4xx/uncompress.h
150 --- linux-2.6.17/include/asm-arm/arch-ixp4xx/uncompress.h 2006-06-18 03:49:35.000000000 +0200
151 +++ linux-2.6.17-owrt/include/asm-arm/arch-ixp4xx/uncompress.h 2006-08-05 17:03:32.000000000 +0200
152 @@ -38,9 +38,9 @@
153 static __inline__ void __arch_decomp_setup(unsigned long arch_id)
154 {
155 /*
156 - * Coyote and gtwx5715 only have UART2 connected
157 + * Some targets only have UART2 connected
158 */
159 - if (machine_is_adi_coyote() || machine_is_gtwx5715())
160 + if (machine_is_adi_coyote() || machine_is_gtwx5715() || machine_is_gateway7001())
161 uart_base = (volatile u32*) IXP4XX_UART2_BASE_PHYS;
162 else
163 uart_base = (volatile u32*) IXP4XX_UART1_BASE_PHYS;
This page took 0.045166 seconds and 3 git commands to generate.