Merge tag 'cleanup2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 23 Jul 2012 23:22:12 +0000 (16:22 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 23 Jul 2012 23:22:12 +0000 (16:22 -0700)
Pull arm-soc cleanups, part 2, from Arnd Bergmann:
 "These omap cleanups have dependencies on earlier omap branches that in
  turn depend on other cleanups, so they could not go into the same
  branch."

* tag 'cleanup2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  ARM: OMAP: sdrc: Fix the build break for OMAP4 only builds
  ARM: OMAP2+: dmtimer: cleanup fclk usage
  ARM: OMAP2+: Fix mismerge for omap_hwmod_get_main_clk() API
  ARM: OMAP2+: Remove unnecessary ifdef around __omap2_set_globals
  ARM: OMAP2+: am33xx: Change cpu_is_am33xx to soc_is_am33xx
  ARM: OMAP2+: am33xx: Make am33xx as a separate class
  ARM: OMAP2+: Move omap3 dpll ops to dpll3xxx.c
  ARM: OMAP2+: All OMAP2PLUS uses omap-device.o target so add one entry
  ARM: OMAP: dmtimer: use devm_ API and do some cleanup in probe()
  ARM: OMAP2+: hwmod code: add support to set dmadisable in hwmod framework
  ARM: OMAP2+: PRM/CM: Move the stubbed prm and cm functions to prcm.c file and make them __weak
  ARM: OMAP2+: hwmod: add omap_hwmod_get_main_clk() API
  ARM: OMAP3+: dpll: optimize noncore dpll locking logic
  ARM: OMAP3: control: add definition for CONTROL_CAMERA_PHY_CTRL
  ARM: OMAP2+: powerdomain code: Fix Wake-up power domain power status
  ARM: OMAP4: clockdomain/CM code: Update supported transition modes
  ARM: OMAP3/4: omap_hwmod: Add rstst_offs field to struct omap_hwmod_omap4_prcm
  ARM: OMAP2+: hwmod: Add new sysc_type3 into omap_hwmod required for am33xx

1  2 
arch/arm/mach-omap2/Kconfig
arch/arm/mach-omap2/Makefile
arch/arm/mach-omap2/clock3xxx_data.c
arch/arm/mach-omap2/omap_hwmod.c
arch/arm/mach-omap2/prm_common.c
arch/arm/plat-omap/include/plat/cpu.h

@@@ -21,12 -21,16 +21,16 @@@ config ARCH_OMAP2PLUS_TYPICA
        help
          Compile a kernel suitable for booting most boards
  
+ config SOC_HAS_OMAP2_SDRC
+       bool "OMAP2 SDRAM Controller support"
  config ARCH_OMAP2
        bool "TI OMAP2"
        depends on ARCH_OMAP2PLUS
        default y
        select CPU_V6
        select MULTI_IRQ_HANDLER
+       select SOC_HAS_OMAP2_SDRC
  
  config ARCH_OMAP3
        bool "TI OMAP3"
        select CPU_V7
        select USB_ARCH_HAS_EHCI if USB_SUPPORT
        select ARCH_HAS_OPP
 +      select PM_RUNTIME if CPU_IDLE
        select PM_OPP if PM
        select ARM_CPU_SUSPEND if PM
        select MULTI_IRQ_HANDLER
+       select SOC_HAS_OMAP2_SDRC
  
  config ARCH_OMAP4
        bool "TI OMAP4"
@@@ -53,7 -57,6 +58,7 @@@
        select PL310_ERRATA_727915
        select ARM_ERRATA_720789
        select ARCH_HAS_OPP
 +      select PM_RUNTIME if CPU_IDLE
        select PM_OPP if PM
        select USB_ARCH_HAS_EHCI if USB_SUPPORT
        select ARM_CPU_SUSPEND if PM
@@@ -66,16 -69,19 +71,19 @@@ config SOC_OMAP242
        depends on ARCH_OMAP2
        default y
        select OMAP_DM_TIMER
