]> Git Repo - linux.git/commitdiff
Merge branch 'next/soc' into HEAD
authorOlof Johansson <[email protected]>
Mon, 1 Oct 2012 21:19:17 +0000 (14:19 -0700)
committerOlof Johansson <[email protected]>
Mon, 1 Oct 2012 21:19:17 +0000 (14:19 -0700)
Conflicts:
arch/arm/mach-ux500/clock.c
arch/arm/mach-ux500/cpu.c
drivers/clocksource/Makefile

20 files changed:
1  2 
MAINTAINERS
arch/arm/Kconfig
arch/arm/Makefile
arch/arm/mach-exynos/clock-exynos5.c
arch/arm/mach-imx/clk-imx51-imx53.c
arch/arm/mach-omap2/Makefile
arch/arm/mach-omap2/clkt_dpll.c
arch/arm/mach-omap2/dpll3xxx.c
arch/arm/mach-omap2/omap_hwmod.c
arch/arm/mach-shmobile/board-kzm9g.c
arch/arm/mach-shmobile/setup-sh73a0.c
arch/arm/mach-tegra/Makefile
arch/arm/mach-tegra/board-dt-tegra20.c
arch/arm/mach-ux500/cpu-db8500.c
arch/arm/mach-ux500/cpu.c
arch/arm/plat-omap/omap_device.c
arch/arm/plat-samsung/clock.c
arch/arm/plat-samsung/devs.c
drivers/clk/Makefile
drivers/clocksource/Makefile

diff --combined MAINTAINERS
index 8443eda055dd498e424331d1554609ae2dc60f92,9d3965cbf48cb2df26e4656085581435eba52b35..140dba10dd43c429653e19f31775e86336e1c67e
@@@ -912,12 -912,6 +912,12 @@@ W:       http://www.digriz.org.uk/ts78xx/kern
  S:    Maintained
  F:    arch/arm/mach-orion5x/ts78xx-*
  
 +ARM/MICREL KS8695 ARCHITECTURE
 +M:    Greg Ungerer <[email protected]>
 +L:    [email protected] (moderated for non-subscribers)
 +F:    arch/arm/mach-ks8695
 +S:    Odd Fixes
 +
  ARM/MIOA701 MACHINE SUPPORT
  M:    Robert Jarzmik <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
@@@ -1214,12 -1208,6 +1214,12 @@@ S:    Maintaine
  F:    arch/arm/mach-pxa/z2.c
  F:    arch/arm/mach-pxa/include/mach/z2.h
  
 +ARM64 PORT (AARCH64 ARCHITECTURE)
 +M:    Catalin Marinas <[email protected]>
 +L:    [email protected] (moderated for non-subscribers)
 +S:    Maintained
 +F:    arch/arm64/
 +
  ASC7621 HARDWARE MONITOR DRIVER
  M:    George Joseph <[email protected]>
  L:    [email protected]
  S:    Supported
  F:    drivers/net/ethernet/broadcom/bnx2x/
  
