]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge branch 'next/drivers' into late/multiplatform
authorArnd Bergmann <arnd@arndb.de>
Fri, 19 Apr 2013 21:12:42 +0000 (23:12 +0200)
committerArnd Bergmann <arnd@arndb.de>
Fri, 19 Apr 2013 21:12:42 +0000 (23:12 +0200)
Multiple parts of next/drivers are prerequisites for the final
exynos multiplatform changes, so let's pull in the entire branch.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
1  2 
arch/arm/Kconfig
arch/arm/mach-omap2/common.h
arch/arm/mach-omap2/io.c
arch/arm/mach-omap2/omap_hwmod.c
arch/arm/mach-omap2/omap_hwmod.h
arch/arm/mach-omap2/timer.c
drivers/clk/tegra/clk-tegra20.c

diff --combined arch/arm/Kconfig
index 1cacda426a0ea6699528dd0eeedf83032825e09e,f59b687dc3258f5ca4338a55fa3a7427cea82e9e..6a4709b3837ad3c75cafcee16ca492fcd8039ff7
@@@ -673,6 -673,7 +673,7 @@@ config ARCH_TEGR
        select HAVE_CLK
        select HAVE_SMP
        select MIGHT_HAVE_CACHE_L2X0
+       select SOC_BUS
        select SPARSE_IRQ
        select USE_OF
        help
@@@ -769,12 -770,15 +770,15 @@@ config ARCH_SA110
  config ARCH_S3C24XX
        bool "Samsung S3C24XX SoCs"
        select ARCH_HAS_CPUFREQ
-       select ARCH_USES_GETTIMEOFFSET
+       select ARCH_REQUIRE_GPIOLIB
        select CLKDEV_LOOKUP
+       select CLKSRC_MMIO
+       select GENERIC_CLOCKEVENTS
        select HAVE_CLK
        select HAVE_S3C2410_I2C if I2C
        select HAVE_S3C2410_WATCHDOG if WATCHDOG
        select HAVE_S3C_RTC if RTC_CLASS
+       select MULTI_IRQ_HANDLER
        select NEED_MACH_GPIO_H
        select NEED_MACH_IO_H
        help
@@@ -787,10 -791,11 +791,11 @@@ config ARCH_S3C64X
        bool "Samsung S3C64XX"
        select ARCH_HAS_CPUFREQ
        select ARCH_REQUIRE_GPIOLIB
-       select ARCH_USES_GETTIMEOFFSET
        select ARM_VIC
        select CLKDEV_LOOKUP
+       select CLKSRC_MMIO
        select CPU_V6
+       select GENERIC_CLOCKEVENTS
        select HAVE_CLK
        select HAVE_S3C2410_I2C if I2C
        select HAVE_S3C2410_WATCHDOG if WATCHDOG
@@@ -824,9 -829,11 +829,11 @@@ config ARCH_S5P64X
  
  config ARCH_S5PC100
        bool "Samsung S5PC100"
-       select ARCH_USES_GETTIMEOFFSET
+       select ARCH_REQUIRE_GPIOLIB
        select CLKDEV_LOOKUP
+       select CLKSRC_MMIO
        select CPU_V7
+       select GENERIC_CLOCKEVENTS
        select HAVE_CLK
        select HAVE_S3C2410_I2C if I2C
        select HAVE_S3C2410_WATCHDOG if WATCHDOG
@@@ -853,18 -860,11 +860,11 @@@ config ARCH_S5PV21
        help
          Samsung S5PV210/S5PC110 series based systems
  
- config ARCH_EXYNOS
+ config ARCH_EXYNOS_SINGLE
        bool "Samsung EXYNOS"
-       select ARCH_HAS_CPUFREQ
        select ARCH_HAS_HOLES_MEMORYMODEL
        select ARCH_SPARSEMEM_ENABLE
-       select CLKDEV_LOOKUP
-       select CPU_V7
-       select GENERIC_CLOCKEVENTS
-       select HAVE_CLK
-       select HAVE_S3C2410_I2C if I2C
        select HAVE_S3C2410_WATCHDOG if WATCHDOG
-       select HAVE_S3C_RTC if RTC_CLASS
        select NEED_MACH_GPIO_H
        select NEED_MACH_MEMORY_H
        help
@@@ -1183,9 -1183,9 +1183,9 @@@ config ARM_NR_BANK
        default 8
  
  config IWMMXT
 -      bool "Enable iWMMXt support"
 +      bool "Enable iWMMXt support" if !CPU_PJ4
        depends on CPU_XSCALE || CPU_XSC3 || CPU_MOHAWK || CPU_PJ4
 -      default y if PXA27x || PXA3xx || ARCH_MMP
 +      default y if PXA27x || PXA3xx || ARCH_MMP || CPU_PJ4
        help
          Enable support for iWMMXt context switching at run time if
          running on a CPU that supports it.
@@@ -1439,16 -1439,6 +1439,16 @@@ config ARM_ERRATA_77542
         to deadlock. This workaround puts DSB before executing ISB if
         an abort may occur on cache maintenance.
  
 +config ARM_ERRATA_798181
 +      bool "ARM errata: TLBI/DSB failure on Cortex-A15"
 +      depends on CPU_V7 && SMP
 +      help
 +        On Cortex-A15 (r0p0..r3p2) the TLBI*IS/DSB operations are not
 +        adequately shooting down all use of the old entries. This
 +        option enables the Linux kernel workaround for this erratum
 +        which sends an IPI to the CPUs that are running the same ASID
 +        as the one being invalidated.
 +
  endmenu
  
  source "arch/arm/common/Kconfig"
@@@ -1603,6 -1593,7 +1603,7 @@@ config HAVE_ARM_ARCH_TIME
  config HAVE_ARM_TWD
        bool
        depends on SMP
+       select CLKSRC_OF if OF
        help
          This options enables support for the ARM timer and watchdog unit
  
@@@ -1656,7 -1647,7 +1657,7 @@@ config LOCAL_TIMER
        bool "Use local timer interrupts"
        depends on SMP
        default y
-       select HAVE_ARM_TWD if (!ARCH_MSM_SCORPIONMP && !EXYNOS4_MCT)
+       select HAVE_ARM_TWD if (!ARCH_MSM_SCORPIONMP && !CLKSRC_EXYNOS_MCT)
        help
          Enable support for local timers on SMP platforms, rather then the
          legacy IPI broadcast method.  Local timers allows the system
