#include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
+#include <linux/io.h>
 
 #include <asm/hardware.h>
-#include <asm/io.h>
 #include <asm/mach-types.h>
 #include <asm/mach/map.h>
 
        },
 };
 
-struct platform_device omap2_mcspi1 = {
+static struct platform_device omap2_mcspi1 = {
        .name           = "omap2_mcspi",
        .id             = 1,
        .num_resources  = ARRAY_SIZE(omap2_mcspi1_resources),
        },
 };
 
-struct platform_device omap2_mcspi2 = {
+static struct platform_device omap2_mcspi2 = {
        .name           = "omap2_mcspi",
        .id             = 2,
        .num_resources  = ARRAY_SIZE(omap2_mcspi2_resources),
        },
 };
 
-struct platform_device omap2_mcspi3 = {
+static struct platform_device omap2_mcspi3 = {
        .name           = "omap2_mcspi",
        .id             = 3,
        .num_resources  = ARRAY_SIZE(omap2_mcspi3_resources),
        },
 };
 
-struct platform_device omap2_mcspi4 = {
+static struct platform_device omap2_mcspi4 = {
        .name           = "omap2_mcspi",
        .id             = 4,
        .num_resources  = ARRAY_SIZE(omap2_mcspi4_resources),
 
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
-
-#include <asm/io.h>
+#include <linux/io.h>
 
 #include <asm/arch/control.h>
 #include <asm/arch/cpu.h>
 
 #if defined(CONFIG_ARCH_OMAP2420)
-#define TAP_BASE       io_p2v(0x48014000)
+#define TAP_BASE       (__force void __iomem *)io_p2v(0x48014000)
 #elif defined(CONFIG_ARCH_OMAP2430)
-#define TAP_BASE       io_p2v(0x4900A000)
+#define TAP_BASE       (__force void __iomem *)io_p2v(0x4900A000)
 #elif defined(CONFIG_ARCH_OMAP34XX)
-#define TAP_BASE       io_p2v(0x4830A000)
+#define TAP_BASE       (__force void __iomem *)io_p2v(0x4830A000)
 #endif
 
 #define OMAP_TAP_IDCODE                0x0204
 
 #include <asm/arch/clockdomain.h>
 #include "clockdomains.h"
 
-extern void omap2_check_revision(void);
-extern void omapfb_reserve_sdram(void);
-
 /*
  * The machine specific code may provide the extra mapping besides the
  * default mapping provided here.
 
 #include <linux/module.h>
 #include <linux/init.h>
 #include <asm/system.h>
-#include <asm/io.h>
+#include <linux/io.h>
 #include <linux/spinlock.h>
 
 #include <asm/arch/control.h>
 #endif /* CONFIG_ARCH_OMAP34XX */
 
 #if defined(CONFIG_OMAP_MUX_DEBUG) || defined(CONFIG_OMAP_MUX_WARNINGS)
-void __init_or_module omap2_cfg_debug(const struct pin_config *cfg, u16 reg)
+static void __init_or_module omap2_cfg_debug(const struct pin_config *cfg, u16 reg)
 {
        u16 orig;
        u8 warn = 0, debug = 0;
        return 0;
 }
 #else
-#define omap24xx_cfg_reg       0
+#define omap24xx_cfg_reg       NULL
 #endif
 
 #ifdef CONFIG_ARCH_OMAP34XX
-int __init_or_module omap34xx_cfg_reg(const struct pin_config *cfg)
+static int __init_or_module omap34xx_cfg_reg(const struct pin_config *cfg)
 {
        static DEFINE_SPINLOCK(mux_spin_lock);
        unsigned long flags;
        return 0;
 }
 #else
-#define omap34xx_cfg_reg       0
+#define omap34xx_cfg_reg       NULL
 #endif
 
 int __init omap2_mux_init(void)
                arch_mux_cfg.pins       = omap24xx_pins;
                arch_mux_cfg.size       = OMAP24XX_PINS_SZ;
                arch_mux_cfg.cfg_reg    = omap24xx_cfg_reg;
-       }
-
-       if (cpu_is_omap34xx()) {
+       } else if (cpu_is_omap34xx()) {
                arch_mux_cfg.pins       = omap34xx_pins;
                arch_mux_cfg.size       = OMAP34XX_PINS_SZ;
                arch_mux_cfg.cfg_reg    = omap34xx_cfg_reg;
 
 
 static struct plat_serial8250_port serial_platform_data[] = {
        {
-               .membase        = (char *)IO_ADDRESS(OMAP_UART1_BASE),
+               .membase        = (__force void __iomem *)IO_ADDRESS(OMAP_UART1_BASE),
                .mapbase        = (unsigned long)OMAP_UART1_BASE,
                .irq            = 72,
                .flags          = UPF_BOOT_AUTOCONF,
                .regshift       = 2,
                .uartclk        = OMAP24XX_BASE_BAUD * 16,
        }, {
-               .membase        = (char *)IO_ADDRESS(OMAP_UART2_BASE),
+               .membase        = (__force void __iomem *)IO_ADDRESS(OMAP_UART2_BASE),
                .mapbase        = (unsigned long)OMAP_UART2_BASE,
                .irq            = 73,
                .flags          = UPF_BOOT_AUTOCONF,
                .regshift       = 2,
                .uartclk        = OMAP24XX_BASE_BAUD * 16,
        }, {
-               .membase        = (char *)IO_ADDRESS(OMAP_UART3_BASE),
+               .membase        = (__force void __iomem *)IO_ADDRESS(OMAP_UART3_BASE),
                .mapbase        = (unsigned long)OMAP_UART3_BASE,
                .irq            = 74,
                .flags          = UPF_BOOT_AUTOCONF,
                                    int value)
 {
        offset <<= p->regshift;
-       __raw_writeb(value, (unsigned long)(p->membase + offset));
+       __raw_writeb(value, p->membase + offset);
 }
 
 /*
 {
        int i;
        for (i = 0; i < OMAP_MAX_NR_PORTS; i++) {
-               if (uart_ick[i])
-                       enable ? clk_enable(uart_ick[i]) :
+               if (uart_ick[i] && uart_fck[i]) {
+                       if (enable) {
+                               clk_enable(uart_ick[i]);
+                               clk_enable(uart_fck[i]);
+                       } else {
                                clk_disable(uart_ick[i]);
-               if (uart_fck[i])
-                       enable ? clk_enable(uart_fck[i]) :
                                clk_disable(uart_fck[i]);
+                       }
+               }
        }
 }
 
                struct plat_serial8250_port *p = serial_platform_data + i;
 
                if (!(info->enabled_uarts & (1 << i))) {
-                       p->membase = 0;
+                       p->membase = NULL;
                        p->mapbase = 0;
                        continue;
                }
 
        .dev = {
                .dma_mask               = &ehci_dmamask,
                .coherent_dma_mask      = 0xffffffff,
-               .platform_data          = 0x0,
+               .platform_data          = NULL,
        },
        .num_resources  = ARRAY_SIZE(ehci_resources),
        .resource       = ehci_resources,
 
 #define __ASM_ARCH_OMAP_3430SDP_H
 
 extern void sdp3430_usb_init(void);
+extern void sdp3430_flash_init(void);
 
 #define DEBUG_BASE                     0x08000000  /* debug board */
 
 
 struct omap_gpio_switch_config {
        char name[12];
        u16 gpio;
-       int flags:4;
-       int type:4;
-       int key_code:24; /* Linux key code */
+       u8 flags:4;
+       u8 type:4;
+       unsigned int key_code:24; /* Linux key code */
 };
 
 struct omap_uart_config {
 
 #ifndef __ASM_ARCH_OMAP_CPU_H
 #define __ASM_ARCH_OMAP_CPU_H
 
+#include <linux/init.h>
+
 struct omap_chip_id {
        u8 oc;
 };
 #define is_device_type_gp()    (get_device_type() == DEVICE_TYPE_GP)
 #define is_device_type_bad()   (get_device_type() == DEVICE_TYPE_BAD)
 
-#endif
+void __init omap2_check_revision(void);
+
+#endif    /* defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) */
 
 #endif
 
 /* called from board-specific card detection service routine */
 extern void omap_mmc_notify_cover_event(struct device *dev, int slot, int is_closed);
 
+#if defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE)
+void __init hsmmc_init(void);
+#endif
+
 #endif
 
 extern struct lcd_ctrl omap2_disp_ctrl;
 #endif
 
+extern void omapfb_reserve_sdram(void);
 extern void omapfb_register_panel(struct lcd_panel *panel);
 extern void omapfb_write_first_pixel(struct omapfb_device *fbdev, u16 pixval);
 extern void omapfb_notify_clients(struct omapfb_device *fbdev,
 
 #include <asm/mach-types.h>
 #include <asm/hardware.h>
 
+#include <asm/arch/prcm.h>
+
 #ifndef CONFIG_MACH_VOICEBLUE
 #define voiceblue_reset()              do {} while (0)
 #endif
 
-extern void omap_prcm_arch_reset(char mode);
-
 static inline void arch_idle(void)
 {
        cpu_do_idle();
 
 #define CLOCK_TICK_RATE                (HZ * 100000UL)
 #endif
 
+extern struct sys_timer omap_timer;
+
 #endif /* __ASM_ARCH_OMAP_TIMEX_H */
 
 #define UDC_BASE                       OMAP2_UDC_BASE
 #define OMAP_OHCI_BASE                 OMAP2_OHCI_BASE
 
+void __init usb_musb_init(void);
+void __init usb_ehci_init(void);
+
 #endif
 
 /*-------------------------------------------------------------------------*/