+ BROADCOM BCM2835 ARM ARCHICTURE
+ M:    Stephen Warren <[email protected]>
+ L:    [email protected] (moderated for non-subscribers)
+ T:    git git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-rpi.git
+ S:    Maintained
+ F:    arch/arm/mach-bcm2835/
+ F:    arch/arm/boot/dts/bcm2835*
+ F:    arch/arm/configs/bcm2835_defconfig
+ F:    drivers/*/*bcm2835*
  BROADCOM TG3 GIGABIT ETHERNET DRIVER
  M:    Matt Carlson <[email protected]>
  M:    Michael Chan <[email protected]>
@@@ -2870,9 -2868,7 +2880,9 @@@ F:      include/linux/firewire*.
  F:    tools/firewire/
  
  FIRMWARE LOADER (request_firmware)
 -S:    Orphan
 +M:    Ming Lei <[email protected]>
 +L:    [email protected]
 +S:    Maintained
  F:    Documentation/firmware_class/
  F:    drivers/base/firmware*.c
  F:    include/linux/firmware.h
@@@ -3565,12 -3561,11 +3575,12 @@@ K:   \b(ABS|SYN)_MT
  
  INTEL C600 SERIES SAS CONTROLLER DRIVER
  M:    Intel SCU Linux support <[email protected]>
 +M:    Lukasz Dorau <[email protected]>
 +M:    Maciej Patelczyk <[email protected]>
  M:    Dave Jiang <[email protected]>
 -M:    Ed Nadolski <[email protected]>
  L:    [email protected]
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/djbw/isci.git
 -S:    Maintained
 +T:    git git://git.code.sf.net/p/intel-sas/isci
 +S:    Supported
  F:    drivers/scsi/isci/
  F:    firmware/isci/
  
@@@ -3680,12 -3675,11 +3690,12 @@@ F:   Documentation/networking/README.ipw2
  F:    drivers/net/wireless/ipw2x00/
  
  INTEL(R) TRUSTED EXECUTION TECHNOLOGY (TXT)
 -M:    Joseph Cihula <[email protected]>
 +M:    Richard L Maliszewski <[email protected]>
 +M:    Gang Wei <[email protected]>
  M:    Shane Wang <[email protected]>
  L:    [email protected]
  W:    http://tboot.sourceforge.net
 -T:    Mercurial http://www.bughost.org/repos.hg/tboot.hg
 +T:    hg http://tboot.hg.sourceforge.net:8000/hgroot/tboot/tboot
  S:    Supported
  F:    Documentation/intel_txt.txt
  F:    include/linux/tboot.h
  S:    Maintained
  F:    drivers/mtd/devices/phram.c
  
 +PICOLCD HID DRIVER
 +M:    Bruno PrĂ©mont <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    drivers/hid/hid-picolcd*
 +
  PICOXCELL SUPPORT
  M:    Jamie Iles <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
@@@ -5564,8 -5552,6 +5574,8 @@@ F:      Documentation/devicetree/bindings/pw
  F:    include/linux/pwm.h
  F:    include/linux/of_pwm.h
  F:    drivers/pwm/
 +F:    drivers/video/backlight/pwm_bl.c
 +F:    include/linux/pwm_backlight.h
  
  PXA2xx/PXA3xx SUPPORT
  M:    Eric Miao <[email protected]>
@@@ -6799,14 -6785,14 +6809,14 @@@ F:   drivers/net/team
  F:    include/linux/if_team.h
  
  TEGRA SUPPORT
 -M:    Colin Cross <[email protected]>
 -M:    Olof Johansson <[email protected]>
  M:    Stephen Warren <[email protected]>
  L:    [email protected]
  Q:    http://patchwork.ozlabs.org/project/linux-tegra/list/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra.git
  S:    Supported
  F:    arch/arm/mach-tegra
 +F:    arch/arm/boot/dts/tegra*
 +F:    arch/arm/configs/tegra_defconfig
  
  TEHUTI ETHERNET DRIVER
  M:    Andy Gospodarek <[email protected]>
diff --combined arch/arm/Kconfig
index 884768cb5332c661333c9b2797629df9d85ded4d,171f184b089df5e4df845fa7131d48432b26cf76..a97adeccf558af3e5c53bfc28790f55218989c64
@@@ -273,12 -273,13 +273,12 @@@ config ARCH_INTEGRATO
        select ARM_AMBA
        select ARCH_HAS_CPUFREQ
        select COMMON_CLK
 -      select CLK_VERSATILE
 +      select COMMON_CLK_VERSATILE
        select HAVE_TCM
        select ICST
        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
  config ARCH_REALVIEW
        bool "ARM Ltd. RealView family"
        select ARM_AMBA
 -      select CLKDEV_LOOKUP
 -      select HAVE_MACH_CLKDEV
 +      select COMMON_CLK
 +      select COMMON_CLK_VERSATILE
        select ICST
        select GENERIC_CLOCKEVENTS
        select ARCH_WANT_OPTIONAL_GPIOLIB
        select PLAT_VERSATILE
 -      select PLAT_VERSATILE_CLOCK
        select PLAT_VERSATILE_CLCD
        select ARM_TIMER_SP804
        select GPIO_PL061 if GPIOLIB
@@@ -310,6 -312,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,6 -350,23 +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
@@@ -404,19 -424,21 +421,19 @@@ 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 CLKDEV_LOOKUP
 +      select COMMON_CLK
        select GENERIC_IRQ_CHIP
        select MIGHT_HAVE_CACHE_L2X0
        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"
@@@ -451,7 -473,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
@@@ -508,6 -530,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
@@@ -517,6 -540,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
@@@ -529,6 -553,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
@@@ -568,6 -593,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
@@@ -578,6 -604,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:
@@@ -604,6 -631,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:
@@@ -616,6 -644,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:
@@@ -640,9 -669,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.
@@@ -672,8 -700,10 +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).
@@@ -697,6 -727,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
@@@ -892,6 -930,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>).
@@@ -910,7 -949,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.
  
@@@ -1098,8 -1136,6 +1116,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"
@@@ -2289,7 -2325,7 +2307,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
diff --combined arch/arm/Makefile
index 74381a31ee4224e1992dab6f33336dfb7b319286,e9fde91cf5e88b32e8be9529cbec88e945c169df..f47618252e5dde0ce35c8619216c431162dde2b4
@@@ -136,6 -136,7 +136,7 @@@ textofs-$(CONFIG_ARCH_MSM8960) := 0x002
  # Machine directory name.  This list is sorted alphanumerically
  # by CONFIG_* macro name.
  machine-$(CONFIG_ARCH_AT91)           := at91
+ machine-$(CONFIG_ARCH_BCM2835)                := bcm2835
  machine-$(CONFIG_ARCH_BCMRING)                := bcmring
  machine-$(CONFIG_ARCH_CLPS711X)               := clps711x
  machine-$(CONFIG_ARCH_CNS3XXX)                := cns3xxx
@@@ -167,6 -168,7 +168,6 @@@ machine-$(CONFIG_ARCH_OMAP1)               := omap
  machine-$(CONFIG_ARCH_OMAP2PLUS)      := omap2
  machine-$(CONFIG_ARCH_ORION5X)                := orion5x
  machine-$(CONFIG_ARCH_PICOXCELL)      := picoxcell
 -machine-$(CONFIG_ARCH_PNX4008)                := pnx4008
  machine-$(CONFIG_ARCH_PRIMA2)         := prima2
  machine-$(CONFIG_ARCH_PXA)            := pxa
  machine-$(CONFIG_ARCH_REALVIEW)               := realview
index 3b00e299b6240e8cc15e470edc72a87e65c80903,404c53d8ca8e4c45e796e9a1c5ffb491c9bf14a9..618d0aaaa599a300eef0bd1b9da330666947fe8f
@@@ -166,6 -166,11 +166,6 @@@ static int exynos5_clk_ip_gen_ctrl(stru
        return s5p_gatectrl(EXYNOS5_CLKGATE_IP_GEN, clk, enable);
  }
  
 -static int exynos5_clk_ip_gps_ctrl(struct clk *clk, int enable)
 -{
 -      return s5p_gatectrl(EXYNOS5_CLKGATE_IP_GPS, clk, enable);
 -}
 -
  static int exynos5_clk_ip_mfc_ctrl(struct clk *clk, int enable)
  {
        return s5p_gatectrl(EXYNOS5_CLKGATE_IP_MFC, clk, enable);
@@@ -666,6 -671,10 +666,6 @@@ static struct clk exynos5_init_clocks_o
                .name           = "usbotg",
                .enable         = exynos5_clk_ip_fsys_ctrl,
                .ctrlbit        = (1 << 7),
 -      }, {
 -              .name           = "gps",
 -              .enable         = exynos5_clk_ip_gps_ctrl,
 -              .ctrlbit        = ((1 << 3) | (1 << 2) | (1 << 0)),
        }, {
                .name           = "nfcon",
                .enable         = exynos5_clk_ip_fsys_ctrl,
@@@ -882,6 -891,13 +882,13 @@@ static struct clk exynos5_clk_mdma1 = 
        .ctrlbit        = (1 << 4),
  };
  
+ static struct clk exynos5_clk_fimd1 = {
+       .name           = "fimd",
+       .devname        = "exynos5-fb.1",
+       .enable         = exynos5_clk_ip_disp1_ctrl,
+       .ctrlbit        = (1 << 0),
+ };
  struct clk *exynos5_clkset_group_list[] = {
        [0] = &clk_ext_xtal_mux,
        [1] = NULL,
@@@ -1111,6 -1127,18 +1118,18 @@@ static struct clksrc_clk exynos5_clk_sc
        .reg_div = { .reg = EXYNOS5_CLKDIV_PERIC2, .shift = 8, .size = 8 },
  };
  
+ struct clksrc_clk exynos5_clk_sclk_fimd1 = {
+       .clk    = {
+               .name           = "sclk_fimd",
+               .devname        = "exynos5-fb.1",
+               .enable         = exynos5_clksrc_mask_disp1_0_ctrl,
+               .ctrlbit        = (1 << 0),
+       },
+       .sources = &exynos5_clkset_group,
+       .reg_src = { .reg = EXYNOS5_CLKSRC_DISP1_0, .shift = 0, .size = 4 },
+       .reg_div = { .reg = EXYNOS5_CLKDIV_DISP1_0, .shift = 0, .size = 4 },
+ };
  static struct clksrc_clk exynos5_clksrcs[] = {
        {
                .clk    = {
                        .ctrlbit        = (1 << 16),
                },
                .reg_div = { .reg = EXYNOS5_CLKDIV_FSYS3, .shift = 8, .size = 8 },
-       }, {
-               .clk    = {
-                       .name           = "sclk_fimd",
-                       .devname        = "s3cfb.1",
-                       .enable         = exynos5_clksrc_mask_disp1_0_ctrl,
-                       .ctrlbit        = (1 << 0),
-               },
-               .sources = &exynos5_clkset_group,
-               .reg_src = { .reg = EXYNOS5_CLKSRC_DISP1_0, .shift = 0, .size = 4 },
-               .reg_div = { .reg = EXYNOS5_CLKDIV_DISP1_0, .shift = 0, .size = 4 },
        }, {
                .clk    = {
                        .name           = "aclk_266_gscl",
@@@ -1231,12 -1249,14 +1240,14 @@@ static struct clksrc_clk *exynos5_syscl
        &exynos5_clk_mdout_spi0,
        &exynos5_clk_mdout_spi1,
        &exynos5_clk_mdout_spi2,
+       &exynos5_clk_sclk_fimd1,
  };
  
  static struct clk *exynos5_clk_cdev[] = {
        &exynos5_clk_pdma0,
        &exynos5_clk_pdma1,
        &exynos5_clk_mdma1,
+       &exynos5_clk_fimd1,
  };
  
  static struct clksrc_clk *exynos5_clksrc_cdev[] = {
@@@ -1265,6 -1285,7 +1276,7 @@@ static struct clk_lookup exynos5_clk_lo
        CLKDEV_INIT("dma-pl330.0", "apb_pclk", &exynos5_clk_pdma0),
        CLKDEV_INIT("dma-pl330.1", "apb_pclk", &exynos5_clk_pdma1),
        CLKDEV_INIT("dma-pl330.2", "apb_pclk", &exynos5_clk_mdma1),
+       CLKDEV_INIT("exynos5-fb.1", "lcd", &exynos5_clk_fimd1),
  };
  
  static unsigned long exynos5_epll_get_rate(struct clk *clk)
index f89c4403a9223d1f3a3379aba50847050d67e970,db70d23f95fa5a1de788b7701a4bb0d2aece2351..e5165a84f93f7ff8467f5b7c981a083518fffff4
@@@ -39,16 -39,17 +39,17 @@@ static const char *ssi_ext2_com_sels[] 
  static const char *emi_slow_sel[] = { "main_bus", "ahb", };
  static const char *usb_phy_sel_str[] = { "osc", "usb_phy_podf", };
  static const char *mx51_ipu_di0_sel[] = { "di_pred", "osc", "ckih1", "tve_di", };
 -static const char *mx53_ipu_di0_sel[] = { "di_pred", "osc", "ckih1", "di_pll4_podf", "dummy", "ldb_di0", };
 +static const char *mx53_ipu_di0_sel[] = { "di_pred", "osc", "ckih1", "di_pll4_podf", "dummy", "ldb_di0_gate", };
  static const char *mx53_ldb_di0_sel[] = { "pll3_sw", "pll4_sw", };
  static const char *mx51_ipu_di1_sel[] = { "di_pred", "osc", "ckih1", "tve_di", "ipp_di1", };
 -static const char *mx53_ipu_di1_sel[] = { "di_pred", "osc", "ckih1", "tve_di", "ipp_di1", "ldb_di1", };
 +static const char *mx53_ipu_di1_sel[] = { "di_pred", "osc", "ckih1", "tve_di", "ipp_di1", "ldb_di1_gate", };
  static const char *mx53_ldb_di1_sel[] = { "pll3_sw", "pll4_sw", };
  static const char *mx51_tve_ext_sel[] = { "osc", "ckih1", };
  static const char *mx53_tve_ext_sel[] = { "pll4_sw", "ckih1", };
  static const char *tve_sel[] = { "tve_pred", "tve_ext_sel", };
  static const char *ipu_sel[] = { "axi_a", "axi_b", "emi_slow_gate", "ahb", };
  static const char *vpu_sel[] = { "axi_a", "axi_b", "emi_slow_gate", "ahb", };
+ static const char *mx53_can_sel[] = { "ipg", "ckih1", "ckih2", "lp_apm", };
  
  enum imx5_clks {
        dummy, ckil, osc, ckih1, ckih2, ahb, ipg, axi_a, axi_b, uart_pred,
@@@ -82,6 -83,7 +83,7 @@@
        ssi_ext1_podf, ssi_ext2_pred, ssi_ext2_podf, ssi1_root_gate,
        ssi2_root_gate, ssi3_root_gate, ssi_ext1_gate, ssi_ext2_gate,
        epit1_ipg_gate, epit1_hf_gate, epit2_ipg_gate, epit2_hf_gate,
+       can_sel, can1_serial_gate, can1_ipg_gate,
        clk_max
  };
  
@@@ -421,8 -423,12 +423,12 @@@ int __init mx53_clocks_init(unsigned lo
        clk[esdhc4_per_gate] = imx_clk_gate2("esdhc4_per_gate", "esdhc_d_sel", MXC_CCM_CCGR3, 14);
        clk[usb_phy1_gate] = imx_clk_gate2("usb_phy1_gate", "usb_phy_sel", MXC_CCM_CCGR4, 10);
        clk[usb_phy2_gate] = imx_clk_gate2("usb_phy2_gate", "usb_phy_sel", MXC_CCM_CCGR4, 12);
-       clk[can2_serial_gate] = imx_clk_gate2("can2_serial_gate", "ipg", MXC_CCM_CCGR4, 6);
-       clk[can2_ipg_gate] = imx_clk_gate2("can2_ipg_gate", "ipg", MXC_CCM_CCGR4, 8);
+       clk[can_sel] = imx_clk_mux("can_sel", MXC_CCM_CSCMR2, 6, 2,
+                               mx53_can_sel, ARRAY_SIZE(mx53_can_sel));
+       clk[can1_serial_gate] = imx_clk_gate2("can1_serial_gate", "can_sel", MXC_CCM_CCGR6, 22);
+       clk[can1_ipg_gate] = imx_clk_gate2("can1_ipg_gate", "ipg", MXC_CCM_CCGR6, 20);
+       clk[can2_serial_gate] = imx_clk_gate2("can2_serial_gate", "can_sel", MXC_CCM_CCGR4, 8);
+       clk[can2_ipg_gate] = imx_clk_gate2("can2_ipg_gate", "ipg", MXC_CCM_CCGR4, 6);
        clk[i2c3_gate] = imx_clk_gate2("i2c3_gate", "per_root", MXC_CCM_CCGR1, 22);
  
        for (i = 0; i < ARRAY_SIZE(clk); i++)
        clk_register_clkdev(clk[ssi1_ipg_gate], NULL, "63fcc000.ssi");
        clk_register_clkdev(clk[ssi2_ipg_gate], NULL, "50014000.ssi");
        clk_register_clkdev(clk[ssi3_ipg_gate], NULL, "63fd0000.ssi");
+       clk_register_clkdev(clk[can1_ipg_gate], "ipg", "53fc8000.can");
+       clk_register_clkdev(clk[can1_serial_gate], "per", "53fc8000.can");
+       clk_register_clkdev(clk[can2_ipg_gate], "ipg", "53fcc000.can");
+       clk_register_clkdev(clk[can2_serial_gate], "per", "53fcc000.can");
  
        /* set SDHC root clock to 200MHZ*/
        clk_set_rate(clk[esdhc_a_podf], 200000000);
