aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-at91rm9200/board-csb337.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-06-20 17:52:36 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-20 17:52:36 -0700
commit050335db2a777ffaa859d77beb05fffe9e8c5ae9 (patch)
tree6f1fb3e3477de613b4adac8c46bd6e86301ed8ae /arch/arm/mach-at91rm9200/board-csb337.c
parenta4cfae13cef6a700a04b13ba1d819c0641b1b26f (diff)
parent905f14672e6d0552bfde954d5f7adb5f2c7a7960 (diff)
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (42 commits) [ARM] Fix tosa build error [ARM] 3610/1: Make reboot work on Versatile [ARM] 3609/1: S3C24XX: defconfig update for s3c2410_defconfig [ARM] 3591/1: Anubis: IDE device definitions [ARM] Include asm/hardware.h not asm/arch/hardware.h [ARM] 3594/1: Poodle: Add touchscreen support + other updates [ARM] 3564/1: sharpsl_pm: Abstract some machine specific parameters [ARM] 3561/1: Poodle: Correct the MMC/SD power control [ARM] 3593/1: Add reboot and shutdown handlers for Zaurus handhelds [ARM] 3599/1: AT91RM9200 remove global variables [ARM] 3607/1: AT91RM9200 misc fixes [ARM] 3605/1: AT91RM9200 Power Management [ARM] 3604/1: AT91RM9200 New boards [ARM] 3603/1: AT91RM9200 remove old files [ARM] 3592/1: AT91RM9200 Serial driver update [ARM] 3590/1: AT91RM9200 Platform devices support [ARM] 3589/1: AT91RM9200 DK/EK board update [ARM] 3588/1: AT91RM9200 CSB337/637 board update [ARM] 3587/1: AT91RM9200 hardware headers [ARM] 3586/1: AT91RM9200 header update ...
Diffstat (limited to 'arch/arm/mach-at91rm9200/board-csb337.c')
-rw-r--r--arch/arm/mach-at91rm9200/board-csb337.c45
1 files changed, 26 insertions, 19 deletions
diff --git a/arch/arm/mach-at91rm9200/board-csb337.c b/arch/arm/mach-at91rm9200/board-csb337.c
index f45104ceea8..e94645d77f7 100644
--- a/arch/arm/mach-at91rm9200/board-csb337.c
+++ b/arch/arm/mach-at91rm9200/board-csb337.c
@@ -24,6 +24,7 @@
#include <linux/mm.h>
#include <linux/module.h>
#include <linux/platform_device.h>
+#include <linux/spi/spi.h>
#include <asm/hardware.h>
#include <asm/setup.h>
@@ -34,9 +35,9 @@
#include <asm/mach/map.h>
#include <asm/mach/irq.h>
-#include <asm/arch/hardware.h>
-#include <asm/mach/serial_at91rm9200.h>
+#include <asm/hardware.h>
#include <asm/arch/board.h>
+#include <asm/arch/gpio.h>
#include "generic.h"
@@ -54,32 +55,24 @@ static void __init csb337_init_irq(void)
* 0 .. 3 = USART0 .. USART3
* 4 = DBGU
*/
-#define CSB337_UART_MAP { 4, 1, -1, -1, -1 } /* ttyS0, ..., ttyS4 */
-#define CSB337_SERIAL_CONSOLE 0 /* ttyS0 */
+static struct at91_uart_config __initdata csb337_uart_config = {
+ .console_tty = 0, /* ttyS0 */
+ .nr_tty = 2,
+ .tty_map = { 4, 1, -1, -1, -1 } /* ttyS0, ..., ttyS4 */
+};
static void __init csb337_map_io(void)
{
- int serial[AT91_NR_UART] = CSB337_UART_MAP;
- int i;
-
at91rm9200_map_io();
/* Initialize clocks: 3.6864 MHz crystal */
at91_clock_init(3686400);
/* Setup the LEDs */
- at91_init_leds(AT91_PIN_PB2, AT91_PIN_PB2);
-
-#ifdef CONFIG_SERIAL_AT91
- at91_console_port = CSB337_SERIAL_CONSOLE;
- memcpy(at91_serial_map, serial, sizeof(serial));
-
- /* Register UARTs */
- for (i = 0; i < AT91_NR_UART; i++) {
- if (serial[i] >= 0)
- at91_register_uart(i, serial[i]);
- }
-#endif
+ at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1);
+
+ /* Setup the serial ports and console */
+ at91_init_serial(&csb337_uart_config);
}
static struct at91_eth_data __initdata csb337_eth_data = {
@@ -118,17 +111,31 @@ static struct at91_mmc_data __initdata csb337_mmc_data = {
.wp_pin = AT91_PIN_PD6,
};
+static struct spi_board_info csb337_spi_devices[] = {
+ { /* CAN controller */
+ .modalias = "sak82c900",
+ .chip_select = 0,
+ .max_speed_hz = 6 * 1000 * 1000,
+ },
+};
+
static void __init csb337_board_init(void)
{
+ /* Serial */
+ at91_add_device_serial();
/* Ethernet */
at91_add_device_eth(&csb337_eth_data);
/* USB Host */
at91_add_device_usbh(&csb337_usbh_data);
/* USB Device */
at91_add_device_udc(&csb337_udc_data);
+ /* I2C */
+ at91_add_device_i2c();
/* Compact Flash */
at91_set_gpio_input(AT91_PIN_PB22, 1); /* IOIS16 */
at91_add_device_cf(&csb337_cf_data);
+ /* SPI */
+ at91_add_device_spi(csb337_spi_devices, ARRAY_SIZE(csb337_spi_devices));
/* MMC */
at91_add_device_mmc(&csb337_mmc_data);
}