]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-omap1/board-perseus2.c
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
[linux-2.6-omap-h63xx.git] / arch / arm / mach-omap1 / board-perseus2.c
index 534dcfb9d2632c1e509ff3048bd4deeee5746a21..3b9f907aa89908569da3e101a471083630787146 100644 (file)
 #include <linux/mtd/partitions.h>
 #include <linux/input.h>
 
-#include <asm/hardware.h>
+#include <mach/hardware.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/flash.h>
 #include <asm/mach/map.h>
 
-#include <asm/arch/tc.h>
-#include <asm/arch/gpio.h>
-#include <asm/arch/mux.h>
-#include <asm/arch/fpga.h>
-#include <asm/arch/keypad.h>
-#include <asm/arch/common.h>
-#include <asm/arch/board.h>
+#include <mach/tc.h>
+#include <mach/gpio.h>
+#include <mach/mux.h>
+#include <mach/fpga.h>
+#include <mach/nand.h>
+#include <mach/keypad.h>
+#include <mach/common.h>
+#include <mach/board.h>
 
 static int p2_keymap[] = {
        KEY(0,0,KEY_UP),
@@ -133,7 +134,7 @@ static struct platform_device nor_device = {
        .resource       = &nor_resource,
 };
 
-static struct nand_platform_data nand_data = {
+static struct omap_nand_platform_data nand_data = {
        .options        = NAND_SAMSUNG_LP_OPTIONS,
 };
 
@@ -202,9 +203,9 @@ static struct platform_device *devices[] __initdata = {
 
 #define P2_NAND_RB_GPIO_PIN    62
 
-static int nand_dev_ready(struct nand_platform_data *data)
+static int nand_dev_ready(struct omap_nand_platform_data *data)
 {
-       return omap_get_gpio_datain(P2_NAND_RB_GPIO_PIN);
+       return gpio_get_value(P2_NAND_RB_GPIO_PIN);
 }
 
 static struct omap_uart_config perseus2_uart_config __initdata = {
@@ -215,15 +216,16 @@ static struct omap_lcd_config perseus2_lcd_config __initdata = {
        .ctrl_name      = "internal",
 };
 
-static struct omap_board_config_kernel perseus2_config[] = {
+static struct omap_board_config_kernel perseus2_config[] __initdata = {
        { OMAP_TAG_UART,        &perseus2_uart_config },
        { OMAP_TAG_LCD,         &perseus2_lcd_config },
 };
 
 static void __init omap_perseus2_init(void)
 {
-       if (!(omap_request_gpio(P2_NAND_RB_GPIO_PIN)))
-               nand_data.dev_ready = nand_dev_ready;
+       if (gpio_request(P2_NAND_RB_GPIO_PIN, "NAND ready") < 0)
+               BUG();
+       nand_data.dev_ready = nand_dev_ready;
 
        omap_cfg_reg(L3_1610_FLASH_CS2B_OE);
        omap_cfg_reg(M8_1610_FLASH_CS2B_WE);
@@ -233,6 +235,7 @@ static void __init omap_perseus2_init(void)
        omap_board_config = perseus2_config;
        omap_board_config_size = ARRAY_SIZE(perseus2_config);
        omap_serial_init();
+       omap_register_i2c_bus(1, 100, NULL, 0);
 }
 
 static void __init perseus2_init_smc91x(void)