index 7706fdfd0252cd709dff1425f787eff0b7c5d0f0,f629df13f1573dbd33ec69a249fefac819b1baee..845202358ddcc406f048d9e9de4e508bae2485c5
@@@ -4,30 -4,36 +4,30 @@@
  
  # Common support
  obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer.o pm.o \
 -       common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o
 +       common.o gpio.o dma.o wd_timer.o display.o i2c.o hdq1w.o omap_hwmod.o
  
 -omap-2-3-common                               = irq.o
 -hwmod-common                          = omap_hwmod.o \
 -                                        omap_hwmod_common_data.o
 -clock-common                          = clock.o clock_common_data.o \
 -                                        clkt_dpll.o clkt_clksel.o
 -secure-common                         = omap-smc.o omap-secure.o
 +# INTCPS IP block support - XXX should be moved to drivers/
 +obj-$(CONFIG_ARCH_OMAP2)              += irq.o
 +obj-$(CONFIG_ARCH_OMAP3)              += irq.o
 +obj-$(CONFIG_SOC_AM33XX)              += irq.o
  
 -obj-$(CONFIG_ARCH_OMAP2) += $(omap-2-3-common) $(hwmod-common)
 -obj-$(CONFIG_ARCH_OMAP3) += $(omap-2-3-common) $(hwmod-common) $(secure-common)
 -obj-$(CONFIG_ARCH_OMAP4) += prm44xx.o $(hwmod-common) $(secure-common)
 -obj-$(CONFIG_SOC_AM33XX) += irq.o $(hwmod-common)
 -obj-$(CONFIG_SOC_OMAP5)        += prm44xx.o $(hwmod-common) $(secure-common)
 +# Secure monitor API support
 +obj-$(CONFIG_ARCH_OMAP3)              += omap-smc.o omap-secure.o
 +obj-$(CONFIG_ARCH_OMAP4)              += omap-smc.o omap-secure.o
 +obj-$(CONFIG_SOC_OMAP5)                       += omap-smc.o omap-secure.o
  
  ifneq ($(CONFIG_SND_OMAP_SOC_MCBSP),)
  obj-y += mcbsp.o
  endif
  
 -obj-$(CONFIG_TWL4030_CORE) += omap_twl.o
 -obj-$(CONFIG_SOC_HAS_OMAP2_SDRC)      += sdrc.o
 +obj-$(CONFIG_TWL4030_CORE)            += omap_twl.o
  
  # SMP support ONLY available for OMAP4
  
  obj-$(CONFIG_SMP)                     += omap-smp.o omap-headsmp.o
  obj-$(CONFIG_HOTPLUG_CPU)             += omap-hotplug.o
 -omap-4-5-common                               =  omap4-common.o omap-wakeupgen.o \
 -                                         sleep44xx.o
 -obj-$(CONFIG_ARCH_OMAP4)              += $(omap-4-5-common)
 -obj-$(CONFIG_SOC_OMAP5)                       += $(omap-4-5-common)
 +obj-$(CONFIG_ARCH_OMAP4)              += omap4-common.o omap-wakeupgen.o
 +obj-$(CONFIG_SOC_OMAP5)                       += omap4-common.o omap-wakeupgen.o
  
  plus_sec := $(call as-instr,.arch_extension sec,+sec)
  AFLAGS_omap-headsmp.o                 :=-Wa,-march=armv7-a$(plus_sec)
