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