]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge branch 'next/dt' into HEAD
authorOlof Johansson <olof@lixom.net>
Mon, 1 Oct 2012 21:23:11 +0000 (14:23 -0700)
committerOlof Johansson <olof@lixom.net>
Mon, 1 Oct 2012 21:23:11 +0000 (14:23 -0700)
Conflicts:
Documentation/devicetree/bindings/usb/platform-uhci.txt
arch/arm/mach-vt8500/bv07.c
arch/arm/mach-vt8500/devices-vt8500.c
arch/arm/mach-vt8500/devices-wm8505.c
arch/arm/mach-vt8500/devices.c
arch/arm/mach-vt8500/devices.h
arch/arm/mach-vt8500/wm8505_7in.c

17 files changed:
1  2 
Documentation/devicetree/bindings/vendor-prefixes.txt
arch/arm/Kconfig
arch/arm/boot/dts/imx27-phytec-phycore.dts
arch/arm/mach-dove/common.c
arch/arm/mach-imx/Makefile
arch/arm/mach-mmp/mmp2.c
arch/arm/mach-mmp/pxa910.c
arch/arm/mach-mxs/mach-mxs.c
arch/arm/mach-omap2/omap4-common.c
arch/arm/mach-omap2/omap_hwmod.c
arch/arm/mach-omap2/timer.c
arch/arm/mach-ux500/board-mop500.c
arch/arm/mach-ux500/cpu-db8500.c
arch/arm/plat-omap/include/plat/omap_hwmod.h
arch/arm/plat-omap/omap_device.c
drivers/clk/Makefile
drivers/gpio/gpio-samsung.c

index 4f293e5571f075cee15d706ca8a868fb1b8d215a,5c63da29aa0590ff6c9d09ccb5f3fc766cabae67..9de2b9ff9d6ed6067e31c7fbe1533eb1f4a738f3
@@@ -10,7 -10,6 +10,7 @@@ apm   Applied Micro Circuits Corporation 
  arm   ARM Ltd.
  atmel Atmel Corporation
  bosch Bosch Sensortec GmbH
 +brcm  Broadcom Corporation
  cavium        Cavium, Inc.
  chrp  Common Hardware Reference Platform
  cortina       Cortina Systems, Inc.
@@@ -48,5 -47,7 +48,7 @@@ sirf  SiRF Technology, Inc
  st    STMicroelectronics
  stericsson    ST-Ericsson
  ti    Texas Instruments
+ via   VIA Technologies, Inc.
  wlf   Wolfson Microelectronics
+ wm    Wondermedia Technologies, Inc.
  xlnx  Xilinx
diff --combined arch/arm/Kconfig
index a97adeccf558af3e5c53bfc28790f55218989c64,1fd9bcd25b4d70c663b1863d3d3f139e4317d339..7362c9216b6d2e28be983c2855192dfb24ebab63
@@@ -279,6 -279,7 +279,6 @@@ config ARCH_INTEGRATO
        select GENERIC_CLOCKEVENTS
        select PLAT_VERSATILE
        select PLAT_VERSATILE_FPGA_IRQ
 -      select NEED_MACH_IO_H
        select NEED_MACH_MEMORY_H
        select SPARSE_IRQ
        select MULTI_IRQ_HANDLER
@@@ -310,6 -311,7 +310,6 @@@ config ARCH_VERSATIL
        select ICST
        select GENERIC_CLOCKEVENTS
        select ARCH_WANT_OPTIONAL_GPIOLIB
 -      select NEED_MACH_IO_H if PCI
        select PLAT_VERSATILE
        select PLAT_VERSATILE_CLOCK
        select PLAT_VERSATILE_CLCD
@@@ -347,23 -349,6 +347,23 @@@ config ARCH_AT9
          This enables support for systems based on Atmel
          AT91RM9200 and AT91SAM9* processors.
  
 +config ARCH_BCM2835
 +      bool "Broadcom BCM2835 family"
 +      select ARCH_WANT_OPTIONAL_GPIOLIB
 +      select ARM_AMBA
 +      select ARM_ERRATA_411920
 +      select ARM_TIMER_SP804
 +      select CLKDEV_LOOKUP
 +      select COMMON_CLK
 +      select CPU_V6
 +      select GENERIC_CLOCKEVENTS
 +      select MULTI_IRQ_HANDLER
 +      select SPARSE_IRQ
 +      select USE_OF
 +      help
 +        This enables support for the Broadcom BCM2835 SoC. This SoC is
 +        use in the Raspberry Pi, and Roku 2 devices.
 +
  config ARCH_BCMRING
        bool "Broadcom BCMRING"
        depends on MMU
@@@ -421,8 -406,9 +421,8 @@@ config ARCH_GEMIN
        help
          Support for the Cortina Systems Gemini family SoCs
  
 -config ARCH_PRIMA2
 -      bool "CSR SiRFSoC PRIMA2 ARM Cortex A9 Platform"
 -      select CPU_V7
 +config ARCH_SIRF
 +      bool "CSR SiRF"
        select NO_IOPORT
        select ARCH_REQUIRE_GPIOLIB
        select GENERIC_CLOCKEVENTS
        select PINCTRL
        select PINCTRL_SIRF
        select USE_OF
 -      select ZONE_DMA
        help
 -          Support for CSR SiRFSoC ARM Cortex A9 Platform
 +        Support for CSR SiRFprimaII/Marco/Polo platforms
  
  config ARCH_EBSA110
        bool "EBSA-110"
@@@ -468,7 -455,7 +468,7 @@@ config ARCH_FOOTBRIDG
        select FOOTBRIDGE
        select GENERIC_CLOCKEVENTS
        select HAVE_IDE
 -      select NEED_MACH_IO_H
 +      select NEED_MACH_IO_H if !MMU
        select NEED_MACH_MEMORY_H
        help
          Support for systems based on the DC21285 companion chip
@@@ -525,6 -512,7 +525,6 @@@ config ARCH_IOP13X
        select PCI
        select ARCH_SUPPORTS_MSI
        select VMSPLIT_1G
 -      select NEED_MACH_IO_H
        select NEED_MACH_MEMORY_H
        select NEED_RET_TO_USER
        help
@@@ -534,6 -522,7 +534,6 @@@ config ARCH_IOP32
        bool "IOP32x-based"
        depends on MMU
        select CPU_XSCALE
 -      select NEED_MACH_IO_H
        select NEED_RET_TO_USER
        select PLAT_IOP
        select PCI
@@@ -546,6 -535,7 +546,6 @@@ config ARCH_IOP33
        bool "IOP33x-based"
        depends on MMU
        select CPU_XSCALE
 -      select NEED_MACH_IO_H
        select NEED_RET_TO_USER
        select PLAT_IOP
        select PCI
@@@ -585,6 -575,7 +585,6 @@@ config ARCH_DOV
        select PCI
        select ARCH_REQUIRE_GPIOLIB
        select GENERIC_CLOCKEVENTS
 -      select NEED_MACH_IO_H
        select PLAT_ORION
        help
          Support for the Marvell Dove SoC 88AP510
@@@ -595,6 -586,7 +595,6 @@@ config ARCH_KIRKWOO
        select PCI
        select ARCH_REQUIRE_GPIOLIB
        select GENERIC_CLOCKEVENTS
 -      select NEED_MACH_IO_H
        select PLAT_ORION
        help
          Support for the following Marvell Kirkwood series SoCs:
@@@ -621,6 -613,7 +621,6 @@@ config ARCH_MV78XX
        select PCI
        select ARCH_REQUIRE_GPIOLIB
        select GENERIC_CLOCKEVENTS
 -      select NEED_MACH_IO_H
        select PLAT_ORION
        help
          Support for the following Marvell MV78xx0 series SoCs:
@@@ -633,6 -626,7 +633,6 @@@ config ARCH_ORION5
        select PCI
        select ARCH_REQUIRE_GPIOLIB
        select GENERIC_CLOCKEVENTS
 -      select NEED_MACH_IO_H
        select PLAT_ORION
        help
          Support for the following Marvell Orion 5x series SoCs:
@@@ -657,9 -651,8 +657,9 @@@ config ARCH_KS869
        bool "Micrel/Kendin KS8695"
        select CPU_ARM922T
        select ARCH_REQUIRE_GPIOLIB
 -      select ARCH_USES_GETTIMEOFFSET
        select NEED_MACH_MEMORY_H
 +      select CLKSRC_MMIO
 +      select GENERIC_CLOCKEVENTS
        help
          Support for Micrel/Kendin KS8695 "Centaur" (ARM922T) based
          System-on-Chip devices.
@@@ -689,9 -682,9 +689,9 @@@ config ARCH_TEGR
        select HAVE_CLK
        select HAVE_SMP
        select MIGHT_HAVE_CACHE_L2X0
 -      select NEED_MACH_IO_H if PCI
        select ARCH_HAS_CPUFREQ
        select USE_OF
 +      select COMMON_CLK
        help
          This enables support for NVIDIA Tegra based systems (Tegra APX,
          Tegra 6xx and Tegra 2 series).
@@@ -715,6 -708,14 +715,6 @@@ config ARCH_PICOXCEL
          family of Femtocell devices.  The picoxcell support requires device tree
          for all boards.
  
 -config ARCH_PNX4008
 -      bool "Philips Nexperia PNX4008 Mobile"
 -      select CPU_ARM926T
 -      select CLKDEV_LOOKUP
 -      select ARCH_USES_GETTIMEOFFSET
 -      help
 -        This enables support for Philips PNX4008 mobile platform.
 -
  config ARCH_PXA
        bool "PXA2xx/PXA3xx-based"
        depends on MMU