+       select SOC_HAS_OMAP2_SDRC
  
  config SOC_OMAP2430
        bool "OMAP2430 support"
        depends on ARCH_OMAP2
        default y
+       select SOC_HAS_OMAP2_SDRC
  
  config SOC_OMAP3430
        bool "OMAP3430 support"
        depends on ARCH_OMAP3
        default y
+       select SOC_HAS_OMAP2_SDRC
  
  config SOC_TI81XX
        bool "TI81XX support"
  
  config SOC_AM33XX
        bool "AM33XX support"
-       depends on ARCH_OMAP3
        default y
+       select CPU_V7
+       select ARM_CPU_SUSPEND if PM
+       select MULTI_IRQ_HANDLER
  
  config OMAP_PACKAGE_ZAF
         bool
@@@ -6,7 -6,7 +6,7 @@@
  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
  
- omap-2-3-common                               = irq.o sdrc.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 \
@@@ -16,12 -16,14 +16,14 @@@ secure-common                              = omap-smc.o omap-secu
  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)
  
  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
  
  # SMP support ONLY available for OMAP4
  
@@@ -66,7 -68,9 +68,7 @@@ ifeq ($(CONFIG_PM),y
  obj-$(CONFIG_ARCH_OMAP2)              += pm24xx.o
  obj-$(CONFIG_ARCH_OMAP2)              += sleep24xx.o
  obj-$(CONFIG_ARCH_OMAP3)              += pm34xx.o sleep34xx.o
 -obj-$(CONFIG_ARCH_OMAP3)              += cpuidle34xx.o
  obj-$(CONFIG_ARCH_OMAP4)              += pm44xx.o omap-mpuss-lowpower.o
 -obj-$(CONFIG_ARCH_OMAP4)              += cpuidle44xx.o
  obj-$(CONFIG_PM_DEBUG)                        += pm-debug.o
  obj-$(CONFIG_OMAP_SMARTREFLEX)          += sr_device.o smartreflex.o
  obj-$(CONFIG_OMAP_SMARTREFLEX_CLASS3) += smartreflex-class3.o
@@@ -80,11 -84,6 +82,11 @@@ endi
  
  endif
  
 +ifeq ($(CONFIG_CPU_IDLE),y)
 +obj-$(CONFIG_ARCH_OMAP3)                += cpuidle34xx.o
 +obj-$(CONFIG_ARCH_OMAP4)                += cpuidle44xx.o
 +endif
 +
  # PRCM
  obj-y                                 += prm_common.o
  obj-$(CONFIG_ARCH_OMAP2)              += prcm.o cm2xxx_3xxx.o prm2xxx_3xxx.o
@@@ -103,6 -102,7 +105,7 @@@ obj-$(CONFIG_ARCH_OMAP3)           += $(voltaged
  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
  
  # OMAP powerdomain framework
@@@ -118,6 -118,7 +121,7 @@@ obj-$(CONFIG_ARCH_OMAP3)           += powerdomai
  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
  
@@@ -135,6 -136,7 +139,7 @@@ obj-$(CONFIG_ARCH_OMAP3)           += clockdomai
  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
  
@@@ -154,6 -156,7 +159,7 @@@ obj-$(CONFIG_ARCH_OMAP3)           += dpll3xxx.
  obj-$(CONFIG_ARCH_OMAP3)              += clkt_iclk.o
  obj-$(CONFIG_ARCH_OMAP4)              += $(clock-common) clock44xx_data.o
  obj-$(CONFIG_ARCH_OMAP4)              += dpll3xxx.o dpll44xx.o
+ obj-$(CONFIG_SOC_AM33XX)              += $(clock-common) dpll3xxx.o
  
  # OMAP2 clock rate set data (old "OPP" data)
  obj-$(CONFIG_SOC_OMAP2420)            += opp2420_data.o
@@@ -2490,13 -2490,13 +2490,13 @@@ static struct clk uart4_fck = 
  };
  
  static struct clk uart4_fck_am35xx = {
 -      .name           = "uart4_fck",
 -      .ops            = &clkops_omap2_dflt_wait,
 -      .parent         = &per_48m_fck,
 -      .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
 -      .enable_bit     = OMAP3430_EN_UART4_SHIFT,
 -      .clkdm_name     = "core_l4_clkdm",
 -      .recalc         = &followparent_recalc,
 +      .name           = "uart4_fck",
 +      .ops            = &clkops_omap2_dflt_wait,
 +      .parent         = &core_48m_fck,
 +      .enable_reg     = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
 +      .enable_bit     = AM35XX_EN_UART4_SHIFT,
 +      .clkdm_name     = "core_l4_clkdm",
 +      .recalc         = &followparent_recalc,
  };
  
  static struct clk gpt2_fck = {
@@@ -3201,12 -3201,8 +3201,12 @@@ static struct clk vpfe_fck = 
  };
  
  /*
 - * The UART1/2 functional clock acts as the functional
 - * clock for UART4. No separate fclk control available.
 + * The UART1/2 functional clock acts as the functional clock for
 + * UART4. No separate fclk control available.  XXX Well now we have a
 + * uart4_fck that is apparently used as the UART4 functional clock,
 + * but it also seems that uart1_fck or uart2_fck are still needed, at
 + * least for UART4 softresets to complete.  This really needs
 + * clarification.
   */
  static struct clk uart4_ick_am35xx = {
        .name           = "uart4_ick",
@@@ -3468,12 -3464,12 +3468,12 @@@ static struct omap_clk omap3xxx_clks[] 
        CLK(NULL,       "ipss_ick",     &ipss_ick,      CK_AM35XX),
        CLK(NULL,       "rmii_ck",      &rmii_ck,       CK_AM35XX),
        CLK(NULL,       "pclk_ck",      &pclk_ck,       CK_AM35XX),
 -      CLK("davinci_emac",     NULL,   &emac_ick,      CK_AM35XX),
 +      CLK("davinci_emac.0",   NULL,   &emac_ick,      CK_AM35XX),
        CLK("davinci_mdio.0",   NULL,   &emac_fck,      CK_AM35XX),
        CLK("vpfe-capture",     "master",       &vpfe_ick,      CK_AM35XX),
        CLK("vpfe-capture",     "slave",        &vpfe_fck,      CK_AM35XX),
 -      CLK("musb-am35x",       "ick",          &hsotgusb_ick_am35xx,   CK_AM35XX),
 -      CLK("musb-am35x",       "fck",          &hsotgusb_fck_am35xx,   CK_AM35XX),
 +      CLK(NULL,       "hsotgusb_ick",         &hsotgusb_ick_am35xx,   CK_AM35XX),
 +      CLK(NULL,       "hsotgusb_fck",         &hsotgusb_fck_am35xx,   CK_AM35XX),
        CLK(NULL,       "hecc_ck",      &hecc_ck,       CK_AM35XX),
        CLK(NULL,       "uart4_ick",    &uart4_ick_am35xx,      CK_AM35XX),
        CLK(NULL,       "timer_32k_ck", &omap_32k_fck,  CK_3XXX),
@@@ -3495,7 -3491,7 +3495,7 @@@ int __init omap3xxx_clk_init(void
        } else if (cpu_is_ti816x()) {
                cpu_mask = RATE_IN_TI816X;
                cpu_clkflg = CK_TI816X;
-       } else if (cpu_is_am33xx()) {
+       } else if (soc_is_am33xx()) {
                cpu_mask = RATE_IN_AM33XX;
        } else if (cpu_is_ti814x()) {
                cpu_mask = RATE_IN_TI814X;
@@@ -416,6 -416,49 +416,49 @@@ static int _set_softreset(struct omap_h
  }
  
  /**
+  * _set_dmadisable: set OCP_SYSCONFIG.DMADISABLE bit in @v
+  * @oh: struct omap_hwmod *
+  *
+  * The DMADISABLE bit is a semi-automatic bit present in sysconfig register
+  * of some modules. When the DMA must perform read/write accesses, the
+  * DMADISABLE bit is cleared by the hardware. But when the DMA must stop
+  * for power management, software must set the DMADISABLE bit back to 1.
+  *
+  * Set the DMADISABLE bit in @v for hwmod @oh.  Returns -EINVAL upon
+  * error or 0 upon success.
+  */
+ static int _set_dmadisable(struct omap_hwmod *oh)
+ {
+       u32 v;
+       u32 dmadisable_mask;
+       if (!oh->class->sysc ||
+           !(oh->class->sysc->sysc_flags & SYSC_HAS_DMADISABLE))
+               return -EINVAL;
+       if (!oh->class->sysc->sysc_fields) {
+               WARN(1, "omap_hwmod: %s: offset struct for sysconfig not provided in class\n", oh->name);
+               return -EINVAL;
+       }
+       /* clocks must be on for this operation */
+       if (oh->_state != _HWMOD_STATE_ENABLED) {
+               pr_warn("omap_hwmod: %s: dma can be disabled only from enabled state\n", oh->name);
+               return -EINVAL;
+       }
+       pr_debug("omap_hwmod: %s: setting DMADISABLE\n", oh->name);
+       v = oh->_sysc_cache;
+       dmadisable_mask =
+               (0x1 << oh->class->sysc->sysc_fields->dmadisable_shift);
+       v |= dmadisable_mask;
+       _write_sysconfig(v, oh);
+       return 0;
+ }
+ /**
   * _set_module_autoidle: set the OCP_SYSCONFIG AUTOIDLE field in @v
   * @oh: struct omap_hwmod *
   * @autoidle: desired AUTOIDLE bitfield value (0 or 1)
@@@ -1145,18 -1188,15 +1188,18 @@@ static struct omap_hwmod_addr_space * _
   * _enable_sysc - try to bring a module out of idle via OCP_SYSCONFIG
   * @oh: struct omap_hwmod *
   *
 - * If module is marked as SWSUP_SIDLE, force the module out of slave
 - * idle; otherwise, configure it for smart-idle.  If module is marked
 - * as SWSUP_MSUSPEND, force the module out of master standby;
 - * otherwise, configure it for smart-standby.  No return value.
 + * Ensure that the OCP_SYSCONFIG register for the IP block represented
 + * by @oh is set to indicate to the PRCM that the IP block is active.
 + * Usually this means placing the module into smart-idle mode and
 + * smart-standby, but if there is a bug in the automatic idle handling
 + * for the IP block, it may need to be placed into the force-idle or
 + * no-idle variants of these modes.  No return value.
   */
  static void _enable_sysc(struct omap_hwmod *oh)
  {
        u8 idlemode, sf;
        u32 v;
 +      bool clkdm_act;
  
        if (!oh->class->sysc)
                return;
        sf = oh->class->sysc->sysc_flags;
  
        if (sf & SYSC_HAS_SIDLEMODE) {
 -              idlemode = (oh->flags & HWMOD_SWSUP_SIDLE) ?
 -                      HWMOD_IDLEMODE_NO : HWMOD_IDLEMODE_SMART;
 +              clkdm_act = ((oh->clkdm &&
 +                            oh->clkdm->flags & CLKDM_ACTIVE_WITH_MPU) ||
 +                           (oh->_clk && oh->_clk->clkdm &&
 +                            oh->_clk->clkdm->flags & CLKDM_ACTIVE_WITH_MPU));
 +              if (clkdm_act && !(oh->class->sysc->idlemodes &
 +                                 (SIDLE_SMART | SIDLE_SMART_WKUP)))
 +                      idlemode = HWMOD_IDLEMODE_FORCE;
 +              else
 +                      idlemode = (oh->flags & HWMOD_SWSUP_SIDLE) ?
 +                              HWMOD_IDLEMODE_NO : HWMOD_IDLEMODE_SMART;
                _set_slave_idlemode(oh, idlemode, &v);
        }
  
@@@ -1240,13 -1272,8 +1283,13 @@@ static void _idle_sysc(struct omap_hwmo
        sf = oh->class->sysc->sysc_flags;
  
        if (sf & SYSC_HAS_SIDLEMODE) {
 -              idlemode = (oh->flags & HWMOD_SWSUP_SIDLE) ?
 -                      HWMOD_IDLEMODE_FORCE : HWMOD_IDLEMODE_SMART;
 +              /* XXX What about HWMOD_IDLEMODE_SMART_WKUP? */
 +              if (oh->flags & HWMOD_SWSUP_SIDLE ||
 +                  !(oh->class->sysc->idlemodes &
 +                    (SIDLE_SMART | SIDLE_SMART_WKUP)))
 +                      idlemode = HWMOD_IDLEMODE_FORCE;
 +              else
 +                      idlemode = HWMOD_IDLEMODE_SMART;
                _set_slave_idlemode(oh, idlemode, &v);
        }
  
@@@ -1668,11 -1695,17 +1711,17 @@@ dis_opt_clks
   * therefore have no OCP header registers to access.  Others (like the
   * IVA) have idiosyncratic reset sequences.  So for these relatively
   * rare cases, custom reset code can be supplied in the struct
-  * omap_hwmod_class .reset function pointer.  Passes along the return
-  * value from either _ocp_softreset() or the custom reset function -
-  * these must return -EINVAL if the hwmod cannot be reset this way or
-  * if the hwmod is in the wrong state, -ETIMEDOUT if the module did
-  * not reset in time, or 0 upon success.
+  * omap_hwmod_class .reset function pointer.
+  *
+  * _set_dmadisable() is called to set the DMADISABLE bit so that it
+  * does not prevent idling of the system. This is necessary for cases
+  * where ROMCODE/BOOTLOADER uses dma and transfers control to the
+  * kernel without disabling dma.
+  *
+  * Passes along the return value from either _ocp_softreset() or the
+  * custom reset function - these must return -EINVAL if the hwmod
+  * cannot be reset this way or if the hwmod is in the wrong state,
+  * -ETIMEDOUT if the module did not reset in time, or 0 upon success.
   */
  static int _reset(struct omap_hwmod *oh)
  {
                }
        }
  
+       _set_dmadisable(oh);
        /*
         * OCP_SYSCONFIG bits need to be reprogrammed after a
         * softreset.  The _enable() function should be split to avoid
@@@ -3598,3 -3633,18 +3649,18 @@@ void __init omap_hwmod_init(void
  
        inited = true;
  }
+ /**
+  * omap_hwmod_get_main_clk - get pointer to main clock name
+  * @oh: struct omap_hwmod *
+  *
+  * Returns the main clock name assocated with @oh upon success,
+  * or NULL if @oh is NULL.
+  */
+ const char *omap_hwmod_get_main_clk(struct omap_hwmod *oh)
+ {
+       if (!oh)
+               return NULL;
+       return oh->main_clk;
+ }
@@@ -85,7 -85,7 +85,7 @@@ static void omap_prcm_irq_handler(unsig
        unsigned long priority_pending[OMAP_PRCM_MAX_NR_PENDING_REG];
        struct irq_chip *chip = irq_desc_get_chip(desc);
        unsigned int virtirq;
 -      int nr_irqs = prcm_irq_setup->nr_regs * 32;
 +      int nr_irq = prcm_irq_setup->nr_regs * 32;
  
        /*
         * If we are suspended, mask all interrupts from PRCM level,
                prcm_irq_setup->read_pending_irqs(pending);
  
                /* No bit set, then all IRQs are handled */
 -              if (find_first_bit(pending, nr_irqs) >= nr_irqs)
 +              if (find_first_bit(pending, nr_irq) >= nr_irq)
                        break;
  
                omap_prcm_events_filter_priority(pending, priority_pending);
                 */
  
                /* Serve priority events first */
 -              for_each_set_bit(virtirq, priority_pending, nr_irqs)
 +              for_each_set_bit(virtirq, priority_pending, nr_irq)
                        generic_handle_irq(prcm_irq_setup->base_irq + virtirq);
  
                /* Serve normal events next */
 -              for_each_set_bit(virtirq, pending, nr_irqs)
 +              for_each_set_bit(virtirq, pending, nr_irq)
                        generic_handle_irq(prcm_irq_setup->base_irq + virtirq);
        }
        if (chip->irq_ack)
@@@ -319,3 -319,65 +319,65 @@@ err
        omap_prcm_irq_cleanup();
        return -ENOMEM;
  }
+ /*
+  * Stubbed functions so that common files continue to build when
+  * custom builds are used
+  * XXX These are temporary and should be removed at the earliest possible
+  * opportunity
+  */
+ u32 __weak omap2_prm_read_mod_reg(s16 module, u16 idx)
+ {
+       WARN(1, "prm: omap2xxx/omap3xxx specific function called on non-omap2xxx/3xxx\n");
+       return 0;
+ }
+ void __weak omap2_prm_write_mod_reg(u32 val, s16 module, u16 idx)
+ {
+       WARN(1, "prm: omap2xxx/omap3xxx specific function called on non-omap2xxx/3xxx\n");
+ }
+ u32 __weak omap2_prm_rmw_mod_reg_bits(u32 mask, u32 bits,
+               s16 module, s16 idx)
+ {
+       WARN(1, "prm: omap2xxx/omap3xxx specific function called on non-omap2xxx/3xxx\n");
+       return 0;
+ }
+ u32 __weak omap2_prm_set_mod_reg_bits(u32 bits, s16 module, s16 idx)
+ {
+       WARN(1, "prm: omap2xxx/omap3xxx specific function called on non-omap2xxx/3xxx\n");
+       return 0;
+ }
+ u32 __weak omap2_prm_clear_mod_reg_bits(u32 bits, s16 module, s16 idx)
+ {
+       WARN(1, "prm: omap2xxx/omap3xxx specific function called on non-omap2xxx/3xxx\n");
+       return 0;
+ }
+ u32 __weak omap2_prm_read_mod_bits_shift(s16 domain, s16 idx, u32 mask)
+ {
+       WARN(1, "prm: omap2xxx/omap3xxx specific function called on non-omap2xxx/3xxx\n");
+       return 0;
+ }
+ int __weak omap2_prm_is_hardreset_asserted(s16 prm_mod, u8 shift)
+ {
+       WARN(1, "prm: omap2xxx/omap3xxx specific function called on non-omap2xxx/3xxx\n");
+       return 0;
+ }
+ int __weak omap2_prm_assert_hardreset(s16 prm_mod, u8 shift)
+ {
+       WARN(1, "prm: omap2xxx/omap3xxx specific function called on non-omap2xxx/3xxx\n");
+       return 0;
+ }
+ int __weak omap2_prm_deassert_hardreset(s16 prm_mod, u8 rst_shift,
+                                               u8 st_shift)
+ {
+       WARN(1, "prm: omap2xxx/omap3xxx specific function called on non-omap2xxx/3xxx\n");
+       return 0;
+ }
@@@ -150,8 -150,8 +150,8 @@@ IS_AM_SUBCLASS(335x, 0x335
  #define cpu_is_ti816x()                       0
  #define cpu_is_ti814x()                       0
  #define soc_is_am35xx()                       0
- #define cpu_is_am33xx()                       0
- #define cpu_is_am335x()                       0
+ #define soc_is_am33xx()                       0
+ #define soc_is_am335x()                       0
  #define cpu_is_omap44xx()             0
  #define cpu_is_omap443x()             0
  #define cpu_is_omap446x()             0
  /*
   * Macros to detect individual cpu types.
   * These are only rarely needed.
 - * cpu_is_omap330():  True for OMAP330
 - * cpu_is_omap730():  True for OMAP730
 - * cpu_is_omap850():  True for OMAP850
 + * cpu_is_omap310():  True for OMAP310
   * cpu_is_omap1510(): True for OMAP1510
   * cpu_is_omap1610(): True for OMAP1610
   * cpu_is_omap1611(): True for OMAP1611
@@@ -260,6 -262,8 +260,6 @@@ static inline int is_omap ##type (void
  }
  
  IS_OMAP_TYPE(310, 0x0310)
 -IS_OMAP_TYPE(730, 0x0730)
 -IS_OMAP_TYPE(850, 0x0850)
  IS_OMAP_TYPE(1510, 0x1510)
  IS_OMAP_TYPE(1610, 0x1610)
  IS_OMAP_TYPE(1611, 0x1611)
@@@ -273,6 -277,8 +273,6 @@@ IS_OMAP_TYPE(2430, 0x2430
  IS_OMAP_TYPE(3430, 0x3430)
  
  #define cpu_is_omap310()              0
 -#define cpu_is_omap730()              0
 -#define cpu_is_omap850()              0
  #define cpu_is_omap1510()             0
  #define cpu_is_omap1610()             0
  #define cpu_is_omap5912()             0
  
  /*
   * Whether we have MULTI_OMAP1 or not, we still need to distinguish
 - * between 730 vs 850, 330 vs. 1510 and 1611B/5912 vs. 1710.
 + * between 310 vs. 1510 and 1611B/5912 vs. 1710.
   */
  
 -#if defined(CONFIG_ARCH_OMAP730)
 -# undef  cpu_is_omap730
 -# define cpu_is_omap730()             is_omap730()
 -#endif
 -
 -#if defined(CONFIG_ARCH_OMAP850)
 -# undef  cpu_is_omap850
 -# define cpu_is_omap850()             is_omap850()
 -#endif
 -
  #if defined(CONFIG_ARCH_OMAP15XX)
  # undef  cpu_is_omap310
  # undef  cpu_is_omap1510
  # undef cpu_is_ti816x
  # undef cpu_is_ti814x
  # undef soc_is_am35xx
- # undef cpu_is_am33xx
- # undef cpu_is_am335x
  # define cpu_is_omap3430()            is_omap3430()
  # undef cpu_is_omap3630
  # define cpu_is_omap3630()            is_omap363x()
  # define cpu_is_ti816x()              is_ti816x()
  # define cpu_is_ti814x()              is_ti814x()
  # define soc_is_am35xx()              is_am35xx()
- # define cpu_is_am33xx()              is_am33xx()
- # define cpu_is_am335x()              is_am335x()
+ #endif
+ # if defined(CONFIG_SOC_AM33XX)
+ # undef soc_is_am33xx
+ # undef soc_is_am335x
+ # define soc_is_am33xx()              is_am33xx()
+ # define soc_is_am335x()              is_am335x()
  #endif
  
  # if defined(CONFIG_ARCH_OMAP4)
  #define AM35XX_REV_ES1_0      AM35XX_CLASS
  #define AM35XX_REV_ES1_1      (AM35XX_CLASS | (0x1 << 8))
  
- #define AM335X_CLASS          0x33500034
+ #define AM335X_CLASS          0x33500033
  #define AM335X_REV_ES1_0      AM335X_CLASS
  
  #define OMAP443X_CLASS                0x44300044