Skip to content

Commit 1dea581

Browse files
committed
Merge tag 'for-v4.5-rc/omap-critical-fixes-a' of git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending into fixes
ARM: OMAP2+: critical DRA7xx fix for v4.5-rc Force the DRA7xx Ethernet internal clock source to stay enabled per TI erratum i877: http://www.ti.com/lit/er/sprz429h/sprz429h.pdf Otherwise, if the Ethernet internal clock source is disabled, the chip will age prematurely, and the RGMII I/O timing will soon fail to meet the delay time and skew specifications for 1000Mbps Ethernet. This fix should go in as soon as possible. Basic build, boot, and PM test results are available here: http://www.pwsan.com/omap/testlogs/omap-critical-fixes-for-v4.5-rc/20160307014209/ * tag 'for-v4.5-rc/omap-critical-fixes-a' of git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending: ARM: dts: dra7: do not gate cpsw clock due to errata i877 ARM: OMAP2+: hwmod: Introduce ti,no-idle dt property Signed-off-by: Olof Johansson <olof@lixom.net>
2 parents f3c87e9 + 0f514e6 commit 1dea581

File tree

4 files changed

+22
-1
lines changed

4 files changed

+22
-1
lines changed

Documentation/devicetree/bindings/arm/omap/omap.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Optional properties:
2323
during suspend.
2424
- ti,no-reset-on-init: When present, the module should not be reset at init
2525
- ti,no-idle-on-init: When present, the module should not be idled at init
26+
- ti,no-idle: When present, the module is never allowed to idle.
2627

2728
Example:
2829

arch/arm/boot/dts/dra7.dtsi

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1500,6 +1500,16 @@
15001500
0x48485200 0x2E00>;
15011501
#address-cells = <1>;
15021502
#size-cells = <1>;
1503+
1504+
/*
1505+
* Do not allow gating of cpsw clock as workaround
1506+
* for errata i877. Keeping internal clock disabled
1507+
* causes the device switching characteristics
1508+
* to degrade over time and eventually fail to meet
1509+
* the data manual delay time/skew specs.
1510+
*/
1511+
ti,no-idle;
1512+
15031513
/*
15041514
* rx_thresh_pend
15051515
* rx_pend

arch/arm/mach-omap2/omap_hwmod.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2200,6 +2200,11 @@ static int _enable(struct omap_hwmod *oh)
22002200
*/
22012201
static int _idle(struct omap_hwmod *oh)
22022202
{
2203+
if (oh->flags & HWMOD_NO_IDLE) {
2204+
oh->_int_flags |= _HWMOD_SKIP_ENABLE;
2205+
return 0;
2206+
}
2207+
22032208
pr_debug("omap_hwmod: %s: idling\n", oh->name);
22042209

22052210
if (oh->_state != _HWMOD_STATE_ENABLED) {
@@ -2504,6 +2509,8 @@ static int __init _init(struct omap_hwmod *oh, void *data)
25042509
oh->flags |= HWMOD_INIT_NO_RESET;
25052510
if (of_find_property(np, "ti,no-idle-on-init", NULL))
25062511
oh->flags |= HWMOD_INIT_NO_IDLE;
2512+
if (of_find_property(np, "ti,no-idle", NULL))
2513+
oh->flags |= HWMOD_NO_IDLE;
25072514
}
25082515

25092516
oh->_state = _HWMOD_STATE_INITIALIZED;
@@ -2630,7 +2637,7 @@ static void __init _setup_postsetup(struct omap_hwmod *oh)
26302637
* XXX HWMOD_INIT_NO_IDLE does not belong in hwmod data -
26312638
* it should be set by the core code as a runtime flag during startup
26322639
*/
2633-
if ((oh->flags & HWMOD_INIT_NO_IDLE) &&
2640+
if ((oh->flags & (HWMOD_INIT_NO_IDLE | HWMOD_NO_IDLE)) &&
26342641
(postsetup_state == _HWMOD_STATE_IDLE)) {
26352642
oh->_int_flags |= _HWMOD_SKIP_ENABLE;
26362643
postsetup_state = _HWMOD_STATE_ENABLED;

arch/arm/mach-omap2/omap_hwmod.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,8 @@ struct omap_hwmod_omap4_prcm {
525525
* or idled.
526526
* HWMOD_OPT_CLKS_NEEDED: The optional clocks are needed for the module to
527527
* operate and they need to be handled at the same time as the main_clk.
528+
* HWMOD_NO_IDLE: Do not idle the hwmod at all. Useful to handle certain
529+
* IPs like CPSW on DRA7, where clocks to this module cannot be disabled.
528530
*/
529531
#define HWMOD_SWSUP_SIDLE (1 << 0)
530532
#define HWMOD_SWSUP_MSTANDBY (1 << 1)
@@ -541,6 +543,7 @@ struct omap_hwmod_omap4_prcm {
541543
#define HWMOD_SWSUP_SIDLE_ACT (1 << 12)
542544
#define HWMOD_RECONFIG_IO_CHAIN (1 << 13)
543545
#define HWMOD_OPT_CLKS_NEEDED (1 << 14)
546+
#define HWMOD_NO_IDLE (1 << 15)
544547

545548
/*
546549
* omap_hwmod._int_flags definitions

0 commit comments

Comments
 (0)