Merge tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 21 Feb 2013 23:33:45 +0000 (15:33 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 21 Feb 2013 23:33:45 +0000 (15:33 -0800)
Pull ARM SoC board specific changes from Arnd Bergmann:
 "These updates are all for board specific code, including

   - defconfig updates for shmobile, davinci, bcm2835, imx, omap and
     tegra

   - SD/MMC and I2C support on bcm2835 (Raspberry PI)

   - minor updates for PXA

   - shmobile updates to GPIO usage in board files

   - More things in OMAP board files are moved over to device tree
     probing

   - Better support for audio devices on some OMAP platforms"

* tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (55 commits)
  ARM: imx_v4_v5_defconfig: Add VPU support
  ARM: imx: configs: enable netfilter support
  ARM: OMAP2+: Fix twl section warnings related to omap_twl4030_audio_init
  ARM: OMAP2+: omap2plus_defconfig: enable omap1 rtc
  RX-51: Register twl4030-madc device
  RX-51: Add leds lp5523 names from Maemo 5 2.6.28 kernel
  ARM: OMAP2+: AM33XX: omap2plus_defconfig: Add support for few drivers
  ARM: OMAP1: nokia770: enable CBUS/Retu
  ARM: OMAP2+: omap2plus_defconfig: enable CMA allocator
  ARM: OMAP2+: omap2plus_defconfig: enable TFP410 chip support
  ARM: OMAP3: igep0020: simplify GPIO LEDs dependencies
  ARM: OMAP2+: craneboard: support the TPS65910 PMU
  ARM: OMAP2+: craneboard: support NAND device
  ARM: OMAP3: cm-t3517: add MMC support
  ARM: OMAP2+: Remove apollon board support
  ARM: shmobile: armadillo800eva: set clock rates before timer init
  ARM: tegra: defconfig updates
  ARM: shmobile: mackerel: Use gpio_request_one()
  ARM: shmobile: kzm9g: Use gpio_request_one()
  ARM: shmobile: bonito: Use gpio_request_one()
  ...

30 files changed:
1  2 
arch/arm/configs/imx_v6_v7_defconfig
arch/arm/configs/omap2plus_defconfig
arch/arm/mach-davinci/board-da850-evm.c
arch/arm/mach-davinci/board-omapl138-hawk.c
arch/arm/mach-omap1/board-nokia770.c
arch/arm/mach-omap2/Kconfig
arch/arm/mach-omap2/Makefile
arch/arm/mach-omap2/board-3430sdp.c
arch/arm/mach-omap2/board-4430sdp.c
arch/arm/mach-omap2/board-am3517crane.c
arch/arm/mach-omap2/board-cm-t35.c
arch/arm/mach-omap2/board-cm-t3517.c
arch/arm/mach-omap2/board-devkit8000.c
arch/arm/mach-omap2/board-igep0020.c
arch/arm/mach-omap2/board-omap3beagle.c
arch/arm/mach-omap2/board-omap3evm.c
arch/arm/mach-omap2/board-overo.c
arch/arm/mach-omap2/board-rx51-peripherals.c
arch/arm/mach-omap2/board-zoom-peripherals.c
arch/arm/mach-omap2/gpmc.c
arch/arm/mach-omap2/twl-common.c
arch/arm/mach-pxa/palmtreo.c
arch/arm/mach-pxa/pxa27x.c
arch/arm/mach-shmobile/board-ag5evm.c
arch/arm/mach-shmobile/board-ap4evb.c
arch/arm/mach-shmobile/board-armadillo800eva.c
arch/arm/mach-shmobile/board-bonito.c
arch/arm/mach-shmobile/board-kota2.c
arch/arm/mach-shmobile/board-kzm9g.c
arch/arm/mach-shmobile/board-mackerel.c

@@@ -19,7 -19,6 +19,7 @@@ CONFIG_MODULE_SRCVERSION_ALL=
  CONFIG_ARCH_MXC=y
  CONFIG_ARCH_MULTI_V6=y
  CONFIG_ARCH_MULTI_V7=y
 +CONFIG_MACH_IMX31_DT=y
  CONFIG_MACH_MX31LILLY=y
  CONFIG_MACH_MX31LITE=y
  CONFIG_MACH_PCM037=y
@@@ -33,6 -32,7 +33,6 @@@ CONFIG_MACH_PCM043=
  CONFIG_MACH_MX35_3DS=y
  CONFIG_MACH_VPR200=y
  CONFIG_MACH_IMX51_DT=y
 -CONFIG_MACH_MX51_3DS=y
  CONFIG_MACH_EUKREA_CPUIMX51SD=y
  CONFIG_SOC_IMX53=y
  CONFIG_SOC_IMX6Q=y
@@@ -59,6 -59,7 +59,7 @@@ CONFIG_IP_PNP_DHCP=
  # CONFIG_INET_XFRM_MODE_BEET is not set
  # CONFIG_INET_LRO is not set
  CONFIG_IPV6=y
+ CONFIG_NETFILTER=y
  # CONFIG_WIRELESS is not set
  CONFIG_DEVTMPFS=y
  CONFIG_DEVTMPFS_MOUNT=y
@@@ -151,7 -152,6 +152,7 @@@ CONFIG_MFD_MC13XXX_I2C=
  CONFIG_REGULATOR=y
  CONFIG_REGULATOR_FIXED_VOLTAGE=y
  CONFIG_REGULATOR_DA9052=y
 +CONFIG_REGULATOR_ANATOP=y
  CONFIG_REGULATOR_MC13783=y
  CONFIG_REGULATOR_MC13892=y
  CONFIG_MEDIA_SUPPORT=y
@@@ -160,7 -160,6 +161,7 @@@ CONFIG_V4L_PLATFORM_DRIVERS=
  CONFIG_MEDIA_CAMERA_SUPPORT=y
  CONFIG_SOC_CAMERA=y
  CONFIG_SOC_CAMERA_OV2640=y
 +CONFIG_DRM=y
  CONFIG_VIDEO_MX3=y
  CONFIG_FB=y
  CONFIG_LCD_PLATFORM=y
@@@ -199,14 -198,9 +200,14 @@@ CONFIG_RTC_CLASS=
  CONFIG_RTC_INTF_DEV_UIE_EMUL=y
  CONFIG_RTC_DRV_MC13XXX=y
  CONFIG_RTC_DRV_MXC=y
 +CONFIG_RTC_DRV_SNVS=y
  CONFIG_DMADEVICES=y
  CONFIG_IMX_SDMA=y
  CONFIG_MXS_DMA=y
 +CONFIG_STAGING=y
 +CONFIG_DRM_IMX=y
 +CONFIG_DRM_IMX_IPUV3_CORE=y
 +CONFIG_DRM_IMX_IPUV3=y
  CONFIG_COMMON_CLK_DEBUG=y
  # CONFIG_IOMMU_SUPPORT is not set
  CONFIG_EXT2_FS=y
@@@ -20,10 -20,9 +20,10 @@@ CONFIG_MODULE_FORCE_UNLOAD=
  CONFIG_MODVERSIONS=y
  CONFIG_MODULE_SRCVERSION_ALL=y
  # CONFIG_BLK_DEV_BSG is not set
 -CONFIG_ARCH_OMAP=y
 +CONFIG_ARCH_OMAP2PLUS=y
  CONFIG_OMAP_RESET_CLOCKS=y
  CONFIG_OMAP_MUX_DEBUG=y
 +CONFIG_ARCH_VEXPRESS_CA9X4=y
  CONFIG_ARM_THUMBEE=y
  CONFIG_ARM_ERRATA_411920=y
  CONFIG_NO_HZ=y
@@@ -53,6 -52,11 +53,11 @@@ CONFIG_IP_PNP_RARP=
  # CONFIG_INET_LRO is not set
  # CONFIG_IPV6 is not set
  CONFIG_NETFILTER=y
+ CONFIG_CAN=m
+ CONFIG_CAN_RAW=m
+ CONFIG_CAN_BCM=m
+ CONFIG_CAN_C_CAN=m
+ CONFIG_CAN_C_CAN_PLATFORM=m
  CONFIG_BT=m
  CONFIG_BT_HCIUART=m
  CONFIG_BT_HCIUART_H4=y
@@@ -65,6 -69,7 +70,7 @@@ CONFIG_MAC80211=
  CONFIG_MAC80211_RC_PID=y
  CONFIG_MAC80211_RC_DEFAULT_PID=y
  CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+ CONFIG_CMA=y
  CONFIG_CONNECTOR=y
  CONFIG_DEVTMPFS=y
  CONFIG_DEVTMPFS_MOUNT=y
@@@ -84,6 -89,9 +90,9 @@@ CONFIG_MTD_UBI=
  CONFIG_BLK_DEV_LOOP=y
  CONFIG_BLK_DEV_RAM=y
  CONFIG_BLK_DEV_RAM_SIZE=16384
+ CONFIG_SENSORS_LIS3LV02D=m
+ CONFIG_SENSORS_TSL2550=m
+ CONFIG_SENSORS_LIS3_I2C=m
  CONFIG_SCSI=y
  CONFIG_BLK_DEV_SD=y
  CONFIG_SCSI_MULTI_LUN=y
@@@ -109,6 -117,7 +118,7 @@@ CONFIG_USB_KC2190=
  CONFIG_INPUT_JOYDEV=y
  CONFIG_INPUT_EVDEV=y
  CONFIG_KEYBOARD_GPIO=y
+ CONFIG_KEYBOARD_MATRIX=m
  CONFIG_KEYBOARD_TWL4030=y
  CONFIG_INPUT_TOUCHSCREEN=y
  CONFIG_TOUCHSCREEN_ADS7846=y
@@@ -122,8 -131,6 +132,8 @@@ CONFIG_SERIAL_8250_MANY_PORTS=
  CONFIG_SERIAL_8250_SHARE_IRQ=y
  CONFIG_SERIAL_8250_DETECT_IRQ=y
  CONFIG_SERIAL_8250_RSA=y
 +CONFIG_SERIAL_AMBA_PL011=y
 +CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
  CONFIG_HW_RANDOM=y
  CONFIG_I2C_CHARDEV=y
  CONFIG_SPI=y
@@@ -134,14 -141,17 +144,17 @@@ CONFIG_GPIO_SYSFS=
  CONFIG_GPIO_TWL4030=y
  CONFIG_W1=y
  CONFIG_POWER_SUPPLY=y
+ CONFIG_SENSORS_LM75=m
  CONFIG_WATCHDOG=y
  CONFIG_OMAP_WATCHDOG=y
  CONFIG_TWL4030_WATCHDOG=y
  CONFIG_MFD_TPS65217=y
+ CONFIG_MFD_TPS65910=y
  CONFIG_REGULATOR_TWL4030=y
  CONFIG_REGULATOR_TPS65023=y
  CONFIG_REGULATOR_TPS6507X=y
  CONFIG_REGULATOR_TPS65217=y
+ CONFIG_REGULATOR_TPS65910=y
  CONFIG_FB=y
  CONFIG_FIRMWARE_EDID=y
  CONFIG_FB_MODE_HELPERS=y
@@@ -153,6 -163,7 +166,7 @@@ CONFIG_OMAP2_DSS_SDI=
  CONFIG_OMAP2_DSS_DSI=y
  CONFIG_FB_OMAP2=m
  CONFIG_PANEL_GENERIC_DPI=m
+ CONFIG_PANEL_TFP410=m
  CONFIG_PANEL_SHARP_LS037V7DW01=m
  CONFIG_PANEL_NEC_NL8048HL11_01B=m
  CONFIG_PANEL_TAAL=m
@@@ -197,12 -208,22 +211,23 @@@ CONFIG_USB_ZERO=
  CONFIG_MMC=y
  CONFIG_MMC_UNSAFE_RESUME=y
  CONFIG_SDIO_UART=y
 +CONFIG_MMC_ARMMMCI=y
  CONFIG_MMC_OMAP=y
  CONFIG_MMC_OMAP_HS=y
+ CONFIG_NEW_LEDS=y
+ CONFIG_LEDS_GPIO=y
+ CONFIG_LEDS_TRIGGERS=y
+ CONFIG_LEDS_TRIGGER_TIMER=y
+ CONFIG_LEDS_TRIGGER_ONESHOT=y
+ CONFIG_LEDS_TRIGGER_HEARTBEAT=y
+ CONFIG_LEDS_TRIGGER_BACKLIGHT=y
+ CONFIG_LEDS_TRIGGER_CPU=y
+ CONFIG_LEDS_TRIGGER_GPIO=y
+ CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
  CONFIG_RTC_CLASS=y
  CONFIG_RTC_DRV_TWL92330=y
  CONFIG_RTC_DRV_TWL4030=y
+ CONFIG_RTC_DRV_OMAP=y
  CONFIG_DMADEVICES=y
  CONFIG_DMA_OMAP=y
  CONFIG_EXT2_FS=y
@@@ -349,13 -349,13 +349,13 @@@ static inline void da850_evm_setup_nor_
        if (!HAS_MMC) {
                ret = davinci_cfg_reg_list(da850_evm_nand_pins);
                if (ret)
-                       pr_warning("da850_evm_init: nand mux setup failed: "
-                                       "%d\n", ret);
+                       pr_warn("%s: NAND mux setup failed: %d\n",
+                               __func__, ret);
  
                ret = davinci_cfg_reg_list(da850_evm_nor_pins);
                if (ret)
-                       pr_warning("da850_evm_init: nor mux setup failed: %d\n",
-                               ret);
+                       pr_warn("%s: NOR mux setup failed: %d\n",
+                               __func__, ret);
  
                da850_evm_init_nor();
  
@@@ -477,19 -477,19 +477,19 @@@ static int da850_evm_ui_expander_setup(
  
        ret = gpio_request(sel_a, da850_evm_ui_exp[DA850_EVM_UI_EXP_SEL_A]);
        if (ret) {
-               pr_warning("Cannot open UI expander pin %d\n", sel_a);
+               pr_warn("Cannot open UI expander pin %d\n", sel_a);
                goto exp_setup_sela_fail;
        }
  
        ret = gpio_request(sel_b, da850_evm_ui_exp[DA850_EVM_UI_EXP_SEL_B]);
        if (ret) {
-               pr_warning("Cannot open UI expander pin %d\n", sel_b);
+               pr_warn("Cannot open UI expander pin %d\n", sel_b);
                goto exp_setup_selb_fail;
        }
  
        ret = gpio_request(sel_c, da850_evm_ui_exp[DA850_EVM_UI_EXP_SEL_C]);
        if (ret) {
-               pr_warning("Cannot open UI expander pin %d\n", sel_c);
+               pr_warn("Cannot open UI expander pin %d\n", sel_c);
                goto exp_setup_selc_fail;
        }
  
        da850_evm_ui_keys_init(gpio);
        ret = platform_device_register(&da850_evm_ui_keys_device);
        if (ret) {
-               pr_warning("Could not register UI GPIO expander push-buttons");
+               pr_warn("Could not register UI GPIO expander push-buttons");
                goto exp_setup_keys_fail;
        }
  
@@@ -690,14 -690,14 +690,14 @@@ static int da850_evm_bb_expander_setup(
        da850_evm_bb_keys_init(gpio);
        ret = platform_device_register(&da850_evm_bb_keys_device);
        if (ret) {
-               pr_warning("Could not register baseboard GPIO expander keys");
+               pr_warn("Could not register baseboard GPIO expander keys");
                goto io_exp_setup_sw_fail;
        }
  
        da850_evm_bb_leds_init(gpio);
        ret = platform_device_register(&da850_evm_bb_leds_device);
        if (ret) {
-               pr_warning("Could not register baseboard GPIO expander LEDS");
+               pr_warn("Could not register baseboard GPIO expander LEDs");
                goto io_exp_setup_leds_fail;
        }
  
@@@ -1065,21 -1065,19 +1065,19 @@@ static int __init da850_evm_config_emac
        }
  
        if (ret)
-               pr_warning("da850_evm_init: cpgmac/rmii mux setup failed: %d\n",
-                               ret);
+               pr_warn("%s: CPGMAC/RMII mux setup failed: %d\n",
+                       __func__, ret);
  
        /* configure the CFGCHIP3 register for RMII or MII */
        __raw_writel(val, cfg_chip3_base);
  
        ret = davinci_cfg_reg(DA850_GPIO2_6);
        if (ret)
-               pr_warning("da850_evm_init:GPIO(2,6) mux setup "
-                                                       "failed\n");
+               pr_warn("%s:GPIO(2,6) mux setup failed\n", __func__);
  
        ret = gpio_request(DA850_MII_MDIO_CLKEN_PIN, "mdio_clk_en");
        if (ret) {
-               pr_warning("Cannot open GPIO %d\n",
-                                       DA850_MII_MDIO_CLKEN_PIN);
+               pr_warn("Cannot open GPIO %d\n", DA850_MII_MDIO_CLKEN_PIN);
                return ret;
        }
  
  
        ret = da8xx_register_emac();
        if (ret)
-               pr_warning("da850_evm_init: emac registration failed: %d\n",
-                               ret);
+               pr_warn("%s: EMAC registration failed: %d\n", __func__, ret);
  
        return 0;
  }
@@@ -1443,57 -1440,53 +1440,53 @@@ static __init void da850_evm_init(void
  
        ret = pmic_tps65070_init();
        if (ret)
-               pr_warning("da850_evm_init: TPS65070 PMIC init failed: %d\n",
-                               ret);
+               pr_warn("%s: TPS65070 PMIC init failed: %d\n", __func__, ret);
  
        ret = da850_register_edma(da850_edma_rsv);
        if (ret)
-               pr_warning("da850_evm_init: edma registration failed: %d\n",
-                               ret);
+               pr_warn("%s: EDMA registration failed: %d\n", __func__, ret);
  
        ret = davinci_cfg_reg_list(da850_i2c0_pins);
        if (ret)
-               pr_warning("da850_evm_init: i2c0 mux setup failed: %d\n",
-                               ret);
+               pr_warn("%s: I2C0 mux setup failed: %d\n", __func__, ret);
  
        ret = da8xx_register_i2c(0, &da850_evm_i2c_0_pdata);
        if (ret)
-               pr_warning("da850_evm_init: i2c0 registration failed: %d\n",
-                               ret);
+               pr_warn("%s: I2C0 registration failed: %d\n", __func__, ret);
  
  
        ret = da8xx_register_watchdog();
        if (ret)
-               pr_warning("da830_evm_init: watchdog registration failed: %d\n",
-                               ret);
+               pr_warn("%s: watchdog registration failed: %d\n",
+                       __func__, ret);
  
        if (HAS_MMC) {
                ret = davinci_cfg_reg_list(da850_evm_mmcsd0_pins);
                if (ret)
-                       pr_warning("da850_evm_init: mmcsd0 mux setup failed:"
-                                       " %d\n", ret);
+                       pr_warn("%s: MMCSD0 mux setup failed: %d\n",
+                               __func__, ret);
  
                ret = gpio_request(DA850_MMCSD_CD_PIN, "MMC CD\n");
                if (ret)
-                       pr_warning("da850_evm_init: can not open GPIO %d\n",
-                                       DA850_MMCSD_CD_PIN);
+                       pr_warn("%s: can not open GPIO %d\n",
+                               __func__, DA850_MMCSD_CD_PIN);
                gpio_direction_input(DA850_MMCSD_CD_PIN);
  
                ret = gpio_request(DA850_MMCSD_WP_PIN, "MMC WP\n");
                if (ret)
-                       pr_warning("da850_evm_init: can not open GPIO %d\n",
-                                       DA850_MMCSD_WP_PIN);
+                       pr_warn("%s: can not open GPIO %d\n",
+                               __func__, DA850_MMCSD_WP_PIN);
                gpio_direction_input(DA850_MMCSD_WP_PIN);
  
                ret = da8xx_register_mmcsd0(&da850_mmc_config);
                if (ret)
-                       pr_warning("da850_evm_init: mmcsd0 registration failed:"
-                                       " %d\n", ret);
+                       pr_warn("%s: MMCSD0 registration failed: %d\n",
+                               __func__, ret);
  
                ret = da850_wl12xx_init();
                if (ret)
-                       pr_warning("da850_evm_init: wl12xx initialization"
-                                  " failed: %d\n", ret);
+                       pr_warn("%s: WL12xx initialization failed: %d\n",
+                               __func__, ret);
        }
  
        davinci_serial_init(&da850_evm_uart_config);
  
        ret = davinci_cfg_reg_list(da850_evm_mcasp_pins);
        if (ret)
-               pr_warning("da850_evm_init: mcasp mux setup failed: %d\n",
-                               ret);
+               pr_warn("%s: McASP mux setup failed: %d\n", __func__, ret);
  
        da850_evm_snd_data.sram_pool = sram_get_gen_pool();
        da8xx_register_mcasp(0, &da850_evm_snd_data);
  
        ret = davinci_cfg_reg_list(da850_lcdcntl_pins);
        if (ret)
-               pr_warning("da850_evm_init: lcdcntl mux setup failed: %d\n",
-                               ret);
+               pr_warn("%s: LCDC mux setup failed: %d\n", __func__, ret);
  
        ret = da8xx_register_uio_pruss();
        if (ret)
        /* Handle board specific muxing for LCD here */
        ret = davinci_cfg_reg_list(da850_evm_lcdc_pins);
        if (ret)
-               pr_warning("da850_evm_init: evm specific lcd mux setup "
-                               "failed: %d\n", ret);
+               pr_warn("%s: EVM specific LCD mux setup failed: %d\n",
+                       __func__, ret);
  
        ret = da850_lcd_hw_init();
        if (ret)
-               pr_warning("da850_evm_init: lcd initialization failed: %d\n",
-                               ret);
+               pr_warn("%s: LCD initialization failed: %d\n", __func__, ret);
  
        sharp_lk043t1dg01_pdata.panel_power_ctrl = da850_panel_power_ctrl,
        ret = da8xx_register_lcdc(&sharp_lk043t1dg01_pdata);
        if (ret)
-               pr_warning("da850_evm_init: lcdc registration failed: %d\n",
-                               ret);
+               pr_warn("%s: LCDC registration failed: %d\n", __func__, ret);
  
        ret = da8xx_register_rtc();
        if (ret)
-               pr_warning("da850_evm_init: rtc setup failed: %d\n", ret);
+               pr_warn("%s: RTC setup failed: %d\n", __func__, ret);
  
        ret = da850_evm_init_cpufreq();
        if (ret)
-               pr_warning("da850_evm_init: cpufreq registration failed: %d\n",
-                               ret);
+               pr_warn("%s: cpufreq registration failed: %d\n", __func__, ret);
  
        ret = da8xx_register_cpuidle();
        if (ret)
-               pr_warning("da850_evm_init: cpuidle registration failed: %d\n",
-                               ret);
+               pr_warn("%s: cpuidle registration failed: %d\n", __func__, ret);
  
        ret = da850_register_pm(&da850_pm_device);
        if (ret)
-               pr_warning("da850_evm_init: suspend registration failed: %d\n",
-                               ret);
+               pr_warn("%s: suspend registration failed: %d\n", __func__, ret);
  
        da850_vpif_init();
  
 -      ret = da8xx_register_spi(1, da850evm_spi_info,
 -                               ARRAY_SIZE(da850evm_spi_info));
 +      ret = spi_register_board_info(da850evm_spi_info,
 +                                    ARRAY_SIZE(da850evm_spi_info));
 +      if (ret)
 +              pr_warn("%s: spi info registration failed: %d\n", __func__,
 +                      ret);
 +
 +      ret = da8xx_register_spi_bus(1, ARRAY_SIZE(da850evm_spi_info));
        if (ret)
-               pr_warning("da850_evm_init: spi 1 registration failed: %d\n",
-                               ret);
+               pr_warn("%s: SPI 1 registration failed: %d\n", __func__, ret);
  
        ret = da850_register_sata(DA850EVM_SATA_REFCLKPN_RATE);
        if (ret)
-               pr_warning("da850_evm_init: sata registration failed: %d\n",
-                               ret);
+               pr_warn("%s: SATA registration failed: %d\n", __func__, ret);
  
        da850_evm_setup_mac_addr();
  }
@@@ -1604,7 -1583,7 +1588,7 @@@ MACHINE_START(DAVINCI_DA850_EVM, "DaVin
        .atag_offset    = 0x100,
        .map_io         = da850_evm_map_io,
        .init_irq       = cp_intc_init,
 -      .timer          = &davinci_timer,
 +      .init_time      = davinci_timer_init,
        .init_machine   = da850_evm_init,
        .init_late      = davinci_init_late,
        .dma_zone_size  = SZ_128M,
@@@ -48,8 -48,7 +48,7 @@@ static __init void omapl138_hawk_config
        val &= ~BIT(8);
        ret = davinci_cfg_reg_list(omapl138_hawk_mii_pins);
        if (ret) {
-               pr_warning("%s: cpgmac/mii mux setup failed: %d\n",
-                       __func__, ret);
+               pr_warn("%s: CPGMAC/MII mux setup failed: %d\n", __func__, ret);
                return;
        }
  
@@@ -61,8 -60,7 +60,7 @@@
  
        ret = da8xx_register_emac();
        if (ret)
-               pr_warning("%s: emac registration failed: %d\n",
-                       __func__, ret);
+               pr_warn("%s: EMAC registration failed: %d\n", __func__, ret);
  }
  
  /*
@@@ -147,15 -145,14 +145,14 @@@ static __init void omapl138_hawk_mmc_in
  
        ret = davinci_cfg_reg_list(hawk_mmcsd0_pins);
        if (ret) {
-               pr_warning("%s: MMC/SD0 mux setup failed: %d\n",
-                       __func__, ret);
+               pr_warn("%s: MMC/SD0 mux setup failed: %d\n", __func__, ret);
                return;
        }
  
        ret = gpio_request_one(DA850_HAWK_MMCSD_CD_PIN,
                        GPIOF_DIR_IN, "MMC CD");
        if (ret < 0) {
-               pr_warning("%s: can not open GPIO %d\n",
+               pr_warn("%s: can not open GPIO %d\n",
                        __func__, DA850_HAWK_MMCSD_CD_PIN);
                return;
        }
        ret = gpio_request_one(DA850_HAWK_MMCSD_WP_PIN,
                        GPIOF_DIR_IN, "MMC WP");
        if (ret < 0) {
-               pr_warning("%s: can not open GPIO %d\n",
+               pr_warn("%s: can not open GPIO %d\n",
                        __func__, DA850_HAWK_MMCSD_WP_PIN);
                goto mmc_setup_wp_fail;
        }
  
        ret = da8xx_register_mmcsd0(&da850_mmc_config);
        if (ret) {
-               pr_warning("%s: MMC/SD0 registration failed: %d\n",
-                       __func__, ret);
+               pr_warn("%s: MMC/SD0 registration failed: %d\n", __func__, ret);
                goto mmc_setup_mmcsd_fail;
        }
  
@@@ -250,8 -246,7 +246,7 @@@ static __init void omapl138_hawk_usb_in
  
        ret = davinci_cfg_reg_list(da850_hawk_usb11_pins);
        if (ret) {
-               pr_warning("%s: USB 1.1 PinMux setup failed: %d\n",
-                       __func__, ret);
+               pr_warn("%s: USB 1.1 PinMux setup failed: %d\n", __func__, ret);
                return;
        }
  
  
        ret = da8xx_register_usb11(&omapl138_hawk_usb11_pdata);
        if (ret) {
-               pr_warning("%s: USB 1.1 registration failed: %d\n",
-                       __func__, ret);
+               pr_warn("%s: USB 1.1 registration failed: %d\n", __func__, ret);
                goto usb11_setup_fail;
        }
  
@@@ -307,8 -301,7 +301,7 @@@ static __init void omapl138_hawk_init(v
  
        ret = da850_register_edma(da850_edma_rsv);
        if (ret)
-               pr_warning("%s: EDMA registration failed: %d\n",
-                       __func__, ret);
+               pr_warn("%s: EDMA registration failed: %d\n", __func__, ret);
  
        omapl138_hawk_mmc_init();
  
  
        ret = da8xx_register_watchdog();
        if (ret)
-               pr_warning("omapl138_hawk_init: "
-                       "watchdog registration failed: %d\n",
-                       ret);
+               pr_warn("%s: watchdog registration failed: %d\n",
+                       __func__, ret);
  }
  
  #ifdef CONFIG_SERIAL_8250_CONSOLE
@@@ -341,7 -333,7 +333,7 @@@ MACHINE_START(OMAPL138_HAWKBOARD, "AM18
        .atag_offset    = 0x100,
        .map_io         = omapl138_hawk_map_io,
        .init_irq       = cp_intc_init,
 -      .timer          = &davinci_timer,
 +      .init_time      = davinci_timer_init,
        .init_machine   = omapl138_hawk_init,
        .init_late      = davinci_init_late,
        .dma_zone_size  = SZ_128M,
@@@ -7,6 -7,7 +7,7 @@@
   * it under the terms of the GNU General Public License version 2 as
   * published by the Free Software Foundation.
   */
+ #include <linux/irq.h>
  #include <linux/gpio.h>
  #include <linux/kernel.h>
  #include <linux/init.h>
@@@ -23,6 -24,8 +24,8 @@@
  
  #include <linux/platform_data/keypad-omap.h>
  #include <linux/platform_data/lcd-mipid.h>
+ #include <linux/platform_data/gpio-omap.h>
+ #include <linux/platform_data/i2c-cbus-gpio.h>
  
  #include <asm/mach-types.h>
  #include <asm/mach/arch.h>
@@@ -212,6 -215,45 +215,45 @@@ static inline void nokia770_mmc_init(vo
  }
  #endif
  
+ #if defined(CONFIG_I2C_CBUS_GPIO) || defined(CONFIG_I2C_CBUS_GPIO_MODULE)
+ static struct i2c_cbus_platform_data nokia770_cbus_data = {
+       .clk_gpio = OMAP_MPUIO(9),
+       .dat_gpio = OMAP_MPUIO(10),
+       .sel_gpio = OMAP_MPUIO(11),
+ };
+ static struct platform_device nokia770_cbus_device = {
+       .name   = "i2c-cbus-gpio",
+       .id     = 2,
+       .dev    = {
+               .platform_data = &nokia770_cbus_data,
+       },
+ };
+ static struct i2c_board_info nokia770_i2c_board_info_2[] __initdata = {
+       {
+               I2C_BOARD_INFO("retu-mfd", 0x01),
+       },
+ };
+ static void __init nokia770_cbus_init(void)
+ {
+       const int retu_irq_gpio = 62;
+       if (gpio_request_one(retu_irq_gpio, GPIOF_IN, "Retu IRQ"))
+               return;
+       irq_set_irq_type(gpio_to_irq(retu_irq_gpio), IRQ_TYPE_EDGE_RISING);
+       nokia770_i2c_board_info_2[0].irq = gpio_to_irq(retu_irq_gpio);
+       i2c_register_board_info(2, nokia770_i2c_board_info_2,
+                               ARRAY_SIZE(nokia770_i2c_board_info_2));
+       platform_device_register(&nokia770_cbus_device);
+ }
+ #else /* CONFIG_I2C_CBUS_GPIO */
+ static void __init nokia770_cbus_init(void)
+ {
+ }
+ #endif /* CONFIG_I2C_CBUS_GPIO */
  static void __init omap_nokia770_init(void)
  {
        /* On Nokia 770, the SleepX signal is masked with an
        mipid_dev_init();
        omap1_usb_init(&nokia770_usb_config);
        nokia770_mmc_init();
+       nokia770_cbus_init();
  }
  
  MACHINE_START(NOKIA770, "Nokia 770")
        .init_irq       = omap1_init_irq,
        .init_machine   = omap_nokia770_init,
        .init_late      = omap1_init_late,
 -      .timer          = &omap1_timer,
 +      .init_time      = omap1_timer_init,
        .restart        = omap1_restart,
  MACHINE_END
@@@ -1,26 -1,3 +1,26 @@@
 +config ARCH_OMAP
 +      bool
 +
 +config ARCH_OMAP2PLUS
 +      bool "TI OMAP2/3/4/5 SoCs with device tree support" if (ARCH_MULTI_V6 || ARCH_MULTI_V7)
 +      select ARCH_HAS_CPUFREQ
 +      select ARCH_HAS_HOLES_MEMORYMODEL
 +      select ARCH_OMAP
 +      select ARCH_REQUIRE_GPIOLIB
 +      select CLKDEV_LOOKUP
 +      select CLKSRC_MMIO
 +      select GENERIC_CLOCKEVENTS
 +      select GENERIC_IRQ_CHIP
 +      select HAVE_CLK
 +      select OMAP_DM_TIMER
 +      select PINCTRL
 +      select PROC_DEVICETREE if PROC_FS
 +      select SPARSE_IRQ
 +      select USE_OF
 +      help
 +        Systems based on OMAP2, OMAP3, OMAP4 or OMAP5
 +
 +
  if ARCH_OMAP2PLUS
  
  menu "TI OMAP2/3/4 Specific Features"
@@@ -188,12 -165,6 +188,6 @@@ config MACH_OMAP_H
        select OMAP_DEBUG_DEVICES
        select OMAP_PACKAGE_ZAF
  
- config MACH_OMAP_APOLLON
-       bool "OMAP 2420 Apollon board"
-       depends on SOC_OMAP2420
-       default y
-       select OMAP_PACKAGE_ZAC
  config MACH_OMAP_2430SDP
        bool "OMAP 2430 SDP board"
        depends on SOC_OMAP2430
@@@ -420,7 -391,7 +414,7 @@@ config OMAP3_SDRC_AC_TIMIN
  
  config OMAP4_ERRATA_I688
        bool "OMAP4 errata: Async Bridge Corruption"
 -      depends on ARCH_OMAP4
 +      depends on ARCH_OMAP4 && !ARCH_MULTIPLATFORM
        select ARCH_HAS_BARRIERS
        help
          If a data is stalled inside asynchronous bridge because of back
@@@ -2,9 -2,6 +2,9 @@@
  # Makefile for the linux kernel.
  #
  
 +ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include \
 +      -I$(srctree)/arch/arm/plat-omap/include
 +
  # Common support
  obj-y := id.o io.o control.o mux.o devices.o fb.o serial.o gpmc.o timer.o pm.o \
         common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o omap_hwmod.o \
@@@ -223,7 -220,6 +223,6 @@@ endi
  obj-$(CONFIG_MACH_OMAP_GENERIC)               += board-generic.o
  obj-$(CONFIG_MACH_OMAP_H4)            += board-h4.o
  obj-$(CONFIG_MACH_OMAP_2430SDP)               += board-2430sdp.o
- obj-$(CONFIG_MACH_OMAP_APOLLON)               += board-apollon.o
  obj-$(CONFIG_MACH_OMAP3_BEAGLE)               += board-omap3beagle.o
  obj-$(CONFIG_MACH_DEVKIT8000)         += board-devkit8000.o
  obj-$(CONFIG_MACH_OMAP_LDP)           += board-ldp.o
@@@ -25,7 -25,7 +25,8 @@@
  #include <linux/gpio.h>
  #include <linux/mmc/host.h>
  #include <linux/platform_data/spi-omap2-mcspi.h>
+ #include <linux/platform_data/omap-twl4030.h>
 +#include <linux/usb/phy.h>
  
  #include <asm/mach-types.h>
  #include <asm/mach/arch.h>
@@@ -210,6 -210,19 +211,19 @@@ static struct omap2_hsmmc_info mmc[] = 
        {}      /* Terminator */
  };
  
+ static struct omap_tw4030_pdata omap_twl4030_audio_data = {
+       .voice_connected = true,
+       .custom_routing = true,
+       .has_hs         = OMAP_TWL4030_LEFT | OMAP_TWL4030_RIGHT,
+       .has_hf         = OMAP_TWL4030_LEFT | OMAP_TWL4030_RIGHT,
+       .has_mainmic    = true,
+       .has_submic     = true,
+       .has_hsmic      = true,
+       .has_linein     = OMAP_TWL4030_LEFT | OMAP_TWL4030_RIGHT,
+ };
  static int sdp3430_twl_gpio_setup(struct device *dev,
                unsigned gpio, unsigned ngpio)
  {
        /* gpio + 15 is "sub_lcd_nRST" (output) */
        gpio_request_one(gpio + 15, GPIOF_OUT_INIT_LOW, "sub_lcd_nRST");
  
+       omap_twl4030_audio_data.jack_detect = gpio + 2;
+       omap_twl4030_audio_init("SDP3430", &omap_twl4030_audio_data);
        return 0;
  }
  
@@@ -383,6 -399,9 +400,9 @@@ static int __init omap3430_i2c_init(voi
        sdp3430_twldata.vpll2->constraints.apply_uV = true;
        sdp3430_twldata.vpll2->constraints.name = "VDVI";
  
+       sdp3430_twldata.audio->codec->hs_extmute = 1;
+       sdp3430_twldata.audio->codec->hs_extmute_gpio = -EINVAL;
        omap3_pmic_init("twl4030", &sdp3430_twldata);
  
        /* i2c2 on camera connector (for sensor control) and optional isp1301 */
@@@ -425,7 -444,7 +445,7 @@@ static void enable_board_wakeup_source(
                OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP);
  }
  
 -static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
 +static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
  
        .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
        .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
@@@ -580,7 -599,6 +600,7 @@@ static void __init omap_3430sdp_init(vo
        omap_ads7846_init(1, gpio_pendown, 310, NULL);
        omap_serial_init();
        omap_sdrc_init(hyb18m512160af6_sdrc_params, NULL);
 +      usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
        usb_musb_init(NULL);
        board_smc91x_init();
        board_flash_init(sdp_flash_partitions, chip_sel_3430, 0);
@@@ -599,6 -617,6 +619,6 @@@ MACHINE_START(OMAP_3430SDP, "OMAP3430 3
        .handle_irq     = omap3_intc_handle_irq,
        .init_machine   = omap_3430sdp_init,
        .init_late      = omap3430_init_late,
 -      .timer          = &omap3_timer,
 +      .init_time      = omap3_sync32k_timer_init,
        .restart        = omap3xxx_restart,
  MACHINE_END
  #include <linux/gpio_keys.h>
  #include <linux/regulator/machine.h>
  #include <linux/regulator/fixed.h>
+ #include <linux/pwm.h>
  #include <linux/leds.h>
  #include <linux/leds_pwm.h>
+ #include <linux/pwm_backlight.h>
 +#include <linux/irqchip/arm-gic.h>
  #include <linux/platform_data/omap4-keypad.h>
  #include <linux/usb/musb.h>
 +#include <linux/usb/phy.h>
  
 -#include <asm/hardware/gic.h>
  #include <asm/mach-types.h>
  #include <asm/mach/arch.h>
  #include <asm/mach/map.h>
@@@ -257,10 -258,20 +259,20 @@@ static struct gpio_led_platform_data sd
        .num_leds       = ARRAY_SIZE(sdp4430_gpio_leds),
  };
  
+ static struct pwm_lookup sdp4430_pwm_lookup[] = {
+       PWM_LOOKUP("twl-pwm", 0, "leds_pwm", "omap4::keypad"),
+       PWM_LOOKUP("twl-pwm", 1, "pwm-backlight", NULL),
+       PWM_LOOKUP("twl-pwmled", 0, "leds_pwm", "omap4:green:chrg"),
+ };
  static struct led_pwm sdp4430_pwm_leds[] = {
        {
+               .name           = "omap4::keypad",
+               .max_brightness = 127,
+               .pwm_period_ns  = 7812500,
+       },
+       {
                .name           = "omap4:green:chrg",
-               .pwm_id         = 1,
                .max_brightness = 255,
                .pwm_period_ns  = 7812500,
        },
@@@ -279,6 -290,20 +291,20 @@@ static struct platform_device sdp4430_l
        },
  };
  
+ static struct platform_pwm_backlight_data sdp4430_backlight_data = {
+       .max_brightness = 127,
+       .dft_brightness = 127,
+       .pwm_period_ns = 7812500,
+ };
+ static struct platform_device sdp4430_backlight_pwm = {
+       .name   = "pwm-backlight",
+       .id     = -1,
+       .dev    = {
+               .platform_data = &sdp4430_backlight_data,
+       },
+ };
  static int omap_prox_activate(struct device *dev)
  {
        gpio_set_value(OMAP4_SFH7741_ENABLE_GPIO , 1);
@@@ -413,6 -438,7 +439,7 @@@ static struct platform_device *sdp4430_
        &sdp4430_gpio_keys_device,
        &sdp4430_leds_gpio,
        &sdp4430_leds_pwm,
+       &sdp4430_backlight_pwm,
        &sdp4430_vbat,
        &sdp4430_dmic_codec,
        &sdp4430_abe_audio,
@@@ -697,7 -723,6 +724,7 @@@ static void __init omap_4430sdp_init(vo
        omap4_sdp4430_wifi_init();
        omap4_twl6030_hsmmc_init(mmc);
  
 +      usb_bind_phy("musb-hdrc.0.auto", 0, "omap-usb2.1.auto");
        usb_musb_init(&musb_board_data);
  
        status = omap_ethernet_init();
                                ARRAY_SIZE(sdp4430_spi_board_info));
        }
  
+       pwm_add_table(sdp4430_pwm_lookup, ARRAY_SIZE(sdp4430_pwm_lookup));
        status = omap4_keyboard_init(&sdp4430_keypad_data, &keypad_data);
        if (status)
                pr_err("Keypad initialization failed: %d\n", status);
@@@ -724,8 -750,9 +752,8 @@@ MACHINE_START(OMAP_4430SDP, "OMAP4430 4
        .map_io         = omap4_map_io,
        .init_early     = omap4430_init_early,
        .init_irq       = gic_init_irq,
 -      .handle_irq     = gic_handle_irq,
        .init_machine   = omap_4430sdp_init,
        .init_late      = omap4430_init_late,
 -      .timer          = &omap4_timer,
 +      .init_time      = omap4_local_timer_init,
        .restart        = omap44xx_restart,
  MACHINE_END
  #include <linux/kernel.h>
  #include <linux/init.h>
  #include <linux/gpio.h>
+ #include <linux/mfd/tps65910.h>
+ #include <linux/mtd/mtd.h>
+ #include <linux/mtd/nand.h>
+ #include <linux/mtd/partitions.h>
  
  #include <asm/mach-types.h>
  #include <asm/mach/arch.h>
  #include <asm/mach/map.h>
  
  #include "common.h"
+ #include "common-board-devices.h"
+ #include "board-flash.h"
  
  #include "am35xx-emac.h"
  #include "mux.h"
  
  #ifdef CONFIG_OMAP_MUX
  static struct omap_board_mux board_mux[] __initdata = {
+       OMAP3_MUX(SYS_NIRQ, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
        { .reg_offset = OMAP_MUX_TERMINATOR },
  };
  #endif
  
 -static struct usbhs_omap_board_data usbhs_bdata __initdata = {
 +static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
        .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
        .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
        .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
        .reset_gpio_port[2]  = -EINVAL
  };
  
+ static struct mtd_partition crane_nand_partitions[] = {
+       {
+               .name           = "X-Loader",
+               .offset         = 0,
+               .size           = 4 * NAND_BLOCK_SIZE,
+               .mask_flags     = MTD_WRITEABLE,
+       },
+       {
+               .name           = "U-Boot",
+               .offset         = MTDPART_OFS_APPEND,
+               .size           = 14 * NAND_BLOCK_SIZE,
+               .mask_flags     = MTD_WRITEABLE,
+       },
+       {
+               .name           = "U-Boot Env",
+               .offset         = MTDPART_OFS_APPEND,
+               .size           = 2 * NAND_BLOCK_SIZE,
+       },
+       {
+               .name           = "Kernel",
+               .offset         = MTDPART_OFS_APPEND,
+               .size           = 40 * NAND_BLOCK_SIZE,
+       },
+       {
+               .name           = "File System",
+               .offset         = MTDPART_OFS_APPEND,
+               .size           = MTDPART_SIZ_FULL,
+       },
+ };
+ static struct tps65910_board tps65910_pdata = {
+       .irq = 7 + OMAP_INTC_START,
+       .en_ck32k_xtal = true,
+ };
+ static struct i2c_board_info __initdata tps65910_board_info[] = {
+       {
+               I2C_BOARD_INFO("tps65910", 0x2d),
+               .platform_data = &tps65910_pdata,
+       },
+ };
+ static void __init am3517_crane_i2c_init(void)
+ {
+       omap_register_i2c_bus(1, 2600, tps65910_board_info,
+                       ARRAY_SIZE(tps65910_board_info));
+ }
  static void __init am3517_crane_init(void)
  {
        int ret;
        omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
        omap_serial_init();
        omap_sdrc_init(NULL, NULL);
+       board_nand_init(crane_nand_partitions,
+                       ARRAY_SIZE(crane_nand_partitions), 0,
+                       NAND_BUSWIDTH_16, NULL);
+       am3517_crane_i2c_init();
  
        /* Configure GPIO for EHCI port */
        if (omap_mux_init_gpio(GPIO_USB_NRESET, OMAP_PIN_OUTPUT)) {
@@@ -92,6 -151,6 +151,6 @@@ MACHINE_START(CRANEBOARD, "AM3517/05 CR
        .handle_irq     = omap3_intc_handle_irq,
        .init_machine   = am3517_crane_init,
        .init_late      = am35xx_init_late,
 -      .timer          = &omap3_timer,
 +      .init_time      = omap3_sync32k_timer_init,
        .restart        = omap3xxx_restart,
  MACHINE_END
@@@ -30,7 -30,6 +30,7 @@@
  #include <linux/regulator/fixed.h>
  #include <linux/regulator/machine.h>
  #include <linux/mmc/host.h>
 +#include <linux/usb/phy.h>
  
  #include <linux/spi/spi.h>
  #include <linux/spi/tdo24m.h>
@@@ -419,7 -418,7 +419,7 @@@ static struct omap2_hsmmc_info mmc[] = 
        {}      /* Terminator */
  };
  
 -static struct usbhs_omap_board_data usbhs_bdata __initdata = {
 +static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
        .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
        .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
        .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
@@@ -723,9 -722,8 +723,9 @@@ static void __init cm_t3x_common_init(v
        cm_t35_init_ethernet();
        cm_t35_init_led();
        cm_t35_init_display();
-       omap_twl4030_audio_init("cm-t3x");
+       omap_twl4030_audio_init("cm-t3x", NULL);
  
 +      usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
        usb_musb_init(NULL);
        cm_t35_init_usbh();
        cm_t35_init_camera();
@@@ -753,7 -751,7 +753,7 @@@ MACHINE_START(CM_T35, "Compulab CM-T35"
        .handle_irq     = omap3_intc_handle_irq,
        .init_machine   = cm_t35_init,
        .init_late      = omap35xx_init_late,
 -      .timer          = &omap3_timer,
 +      .init_time      = omap3_sync32k_timer_init,
        .restart        = omap3xxx_restart,
  MACHINE_END
  
@@@ -766,6 -764,6 +766,6 @@@ MACHINE_START(CM_T3730, "Compulab CM-T3
        .handle_irq     = omap3_intc_handle_irq,
        .init_machine   = cm_t3730_init,
        .init_late     = omap3630_init_late,
 -      .timer          = &omap3_timer,
 +      .init_time      = omap3_sync32k_timer_init,
        .restart        = omap3xxx_restart,
  MACHINE_END
@@@ -32,6 -32,7 +32,7 @@@
  #include <linux/mtd/mtd.h>
  #include <linux/mtd/nand.h>
  #include <linux/mtd/partitions.h>
+ #include <linux/mmc/host.h>
  #include <linux/can/platform/ti_hecc.h>
  
  #include <asm/mach-types.h>
@@@ -46,6 -47,7 +47,7 @@@
  
  #include "mux.h"
  #include "control.h"
+ #include "hsmmc.h"
  #include "common-board-devices.h"
  #include "am35xx-emac.h"
  #include "gpmc-nand.h"
@@@ -121,6 -123,26 +123,26 @@@ static void cm_t3517_init_hecc(void
  static inline void cm_t3517_init_hecc(void) {}
  #endif
  
+ #if defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE)
+ static struct omap2_hsmmc_info cm_t3517_mmc[] = {
+       {
+               .mmc            = 1,
+               .caps           = MMC_CAP_4_BIT_DATA,
+               .gpio_cd        = 144,
+               .gpio_wp        = 59,
+       },
+       {
+               .mmc            = 2,
+               .caps           = MMC_CAP_4_BIT_DATA,
+               .gpio_cd        = -EINVAL,
+               .gpio_wp        = -EINVAL,
+       },
+       {}      /* Terminator */
+ };
+ #else
+ #define cm_t3517_mmc NULL
+ #endif
  #if defined(CONFIG_RTC_DRV_V3020) || defined(CONFIG_RTC_DRV_V3020_MODULE)
  #define RTC_IO_GPIO           (153)
  #define RTC_WR_GPIO           (154)
@@@ -166,7 -188,7 +188,7 @@@ static inline void cm_t3517_init_rtc(vo
  #define HSUSB2_RESET_GPIO     (147)
  #define USB_HUB_RESET_GPIO    (152)
  
 -static struct usbhs_omap_board_data cm_t3517_ehci_pdata __initdata = {
 +static struct usbhs_omap_platform_data cm_t3517_ehci_pdata __initdata = {
        .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
        .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
        .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
@@@ -271,6 -293,10 +293,10 @@@ static struct omap_board_mux board_mux[
        /* CM-T3517 USB HUB nRESET */
        OMAP3_MUX(MCBSP4_CLKX, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
  
+       /* CD - GPIO144 and WP - GPIO59 for MMC1 - SB-T35 */
+       OMAP3_MUX(UART2_CTS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP),
+       OMAP3_MUX(GPMC_CLK, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP),
        { .reg_offset = OMAP_MUX_TERMINATOR },
  };
  #endif
@@@ -286,6 -312,7 +312,7 @@@ static void __init cm_t3517_init(void
        cm_t3517_init_usbh();
        cm_t3517_init_hecc();
        am35xx_emac_init(AM35XX_DEFAULT_MDIO_FREQUENCY, 1);
+       omap_hsmmc_init(cm_t3517_mmc);
  }
  
  MACHINE_START(CM_T3517, "Compulab CM-T3517")
        .handle_irq     = omap3_intc_handle_irq,
        .init_machine   = cm_t3517_init,
        .init_late      = am35xx_init_late,
 -      .timer          = &omap3_gp_timer,
 +      .init_time      = omap3_gp_gptimer_timer_init,
        .restart        = omap3xxx_restart,
  MACHINE_END
@@@ -29,7 -29,6 +29,7 @@@
  #include <linux/mtd/partitions.h>
  #include <linux/mtd/nand.h>
  #include <linux/mmc/host.h>
 +#include <linux/usb/phy.h>
  
  #include <linux/regulator/machine.h>
  #include <linux/i2c/twl.h>
@@@ -436,7 -435,7 +436,7 @@@ static struct platform_device *devkit80
        &omap_dm9000_dev,
  };
  
 -static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
 +static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
  
        .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
        .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
@@@ -623,13 -622,12 +623,13 @@@ static void __init devkit8000_init(void
  
        omap_ads7846_init(2, OMAP3_DEVKIT_TS_GPIO, 0, NULL);
  
 +      usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
        usb_musb_init(NULL);
        usbhs_init(&usbhs_bdata);
        board_nand_init(devkit8000_nand_partitions,
                        ARRAY_SIZE(devkit8000_nand_partitions), NAND_CS,
                        NAND_BUSWIDTH_16, NULL);
-       omap_twl4030_audio_init("omap3beagle");
+       omap_twl4030_audio_init("omap3beagle", NULL);
  
        /* Ensure SDRC pins are mux'd for self-refresh */
        omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
@@@ -645,6 -643,6 +645,6 @@@ MACHINE_START(DEVKIT8000, "OMAP3 Devkit
        .handle_irq     = omap3_intc_handle_irq,
        .init_machine   = devkit8000_init,
        .init_late      = omap35xx_init_late,
 -      .timer          = &omap3_secure_timer,
 +      .init_time      = omap3_secure_sync32k_timer_init,
        .restart        = omap3xxx_restart,
  MACHINE_END
@@@ -18,7 -18,6 +18,7 @@@
  #include <linux/gpio.h>
  #include <linux/interrupt.h>
  #include <linux/input.h>
 +#include <linux/usb/phy.h>
  
  #include <linux/regulator/machine.h>
  #include <linux/regulator/fixed.h>
@@@ -301,20 -300,20 +301,20 @@@ static struct omap2_hsmmc_info mmc[] = 
  
  static struct gpio_led igep_gpio_leds[] = {
        [0] = {
-               .name                   = "gpio-led:red:d0",
-               .default_trigger        = "default-off"
+               .name                   = "omap3:red:user0",
+               .default_state          = 0,
        },
        [1] = {
-               .name                   = "gpio-led:green:d0",
-               .default_trigger        = "default-off",
+               .name                   = "omap3:green:boot",
+               .default_state          = 1,
        },
        [2] = {
-               .name                   = "gpio-led:red:d1",
-               .default_trigger        = "default-off",
+               .name                   = "omap3:red:user1",
+               .default_state          = 0,
        },
        [3] = {
-               .name                   = "gpio-led:green:d1",
-               .default_trigger        = "heartbeat",
+               .name                   = "omap3:green:user1",
+               .default_state          = 0,
                .gpio                   = -EINVAL, /* gets replaced */
                .active_low             = 1,
        },
@@@ -527,7 -526,7 +527,7 @@@ static void __init igep_i2c_init(void
        omap3_pmic_init("twl4030", &igep_twldata);
  }
  
 -static const struct usbhs_omap_board_data igep2_usbhs_bdata __initconst = {
 +static struct usbhs_omap_platform_data igep2_usbhs_bdata __initdata = {
        .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
        .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
        .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
        .reset_gpio_port[2] = -EINVAL,
  };
  
 -static const struct usbhs_omap_board_data igep3_usbhs_bdata __initconst = {
 +static struct usbhs_omap_platform_data igep3_usbhs_bdata __initdata = {
        .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
        .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
        .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
@@@ -626,12 -625,11 +626,12 @@@ static void __init igep_init(void
        omap_serial_init();
        omap_sdrc_init(m65kxxxxam_sdrc_params,
                                  m65kxxxxam_sdrc_params);
 +      usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
        usb_musb_init(NULL);
  
        igep_flash_init();
        igep_leds_init();
-       omap_twl4030_audio_init("igep2");
+       omap_twl4030_audio_init("igep2", NULL);
  
        /*
         * WLAN-BT combo module from MuRata which has a Marvell WLAN
@@@ -657,7 -655,7 +657,7 @@@ MACHINE_START(IGEP0020, "IGEP v2 board"
        .handle_irq     = omap3_intc_handle_irq,
        .init_machine   = igep_init,
        .init_late      = omap35xx_init_late,
 -      .timer          = &omap3_timer,
 +      .init_time      = omap3_sync32k_timer_init,
        .restart        = omap3xxx_restart,
  MACHINE_END
  
@@@ -670,6 -668,6 +670,6 @@@ MACHINE_START(IGEP0030, "IGEP OMAP3 mod
        .handle_irq     = omap3_intc_handle_irq,
        .init_machine   = igep_init,
        .init_late      = omap35xx_init_late,
 -      .timer          = &omap3_timer,
 +      .init_time      = omap3_sync32k_timer_init,
        .restart        = omap3xxx_restart,
  MACHINE_END
@@@ -20,6 -20,8 +20,8 @@@
  #include <linux/clk.h>
  #include <linux/io.h>
  #include <linux/leds.h>
+ #include <linux/pwm.h>
+ #include <linux/leds_pwm.h>
  #include <linux/gpio.h>
  #include <linux/input.h>
  #include <linux/gpio_keys.h>
@@@ -30,7 -32,6 +32,7 @@@
  #include <linux/mtd/partitions.h>
  #include <linux/mtd/nand.h>
  #include <linux/mmc/host.h>
 +#include <linux/usb/phy.h>
  
  #include <linux/regulator/machine.h>
  #include <linux/i2c/twl.h>
  
  #define       NAND_CS 0
  
+ static struct pwm_lookup pwm_lookup[] = {
+       /* LEDB -> PMU_STAT */
+       PWM_LOOKUP("twl-pwmled", 1, "leds_pwm", "beagleboard::pmu_stat"),
+ };
+ static struct led_pwm pwm_leds[] = {
+       {
+               .name           = "beagleboard::pmu_stat",
+               .max_brightness = 127,
+               .pwm_period_ns  = 7812500,
+       },
+ };
+ static struct led_pwm_platform_data pwm_data = {
+       .num_leds       = ARRAY_SIZE(pwm_leds),
+       .leds           = pwm_leds,
+ };
+ static struct platform_device leds_pwm = {
+       .name   = "leds_pwm",
+       .id     = -1,
+       .dev    = {
+               .platform_data = &pwm_data,
+       },
+ };
  /*
   * OMAP3 Beagle revision
   * Run time detection of Beagle revision is done by reading GPIO.
@@@ -293,9 -320,6 +321,6 @@@ static int beagle_twl_gpio_setup(struc
        gpio_request_one(gpio + TWL4030_GPIO_MAX, beagle_config.usb_pwr_level,
                        "nEN_USB_PWR");
  
-       /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
-       gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
        return 0;
  }
  
@@@ -377,11 -401,6 +402,6 @@@ static struct gpio_led gpio_leds[] = 
                .default_trigger        = "mmc0",
                .gpio                   = 149,
        },
-       {
-               .name                   = "beagleboard::pmu_stat",
-               .gpio                   = -EINVAL,      /* gets replaced */
-               .active_low             = true,
-       },
  };
  
  static struct gpio_led_platform_data gpio_led_info = {
@@@ -429,9 -448,10 +449,10 @@@ static struct platform_device *omap3_be
        &leds_gpio,
        &keys_gpio,
        &madc_hwmon,
+       &leds_pwm,
  };
  
 -static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
 +static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
  
        .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
        .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
@@@ -495,7 -515,7 +516,7 @@@ static int __init beagle_opp_init(void
        }
        return 0;
  }
 -device_initcall(beagle_opp_init);
 +omap_device_initcall(beagle_opp_init);
  
  static void __init omap3_beagle_init(void)
  {
        omap_sdrc_init(mt46h32m32lf6_sdrc_params,
                                  mt46h32m32lf6_sdrc_params);
  
 +      usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
        usb_musb_init(NULL);
        usbhs_init(&usbhs_bdata);
        board_nand_init(omap3beagle_nand_partitions,
                        ARRAY_SIZE(omap3beagle_nand_partitions), NAND_CS,
                        NAND_BUSWIDTH_16, NULL);
-       omap_twl4030_audio_init("omap3beagle");
+       omap_twl4030_audio_init("omap3beagle", NULL);
  
        /* Ensure msecure is mux'd to be able to set the RTC. */
        omap_mux_init_signal("sys_drm_msecure", OMAP_PIN_OFF_OUTPUT_HIGH);
        /* Ensure SDRC pins are mux'd for self-refresh */
        omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
        omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
+       pwm_add_table(pwm_lookup, ARRAY_SIZE(pwm_lookup));
  }
  
  MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")
        .handle_irq     = omap3_intc_handle_irq,
        .init_machine   = omap3_beagle_init,
        .init_late      = omap3_init_late,
 -      .timer          = &omap3_secure_timer,
 +      .init_time      = omap3_secure_sync32k_timer_init,
        .restart        = omap3xxx_restart,
  MACHINE_END
@@@ -41,7 -41,6 +41,7 @@@
  #include <linux/regulator/machine.h>
  #include <linux/mmc/host.h>
  #include <linux/export.h>
 +#include <linux/usb/phy.h>
  
  #include <asm/mach-types.h>
  #include <asm/mach/arch.h>
@@@ -310,7 -309,7 +310,7 @@@ static struct omap2_hsmmc_info mmc[] = 
                .gpio_wp        = 63,
                .deferred       = true,
        },
 -#ifdef CONFIG_WL12XX_PLATFORM_DATA
 +#ifdef CONFIG_WILINK_PLATFORM_DATA
        {
                .name           = "wl1271",
                .mmc            = 2,
@@@ -451,7 -450,7 +451,7 @@@ static struct regulator_init_data omap3
        .consumer_supplies      = omap3evm_vio_supply,
  };
  
 -#ifdef CONFIG_WL12XX_PLATFORM_DATA
 +#ifdef CONFIG_WILINK_PLATFORM_DATA
  
  #define OMAP3EVM_WLAN_PMENA_GPIO      (150)
  #define OMAP3EVM_WLAN_IRQ_GPIO                (149)
@@@ -539,7 -538,7 +539,7 @@@ static int __init omap3_evm_i2c_init(vo
        return 0;
  }
  
 -static struct usbhs_omap_board_data usbhs_bdata __initdata = {
 +static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
  
        .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
        .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
@@@ -564,7 -563,7 +564,7 @@@ static struct omap_board_mux omap35x_bo
                                OMAP_PIN_OFF_NONE),
        OMAP3_MUX(GPMC_WAIT2, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP |
                                OMAP_PIN_OFF_NONE),
 -#ifdef CONFIG_WL12XX_PLATFORM_DATA
 +#ifdef CONFIG_WILINK_PLATFORM_DATA
        /* WLAN IRQ - GPIO 149 */
        OMAP3_MUX(UART1_RTS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
  
@@@ -602,7 -601,7 +602,7 @@@ static struct omap_board_mux omap36x_bo
        OMAP3_MUX(SYS_BOOT4, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
        OMAP3_MUX(SYS_BOOT5, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
        OMAP3_MUX(SYS_BOOT6, OMAP_MUX_MODE3 | OMAP_PIN_OFF_NONE),
 -#ifdef CONFIG_WL12XX_PLATFORM_DATA
 +#ifdef CONFIG_WILINK_PLATFORM_DATA
        /* WLAN IRQ - GPIO 149 */
        OMAP3_MUX(UART1_RTS, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
  
@@@ -638,7 -637,7 +638,7 @@@ static struct gpio omap3_evm_ehci_gpios
  
  static void __init omap3_evm_wl12xx_init(void)
  {
 -#ifdef CONFIG_WL12XX_PLATFORM_DATA
 +#ifdef CONFIG_WILINK_PLATFORM_DATA
        int ret;
  
        /* WL12xx WLAN Init */
@@@ -735,7 -734,6 +735,7 @@@ static void __init omap3_evm_init(void
                omap_mux_init_gpio(135, OMAP_PIN_OUTPUT);
                usbhs_bdata.reset_gpio_port[1] = 135;
        }
 +      usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
        usb_musb_init(&musb_board_data);
        usbhs_init(&usbhs_bdata);
        board_nand_init(omap3evm_nand_partitions,
        omap3evm_init_smsc911x();
        omap3_evm_display_init();
        omap3_evm_wl12xx_init();
-       omap_twl4030_audio_init("omap3evm");
+       omap_twl4030_audio_init("omap3evm", NULL);
  }
  
  MACHINE_START(OMAP3EVM, "OMAP3 EVM")
        .handle_irq     = omap3_intc_handle_irq,
        .init_machine   = omap3_evm_init,
        .init_late      = omap35xx_init_late,
 -      .timer          = &omap3_timer,
 +      .init_time      = omap3_sync32k_timer_init,
        .restart        = omap3xxx_restart,
  MACHINE_END
@@@ -36,7 -36,6 +36,7 @@@
  #include <linux/mtd/nand.h>
  #include <linux/mtd/partitions.h>
  #include <linux/mmc/host.h>
 +#include <linux/usb/phy.h>
  
  #include <linux/platform_data/mtd-nand-omap2.h>
  #include <linux/platform_data/spi-omap2-mcspi.h>
@@@ -458,7 -457,7 +458,7 @@@ static int __init overo_spi_init(void
        return 0;
  }
  
 -static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
 +static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
        .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
        .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
        .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
@@@ -500,7 -499,6 +500,7 @@@ static void __init overo_init(void
                                  mt46h32m32lf6_sdrc_params);
        board_nand_init(overo_nand_partitions,
                        ARRAY_SIZE(overo_nand_partitions), NAND_CS, 0, NULL);
 +      usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
        usb_musb_init(NULL);
        usbhs_init(&usbhs_bdata);
        overo_spi_init();
        overo_display_init();
        overo_init_led();
        overo_init_keys();
-       omap_twl4030_audio_init("overo");
+       omap_twl4030_audio_init("overo", NULL);
  
        /* Ensure SDRC pins are mux'd for self-refresh */
        omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
@@@ -553,6 -551,6 +553,6 @@@ MACHINE_START(OVERO, "Gumstix Overo"
        .handle_irq     = omap3_intc_handle_irq,
        .init_machine   = overo_init,
        .init_late      = omap35xx_init_late,
 -      .timer          = &omap3_timer,
 +      .init_time      = omap3_sync32k_timer_init,
        .restart        = omap3xxx_restart,
  MACHINE_END
@@@ -42,7 -42,7 +42,7 @@@
  #include <media/si4713.h>
  #include <linux/leds-lp5523.h>
  
 -#include <../drivers/staging/iio/light/tsl2563.h>
 +#include <linux/platform_data/tsl2563.h>
  #include <linux/lis3lv02d.h>
  
  #if defined(CONFIG_IR_RX51) || defined(CONFIG_IR_RX51_MODULE)
@@@ -162,30 -162,39 +162,39 @@@ static struct tsl2563_platform_data rx5
  #if defined(CONFIG_LEDS_LP5523) || defined(CONFIG_LEDS_LP5523_MODULE)
  static struct lp5523_led_config rx51_lp5523_led_config[] = {
        {
+               .name           = "lp5523:kb1",
                .chan_nr        = 0,
                .led_current    = 50,
        }, {
+               .name           = "lp5523:kb2",
                .chan_nr        = 1,
                .led_current    = 50,
        }, {
+               .name           = "lp5523:kb3",
                .chan_nr        = 2,
                .led_current    = 50,
        }, {
+               .name           = "lp5523:kb4",
                .chan_nr        = 3,
                .led_current    = 50,
        }, {
+               .name           = "lp5523:b",
                .chan_nr        = 4,
                .led_current    = 50,
        }, {
+               .name           = "lp5523:g",
                .chan_nr        = 5,
                .led_current    = 50,
        }, {
+               .name           = "lp5523:r",
                .chan_nr        = 6,
                .led_current    = 50,
        }, {
+               .name           = "lp5523:kb5",
                .chan_nr        = 7,
                .led_current    = 50,
        }, {
+               .name           = "lp5523:kb6",
                .chan_nr        = 8,
                .led_current    = 50,
        }
@@@ -1253,6 -1262,16 +1262,16 @@@ static void __init rx51_init_lirc(void
  }
  #endif
  
+ static struct platform_device madc_hwmon = {
+       .name   = "twl4030_madc_hwmon",
+       .id     = -1,
+ };
+ static void __init rx51_init_twl4030_hwmon(void)
+ {
+       platform_device_register(&madc_hwmon);
+ }
  void __init rx51_peripherals_init(void)
  {
        rx51_i2c_init();
                omap_hsmmc_init(mmc);
  
        rx51_charger_init();
+       rx51_init_twl4030_hwmon();
  }
  
@@@ -20,7 -20,7 +20,8 @@@
  #include <linux/wl12xx.h>
  #include <linux/mmc/host.h>
  #include <linux/platform_data/gpio-omap.h>
+ #include <linux/platform_data/omap-twl4030.h>
 +#include <linux/usb/phy.h>
  
  #include <asm/mach-types.h>
  #include <asm/mach/arch.h>
  #include "common-board-devices.h"
  
  #define OMAP_ZOOM_WLAN_PMENA_GPIO     (101)
- #define ZOOM2_HEADSET_EXTMUTE_GPIO    (153)
+ #define OMAP_ZOOM_TSC2004_IRQ_GPIO    (153)
  #define OMAP_ZOOM_WLAN_IRQ_GPIO               (162)
  
- #define LCD_PANEL_ENABLE_GPIO         (7 + OMAP_MAX_GPIO_LINES)
  /* Zoom2 has Qwerty keyboard*/
  static uint32_t board_keymap[] = {
        KEY(0, 0, KEY_E),
@@@ -227,22 -225,31 +226,31 @@@ static struct omap2_hsmmc_info mmc[] = 
        {}      /* Terminator */
  };
  
+ static struct omap_tw4030_pdata omap_twl4030_audio_data = {
+       .voice_connected = true,
+       .custom_routing = true,
+       .has_hs         = OMAP_TWL4030_LEFT | OMAP_TWL4030_RIGHT,
+       .has_hf         = OMAP_TWL4030_LEFT | OMAP_TWL4030_RIGHT,
+       .has_mainmic    = true,
+       .has_submic     = true,
+       .has_hsmic      = true,
+       .has_linein     = OMAP_TWL4030_LEFT | OMAP_TWL4030_RIGHT,
+ };
  static int zoom_twl_gpio_setup(struct device *dev,
                unsigned gpio, unsigned ngpio)
  {
-       int ret;
        /* gpio + 0 is "mmc0_cd" (input/IRQ) */
        mmc[0].gpio_cd = gpio + 0;
        omap_hsmmc_late_init(mmc);
  
-       ret = gpio_request_one(LCD_PANEL_ENABLE_GPIO, GPIOF_OUT_INIT_LOW,
-                              "lcd enable");
-       if (ret)
-               pr_err("Failed to get LCD_PANEL_ENABLE_GPIO (gpio%d).\n",
-                               LCD_PANEL_ENABLE_GPIO);
+       /* Audio setup */
+       omap_twl4030_audio_data.jack_detect = gpio + 2;
+       omap_twl4030_audio_init("Zoom2", &omap_twl4030_audio_data);
  
-       return ret;
+       return 0;
  }
  
  static struct twl4030_gpio_platform_data zoom_gpio_data = {
@@@ -265,14 -272,9 +273,9 @@@ static int __init omap_i2c_init(void
                        TWL_COMMON_PDATA_MADC | TWL_COMMON_PDATA_AUDIO,
                        TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
  
-       if (machine_is_omap_zoom2()) {
-               struct twl4030_codec_data *codec_data;
-               codec_data = zoom_twldata.audio->codec;
+       if (machine_is_omap_zoom2())
+               zoom_twldata.audio->codec->ramp_delay_value = 3; /* 161 ms */
  
-               codec_data->ramp_delay_value = 3;       /* 161 ms */
-               codec_data->hs_extmute = 1;
-               codec_data->hs_extmute_gpio = ZOOM2_HEADSET_EXTMUTE_GPIO;
-       }
        omap_pmic_init(1, 2400, "twl5030", 7 + OMAP_INTC_START, &zoom_twldata);
        omap_register_i2c_bus(2, 400, NULL, 0);
        omap_register_i2c_bus(3, 400, NULL, 0);
@@@ -299,7 -301,6 +302,7 @@@ void __init zoom_peripherals_init(void
        omap_hsmmc_init(mmc);
        omap_i2c_init();
        platform_device_register(&omap_vwlan_device);
 +      usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
        usb_musb_init(NULL);
        enable_board_wakeup_source();
        omap_serial_init();
  #include <linux/module.h>
  #include <linux/interrupt.h>
  #include <linux/platform_device.h>
 +#include <linux/of.h>
 +#include <linux/of_mtd.h>
 +#include <linux/of_device.h>
 +#include <linux/mtd/nand.h>
  
  #include <linux/platform_data/mtd-nand-omap2.h>
  
@@@ -38,8 -34,6 +38,8 @@@
  #include "common.h"
  #include "omap_device.h"
  #include "gpmc.h"
 +#include "gpmc-nand.h"
 +#include "gpmc-onenand.h"
  
  #define       DEVICE_NAME             "omap-gpmc"
  
@@@ -151,8 -145,7 +151,8 @@@ static unsigned gpmc_irq_start
  static struct resource        gpmc_mem_root;
  static struct resource        gpmc_cs_mem[GPMC_CS_NUM];
  static DEFINE_SPINLOCK(gpmc_mem_lock);
 -static unsigned int gpmc_cs_map;      /* flag for cs which are initialized */
 +/* Define chip-selects as reserved by default until probe completes */
 +static unsigned int gpmc_cs_map = ((1 << GPMC_CS_NUM) - 1);
  static struct device *gpmc_dev;
  static int gpmc_irq;
  static resource_size_t phys_base, mem_size;
@@@ -790,9 -783,6 +790,6 @@@ static int gpmc_mem_init(void
         * even if we didn't boot from ROM.
         */
        boot_rom_space = BOOT_ROM_SPACE;
-       /* In apollon the CS0 is mapped as 0x0000 0000 */
-       if (machine_is_omap_apollon())
-               boot_rom_space = 0;
        gpmc_mem_root.start = GPMC_MEM_START + boot_rom_space;
        gpmc_mem_root.end = GPMC_MEM_END;
  
@@@ -1125,215 -1115,8 +1122,215 @@@ int gpmc_calc_timings(struct gpmc_timin
        /* TODO: remove, see function definition */
        gpmc_convert_ps_to_ns(gpmc_t);
  
 +      /* Now the GPMC is initialised, unreserve the chip-selects */
 +      gpmc_cs_map = 0;
 +
 +      return 0;
 +}
 +
 +#ifdef CONFIG_OF
 +static struct of_device_id gpmc_dt_ids[] = {
 +      { .compatible = "ti,omap2420-gpmc" },
 +      { .compatible = "ti,omap2430-gpmc" },
 +      { .compatible = "ti,omap3430-gpmc" },   /* omap3430 & omap3630 */
 +      { .compatible = "ti,omap4430-gpmc" },   /* omap4430 & omap4460 & omap543x */
 +      { .compatible = "ti,am3352-gpmc" },     /* am335x devices */
 +      { }
 +};
 +MODULE_DEVICE_TABLE(of, gpmc_dt_ids);
 +
 +static void __maybe_unused gpmc_read_timings_dt(struct device_node *np,
 +                                              struct gpmc_timings *gpmc_t)
 +{
 +      u32 val;
 +
 +      memset(gpmc_t, 0, sizeof(*gpmc_t));
 +
 +      /* minimum clock period for syncronous mode */
 +      if (!of_property_read_u32(np, "gpmc,sync-clk", &val))
 +              gpmc_t->sync_clk = val;
 +
 +      /* chip select timtings */
 +      if (!of_property_read_u32(np, "gpmc,cs-on", &val))
 +              gpmc_t->cs_on = val;
 +
 +      if (!of_property_read_u32(np, "gpmc,cs-rd-off", &val))
 +              gpmc_t->cs_rd_off = val;
 +
 +      if (!of_property_read_u32(np, "gpmc,cs-wr-off", &val))
 +              gpmc_t->cs_wr_off = val;
 +
 +      /* ADV signal timings */
 +      if (!of_property_read_u32(np, "gpmc,adv-on", &val))
 +              gpmc_t->adv_on = val;
 +
 +      if (!of_property_read_u32(np, "gpmc,adv-rd-off", &val))
 +              gpmc_t->adv_rd_off = val;
 +
 +      if (!of_property_read_u32(np, "gpmc,adv-wr-off", &val))
 +              gpmc_t->adv_wr_off = val;
 +
 +      /* WE signal timings */
 +      if (!of_property_read_u32(np, "gpmc,we-on", &val))
 +              gpmc_t->we_on = val;
 +
 +      if (!of_property_read_u32(np, "gpmc,we-off", &val))
 +              gpmc_t->we_off = val;
 +
 +      /* OE signal timings */
 +      if (!of_property_read_u32(np, "gpmc,oe-on", &val))
 +              gpmc_t->oe_on = val;
 +
 +      if (!of_property_read_u32(np, "gpmc,oe-off", &val))
 +              gpmc_t->oe_off = val;
 +
 +      /* access and cycle timings */
 +      if (!of_property_read_u32(np, "gpmc,page-burst-access", &val))
 +              gpmc_t->page_burst_access = val;
 +
 +      if (!of_property_read_u32(np, "gpmc,access", &val))
 +              gpmc_t->access = val;
 +
 +      if (!of_property_read_u32(np, "gpmc,rd-cycle", &val))
 +              gpmc_t->rd_cycle = val;
 +
 +      if (!of_property_read_u32(np, "gpmc,wr-cycle", &val))
 +              gpmc_t->wr_cycle = val;
 +
 +      /* only for OMAP3430 */
 +      if (!of_property_read_u32(np, "gpmc,wr-access", &val))
 +              gpmc_t->wr_access = val;
 +
 +      if (!of_property_read_u32(np, "gpmc,wr-data-mux-bus", &val))
 +              gpmc_t->wr_data_mux_bus = val;
 +}
 +
 +#ifdef CONFIG_MTD_NAND
 +
 +static const char * const nand_ecc_opts[] = {
 +      [OMAP_ECC_HAMMING_CODE_DEFAULT]         = "sw",
 +      [OMAP_ECC_HAMMING_CODE_HW]              = "hw",
 +      [OMAP_ECC_HAMMING_CODE_HW_ROMCODE]      = "hw-romcode",
 +      [OMAP_ECC_BCH4_CODE_HW]                 = "bch4",
 +      [OMAP_ECC_BCH8_CODE_HW]                 = "bch8",
 +};
 +
 +static int gpmc_probe_nand_child(struct platform_device *pdev,
 +                               struct device_node *child)
 +{
 +      u32 val;
 +      const char *s;
 +      struct gpmc_timings gpmc_t;
 +      struct omap_nand_platform_data *gpmc_nand_data;
 +
 +      if (of_property_read_u32(child, "reg", &val) < 0) {
 +              dev_err(&pdev->dev, "%s has no 'reg' property\n",
 +                      child->full_name);
 +              return -ENODEV;
 +      }
 +
 +      gpmc_nand_data = devm_kzalloc(&pdev->dev, sizeof(*gpmc_nand_data),
 +                                    GFP_KERNEL);
 +      if (!gpmc_nand_data)
 +              return -ENOMEM;
 +
 +      gpmc_nand_data->cs = val;
 +      gpmc_nand_data->of_node = child;
 +
 +      if (!of_property_read_string(child, "ti,nand-ecc-opt", &s))
 +              for (val = 0; val < ARRAY_SIZE(nand_ecc_opts); val++)
 +                      if (!strcasecmp(s, nand_ecc_opts[val])) {
 +                              gpmc_nand_data->ecc_opt = val;
 +                              break;
 +                      }
 +
 +      val = of_get_nand_bus_width(child);
 +      if (val == 16)
 +              gpmc_nand_data->devsize = NAND_BUSWIDTH_16;
 +
 +      gpmc_read_timings_dt(child, &gpmc_t);
 +      gpmc_nand_init(gpmc_nand_data, &gpmc_t);
 +
 +      return 0;
 +}
 +#else
 +static int gpmc_probe_nand_child(struct platform_device *pdev,
 +                               struct device_node *child)
 +{
        return 0;
  }
 +#endif
 +
 +#ifdef CONFIG_MTD_ONENAND
 +static int gpmc_probe_onenand_child(struct platform_device *pdev,
 +                               struct device_node *child)
 +{
 +      u32 val;
 +      struct omap_onenand_platform_data *gpmc_onenand_data;
 +
 +      if (of_property_read_u32(child, "reg", &val) < 0) {
 +              dev_err(&pdev->dev, "%s has no 'reg' property\n",
 +                      child->full_name);
 +              return -ENODEV;
 +      }
 +
 +      gpmc_onenand_data = devm_kzalloc(&pdev->dev, sizeof(*gpmc_onenand_data),
 +                                       GFP_KERNEL);
 +      if (!gpmc_onenand_data)
 +              return -ENOMEM;
 +
 +      gpmc_onenand_data->cs = val;
 +      gpmc_onenand_data->of_node = child;
 +      gpmc_onenand_data->dma_channel = -1;
 +
 +      if (!of_property_read_u32(child, "dma-channel", &val))
 +              gpmc_onenand_data->dma_channel = val;
 +
 +      gpmc_onenand_init(gpmc_onenand_data);
 +
 +      return 0;
 +}
 +#else
 +static int gpmc_probe_onenand_child(struct platform_device *pdev,
 +                                  struct device_node *child)
 +{
 +      return 0;
 +}
 +#endif
 +
 +static int gpmc_probe_dt(struct platform_device *pdev)
 +{
 +      int ret;
 +      struct device_node *child;
 +      const struct of_device_id *of_id =
 +              of_match_device(gpmc_dt_ids, &pdev->dev);
 +
 +      if (!of_id)
 +              return 0;
 +
 +      for_each_node_by_name(child, "nand") {
 +              ret = gpmc_probe_nand_child(pdev, child);
 +              if (ret < 0) {
 +                      of_node_put(child);
 +                      return ret;
 +              }
 +      }
 +
 +      for_each_node_by_name(child, "onenand") {
 +              ret = gpmc_probe_onenand_child(pdev, child);
 +              if (ret < 0) {
 +                      of_node_put(child);
 +                      return ret;
 +              }
 +      }
 +      return 0;
 +}
 +#else
 +static int gpmc_probe_dt(struct platform_device *pdev)
 +{
 +      return 0;
 +}
 +#endif
  
  static int gpmc_probe(struct platform_device *pdev)
  {
        phys_base = res->start;
        mem_size = resource_size(res);
  
 -      gpmc_base = devm_request_and_ioremap(&pdev->dev, res);
 -      if (!gpmc_base) {
 -              dev_err(&pdev->dev, "error: request memory / ioremap\n");
 -              return -EADDRNOTAVAIL;
 -      }
 +      gpmc_base = devm_ioremap_resource(&pdev->dev, res);
 +      if (IS_ERR(gpmc_base))
 +              return PTR_ERR(gpmc_base);
  
        res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
        if (res == NULL)
        if (IS_ERR_VALUE(gpmc_setup_irq()))
                dev_warn(gpmc_dev, "gpmc_setup_irq failed\n");
  
 +      rc = gpmc_probe_dt(pdev);
 +      if (rc < 0) {
 +              clk_disable_unprepare(gpmc_l3_clk);
 +              clk_put(gpmc_l3_clk);
 +              dev_err(gpmc_dev, "failed to probe DT parameters\n");
 +              return rc;
 +      }
 +
        return 0;
  }
  
@@@ -1411,7 -1188,6 +1408,7 @@@ static struct platform_driver gpmc_driv
        .driver         = {
                .name   = DEVICE_NAME,
                .owner  = THIS_MODULE,
 +              .of_match_table = of_match_ptr(gpmc_dt_ids),
        },
  };
  
@@@ -1426,7 -1202,7 +1423,7 @@@ static __exit void gpmc_exit(void
  
  }
  
 -postcore_initcall(gpmc_init);
 +omap_postcore_initcall(gpmc_init);
  module_exit(gpmc_exit);
  
  static int __init omap_gpmc_init(void)
        struct platform_device *pdev;
        char *oh_name = "gpmc";
  
 +      /*
 +       * if the board boots up with a populated DT, do not
 +       * manually add the device from this initcall
 +       */
 +      if (of_have_populated_dt())
 +              return -ENODEV;
 +
        oh = omap_hwmod_lookup(oh_name);
        if (!oh) {
                pr_err("Could not look up %s\n", oh_name);
                return -ENODEV;
        }
  
 -      pdev = omap_device_build(DEVICE_NAME, -1, oh, NULL, 0, NULL, 0, 0);
 +      pdev = omap_device_build(DEVICE_NAME, -1, oh, NULL, 0);
        WARN(IS_ERR(pdev), "could not build omap_device for %s\n", oh_name);
  
        return IS_ERR(pdev) ? PTR_ERR(pdev) : 0;
  }
 -postcore_initcall(omap_gpmc_init);
 +omap_postcore_initcall(omap_gpmc_init);
  
  static irqreturn_t gpmc_handle_irq(int irq, void *dev)
  {
@@@ -23,7 -23,6 +23,7 @@@
  #include <linux/i2c.h>
  #include <linux/i2c/twl.h>
  #include <linux/gpio.h>
 +#include <linux/string.h>
  #include <linux/regulator/machine.h>
  #include <linux/regulator/fixed.h>
  
@@@ -57,7 -56,7 +57,7 @@@ void __init omap_pmic_init(int bus, u3
                           struct twl4030_platform_data *pmic_data)
  {
        omap_mux_init_signal("sys_nirq", OMAP_PIN_INPUT_PULLUP | OMAP_PIN_OFF_WAKEUPENABLE);
 -      strncpy(pmic_i2c_board_info.type, pmic_type,
 +      strlcpy(pmic_i2c_board_info.type, pmic_type,
                sizeof(pmic_i2c_board_info.type));
        pmic_i2c_board_info.irq = pmic_irq;
        pmic_i2c_board_info.platform_data = pmic_data;
@@@ -529,24 -528,29 +529,29 @@@ void __init omap4_pmic_get_config(struc
        defined(CONFIG_SND_OMAP_SOC_OMAP_TWL4030_MODULE)
  #include <linux/platform_data/omap-twl4030.h>
  
+ /* Commonly used configuration */
  static struct omap_tw4030_pdata omap_twl4030_audio_data;
  
  static struct platform_device audio_device = {
        .name           = "omap-twl4030",
        .id             = -1,
-       .dev = {
-               .platform_data = &omap_twl4030_audio_data,
-       },
  };
  
- void __init omap_twl4030_audio_init(char *card_name)
+ void omap_twl4030_audio_init(char *card_name,
+                                   struct omap_tw4030_pdata *pdata)
  {
-       omap_twl4030_audio_data.card_name = card_name;
+       if (!pdata)
+               pdata = &omap_twl4030_audio_data;
+       pdata->card_name = card_name;
+       audio_device.dev.platform_data = pdata;
        platform_device_register(&audio_device);
  }
  
  #else /* SOC_OMAP_TWL4030 */
- void __init omap_twl4030_audio_init(char *card_name)
+ void omap_twl4030_audio_init(char *card_name,
+                                   struct omap_tw4030_pdata *pdata)
  {
        return;
  }
@@@ -98,6 -98,9 +98,6 @@@ static unsigned long treo_pin_config[] 
        GPIO96_KP_MKOUT_6,
        GPIO93_KP_DKIN_0 | WAKEUP_ON_LEVEL_HIGH,        /* Hotsync button */
  
 -      /* LCD */
 -      GPIOxx_LCD_TFT_16BPP,
 -
        /* Quick Capture Interface */
        GPIO84_CIF_FV,
        GPIO85_CIF_LV,
@@@ -137,12 -140,6 +137,12 @@@ static unsigned long treo680_pin_config
        /* MATRIX KEYPAD - different wake up source */
        GPIO100_KP_MKIN_0 | WAKEUP_ON_LEVEL_HIGH,
        GPIO99_KP_MKIN_5,
 +
 +      /* LCD... L_BIAS alt fn not configured on Treo680; is GPIO instead */
 +      GPIOxx_LCD_16BPP,
 +      GPIO74_LCD_FCLK,
 +      GPIO75_LCD_LCLK,
 +      GPIO76_LCD_PCLK,
  };
  #endif /* CONFIG_MACH_TREO680 */
  
@@@ -158,16 -155,13 +158,16 @@@ static unsigned long centro685_pin_conf
        /* MATRIX KEYPAD - different wake up source */
        GPIO100_KP_MKIN_0,
        GPIO99_KP_MKIN_5 | WAKEUP_ON_LEVEL_HIGH,
 +
 +      /* LCD */
 +      GPIOxx_LCD_TFT_16BPP,
  };
  #endif /* CONFIG_MACH_CENTRO */
  
  /******************************************************************************
   * GPIO keyboard
   ******************************************************************************/
- #if defined(CONFIG_KEYBOARD_PXA27x) || defined(CONFIG_KEYBOARD_PXA27x_MODULE)
+ #if IS_ENABLED(CONFIG_KEYBOARD_PXA27x)
  static unsigned int treo680_matrix_keys[] = {
        KEY(0, 0, KEY_F8),              /* Red/Off/Power */
        KEY(0, 1, KEY_LEFT),
@@@ -315,7 -309,7 +315,7 @@@ static inline void palmtreo_kpc_init(vo
  /******************************************************************************
   * USB host
   ******************************************************************************/
- #if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
+ #if IS_ENABLED(CONFIG_USB_OHCI_HCD)
  static struct pxaohci_platform_data treo680_ohci_info = {
        .port_mode    = PMM_PERPORT_MODE,
        .flags        = ENABLE_PORT1 | ENABLE_PORT3,
@@@ -334,6 -328,7 +334,6 @@@ static inline void palmtreo_uhc_init(vo
  /******************************************************************************
   * Vibra and LEDs
   ******************************************************************************/
 -#ifdef CONFIG_MACH_TREO680
  static struct gpio_led treo680_gpio_leds[] = {
        {
                .name                   = "treo680:vibra:vibra",
@@@ -384,19 -379,53 +384,49 @@@ static struct gpio_led_platform_data ce
  static struct platform_device palmtreo_leds = {
        .name   = "leds-gpio",
        .id     = -1,
 -      .dev    = {
 -              .platform_data  = &treo680_gpio_led_info,
 -      }
  };
  
  static void __init palmtreo_leds_init(void)
  {
        if (machine_is_centro())
                palmtreo_leds.dev.platform_data = &centro_gpio_led_info;
 +      else if (machine_is_treo680())
 +              palmtreo_leds.dev.platform_data = &treo680_gpio_led_info;
  
        platform_device_register(&palmtreo_leds);
  }
 -#else
 -static inline void palmtreo_leds_init(void) {}
 -#endif
  
  /******************************************************************************
+  * diskonchip docg4 flash
+  ******************************************************************************/
+ #if defined(CONFIG_MACH_TREO680)
+ /* REVISIT: does the centro have this device also? */
+ #if IS_ENABLED(CONFIG_MTD_NAND_DOCG4)
+ static struct resource docg4_resources[] = {
+       {
+               .start  = 0x00000000,
+               .end    = 0x00001FFF,
+               .flags  = IORESOURCE_MEM,
+       },
+ };
+ static struct platform_device treo680_docg4_flash = {
+       .name   = "docg4",
+       .id     = -1,
+       .resource = docg4_resources,
+       .num_resources = ARRAY_SIZE(docg4_resources),
+ };
+ static void __init treo680_docg4_flash_init(void)
+ {
+       platform_device_register(&treo680_docg4_flash);
+ }
+ #else
+ static inline void treo680_docg4_flash_init(void) {}
+ #endif
+ #endif
+ /******************************************************************************
   * Machine init
   ******************************************************************************/
  static void __init treo_reserve(void)
@@@ -425,61 -454,13 +455,62 @@@ static void __init palmphone_common_ini
  }
  
  #ifdef CONFIG_MACH_TREO680
 +void __init treo680_gpio_init(void)
 +{
 +      unsigned int gpio;
 +
 +      /* drive all three lcd gpios high initially */
 +      const unsigned long lcd_flags = GPIOF_INIT_HIGH | GPIOF_DIR_OUT;
 +
 +      /*
 +       * LCD GPIO initialization...
 +       */
 +
 +      /*
 +       * This is likely the power to the lcd.  Toggling it low/high appears to
 +       * turn the lcd off/on.  Can be toggled after lcd is initialized without
 +       * any apparent adverse effects to the lcd operation.  Note that this
 +       * gpio line is used by the lcd controller as the L_BIAS signal, but
 +       * treo680 configures it as gpio.
 +       */
 +      gpio = GPIO_NR_TREO680_LCD_POWER;
 +      if (gpio_request_one(gpio, lcd_flags, "LCD power") < 0)
 +              goto fail;
 +
 +      /*
 +       * These two are called "enables", for lack of a better understanding.
 +       * If either of these are toggled after the lcd is initialized, the
 +       * image becomes degraded.  N.B. The IPL shipped with the treo
 +       * configures GPIO_NR_TREO680_LCD_EN_N as output and drives it high.  If
 +       * the IPL is ever reprogrammed, this initialization may be need to be
 +       * revisited.
 +       */
 +      gpio = GPIO_NR_TREO680_LCD_EN;
 +      if (gpio_request_one(gpio, lcd_flags, "LCD enable") < 0)
 +              goto fail;
 +      gpio = GPIO_NR_TREO680_LCD_EN_N;
 +      if (gpio_request_one(gpio, lcd_flags, "LCD enable_n") < 0)
 +              goto fail;
 +
 +      /* driving this low turns LCD on */
 +      gpio_set_value(GPIO_NR_TREO680_LCD_EN_N, 0);
 +
 +      return;
 + fail:
 +      pr_err("gpio %d initialization failed\n", gpio);
 +      gpio_free(GPIO_NR_TREO680_LCD_POWER);
 +      gpio_free(GPIO_NR_TREO680_LCD_EN);
 +      gpio_free(GPIO_NR_TREO680_LCD_EN_N);
 +}
 +
  static void __init treo680_init(void)
  {
        pxa2xx_mfp_config(ARRAY_AND_SIZE(treo680_pin_config));
        palmphone_common_init();
 +      treo680_gpio_init();
        palm27x_mmc_init(GPIO_NR_TREO_SD_DETECT_N, GPIO_NR_TREO680_SD_READONLY,
                        GPIO_NR_TREO680_SD_POWER, 0);
+       treo680_docg4_flash_init();
  }
  #endif
  
@@@ -501,7 -482,7 +532,7 @@@ MACHINE_START(TREO680, "Palm Treo 680"
        .nr_irqs        = PXA_NR_IRQS,
        .init_irq       = pxa27x_init_irq,
        .handle_irq       = pxa27x_handle_irq,
 -      .timer          = &pxa_timer,
 +      .init_time      = pxa_timer_init,
        .init_machine   = treo680_init,
        .restart        = pxa_restart,
  MACHINE_END
@@@ -515,7 -496,7 +546,7 @@@ MACHINE_START(CENTRO, "Palm Centro 685"
        .nr_irqs        = PXA_NR_IRQS,
        .init_irq       = pxa27x_init_irq,
        .handle_irq       = pxa27x_handle_irq,
 -      .timer          = &pxa_timer,
 +      .init_time      = pxa_timer_init,
        .init_machine   = centro_init,
        .restart        = pxa_restart,
  MACHINE_END
@@@ -53,25 -53,17 +53,25 @@@ static unsigned long ac97_reset_config[
        GPIO95_AC97_nRESET,
  };
  
 -void pxa27x_assert_ac97reset(int reset_gpio, int on)
 +void pxa27x_configure_ac97reset(int reset_gpio, bool to_gpio)
  {
 +      /*
 +       * This helper function is used to work around a bug in the pxa27x's
 +       * ac97 controller during a warm reset.  The configuration of the
 +       * reset_gpio is changed as follows:
 +       * to_gpio == true: configured to generic output gpio and driven high
 +       * to_gpio == false: configured to ac97 controller alt fn AC97_nRESET
 +       */
 +
        if (reset_gpio == 113)
 -              pxa2xx_mfp_config(on ? &ac97_reset_config[0] :
 -                                     &ac97_reset_config[1], 1);
 +              pxa2xx_mfp_config(to_gpio ? &ac97_reset_config[0] :
 +                                &ac97_reset_config[1], 1);
  
        if (reset_gpio == 95)
 -              pxa2xx_mfp_config(on ? &ac97_reset_config[2] :
 -                                     &ac97_reset_config[3], 1);
 +              pxa2xx_mfp_config(to_gpio ? &ac97_reset_config[2] :
 +                                &ac97_reset_config[3], 1);
  }
 -EXPORT_SYMBOL_GPL(pxa27x_assert_ac97reset);
 +EXPORT_SYMBOL_GPL(pxa27x_configure_ac97reset);
  
  /* Crystal clock: 13MHz */
  #define BASE_CLK      13000000
@@@ -238,6 -230,7 +238,7 @@@ static struct clk_lookup pxa27x_clkregs
        INIT_CLKREG(&clk_pxa27x_memc, NULL, "MEMCLK"),
        INIT_CLKREG(&clk_pxa27x_mem, "pxa2xx-pcmcia", NULL),
        INIT_CLKREG(&clk_dummy, "pxa-gpio", NULL),
+       INIT_CLKREG(&clk_dummy, "sa1100-rtc", NULL),
  };
  
  #ifdef CONFIG_PM
@@@ -40,7 -40,6 +40,7 @@@
  #include <linux/mmc/sh_mobile_sdhi.h>
  #include <linux/mfd/tmio.h>
  #include <linux/sh_clk.h>
 +#include <linux/irqchip/arm-gic.h>
  #include <video/sh_mobile_lcdc.h>
  #include <video/sh_mipi_dsi.h>
  #include <sound/sh_fsi.h>
@@@ -50,6 -49,7 +50,6 @@@
  #include <mach/common.h>
  #include <asm/mach-types.h>
  #include <asm/mach/arch.h>
 -#include <asm/hardware/gic.h>
  #include <asm/hardware/cache-l2x0.h>
  #include <asm/traps.h>
  
@@@ -479,11 -479,10 +479,10 @@@ static void ag5evm_sdhi1_set_pwr(struc
        static int power_gpio = -EINVAL;
  
        if (power_gpio < 0) {
-               int ret = gpio_request(GPIO_PORT114, "sdhi1_power");
-               if (!ret) {
+               int ret = gpio_request_one(GPIO_PORT114, GPIOF_OUT_INIT_LOW,
+                                          "sdhi1_power");
+               if (!ret)
                        power_gpio = GPIO_PORT114;
-                       gpio_direction_output(power_gpio, 0);
-               }
        }
  
        /*
@@@ -604,14 -603,11 +603,11 @@@ static void __init ag5evm_init(void
        gpio_request(GPIO_FN_MMCD0_5_PU, NULL);
        gpio_request(GPIO_FN_MMCD0_6_PU, NULL);
        gpio_request(GPIO_FN_MMCD0_7_PU, NULL);
-       gpio_request(GPIO_PORT208, NULL); /* Reset */
-       gpio_direction_output(GPIO_PORT208, 1);
+       gpio_request_one(GPIO_PORT208, GPIOF_OUT_INIT_HIGH, NULL); /* Reset */
  
        /* enable SMSC911X */
-       gpio_request(GPIO_PORT144, NULL); /* PINTA2 */
-       gpio_direction_input(GPIO_PORT144);
-       gpio_request(GPIO_PORT145, NULL); /* RESET */
-       gpio_direction_output(GPIO_PORT145, 1);
+       gpio_request_one(GPIO_PORT144, GPIOF_IN, NULL); /* PINTA2 */
+       gpio_request_one(GPIO_PORT145, GPIOF_OUT_INIT_HIGH, NULL); /* RESET */
  
        /* FSI A */
        gpio_request(GPIO_FN_FSIACK, NULL);
        gpio_request(GPIO_FN_PORT243_IRDA_FIRSEL, NULL);
  
        /* LCD panel */
-       gpio_request(GPIO_PORT217, NULL); /* RESET */
-       gpio_direction_output(GPIO_PORT217, 0);
+       gpio_request_one(GPIO_PORT217, GPIOF_OUT_INIT_LOW, NULL); /* RESET */
        mdelay(1);
        gpio_set_value(GPIO_PORT217, 1);
        mdelay(100);
  
        /* LCD backlight controller */
-       gpio_request(GPIO_PORT235, NULL); /* RESET */
-       gpio_direction_output(GPIO_PORT235, 0);
+       gpio_request_one(GPIO_PORT235, GPIOF_OUT_INIT_LOW, NULL); /* RESET */
        lcd_backlight_set_brightness(0);
  
        /* enable SDHI0 on CN15 [SD I/F] */
@@@ -668,7 -662,8 +662,7 @@@ MACHINE_START(AG5EVM, "ag5evm"
        .init_early     = sh73a0_add_early_devices,
        .nr_irqs        = NR_IRQS_LEGACY,
        .init_irq       = sh73a0_init_irq,
 -      .handle_irq     = gic_handle_irq,
        .init_machine   = ag5evm_init,
        .init_late      = shmobile_init_late,
 -      .timer          = &shmobile_timer,
 +      .init_time      = sh73a0_earlytimer_init,
  MACHINE_END
   *
   * SW41       :  ON : SH-Mobile AP4 Audio Mode
   *    : OFF : Bluetooth Audio Mode
+  *
+  * it needs amixer settings for playing
+  *
+  * amixer set "Headphone Enable" on
   */
  
  /*
@@@ -657,8 -661,14 +661,8 @@@ static struct platform_device lcdc_devi
  /* FSI */
  #define IRQ_FSI               evt2irq(0x1840)
  static struct sh_fsi_platform_info fsi_info = {
 -      .port_a = {
 -              .flags          = SH_FSI_BRS_INV,
 -      },
        .port_b = {
 -              .flags          = SH_FSI_BRS_INV |
 -                                SH_FSI_BRM_INV |
 -                                SH_FSI_LRS_INV |
 -                                SH_FSI_CLK_CPG |
 +              .flags          = SH_FSI_CLK_CPG |
                                  SH_FSI_FMT_SPDIF,
        },
  };
@@@ -686,21 -696,21 +690,21 @@@ static struct platform_device fsi_devic
        },
  };
  
 -static struct asoc_simple_dai_init_info fsi2_ak4643_init_info = {
 -      .fmt            = SND_SOC_DAIFMT_LEFT_J,
 -      .codec_daifmt   = SND_SOC_DAIFMT_CBM_CFM,
 -      .cpu_daifmt     = SND_SOC_DAIFMT_CBS_CFS,
 -      .sysclk         = 11289600,
 -};
 -
  static struct asoc_simple_card_info fsi2_ak4643_info = {
        .name           = "AK4643",
        .card           = "FSI2A-AK4643",
 -      .cpu_dai        = "fsia-dai",
        .codec          = "ak4642-codec.0-0013",
        .platform       = "sh_fsi2",
 -      .codec_dai      = "ak4642-hifi",
 -      .init           = &fsi2_ak4643_init_info,
 +      .daifmt         = SND_SOC_DAIFMT_LEFT_J,
 +      .cpu_dai = {
 +              .name   = "fsia-dai",
 +              .fmt    = SND_SOC_DAIFMT_CBS_CFS,
 +      },
 +      .codec_dai = {
 +              .name   = "ak4642-hifi",
 +              .fmt    = SND_SOC_DAIFMT_CBM_CFM,
 +              .sysclk = 11289600,
 +      },
  };
  
  static struct platform_device fsi_ak4643_device = {
@@@ -809,18 -819,18 +813,18 @@@ static struct platform_device lcdc1_dev
        },
  };
  
 -static struct asoc_simple_dai_init_info fsi2_hdmi_init_info = {
 -      .cpu_daifmt     = SND_SOC_DAIFMT_CBM_CFM,
 -};
 -
  static struct asoc_simple_card_info fsi2_hdmi_info = {
        .name           = "HDMI",
        .card           = "FSI2B-HDMI",
 -      .cpu_dai        = "fsib-dai",
        .codec          = "sh-mobile-hdmi",
        .platform       = "sh_fsi2",
 -      .codec_dai      = "sh_mobile_hdmi-hifi",
 -      .init           = &fsi2_hdmi_init_info,
 +      .cpu_dai = {
 +              .name   = "fsib-dai",
 +              .fmt    = SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_IB_NF,
 +      },
 +      .codec_dai = {
 +              .name   = "sh_mobile_hdmi-hifi",
 +      },
  };
  
  static struct platform_device fsi_hdmi_device = {
@@@ -1036,9 -1046,7 +1040,7 @@@ static int ts_get_pendown_state(void
  
        gpio_free(GPIO_TSC_IRQ);
  
-       gpio_request(GPIO_TSC_PORT, NULL);
-       gpio_direction_input(GPIO_TSC_PORT);
+       gpio_request_one(GPIO_TSC_PORT, GPIOF_IN, NULL);
  
        val = gpio_get_value(GPIO_TSC_PORT);
  
@@@ -1119,18 -1127,10 +1121,10 @@@ static void __init ap4evb_init(void
        gpio_request(GPIO_FN_IRQ6_39,   NULL);
  
        /* enable Debug switch (S6) */
-       gpio_request(GPIO_PORT32, NULL);
-       gpio_request(GPIO_PORT33, NULL);
-       gpio_request(GPIO_PORT34, NULL);
-       gpio_request(GPIO_PORT35, NULL);
-       gpio_direction_input(GPIO_PORT32);
-       gpio_direction_input(GPIO_PORT33);
-       gpio_direction_input(GPIO_PORT34);
-       gpio_direction_input(GPIO_PORT35);
-       gpio_export(GPIO_PORT32, 0);
-       gpio_export(GPIO_PORT33, 0);
-       gpio_export(GPIO_PORT34, 0);
-       gpio_export(GPIO_PORT35, 0);
+       gpio_request_one(GPIO_PORT32, GPIOF_IN | GPIOF_EXPORT, NULL);
+       gpio_request_one(GPIO_PORT33, GPIOF_IN | GPIOF_EXPORT, NULL);
+       gpio_request_one(GPIO_PORT34, GPIOF_IN | GPIOF_EXPORT, NULL);
+       gpio_request_one(GPIO_PORT35, GPIOF_IN | GPIOF_EXPORT, NULL);
  
        /* SDHI0 */
        gpio_request(GPIO_FN_SDHICD0, NULL);
        gpio_request(GPIO_FN_FSIAILR,   NULL);
        gpio_request(GPIO_FN_FSIAISLD,  NULL);
        gpio_request(GPIO_FN_FSIAOSLD,  NULL);
-       gpio_request(GPIO_PORT161,      NULL);
-       gpio_direction_output(GPIO_PORT161, 0); /* slave */
+       gpio_request_one(GPIO_PORT161, GPIOF_OUT_INIT_LOW, NULL); /* slave */
  
        gpio_request(GPIO_PORT9, NULL);
        gpio_request(GPIO_PORT10, NULL);
        gpio_direction_none(GPIO_PORT10CR); /* FSIAOLR needs no direction */
  
        /* card detect pin for MMC slot (CN7) */
-       gpio_request(GPIO_PORT41, NULL);
-       gpio_direction_input(GPIO_PORT41);
+       gpio_request_one(GPIO_PORT41, GPIOF_IN, NULL);
  
        /* setup FSI2 port B (HDMI) */
        gpio_request(GPIO_FN_FSIBCK, NULL);
        gpio_request(GPIO_FN_LCDDISP,  NULL);
        gpio_request(GPIO_FN_LCDDCK,   NULL);
  
-       gpio_request(GPIO_PORT189, NULL); /* backlight */
-       gpio_direction_output(GPIO_PORT189, 1);
-       gpio_request(GPIO_PORT151, NULL); /* LCDDON */
-       gpio_direction_output(GPIO_PORT151, 1);
+       gpio_request_one(GPIO_PORT189, GPIOF_OUT_INIT_HIGH, NULL); /* backlight */
+       gpio_request_one(GPIO_PORT151, GPIOF_OUT_INIT_HIGH, NULL); /* LCDDON */
  
        lcdc_info.clock_source                  = LCDC_CLK_BUS;
        lcdc_info.ch[0].interface_type          = RGB18;
@@@ -1344,5 -1339,5 +1333,5 @@@ MACHINE_START(AP4EVB, "ap4evb"
        .handle_irq     = shmobile_handle_irq_intc,
        .init_machine   = ap4evb_init,
        .init_late      = sh7372_pm_init_late,
 -      .timer          = &shmobile_timer,
 +      .init_time      = sh7372_earlytimer_init,
  MACHINE_END
   * this command is required when playback.
   *
   * # amixer set "Headphone" 50
+  *
+  * this command is required when capture.
+  *
+  * # amixer set "Input PGA" 15
+  * # amixer set "Left Input Mixer MicP" on
+  * # amixer set "Left Input Mixer MicN" on
+  * # amixer set "Right Input Mixer MicN" on
+  * # amixer set "Right Input Mixer MicP" on
   */
  
  /*
@@@ -700,9 -708,9 +708,9 @@@ static int mt9t111_power(struct device 
                /* video1 (= CON1 camera) expect 24MHz */
                clk_set_rate(mclk, clk_round_rate(mclk, 24000000));
                clk_enable(mclk);
-               gpio_direction_output(GPIO_PORT158, 1);
+               gpio_set_value(GPIO_PORT158, 1);
        } else {
-               gpio_direction_output(GPIO_PORT158, 0);
+               gpio_set_value(GPIO_PORT158, 0);
                clk_disable(mclk);
        }
  
@@@ -806,21 -814,21 +814,21 @@@ static struct platform_device fsi_devic
  };
  
  /* FSI-WM8978 */
 -static struct asoc_simple_dai_init_info fsi_wm8978_init_info = {
 -      .fmt            = SND_SOC_DAIFMT_I2S,
 -      .codec_daifmt   = SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_NB_NF,
 -      .cpu_daifmt     = SND_SOC_DAIFMT_CBS_CFS,
 -      .sysclk         = 12288000,
 -};
 -
  static struct asoc_simple_card_info fsi_wm8978_info = {
        .name           = "wm8978",
        .card           = "FSI2A-WM8978",
 -      .cpu_dai        = "fsia-dai",
        .codec          = "wm8978.0-001a",
        .platform       = "sh_fsi2",
 -      .codec_dai      = "wm8978-hifi",
 -      .init           = &fsi_wm8978_init_info,
 +      .daifmt         = SND_SOC_DAIFMT_I2S,
 +      .cpu_dai = {
 +              .name   = "fsia-dai",
 +              .fmt    = SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_IB_NF,
 +      },
 +      .codec_dai = {
 +              .name   = "wm8978-hifi",
 +              .fmt    = SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_NB_NF,
 +              .sysclk = 12288000,
 +      },
  };
  
  static struct platform_device fsi_wm8978_device = {
  };
  
  /* FSI-HDMI */
 -static struct asoc_simple_dai_init_info fsi2_hdmi_init_info = {
 -      .cpu_daifmt     = SND_SOC_DAIFMT_CBM_CFM,
 -};
 -
  static struct asoc_simple_card_info fsi2_hdmi_info = {
        .name           = "HDMI",
        .card           = "FSI2B-HDMI",
 -      .cpu_dai        = "fsib-dai",
        .codec          = "sh-mobile-hdmi",
        .platform       = "sh_fsi2",
 -      .codec_dai      = "sh_mobile_hdmi-hifi",
 -      .init           = &fsi2_hdmi_init_info,
 +      .cpu_dai = {
 +              .name   = "fsib-dai",
 +              .fmt    = SND_SOC_DAIFMT_CBM_CFM,
 +      },
 +      .codec_dai = {
 +              .name = "sh_mobile_hdmi-hifi",
 +      },
  };
  
  static struct platform_device fsi_hdmi_device = {
@@@ -992,16 -1000,12 +1000,12 @@@ static void __init eva_init(void
        gpio_request(GPIO_FN_LCD0_DISP,         NULL);
        gpio_request(GPIO_FN_LCD0_LCLK_PORT165, NULL);
  
-       gpio_request(GPIO_PORT61, NULL); /* LCDDON */
-       gpio_direction_output(GPIO_PORT61, 1);
-       gpio_request(GPIO_PORT202, NULL); /* LCD0_LED_CONT */
-       gpio_direction_output(GPIO_PORT202, 0);
+       gpio_request_one(GPIO_PORT61, GPIOF_OUT_INIT_HIGH, NULL); /* LCDDON */
+       gpio_request_one(GPIO_PORT202, GPIOF_OUT_INIT_LOW, NULL); /* LCD0_LED_CONT */
  
        /* Touchscreen */
        gpio_request(GPIO_FN_IRQ10,     NULL); /* TP_INT */
-       gpio_request(GPIO_PORT166,      NULL); /* TP_RST_B */
-       gpio_direction_output(GPIO_PORT166, 1);
+       gpio_request_one(GPIO_PORT166, GPIOF_OUT_INIT_HIGH, NULL); /* TP_RST_B */
  
        /* GETHER */
        gpio_request(GPIO_FN_ET_CRS,            NULL);
        gpio_request(GPIO_FN_ET_RX_DV,          NULL);
        gpio_request(GPIO_FN_ET_RX_CLK,         NULL);
  
-       gpio_request(GPIO_PORT18, NULL); /* PHY_RST */
-       gpio_direction_output(GPIO_PORT18, 1);
+       gpio_request_one(GPIO_PORT18, GPIOF_OUT_INIT_HIGH, NULL); /* PHY_RST */
  
        /* USB */
-       gpio_request(GPIO_PORT159, NULL); /* USB_DEVICE_MODE */
-       gpio_direction_input(GPIO_PORT159);
+       gpio_request_one(GPIO_PORT159, GPIOF_IN, NULL); /* USB_DEVICE_MODE */
  
        if (gpio_get_value(GPIO_PORT159)) {
                /* USB Host */
                 * and select GPIO_PORT209 here
                 */
                gpio_request(GPIO_FN_IRQ7_PORT209, NULL);
-               gpio_request(GPIO_PORT209, NULL);
-               gpio_direction_input(GPIO_PORT209);
+               gpio_request_one(GPIO_PORT209, GPIOF_IN, NULL);
  
                platform_device_register(&usbhsf_device);
                usb = &usbhsf_device;
        gpio_request(GPIO_FN_SDHI0_D3, NULL);
        gpio_request(GPIO_FN_SDHI0_WP, NULL);
  
-       gpio_request(GPIO_PORT17, NULL);        /* SDHI0_18/33_B */
-       gpio_request(GPIO_PORT74, NULL);        /* SDHI0_PON */
-       gpio_request(GPIO_PORT75, NULL);        /* SDSLOT1_PON */
-       gpio_direction_output(GPIO_PORT17, 0);
-       gpio_direction_output(GPIO_PORT74, 1);
-       gpio_direction_output(GPIO_PORT75, 1);
+       gpio_request_one(GPIO_PORT17, GPIOF_OUT_INIT_LOW, NULL);  /* SDHI0_18/33_B */
+       gpio_request_one(GPIO_PORT74, GPIOF_OUT_INIT_HIGH, NULL); /* SDHI0_PON */
+       gpio_request_one(GPIO_PORT75, GPIOF_OUT_INIT_HIGH, NULL); /* SDSLOT1_PON */
  
        /* we can use GPIO_FN_IRQ31_PORT167 here for SDHI0 CD irq */
  
        gpio_request(GPIO_FN_VIO_CKO,           NULL);
  
        /* CON1/CON15 Camera */
-       gpio_request(GPIO_PORT173, NULL); /* STANDBY */
-       gpio_request(GPIO_PORT172, NULL); /* RST */
-       gpio_request(GPIO_PORT158, NULL); /* CAM_PON */
-       gpio_direction_output(GPIO_PORT173, 0);
-       gpio_direction_output(GPIO_PORT172, 1);
-       gpio_direction_output(GPIO_PORT158, 0); /* see mt9t111_power() */
+       gpio_request_one(GPIO_PORT173, GPIOF_OUT_INIT_LOW, NULL);  /* STANDBY */
+       gpio_request_one(GPIO_PORT172, GPIOF_OUT_INIT_HIGH, NULL); /* RST */
+       /* see mt9t111_power() */
+       gpio_request_one(GPIO_PORT158, GPIOF_OUT_INIT_LOW, NULL);  /* CAM_PON */
  
        /* FSI-WM8978 */
        gpio_request(GPIO_FN_FSIAIBT,           NULL);
         * DBGMD/LCDC0/FSIA MUX
         * DBGMD_SELECT_B should be set after setting PFC Function.
         */
-       gpio_request(GPIO_PORT176, NULL);
-       gpio_direction_output(GPIO_PORT176, 1);
+       gpio_request_one(GPIO_PORT176, GPIOF_OUT_INIT_HIGH, NULL);
  
        /*
         * We can switch CON8/CON14 by SW1.5,
         * but it needs after DBGMD_SELECT_B
         */
-       gpio_request(GPIO_PORT6, NULL);
-       gpio_direction_input(GPIO_PORT6);
+       gpio_request_one(GPIO_PORT6, GPIOF_IN, NULL);
        if (gpio_get_value(GPIO_PORT6)) {
                /* CON14 enable */
        } else {
                gpio_request(GPIO_FN_SDHI1_CD,  NULL);
                gpio_request(GPIO_FN_SDHI1_WP,  NULL);
  
-               gpio_request(GPIO_PORT16, NULL); /* SDSLOT2_PON */
-               gpio_direction_output(GPIO_PORT16, 1);
+               /* SDSLOT2_PON */
+               gpio_request_one(GPIO_PORT16, GPIOF_OUT_INIT_HIGH, NULL);
  
                platform_device_register(&sdhi1_device);
        }
        platform_add_devices(eva_devices,
                             ARRAY_SIZE(eva_devices));
  
-       eva_clock_init();
        rmobile_add_device_to_domain("A4LC", &lcdc0_device);
        rmobile_add_device_to_domain("A4LC", &hdmi_lcdc_device);
        if (usb)
                rmobile_add_device_to_domain("A3SP", usb);
 +
 +      r8a7740_pm_init();
  }
  
  static void __init eva_earlytimer_init(void)
  {
        r8a7740_clock_init(MD_CK0 | MD_CK2);
        shmobile_earlytimer_init();
+       /* the rate of extal1 clock must be set before late_time_init */
+       eva_clock_init();
  }
  
  static void __init eva_add_early_devices(void)
  {
        r8a7740_add_early_devices();
 -
 -      /* override timer setup with board-specific code */
 -      shmobile_timer.init = eva_earlytimer_init;
  }
  
  #define RESCNT2 IOMEM(0xe6188020)
@@@ -1215,7 -1211,7 +1210,7 @@@ DT_MACHINE_START(ARMADILLO800EVA_DT, "a
        .handle_irq     = shmobile_handle_irq_intc,
        .init_machine   = eva_init,
        .init_late      = shmobile_init_late,
 -      .timer          = &shmobile_timer,
 +      .init_time      = eva_earlytimer_init,
        .dt_compat      = eva_boards_compat_dt,
        .restart        = eva_restart,
  MACHINE_END
@@@ -392,8 -392,7 +392,7 @@@ static void __init bonito_init(void
        /*
         * base board settings
         */
-       gpio_request(GPIO_PORT176, NULL);
-       gpio_direction_input(GPIO_PORT176);
+       gpio_request_one(GPIO_PORT176, GPIOF_IN, NULL);
        if (!gpio_get_value(GPIO_PORT176)) {
                u16 bsw2;
                u16 bsw3;
                        gpio_request(GPIO_FN_LCD0_DISP,         NULL);
                        gpio_request(GPIO_FN_LCD0_LCLK_PORT165, NULL);
  
-                       gpio_request(GPIO_PORT61, NULL); /* LCDDON */
-                       gpio_direction_output(GPIO_PORT61, 1);
+                       gpio_request_one(GPIO_PORT61, GPIOF_OUT_INIT_HIGH,
+                                        NULL); /* LCDDON */
  
                        /* backlight on */
                        bonito_fpga_write(LCDCR, 1);
@@@ -499,6 -498,9 +498,6 @@@ static void __init bonito_earlytimer_in
  static void __init bonito_add_early_devices(void)
  {
        r8a7740_add_early_devices();
 -
 -      /* override timer setup with board-specific code */
 -      shmobile_timer.init = bonito_earlytimer_init;
  }
  
  MACHINE_START(BONITO, "bonito")
        .handle_irq     = shmobile_handle_irq_intc,
        .init_machine   = bonito_init,
        .init_late      = shmobile_init_late,
 -      .timer          = &shmobile_timer,
 +      .init_time      = bonito_earlytimer_init,
  MACHINE_END
@@@ -35,7 -35,6 +35,7 @@@
  #include <linux/input/sh_keysc.h>
  #include <linux/gpio_keys.h>
  #include <linux/leds.h>
 +#include <linux/irqchip/arm-gic.h>
  #include <linux/platform_data/leds-renesas-tpu.h>
  #include <linux/mmc/host.h>
  #include <linux/mmc/sh_mmcif.h>
@@@ -48,6 -47,7 +48,6 @@@
  #include <asm/mach-types.h>
  #include <asm/mach/arch.h>
  #include <asm/mach/time.h>
 -#include <asm/hardware/gic.h>
  #include <asm/hardware/cache-l2x0.h>
  #include <asm/traps.h>
  
@@@ -474,10 -474,8 +474,8 @@@ static void __init kota2_init(void
        gpio_request(GPIO_FN_D15_NAF15, NULL);
        gpio_request(GPIO_FN_CS5A_, NULL);
        gpio_request(GPIO_FN_WE0__FWE, NULL);
-       gpio_request(GPIO_PORT144, NULL); /* PINTA2 */
-       gpio_direction_input(GPIO_PORT144);
-       gpio_request(GPIO_PORT145, NULL); /* RESET */
-       gpio_direction_output(GPIO_PORT145, 1);
+       gpio_request_one(GPIO_PORT144, GPIOF_IN, NULL); /* PINTA2 */
+       gpio_request_one(GPIO_PORT145, GPIOF_OUT_INIT_HIGH, NULL); /* RESET */
  
        /* KEYSC */
        gpio_request(GPIO_FN_KEYIN0_PU, NULL);
        gpio_request(GPIO_FN_MMCD0_6, NULL);
        gpio_request(GPIO_FN_MMCD0_7, NULL);
        gpio_request(GPIO_FN_MMCCMD0, NULL);
-       gpio_request(GPIO_PORT208, NULL); /* Reset */
-       gpio_direction_output(GPIO_PORT208, 1);
+       gpio_request_one(GPIO_PORT208, GPIOF_OUT_INIT_HIGH, NULL); /* Reset */
  
        /* SDHI0 (microSD) */
        gpio_request(GPIO_FN_SDHICD0_PU, NULL);
@@@ -550,7 -547,8 +547,7 @@@ MACHINE_START(KOTA2, "kota2"
        .init_early     = sh73a0_add_early_devices,
        .nr_irqs        = NR_IRQS_LEGACY,
        .init_irq       = sh73a0_init_irq,
 -      .handle_irq     = gic_handle_irq,
        .init_machine   = kota2_init,
        .init_late      = shmobile_init_late,
 -      .timer          = &shmobile_timer,
 +      .init_time      = sh73a0_earlytimer_init,
  MACHINE_END
@@@ -25,7 -25,6 +25,7 @@@
  #include <linux/i2c.h>
  #include <linux/i2c/pcf857x.h>
  #include <linux/input.h>
 +#include <linux/irqchip/arm-gic.h>
  #include <linux/mmc/host.h>
  #include <linux/mmc/sh_mmcif.h>
  #include <linux/mmc/sh_mobile_sdhi.h>
@@@ -43,6 -42,7 +43,6 @@@
  #include <mach/sh73a0.h>
  #include <mach/common.h>
  #include <asm/hardware/cache-l2x0.h>
 -#include <asm/hardware/gic.h>
  #include <asm/mach-types.h>
  #include <asm/mach/arch.h>
  #include <video/sh_mobile_lcdc.h>
@@@ -525,21 -525,21 +525,21 @@@ static struct platform_device fsi_devic
        },
  };
  
 -static struct asoc_simple_dai_init_info fsi2_ak4648_init_info = {
 -      .fmt            = SND_SOC_DAIFMT_LEFT_J,
 -      .codec_daifmt   = SND_SOC_DAIFMT_CBM_CFM,
 -      .cpu_daifmt     = SND_SOC_DAIFMT_CBS_CFS,
 -      .sysclk         = 11289600,
 -};
 -
  static struct asoc_simple_card_info fsi2_ak4648_info = {
        .name           = "AK4648",
        .card           = "FSI2A-AK4648",
 -      .cpu_dai        = "fsia-dai",
        .codec          = "ak4642-codec.0-0012",
        .platform       = "sh_fsi2",
 -      .codec_dai      = "ak4642-hifi",
 -      .init           = &fsi2_ak4648_init_info,
 +      .daifmt         = SND_SOC_DAIFMT_LEFT_J,
 +      .cpu_dai = {
 +              .name   = "fsia-dai",
 +              .fmt    = SND_SOC_DAIFMT_CBS_CFS,
 +      },
 +      .codec_dai = {
 +              .name   = "ak4642-hifi",
 +              .fmt    = SND_SOC_DAIFMT_CBM_CFM,
 +              .sysclk = 11289600,
 +      },
  };
  
  static struct platform_device fsi_ak4648_device = {
@@@ -623,7 -623,7 +623,7 @@@ static int __init as3711_enable_lcdc_ba
                0x45, 0xf0,
        };
  
-       if (!machine_is_kzm9g())
+       if (!of_machine_is_compatible("renesas,kzm9g"))
                return 0;
  
        if (!a)
@@@ -672,8 -672,7 +672,7 @@@ static void __init kzm_init(void
        gpio_request(GPIO_FN_CS4_, NULL); /* CS4 */
  
        /* SMSC */
-       gpio_request(GPIO_PORT224, NULL); /* IRQ3 */
-       gpio_direction_input(GPIO_PORT224);
+       gpio_request_one(GPIO_PORT224, GPIOF_IN, NULL); /* IRQ3 */
  
        /* LCDC */
        gpio_request(GPIO_FN_LCDD23,    NULL);
        gpio_request(GPIO_FN_LCDDISP,   NULL);
        gpio_request(GPIO_FN_LCDDCK,    NULL);
  
-       gpio_request(GPIO_PORT222,      NULL); /* LCDCDON */
-       gpio_request(GPIO_PORT226,      NULL); /* SC */
-       gpio_direction_output(GPIO_PORT222, 1);
-       gpio_direction_output(GPIO_PORT226, 1);
+       gpio_request_one(GPIO_PORT222, GPIOF_OUT_INIT_HIGH, NULL); /* LCDCDON */
+       gpio_request_one(GPIO_PORT226, GPIOF_OUT_INIT_HIGH, NULL); /* SC */
  
        /* Touchscreen */
-       gpio_request(GPIO_PORT223, NULL); /* IRQ8 */
-       gpio_direction_input(GPIO_PORT223);
+       gpio_request_one(GPIO_PORT223, GPIOF_IN, NULL); /* IRQ8 */
  
        /* enable MMCIF */
        gpio_request(GPIO_FN_MMCCLK0,           NULL);
        gpio_request(GPIO_FN_SDHID0_1,          NULL);
        gpio_request(GPIO_FN_SDHID0_0,          NULL);
        gpio_request(GPIO_FN_SDHI0_VCCQ_MC0_ON, NULL);
-       gpio_request(GPIO_PORT15, NULL);
-       gpio_direction_output(GPIO_PORT15, 1); /* power */
+       gpio_request_one(GPIO_PORT15, GPIOF_OUT_INIT_HIGH, NULL); /* power */
  
        /* enable Micro SD */
        gpio_request(GPIO_FN_SDHID2_0,          NULL);
        gpio_request(GPIO_FN_SDHID2_3,          NULL);
        gpio_request(GPIO_FN_SDHICMD2,          NULL);
        gpio_request(GPIO_FN_SDHICLK2,          NULL);
-       gpio_request(GPIO_PORT14, NULL);
-       gpio_direction_output(GPIO_PORT14, 1); /* power */
+       gpio_request_one(GPIO_PORT14, GPIOF_OUT_INIT_HIGH, NULL); /* power */
  
        /* I2C 3 */
        gpio_request(GPIO_FN_PORT27_I2C_SCL3, NULL);
  
        sh73a0_add_standard_devices();
        platform_add_devices(kzm_devices, ARRAY_SIZE(kzm_devices));
 +
 +      sh73a0_pm_init();
  }
  
  static void kzm9g_restart(char mode, const char *cmd)
@@@ -794,9 -786,10 +788,9 @@@ DT_MACHINE_START(KZM9G_DT, "kzm9g"
        .init_early     = sh73a0_add_early_devices,
        .nr_irqs        = NR_IRQS_LEGACY,
        .init_irq       = sh73a0_init_irq,
 -      .handle_irq     = gic_handle_irq,
        .init_machine   = kzm_init,
        .init_late      = shmobile_init_late,
 -      .timer          = &shmobile_timer,
 +      .init_time      = sh73a0_earlytimer_init,
        .restart        = kzm9g_restart,
        .dt_compat      = kzm9g_boards_compat_dt,
  MACHINE_END
   *
   * it needs amixer settings for playing
   *
-  * amixer set "Headphone" on
-  * amixer set "HPOUTL Mixer DACH" on
-  * amixer set "HPOUTR Mixer DACH" on
+  * amixer set "Headphone Enable" on
   */
  
  /* Fixed 3.3V and 1.8V regulators to be used by multiple devices */
@@@ -502,18 -500,18 +500,18 @@@ static struct platform_device hdmi_lcdc
        },
  };
  
 -static struct asoc_simple_dai_init_info fsi2_hdmi_init_info = {
 -      .cpu_daifmt     = SND_SOC_DAIFMT_CBM_CFM,
 -};
 -
  static struct asoc_simple_card_info fsi2_hdmi_info = {
        .name           = "HDMI",
        .card           = "FSI2B-HDMI",
 -      .cpu_dai        = "fsib-dai",
        .codec          = "sh-mobile-hdmi",
        .platform       = "sh_fsi2",
 -      .codec_dai      = "sh_mobile_hdmi-hifi",
 -      .init           = &fsi2_hdmi_init_info,
 +      .cpu_dai = {
 +              .name   = "fsib-dai",
 +              .fmt    = SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_IB_NF,
 +      },
 +      .codec_dai = {
 +              .name   = "sh_mobile_hdmi-hifi",
 +      },
  };
  
  static struct platform_device fsi_hdmi_device = {
@@@ -858,12 -856,16 +856,12 @@@ static struct platform_device leds_devi
  #define IRQ_FSI evt2irq(0x1840)
  static struct sh_fsi_platform_info fsi_info = {
        .port_a = {
 -              .flags = SH_FSI_BRS_INV,
                .tx_id = SHDMA_SLAVE_FSIA_TX,
                .rx_id = SHDMA_SLAVE_FSIA_RX,
        },
        .port_b = {
 -              .flags = SH_FSI_BRS_INV |
 -                      SH_FSI_BRM_INV  |
 -                      SH_FSI_LRS_INV  |
 -                      SH_FSI_CLK_CPG  |
 -                      SH_FSI_FMT_SPDIF,
 +              .flags = SH_FSI_CLK_CPG |
 +                       SH_FSI_FMT_SPDIF,
        }
  };
  
@@@ -892,21 -894,21 +890,21 @@@ static struct platform_device fsi_devic
        },
  };
  
 -static struct asoc_simple_dai_init_info fsi2_ak4643_init_info = {
 -      .fmt            = SND_SOC_DAIFMT_LEFT_J,
 -      .codec_daifmt   = SND_SOC_DAIFMT_CBM_CFM,
 -      .cpu_daifmt     = SND_SOC_DAIFMT_CBS_CFS,
 -      .sysclk         = 11289600,
 -};
 -
  static struct asoc_simple_card_info fsi2_ak4643_info = {
        .name           = "AK4643",
        .card           = "FSI2A-AK4643",
 -      .cpu_dai        = "fsia-dai",
        .codec          = "ak4642-codec.0-0013",
        .platform       = "sh_fsi2",
 -      .codec_dai      = "ak4642-hifi",
 -      .init           = &fsi2_ak4643_init_info,
 +      .daifmt         = SND_SOC_DAIFMT_LEFT_J,
 +      .cpu_dai = {
 +              .name   = "fsia-dai",
 +              .fmt    = SND_SOC_DAIFMT_CBS_CFS,
 +      },
 +      .codec_dai = {
 +              .name   = "ak4642-hifi",
 +              .fmt    = SND_SOC_DAIFMT_CBM_CFM,
 +              .sysclk = 11289600,
 +      },
  };
  
  static struct platform_device fsi_ak4643_device = {
@@@ -1404,11 -1406,10 +1402,10 @@@ static void __init mackerel_init(void
        gpio_request(GPIO_FN_LCDDISP,  NULL);
        gpio_request(GPIO_FN_LCDDCK,   NULL);
  
-       gpio_request(GPIO_PORT31, NULL); /* backlight */
-       gpio_direction_output(GPIO_PORT31, 0); /* off by default */
+       /* backlight, off by default */
+       gpio_request_one(GPIO_PORT31, GPIOF_OUT_INIT_LOW, NULL);
  
-       gpio_request(GPIO_PORT151, NULL); /* LCDDON */
-       gpio_direction_output(GPIO_PORT151, 1);
+       gpio_request_one(GPIO_PORT151, GPIOF_OUT_INIT_HIGH, NULL); /* LCDDON */
  
        /* USBHS0 */
        gpio_request(GPIO_FN_VBUS0_0, NULL);
        gpio_request(GPIO_FN_FSIAILR,   NULL);
        gpio_request(GPIO_FN_FSIAISLD,  NULL);
        gpio_request(GPIO_FN_FSIAOSLD,  NULL);
-       gpio_request(GPIO_PORT161,      NULL);
-       gpio_direction_output(GPIO_PORT161, 0); /* slave */
+       gpio_request_one(GPIO_PORT161, GPIOF_OUT_INIT_LOW, NULL); /* slave */
  
        gpio_request(GPIO_PORT9,  NULL);
        gpio_request(GPIO_PORT10, NULL);
        gpio_request(GPIO_FN_SDHID1_0, NULL);
  #endif
        /* card detect pin for MMC slot (CN7) */
-       gpio_request(GPIO_PORT41, NULL);
-       gpio_direction_input(GPIO_PORT41);
+       gpio_request_one(GPIO_PORT41, GPIOF_IN, NULL);
  
        /* enable SDHI2 */
        gpio_request(GPIO_FN_SDHICMD2, NULL);
        gpio_request(GPIO_FN_SDHID2_0, NULL);
  
        /* card detect pin for microSD slot (CN23) */
-       gpio_request(GPIO_PORT162, NULL);
-       gpio_direction_input(GPIO_PORT162);
+       gpio_request_one(GPIO_PORT162, GPIOF_IN, NULL);
  
        /* MMCIF */
        gpio_request(GPIO_FN_MMCD0_0, NULL);
@@@ -1589,6 -1587,6 +1583,6 @@@ DT_MACHINE_START(MACKEREL_DT, "mackerel
        .handle_irq     = shmobile_handle_irq_intc,
        .init_machine   = mackerel_init,
        .init_late      = sh7372_pm_init_late,
 -      .timer          = &shmobile_timer,
 +      .init_time      = sh7372_earlytimer_init,
        .dt_compat  = mackerel_boards_compat_dt,
  MACHINE_END