Skip to content

Commit aa8bd59

Browse files
committed
Merge tag 'omap-for-v3.7-rc1/fixes-hwmod-clock-signed-v3' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
From Paul Walmsley <[email protected]> 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
2 parents 125c967 + eb20f31 commit aa8bd59

6 files changed

+54
-30
lines changed

arch/arm/mach-omap2/board-omap3evm.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,10 @@ enum {
8888

8989
static u8 omap3_evm_version;
9090

91-
u8 get_omap3_evm_rev(void)
91+
static u8 get_omap3_evm_rev(void)
9292
{
9393
return omap3_evm_version;
9494
}
95-
EXPORT_SYMBOL(get_omap3_evm_rev);
9695

9796
static void __init omap3_evm_get_revision(void)
9897
{

arch/arm/mach-omap2/clock33xx_data.c

+2
Original file line numberDiff line numberDiff line change
@@ -1035,6 +1035,8 @@ static struct omap_clk am33xx_clks[] = {
10351035
CLK(NULL, "pruss_ocp_gclk", &pruss_ocp_gclk, CK_AM33XX),
10361036
CLK("davinci-mcasp.0", NULL, &mcasp0_fck, CK_AM33XX),
10371037
CLK("davinci-mcasp.1", NULL, &mcasp1_fck, CK_AM33XX),
1038+
CLK(NULL, "mcasp0_fck", &mcasp0_fck, CK_AM33XX),
1039+
CLK(NULL, "mcasp1_fck", &mcasp1_fck, CK_AM33XX),
10381040
CLK("NULL", "mmc2_fck", &mmc2_fck, CK_AM33XX),
10391041
CLK(NULL, "mmu_fck", &mmu_fck, CK_AM33XX),
10401042
CLK(NULL, "smartreflex0_fck", &smartreflex0_fck, CK_AM33XX),

arch/arm/mach-omap2/clockdomain2xxx_3xxx.c

+22-22
Original file line numberDiff line numberDiff line change
@@ -183,17 +183,6 @@ static int omap2_clkdm_clk_enable(struct clockdomain *clkdm)
183183
if (!clkdm->clktrctrl_mask)
184184
return 0;
185185

186-
/*
187-
* The CLKDM_MISSING_IDLE_REPORTING flag documentation has
188-
* more details on the unpleasant problem this is working
189-
* around
190-
*/
191-
if (clkdm->flags & CLKDM_MISSING_IDLE_REPORTING &&
192-
!(clkdm->flags & CLKDM_CAN_FORCE_SLEEP)) {
193-
_enable_hwsup(clkdm);
194-
return 0;
195-
}
196-
197186
hwsup = omap2_cm_is_clkdm_in_hwsup(clkdm->pwrdm.ptr->prcm_offs,
198187
clkdm->clktrctrl_mask);
199188

@@ -217,17 +206,6 @@ static int omap2_clkdm_clk_disable(struct clockdomain *clkdm)
217206
if (!clkdm->clktrctrl_mask)
218207
return 0;
219208

220-
/*
221-
* The CLKDM_MISSING_IDLE_REPORTING flag documentation has
222-
* more details on the unpleasant problem this is working
223-
* around
224-
*/
225-
if ((clkdm->flags & CLKDM_MISSING_IDLE_REPORTING) &&
226-
(clkdm->flags & CLKDM_CAN_FORCE_WAKEUP)) {
227-
omap3_clkdm_wakeup(clkdm);
228-
return 0;
229-
}
230-
231209
hwsup = omap2_cm_is_clkdm_in_hwsup(clkdm->pwrdm.ptr->prcm_offs,
232210
clkdm->clktrctrl_mask);
233211

@@ -269,6 +247,17 @@ static int omap3xxx_clkdm_clk_enable(struct clockdomain *clkdm)
269247
if (!clkdm->clktrctrl_mask)
270248
return 0;
271249

250+
/*
251+
* The CLKDM_MISSING_IDLE_REPORTING flag documentation has
252+
* more details on the unpleasant problem this is working
253+
* around
254+
*/
255+
if ((clkdm->flags & CLKDM_MISSING_IDLE_REPORTING) &&
256+
(clkdm->flags & CLKDM_CAN_FORCE_WAKEUP)) {
257+
omap3_clkdm_wakeup(clkdm);
258+
return 0;
259+
}
260+
272261
hwsup = omap2_cm_is_clkdm_in_hwsup(clkdm->pwrdm.ptr->prcm_offs,
273262
clkdm->clktrctrl_mask);
274263

@@ -292,6 +281,17 @@ static int omap3xxx_clkdm_clk_disable(struct clockdomain *clkdm)
292281
if (!clkdm->clktrctrl_mask)
293282
return 0;
294283

284+
/*
285+
* The CLKDM_MISSING_IDLE_REPORTING flag documentation has
286+
* more details on the unpleasant problem this is working
287+
* around
288+
*/
289+
if (clkdm->flags & CLKDM_MISSING_IDLE_REPORTING &&
290+
!(clkdm->flags & CLKDM_CAN_FORCE_SLEEP)) {
291+
_enable_hwsup(clkdm);
292+
return 0;
293+
}
294+
295295
hwsup = omap2_cm_is_clkdm_in_hwsup(clkdm->pwrdm.ptr->prcm_offs,
296296
clkdm->clktrctrl_mask);
297297

arch/arm/mach-omap2/omap_hwmod.c

+27-4
Original file line numberDiff line numberDiff line change
@@ -1697,6 +1697,29 @@ static bool _are_all_hardreset_lines_asserted(struct omap_hwmod *oh)
16971697
return false;
16981698
}
16991699

1700+
/**
1701+
* _are_any_hardreset_lines_asserted - return true if any part of @oh is
1702+
* hard-reset
1703+
* @oh: struct omap_hwmod *
1704+
*
1705+
* If any hardreset lines associated with @oh are asserted, then
1706+
* return true. Otherwise, if no hardreset lines associated with @oh
1707+
* are asserted, or if @oh has no hardreset lines, then return false.
1708+
* This function is used to avoid executing some parts of the IP block
1709+
* enable/disable sequence if any hardreset line is set.
1710+
*/
1711+
static bool _are_any_hardreset_lines_asserted(struct omap_hwmod *oh)
1712+
{
1713+
int rst_cnt = 0;
1714+
int i;
1715+
1716+
for (i = 0; i < oh->rst_lines_cnt && rst_cnt == 0; i++)
1717+
if (_read_hardreset(oh, oh->rst_lines[i].name) > 0)
1718+
rst_cnt++;
1719+
1720+
return (rst_cnt) ? true : false;
1721+
}
1722+
17001723
/**
17011724
* _omap4_disable_module - enable CLKCTRL modulemode on OMAP4
17021725
* @oh: struct omap_hwmod *
@@ -1715,7 +1738,7 @@ static int _omap4_disable_module(struct omap_hwmod *oh)
17151738
* Since integration code might still be doing something, only
17161739
* disable if all lines are under hardreset.
17171740
*/
1718-
if (!_are_all_hardreset_lines_asserted(oh))
1741+
if (_are_any_hardreset_lines_asserted(oh))
17191742
return 0;
17201743

17211744
pr_debug("omap_hwmod: %s: %s\n", oh->name, __func__);
@@ -1749,12 +1772,12 @@ static int _am33xx_disable_module(struct omap_hwmod *oh)
17491772

17501773
pr_debug("omap_hwmod: %s: %s\n", oh->name, __func__);
17511774

1775+
if (_are_any_hardreset_lines_asserted(oh))
1776+
return 0;
1777+
17521778
am33xx_cm_module_disable(oh->clkdm->cm_inst, oh->clkdm->clkdm_offs,
17531779
oh->prcm.omap4.clkctrl_offs);
17541780

1755-
if (_are_all_hardreset_lines_asserted(oh))
1756-
return 0;
1757-
17581781
v = _am33xx_wait_target_disable(oh);
17591782
if (v)
17601783
pr_warn("omap_hwmod: %s: _wait_target_disable failed\n",

arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ struct omap_hwmod omap2xxx_l4_wkup_hwmod = {
219219

220220
/* MPU */
221221
static struct omap_hwmod_irq_info omap2xxx_mpu_irqs[] = {
222-
{ .name = "pmu", .irq = 3 },
222+
{ .name = "pmu", .irq = 3 + OMAP_INTC_START },
223223
{ .irq = -1 }
224224
};
225225

arch/arm/mach-omap2/omap_hwmod_3xxx_data.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ static struct omap_hwmod omap3xxx_l4_sec_hwmod = {
9494

9595
/* MPU */
9696
static struct omap_hwmod_irq_info omap3xxx_mpu_irqs[] = {
97-
{ .name = "pmu", .irq = 3 },
97+
{ .name = "pmu", .irq = 3 + OMAP_INTC_START },
9898
{ .irq = -1 }
9999
};
100100

0 commit comments

Comments
 (0)