@@@ -1671,7 -1662,8 +1672,8 @@@ config ARCH_NR_GPI
        default 1024 if ARCH_SHMOBILE || ARCH_TEGRA
        default 512 if SOC_OMAP5
        default 355 if ARCH_U8500
-       default 288 if ARCH_VT8500 || ARCH_SUNXI
+       default 352 if ARCH_VT8500
+       default 288 if ARCH_SUNXI
        default 264 if MACH_H4700
        default 0
        help
index d6ba13e1c540f6ecc186a164f441ca48b2540a1e,bf70e2b57ff8004b3052ddbaefe046389d97b454..272490e72ee01708b28685b382f42f6c75870d01
@@@ -82,8 -82,7 +82,7 @@@ extern void omap2_init_common_infrastru
  extern void omap2_sync32k_timer_init(void);
  extern void omap3_sync32k_timer_init(void);
  extern void omap3_secure_sync32k_timer_init(void);
- extern void omap3_gp_gptimer_timer_init(void);
- extern void omap3_am33xx_gptimer_timer_init(void);
+ extern void omap3_gptimer_timer_init(void);
  extern void omap4_local_timer_init(void);
  extern void omap5_realtime_timer_init(void);
  
@@@ -293,8 -292,5 +292,8 @@@ extern void omap_reserve(void)
  struct omap_hwmod;
  extern int omap_dss_reset(struct omap_hwmod *);
  
 +/* SoC specific clock initializer */
 +extern int (*omap_clk_init)(void);
 +
  #endif /* __ASSEMBLER__ */
  #endif /* __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H */
diff --combined arch/arm/mach-omap2/io.c
index 5c445ca1e271ca9f14c9e4fd008035ee449ad9b4,2bef5a7e6af806a05495d4e7d40de312bd6e160a..e210fa830f8d7d076fdec7a23202bdab8b1a2089
  #include "prm3xxx.h"
  #include "prm44xx.h"
  
 +/*
 + * omap_clk_init: points to a function that does the SoC-specific
 + * clock initializations
 + */
 +int (*omap_clk_init)(void);
 +
  /*
   * The machine specific code may provide the extra mapping besides the
   * default mapping provided here.
@@@ -277,6 -271,14 +277,14 @@@ static struct map_desc omap54xx_io_desc
                .length         = L4_PER_54XX_SIZE,
                .type           = MT_DEVICE,
        },
+ #ifdef CONFIG_OMAP4_ERRATA_I688
+       {
+               .virtual        = OMAP4_SRAM_VA,
+               .pfn            = __phys_to_pfn(OMAP4_SRAM_PA),
+               .length         = PAGE_SIZE,
+               .type           = MT_MEMORY_SO,
+       },
+ #endif
  };
  #endif
  
@@@ -329,6 -331,7 +337,7 @@@ void __init omap4_map_io(void
  void __init omap5_map_io(void)
  {
        iotable_init(omap54xx_io_desc, ARRAY_SIZE(omap54xx_io_desc));
+       omap_barriers_init();
  }
  #endif
  /*
@@@ -403,7 -406,7 +412,7 @@@ void __init omap2420_init_early(void
        omap242x_clockdomains_init();
        omap2420_hwmod_init();
        omap_hwmod_init_postsetup();
 -      omap2420_clk_init();
 +      omap_clk_init = omap2420_clk_init;
  }
  
  void __init omap2420_init_late(void)
@@@ -433,7 -436,7 +442,7 @@@ void __init omap2430_init_early(void
        omap243x_clockdomains_init();
        omap2430_hwmod_init();
        omap_hwmod_init_postsetup();
 -      omap2430_clk_init();
 +      omap_clk_init = omap2430_clk_init;
  }
  
  void __init omap2430_init_late(void)
@@@ -468,7 -471,7 +477,7 @@@ void __init omap3_init_early(void
        omap3xxx_clockdomains_init();
        omap3xxx_hwmod_init();
        omap_hwmod_init_postsetup();
 -      omap3xxx_clk_init();
 +      omap_clk_init = omap3xxx_clk_init;
  }
  
  void __init omap3430_init_early(void)
@@@ -506,7 -509,7 +515,7 @@@ void __init ti81xx_init_early(void
        omap3xxx_clockdomains_init();
        omap3xxx_hwmod_init();
        omap_hwmod_init_postsetup();
 -      omap3xxx_clk_init();
 +      omap_clk_init = omap3xxx_clk_init;
  }
  
  void __init omap3_init_late(void)
@@@ -574,7 -577,7 +583,7 @@@ void __init am33xx_init_early(void
        am33xx_clockdomains_init();
        am33xx_hwmod_init();
        omap_hwmod_init_postsetup();
 -      am33xx_clk_init();
 +      omap_clk_init = am33xx_clk_init;
  }
  #endif
  
@@@ -599,7 -602,7 +608,7 @@@ void __init omap4430_init_early(void
        omap44xx_clockdomains_init();
        omap44xx_hwmod_init();
        omap_hwmod_init_postsetup();
 -      omap4xxx_clk_init();
 +      omap_clk_init = omap4xxx_clk_init;
  }
  
  void __init omap4430_init_late(void)
index a202a47851045c8be6d947ce6407574d7a824f27,2520d46c8508baa4e99d1a7a6217d2d0b7854973..3f50f680372eed38c535885768a1f7205171bd5e
@@@ -610,8 -610,6 +610,6 @@@ static int _enable_wakeup(struct omap_h
  
        /* XXX test pwrdm_get_wken for this hwmod's subsystem */
  
-       oh->_int_flags |= _HWMOD_WAKEUP_ENABLED;
        return 0;
  }
  
@@@ -645,8 -643,6 +643,6 @@@ static int _disable_wakeup(struct omap_
  
        /* XXX test pwrdm_get_wken for this hwmod's subsystem */
  
-       oh->_int_flags &= ~_HWMOD_WAKEUP_ENABLED;
        return 0;
  }
  
