Merge tag 'omap-for-v3.7-rc1/fixes-hwmod-clock-signed-v3' of git://git.kernel.org...
authorOlof Johansson <olof@lixom.net>
Tue, 9 Oct 2012 21:04:35 +0000 (14:04 -0700)
committerOlof Johansson <olof@lixom.net>
Tue, 9 Oct 2012 22:00:55 +0000 (15:00 -0700)
From Paul Walmsley <paul@pwsan.com> via Tony Lindgren:

Some OMAP fixes for the 3.7 merge window, fixing mismerges, branch
integration issues, and bugs after the arm-soc merges.

* tag 'omap-for-v3.7-rc1/fixes-hwmod-clock-signed-v3' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP4/AM335x: hwmod: fix disable_module regression in hardreset handling
  ARM: OMAP3: fix workaround for EMU clockdomain
  ARM: OMAP: omap3evm: fix new sparse warning
  ARM: OMAP2+: hwmod data: Fix PMU interrupt definitions
  ARM: am33xx: clk: Update clkdev table to add mcasp alias

arch/arm/mach-omap2/board-omap3evm.c
arch/arm/mach-omap2/clock33xx_data.c
arch/arm/mach-omap2/clockdomain2xxx_3xxx.c
arch/arm/mach-omap2/omap_hwmod.c
arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c
arch/arm/mach-omap2/omap_hwmod_3xxx_data.c