@@@ -52,7 -58,6 +52,7 @@@ obj-$(CONFIG_ARCH_OMAP4)              += mux44xx.
  # SMS/SDRC
  obj-$(CONFIG_ARCH_OMAP2)              += sdrc2xxx.o
  # obj-$(CONFIG_ARCH_OMAP3)            += sdrc3xxx.o
 +obj-$(CONFIG_SOC_HAS_OMAP2_SDRC)      += sdrc.o
  
  # OPP table initialization
  ifeq ($(CONFIG_PM_OPP),y)
@@@ -63,15 -68,15 +63,15 @@@ endi
  
  # Power Management
  ifeq ($(CONFIG_PM),y)
 -obj-$(CONFIG_ARCH_OMAP2)              += pm24xx.o
 -obj-$(CONFIG_ARCH_OMAP2)              += sleep24xx.o
 +obj-$(CONFIG_ARCH_OMAP2)              += pm24xx.o sleep24xx.o
  obj-$(CONFIG_ARCH_OMAP3)              += pm34xx.o sleep34xx.o
  obj-$(CONFIG_ARCH_OMAP4)              += pm44xx.o omap-mpuss-lowpower.o
 -obj-$(CONFIG_SOC_OMAP5)                       += omap-mpuss-lowpower.o
 +obj-$(CONFIG_ARCH_OMAP4)              += sleep44xx.o
 +obj-$(CONFIG_SOC_OMAP5)                       += omap-mpuss-lowpower.o sleep44xx.o
  obj-$(CONFIG_PM_DEBUG)                        += pm-debug.o
  
  obj-$(CONFIG_POWER_AVS_OMAP)          += sr_device.o
 -obj-$(CONFIG_POWER_AVS_OMAP_CLASS3)    += smartreflex-class3.o
 +obj-$(CONFIG_POWER_AVS_OMAP_CLASS3)   += smartreflex-class3.o
  
  AFLAGS_sleep24xx.o                    :=-Wa,-march=armv6
  AFLAGS_sleep34xx.o                    :=-Wa,-march=armv7-a$(plus_sec)
