ixp4xx/fsg3: Enable REISERFS for booting from vendor rootfs on disk
[openwrt.git] / target / linux / at91 / patches-2.6.22 / 001-vlink-machine.patch
1 diff -urN linux-2.6.22.1.old/arch/arm/boot/compressed/head-at91rm9200.S linux-2.6.22.1/arch/arm/boot/compressed/head-at91rm9200.S
2 --- linux-2.6.22.1.old/arch/arm/boot/compressed/head-at91rm9200.S 2007-07-29 06:33:09.000000000 +0200
3 +++ linux-2.6.22.1/arch/arm/boot/compressed/head-at91rm9200.S 2007-07-29 06:39:45.000000000 +0200
4 @@ -67,6 +67,12 @@
5 cmp r7, r3
6 beq 99f
7
8 + @ FDL Versalink : 1053
9 + mov r3, #(MACH_TYPE_VLINK & 0xff)
10 + orr r3, r3, #(MACH_TYPE_VLINK & 0xff00)
11 + cmp r7, r3
12 + beq 99f
13 +
14 @ Ajeco 1ARM : 1075
15 mov r3, #(MACH_TYPE_ONEARM & 0xff)
16 orr r3, r3, #(MACH_TYPE_ONEARM & 0xff00)
17 diff -urN linux-2.6.22.1.old/arch/arm/mach-at91/board-vlink.c linux-2.6.22.1/arch/arm/mach-at91/board-vlink.c
18 --- linux-2.6.22.1.old/arch/arm/mach-at91/board-vlink.c 1970-01-01 01:00:00.000000000 +0100
19 +++ linux-2.6.22.1/arch/arm/mach-at91/board-vlink.c 2007-07-29 06:40:47.000000000 +0200
20 @@ -0,0 +1,191 @@
21 +/*
22 + * linux/arch/arm/mach-at91/board-vlink.c
23 + *
24 + * Copyright (C) 2005 SAN People
25 + * Copyright (C) 2006,2007 Guthrie Consulting
26 + *
27 + *
28 + * This program is free software; you can redistribute it and/or modify
29 + * it under the terms of the GNU General Public License as published by
30 + * the Free Software Foundation; either version 2 of the License, or
31 + * (at your option) any later version.
32 + *
33 + * This program is distributed in the hope that it will be useful,
34 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
35 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
36 + * GNU General Public License for more details.
37 + *
38 + * You should have received a copy of the GNU General Public License
39 + * along with this program; if not, write to the Free Software
40 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
41 + */
42 +
43 +#include <linux/types.h>
44 +#include <linux/init.h>
45 +#include <linux/mm.h>
46 +#include <linux/module.h>
47 +#include <linux/platform_device.h>
48 +#include <linux/spi/spi.h>
49 +#include <linux/mtd/physmap.h>
50 +
51 +#include <asm/hardware.h>
52 +#include <asm/setup.h>
53 +#include <asm/mach-types.h>
54 +#include <asm/irq.h>
55 +
56 +#include <asm/mach/arch.h>
57 +#include <asm/mach/map.h>
58 +#include <asm/mach/irq.h>
59 +
60 +#include <asm/arch/board.h>
61 +#include <asm/arch/gpio.h>
62 +#include <asm/arch/at91rm9200_mc.h>
63 +
64 +#include "generic.h"
65 +
66 +
67 +/*
68 + * Serial port configuration.
69 + * 0 .. 3 = USART0 .. USART3
70 + * 4 = DBGU
71 + */
72 +static struct at91_uart_config __initdata vlink_uart_config = {
73 + .console_tty = 0, /* ttyS0 */
74 + .nr_tty = 5,
75 + .tty_map = { 4, 1, 0, 3, 2 } /* ttyS0, ..., ttyS4 */
76 +};
77 +
78 +static void __init vlink_map_io(void)
79 +{
80 + /* Initialize processor: 18.432 MHz crystal */
81 + at91rm9200_initialize(18432000, AT91RM9200_PQFP);
82 +
83 + /* Setup the LEDs */
84 + at91_init_leds(AT91_PIN_PC14, AT91_PIN_PC15);
85 +
86 + /* Setup the serial ports and console */
87 + at91_init_serial(&vlink_uart_config);
88 +}
89 +
90 +static void __init vlink_init_irq(void)
91 +{
92 + at91rm9200_init_interrupts(NULL);
93 +}
94 +
95 +static struct at91_eth_data __initdata vlink_eth_data = {
96 + .phy_irq_pin = AT91_PIN_PC4,
97 + .is_rmii = 1,
98 +};
99 +
100 +static struct at91_usbh_data __initdata vlink_usbh_data = {
101 + .ports = 1,
102 +};
103 +
104 +/*
105 +static struct at91_udc_data __initdata vlink_udc_data = {
106 + .vbus_pin = AT91_PIN_PD4,
107 + .pullup_pin = AT91_PIN_PD5,
108 +};
109 +*/
110 +
111 +static struct at91_mmc_data __initdata vlink_mmc_data = {
112 +// .det_pin = AT91_PIN_PB27,
113 + .slot_b = 0,
114 + .wire4 = 1,
115 +// .wp_pin = AT91_PIN_PA17,
116 +};
117 +
118 +static struct spi_board_info vlink_spi_devices[] = {
119 + { /* DataFlash chip */
120 + .modalias = "mtd_dataflash",
121 + .chip_select = 0,
122 + .max_speed_hz = 15 * 1000 * 1000,
123 + },
124 +#ifdef CONFIG_MTD_AT91_DATAFLASH_CARD
125 + { /* DataFlash card */
126 + .modalias = "mtd_dataflash",
127 + .chip_select = 3,
128 + .max_speed_hz = 15 * 1000 * 1000,
129 + },
130 +#endif
131 +};
132 +
133 +/*static struct at91_gpio_led vlink_leds[] = {
134 + {
135 + .name = "led0",
136 + .gpio = AT91_PIN_PC14,
137 + .trigger = "heartbeat",
138 + },
139 + {
140 + .name = "led1",
141 + .gpio = AT91_PIN_PC15,
142 + .trigger = "timer",
143 + }
144 +};
145 +*/
146 +
147 +static void __init vlink_board_init(void)
148 +{
149 + /* Serial */
150 + at91_add_device_serial();
151 + /* Ethernet */
152 + at91_add_device_eth(&vlink_eth_data);
153 + /* USB Host */
154 + at91_add_device_usbh(&vlink_usbh_data);
155 + /* USB Device */
156 +// at91_add_device_udc(&vlink_udc_data);
157 +// at91_set_multi_drive(vlink_udc_data.pullup_pin, 1); /* pullup_pin is connected to reset */
158 + /* I2C */
159 + at91_add_device_i2c();
160 + /* SPI */
161 + at91_add_device_spi(vlink_spi_devices, ARRAY_SIZE(vlink_spi_devices));
162 +#ifdef CONFIG_MTD_AT91_DATAFLASH_CARD
163 + /* DataFlash card */
164 +// at91_set_gpio_output(AT91_PIN_PB22, 0);
165 +#else
166 + /* MMC */
167 +// at91_set_gpio_output(AT91_PIN_PB22, 1); /* this MMC card slot can optionally use SPI signaling (CS3). */
168 + at91_add_device_mmc(0, &vlink_mmc_data);
169 +#endif
170 + /* LEDs */
171 +// at91_gpio_leds(vlink_leds, ARRAY_SIZE(vlink_leds));
172 +
173 +/* Other LED's */
174 + at91_set_gpio_output(AT91_PIN_PC7, 1); // LED FRONT AP1
175 + at91_set_gpio_output(AT91_PIN_PC8, 1); // LED FRONT BP1
176 + at91_set_gpio_output(AT91_PIN_PB14, 1); // LED BACK AP1
177 + at91_set_gpio_output(AT91_PIN_PB15, 1); // LED BACK BP1
178 + at91_set_gpio_output(AT91_PIN_PB16, 1); // LED BACK AP2
179 + at91_set_gpio_output(AT91_PIN_PB17, 1); // LED BACK BP2
180 +
181 +/* SIM Cards */
182 + at91_set_gpio_output(AT91_PIN_PB9, 1); // ENBSC3
183 + at91_set_gpio_output(AT91_PIN_PB10, 1); // ENBSC2
184 + at91_set_gpio_output(AT91_PIN_PB11, 1); // ENBSC1
185 +
186 +/* GSM Module Control */
187 + at91_set_gpio_output(AT91_PIN_PB12, 1); // GSMONOFF
188 +
189 +/* Test jig presence detection */
190 + at91_set_gpio_input(AT91_PIN_PB8, 1); // JIGPRESENT
191 +
192 +/* Power indicator */
193 + at91_set_gpio_input(AT91_PIN_PB22, 1); // PWR_IND
194 +
195 +/* USB Device control */
196 + at91_set_gpio_input(AT91_PIN_PB27, 1); // UDB_CNX
197 + at91_set_gpio_output(AT91_PIN_PB28, 1); // UDB_PUP
198 + at91_set_multi_drive(AT91_PIN_PB28, 1); // Set to multi-drive
199 +
200 +}
201 +
202 +MACHINE_START(VLINK, "FDL VersaLink")
203 + /* Maintainer: Guthrie Consulting */
204 + .phys_io = AT91_BASE_SYS,
205 + .io_pg_offst = (AT91_VA_BASE_SYS >> 18) & 0xfffc,
206 + .boot_params = AT91_SDRAM_BASE + 0x100,
207 + .timer = &at91rm9200_timer,
208 + .map_io = vlink_map_io,
209 + .init_irq = vlink_init_irq,
210 + .init_machine = vlink_board_init,
211 +MACHINE_END
212 diff -urN linux-2.6.22.1.old/arch/arm/mach-at91/Kconfig linux-2.6.22.1/arch/arm/mach-at91/Kconfig
213 --- linux-2.6.22.1.old/arch/arm/mach-at91/Kconfig 2007-07-29 06:33:09.000000000 +0200
214 +++ linux-2.6.22.1/arch/arm/mach-at91/Kconfig 2007-07-29 06:42:19.000000000 +0200
215 @@ -103,6 +103,12 @@
216 help
217 Select this if you are using Promwad's Chub board.
218
219 +config MACH_VLINK
220 + bool "Figment Design Labs VersaLink"
221 + depends on ARCH_AT91RM9200
222 + help
223 + Select this if you are using FDL's VersaLink board
224 +
225 endif
226
227 # ----------------------------------------------------------
228 diff -urN linux-2.6.22.1.old/arch/arm/mach-at91/Makefile linux-2.6.22.1/arch/arm/mach-at91/Makefile
229 --- linux-2.6.22.1.old/arch/arm/mach-at91/Makefile 2007-07-29 06:33:09.000000000 +0200
230 +++ linux-2.6.22.1/arch/arm/mach-at91/Makefile 2007-07-29 06:43:36.000000000 +0200
231 @@ -29,6 +29,7 @@
232 obj-$(CONFIG_MACH_ATEB9200) += board-eb9200.o
233 obj-$(CONFIG_MACH_KAFA) += board-kafa.o
234 obj-$(CONFIG_MACH_CHUB) += board-chub.o
235 +obj-$(CONFIG_MACH_VLINK) += board-vlink.o
236 obj-$(CONFIG_MACH_PICOTUX2XX) += board-picotux200.o
237
238 # AT91SAM9260 board-specific support
239 @@ -52,6 +53,7 @@
240 led-$(CONFIG_MACH_CSB637) += leds.o
241 led-$(CONFIG_MACH_KB9200) += leds.o
242 led-$(CONFIG_MACH_KAFA) += leds.o
243 +led-$(CONFIG_MACH_VLINK) += leds.o
244 obj-$(CONFIG_LEDS) += $(led-y)
245
246 # VGA support
This page took 0.050102 seconds and 5 git commands to generate.