mac80211: move frame TX function
[linux/fpc-iii.git] / arch / arm / mach-at91 / board-cam60.c
blobcdddca54b938ce79fd7ec2b182a96b22df0d3ff1
1 /*
2 * KwikByte CAM60 (KB9260)
4 * based on board-sam9260ek.c
5 * Copyright (C) 2005 SAN People
6 * Copyright (C) 2006 Atmel
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 #include <linux/types.h>
24 #include <linux/init.h>
25 #include <linux/mm.h>
26 #include <linux/module.h>
27 #include <linux/platform_device.h>
28 #include <linux/spi/spi.h>
29 #include <linux/spi/flash.h>
31 #include <mach/hardware.h>
32 #include <asm/setup.h>
33 #include <asm/mach-types.h>
34 #include <asm/irq.h>
36 #include <asm/mach/arch.h>
37 #include <asm/mach/map.h>
38 #include <asm/mach/irq.h>
40 #include <mach/board.h>
41 #include <mach/gpio.h>
43 #include "generic.h"
46 static void __init cam60_map_io(void)
48 /* Initialize processor: 10 MHz crystal */
49 at91sam9260_initialize(10000000);
51 /* DGBU on ttyS0. (Rx & Tx only) */
52 at91_register_uart(0, 0, 0);
54 /* set serial console to ttyS0 (ie, DBGU) */
55 at91_set_serial_console(0);
58 static void __init cam60_init_irq(void)
60 at91sam9260_init_interrupts(NULL);
65 * USB Host
67 static struct at91_usbh_data __initdata cam60_usbh_data = {
68 .ports = 1,
73 * SPI devices.
75 #if defined(CONFIG_MTD_DATAFLASH)
76 static struct mtd_partition __initdata cam60_spi_partitions[] = {
78 .name = "BOOT1",
79 .offset = 0,
80 .size = 4 * 1056,
83 .name = "BOOT2",
84 .offset = MTDPART_OFS_NXTBLK,
85 .size = 256 * 1056,
88 .name = "kernel",
89 .offset = MTDPART_OFS_NXTBLK,
90 .size = 2222 * 1056,
93 .name = "file system",
94 .offset = MTDPART_OFS_NXTBLK,
95 .size = MTDPART_SIZ_FULL,
99 static struct flash_platform_data __initdata cam60_spi_flash_platform_data = {
100 .name = "spi_flash",
101 .parts = cam60_spi_partitions,
102 .nr_parts = ARRAY_SIZE(cam60_spi_partitions)
104 #endif
106 static struct spi_board_info cam60_spi_devices[] = {
107 #if defined(CONFIG_MTD_DATAFLASH)
108 { /* DataFlash chip */
109 .modalias = "mtd_dataflash",
110 .chip_select = 0,
111 .max_speed_hz = 15 * 1000 * 1000,
112 .bus_num = 0,
113 .platform_data = &cam60_spi_flash_platform_data
115 #endif
120 * MACB Ethernet device
122 static struct __initdata at91_eth_data cam60_macb_data = {
123 .phy_irq_pin = AT91_PIN_PB5,
124 .is_rmii = 0,
129 * NAND Flash
131 static struct mtd_partition __initdata cam60_nand_partition[] = {
133 .name = "nand_fs",
134 .offset = 0,
135 .size = MTDPART_SIZ_FULL,
139 static struct mtd_partition * __init nand_partitions(int size, int *num_partitions)
141 *num_partitions = ARRAY_SIZE(cam60_nand_partition);
142 return cam60_nand_partition;
145 static struct atmel_nand_data __initdata cam60_nand_data = {
146 .ale = 21,
147 .cle = 22,
148 // .det_pin = ... not there
149 .rdy_pin = AT91_PIN_PA9,
150 .enable_pin = AT91_PIN_PA7,
151 .partition_info = nand_partitions,
155 static void __init cam60_board_init(void)
157 /* Serial */
158 at91_add_device_serial();
159 /* SPI */
160 at91_add_device_spi(cam60_spi_devices, ARRAY_SIZE(cam60_spi_devices));
161 /* Ethernet */
162 at91_add_device_eth(&cam60_macb_data);
163 /* USB Host */
164 /* enable USB power supply circuit */
165 at91_set_gpio_output(AT91_PIN_PB18, 1);
166 at91_add_device_usbh(&cam60_usbh_data);
167 /* NAND */
168 at91_add_device_nand(&cam60_nand_data);
171 MACHINE_START(CAM60, "KwikByte CAM60")
172 /* Maintainer: KwikByte */
173 .phys_io = AT91_BASE_SYS,
174 .io_pg_offst = (AT91_VA_BASE_SYS >> 18) & 0xfffc,
175 .boot_params = AT91_SDRAM_BASE + 0x100,
176 .timer = &at91sam926x_timer,
177 .map_io = cam60_map_io,
178 .init_irq = cam60_init_irq,
179 .init_machine = cam60_board_init,
180 MACHINE_END