Merge branches 'misc', 'eeepc-laptop' and 'bugzilla-14445' into release
[safe/jmp/linux-2.6] / arch / arm / mach-omap2 / board-omap3evm.c
index 217e5a2..4c4d7f8 100644 (file)
 #include <linux/clk.h>
 #include <linux/gpio.h>
 #include <linux/input.h>
+#include <linux/input/matrix_keypad.h>
 #include <linux/leds.h>
 
 #include <linux/spi/spi.h>
 #include <linux/spi/ads7846.h>
 #include <linux/i2c/twl4030.h>
+#include <linux/usb/otg.h>
 
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
@@ -36,7 +38,6 @@
 #include <mach/usb.h>
 #include <mach/common.h>
 #include <mach/mcspi.h>
-#include <mach/keypad.h>
 
 #include "sdram-micron-mt46h32m32lf-6.h"
 #include "mmc-twl4030.h"
@@ -91,10 +92,6 @@ static inline void __init omap3evm_init_smc911x(void)
        gpio_direction_input(OMAP3EVM_ETHR_GPIO_IRQ);
 }
 
-static struct omap_uart_config omap3_evm_uart_config __initdata = {
-       .enabled_uarts  = ((1 << 0) | (1 << 1) | (1 << 2)),
-};
-
 static struct twl4030_hsmmc_info mmc[] = {
        {
                .mmc            = 1,
@@ -162,7 +159,7 @@ static struct twl4030_usb_data omap3evm_usb_data = {
        .usb_mode       = T2_USB_MODE_ULPI,
 };
 
-static int omap3evm_keymap[] = {
+static int board_keymap[] = {
        KEY(0, 0, KEY_LEFT),
        KEY(0, 1, KEY_RIGHT),
        KEY(0, 2, KEY_A),
@@ -181,11 +178,15 @@ static int omap3evm_keymap[] = {
        KEY(3, 3, KEY_P)
 };
 
+static struct matrix_keymap_data board_map_data = {
+       .keymap                 = board_keymap,
+       .keymap_size            = ARRAY_SIZE(board_keymap),
+};
+
 static struct twl4030_keypad_data omap3evm_kp_data = {
+       .keymap_data    = &board_map_data,
        .rows           = 4,
        .cols           = 4,
-       .keymap         = omap3evm_keymap,
-       .keymapsize     = ARRAY_SIZE(omap3evm_keymap),
        .rep            = 1,
 };
 
@@ -277,19 +278,20 @@ struct spi_board_info omap3evm_spi_board_info[] = {
        },
 };
 
+static struct omap_board_config_kernel omap3_evm_config[] __initdata = {
+       { OMAP_TAG_LCD,         &omap3_evm_lcd_config },
+};
+
 static void __init omap3_evm_init_irq(void)
 {
+       omap_board_config = omap3_evm_config;
+       omap_board_config_size = ARRAY_SIZE(omap3_evm_config);
        omap2_init_common_hw(mt46h32m32lf6_sdrc_params, NULL);
        omap_init_irq();
        omap_gpio_init();
        omap3evm_init_smc911x();
 }
 
-static struct omap_board_config_kernel omap3_evm_config[] __initdata = {
-       { OMAP_TAG_UART,        &omap3_evm_uart_config },
-       { OMAP_TAG_LCD,         &omap3_evm_lcd_config },
-};
-
 static struct platform_device *omap3_evm_devices[] __initdata = {
        &omap3_evm_lcd_device,
        &omap3evm_smc911x_device,
@@ -300,13 +302,15 @@ static void __init omap3_evm_init(void)
        omap3_evm_i2c_init();
 
        platform_add_devices(omap3_evm_devices, ARRAY_SIZE(omap3_evm_devices));
-       omap_board_config = omap3_evm_config;
-       omap_board_config_size = ARRAY_SIZE(omap3_evm_config);
 
        spi_register_board_info(omap3evm_spi_board_info,
                                ARRAY_SIZE(omap3evm_spi_board_info));
 
        omap_serial_init();
+#ifdef CONFIG_NOP_USB_XCEIV
+       /* OMAP3EVM uses ISP1504 phy and so register nop transceiver */
+       usb_nop_xceiv_register();
+#endif
        usb_musb_init();
        ads7846_dev_init();
 }