@@@ -83,76 -88,92 +83,76 @@@ endi
  endif
  
  ifeq ($(CONFIG_CPU_IDLE),y)
 -obj-$(CONFIG_ARCH_OMAP3)                += cpuidle34xx.o
 -obj-$(CONFIG_ARCH_OMAP4)                += cpuidle44xx.o
 +obj-$(CONFIG_ARCH_OMAP3)              += cpuidle34xx.o
 +obj-$(CONFIG_ARCH_OMAP4)              += cpuidle44xx.o
  endif
  
  # PRCM
 -omap-prcm-4-5-common                  =  prcm.o cminst44xx.o cm44xx.o \
 -                                         prcm_mpu44xx.o prminst44xx.o \
 -                                         vc44xx_data.o vp44xx_data.o
 -obj-y                                 += prm_common.o
 -obj-$(CONFIG_ARCH_OMAP2)              += prcm.o cm2xxx_3xxx.o prm2xxx_3xxx.o
 -obj-$(CONFIG_ARCH_OMAP3)              += prcm.o cm2xxx_3xxx.o prm2xxx_3xxx.o
 +obj-y                                 += prcm.o prm_common.o
 +obj-$(CONFIG_ARCH_OMAP2)              += cm2xxx_3xxx.o prm2xxx_3xxx.o
 +obj-$(CONFIG_ARCH_OMAP3)              += cm2xxx_3xxx.o prm2xxx_3xxx.o
  obj-$(CONFIG_ARCH_OMAP3)              += vc3xxx_data.o vp3xxx_data.o
 -obj-$(CONFIG_SOC_AM33XX)              += prcm.o prm33xx.o cm33xx.o
 -obj-$(CONFIG_ARCH_OMAP4)              += $(omap-prcm-4-5-common) prm44xx.o
 +obj-$(CONFIG_SOC_AM33XX)              += prm33xx.o cm33xx.o
 +omap-prcm-4-5-common                  =  cminst44xx.o cm44xx.o prm44xx.o \
 +                                         prcm_mpu44xx.o prminst44xx.o \
 +                                         vc44xx_data.o vp44xx_data.o \
 +                                         prm44xx.o
 +obj-$(CONFIG_ARCH_OMAP4)              += $(omap-prcm-4-5-common)
  obj-$(CONFIG_SOC_OMAP5)                       += $(omap-prcm-4-5-common)
  
  # OMAP voltage domains
 -voltagedomain-common                  := voltage.o vc.o vp.o
 -obj-$(CONFIG_ARCH_OMAP2)              += $(voltagedomain-common)
 +obj-y                                 += voltage.o vc.o vp.o
  obj-$(CONFIG_ARCH_OMAP2)              += voltagedomains2xxx_data.o
 -obj-$(CONFIG_ARCH_OMAP3)              += $(voltagedomain-common)
  obj-$(CONFIG_ARCH_OMAP3)              += voltagedomains3xxx_data.o
 -obj-$(CONFIG_ARCH_OMAP4)              += $(voltagedomain-common)
  obj-$(CONFIG_ARCH_OMAP4)              += voltagedomains44xx_data.o
 -obj-$(CONFIG_SOC_AM33XX)              += $(voltagedomain-common)
 -obj-$(CONFIG_SOC_AM33XX)                += voltagedomains33xx_data.o
 -obj-$(CONFIG_SOC_OMAP5)                       += $(voltagedomain-common)
 +obj-$(CONFIG_SOC_AM33XX)              += voltagedomains33xx_data.o
  
  # OMAP powerdomain framework
 -powerdomain-common                    += powerdomain.o powerdomain-common.o
 -obj-$(CONFIG_ARCH_OMAP2)              += $(powerdomain-common)
 +obj-y                                 += powerdomain.o powerdomain-common.o
  obj-$(CONFIG_ARCH_OMAP2)              += powerdomains2xxx_data.o
  obj-$(CONFIG_ARCH_OMAP2)              += powerdomain2xxx_3xxx.o
  obj-$(CONFIG_ARCH_OMAP2)              += powerdomains2xxx_3xxx_data.o
 -obj-$(CONFIG_ARCH_OMAP3)              += $(powerdomain-common)
  obj-$(CONFIG_ARCH_OMAP3)              += powerdomain2xxx_3xxx.o
  obj-$(CONFIG_ARCH_OMAP3)              += powerdomains3xxx_data.o
  obj-$(CONFIG_ARCH_OMAP3)              += powerdomains2xxx_3xxx_data.o
 -obj-$(CONFIG_ARCH_OMAP4)              += $(powerdomain-common)
  obj-$(CONFIG_ARCH_OMAP4)              += powerdomain44xx.o
  obj-$(CONFIG_ARCH_OMAP4)              += powerdomains44xx_data.o
 -obj-$(CONFIG_SOC_AM33XX)              += $(powerdomain-common)
  obj-$(CONFIG_SOC_AM33XX)              += powerdomain33xx.o
  obj-$(CONFIG_SOC_AM33XX)              += powerdomains33xx_data.o
 -obj-$(CONFIG_SOC_OMAP5)                       += $(powerdomain-common)
  obj-$(CONFIG_SOC_OMAP5)                       += powerdomain44xx.o
  
  # PRCM clockdomain control
 -clockdomain-common                    += clockdomain.o
 -obj-$(CONFIG_ARCH_OMAP2)              += $(clockdomain-common)
 +obj-y                                 += clockdomain.o
  obj-$(CONFIG_ARCH_OMAP2)              += clockdomain2xxx_3xxx.o
  obj-$(CONFIG_ARCH_OMAP2)              += clockdomains2xxx_3xxx_data.o
  obj-$(CONFIG_SOC_OMAP2420)            += clockdomains2420_data.o
  obj-$(CONFIG_SOC_OMAP2430)            += clockdomains2430_data.o
 -obj-$(CONFIG_ARCH_OMAP3)              += $(clockdomain-common)
  obj-$(CONFIG_ARCH_OMAP3)              += clockdomain2xxx_3xxx.o
  obj-$(CONFIG_ARCH_OMAP3)              += clockdomains2xxx_3xxx_data.o
  obj-$(CONFIG_ARCH_OMAP3)              += clockdomains3xxx_data.o
 -obj-$(CONFIG_ARCH_OMAP4)              += $(clockdomain-common)
  obj-$(CONFIG_ARCH_OMAP4)              += clockdomain44xx.o
  obj-$(CONFIG_ARCH_OMAP4)              += clockdomains44xx_data.o
 -obj-$(CONFIG_SOC_AM33XX)              += $(clockdomain-common)
  obj-$(CONFIG_SOC_AM33XX)              += clockdomain33xx.o
  obj-$(CONFIG_SOC_AM33XX)              += clockdomains33xx_data.o
 -obj-$(CONFIG_SOC_OMAP5)                       += $(clockdomain-common)
  obj-$(CONFIG_SOC_OMAP5)                       += clockdomain44xx.o
  
  # Clock framework
 -obj-$(CONFIG_ARCH_OMAP2)              += $(clock-common) clock2xxx.o
 -obj-$(CONFIG_ARCH_OMAP2)              += clkt2xxx_sys.o
 -obj-$(CONFIG_ARCH_OMAP2)              += clkt2xxx_dpllcore.o
 +obj-y                                 += clock.o clock_common_data.o \
 +                                         clkt_dpll.o clkt_clksel.o
 +obj-$(CONFIG_ARCH_OMAP2)              += clock2xxx.o
 +obj-$(CONFIG_ARCH_OMAP2)              += clkt2xxx_dpllcore.o clkt2xxx_sys.o
  obj-$(CONFIG_ARCH_OMAP2)              += clkt2xxx_virt_prcm_set.o
  obj-$(CONFIG_ARCH_OMAP2)              += clkt2xxx_apll.o clkt2xxx_osc.o
  obj-$(CONFIG_ARCH_OMAP2)              += clkt2xxx_dpll.o clkt_iclk.o
  obj-$(CONFIG_SOC_OMAP2420)            += clock2420_data.o
  obj-$(CONFIG_SOC_OMAP2430)            += clock2430.o clock2430_data.o
 -obj-$(CONFIG_ARCH_OMAP3)              += $(clock-common) clock3xxx.o
 +obj-$(CONFIG_ARCH_OMAP3)              += clock3xxx.o
  obj-$(CONFIG_ARCH_OMAP3)              += clock34xx.o clkt34xx_dpll3m2.o
 -obj-$(CONFIG_ARCH_OMAP3)              += clock3517.o clock36xx.o
 +obj-$(CONFIG_ARCH_OMAP3)              += clock3517.o clock36xx.o clkt_iclk.o
  obj-$(CONFIG_ARCH_OMAP3)              += dpll3xxx.o clock3xxx_data.o
 -obj-$(CONFIG_ARCH_OMAP3)              += clkt_iclk.o
 -obj-$(CONFIG_ARCH_OMAP4)              += $(clock-common) clock44xx_data.o
 +obj-$(CONFIG_ARCH_OMAP4)              += clock44xx_data.o
  obj-$(CONFIG_ARCH_OMAP4)              += dpll3xxx.o dpll44xx.o
 -obj-$(CONFIG_SOC_AM33XX)              += $(clock-common) dpll3xxx.o
 -obj-$(CONFIG_SOC_AM33XX)              += clock33xx_data.o
 -obj-$(CONFIG_SOC_OMAP5)                       += $(clock-common)
 +obj-$(CONFIG_SOC_AM33XX)              += dpll3xxx.o clock33xx_data.o
  obj-$(CONFIG_SOC_OMAP5)                       += dpll3xxx.o dpll44xx.o
  
  # OMAP2 clock rate set data (old "OPP" data)
@@@ -160,7 -181,6 +160,7 @@@ obj-$(CONFIG_SOC_OMAP2420)         += opp2420_
  obj-$(CONFIG_SOC_OMAP2430)            += opp2430_data.o
  
  # hwmod data
 +obj-y                                 += omap_hwmod_common_data.o
  obj-$(CONFIG_SOC_OMAP2420)            += omap_hwmod_2xxx_ipblock_data.o
  obj-$(CONFIG_SOC_OMAP2420)            += omap_hwmod_2xxx_3xxx_ipblock_data.o
  obj-$(CONFIG_SOC_OMAP2420)            += omap_hwmod_2xxx_interconnect_data.o
@@@ -174,6 -194,7 +174,7 @@@ obj-$(CONFIG_SOC_OMAP2430)         += omap_hwm
  obj-$(CONFIG_ARCH_OMAP3)              += omap_hwmod_2xxx_3xxx_ipblock_data.o
  obj-$(CONFIG_ARCH_OMAP3)              += omap_hwmod_2xxx_3xxx_interconnect_data.o
  obj-$(CONFIG_ARCH_OMAP3)              += omap_hwmod_3xxx_data.o
+ obj-$(CONFIG_SOC_AM33XX)              += omap_hwmod_33xx_data.o
  obj-$(CONFIG_ARCH_OMAP4)              += omap_hwmod_44xx_data.o
  
  # EMU peripherals
@@@ -209,10 -230,10 +210,10 @@@ obj-$(CONFIG_MACH_OMAP_H4)              += board-h4
  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_DEVKIT8000)         += board-devkit8000.o
  obj-$(CONFIG_MACH_OMAP_LDP)           += board-ldp.o
 -obj-$(CONFIG_MACH_OMAP3530_LV_SOM)      += board-omap3logic.o
 -obj-$(CONFIG_MACH_OMAP3_TORPEDO)        += board-omap3logic.o
 +obj-$(CONFIG_MACH_OMAP3530_LV_SOM)    += board-omap3logic.o
 +obj-$(CONFIG_MACH_OMAP3_TORPEDO)      += board-omap3logic.o
  obj-$(CONFIG_MACH_ENCORE)             += board-omap3encore.o
  obj-$(CONFIG_MACH_OVERO)              += board-overo.o
  obj-$(CONFIG_MACH_OMAP3EVM)           += board-omap3evm.o