index c64e565bdef5cd1e6fa0c5227a45c2228b8efeb4..184ef21f6e3cda12139e58c3e2a74326b138968c 100644 (file)
@@ -88,11 +88,10 @@ enum {
 
 static u8 omap3_evm_version;
 
-u8 get_omap3_evm_rev(void)
+static u8 get_omap3_evm_rev(void)
 {
        return omap3_evm_version;
 }
-EXPORT_SYMBOL(get_omap3_evm_rev);
 
 static void __init omap3_evm_get_revision(void)
 {
index b87b88c2638b968ae834f5d4df2dade5c388c52a..114ab4b8e0e356883192bb847237172df9d46ab3 100644 (file)
@@ -1035,6 +1035,8 @@ static struct omap_clk am33xx_clks[] = {
        CLK(NULL,       "pruss_ocp_gclk",       &pruss_ocp_gclk,        CK_AM33XX),
        CLK("davinci-mcasp.0",  NULL,           &mcasp0_fck,    CK_AM33XX),
        CLK("davinci-mcasp.1",  NULL,           &mcasp1_fck,    CK_AM33XX),
+       CLK(NULL,       "mcasp0_fck",           &mcasp0_fck,    CK_AM33XX),
+       CLK(NULL,       "mcasp1_fck",           &mcasp1_fck,    CK_AM33XX),
        CLK("NULL",     "mmc2_fck",             &mmc2_fck,      CK_AM33XX),
        CLK(NULL,       "mmu_fck",              &mmu_fck,       CK_AM33XX),
        CLK(NULL,       "smartreflex0_fck",     &smartreflex0_fck,      CK_AM33XX),
index 9a7792aec6730f498a642810073888ad6b12df38..70294f54e35af2b656cacaf10543612511d2d584 100644 (file)
@@ -183,17 +183,6 @@ static int omap2_clkdm_clk_enable(struct clockdomain *clkdm)
        if (!clkdm->clktrctrl_mask)
                return 0;
 
-       /*
-        * The CLKDM_MISSING_IDLE_REPORTING flag documentation has
-        * more details on the unpleasant problem this is working
-        * around
-        */
-       if (clkdm->flags & CLKDM_MISSING_IDLE_REPORTING &&
-           !(clkdm->flags & CLKDM_CAN_FORCE_SLEEP)) {
-               _enable_hwsup(clkdm);
-               return 0;
-       }
-
        hwsup = omap2_cm_is_clkdm_in_hwsup(clkdm->pwrdm.ptr->prcm_offs,
                                clkdm->clktrctrl_mask);
 
@@ -217,17 +206,6 @@ static int omap2_clkdm_clk_disable(struct clockdomain *clkdm)
        if (!clkdm->clktrctrl_mask)
                return 0;
 
-       /*
-        * The CLKDM_MISSING_IDLE_REPORTING flag documentation has
-        * more details on the unpleasant problem this is working
-        * around
-        */
-       if ((clkdm->flags & CLKDM_MISSING_IDLE_REPORTING) &&
-           (clkdm->flags & CLKDM_CAN_FORCE_WAKEUP)) {
-               omap3_clkdm_wakeup(clkdm);
-               return 0;
-       }
-
        hwsup = omap2_cm_is_clkdm_in_hwsup(clkdm->pwrdm.ptr->prcm_offs,
                                clkdm->clktrctrl_mask);
 
@@ -269,6 +247,17 @@ static int omap3xxx_clkdm_clk_enable(struct clockdomain *clkdm)
        if (!clkdm->clktrctrl_mask)
                return 0;
 
+       /*
+        * The CLKDM_MISSING_IDLE_REPORTING flag documentation has
+        * more details on the unpleasant problem this is working
+        * around
+        */
+       if ((clkdm->flags & CLKDM_MISSING_IDLE_REPORTING) &&
+           (clkdm->flags & CLKDM_CAN_FORCE_WAKEUP)) {
+               omap3_clkdm_wakeup(clkdm);
+               return 0;
+       }
+
        hwsup = omap2_cm_is_clkdm_in_hwsup(clkdm->pwrdm.ptr->prcm_offs,
                                clkdm->clktrctrl_mask);
 
@@ -292,6 +281,17 @@ static int omap3xxx_clkdm_clk_disable(struct clockdomain *clkdm)
        if (!clkdm->clktrctrl_mask)
                return 0;
 
+       /*
+        * The CLKDM_MISSING_IDLE_REPORTING flag documentation has
+        * more details on the unpleasant problem this is working
+        * around
+        */
+       if (clkdm->flags & CLKDM_MISSING_IDLE_REPORTING &&
+           !(clkdm->flags & CLKDM_CAN_FORCE_SLEEP)) {
+               _enable_hwsup(clkdm);
+               return 0;
+       }
+
        hwsup = omap2_cm_is_clkdm_in_hwsup(clkdm->pwrdm.ptr->prcm_offs,
                                clkdm->clktrctrl_mask);
 
index 299ca2821ad1d6b0f6fed5a5a9712d5abeb2d5ce..b969ab1d258b91894415c3507bd8b50cd2aefa50 100644 (file)
@@ -1697,6 +1697,29 @@ static bool _are_all_hardreset_lines_asserted(struct omap_hwmod *oh)
        return false;
 }
 
+/**
+ * _are_any_hardreset_lines_asserted - return true if any part of @oh is
+ * hard-reset
+ * @oh: struct omap_hwmod *
+ *
+ * If any hardreset lines associated with @oh are asserted, then
+ * return true.  Otherwise, if no hardreset lines associated with @oh
+ * are asserted, or if @oh has no hardreset lines, then return false.
+ * This function is used to avoid executing some parts of the IP block
+ * enable/disable sequence if any hardreset line is set.
+ */
+static bool _are_any_hardreset_lines_asserted(struct omap_hwmod *oh)
+{
+       int rst_cnt = 0;
+       int i;
+
+       for (i = 0; i < oh->rst_lines_cnt && rst_cnt == 0; i++)
+               if (_read_hardreset(oh, oh->rst_lines[i].name) > 0)
+                       rst_cnt++;
+
+       return (rst_cnt) ? true : false;
+}
+
 /**
  * _omap4_disable_module - enable CLKCTRL modulemode on OMAP4
  * @oh: struct omap_hwmod *
@@ -1715,7 +1738,7 @@ static int _omap4_disable_module(struct omap_hwmod *oh)
         * Since integration code might still be doing something, only
         * disable if all lines are under hardreset.
         */
-       if (!_are_all_hardreset_lines_asserted(oh))
+       if (_are_any_hardreset_lines_asserted(oh))
                return 0;
 
        pr_debug("omap_hwmod: %s: %s\n", oh->name, __func__);
@@ -1749,12 +1772,12 @@ static int _am33xx_disable_module(struct omap_hwmod *oh)
 
        pr_debug("omap_hwmod: %s: %s\n", oh->name, __func__);
 
+       if (_are_any_hardreset_lines_asserted(oh))
+               return 0;
+
        am33xx_cm_module_disable(oh->clkdm->cm_inst, oh->clkdm->clkdm_offs,
                                 oh->prcm.omap4.clkctrl_offs);
 
-       if (_are_all_hardreset_lines_asserted(oh))
-               return 0;
-
        v = _am33xx_wait_target_disable(oh);
        if (v)
                pr_warn("omap_hwmod: %s: _wait_target_disable failed\n",
index 35dcdb66a4e01c6ef63b77c81506953d6fc45b50..bd9220ed5ab9d9fda89cca30b4bf1c339cad9f6d 100644 (file)
@@ -219,7 +219,7 @@ struct omap_hwmod omap2xxx_l4_wkup_hwmod = {
 
 /* MPU */
 static struct omap_hwmod_irq_info omap2xxx_mpu_irqs[] = {
-       { .name = "pmu", .irq = 3 },
+       { .name = "pmu", .irq = 3 + OMAP_INTC_START },
        { .irq = -1 }
 };
 
index 82fdb5932d310b3c3b9f62fd2669ff835151029f..f67b7ee07dd4f5575e206c2098bb67c88fa32873 100644 (file)
@@ -94,7 +94,7 @@ static struct omap_hwmod omap3xxx_l4_sec_hwmod = {
 
 /* MPU */
 static struct omap_hwmod_irq_info omap3xxx_mpu_irqs[] = {
-       { .name = "pmu", .irq = 3 },
+       { .name = "pmu", .irq = 3 + OMAP_INTC_START },
        { .irq = -1 }
 };
 
This page took 0.031061 seconds and 5 git commands to generate.