]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-at91/board-csb337.c
[ARM] 5263/2: [AT91] GPIO buttons as wakeup sources
[linux-2.6-omap-h63xx.git] / arch / arm / mach-at91 / board-csb337.c
index 0e2a11fc5bbd587315b0a6f0a78d8ee3ef31dc25..fea2529ebcf9c781acb131aa7a1517bfc20ca772 100644 (file)
@@ -28,7 +28,6 @@
 #include <linux/input.h>
 #include <linux/gpio_keys.h>
 
-#include <asm/hardware.h>
 #include <asm/setup.h>
 #include <asm/mach-types.h>
 #include <asm/irq.h>
 #include <asm/mach/map.h>
 #include <asm/mach/irq.h>
 
-#include <asm/arch/board.h>
-#include <asm/arch/gpio.h>
+#include <mach/hardware.h>
+#include <mach/board.h>
+#include <mach/gpio.h>
 
 #include "generic.h"
 
 
-/*
- * Serial port configuration.
- *    0 .. 3 = USART0 .. USART3
- *    4      = DBGU
- */
-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)
 {
        /* Initialize processor: 3.6864 MHz crystal */
@@ -62,8 +51,11 @@ static void __init csb337_map_io(void)
        /* Setup the LEDs */
        at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1);
 
-       /* Setup the serial ports and console */
-       at91_init_serial(&csb337_uart_config);
+       /* DBGU on ttyS0 */
+       at91_register_uart(0, 0, 0);
+
+       /* make console=ttyS0 the default */
+       at91_set_serial_console(0);
 }
 
 static void __init csb337_init_irq(void)
@@ -87,8 +79,7 @@ static struct at91_udc_data __initdata csb337_udc_data = {
 
 static struct i2c_board_info __initdata csb337_i2c_devices[] = {
        {
-               I2C_BOARD_INFO("rtc-ds1307", 0x68),
-               .type   = "ds1307",
+               I2C_BOARD_INFO("ds1307", 0x68),
        },
 };
 
@@ -123,7 +114,7 @@ static struct spi_board_info csb337_spi_devices[] = {
 };
 
 #define CSB_FLASH_BASE AT91_CHIPSELECT_0
-#define CSB_FLASH_SIZE 0x800000
+#define CSB_FLASH_SIZE SZ_8M
 
 static struct mtd_partition csb_flash_partitions[] = {
        {
@@ -202,11 +193,11 @@ static struct platform_device csb300_button_device = {
 
 static void __init csb300_add_device_buttons(void)
 {
-       at91_set_gpio_input(AT91_PIN_PB29, 0);  /* sw0 */
+       at91_set_gpio_input(AT91_PIN_PB29, 1);  /* sw0 */
        at91_set_deglitch(AT91_PIN_PB29, 1);
-       at91_set_gpio_input(AT91_PIN_PB28, 0);  /* sw1 */
+       at91_set_gpio_input(AT91_PIN_PB28, 1);  /* sw1 */
        at91_set_deglitch(AT91_PIN_PB28, 1);
-       at91_set_gpio_input(AT91_PIN_PA21, 0);  /* sw2 */
+       at91_set_gpio_input(AT91_PIN_PA21, 1);  /* sw2 */
        at91_set_deglitch(AT91_PIN_PA21, 1);
 
        platform_device_register(&csb300_button_device);
@@ -233,7 +224,7 @@ static struct gpio_led csb_leds[] = {
                .gpio                   = AT91_PIN_PB0,
                .active_low             = 1,
                .default_trigger        = "ide-disk",
-       },
+       }
 };