]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - arch/arm/mach-omap2/board-igep0020.c
Merge branch 'devel-gpio' into omap-for-linus
[mv-sheeva.git] / arch / arm / mach-omap2 / board-igep0020.c
index 5e035a58b80923e13b0de0aee669dd132729a764..59b95f2389ddf376f80ff74950e07168e7f4cddf 100644 (file)
@@ -136,16 +136,9 @@ static struct mtd_partition igep2_onenand_partitions[] = {
        },
 };
 
-static int igep2_onenand_setup(void __iomem *onenand_base, int freq)
-{
-       /* nothing is required to be setup for onenand as of now */
-       return 0;
-}
-
 static struct omap_onenand_platform_data igep2_onenand_data = {
        .parts = igep2_onenand_partitions,
        .nr_parts = ARRAY_SIZE(igep2_onenand_partitions),
-       .onenand_setup = igep2_onenand_setup,
        .dma_channel    = -1,   /* disable DMA in OMAP OneNAND driver */
 };
 
@@ -159,35 +152,34 @@ static struct platform_device igep2_onenand_device = {
 
 static void __init igep2_flash_init(void)
 {
-       u8              cs = 0;
-       u8              onenandcs = GPMC_CS_NUM + 1;
+       u8 cs = 0;
+       u8 onenandcs = GPMC_CS_NUM + 1;
 
-       while (cs < GPMC_CS_NUM) {
-               u32 ret = 0;
+       for (cs = 0; cs < GPMC_CS_NUM; cs++) {
+               u32 ret;
                ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG1);
 
                /* Check if NAND/oneNAND is configured */
                if ((ret & 0xC00) == 0x800)
                        /* NAND found */
-                       pr_err("IGEP v2: Unsupported NAND found\n");
+                       pr_err("IGEP2: Unsupported NAND found\n");
                else {
                        ret = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG7);
                        if ((ret & 0x3F) == (ONENAND_MAP >> 24))
                                /* ONENAND found */
                                onenandcs = cs;
                }
-               cs++;
        }
+
        if (onenandcs > GPMC_CS_NUM) {
-               pr_err("IGEP v2: Unable to find configuration in GPMC\n");
+               pr_err("IGEP2: Unable to find configuration in GPMC\n");
                return;
        }
 
-       if (onenandcs < GPMC_CS_NUM) {
-               igep2_onenand_data.cs = onenandcs;
-               if (platform_device_register(&igep2_onenand_device) < 0)
-                       pr_err("IGEP v2: Unable to register OneNAND device\n");
-       }
+       igep2_onenand_data.cs = onenandcs;
+
+       if (platform_device_register(&igep2_onenand_device) < 0)
+               pr_err("IGEP2: Unable to register OneNAND device\n");
 }
 
 #else
@@ -254,9 +246,6 @@ static inline void __init igep2_init_smsc911x(void)
 static inline void __init igep2_init_smsc911x(void) { }
 #endif
 
-static struct omap_board_config_kernel igep2_config[] __initdata = {
-};
-
 static struct regulator_consumer_supply igep2_vmmc1_supply = {
        .supply         = "vmmc",
 };
@@ -493,11 +482,8 @@ static struct platform_device *igep2_devices[] __initdata = {
 
 static void __init igep2_init_irq(void)
 {
-       omap_board_config = igep2_config;
-       omap_board_config_size = ARRAY_SIZE(igep2_config);
        omap2_init_common_hw(m65kxxxxam_sdrc_params, m65kxxxxam_sdrc_params);
        omap_init_irq();
-       omap_gpio_init();
 }
 
 static struct twl4030_codec_audio_data igep2_audio_data = {
@@ -577,8 +563,6 @@ static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
 static struct omap_board_mux board_mux[] __initdata = {
        { .reg_offset = OMAP_MUX_TERMINATOR },
 };
-#else
-#define board_mux      NULL
 #endif
 
 #if defined(CONFIG_LIBERTAS_SDIO) || defined(CONFIG_LIBERTAS_SDIO_MODULE)