index a3b60c7b9aa88f7fb36b52fb99f4f60914064e17,0bf0ec3e352c2fc26fd7805766ce1f818423b65d..83b658bf385ae4b01c8ea279313016fa991f91d2
@@@ -105,13 -105,13 +105,13 @@@ static int _dpll_test_fint(struct clk *
        }
  
        if (fint < fint_min) {
 -              pr_debug("rejecting n=%d due to Fint failure, "
 -                       "lowering max_divider\n", n);
 +              pr_debug("rejecting n=%d due to Fint failure, lowering max_divider\n",
 +                       n);
                dd->max_divider = n;
                ret = DPLL_FINT_UNDERFLOW;
        } else if (fint > fint_max) {
 -              pr_debug("rejecting n=%d due to Fint failure, "
 -                       "boosting min_divider\n", n);
 +              pr_debug("rejecting n=%d due to Fint failure, boosting min_divider\n",
 +                       n);
                dd->min_divider = n;
                ret = DPLL_FINT_INVALID;
        } else if (cpu_is_omap3430() && fint > OMAP3430_DPLL_FINT_BAND1_MAX &&
@@@ -211,7 -211,7 +211,7 @@@ void omap2_init_dpll_parent(struct clk 
                if (v == OMAP3XXX_EN_DPLL_LPBYPASS ||
                    v == OMAP3XXX_EN_DPLL_FRBYPASS)
                        clk_reparent(clk, dd->clk_bypass);
-       } else if (cpu_is_omap44xx()) {
+       } else if (soc_is_am33xx() || cpu_is_omap44xx()) {
                if (v == OMAP4XXX_EN_DPLL_LPBYPASS ||
                    v == OMAP4XXX_EN_DPLL_FRBYPASS ||
                    v == OMAP4XXX_EN_DPLL_MNBYPASS)
@@@ -257,7 -257,7 +257,7 @@@ u32 omap2_get_dpll_rate(struct clk *clk
                if (v == OMAP3XXX_EN_DPLL_LPBYPASS ||
                    v == OMAP3XXX_EN_DPLL_FRBYPASS)
                        return dd->clk_bypass->rate;
-       } else if (cpu_is_omap44xx()) {
+       } else if (soc_is_am33xx() || cpu_is_omap44xx()) {
                if (v == OMAP4XXX_EN_DPLL_LPBYPASS ||
                    v == OMAP4XXX_EN_DPLL_FRBYPASS ||
                    v == OMAP4XXX_EN_DPLL_MNBYPASS)
index ef666455c13a9ea1f9bff8887b615c97b7119111,f48043dbac8a9cfd38b18a1463861f3917654521..27d79deb4ba2c5f36158c266a35f2774fb251977
@@@ -311,7 -311,7 +311,7 @@@ static int omap3_noncore_dpll_program(s
         * Set jitter correction. No jitter correction for OMAP4 and 3630
         * since freqsel field is no longer present
         */
-       if (!cpu_is_omap44xx() && !cpu_is_omap3630()) {
+       if (!soc_is_am33xx() && !cpu_is_omap44xx() && !cpu_is_omap3630()) {
                v = __raw_readl(dd->control_reg);
                v &= ~dd->freqsel_mask;
                v |= freqsel << __ffs(dd->freqsel_mask);
@@@ -471,7 -471,7 +471,7 @@@ int omap3_noncore_dpll_set_rate(struct 
                        return -EINVAL;
  
                /* No freqsel on OMAP4 and OMAP3630 */
-               if (!cpu_is_omap44xx() && !cpu_is_omap3630()) {
+               if (!soc_is_am33xx() && !cpu_is_omap44xx() && !cpu_is_omap3630()) {
                        freqsel = _omap3_dpll_compute_freqsel(clk,
                                                dd->last_rounded_n);
                        if (!freqsel)
@@@ -623,11 -623,8 +623,11 @@@ unsigned long omap3_clkoutx2_recalc(str
        while (pclk && !pclk->dpll_data)
                pclk = pclk->parent;
  
 -      /* clk does not have a DPLL as a parent? */
 -      WARN_ON(!pclk);
 +      /* clk does not have a DPLL as a parent?  error in the clock data */
 +      if (!pclk) {
 +              WARN_ON(1);
 +              return 0;
 +      }
  
        dd = pclk->dpll_data;
  
index 3615e0d9ee3c84d7e45de2a958bc1583867b67a5,6504f0e8d96eb8cbb04fbcbf833de2d1b674dcb6..7d843cd3b33d3a20f0ed71f607eb3974fe396cba
  #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"
@@@ -867,6 -869,26 +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 *
@@@ -893,6 -915,31 +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
@@@ -1438,8 -1485,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);
@@@ -1542,7 -1589,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);
@@@ -1613,6 -1660,36 +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 *
@@@ -1641,8 -1718,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;
        }
  
@@@ -2548,6 -2625,33 +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
@@@ -2679,6 -2783,72 +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)
@@@ -3678,6 -3848,14 +3848,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 99ae066b87ed21e7caeb74db9cb2b6bbeb58daa6,5d792e4753064db1a26139b023285e50253ae337..1a413f07c8c414d2b5eb5516ae6b79f182ae5d0c
@@@ -133,8 -133,8 +133,8 @@@ static struct platform_device usb_host_
  
  /* USB Func CN17 */
  struct usbhs_private {
 -      unsigned int phy;
 -      unsigned int cr2;
 +      void __iomem *phy;
 +      void __iomem *cr2;
        struct renesas_usbhs_platform_info info;
  };
  
@@@ -232,8 -232,8 +232,8 @@@ static u32 usbhs_pipe_cfg[] = 
  };
  
  static struct usbhs_private usbhs_private = {
 -      .phy    = 0xe60781e0,           /* USBPHYINT */
 -      .cr2    = 0xe605810c,           /* USBCR2 */
 +      .phy    = IOMEM(0xe60781e0),            /* USBPHYINT */
 +      .cr2    = IOMEM(0xe605810c),            /* USBCR2 */
        .info = {
                .platform_callback = {
                        .hardware_init  = usbhs_hardware_init,
@@@ -346,11 -346,11 +346,11 @@@ static struct resource sh_mmcif_resourc
                .flags  = IORESOURCE_MEM,
        },
        [1] = {
 -              .start  = gic_spi(141),
 +              .start  = gic_spi(140),
                .flags  = IORESOURCE_IRQ,
        },
        [2] = {
 -              .start  = gic_spi(140),
 +              .start  = gic_spi(141),
                .flags  = IORESOURCE_IRQ,
        },
  };
@@@ -763,6 -763,13 +763,13 @@@ static void __init kzm_init(void
        platform_add_devices(kzm_devices, ARRAY_SIZE(kzm_devices));
  }
  
+ static void kzm9g_restart(char mode, const char *cmd)
+ {
+ #define RESCNT2 IOMEM(0xe6188020)
+       /* Do soft power on reset */
+       writel((1 << 31), RESCNT2);
+ }
  static const char *kzm9g_boards_compat_dt[] __initdata = {
        "renesas,kzm9g",
        NULL,
@@@ -777,5 -784,6 +784,6 @@@ DT_MACHINE_START(KZM9G_DT, "kzm9g"
        .init_machine   = kzm_init,
        .init_late      = shmobile_init_late,
        .timer          = &shmobile_timer,
+       .restart        = kzm9g_restart,
        .dt_compat      = kzm9g_boards_compat_dt,
  MACHINE_END
index a13c97b4ba1df0c380b32d8193682f6782ccd599,38ed2ddd32655de26939cb4d6048079ba0ddb63e..db99a4ade80cd46650dfad30a7d068c7a291bb8c
@@@ -734,6 -734,26 +734,26 @@@ static struct platform_device mpdma0_de
        },
  };
  
+ static struct resource pmu_resources[] = {
+       [0] = {
+               .start  = gic_spi(55),
+               .end    = gic_spi(55),
+               .flags  = IORESOURCE_IRQ,
+       },
+       [1] = {
+               .start  = gic_spi(56),
+               .end    = gic_spi(56),
+               .flags  = IORESOURCE_IRQ,
+       },
+ };
+ static struct platform_device pmu_device = {
+       .name           = "arm-pmu",
+       .id             = -1,
+       .num_resources  = ARRAY_SIZE(pmu_resources),
+       .resource       = pmu_resources,
+ };
  static struct platform_device *sh73a0_early_devices[] __initdata = {
        &scif0_device,
        &scif1_device,
@@@ -757,9 -777,10 +777,10 @@@ static struct platform_device *sh73a0_l
        &i2c4_device,
        &dma0_device,
        &mpdma0_device,
+       &pmu_device,
  };
  
 -#define SRCR2          0xe61580b0
 +#define SRCR2          IOMEM(0xe61580b0)
  
  void __init sh73a0_add_standard_devices(void)
  {
index 191d973122a5503a4c84f12b171d6de7a2c0278f,84d21f51441841030a0af4fe75bf0e08984b24c3..77b19707be2ab1440d014a6a2863c3ff3e7cce48
@@@ -12,18 -12,31 +12,22 @@@ obj-y                                      += powergate.
  obj-y                                 += apbio.o
  obj-$(CONFIG_CPU_IDLE)                        += cpuidle.o
  obj-$(CONFIG_CPU_IDLE)                        += sleep.o
- obj-$(CONFIG_ARCH_TEGRA_2x_SOC)         += tegra2_clocks.o
+ obj-$(CONFIG_ARCH_TEGRA_2x_SOC)         += tegra20_clocks.o
+ obj-$(CONFIG_ARCH_TEGRA_2x_SOC)         += tegra20_clocks_data.o
  obj-$(CONFIG_ARCH_TEGRA_2x_SOC)               += tegra2_emc.o
+ obj-$(CONFIG_ARCH_TEGRA_2x_SOC)               += sleep-t20.o
  obj-$(CONFIG_ARCH_TEGRA_3x_SOC)               += tegra30_clocks.o
+ obj-$(CONFIG_ARCH_TEGRA_3x_SOC)               += tegra30_clocks_data.o
+ obj-$(CONFIG_ARCH_TEGRA_3x_SOC)               += sleep-t30.o
  obj-$(CONFIG_SMP)                     += platsmp.o headsmp.o
  obj-$(CONFIG_SMP)                       += reset.o
  obj-$(CONFIG_HOTPLUG_CPU)               += hotplug.o
 -obj-$(CONFIG_TEGRA_SYSTEM_DMA)                += dma.o
  obj-$(CONFIG_CPU_FREQ)                  += cpu-tegra.o
  obj-$(CONFIG_TEGRA_PCI)                       += pcie.o
 -obj-$(CONFIG_USB_SUPPORT)             += usb_phy.o
  
  obj-$(CONFIG_ARCH_TEGRA_2x_SOC)               += board-dt-tegra20.o
  obj-$(CONFIG_ARCH_TEGRA_3x_SOC)               += board-dt-tegra30.o
  
 -obj-$(CONFIG_MACH_HARMONY)              += board-harmony.o
 -obj-$(CONFIG_MACH_HARMONY)              += board-harmony-pinmux.o
 -obj-$(CONFIG_MACH_HARMONY)              += board-harmony-pcie.o
 -obj-$(CONFIG_MACH_HARMONY)              += board-harmony-power.o
 +obj-$(CONFIG_ARCH_TEGRA_2x_SOC)               += board-harmony-pcie.o
  
 -obj-$(CONFIG_MACH_PAZ00)              += board-paz00.o
 -obj-$(CONFIG_MACH_PAZ00)              += board-paz00-pinmux.o
 -
 -obj-$(CONFIG_MACH_TRIMSLICE)            += board-trimslice.o
 -obj-$(CONFIG_MACH_TRIMSLICE)            += board-trimslice-pinmux.o
 +obj-$(CONFIG_ARCH_TEGRA_2x_SOC)               += board-paz00.o
index 37007d60bc373a88d0fe98235db9ed268773c335,b4e7cc14713cb0e2c0a9d4de05db4622aac943bc..5957ffbd4af6d63a04a5619635bbaa9e7cc2faff
@@@ -42,6 -42,7 +42,6 @@@
  #include <mach/irqs.h>
  
  #include "board.h"
 -#include "board-harmony.h"
  #include "clock.h"
  #include "devices.h"
  
@@@ -70,6 -71,7 +70,7 @@@ struct of_dev_auxdata tegra20_auxdata_l
  
  static __initdata struct tegra_clk_init_table tegra_dt_clk_init_table[] = {
        /* name         parent          rate            enabled */
+       { "uarta",      "pll_p",        216000000,      true },
        { "uartd",      "pll_p",        216000000,      true },
        { "usbd",       "clk_m",        12000000,       false },
        { "usb2",       "clk_m",        12000000,       false },
@@@ -94,40 -96,54 +95,40 @@@ static void __init tegra_dt_init(void
                                tegra20_auxdata_lookup, NULL);
  }
  
 -#ifdef CONFIG_MACH_TRIMSLICE
  static void __init trimslice_init(void)
  {
 +#ifdef CONFIG_TEGRA_PCI
        int ret;
  
        ret = tegra_pcie_init(true, true);
        if (ret)
                pr_err("tegra_pci_init() failed: %d\n", ret);
 -}
  #endif
 +}
  
 -#ifdef CONFIG_MACH_HARMONY
  static void __init harmony_init(void)
  {
 +#ifdef CONFIG_TEGRA_PCI
        int ret;
  
 -      ret = harmony_regulator_init();
 -      if (ret) {
 -              pr_err("harmony_regulator_init() failed: %d\n", ret);
 -              return;
 -      }
 -
        ret = harmony_pcie_init();
        if (ret)
                pr_err("harmony_pcie_init() failed: %d\n", ret);
 -}
  #endif
 +}
  
 -#ifdef CONFIG_MACH_PAZ00
  static void __init paz00_init(void)
  {
        tegra_paz00_wifikill_init();
  }
 -#endif
  
  static struct {
        char *machine;
        void (*init)(void);
  } board_init_funcs[] = {
 -#ifdef CONFIG_MACH_TRIMSLICE
        { "compulab,trimslice", trimslice_init },
 -#endif
 -#ifdef CONFIG_MACH_HARMONY
        { "nvidia,harmony", harmony_init },
 -#endif
 -#ifdef CONFIG_MACH_PAZ00
        { "compal,paz00", paz00_init },
 -#endif
  };
  
  static void __init tegra_dt_init_late(void)
index 7e6c384881a6d4e0e40635aa8e353c5edf67bfce,8169f2c72d6c593964db1a7f8a1abf88592db0ac..3ce7d940fc3cfcf6dcbace5dbe27ec29357c177a
@@@ -18,7 -18,6 +18,7 @@@
  #include <linux/io.h>
  #include <linux/mfd/abx500/ab8500.h>
  
 +#include <asm/pmu.h>
  #include <asm/mach/map.h>
  #include <plat/gpio-nomadik.h>
  #include <mach/hardware.h>
@@@ -80,7 -79,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));
index 8e755638aa76184923ad644a6d5ba4e4aced2de1,4b0a9b3003123e51da736e6421aede1e29eaaf46..2236cbd03cd79c11d897353d33401ddc4a3c962e
@@@ -8,6 -8,7 +8,6 @@@
  
  #include <linux/platform_device.h>
  #include <linux/io.h>
 -#include <linux/clk.h>
  #include <linux/mfd/db8500-prcmu.h>
  #include <linux/clksrc-dbx500-prcmu.h>
  #include <linux/sys_soc.h>
@@@ -16,7 -17,6 +16,7 @@@
  #include <linux/stat.h>
  #include <linux/of.h>
  #include <linux/of_irq.h>
 +#include <linux/platform_data/clk-ux500.h>
  
  #include <asm/hardware/gic.h>
  #include <asm/mach/map.h>
@@@ -25,6 -25,8 +25,6 @@@
  #include <mach/setup.h>
  #include <mach/devices.h>
  
 -#include "clock.h"
 -
  void __iomem *_PRCMU_BASE;
  
  /*
@@@ -49,9 -51,7 +49,9 @@@ void __init ux500_init_irq(void
        void __iomem *dist_base;
        void __iomem *cpu_base;
  
-       if (cpu_is_u8500_family()) {
 +      gic_arch_extn.flags = IRQCHIP_SKIP_SET_WAKE | IRQCHIP_MASK_ON_SUSPEND;
 +
+       if (cpu_is_u8500_family() || cpu_is_ux540_family()) {
                dist_base = __io_address(U8500_GIC_DIST_BASE);
                cpu_base = __io_address(U8500_GIC_CPU_BASE);
        } else
         */
        if (cpu_is_u8500_family())
                db8500_prcmu_early_init();
 -      clk_init();
 +
 +      if (cpu_is_u8500_family())
 +              u8500_clk_init();
 +      else if (cpu_is_u9540())
 +              u9540_clk_init();
 +      else if (cpu_is_u8540())
 +              u8540_clk_init();
  }
  
  void __init ux500_init_late(void)
  {
 -      clk_debugfs_init();
 -      clk_init_smp_twd_cpufreq();
  }
  
  static const char * __init ux500_get_machine(void)
index b59edb065c70d18bb301b417518aa5e750dd6fb0,0f519829e7955aa7e23c5b7701d0418bfc24886f..5c93c09a80c2eb09dde882c23e5bc22b8c2f260f
@@@ -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);
                }