@@@ -910,6 -911,7 +910,6 @@@ config ARCH_SHAR
        select PCI
        select ARCH_USES_GETTIMEOFFSET
        select NEED_MACH_MEMORY_H
 -      select NEED_MACH_IO_H
        help
          Support for the StrongARM based Digital DNARD machine, also known
          as "Shark" (<http://www.shark-linux.de/shark.html>).
@@@ -928,7 -930,6 +928,7 @@@ config ARCH_U30
        select COMMON_CLK
        select GENERIC_GPIO
        select ARCH_REQUIRE_GPIOLIB
 +      select SPARSE_IRQ
        help
          Support for ST-Ericsson U300 series mobile platforms.
  
@@@ -1003,6 -1004,10 +1003,10 @@@ config ARCH_VT850
        select ARCH_HAS_CPUFREQ
        select GENERIC_CLOCKEVENTS
        select ARCH_REQUIRE_GPIOLIB
+       select USE_OF
+       select COMMON_CLK
+       select HAVE_CLK
+       select CLKDEV_LOOKUP
        help
          Support for VIA/WonderMedia VT8500/WM85xx System-on-Chip.
  
@@@ -1116,8 -1121,6 +1120,8 @@@ source "arch/arm/mach-exynos/Kconfig
  
  source "arch/arm/mach-shmobile/Kconfig"
  
 +source "arch/arm/mach-prima2/Kconfig"
 +
  source "arch/arm/mach-tegra/Kconfig"
  
  source "arch/arm/mach-u300/Kconfig"
@@@ -1129,8 -1132,6 +1133,6 @@@ source "arch/arm/mach-versatile/Kconfig
  source "arch/arm/mach-vexpress/Kconfig"
  source "arch/arm/plat-versatile/Kconfig"
  
- source "arch/arm/mach-vt8500/Kconfig"
  source "arch/arm/mach-w90x900/Kconfig"
  
  # Definitions to make life easier
@@@ -1179,6 -1180,12 +1181,6 @@@ config XSCALE_PM
        depends on CPU_XSCALE
        default y
  
 -config CPU_HAS_PMU
 -      depends on (CPU_V6 || CPU_V6K || CPU_V7 || XSCALE_PMU) && \
 -                 (!ARCH_OMAP3 || OMAP3_EMU)
 -      default y
 -      bool
 -
  config MULTI_IRQ_HANDLER
        bool
        help
@@@ -1617,6 -1624,7 +1619,7 @@@ config ARCH_NR_GPI
        default 355 if ARCH_U8500
        default 264 if MACH_H4700
        default 512 if SOC_OMAP5
+       default 288 if ARCH_VT8500
        default 0
        help
          Maximum number of GPIOs in the system.
@@@ -1751,7 -1759,7 +1754,7 @@@ config HIGHPT
  
  config HW_PERF_EVENTS
        bool "Enable hardware performance counter support for perf events"
 -      depends on PERF_EVENTS && CPU_HAS_PMU
 +      depends on PERF_EVENTS
        default y
        help
          Enable hardware performance counter support for perf events. If
@@@ -2307,7 -2315,7 +2310,7 @@@ menu "Power management options
  source "kernel/power/Kconfig"
  
  config ARCH_SUSPEND_POSSIBLE
 -      depends on !ARCH_S5PC100 && !ARCH_TEGRA
 +      depends on !ARCH_S5PC100
        depends on CPU_ARM920T || CPU_ARM926T || CPU_SA1100 || \
                CPU_V6 || CPU_V6K || CPU_V7 || CPU_XSC3 || CPU_XSCALE || CPU_MOHAWK
        def_bool y
index 2acc86cfdd05851488b2829fddd69e723df7ef0c,777caa33cd853ca7312a32384311f602e91bb625..af50469e34b2931306acf88a3d8ea289253388e2
        soc {
                aipi@10000000 { /* aipi */
  
-                       wdog@10002000 {
-                               status = "okay";
-                       };
                        serial@1000a000 {
                                fsl,uart-has-rtscts;
                                status = "okay";
@@@ -49,7 -45,7 +45,7 @@@
                        i2c@1001d000 {
                                clock-frequency = <400000>;
                                status = "okay";
 -                              at24@4c {
 +                              at24@52 {
                                        compatible = "at,24c32";
                                        pagesize = <32>;
                                        reg = <0x52>;
index cc4c6a5a357c5e3660cb7d50b63e5add9857d707,e5a97d97e38ddd16a482176de02bdb7cf9105874..bd54d7b7ef8513bba6d937c40c8da022add81eb5
@@@ -49,6 -49,16 +49,6 @@@ static struct map_desc dove_io_desc[] _
                .pfn            = __phys_to_pfn(DOVE_NB_REGS_PHYS_BASE),
                .length         = DOVE_NB_REGS_SIZE,
                .type           = MT_DEVICE,
 -      }, {
 -              .virtual        = DOVE_PCIE0_IO_VIRT_BASE,
 -              .pfn            = __phys_to_pfn(DOVE_PCIE0_IO_PHYS_BASE),
 -              .length         = DOVE_PCIE0_IO_SIZE,
 -              .type           = MT_DEVICE,
 -      }, {
 -              .virtual        = DOVE_PCIE1_IO_VIRT_BASE,
 -              .pfn            = __phys_to_pfn(DOVE_PCIE1_IO_PHYS_BASE),
 -              .length         = DOVE_PCIE1_IO_SIZE,
 -              .type           = MT_DEVICE,
        },
  };
  
@@@ -279,7 -289,7 +279,7 @@@ void __init dove_init(void
        printk(KERN_INFO "TCLK = %dMHz\n", (get_tclk() + 499999) / 1000000);
  
  #ifdef CONFIG_CACHE_TAUROS2
-       tauros2_init();
+       tauros2_init(0);
  #endif
        dove_setup_cpu_mbus();
  
index d1204198ca836546d96a54b2139d208f1cf64cc2,f4c0e757d80546e3f43adcad8f89387b97ca32ad..895754aeb4f33f856a12009989743d02a894176c
@@@ -13,7 -13,7 +13,7 @@@ imx5-pm-$(CONFIG_PM) += pm-imx5.
  obj-$(CONFIG_SOC_IMX5) += cpu-imx5.o mm-imx5.o clk-imx51-imx53.o ehci-imx5.o $(imx5-pm-y) cpu_op-mx51.o
  
  obj-$(CONFIG_COMMON_CLK) += clk-pllv1.o clk-pllv2.o clk-pllv3.o clk-gate2.o \
 -                          clk-pfd.o clk-busy.o
 +                          clk-pfd.o clk-busy.o clk.o
  
  # Support for CMOS sensor interface
  obj-$(CONFIG_MX1_VIDEO) += mx1-camera-fiq.o mx1-camera-fiq-ksym.o
@@@ -83,16 -83,9 +83,9 @@@ endi
  # i.MX5 based machines
  obj-$(CONFIG_MACH_MX51_BABBAGE) += mach-mx51_babbage.o
  obj-$(CONFIG_MACH_MX51_3DS) += mach-mx51_3ds.o
- obj-$(CONFIG_MACH_MX53_EVK) += mach-mx53_evk.o
- obj-$(CONFIG_MACH_MX53_SMD) += mach-mx53_smd.o
- obj-$(CONFIG_MACH_MX53_LOCO) += mach-mx53_loco.o
- obj-$(CONFIG_MACH_MX53_ARD) += mach-mx53_ard.o
  obj-$(CONFIG_MACH_EUKREA_CPUIMX51SD) += mach-cpuimx51sd.o
  obj-$(CONFIG_MACH_EUKREA_MBIMXSD51_BASEBOARD) += eukrea_mbimxsd51-baseboard.o
- obj-$(CONFIG_MX51_EFIKA_COMMON) += mx51_efika.o
- obj-$(CONFIG_MACH_MX51_EFIKAMX) += mach-mx51_efikamx.o
- obj-$(CONFIG_MACH_MX51_EFIKASB) += mach-mx51_efikasb.o
  obj-$(CONFIG_MACH_MX50_RDP) += mach-mx50_rdp.o
  
  obj-$(CONFIG_MACH_IMX51_DT) += imx51-dt.o
- obj-$(CONFIG_MACH_IMX53_DT) += imx53-dt.o
+ obj-$(CONFIG_SOC_IMX53) += mach-imx53.o
diff --combined arch/arm/mach-mmp/mmp2.c
index c2ce3d05b044d877e5f211d786420dc12bd73215,c2bb95cf1a8250f15749e32a63c862f76bf97a57..3a3768c7a19181992c1e9bac41ec3059c82eb2d2
@@@ -20,6 -20,7 +20,6 @@@
  #include <asm/mach/time.h>
  #include <mach/addr-map.h>
  #include <mach/regs-apbc.h>
 -#include <mach/regs-apmu.h>
  #include <mach/cputype.h>
  #include <mach/irqs.h>
  #include <mach/dma.h>
@@@ -28,6 -29,7 +28,6 @@@
  #include <mach/mmp2.h>
  
  #include "common.h"
 -#include "clock.h"
  
  #define MFPR_VIRT_BASE        (APB_VIRT_BASE + 0x1e000)
  
@@@ -96,36 -98,95 +96,36 @@@ void __init mmp2_init_irq(void
        mmp2_init_icu();
  }
  
 -static void sdhc_clk_enable(struct clk *clk)
 -{
 -      uint32_t clk_rst;
 -
 -      clk_rst  =  __raw_readl(clk->clk_rst);
 -      clk_rst |= clk->enable_val;
 -      __raw_writel(clk_rst, clk->clk_rst);
 -}
 -
 -static void sdhc_clk_disable(struct clk *clk)
 -{
 -      uint32_t clk_rst;
 -
 -      clk_rst  =  __raw_readl(clk->clk_rst);
 -      clk_rst &= ~clk->enable_val;
 -      __raw_writel(clk_rst, clk->clk_rst);
 -}
 -
 -struct clkops sdhc_clk_ops = {
 -      .enable         = sdhc_clk_enable,
 -      .disable        = sdhc_clk_disable,
 -};
 -
 -/* APB peripheral clocks */
 -static APBC_CLK(uart1, MMP2_UART1, 1, 26000000);
 -static APBC_CLK(uart2, MMP2_UART2, 1, 26000000);
 -static APBC_CLK(uart3, MMP2_UART3, 1, 26000000);
 -static APBC_CLK(uart4, MMP2_UART4, 1, 26000000);
 -static APBC_CLK(twsi1, MMP2_TWSI1, 0, 26000000);
 -static APBC_CLK(twsi2, MMP2_TWSI2, 0, 26000000);
 -static APBC_CLK(twsi3, MMP2_TWSI3, 0, 26000000);
 -static APBC_CLK(twsi4, MMP2_TWSI4, 0, 26000000);
 -static APBC_CLK(twsi5, MMP2_TWSI5, 0, 26000000);
 -static APBC_CLK(twsi6, MMP2_TWSI6, 0, 26000000);
 -static APBC_CLK(gpio, MMP2_GPIO, 0, 26000000);
 -
 -static APMU_CLK(nand, NAND, 0xbf, 100000000);
 -static APMU_CLK_OPS(sdh0, SDH0, 0x1b, 200000000, &sdhc_clk_ops);
 -static APMU_CLK_OPS(sdh1, SDH1, 0x1b, 200000000, &sdhc_clk_ops);
 -static APMU_CLK_OPS(sdh2, SDH2, 0x1b, 200000000, &sdhc_clk_ops);
 -static APMU_CLK_OPS(sdh3, SDH3, 0x1b, 200000000, &sdhc_clk_ops);
 -
 -static struct clk_lookup mmp2_clkregs[] = {
 -      INIT_CLKREG(&clk_uart1, "pxa2xx-uart.0", NULL),
 -      INIT_CLKREG(&clk_uart2, "pxa2xx-uart.1", NULL),
 -      INIT_CLKREG(&clk_uart3, "pxa2xx-uart.2", NULL),
 -      INIT_CLKREG(&clk_uart4, "pxa2xx-uart.3", NULL),
 -      INIT_CLKREG(&clk_twsi1, "pxa2xx-i2c.0", NULL),
 -      INIT_CLKREG(&clk_twsi2, "pxa2xx-i2c.1", NULL),
 -      INIT_CLKREG(&clk_twsi3, "pxa2xx-i2c.2", NULL),
 -      INIT_CLKREG(&clk_twsi4, "pxa2xx-i2c.3", NULL),
 -      INIT_CLKREG(&clk_twsi5, "pxa2xx-i2c.4", NULL),
 -      INIT_CLKREG(&clk_twsi6, "pxa2xx-i2c.5", NULL),
 -      INIT_CLKREG(&clk_nand, "pxa3xx-nand", NULL),
 -      INIT_CLKREG(&clk_gpio, "pxa-gpio", NULL),
 -      INIT_CLKREG(&clk_sdh0, "sdhci-pxav3.0", "PXA-SDHCLK"),
 -      INIT_CLKREG(&clk_sdh1, "sdhci-pxav3.1", "PXA-SDHCLK"),
 -      INIT_CLKREG(&clk_sdh2, "sdhci-pxav3.2", "PXA-SDHCLK"),
 -      INIT_CLKREG(&clk_sdh3, "sdhci-pxav3.3", "PXA-SDHCLK"),
 -};
 -
  static int __init mmp2_init(void)
  {
        if (cpu_is_mmp2()) {
  #ifdef CONFIG_CACHE_TAUROS2
-               tauros2_init();
+               tauros2_init(0);
  #endif
                mfp_init_base(MFPR_VIRT_BASE);
                mfp_init_addr(mmp2_addr_map);
                pxa_init_dma(IRQ_MMP2_DMA_RIQ, 16);
 -              clkdev_add_table(ARRAY_AND_SIZE(mmp2_clkregs));
 +              mmp2_clk_init();
        }
  
        return 0;
  }
  postcore_initcall(mmp2_init);
  
 +#define APBC_TIMERS   APBC_REG(0x024)
 +
  static void __init mmp2_timer_init(void)
  {
        unsigned long clk_rst;
  
 -      __raw_writel(APBC_APBCLK | APBC_RST, APBC_MMP2_TIMERS);
 +      __raw_writel(APBC_APBCLK | APBC_RST, APBC_TIMERS);
  
        /*
         * enable bus/functional clock, enable 6.5MHz (divider 4),
         * release reset
         */
        clk_rst = APBC_APBCLK | APBC_FNCLK | APBC_FNCLKSEL(1);
 -      __raw_writel(clk_rst, APBC_MMP2_TIMERS);
 +      __raw_writel(clk_rst, APBC_TIMERS);
  
        timer_init(IRQ_MMP2_TIMER1);
  }
index 7d84521bb715b66903cf2f56f3ad0f89a13b947b,51ac8d1898c18911e03fd492a53a65c82d9599f3..8b1e16fbb7a561769cf3a11bdc414f9ce5e41207
  #include <linux/io.h>
  #include <linux/platform_device.h>
  
+ #include <asm/hardware/cache-tauros2.h>
  #include <asm/mach/time.h>
  #include <mach/addr-map.h>
  #include <mach/regs-apbc.h>
 -#include <mach/regs-apmu.h>
  #include <mach/cputype.h>
  #include <mach/irqs.h>
  #include <mach/dma.h>
@@@ -24,6 -26,7 +25,6 @@@
  #include <mach/devices.h>
  
  #include "common.h"
 -#include "clock.h"
  
  #define MFPR_VIRT_BASE        (APB_VIRT_BASE + 0x1e000)
  
@@@ -80,13 -83,47 +81,16 @@@ void __init pxa910_init_irq(void
        icu_init_irq();
  }
  
 -/* APB peripheral clocks */
 -static APBC_CLK(uart1, PXA910_UART0, 1, 14745600);
 -static APBC_CLK(uart2, PXA910_UART1, 1, 14745600);
 -static APBC_CLK(twsi0, PXA168_TWSI0, 1, 33000000);
 -static APBC_CLK(twsi1, PXA168_TWSI1, 1, 33000000);
 -static APBC_CLK(pwm1, PXA910_PWM1, 1, 13000000);
 -static APBC_CLK(pwm2, PXA910_PWM2, 1, 13000000);
 -static APBC_CLK(pwm3, PXA910_PWM3, 1, 13000000);
 -static APBC_CLK(pwm4, PXA910_PWM4, 1, 13000000);
 -static APBC_CLK(gpio, PXA910_GPIO, 0, 13000000);
 -static APBC_CLK(rtc, PXA910_RTC, 8, 32768);
 -
 -static APMU_CLK(nand, NAND, 0x19b, 156000000);
 -static APMU_CLK(u2o, USB, 0x1b, 480000000);
 -
 -/* device and clock bindings */
 -static struct clk_lookup pxa910_clkregs[] = {
 -      INIT_CLKREG(&clk_uart1, "pxa2xx-uart.0", NULL),
 -      INIT_CLKREG(&clk_uart2, "pxa2xx-uart.1", NULL),
 -      INIT_CLKREG(&clk_twsi0, "pxa2xx-i2c.0", NULL),
 -      INIT_CLKREG(&clk_twsi1, "pxa2xx-i2c.1", NULL),
 -      INIT_CLKREG(&clk_pwm1, "pxa910-pwm.0", NULL),
 -      INIT_CLKREG(&clk_pwm2, "pxa910-pwm.1", NULL),
 -      INIT_CLKREG(&clk_pwm3, "pxa910-pwm.2", NULL),
 -      INIT_CLKREG(&clk_pwm4, "pxa910-pwm.3", NULL),
 -      INIT_CLKREG(&clk_nand, "pxa3xx-nand", NULL),
 -      INIT_CLKREG(&clk_gpio, "pxa-gpio", NULL),
 -      INIT_CLKREG(&clk_u2o, NULL, "U2OCLK"),
 -      INIT_CLKREG(&clk_rtc, "sa1100-rtc", NULL),
 -};
 -
  static int __init pxa910_init(void)
  {
        if (cpu_is_pxa910()) {
+ #ifdef CONFIG_CACHE_TAUROS2
+               tauros2_init(0);
+ #endif
                mfp_init_base(MFPR_VIRT_BASE);
                mfp_init_addr(pxa910_mfp_addr_map);
                pxa_init_dma(IRQ_PXA910_DMA_INT0, 32);
 -              clkdev_add_table(ARRAY_AND_SIZE(pxa910_clkregs));
 +              pxa910_clk_init();
        }
  
        return 0;
@@@ -95,13 -132,12 +99,13 @@@ postcore_initcall(pxa910_init)
  
  /* system timer - clock enabled, 3.25MHz */
  #define TIMER_CLK_RST (APBC_APBCLK | APBC_FNCLK | APBC_FNCLKSEL(3))
 +#define APBC_TIMERS   APBC_REG(0x34)
  
  static void __init pxa910_timer_init(void)
  {
        /* reset and configure */
 -      __raw_writel(APBC_APBCLK | APBC_RST, APBC_PXA910_TIMERS);
 -      __raw_writel(TIMER_CLK_RST, APBC_PXA910_TIMERS);
 +      __raw_writel(APBC_APBCLK | APBC_RST, APBC_TIMERS);
 +      __raw_writel(TIMER_CLK_RST, APBC_TIMERS);
  
        timer_init(IRQ_PXA910_AP1_TIMER1);
  }
index ff886e01a0b0371367ae49f3d0d323e547845478,433af893ad8a944af1618dfdbb9c6597c599ff91..cf43e5effb9135ff1fed65b23ab10894c0323245
  
  #include <linux/clk.h>
  #include <linux/clkdev.h>
+ #include <linux/can/platform/flexcan.h>
+ #include <linux/delay.h>
  #include <linux/err.h>
- #include <linux/init.h>
+ #include <linux/gpio.h>
  #include <linux/init.h>
  #include <linux/irqdomain.h>
  #include <linux/micrel_phy.h>
  #include <linux/of_irq.h>
  #include <linux/of_platform.h>
  #include <linux/phy.h>
+ #include <linux/pinctrl/consumer.h>
  #include <asm/mach/arch.h>
  #include <asm/mach/time.h>
  #include <mach/common.h>
+ #include <mach/digctl.h>
+ #include <mach/mxs.h>
  
  static struct fb_videomode mx23evk_video_modes[] = {
        {
@@@ -99,9 -104,40 +104,40 @@@ static struct fb_videomode apx4devkit_v
  
  static struct mxsfb_platform_data mxsfb_pdata __initdata;
  
+ /*
+  * MX28EVK_FLEXCAN_SWITCH is shared between both flexcan controllers
+  */
+ #define MX28EVK_FLEXCAN_SWITCH        MXS_GPIO_NR(2, 13)
+ static int flexcan0_en, flexcan1_en;
+ static void mx28evk_flexcan_switch(void)
+ {
+       if (flexcan0_en || flexcan1_en)
+               gpio_set_value(MX28EVK_FLEXCAN_SWITCH, 1);
+       else
+               gpio_set_value(MX28EVK_FLEXCAN_SWITCH, 0);
+ }
+ static void mx28evk_flexcan0_switch(int enable)
+ {
+       flexcan0_en = enable;
+       mx28evk_flexcan_switch();
+ }
+ static void mx28evk_flexcan1_switch(int enable)
+ {
+       flexcan1_en = enable;
+       mx28evk_flexcan_switch();
+ }
+ static struct flexcan_platform_data flexcan_pdata[2];
  static struct of_dev_auxdata mxs_auxdata_lookup[] __initdata = {
        OF_DEV_AUXDATA("fsl,imx23-lcdif", 0x80030000, NULL, &mxsfb_pdata),
        OF_DEV_AUXDATA("fsl,imx28-lcdif", 0x80030000, NULL, &mxsfb_pdata),
+       OF_DEV_AUXDATA("fsl,imx28-flexcan", 0x80032000, NULL, &flexcan_pdata[0]),
+       OF_DEV_AUXDATA("fsl,imx28-flexcan", 0x80034000, NULL, &flexcan_pdata[1]),
        { /* sentinel */ }
  };
  
@@@ -237,13 -273,21 +273,21 @@@ static void __init imx28_evk_init(void
        mxsfb_pdata.mode_count = ARRAY_SIZE(mx28evk_video_modes);
        mxsfb_pdata.default_bpp = 32;
        mxsfb_pdata.ld_intf_width = STMLCDIF_24BIT;
+       mxs_saif_clkmux_select(MXS_DIGCTL_SAIF_CLKMUX_EXTMSTR0);
  }
  
- static void __init m28evk_init(void)
+ static void __init imx28_evk_post_init(void)
  {
-       enable_clk_enet_out();
-       update_fec_mac_prop(OUI_DENX);
+       if (!gpio_request_one(MX28EVK_FLEXCAN_SWITCH, GPIOF_DIR_OUT,
+                             "flexcan-switch")) {
+               flexcan_pdata[0].transceiver_switch = mx28evk_flexcan0_switch;
+               flexcan_pdata[1].transceiver_switch = mx28evk_flexcan1_switch;
+       }
+ }
  
+ static void __init m28evk_init(void)
+ {
        mxsfb_pdata.mode_list = m28evk_video_modes;
        mxsfb_pdata.mode_count = ARRAY_SIZE(m28evk_video_modes);
        mxsfb_pdata.default_bpp = 16;
@@@ -261,7 -305,7 +305,7 @@@ static void __init apx4devkit_init(void
        enable_clk_enet_out();
  
        if (IS_BUILTIN(CONFIG_PHYLIB))
 -              phy_register_fixup_for_uid(PHY_ID_KS8051, MICREL_PHY_ID_MASK,
 +              phy_register_fixup_for_uid(PHY_ID_KSZ8051, MICREL_PHY_ID_MASK,
                                           apx4devkit_phy_fixup);
  
        mxsfb_pdata.mode_list = apx4devkit_video_modes;
        mxsfb_pdata.ld_intf_width = STMLCDIF_24BIT;
  }
  
+ #define ENET0_MDC__GPIO_4_0   MXS_GPIO_NR(4, 0)
+ #define ENET0_MDIO__GPIO_4_1  MXS_GPIO_NR(4, 1)
+ #define ENET0_RX_EN__GPIO_4_2 MXS_GPIO_NR(4, 2)
+ #define ENET0_RXD0__GPIO_4_3  MXS_GPIO_NR(4, 3)
+ #define ENET0_RXD1__GPIO_4_4  MXS_GPIO_NR(4, 4)
+ #define ENET0_TX_EN__GPIO_4_6 MXS_GPIO_NR(4, 6)
+ #define ENET0_TXD0__GPIO_4_7  MXS_GPIO_NR(4, 7)
+ #define ENET0_TXD1__GPIO_4_8  MXS_GPIO_NR(4, 8)
+ #define ENET_CLK__GPIO_4_16   MXS_GPIO_NR(4, 16)
+ #define TX28_FEC_PHY_POWER    MXS_GPIO_NR(3, 29)
+ #define TX28_FEC_PHY_RESET    MXS_GPIO_NR(4, 13)
+ #define TX28_FEC_nINT         MXS_GPIO_NR(4, 5)
+ static const struct gpio tx28_gpios[] __initconst = {
+       { ENET0_MDC__GPIO_4_0, GPIOF_OUT_INIT_LOW, "GPIO_4_0" },
+       { ENET0_MDIO__GPIO_4_1, GPIOF_OUT_INIT_LOW, "GPIO_4_1" },
+       { ENET0_RX_EN__GPIO_4_2, GPIOF_OUT_INIT_LOW, "GPIO_4_2" },
+       { ENET0_RXD0__GPIO_4_3, GPIOF_OUT_INIT_LOW, "GPIO_4_3" },
+       { ENET0_RXD1__GPIO_4_4, GPIOF_OUT_INIT_LOW, "GPIO_4_4" },
+       { ENET0_TX_EN__GPIO_4_6, GPIOF_OUT_INIT_LOW, "GPIO_4_6" },
+       { ENET0_TXD0__GPIO_4_7, GPIOF_OUT_INIT_LOW, "GPIO_4_7" },
+       { ENET0_TXD1__GPIO_4_8, GPIOF_OUT_INIT_LOW, "GPIO_4_8" },
+       { ENET_CLK__GPIO_4_16, GPIOF_OUT_INIT_LOW, "GPIO_4_16" },
+       { TX28_FEC_PHY_POWER, GPIOF_OUT_INIT_LOW, "fec-phy-power" },
+       { TX28_FEC_PHY_RESET, GPIOF_OUT_INIT_LOW, "fec-phy-reset" },
+       { TX28_FEC_nINT, GPIOF_DIR_IN, "fec-int" },
+ };
+ static void __init tx28_post_init(void)
+ {
+       struct device_node *np;
+       struct platform_device *pdev;
+       struct pinctrl *pctl;
+       int ret;
+       enable_clk_enet_out();
+       np = of_find_compatible_node(NULL, NULL, "fsl,imx28-fec");
+       pdev = of_find_device_by_node(np);
+       if (!pdev) {
+               pr_err("%s: failed to find fec device\n", __func__);
+               return;
+       }
+       pctl = pinctrl_get_select(&pdev->dev, "gpio_mode");
+       if (IS_ERR(pctl)) {
+               pr_err("%s: failed to get pinctrl state\n", __func__);
+               return;
+       }
+       ret = gpio_request_array(tx28_gpios, ARRAY_SIZE(tx28_gpios));
+       if (ret) {
+               pr_err("%s: failed to request gpios: %d\n", __func__, ret);
+               return;
+       }
+       /* Power up fec phy */
+       gpio_set_value(TX28_FEC_PHY_POWER, 1);
+       msleep(26); /* 25ms according to data sheet */
+       /* Mode strap pins */
+       gpio_set_value(ENET0_RX_EN__GPIO_4_2, 1);
+       gpio_set_value(ENET0_RXD0__GPIO_4_3, 1);
+       gpio_set_value(ENET0_RXD1__GPIO_4_4, 1);
+       udelay(100); /* minimum assertion time for nRST */
+       /* Deasserting FEC PHY RESET */
+       gpio_set_value(TX28_FEC_PHY_RESET, 1);
+       pinctrl_put(pctl);
+ }
  static void __init mxs_machine_init(void)
  {
        if (of_machine_is_compatible("fsl,imx28-evk"))
  
        of_platform_populate(NULL, of_default_bus_match_table,
                             mxs_auxdata_lookup, NULL);
+       if (of_machine_is_compatible("karo,tx28"))
+               tx28_post_init();
+       if (of_machine_is_compatible("fsl,imx28-evk"))
+               imx28_evk_post_init();
  }
  
  static const char *imx23_dt_compat[] __initdata = {
-       "fsl,imx23-evk",
-       "fsl,stmp378x_devb"
-       "olimex,imx23-olinuxino",
        "fsl,imx23",
        NULL,
  };
  
  static const char *imx28_dt_compat[] __initdata = {
-       "bluegiga,apx4devkit",
-       "crystalfontz,cfa10036",
-       "denx,m28evk",
-       "fsl,imx28-evk",
-       "karo,tx28",
        "fsl,imx28",
        NULL,
  };
index 9fc865502f0ce0e5a169690a1a44ccb170fe3239,3cd2564ed5cdfffc164ca2444b7f26452f394812..e1f289748c5d5d7021b8f079c878bb723466785e
@@@ -29,7 -29,7 +29,7 @@@
  #include <plat/omap-secure.h>
  #include <plat/mmc.h>
  
 -#include <mach/omap-wakeupgen.h>
 +#include "omap-wakeupgen.h"
  
  #include "soc.h"
  #include "common.h"
@@@ -170,7 -170,10 +170,10 @@@ static int __init omap_l2_cache_init(vo
        /* Enable PL310 L2 Cache controller */
        omap_smc1(0x102, 0x1);
  
-       l2x0_init(l2cache_base, aux_ctrl, L2X0_AUX_CTRL_MASK);
+       if (of_have_populated_dt())
+               l2x0_of_init(aux_ctrl, L2X0_AUX_CTRL_MASK);
+       else
+               l2x0_init(l2cache_base, aux_ctrl, L2X0_AUX_CTRL_MASK);
  
        /*
         * Override default outer_cache.disable with a OMAP4
index 7d843cd3b33d3a20f0ed71f607eb3974fe396cba,4a810f6c4c04c6b9ff0465ad0ea7f65568f6c72b..00c006686b0d08051cbaa8b9ceb6b64c6444f898
  #include "powerdomain.h"
  #include "cm2xxx_3xxx.h"
  #include "cminst44xx.h"
 +#include "cm33xx.h"
  #include "prm2xxx_3xxx.h"
  #include "prm44xx.h"
 +#include "prm33xx.h"
  #include "prminst44xx.h"
  #include "mux.h"
  #include "pm.h"
@@@ -869,26 -867,6 +869,26 @@@ static void _omap4_enable_module(struc
                                   oh->prcm.omap4.clkctrl_offs);
  }
  
 +/**
 + * _am33xx_enable_module - enable CLKCTRL modulemode on AM33XX
 + * @oh: struct omap_hwmod *
 + *
 + * Enables the PRCM module mode related to the hwmod @oh.
 + * No return value.
 + */
 +static void _am33xx_enable_module(struct omap_hwmod *oh)
 +{
 +      if (!oh->clkdm || !oh->prcm.omap4.modulemode)
 +              return;
 +
 +      pr_debug("omap_hwmod: %s: %s: %d\n",
 +               oh->name, __func__, oh->prcm.omap4.modulemode);
 +
 +      am33xx_cm_module_enable(oh->prcm.omap4.modulemode, oh->clkdm->cm_inst,
 +                              oh->clkdm->clkdm_offs,
 +                              oh->prcm.omap4.clkctrl_offs);
 +}
 +
  /**
   * _omap4_wait_target_disable - wait for a module to be disabled on OMAP4
   * @oh: struct omap_hwmod *
@@@ -915,31 -893,6 +915,31 @@@ static int _omap4_wait_target_disable(s
                                             oh->prcm.omap4.clkctrl_offs);
  }
  
 +/**
 + * _am33xx_wait_target_disable - wait for a module to be disabled on AM33XX
 + * @oh: struct omap_hwmod *
 + *
 + * Wait for a module @oh to enter slave idle.  Returns 0 if the module
 + * does not have an IDLEST bit or if the module successfully enters
 + * slave idle; otherwise, pass along the return value of the
 + * appropriate *_cm*_wait_module_idle() function.
 + */
 +static int _am33xx_wait_target_disable(struct omap_hwmod *oh)
 +{
 +      if (!oh)
 +              return -EINVAL;
 +
 +      if (oh->_int_flags & _HWMOD_NO_MPU_PORT)
 +              return 0;
 +
 +      if (oh->flags & HWMOD_NO_IDLEST)
 +              return 0;
 +
 +      return am33xx_cm_wait_module_idle(oh->clkdm->cm_inst,
 +                                           oh->clkdm->clkdm_offs,
 +                                           oh->prcm.omap4.clkctrl_offs);
 +}
 +
  /**
   * _count_mpu_irqs - count the number of MPU IRQ lines associated with @oh
   * @oh: struct omap_hwmod *oh
@@@ -1485,8 -1438,8 +1485,8 @@@ static int _init_clocks(struct omap_hwm
   * Return the bit position of the reset line that match the
   * input name. Return -ENOENT if not found.
   */
 -static u8 _lookup_hardreset(struct omap_hwmod *oh, const char *name,
 -                          struct omap_hwmod_rst_info *ohri)
 +static int _lookup_hardreset(struct omap_hwmod *oh, const char *name,
 +                           struct omap_hwmod_rst_info *ohri)
  {
        int i;
  
  static int _assert_hardreset(struct omap_hwmod *oh, const char *name)
  {
        struct omap_hwmod_rst_info ohri;
 -      u8 ret = -EINVAL;
 +      int ret = -EINVAL;
  
        if (!oh)
                return -EINVAL;
                return -ENOSYS;
  
        ret = _lookup_hardreset(oh, name, &ohri);
 -      if (IS_ERR_VALUE(ret))
 +      if (ret < 0)
                return ret;
  
        ret = soc_ops.assert_hardreset(oh, &ohri);
@@@ -1589,7 -1542,7 +1589,7 @@@ static int _deassert_hardreset(struct o
  static int _read_hardreset(struct omap_hwmod *oh, const char *name)
  {
        struct omap_hwmod_rst_info ohri;
 -      u8 ret = -EINVAL;
 +      int ret = -EINVAL;
  
        if (!oh)
                return -EINVAL;
                return -ENOSYS;
  
        ret = _lookup_hardreset(oh, name, &ohri);
 -      if (IS_ERR_VALUE(ret))
 +      if (ret < 0)
                return ret;
  
        return soc_ops.is_hardreset_asserted(oh, &ohri);
@@@ -1660,36 -1613,6 +1660,36 @@@ static int _omap4_disable_module(struc
        return 0;
  }
  
 +/**
 + * _am33xx_disable_module - enable CLKCTRL modulemode on AM33XX
 + * @oh: struct omap_hwmod *
 + *
 + * Disable the PRCM module mode related to the hwmod @oh.
 + * Return EINVAL if the modulemode is not supported and 0 in case of success.
 + */
 +static int _am33xx_disable_module(struct omap_hwmod *oh)
 +{
 +      int v;
 +
 +      if (!oh->clkdm || !oh->prcm.omap4.modulemode)
 +              return -EINVAL;
 +
 +      pr_debug("omap_hwmod: %s: %s\n", oh->name, __func__);
 +
 +      am33xx_cm_module_disable(oh->clkdm->cm_inst, oh->clkdm->clkdm_offs,
 +                               oh->prcm.omap4.clkctrl_offs);
 +
 +      if (_are_any_hardreset_lines_asserted(oh))
 +              return 0;
 +
 +      v = _am33xx_wait_target_disable(oh);
 +      if (v)
 +              pr_warn("omap_hwmod: %s: _wait_target_disable failed\n",
 +                      oh->name);
 +
 +      return 0;
 +}
 +
  /**
   * _ocp_softreset - reset an omap_hwmod via the OCP_SYSCONFIG bit
   * @oh: struct omap_hwmod *
@@@ -1718,8 -1641,8 +1718,8 @@@ static int _ocp_softreset(struct omap_h
  
        /* clocks must be on for this operation */
        if (oh->_state != _HWMOD_STATE_ENABLED) {
 -              pr_warning("omap_hwmod: %s: reset can only be entered from "
 -                         "enabled state\n", oh->name);
 +              pr_warn("omap_hwmod: %s: reset can only be entered from enabled state\n",
 +                      oh->name);
                return -EINVAL;
        }
  
@@@ -2625,33 -2548,6 +2625,33 @@@ static int _omap4_wait_target_ready(str
                                              oh->prcm.omap4.clkctrl_offs);
  }
  
 +/**
 + * _am33xx_wait_target_ready - wait for a module to leave slave idle
 + * @oh: struct omap_hwmod *
 + *
 + * Wait for a module @oh to leave slave idle.  Returns 0 if the module
 + * does not have an IDLEST bit or if the module successfully leaves
 + * slave idle; otherwise, pass along the return value of the
 + * appropriate *_cm*_wait_module_ready() function.
 + */
 +static int _am33xx_wait_target_ready(struct omap_hwmod *oh)
 +{
 +      if (!oh || !oh->clkdm)
 +              return -EINVAL;
 +
 +      if (oh->flags & HWMOD_NO_IDLEST)
 +              return 0;
 +
 +      if (!_find_mpu_rt_port(oh))
 +              return 0;
 +
 +      /* XXX check module SIDLEMODE, hardreset status */
 +
 +      return am33xx_cm_wait_module_ready(oh->clkdm->cm_inst,
 +                                            oh->clkdm->clkdm_offs,
 +                                            oh->prcm.omap4.clkctrl_offs);
 +}
 +
  /**
   * _omap2_assert_hardreset - call OMAP2 PRM hardreset fn with hwmod args
   * @oh: struct omap_hwmod * to assert hardreset
@@@ -2783,72 -2679,6 +2783,72 @@@ static int _omap4_is_hardreset_asserted
                                oh->prcm.omap4.rstctrl_offs);
  }
  
 +/**
 + * _am33xx_assert_hardreset - call AM33XX PRM hardreset fn with hwmod args
 + * @oh: struct omap_hwmod * to assert hardreset
 + * @ohri: hardreset line data
 + *
 + * Call am33xx_prminst_assert_hardreset() with parameters extracted
 + * from the hwmod @oh and the hardreset line data @ohri.  Only
 + * intended for use as an soc_ops function pointer.  Passes along the
 + * return value from am33xx_prminst_assert_hardreset().  XXX This
 + * function is scheduled for removal when the PRM code is moved into
 + * drivers/.
 + */
 +static int _am33xx_assert_hardreset(struct omap_hwmod *oh,
 +                                 struct omap_hwmod_rst_info *ohri)
 +
 +{
 +      return am33xx_prm_assert_hardreset(ohri->rst_shift,
 +                              oh->clkdm->pwrdm.ptr->prcm_offs,
 +                              oh->prcm.omap4.rstctrl_offs);
 +}
 +
 +/**
 + * _am33xx_deassert_hardreset - call AM33XX PRM hardreset fn with hwmod args
 + * @oh: struct omap_hwmod * to deassert hardreset
 + * @ohri: hardreset line data
 + *
 + * Call am33xx_prminst_deassert_hardreset() with parameters extracted
 + * from the hwmod @oh and the hardreset line data @ohri.  Only
 + * intended for use as an soc_ops function pointer.  Passes along the
 + * return value from am33xx_prminst_deassert_hardreset().  XXX This
 + * function is scheduled for removal when the PRM code is moved into
 + * drivers/.
 + */
 +static int _am33xx_deassert_hardreset(struct omap_hwmod *oh,
 +                                   struct omap_hwmod_rst_info *ohri)
 +{
 +      if (ohri->st_shift)
 +              pr_err("omap_hwmod: %s: %s: hwmod data error: OMAP4 does not support st_shift\n",
 +                     oh->name, ohri->name);
 +
 +      return am33xx_prm_deassert_hardreset(ohri->rst_shift,
 +                              oh->clkdm->pwrdm.ptr->prcm_offs,
 +                              oh->prcm.omap4.rstctrl_offs,
 +                              oh->prcm.omap4.rstst_offs);
 +}
 +
 +/**
 + * _am33xx_is_hardreset_asserted - call AM33XX PRM hardreset fn with hwmod args
 + * @oh: struct omap_hwmod * to test hardreset
 + * @ohri: hardreset line data
 + *
 + * Call am33xx_prminst_is_hardreset_asserted() with parameters
 + * extracted from the hwmod @oh and the hardreset line data @ohri.
 + * Only intended for use as an soc_ops function pointer.  Passes along
 + * the return value from am33xx_prminst_is_hardreset_asserted().  XXX
 + * This function is scheduled for removal when the PRM code is moved
 + * into drivers/.
 + */
 +static int _am33xx_is_hardreset_asserted(struct omap_hwmod *oh,
 +                                      struct omap_hwmod_rst_info *ohri)
 +{
 +      return am33xx_prm_is_hardreset_asserted(ohri->rst_shift,
 +                              oh->clkdm->pwrdm.ptr->prcm_offs,
 +                              oh->prcm.omap4.rstctrl_offs);
 +}
 +
  /* Public functions */
  
  u32 omap_hwmod_read(struct omap_hwmod *oh, u16 reg_offs)
@@@ -3328,6 -3158,33 +3328,33 @@@ int omap_hwmod_fill_resources(struct om
        return r;
  }
  
+ /**
+  * omap_hwmod_fill_dma_resources - fill struct resource array with dma data
+  * @oh: struct omap_hwmod *
+  * @res: pointer to the array of struct resource to fill
+  *
+  * Fill the struct resource array @res with dma resource data from the
+  * omap_hwmod @oh.  Intended to be called by code that registers
+  * omap_devices.  See also omap_hwmod_count_resources().  Returns the
+  * number of array elements filled.
+  */
+ int omap_hwmod_fill_dma_resources(struct omap_hwmod *oh, struct resource *res)
+ {
+       int i, sdma_reqs_cnt;
+       int r = 0;
+       sdma_reqs_cnt = _count_sdma_reqs(oh);
+       for (i = 0; i < sdma_reqs_cnt; i++) {
+               (res + r)->name = (oh->sdma_reqs + i)->name;
+               (res + r)->start = (oh->sdma_reqs + i)->dma_req;
+               (res + r)->end = (oh->sdma_reqs + i)->dma_req;
+               (res + r)->flags = IORESOURCE_DMA;
+               r++;
+       }
+       return r;
+ }
  /**
   * omap_hwmod_get_resource_byname - fetch IP block integration data by name
   * @oh: struct omap_hwmod * to operate on
@@@ -3848,14 -3705,6 +3875,14 @@@ void __init omap_hwmod_init(void
                soc_ops.deassert_hardreset = _omap4_deassert_hardreset;
                soc_ops.is_hardreset_asserted = _omap4_is_hardreset_asserted;
                soc_ops.init_clkdm = _init_clkdm;
 +      } else if (soc_is_am33xx()) {
 +              soc_ops.enable_module = _am33xx_enable_module;
 +              soc_ops.disable_module = _am33xx_disable_module;
 +              soc_ops.wait_target_ready = _am33xx_wait_target_ready;
 +              soc_ops.assert_hardreset = _am33xx_assert_hardreset;
 +              soc_ops.deassert_hardreset = _am33xx_deassert_hardreset;
 +              soc_ops.is_hardreset_asserted = _am33xx_is_hardreset_asserted;
 +              soc_ops.init_clkdm = _init_clkdm;
        } else {
                WARN(1, "omap_hwmod: unknown SoC type\n");
        }
index 5214d5bfba27a9b23d5450a614690415c456adf2,a9c9b3dbc82c5efaddeed94f870c6227cb2f96d8..8847d6eb23131b7df5e32c94fea1b8a4018f15fa
  #include <linux/clocksource.h>
  #include <linux/clockchips.h>
  #include <linux/slab.h>
+ #include <linux/of.h>
  
  #include <asm/mach/time.h>
  #include <asm/smp_twd.h>
  #include <asm/sched_clock.h>
  
+ #include <asm/arch_timer.h>
  #include <plat/omap_hwmod.h>
  #include <plat/omap_device.h>
  #include <plat/dmtimer.h>
  #define OMAP3_SECURE_TIMER    1
  #endif
  
+ #define REALTIME_COUNTER_BASE                         0x48243200
+ #define INCREMENTER_NUMERATOR_OFFSET                  0x10
+ #define INCREMENTER_DENUMERATOR_RELOAD_OFFSET         0x14
+ #define NUMERATOR_DENUMERATOR_MASK                    0xfffff000
  /* Clockevent code */
  
  static struct omap_dm_timer clkev;
@@@ -213,7 -220,7 +220,7 @@@ static void __init omap2_gp_clockevent_
        res = omap_dm_timer_init_one(&clkev, gptimer_id, fck_source);
        BUG_ON(res);
  
 -      omap2_gp_timer_irq.dev_id = (void *)&clkev;
 +      omap2_gp_timer_irq.dev_id = &clkev;
        setup_irq(clkev.irq, &omap2_gp_timer_irq);
  
        __omap_dm_timer_int_enable(&clkev, OMAP_TIMER_INT_OVERFLOW);
@@@ -348,6 -355,84 +355,84 @@@ static void __init omap2_clocksource_in
                omap2_gptimer_clocksource_init(gptimer_id, fck_source);
  }
  
+ #ifdef CONFIG_SOC_HAS_REALTIME_COUNTER
+ /*
+  * The realtime counter also called master counter, is a free-running
+  * counter, which is related to real time. It produces the count used
+  * by the CPU local timer peripherals in the MPU cluster. The timer counts
+  * at a rate of 6.144 MHz. Because the device operates on different clocks
+  * in different power modes, the master counter shifts operation between
+  * clocks, adjusting the increment per clock in hardware accordingly to
+  * maintain a constant count rate.
+  */
+ static void __init realtime_counter_init(void)
+ {
+       void __iomem *base;
+       static struct clk *sys_clk;
+       unsigned long rate;
+       unsigned int reg, num, den;
+       base = ioremap(REALTIME_COUNTER_BASE, SZ_32);
+       if (!base) {
+               pr_err("%s: ioremap failed\n", __func__);
+               return;
+       }
+       sys_clk = clk_get(NULL, "sys_clkin_ck");
+       if (!sys_clk) {
+               pr_err("%s: failed to get system clock handle\n", __func__);
+               iounmap(base);
+               return;
+       }
+       rate = clk_get_rate(sys_clk);
+       /* Numerator/denumerator values refer TRM Realtime Counter section */
+       switch (rate) {
+       case 1200000:
+               num = 64;
+               den = 125;
+               break;
+       case 1300000:
+               num = 768;
+               den = 1625;
+               break;
+       case 19200000:
+               num = 8;
+               den = 25;
+               break;
+       case 2600000:
+               num = 384;
+               den = 1625;
+               break;
+       case 2700000:
+               num = 256;
+               den = 1125;
+               break;
+       case 38400000:
+       default:
+               /* Program it for 38.4 MHz */
+               num = 4;
+               den = 25;
+               break;
+       }
+       /* Program numerator and denumerator registers */
+       reg = __raw_readl(base + INCREMENTER_NUMERATOR_OFFSET) &
+                       NUMERATOR_DENUMERATOR_MASK;
+       reg |= num;
+       __raw_writel(reg, base + INCREMENTER_NUMERATOR_OFFSET);
+       reg = __raw_readl(base + INCREMENTER_NUMERATOR_OFFSET) &
+                       NUMERATOR_DENUMERATOR_MASK;
+       reg |= den;
+       __raw_writel(reg, base + INCREMENTER_DENUMERATOR_RELOAD_OFFSET);
+       iounmap(base);
+ }
+ #else
+ static inline void __init realtime_counter_init(void)
+ {}
+ #endif
  #define OMAP_SYS_TIMER_INIT(name, clkev_nr, clkev_src,                        \
                                clksrc_nr, clksrc_src)                  \
  static void __init omap##name##_timer_init(void)                      \
@@@ -394,6 -479,11 +479,11 @@@ static void __init omap4_timer_init(voi
        if (omap_rev() != OMAP4430_REV_ES1_0) {
                int err;
  
+               if (of_have_populated_dt()) {
+                       twd_local_timer_of_register();
+                       return;
+               }
                err = twd_local_timer_register(&twd_local_timer);
                if (err)
                        pr_err("twd_local_timer_register failed %d\n", err);
@@@ -404,7 -494,18 +494,18 @@@ OMAP_SYS_TIMER(4
  #endif
  
  #ifdef CONFIG_SOC_OMAP5
- OMAP_SYS_TIMER_INIT(5, 1, OMAP4_CLKEV_SOURCE, 2, OMAP4_MPU_SOURCE)
+ static void __init omap5_timer_init(void)
+ {
+       int err;
+       omap2_gp_clockevent_init(1, OMAP4_CLKEV_SOURCE);
+       omap2_clocksource_init(2, OMAP4_MPU_SOURCE);
+       realtime_counter_init();
+       err = arch_timer_of_register();
+       if (err)
+               pr_err("%s: arch_timer_register failed %d\n", __func__, err);
+ }
  OMAP_SYS_TIMER(5)
  #endif
  
index c8922bca68a468d5e461d29ae6966234c6ba9b02,12ab21d5511f5e07116d30e7be5ebd8f85a32628..074791306c9992225bcbc36ec7dbeb046fed1d0f
@@@ -23,7 -23,6 +23,7 @@@
  #include <linux/spi/spi.h>
  #include <linux/mfd/abx500/ab8500.h>
  #include <linux/regulator/ab8500.h>
 +#include <linux/regulator/fixed.h>
  #include <linux/mfd/tc3589x.h>
  #include <linux/mfd/tps6105x.h>
  #include <linux/mfd/abx500/ab8500-gpio.h>
@@@ -55,7 -54,6 +55,6 @@@
  #include "devices-db8500.h"
  #include "board-mop500.h"
  #include "board-mop500-regulators.h"
- #include "board-mop500-msp.h"
  
  static struct gpio_led snowball_led_array[] = {
        {
@@@ -77,23 -75,6 +76,23 @@@ static struct platform_device snowball_
        },
  };
  
 +static struct fixed_voltage_config snowball_gpio_en_3v3_data = {
 +       .supply_name            = "EN-3V3",
 +       .gpio                   = SNOWBALL_EN_3V3_ETH_GPIO,
 +       .microvolts             = 3300000,
 +       .enable_high            = 1,
 +       .init_data              = &gpio_en_3v3_regulator,
 +       .startup_delay          = 5000, /* 1200us */
 +};
 +
 +static struct platform_device snowball_gpio_en_3v3_regulator_dev = {
 +       .name   = "reg-fixed-voltage",
 +       .id     = 1,
 +       .dev    = {
 +               .platform_data  = &snowball_gpio_en_3v3_data,
 +       },
 +};
 +
  static struct ab8500_gpio_platform_data ab8500_gpio_pdata = {
        .gpio_base              = MOP500_AB8500_PIN_GPIO(1),
        .irq_base               = MOP500_AB8500_VIR_GPIO_IRQ_BASE,
@@@ -583,7 -564,6 +582,7 @@@ static struct platform_device *snowball
        &snowball_led_dev,
        &snowball_key_dev,
        &snowball_sbnet_dev,
 +      &snowball_gpio_en_3v3_regulator_dev,
  };
  
  static void __init mop500_init_machine(void)
        mop500_i2c_init(parent);
        mop500_sdi_init(parent);
        mop500_spi_init(parent);
-       mop500_msp_init(parent);
+       mop500_audio_init(parent);
        mop500_uart_init(parent);
  
        u8500_cryp1_hash1_init(parent);
@@@ -640,7 -620,7 +639,7 @@@ static void __init snowball_init_machin
        mop500_i2c_init(parent);
        snowball_sdi_init(parent);
        mop500_spi_init(parent);
-       mop500_msp_init(parent);
+       mop500_audio_init(parent);
        mop500_uart_init(parent);
  
        /* This board has full regulator constraints */
@@@ -672,7 -652,7 +671,7 @@@ static void __init hrefv60_init_machine
        mop500_i2c_init(parent);
        hrefv60_sdi_init(parent);
        mop500_spi_init(parent);
-       mop500_msp_init(parent);
+       mop500_audio_init(parent);
        mop500_uart_init(parent);
  
        i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
@@@ -724,12 -704,9 +723,9 @@@ MACHINE_EN
  
  #ifdef CONFIG_MACH_UX500_DT
  
- static struct platform_device *snowball_of_platform_devs[] __initdata = {
-       &snowball_led_dev,
-       &snowball_key_dev,
- };
  struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
+       /* Requires call-back bindings. */
+       OF_DEV_AUXDATA("arm,cortex-a9-pmu", 0, "arm-pmu", &db8500_pmu_platdata),
        /* Requires DMA and call-back bindings. */
        OF_DEV_AUXDATA("arm,pl011", 0x80120000, "uart0", &uart0_plat),
        OF_DEV_AUXDATA("arm,pl011", 0x80121000, "uart1", &uart1_plat),
        /* Requires DMA bindings. */
        OF_DEV_AUXDATA("arm,pl022", 0x80002000, "ssp0",  &ssp0_plat),
        OF_DEV_AUXDATA("arm,pl18x", 0x80126000, "sdi0",  &mop500_sdi0_data),
+       OF_DEV_AUXDATA("arm,pl18x", 0x80118000, "sdi1",  &mop500_sdi1_data),
+       OF_DEV_AUXDATA("arm,pl18x", 0x80005000, "sdi2",  &mop500_sdi2_data),
        OF_DEV_AUXDATA("arm,pl18x", 0x80114000, "sdi4",  &mop500_sdi4_data),
        /* Requires clock name bindings. */
        OF_DEV_AUXDATA("st,nomadik-gpio", 0x8012e000, "gpio.0", NULL),
        OF_DEV_AUXDATA("st,nomadik-i2c", 0x8012a000, "nmk-i2c.4", NULL),
        /* Requires device name bindings. */
        OF_DEV_AUXDATA("stericsson,nmk_pinctrl", 0, "pinctrl-db8500", NULL),
+       /* Requires clock name and DMA bindings. */
+       OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80123000,
+               "ux500-msp-i2s.0", &msp0_platform_data),
+       OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80124000,
+               "ux500-msp-i2s.1", &msp1_platform_data),
+       OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80117000,
+               "ux500-msp-i2s.2", &msp2_platform_data),
+       OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80125000,
+               "ux500-msp-i2s.3", &msp3_platform_data),
        {},
  };
  
@@@ -795,7 -783,7 +802,7 @@@ static void __init u8500_init_machine(v
                                ARRAY_SIZE(mop500_platform_devs));
  
                mop500_sdi_init(parent);
-               mop500_msp_init(parent);
+               mop500_audio_init(parent);
                i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
                i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
                i2c_register_board_info(2, mop500_i2c2_devices,
                mop500_uib_init();
  
        } else if (of_machine_is_compatible("calaosystems,snowball-a9500")) {
-               mop500_msp_init(parent);
+               mop500_of_audio_init(parent);
        } else if (of_machine_is_compatible("st-ericsson,hrefv60+")) {
                /*
                 * The HREFv60 board removed a GPIO expander and routed
                platform_add_devices(mop500_platform_devs,
                                ARRAY_SIZE(mop500_platform_devs));
  
-               hrefv60_sdi_init(parent);
-               mop500_msp_init(parent);
-               i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices);
-               i2c0_devs -= NUM_PRE_V60_I2C0_DEVICES;
-               i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs);
-               i2c_register_board_info(2, mop500_i2c2_devices,
-                                       ARRAY_SIZE(mop500_i2c2_devices));
                mop500_uib_init();
        }
  
index 3ce7d940fc3cfcf6dcbace5dbe27ec29357c177a,38b7f9c4788b4165f92d1570636b57842e735a6d..27a397f5a42cc6fa96b6a1bf27b0e172bbc83555
@@@ -18,8 -18,8 +18,8 @@@
  #include <linux/io.h>
  #include <linux/mfd/abx500/ab8500.h>
  
 -#include <asm/mach/map.h>
  #include <asm/pmu.h>
 +#include <asm/mach/map.h>
  #include <plat/gpio-nomadik.h>
  #include <mach/hardware.h>
  #include <mach/setup.h>
@@@ -80,7 -80,7 +80,7 @@@ void __init u8500_map_io(void
  
        iotable_init(u8500_common_io_desc, ARRAY_SIZE(u8500_common_io_desc));
  
 -      if (cpu_is_u9540())
 +      if (cpu_is_ux540_family())
                iotable_init(u9540_io_desc, ARRAY_SIZE(u9540_io_desc));
        else
                iotable_init(u8500_io_desc, ARRAY_SIZE(u8500_io_desc));
@@@ -122,7 -122,7 +122,7 @@@ struct arm_pmu_platdata db8500_pmu_plat
  
  static struct platform_device db8500_pmu_device = {
        .name                   = "arm-pmu",
 -      .id                     = ARM_PMU_DEVICE_CPU,
 +      .id                     = -1,
        .num_resources          = ARRAY_SIZE(db8500_pmu_resources),
        .resource               = db8500_pmu_resources,
        .dev.platform_data      = &db8500_pmu_platdata,
@@@ -138,10 -138,6 +138,6 @@@ static struct platform_device *platform
        &db8500_prcmu_device,
  };
  
- static struct platform_device *of_platform_devs[] __initdata = {
-       &u8500_dma40_device,
- };
  static resource_size_t __initdata db8500_gpio_base[] = {
        U8500_GPIOBANK0_BASE,
        U8500_GPIOBANK1_BASE,
@@@ -235,7 -231,6 +231,6 @@@ struct device * __init u8500_init_devic
  struct device * __init u8500_of_init_devices(void)
  {
        struct device *parent;
-       int i;
  
        parent = db8500_soc_device_init();
  
        platform_device_register_data(parent,
                "cpufreq-u8500", -1, NULL, 0);
  
-       for (i = 0; i < ARRAY_SIZE(of_platform_devs); i++)
-               of_platform_devs[i]->dev.parent = parent;
+       u8500_dma40_device.dev.parent = parent;
  
        /*
         * Devices to be DT:ed:
         *   db8500_pmu_device   = done
         *   db8500_prcmu_device = done
         */
-       platform_add_devices(of_platform_devs, ARRAY_SIZE(of_platform_devs));
+       platform_device_register(&u8500_dma40_device);
  
        return parent;
  }
index 9b9646c3673d8edcc9b93dffa318a2bf57180876,5857b9cd6eb99c1a5777b69952436f5eaac268a6..05330735f23fc63aa1186016ef31cebadcbdb62a
@@@ -615,6 -615,7 +615,7 @@@ int omap_hwmod_softreset(struct omap_hw
  
  int omap_hwmod_count_resources(struct omap_hwmod *oh);
  int omap_hwmod_fill_resources(struct omap_hwmod *oh, struct resource *res);
+ int omap_hwmod_fill_dma_resources(struct omap_hwmod *oh, struct resource *res);
  int omap_hwmod_get_resource_byname(struct omap_hwmod *oh, unsigned int type,
                                   const char *name, struct resource *res);
  
@@@ -658,7 -659,6 +659,7 @@@ extern int omap2420_hwmod_init(void)
  extern int omap2430_hwmod_init(void);
  extern int omap3xxx_hwmod_init(void);
  extern int omap44xx_hwmod_init(void);
 +extern int am33xx_hwmod_init(void);
  
  extern int __init omap_hwmod_register_links(struct omap_hwmod_ocp_if **ois);
  
index 5c93c09a80c2eb09dde882c23e5bc22b8c2f260f,6f5c58096819de7913ea707daf45cc03c960dba2..d5f617c542d30f302b959aeb3a82906d42a712ba
@@@ -1,3 -1,4 +1,3 @@@
 -
  /*
   * omap_device implementation
   *
@@@ -152,19 -153,21 +152,19 @@@ static int _omap_device_activate(struc
                act_lat = timespec_to_ns(&c);
  
                dev_dbg(&od->pdev->dev,
 -                      "omap_device: pm_lat %d: activate: elapsed time "
 -                      "%llu nsec\n", od->pm_lat_level, act_lat);
 +                      "omap_device: pm_lat %d: activate: elapsed time %llu nsec\n",
 +                      od->pm_lat_level, act_lat);
  
                if (act_lat > odpl->activate_lat) {
                        odpl->activate_lat_worst = act_lat;
                        if (odpl->flags & OMAP_DEVICE_LATENCY_AUTO_ADJUST) {
                                odpl->activate_lat = act_lat;
                                dev_dbg(&od->pdev->dev,
 -                                      "new worst case activate latency "
 -                                      "%d: %llu\n",
 +                                      "new worst case activate latency %d: %llu\n",
                                        od->pm_lat_level, act_lat);
                        } else
                                dev_warn(&od->pdev->dev,
 -                                       "activate latency %d "
 -                                       "higher than exptected. (%llu > %d)\n",
 +                                       "activate latency %d higher than expected. (%llu > %d)\n",
                                         od->pm_lat_level, act_lat,
                                         odpl->activate_lat);
                }
@@@ -217,19 -220,21 +217,19 @@@ static int _omap_device_deactivate(stru
                deact_lat = timespec_to_ns(&c);
  
                dev_dbg(&od->pdev->dev,
 -                      "omap_device: pm_lat %d: deactivate: elapsed time "
 -                      "%llu nsec\n", od->pm_lat_level, deact_lat);
 +                      "omap_device: pm_lat %d: deactivate: elapsed time %llu nsec\n",
 +                      od->pm_lat_level, deact_lat);
  
                if (deact_lat > odpl->deactivate_lat) {
                        odpl->deactivate_lat_worst = deact_lat;
                        if (odpl->flags & OMAP_DEVICE_LATENCY_AUTO_ADJUST) {
                                odpl->deactivate_lat = deact_lat;
                                dev_dbg(&od->pdev->dev,
 -                                      "new worst case deactivate latency "
 -                                      "%d: %llu\n",
 +                                      "new worst case deactivate latency %d: %llu\n",
                                        od->pm_lat_level, deact_lat);
                        } else
                                dev_warn(&od->pdev->dev,
 -                                       "deactivate latency %d "
 -                                       "higher than exptected. (%llu > %d)\n",
 +                                       "deactivate latency %d higher than expected. (%llu > %d)\n",
                                         od->pm_lat_level, deact_lat,
                                         odpl->deactivate_lat);
                }
@@@ -365,6 -370,14 +365,14 @@@ static int omap_device_build_from_dt(st
                goto odbfd_exit1;
        }
  
+       /* Fix up missing resource names */
+       for (i = 0; i < pdev->num_resources; i++) {
+               struct resource *r = &pdev->resource[i];
+               if (r->name == NULL)
+                       r->name = dev_name(&pdev->dev);
+       }
        if (of_get_property(node, "ti,no_idle_on_suspend", NULL))
                omap_device_disable_idle_on_suspend(pdev);
  
@@@ -380,21 -393,17 +388,21 @@@ static int _omap_device_notifier_call(s
                                      unsigned long event, void *dev)
  {
        struct platform_device *pdev = to_platform_device(dev);
 +      struct omap_device *od;
  
        switch (event) {
 -      case BUS_NOTIFY_ADD_DEVICE:
 -              if (pdev->dev.of_node)
 -                      omap_device_build_from_dt(pdev);
 -              break;
 -
        case BUS_NOTIFY_DEL_DEVICE:
                if (pdev->archdata.od)
                        omap_device_delete(pdev->archdata.od);
                break;
 +      case BUS_NOTIFY_ADD_DEVICE:
 +              if (pdev->dev.of_node)
 +                      omap_device_build_from_dt(pdev);
 +              /* fall through */
 +      default:
 +              od = to_omap_device(pdev);
 +              if (od)
 +                      od->_driver_status = event;
        }
  
        return NOTIFY_DONE;
@@@ -448,8 -457,8 +456,8 @@@ static int omap_device_count_resources(
        for (i = 0; i < od->hwmods_cnt; i++)
                c += omap_hwmod_count_resources(od->hwmods[i]);
  
 -      pr_debug("omap_device: %s: counted %d total resources across %d "
 -               "hwmods\n", od->pdev->name, c, od->hwmods_cnt);
 +      pr_debug("omap_device: %s: counted %d total resources across %d hwmods\n",
 +               od->pdev->name, c, od->hwmods_cnt);
  
        return c;
  }
@@@ -484,6 -493,33 +492,33 @@@ static int omap_device_fill_resources(s
        return 0;
  }
  
+ /**
+  * _od_fill_dma_resources - fill in array of struct resource with dma resources
+  * @od: struct omap_device *
+  * @res: pointer to an array of struct resource to be filled in
+  *
+  * Populate one or more empty struct resource pointed to by @res with
+  * the dma resource data for this omap_device @od.  Used by
+  * omap_device_alloc() after calling omap_device_count_resources().
+  *
+  * Ideally this function would not be needed at all.  If we have
+  * mechanism to get dma resources from DT.
+  *
+  * Returns 0.
+  */
+ static int _od_fill_dma_resources(struct omap_device *od,
+                                     struct resource *res)
+ {
+       int i, r;
+       for (i = 0; i < od->hwmods_cnt; i++) {
+               r = omap_hwmod_fill_dma_resources(od->hwmods[i], res);
+               res += r;
+       }
+       return 0;
+ }
  /**
   * omap_device_alloc - allocate an omap_device
   * @pdev: platform_device that will be included in this omap_device
@@@ -523,24 -559,44 +558,44 @@@ struct omap_device *omap_device_alloc(s
        od->hwmods = hwmods;
        od->pdev = pdev;
  
+       res_count = omap_device_count_resources(od);
        /*
-        * HACK: Ideally the resources from DT should match, and hwmod
-        * should just add the missing ones. Since the name is not
-        * properly populated by DT, stick to hwmod resources only.
+        * DT Boot:
+        *   OF framework will construct the resource structure (currently
+        *   does for MEM & IRQ resource) and we should respect/use these
+        *   resources, killing hwmod dependency.
+        *   If pdev->num_resources > 0, we assume that MEM & IRQ resources
+        *   have been allocated by OF layer already (through DTB).
+        *
+        * Non-DT Boot:
+        *   Here, pdev->num_resources = 0, and we should get all the
+        *   resources from hwmod.
+        *
+        * TODO: Once DMA resource is available from OF layer, we should
+        *   kill filling any resources from hwmod.
         */
-       if (pdev->num_resources && pdev->resource)
-               dev_warn(&pdev->dev, "%s(): resources already allocated %d\n",
-                       __func__, pdev->num_resources);
-       res_count = omap_device_count_resources(od);
-       if (res_count > 0) {
-               dev_dbg(&pdev->dev, "%s(): resources allocated from hwmod %d\n",
-                       __func__, res_count);
+       if (res_count > pdev->num_resources) {
+               /* Allocate resources memory to account for new resources */
                res = kzalloc(sizeof(struct resource) * res_count, GFP_KERNEL);
                if (!res)
                        goto oda_exit3;
  
-               omap_device_fill_resources(od, res);
+               /*
+                * If pdev->num_resources > 0, then assume that,
+                * MEM and IRQ resources will only come from DT and only
+                * fill DMA resource from hwmod layer.
+                */
+               if (pdev->num_resources && pdev->resource) {
+                       dev_dbg(&pdev->dev, "%s(): resources already allocated %d\n",
+                               __func__, res_count);
+                       memcpy(res, pdev->resource,
+                              sizeof(struct resource) * pdev->num_resources);
+                       _od_fill_dma_resources(od, &res[pdev->num_resources]);
+               } else {
+                       dev_dbg(&pdev->dev, "%s(): using resources from hwmod %d\n",
+                               __func__, res_count);
+                       omap_device_fill_resources(od, res);
+               }
  
                ret = platform_device_add_resources(pdev, res, res_count);
                kfree(res);
@@@ -751,10 -807,6 +806,10 @@@ static int _od_suspend_noirq(struct dev
        struct omap_device *od = to_omap_device(pdev);
        int ret;
  
 +      /* Don't attempt late suspend on a driver that is not bound */
 +      if (od->_driver_status != BUS_NOTIFY_BOUND_DRIVER)
 +              return 0;
 +
        ret = pm_generic_suspend_noirq(dev);
  
        if (!ret && !pm_runtime_status_suspended(dev)) {
@@@ -1128,41 -1180,3 +1183,41 @@@ static int __init omap_device_init(void
        return 0;
  }
  core_initcall(omap_device_init);
 +
 +/**
 + * omap_device_late_idle - idle devices without drivers
 + * @dev: struct device * associated with omap_device
 + * @data: unused
 + *
 + * Check the driver bound status of this device, and idle it
 + * if there is no driver attached.
 + */
 +static int __init omap_device_late_idle(struct device *dev, void *data)
 +{
 +      struct platform_device *pdev = to_platform_device(dev);
 +      struct omap_device *od = to_omap_device(pdev);
 +
 +      if (!od)
 +              return 0;
 +
 +      /*
 +       * If omap_device state is enabled, but has no driver bound,
 +       * idle it.
 +       */
 +      if (od->_driver_status != BUS_NOTIFY_BOUND_DRIVER) {
 +              if (od->_state == OMAP_DEVICE_STATE_ENABLED) {
 +                      dev_warn(dev, "%s: enabled but no driver.  Idling\n",
 +                               __func__);
 +                      omap_device_idle(pdev);
 +              }
 +      }
 +
 +      return 0;
 +}
 +
 +static int __init omap_device_late_init(void)
 +{
 +      bus_for_each_dev(&platform_bus_type, NULL, NULL, omap_device_late_idle);
 +      return 0;
 +}
 +late_initcall(omap_device_late_init);
diff --combined drivers/clk/Makefile
index 2b861625bdaeb84a46eda0e6df60194ce68151ee,e48e0da5a88467cd4d9fa45600355f15f10caf1a..71a25b91de0099b9375e434a233d48f7b1507929
@@@ -1,10 -1,8 +1,10 @@@
  # common clock types
 +obj-$(CONFIG_HAVE_CLK)                += clk-devres.o
  obj-$(CONFIG_CLKDEV_LOOKUP)   += clkdev.o
  obj-$(CONFIG_COMMON_CLK)      += clk.o clk-fixed-rate.o clk-gate.o \
                                   clk-mux.o clk-divider.o clk-fixed-factor.o
  # SoCs specific
 +obj-$(CONFIG_ARCH_BCM2835)    += clk-bcm2835.o
  obj-$(CONFIG_ARCH_NOMADIK)    += clk-nomadik.o
  obj-$(CONFIG_ARCH_HIGHBANK)   += clk-highbank.o
  obj-$(CONFIG_ARCH_MXS)                += mxs/
@@@ -18,6 -16,7 +18,7 @@@ obj-$(CONFIG_ARCH_MMP)                += mmp
  endif
  obj-$(CONFIG_MACH_LOONGSON1)  += clk-ls1x.o
  obj-$(CONFIG_ARCH_U8500)      += ux500/
+ obj-$(CONFIG_ARCH_VT8500)     += clk-vt8500.o
  
  # Chip specific
  obj-$(CONFIG_COMMON_CLK_WM831X) += clk-wm831x.o
index 1c169324e357e17e2cc246d319694be6169e07b4,f4814a889a5b461968295dbd2cb8cbdc32aa2dae..8af4b06e80f7088e88b8f7c9d0f5e428fbd197ba
@@@ -938,6 -938,67 +938,67 @@@ static void __init samsung_gpiolib_add(
                s3c_gpiolib_track(chip);
  }
  
+ #if defined(CONFIG_PLAT_S3C24XX) && defined(CONFIG_OF)
+ static int s3c24xx_gpio_xlate(struct gpio_chip *gc,
+                       const struct of_phandle_args *gpiospec, u32 *flags)
+ {
+       unsigned int pin;
+       if (WARN_ON(gc->of_gpio_n_cells < 3))
+               return -EINVAL;
+       if (WARN_ON(gpiospec->args_count < gc->of_gpio_n_cells))
+               return -EINVAL;
+       if (gpiospec->args[0] > gc->ngpio)
+               return -EINVAL;
+       pin = gc->base + gpiospec->args[0];
+       if (s3c_gpio_cfgpin(pin, S3C_GPIO_SFN(gpiospec->args[1])))
+               pr_warn("gpio_xlate: failed to set pin function\n");
+       if (s3c_gpio_setpull(pin, gpiospec->args[2] & 0xffff))
+               pr_warn("gpio_xlate: failed to set pin pull up/down\n");
+       if (flags)
+               *flags = gpiospec->args[2] >> 16;
+       return gpiospec->args[0];
+ }
+ static const struct of_device_id s3c24xx_gpio_dt_match[] __initdata = {
+       { .compatible = "samsung,s3c24xx-gpio", },
+       {}
+ };
+ static __init void s3c24xx_gpiolib_attach_ofnode(struct samsung_gpio_chip *chip,
+                                                u64 base, u64 offset)
+ {
+       struct gpio_chip *gc =  &chip->chip;
+       u64 address;
+       if (!of_have_populated_dt())
+               return;
+       address = chip->base ? base + ((u32)chip->base & 0xfff) : base + offset;
+       gc->of_node = of_find_matching_node_by_address(NULL,
+                       s3c24xx_gpio_dt_match, address);
+       if (!gc->of_node) {
+               pr_info("gpio: device tree node not found for gpio controller"
+                       " with base address %08llx\n", address);
+               return;
+       }
+       gc->of_gpio_n_cells = 3;
+       gc->of_xlate = s3c24xx_gpio_xlate;
+ }
+ #else
+ static __init void s3c24xx_gpiolib_attach_ofnode(struct samsung_gpio_chip *chip,
+                                                u64 base, u64 offset)
+ {
+       return;
+ }
+ #endif /* defined(CONFIG_PLAT_S3C24XX) && defined(CONFIG_OF) */
  static void __init s3c24xx_gpiolib_add_chips(struct samsung_gpio_chip *chip,
                                             int nr_chips, void __iomem *base)
  {
                        gc->direction_output = samsung_gpiolib_2bit_output;
  
                samsung_gpiolib_add(chip);
+               s3c24xx_gpiolib_attach_ofnode(chip, S3C24XX_PA_GPIO, i * 0x10);
        }
  }
  
@@@ -3131,6 -3194,46 +3194,6 @@@ samsung_gpio_pull_t s3c_gpio_getpull(un
  }
  EXPORT_SYMBOL(s3c_gpio_getpull);
  
 -/* gpiolib wrappers until these are totally eliminated */
 -
 -void s3c2410_gpio_pullup(unsigned int pin, unsigned int to)
 -{
 -      int ret;
 -
 -      WARN_ON(to);    /* should be none of these left */
 -
 -      if (!to) {
 -              /* if pull is enabled, try first with up, and if that
 -               * fails, try using down */
 -
 -              ret = s3c_gpio_setpull(pin, S3C_GPIO_PULL_UP);
 -              if (ret)
 -                      s3c_gpio_setpull(pin, S3C_GPIO_PULL_DOWN);
 -      } else {
 -              s3c_gpio_setpull(pin, S3C_GPIO_PULL_NONE);
 -      }
 -}
 -EXPORT_SYMBOL(s3c2410_gpio_pullup);
 -
 -void s3c2410_gpio_setpin(unsigned int pin, unsigned int to)
 -{
 -      /* do this via gpiolib until all users removed */
 -
 -      gpio_request(pin, "temporary");
 -      gpio_set_value(pin, to);
 -      gpio_free(pin);
 -}
 -EXPORT_SYMBOL(s3c2410_gpio_setpin);
 -
 -unsigned int s3c2410_gpio_getpin(unsigned int pin)
 -{
 -      struct samsung_gpio_chip *chip = samsung_gpiolib_getchip(pin);
 -      unsigned long offs = pin - chip->chip.base;
 -
 -      return __raw_readl(chip->base + 0x04) & (1 << offs);
 -}
 -EXPORT_SYMBOL(s3c2410_gpio_getpin);
 -
  #ifdef CONFIG_S5P_GPIO_DRVSTR
  s5p_gpio_drvstr_t s5p_gpio_get_drvstr(unsigned int pin)
  {