Merge branch 'omap/fixes-non-critical' into late/cleanup
authorOlof Johansson <olof@lixom.net>
Fri, 19 Apr 2013 18:37:21 +0000 (11:37 -0700)
committerOlof Johansson <olof@lixom.net>
Fri, 19 Apr 2013 18:37:21 +0000 (11:37 -0700)
* omap/fixes-non-critical:
  ARM: OMAP2+: fix typo "CONFIG_BRIDGE_DVFS"
  ARM: OMAP1: remove "config MACH_OMAP_HTCWIZARD"
  ARM: OMAP: dpll: enable bypass clock only when attempting dpll bypass
  ARM: OMAP2+: powerdomain: avoid testing whether an unsigned char is less than 0
  ARM: OMAP2+: hwmod: Remove unused _HWMOD_WAKEUP_ENABLED flag
  ARM: OMAP2+: am335x: Change the wdt1 func clk src to per_32k clk
  ARM: OMAP2+: AM33xx: hwmod: Add missing sysc definition to wdt1 entry
  ARM: OMAP: fix typo "CONFIG_SMC91x_MODULE"
  ARM: OMAP5: clock: No Freqsel on OMAP5 devices too
  ARM: OMAP5: Make errata i688 workaround available
  ARM: OMAP5: Update SAR memory layout for WakeupGen
  ARM: OMAP5: Update SAR RAM base address
  ARM: OMAP5: Reuse prm read_inst/write_inst
  ARM: OMAP5: prm: Allow prm init to succeed
  ARM: OMAP5: timer: Update the clocksource name as per clock data
  ARM: OMAP5: Update SOC id detection code for ES2

1  2 
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

diff --combined arch/arm/mach-omap2/io.c
  #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)
@@@ -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)
@@@ -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
@@@ -62,6 -62,7 +62,7 @@@
  #define OMAP2_MPU_SOURCE      "sys_ck"
  #define OMAP3_MPU_SOURCE      OMAP2_MPU_SOURCE
  #define OMAP4_MPU_SOURCE      "sys_clkin_ck"
+ #define OMAP5_MPU_SOURCE      "sys_clkin"
  #define OMAP2_32K_SOURCE      "func_32k_ck"
  #define OMAP3_32K_SOURCE      "omap_32k_fck"
  #define OMAP4_32K_SOURCE      "sys_32k_ck"
@@@ -487,7 -488,7 +488,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, OMAP5_MPU_SOURCE);
        if (IS_ERR(sys_clk)) {
                pr_err("%s: failed to get system clock handle\n", __func__);
                iounmap(base);
@@@ -547,8 -548,6 +548,8 @@@ static inline void __init realtime_coun
                               clksrc_nr, clksrc_src)                   \
  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);        \
                                clksrc_nr, clksrc_src)                  \
  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 */ \
@@@ -620,7 -617,7 +621,7 @@@ void __init omap4_local_timer_init(void
  
  #ifdef CONFIG_SOC_OMAP5
  OMAP_SYS_32K_TIMER_INIT(5, 1, OMAP4_32K_SOURCE, "ti,timer-alwon",
-                       2, OMAP4_MPU_SOURCE);
+                       2, OMAP5_MPU_SOURCE);
  void __init omap5_realtime_timer_init(void)
  {
        int err;