@@@ -1368,9 -1364,7 +1364,9 @@@ static void _enable_sysc(struct omap_hw
        }
  
        if (sf & SYSC_HAS_MIDLEMODE) {
 -              if (oh->flags & HWMOD_SWSUP_MSTANDBY) {
 +              if (oh->flags & HWMOD_FORCE_MSTANDBY) {
 +                      idlemode = HWMOD_IDLEMODE_FORCE;
 +              } else if (oh->flags & HWMOD_SWSUP_MSTANDBY) {
                        idlemode = HWMOD_IDLEMODE_NO;
                } else {
                        if (sf & SYSC_HAS_ENAWAKEUP)
@@@ -1442,8 -1436,7 +1438,8 @@@ static void _idle_sysc(struct omap_hwmo
        }
  
        if (sf & SYSC_HAS_MIDLEMODE) {
 -              if (oh->flags & HWMOD_SWSUP_MSTANDBY) {
 +              if ((oh->flags & HWMOD_SWSUP_MSTANDBY) ||
 +                  (oh->flags & HWMOD_FORCE_MSTANDBY)) {
                        idlemode = HWMOD_IDLEMODE_FORCE;
                } else {
                        if (sf & SYSC_HAS_ENAWAKEUP)
@@@ -1666,7 -1659,7 +1662,7 @@@ static int _deassert_hardreset(struct o
                return -ENOSYS;
  
        ret = _lookup_hardreset(oh, name, &ohri);
-       if (IS_ERR_VALUE(ret))
+       if (ret < 0)
                return ret;
  
        if (oh->clkdm) {
@@@ -2416,7 -2409,7 +2412,7 @@@ static int __init _init(struct omap_hwm
        _init_mpu_rt_base(oh, NULL);
  
        r = _init_clocks(oh, NULL);
-       if (IS_ERR_VALUE(r)) {
+       if (r < 0) {
                WARN(1, "omap_hwmod: %s: couldn't init clocks\n", oh->name);
                return -EINVAL;
        }
index d5dc935f6060446aee42a250eddbe6140e9aa42a,28f4dea0512e85f50eb29deb69b4c613f420540f..fe5962921f07244e602429b758f0d5ccecb7398c
@@@ -427,8 -427,8 +427,8 @@@ struct omap_hwmod_omap4_prcm 
   *
   * HWMOD_SWSUP_SIDLE: omap_hwmod code should manually bring module in and out
   *     of idle, rather than relying on module smart-idle
 - * HWMOD_SWSUP_MSTDBY: omap_hwmod code should manually bring module in and out
 - *     of standby, rather than relying on module smart-standby
 + * HWMOD_SWSUP_MSTANDBY: omap_hwmod code should manually bring module in and
 + *     out of standby, rather than relying on module smart-standby
   * HWMOD_INIT_NO_RESET: don't reset this module at boot - important for
   *     SDRAM controller, etc. XXX probably belongs outside the main hwmod file
   *     XXX Should be HWMOD_SETUP_NO_RESET
   *     correctly, or this is being abused to deal with some PM latency
   *     issues -- but we're currently suffering from a shortage of
   *     folks who are able to track these issues down properly.
 + * HWMOD_FORCE_MSTANDBY: Always keep MIDLEMODE bits cleared so that device
 + *     is kept in force-standby mode. Failing to do so causes PM problems
 + *     with musb on OMAP3630 at least. Note that musb has a dedicated register
 + *     to control MSTANDBY signal when MIDLEMODE is set to force-standby.
   */
  #define HWMOD_SWSUP_SIDLE                     (1 << 0)
  #define HWMOD_SWSUP_MSTANDBY                  (1 << 1)
  #define HWMOD_16BIT_REG                               (1 << 8)
  #define HWMOD_EXT_OPT_MAIN_CLK                        (1 << 9)
  #define HWMOD_BLOCK_WFI                               (1 << 10)
 +#define HWMOD_FORCE_MSTANDBY                  (1 << 11)
  
  /*
   * omap_hwmod._int_flags definitions
   * These are for internal use only and are managed by the omap_hwmod code.
   *
   * _HWMOD_NO_MPU_PORT: no path exists for the MPU to write to this module
-  * _HWMOD_WAKEUP_ENABLED: set when the omap_hwmod code has enabled ENAWAKEUP
   * _HWMOD_SYSCONFIG_LOADED: set when the OCP_SYSCONFIG value has been cached
   * _HWMOD_SKIP_ENABLE: set if hwmod enabled during init (HWMOD_INIT_NO_IDLE) -
   *     causes the first call to _enable() to only update the pinmux
   */
  #define _HWMOD_NO_MPU_PORT                    (1 << 0)
- #define _HWMOD_WAKEUP_ENABLED                 (1 << 1)
- #define _HWMOD_SYSCONFIG_LOADED                       (1 << 2)
- #define _HWMOD_SKIP_ENABLE                    (1 << 3)
+ #define _HWMOD_SYSCONFIG_LOADED                       (1 << 1)
+ #define _HWMOD_SKIP_ENABLE                    (1 << 2)
  
  /*
   * omap_hwmod._state definitions
index f62b509ed08de75e6f4191bc8cf43dc130c7cb2d,f12aa6c15da4db1da20a4abbda6368b48a4d3b1a..31ae764817376502b65eb285be147ee639176ad1
  #include "common.h"
  #include "powerdomain.h"
  
- /* Parent clocks, eventually these will come from the clock framework */
- #define OMAP2_MPU_SOURCE      "sys_ck"
- #define OMAP3_MPU_SOURCE      OMAP2_MPU_SOURCE
- #define OMAP4_MPU_SOURCE      "sys_clkin_ck"
- #define OMAP2_32K_SOURCE      "func_32k_ck"
- #define OMAP3_32K_SOURCE      "omap_32k_fck"
- #define OMAP4_32K_SOURCE      "sys_32k_ck"
  #define REALTIME_COUNTER_BASE                         0x48243200
  #define INCREMENTER_NUMERATOR_OFFSET                  0x10
  #define INCREMENTER_DENUMERATOR_RELOAD_OFFSET         0x14
@@@ -129,7 -120,6 +120,6 @@@ static void omap2_gp_timer_set_mode(enu
  }
  
  static struct clock_event_device clockevent_gpt = {
-       .name           = "gp_timer",
        .features       = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
        .rating         = 300,
        .set_next_event = omap2_gp_timer_set_next_event,
@@@ -170,6 -160,12 +160,12 @@@ static struct device_node * __init omap
                if (property && !of_get_property(np, property, NULL))
                        continue;
  
+               if (!property && (of_get_property(np, "ti,timer-alwon", NULL) ||
+                                 of_get_property(np, "ti,timer-dsp", NULL) ||
+                                 of_get_property(np, "ti,timer-pwm", NULL) ||
+                                 of_get_property(np, "ti,timer-secure", NULL)))
+                       continue;
                of_add_property(np, &device_disabled);
                return np;
        }
@@@ -214,16 -210,17 +210,17 @@@ static u32 __init omap_dm_timer_get_err
  }
  
  static int __init omap_dm_timer_init_one(struct omap_dm_timer *timer,
-                                               int gptimer_id,
-                                               const char *fck_source,
-                                               const char *property,
-                                               int posted)
+                                        const char *fck_source,
+                                        const char *property,
+                                        const char **timer_name,
+                                        int posted)
  {
        char name[10]; /* 10 = sizeof("gptXX_Xck0") */
        const char *oh_name;
        struct device_node *np;
        struct omap_hwmod *oh;
        struct resource irq, mem;
+       struct clk *src;
        int r = 0;
  
        if (of_have_populated_dt()) {
  
                of_node_put(np);
        } else {
-               if (omap_dm_timer_reserve_systimer(gptimer_id))
+               if (omap_dm_timer_reserve_systimer(timer->id))
                        return -ENODEV;
  
-               sprintf(name, "timer%d", gptimer_id);
+               sprintf(name, "timer%d", timer->id);
                oh_name = name;
        }
  
        if (!oh)
                return -ENODEV;
  
+       *timer_name = oh->name;
        if (!of_have_populated_dt()) {
                r = omap_hwmod_get_resource_byname(oh, IORESOURCE_IRQ, NULL,
                                                   &irq);
        /* After the dmtimer is using hwmod these clocks won't be needed */
        timer->fclk = clk_get(NULL, omap_hwmod_get_main_clk(oh));
        if (IS_ERR(timer->fclk))
-               return -ENODEV;
+               return PTR_ERR(timer->fclk);
  
-       /* FIXME: Need to remove hard-coded test on timer ID */
-       if (gptimer_id != 12) {
-               struct clk *src;
-               src = clk_get(NULL, fck_source);
-               if (IS_ERR(src)) {
-                       r = -EINVAL;
-               } else {
-                       r = clk_set_parent(timer->fclk, src);
-                       if (IS_ERR_VALUE(r))
-                               pr_warn("%s: %s cannot set source\n",
-                                       __func__, oh->name);
+       src = clk_get(NULL, fck_source);
+       if (IS_ERR(src))
+               return PTR_ERR(src);
+       if (clk_get_parent(timer->fclk) != src) {
+               r = clk_set_parent(timer->fclk, src);
+               if (r < 0) {
+                       pr_warn("%s: %s cannot set source\n", __func__,
+                               oh->name);
                        clk_put(src);
+                       return r;
                }
        }
  
+       clk_put(src);
        omap_hwmod_setup_one(oh_name);
        omap_hwmod_enable(oh);
        __omap_dm_timer_init_regs(timer);
@@@ -317,6 -316,7 +316,7 @@@ static void __init omap2_gp_clockevent_
  {
        int res;
  
+       clkev.id = gptimer_id;
        clkev.errata = omap_dm_timer_get_errata();
  
        /*
         */
        __omap_dm_timer_override_errata(&clkev, OMAP_TIMER_ERRATA_I103_I767);
  
-       res = omap_dm_timer_init_one(&clkev, gptimer_id, fck_source, property,
-                                    OMAP_TIMER_POSTED);
+       res = omap_dm_timer_init_one(&clkev, fck_source, property,
+                                    &clockevent_gpt.name, OMAP_TIMER_POSTED);
        BUG_ON(res);
  
        omap2_gp_timer_irq.dev_id = &clkev;
                                        3, /* Timer internal resynch latency */
                                        0xffffffff);
  
-       pr_info("OMAP clockevent source: GPTIMER%d at %lu Hz\n",
-               gptimer_id, clkev.rate);
+       pr_info("OMAP clockevent source: %s at %lu Hz\n", clockevent_gpt.name,
+               clkev.rate);
  }
  
  /* Clocksource code */
@@@ -359,7 -359,6 +359,6 @@@ static cycle_t clocksource_read_cycles(
  }
  
  static struct clocksource clocksource_gpt = {
-       .name           = "gp_timer",
        .rating         = 300,
        .read           = clocksource_read_cycles,
        .mask           = CLOCKSOURCE_MASK(32),
@@@ -442,13 -441,16 +441,16 @@@ static int __init __maybe_unused omap2_
  }
  
  static void __init omap2_gptimer_clocksource_init(int gptimer_id,
-                                               const char *fck_source)
+                                                 const char *fck_source,
+                                                 const char *property)
  {
        int res;
  
+       clksrc.id = gptimer_id;
        clksrc.errata = omap_dm_timer_get_errata();
  
-       res = omap_dm_timer_init_one(&clksrc, gptimer_id, fck_source, NULL,
+       res = omap_dm_timer_init_one(&clksrc, fck_source, property,
+                                    &clocksource_gpt.name,
                                     OMAP_TIMER_NONPOSTED);
        BUG_ON(res);
  
                pr_err("Could not register clocksource %s\n",
                        clocksource_gpt.name);
        else
-               pr_info("OMAP clocksource: GPTIMER%d at %lu Hz\n",
-                       gptimer_id, clksrc.rate);
+               pr_info("OMAP clocksource: %s at %lu Hz\n",
+                       clocksource_gpt.name, clksrc.rate);
  }
  
  #ifdef CONFIG_SOC_HAS_REALTIME_COUNTER
@@@ -487,7 -489,7 +489,7 @@@ static void __init realtime_counter_ini
                pr_err("%s: ioremap failed\n", __func__);
                return;
        }
-       sys_clk = clk_get(NULL, "sys_clkin_ck");
+       sys_clk = clk_get(NULL, "sys_clkin");
        if (IS_ERR(sys_clk)) {
                pr_err("%s: failed to get system clock handle\n", __func__);
                iounmap(base);
@@@ -544,53 -546,52 +546,56 @@@ static inline void __init realtime_coun
  #endif
  
  #define OMAP_SYS_GP_TIMER_INIT(name, clkev_nr, clkev_src, clkev_prop, \
-                              clksrc_nr, clksrc_src)                   \
+                              clksrc_nr, clksrc_src, clksrc_prop)      \
  void __init omap##name##_gptimer_timer_init(void)                     \
  {                                                                     \
 +      if (omap_clk_init)                                              \
 +              omap_clk_init();                                        \
        omap_dmtimer_init();                                            \
        omap2_gp_clockevent_init((clkev_nr), clkev_src, clkev_prop);    \
-       omap2_gptimer_clocksource_init((clksrc_nr), clksrc_src);        \
+       omap2_gptimer_clocksource_init((clksrc_nr), clksrc_src,         \
+                                       clksrc_prop);                   \
  }
  
  #define OMAP_SYS_32K_TIMER_INIT(name, clkev_nr, clkev_src, clkev_prop,        \
-                               clksrc_nr, clksrc_src)                  \
+                               clksrc_nr, clksrc_src, clksrc_prop)     \
  void __init omap##name##_sync32k_timer_init(void)             \
  {                                                                     \
 +      if (omap_clk_init)                                              \
 +              omap_clk_init();                                        \
        omap_dmtimer_init();                                            \
        omap2_gp_clockevent_init((clkev_nr), clkev_src, clkev_prop);    \
        /* Enable the use of clocksource="gp_timer" kernel parameter */ \
        if (use_gptimer_clksrc)                                         \
-               omap2_gptimer_clocksource_init((clksrc_nr), clksrc_src);\
+               omap2_gptimer_clocksource_init((clksrc_nr), clksrc_src, \
+                                               clksrc_prop);           \
        else                                                            \
                omap2_sync32k_clocksource_init();                       \
  }
  
  #ifdef CONFIG_ARCH_OMAP2
- OMAP_SYS_32K_TIMER_INIT(2, 1, OMAP2_32K_SOURCE, "ti,timer-alwon",
-                       2, OMAP2_MPU_SOURCE);
+ OMAP_SYS_32K_TIMER_INIT(2, 1, "timer_32k_ck", "ti,timer-alwon",
+                       2, "timer_sys_ck", NULL);
  #endif /* CONFIG_ARCH_OMAP2 */
  
  #ifdef CONFIG_ARCH_OMAP3
- OMAP_SYS_32K_TIMER_INIT(3, 1, OMAP3_32K_SOURCE, "ti,timer-alwon",
-                       2, OMAP3_MPU_SOURCE);
- OMAP_SYS_32K_TIMER_INIT(3_secure, 12, OMAP3_32K_SOURCE, "ti,timer-secure",
-                       2, OMAP3_MPU_SOURCE);
- OMAP_SYS_GP_TIMER_INIT(3_gp, 1, OMAP3_MPU_SOURCE, "ti,timer-alwon",
-                      2, OMAP3_MPU_SOURCE);
+ OMAP_SYS_32K_TIMER_INIT(3, 1, "timer_32k_ck", "ti,timer-alwon",
+                       2, "timer_sys_ck", NULL);
+ OMAP_SYS_32K_TIMER_INIT(3_secure, 12, "secure_32k_fck", "ti,timer-secure",
+                       2, "timer_sys_ck", NULL);
  #endif /* CONFIG_ARCH_OMAP3 */
  
- #ifdef CONFIG_SOC_AM33XX
- OMAP_SYS_GP_TIMER_INIT(3_am33xx, 1, OMAP4_MPU_SOURCE, "ti,timer-alwon",
-                      2, OMAP4_MPU_SOURCE);
- #endif /* CONFIG_SOC_AM33XX */
+ #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_SOC_AM33XX)
+ OMAP_SYS_GP_TIMER_INIT(3, 2, "timer_sys_ck", NULL,
+                      1, "timer_sys_ck", "ti,timer-alwon");
+ #endif
+ #if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5)
+ static OMAP_SYS_32K_TIMER_INIT(4, 1, "timer_32k_ck", "ti,timer-alwon",
+                              2, "sys_clkin_ck", NULL);
+ #endif
  
  #ifdef CONFIG_ARCH_OMAP4
- OMAP_SYS_32K_TIMER_INIT(4, 1, OMAP4_32K_SOURCE, "ti,timer-alwon",
-                       2, OMAP4_MPU_SOURCE);
  #ifdef CONFIG_LOCAL_TIMERS
  static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, OMAP44XX_LOCAL_TWD_BASE, 29);
  void __init omap4_local_timer_init(void)
                int err;
  
                if (of_have_populated_dt()) {
-                       twd_local_timer_of_register();
+                       clocksource_of_init();
                        return;
                }
  
@@@ -619,13 -620,11 +624,11 @@@ void __init omap4_local_timer_init(void
  #endif /* CONFIG_ARCH_OMAP4 */
  
  #ifdef CONFIG_SOC_OMAP5
- OMAP_SYS_32K_TIMER_INIT(5, 1, OMAP4_32K_SOURCE, "ti,timer-alwon",
-                       2, OMAP4_MPU_SOURCE);
  void __init omap5_realtime_timer_init(void)
  {
        int err;
  
-       omap5_sync32k_timer_init();
+       omap4_sync32k_timer_init();
        realtime_counter_init();
  
        err = arch_timer_of_register();
index f873dcefe0de63b4271ac82302a24892dbe4803d,b0405b67f49c710843e9d16d46930f015f25bf59..8292a00c3de9f1dbae8b19e23b6ac45b3d275866
@@@ -86,8 -86,8 +86,8 @@@
  #define PLLE_BASE 0xe8
  #define PLLE_MISC 0xec
  
- #define PLL_BASE_LOCK 27
- #define PLLE_MISC_LOCK 11
+ #define PLL_BASE_LOCK BIT(27)
+ #define PLLE_MISC_LOCK BIT(11)
  
  #define PLL_MISC_LOCK_ENABLE 18
  #define PLLDU_MISC_LOCK_ENABLE 22
@@@ -236,7 -236,7 +236,7 @@@ enum tegra20_clk 
        dvc, dsi, mipi = 50, hdmi, csi, tvdac, i2c2, uartc, emc = 57, usb2,
        usb3, mpe, vde, bsea, bsev, speedo, uartd, uarte, i2c3, sbc4, sdmmc3,
        pex, owr, afi, csite, pcie_xclk, avpucq = 75, la, irama = 84, iramb,
-       iramc, iramd, cram2, audio_2x, clk_d, csus = 92, cdev1, cdev2,
+       iramc, iramd, cram2, audio_2x, clk_d, csus = 92, cdev2, cdev1,
        uartb = 96, vfir, spdif_in, spdif_out, vi, vi_sensor, tvo, cve,
        osc, clk_32k, clk_m, sclk, cclk, hclk, pclk, blink, pll_a, pll_a_out0,
        pll_c, pll_c_out1, pll_d, pll_d_out0, pll_e, pll_m, pll_m_out1,
@@@ -248,125 -248,125 +248,125 @@@ static struct clk *clks[clk_max]
  static struct clk_onecell_data clk_data;
  
  static struct tegra_clk_pll_freq_table pll_c_freq_table[] = {
-       { 12000000, 600000000, 600, 12, 1, 8 },
-       { 13000000, 600000000, 600, 13, 1, 8 },
-       { 19200000, 600000000, 500, 16, 1, 6 },
-       { 26000000, 600000000, 600, 26, 1, 8 },
+       { 12000000, 600000000, 600, 12, 0, 8 },
+       { 13000000, 600000000, 600, 13, 0, 8 },
+       { 19200000, 600000000, 500, 16, 0, 6 },
+       { 26000000, 600000000, 600, 26, 0, 8 },
        { 0, 0, 0, 0, 0, 0 },
  };
  
  static struct tegra_clk_pll_freq_table pll_m_freq_table[] = {
-       { 12000000, 666000000, 666, 12, 1, 8},
-       { 13000000, 666000000, 666, 13, 1, 8},
-       { 19200000, 666000000, 555, 16, 1, 8},
-       { 26000000, 666000000, 666, 26, 1, 8},
-       { 12000000, 600000000, 600, 12, 1, 8},
-       { 13000000, 600000000, 600, 13, 1, 8},
-       { 19200000, 600000000, 375, 12, 1, 6},
-       { 26000000, 600000000, 600, 26, 1, 8},
+       { 12000000, 666000000, 666, 12, 0, 8},
+       { 13000000, 666000000, 666, 13, 0, 8},
+       { 19200000, 666000000, 555, 16, 0, 8},
+       { 26000000, 666000000, 666, 26, 0, 8},
+       { 12000000, 600000000, 600, 12, 0, 8},
+       { 13000000, 600000000, 600, 13, 0, 8},
+       { 19200000, 600000000, 375, 12, 0, 6},
+       { 26000000, 600000000, 600, 26, 0, 8},
        { 0, 0, 0, 0, 0, 0 },
  };
  
  static struct tegra_clk_pll_freq_table pll_p_freq_table[] = {
-       { 12000000, 216000000, 432, 12, 2, 8},
-       { 13000000, 216000000, 432, 13, 2, 8},
-       { 19200000, 216000000, 90,   4, 2, 1},
-       { 26000000, 216000000, 432, 26, 2, 8},
-       { 12000000, 432000000, 432, 12, 1, 8},
-       { 13000000, 432000000, 432, 13, 1, 8},
-       { 19200000, 432000000, 90,   4, 1, 1},
-       { 26000000, 432000000, 432, 26, 1, 8},
+       { 12000000, 216000000, 432, 12, 1, 8},
+       { 13000000, 216000000, 432, 13, 1, 8},
+       { 19200000, 216000000, 90,   4, 1, 1},
+       { 26000000, 216000000, 432, 26, 1, 8},
+       { 12000000, 432000000, 432, 12, 0, 8},
+       { 13000000, 432000000, 432, 13, 0, 8},
+       { 19200000, 432000000, 90,   4, 0, 1},
+       { 26000000, 432000000, 432, 26, 0, 8},
        { 0, 0, 0, 0, 0, 0 },
  };
  
  static struct tegra_clk_pll_freq_table pll_a_freq_table[] = {
-       { 28800000, 56448000, 49, 25, 1, 1},
-       { 28800000, 73728000, 64, 25, 1, 1},
-       { 28800000, 24000000,  5,  6, 1, 1},
+       { 28800000, 56448000, 49, 25, 0, 1},
+       { 28800000, 73728000, 64, 25, 0, 1},
+       { 28800000, 24000000,  5,  6, 0, 1},
        { 0, 0, 0, 0, 0, 0 },
  };
  
  static struct tegra_clk_pll_freq_table pll_d_freq_table[] = {
-       { 12000000, 216000000, 216, 12, 1, 4},
-       { 13000000, 216000000, 216, 13, 1, 4},
-       { 19200000, 216000000, 135, 12, 1, 3},
-       { 26000000, 216000000, 216, 26, 1, 4},
+       { 12000000, 216000000, 216, 12, 0, 4},
+       { 13000000, 216000000, 216, 13, 0, 4},
+       { 19200000, 216000000, 135, 12, 0, 3},
+       { 26000000, 216000000, 216, 26, 0, 4},
  
-       { 12000000, 594000000, 594, 12, 1, 8},
-       { 13000000, 594000000, 594, 13, 1, 8},
-       { 19200000, 594000000, 495, 16, 1, 8},
-       { 26000000, 594000000, 594, 26, 1, 8},
+       { 12000000, 594000000, 594, 12, 0, 8},
+       { 13000000, 594000000, 594, 13, 0, 8},
+       { 19200000, 594000000, 495, 16, 0, 8},
+       { 26000000, 594000000, 594, 26, 0, 8},
  
-       { 12000000, 1000000000, 1000, 12, 1, 12},
-       { 13000000, 1000000000, 1000, 13, 1, 12},
-       { 19200000, 1000000000, 625,  12, 1, 8},
-       { 26000000, 1000000000, 1000, 26, 1, 12},
+       { 12000000, 1000000000, 1000, 12, 0, 12},
+       { 13000000, 1000000000, 1000, 13, 0, 12},
+       { 19200000, 1000000000, 625,  12, 0, 8},
+       { 26000000, 1000000000, 1000, 26, 0, 12},
  
        { 0, 0, 0, 0, 0, 0 },
  };
  
  static struct tegra_clk_pll_freq_table pll_u_freq_table[] = {
-       { 12000000, 480000000, 960, 12, 2, 0},
-       { 13000000, 480000000, 960, 13, 2, 0},
-       { 19200000, 480000000, 200, 4,  2, 0},
-       { 26000000, 480000000, 960, 26, 2, 0},
+       { 12000000, 480000000, 960, 12, 0, 0},
+       { 13000000, 480000000, 960, 13, 0, 0},
+       { 19200000, 480000000, 200, 4,  0, 0},
+       { 26000000, 480000000, 960, 26, 0, 0},
        { 0, 0, 0, 0, 0, 0 },
  };
  
  static struct tegra_clk_pll_freq_table pll_x_freq_table[] = {
        /* 1 GHz */
-       { 12000000, 1000000000, 1000, 12, 1, 12},
-       { 13000000, 1000000000, 1000, 13, 1, 12},
-       { 19200000, 1000000000, 625,  12, 1, 8},
-       { 26000000, 1000000000, 1000, 26, 1, 12},
+       { 12000000, 1000000000, 1000, 12, 0, 12},
+       { 13000000, 1000000000, 1000, 13, 0, 12},
+       { 19200000, 1000000000, 625,  12, 0, 8},
+       { 26000000, 1000000000, 1000, 26, 0, 12},
  
        /* 912 MHz */
-       { 12000000, 912000000,  912,  12, 1, 12},
-       { 13000000, 912000000,  912,  13, 1, 12},
-       { 19200000, 912000000,  760,  16, 1, 8},
-       { 26000000, 912000000,  912,  26, 1, 12},
+       { 12000000, 912000000,  912,  12, 0, 12},
+       { 13000000, 912000000,  912,  13, 0, 12},
+       { 19200000, 912000000,  760,  16, 0, 8},
+       { 26000000, 912000000,  912,  26, 0, 12},
  
        /* 816 MHz */
-       { 12000000, 816000000,  816,  12, 1, 12},
-       { 13000000, 816000000,  816,  13, 1, 12},
-       { 19200000, 816000000,  680,  16, 1, 8},
-       { 26000000, 816000000,  816,  26, 1, 12},
+       { 12000000, 816000000,  816,  12, 0, 12},
+       { 13000000, 816000000,  816,  13, 0, 12},
+       { 19200000, 816000000,  680,  16, 0, 8},
+       { 26000000, 816000000,  816,  26, 0, 12},
  
        /* 760 MHz */
-       { 12000000, 760000000,  760,  12, 1, 12},
-       { 13000000, 760000000,  760,  13, 1, 12},
-       { 19200000, 760000000,  950,  24, 1, 8},
-       { 26000000, 760000000,  760,  26, 1, 12},
+       { 12000000, 760000000,  760,  12, 0, 12},
+       { 13000000, 760000000,  760,  13, 0, 12},
+       { 19200000, 760000000,  950,  24, 0, 8},
+       { 26000000, 760000000,  760,  26, 0, 12},
  
        /* 750 MHz */
-       { 12000000, 750000000,  750,  12, 1, 12},
-       { 13000000, 750000000,  750,  13, 1, 12},
-       { 19200000, 750000000,  625,  16, 1, 8},
-       { 26000000, 750000000,  750,  26, 1, 12},
+       { 12000000, 750000000,  750,  12, 0, 12},
+       { 13000000, 750000000,  750,  13, 0, 12},
+       { 19200000, 750000000,  625,  16, 0, 8},
+       { 26000000, 750000000,  750,  26, 0, 12},
  
        /* 608 MHz */
-       { 12000000, 608000000,  608,  12, 1, 12},
-       { 13000000, 608000000,  608,  13, 1, 12},
-       { 19200000, 608000000,  380,  12, 1, 8},
-       { 26000000, 608000000,  608,  26, 1, 12},
+       { 12000000, 608000000,  608,  12, 0, 12},
+       { 13000000, 608000000,  608,  13, 0, 12},
+       { 19200000, 608000000,  380,  12, 0, 8},
+       { 26000000, 608000000,  608,  26, 0, 12},
  
        /* 456 MHz */
-       { 12000000, 456000000,  456,  12, 1, 12},
-       { 13000000, 456000000,  456,  13, 1, 12},
-       { 19200000, 456000000,  380,  16, 1, 8},
-       { 26000000, 456000000,  456,  26, 1, 12},
+       { 12000000, 456000000,  456,  12, 0, 12},
+       { 13000000, 456000000,  456,  13, 0, 12},
+       { 19200000, 456000000,  380,  16, 0, 8},
+       { 26000000, 456000000,  456,  26, 0, 12},
  
        /* 312 MHz */
-       { 12000000, 312000000,  312,  12, 1, 12},
-       { 13000000, 312000000,  312,  13, 1, 12},
-       { 19200000, 312000000,  260,  16, 1, 8},
-       { 26000000, 312000000,  312,  26, 1, 12},
+       { 12000000, 312000000,  312,  12, 0, 12},
+       { 13000000, 312000000,  312,  13, 0, 12},
+       { 19200000, 312000000,  260,  16, 0, 8},
+       { 26000000, 312000000,  312,  26, 0, 12},
  
        { 0, 0, 0, 0, 0, 0 },
  };
  
  static struct tegra_clk_pll_freq_table pll_e_freq_table[] = {
-       { 12000000, 100000000,  200,  24, 1, 0 },
+       { 12000000, 100000000,  200,  24, 0, 0 },
        { 0, 0, 0, 0, 0, 0 },
  };
  
@@@ -380,7 -380,7 +380,7 @@@ static struct tegra_clk_pll_params pll_
        .vco_max = 1400000000,
        .base_reg = PLLC_BASE,
        .misc_reg = PLLC_MISC,
-       .lock_bit_idx = PLL_BASE_LOCK,
+       .lock_mask = PLL_BASE_LOCK,
        .lock_enable_bit_idx = PLL_MISC_LOCK_ENABLE,
        .lock_delay = 300,
  };
@@@ -394,7 -394,7 +394,7 @@@ static struct tegra_clk_pll_params pll_
        .vco_max = 1200000000,
        .base_reg = PLLM_BASE,
        .misc_reg = PLLM_MISC,
-       .lock_bit_idx = PLL_BASE_LOCK,
+       .lock_mask = PLL_BASE_LOCK,
        .lock_enable_bit_idx = PLL_MISC_LOCK_ENABLE,
        .lock_delay = 300,
  };
@@@ -408,7 -408,7 +408,7 @@@ static struct tegra_clk_pll_params pll_
        .vco_max = 1400000000,
        .base_reg = PLLP_BASE,
        .misc_reg = PLLP_MISC,
-       .lock_bit_idx = PLL_BASE_LOCK,
+       .lock_mask = PLL_BASE_LOCK,
        .lock_enable_bit_idx = PLL_MISC_LOCK_ENABLE,
        .lock_delay = 300,
  };
@@@ -422,7 -422,7 +422,7 @@@ static struct tegra_clk_pll_params pll_
        .vco_max = 1400000000,
        .base_reg = PLLA_BASE,
        .misc_reg = PLLA_MISC,
-       .lock_bit_idx = PLL_BASE_LOCK,
+       .lock_mask = PLL_BASE_LOCK,
        .lock_enable_bit_idx = PLL_MISC_LOCK_ENABLE,
        .lock_delay = 300,
  };
@@@ -436,11 -436,17 +436,17 @@@ static struct tegra_clk_pll_params pll_
        .vco_max = 1000000000,
        .base_reg = PLLD_BASE,
        .misc_reg = PLLD_MISC,
-       .lock_bit_idx = PLL_BASE_LOCK,
+       .lock_mask = PLL_BASE_LOCK,
        .lock_enable_bit_idx = PLLDU_MISC_LOCK_ENABLE,
        .lock_delay = 1000,
  };
  
+ static struct pdiv_map pllu_p[] = {
+       { .pdiv = 1, .hw_val = 1 },
+       { .pdiv = 2, .hw_val = 0 },
+       { .pdiv = 0, .hw_val = 0 },
+ };
  static struct tegra_clk_pll_params pll_u_params = {
        .input_min = 2000000,
        .input_max = 40000000,
        .vco_max = 960000000,
        .base_reg = PLLU_BASE,
        .misc_reg = PLLU_MISC,
-       .lock_bit_idx = PLL_BASE_LOCK,
+       .lock_mask = PLL_BASE_LOCK,
        .lock_enable_bit_idx = PLLDU_MISC_LOCK_ENABLE,
        .lock_delay = 1000,
+       .pdiv_tohw = pllu_p,
  };
  
  static struct tegra_clk_pll_params pll_x_params = {
        .vco_max = 1200000000,
        .base_reg = PLLX_BASE,
        .misc_reg = PLLX_MISC,
-       .lock_bit_idx = PLL_BASE_LOCK,
+       .lock_mask = PLL_BASE_LOCK,
        .lock_enable_bit_idx = PLL_MISC_LOCK_ENABLE,
        .lock_delay = 300,
  };
@@@ -478,7 -485,7 +485,7 @@@ static struct tegra_clk_pll_params pll_
        .vco_max = 0,
        .base_reg = PLLE_BASE,
        .misc_reg = PLLE_MISC,
-       .lock_bit_idx = PLLE_MISC_LOCK,
+       .lock_mask = PLLE_MISC_LOCK,
        .lock_enable_bit_idx = PLLE_MISC_LOCK_ENABLE,
        .lock_delay = 0,
  };
@@@ -703,7 -710,7 +710,7 @@@ static void tegra20_pll_init(void
        clks[pll_a_out0] = clk;
  
        /* PLLE */
 -      clk = tegra_clk_register_plle("pll_e", "pll_ref", clk_base, NULL,
 +      clk = tegra_clk_register_plle("pll_e", "pll_ref", clk_base, pmc_base,
                             0, 100000000, &pll_e_params,
                             0, pll_e_freq_table, NULL);
        clk_register_clkdev(clk, "pll_e", NULL);
  }
  
  static const char *cclk_parents[] = { "clk_m", "pll_c", "clk_32k", "pll_m",
-                                     "pll_p_cclk", "pll_p_out4_cclk",
-                                     "pll_p_out3_cclk", "clk_d", "pll_x" };
+                                     "pll_p", "pll_p_out4",
+                                     "pll_p_out3", "clk_d", "pll_x" };
  static const char *sclk_parents[] = { "clk_m", "pll_c_out1", "pll_p_out4",
                                      "pll_p_out3", "pll_p_out2", "clk_d",
                                      "clk_32k", "pll_m_out1" };
@@@ -721,38 -728,6 +728,6 @@@ static void tegra20_super_clk_init(void
  {
        struct clk *clk;
  
-       /*
-        * DIV_U71 dividers for CCLK, these dividers are used only
-        * if parent clock is fixed rate.
-        */
-       /*
-        * Clock input to cclk divided from pll_p using
-        * U71 divider of cclk.
-        */
-       clk = tegra_clk_register_divider("pll_p_cclk", "pll_p",
-                               clk_base + SUPER_CCLK_DIVIDER, 0,
-                               TEGRA_DIVIDER_INT, 16, 8, 1, NULL);
-       clk_register_clkdev(clk, "pll_p_cclk", NULL);
-       /*
-        * Clock input to cclk divided from pll_p_out3 using
-        * U71 divider of cclk.
-        */
-       clk = tegra_clk_register_divider("pll_p_out3_cclk", "pll_p_out3",
-                               clk_base + SUPER_CCLK_DIVIDER, 0,
-                               TEGRA_DIVIDER_INT, 16, 8, 1, NULL);
-       clk_register_clkdev(clk, "pll_p_out3_cclk", NULL);
-       /*
-        * Clock input to cclk divided from pll_p_out4 using
-        * U71 divider of cclk.
-        */
-       clk = tegra_clk_register_divider("pll_p_out4_cclk", "pll_p_out4",
-                               clk_base + SUPER_CCLK_DIVIDER, 0,
-                               TEGRA_DIVIDER_INT, 16, 8, 1, NULL);
-       clk_register_clkdev(clk, "pll_p_out4_cclk", NULL);
        /* CCLK */
        clk = tegra_clk_register_super_mux("cclk", cclk_parents,
                              ARRAY_SIZE(cclk_parents), CLK_SET_RATE_PARENT,
@@@ -1044,7 -1019,7 +1019,7 @@@ static void __init tegra20_periph_clk_i
                data = &tegra_periph_clk_list[i];
                clk = tegra_clk_register_periph(data->name, data->parent_names,
                                data->num_parents, &data->periph,
-                               clk_base, data->offset);
+                               clk_base, data->offset, data->flags);
                clk_register_clkdev(clk, data->con_id, data->dev_id);
                clks[data->clk_id] = clk;
        }
@@@ -1279,9 -1254,16 +1254,16 @@@ static __initdata struct tegra_clk_init
        {host1x, pll_c, 150000000, 0},
        {disp1, pll_p, 600000000, 0},
        {disp2, pll_p, 600000000, 0},
+       {gr2d, pll_c, 300000000, 0},
+       {gr3d, pll_c, 300000000, 0},
        {clk_max, clk_max, 0, 0}, /* This MUST be the last entry */
  };
  
+ static void __init tegra20_clock_apply_init_table(void)
+ {
+       tegra_init_from_table(init_table, clks, clk_max);
+ }
  /*
   * Some clocks may be used by different drivers depending on the board
   * configuration.  List those here to register them twice in the clock lookup
@@@ -1348,7 -1330,7 +1330,7 @@@ void __init tegra20_clock_init(struct d
        clk_data.clk_num = ARRAY_SIZE(clks);
        of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
  
-       tegra_init_from_table(init_table, clks, clk_max);
+       tegra_clk_apply_init_table = tegra20_clock_apply_init_table;
  
        tegra_cpu_car_ops = &tegra20_cpu_car_ops;
  }