@@@ -380,17 -385,21 +380,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;
@@@ -444,8 -453,8 +448,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;
  }
@@@ -747,6 -756,10 +751,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)) {
@@@ -1120,3 -1133,41 +1128,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);
index d1116e2dfbeaf57ccd0c2a1aff9ce413d9b57f2a,7938fbce825e3052dc62f3a413e84b7aa0a887b5..012bbd0b8d81063fa7db1547f440b7ca97adca74
@@@ -119,7 -119,7 +119,7 @@@ void clk_disable(struct clk *clk
  
  unsigned long clk_get_rate(struct clk *clk)
  {
-       if (IS_ERR(clk))
+       if (IS_ERR_OR_NULL(clk))
                return 0;
  
        if (clk->rate != 0)
  
  long clk_round_rate(struct clk *clk, unsigned long rate)
  {
-       if (!IS_ERR(clk) && clk->ops && clk->ops->round_rate)
+       if (!IS_ERR_OR_NULL(clk) && clk->ops && clk->ops->round_rate)
                return (clk->ops->round_rate)(clk, rate);
  
        return rate;
  
  int clk_set_rate(struct clk *clk, unsigned long rate)
  {
 +      unsigned long flags;
        int ret;
  
-       if (IS_ERR(clk))
+       if (IS_ERR_OR_NULL(clk))
                return -EINVAL;
  
        /* We do not default just do a clk->rate = rate as
        if (clk->ops == NULL || clk->ops->set_rate == NULL)
                return -EINVAL;
  
 -      spin_lock(&clocks_lock);
 +      spin_lock_irqsave(&clocks_lock, flags);
        ret = (clk->ops->set_rate)(clk, rate);
 -      spin_unlock(&clocks_lock);
 +      spin_unlock_irqrestore(&clocks_lock, flags);
  
        return ret;
  }
@@@ -174,18 -173,17 +174,18 @@@ struct clk *clk_get_parent(struct clk *
  
  int clk_set_parent(struct clk *clk, struct clk *parent)
  {
 +      unsigned long flags;
        int ret = 0;
  
-       if (IS_ERR(clk))
+       if (IS_ERR_OR_NULL(clk) || IS_ERR_OR_NULL(parent))
                return -EINVAL;
  
 -      spin_lock(&clocks_lock);
 +      spin_lock_irqsave(&clocks_lock, flags);
  
        if (clk->ops && clk->ops->set_parent)
                ret = (clk->ops->set_parent)(clk, parent);
  
 -      spin_unlock(&clocks_lock);
 +      spin_unlock_irqrestore(&clocks_lock, flags);
  
        return ret;
  }
index fed07d27e0c9923cc134f93ee56f0e3547133df6,565cea74d446427e9a8a22f3b1667e5145715526..8d26ce6813bb801731c47d81ef5c88070437decd
@@@ -51,6 -51,7 +51,7 @@@
  #include <plat/ehci.h>
  #include <plat/fb.h>
  #include <plat/fb-s3c2410.h>
+ #include <plat/hdmi.h>
  #include <plat/hwmon.h>
  #include <plat/iic.h>
  #include <plat/keypad.h>
@@@ -762,7 -763,7 +763,7 @@@ void __init s5p_i2c_hdmiphy_set_platdat
                               &s5p_device_i2c_hdmiphy);
  }
  
- struct s5p_hdmi_platform_data s5p_hdmi_def_platdata;
+ static struct s5p_hdmi_platform_data s5p_hdmi_def_platdata;
  
  void __init s5p_hdmi_set_platdata(struct i2c_board_info *hdmiphy_info,
                                  struct i2c_board_info *mhl_info, int mhl_bus)
@@@ -1590,8 -1591,6 +1591,8 @@@ struct platform_device s3c64xx_device_s
  void __init s3c64xx_spi1_set_platdata(int (*cfg_gpio)(void), int src_clk_nr,
                                                int num_cs)
  {
 +      struct s3c64xx_spi_info pd;
 +
        /* Reject invalid configuration */
        if (!num_cs || src_clk_nr < 0) {
                pr_err("%s: Invalid SPI configuration\n", __func__);
diff --combined drivers/clk/Makefile
index b7b862077d88515cee0e4405dc062947cd15a99f,d5c19d1e0cf8f6e84e908d9b368c61dfb8ed7285..2b861625bdaeb84a46eda0e6df60194ce68151ee
@@@ -1,23 -1,16 +1,24 @@@
  # 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/
  obj-$(CONFIG_ARCH_SOCFPGA)    += socfpga/
  obj-$(CONFIG_PLAT_SPEAR)      += spear/
  obj-$(CONFIG_ARCH_U300)               += clk-u300.o
 -obj-$(CONFIG_ARCH_INTEGRATOR) += versatile/
 +obj-$(CONFIG_COMMON_CLK_VERSATILE) += versatile/
 +obj-$(CONFIG_ARCH_PRIMA2)     += clk-prima2.o
 +ifeq ($(CONFIG_COMMON_CLK), y)
 +obj-$(CONFIG_ARCH_MMP)                += mmp/
 +endif
 +obj-$(CONFIG_MACH_LOONGSON1)  += clk-ls1x.o
 +obj-$(CONFIG_ARCH_U8500)      += ux500/
  
  # Chip specific
  obj-$(CONFIG_COMMON_CLK_WM831X) += clk-wm831x.o
 +obj-$(CONFIG_COMMON_CLK_MAX77686) += clk-max77686.o
index 65919901a301174b42aa291f6070985906563e21,d496a55f6bb0c3061746559813e6d7dbc015aee7..cccde85e2d6c6f11b09647de1a07c63a702b4361
@@@ -13,4 -13,4 +13,5 @@@ obj-$(CONFIG_DW_APB_TIMER)    += dw_apb_ti
  obj-$(CONFIG_DW_APB_TIMER_OF) += dw_apb_timer_of.o
  obj-$(CONFIG_CLKSRC_DBX500_PRCMU)     += clksrc-dbx500-prcmu.o
  obj-$(CONFIG_ARMADA_370_XP_TIMER)     += time-armada-370-xp.o
 +obj-$(CONFIG_CLKSRC_ARM_GENERIC)      += arm_generic.o
+ obj-$(CONFIG_ARCH_BCM2835)    += bcm2835_timer.o
This page took 0.210633 seconds and 4 git commands to generate.