aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2016-03-09 17:15:31 -0500
committerOlof Johansson <olof@lixom.net>2016-03-09 17:15:31 -0500
commit1dea581f86f51563d5bf468abc36c74bc88f8aac (patch)
tree2aebb9e458b37f71198b3b7a356d5b47e456c253 /arch/arm
parentf3c87e99f401a0ff0ef941346ec6e790f0fd526e (diff)
parent0f514e690740e54815441a87708c3326f8aa8709 (diff)
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>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/boot/dts/dra7.dtsi10
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c9
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.h3
3 files changed, 21 insertions, 1 deletions
diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi
index c4d9175b90dc..f82aa44c3cee 100644
--- a/arch/arm/boot/dts/dra7.dtsi
+++ b/arch/arm/boot/dts/dra7.dtsi
@@ -1500,6 +1500,16 @@
1500 0x48485200 0x2E00>; 1500 0x48485200 0x2E00>;
1501 #address-cells = <1>; 1501 #address-cells = <1>;
1502 #size-cells = <1>; 1502 #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
1503 /* 1513 /*
1504 * rx_thresh_pend 1514 * rx_thresh_pend
1505 * rx_pend 1515 * rx_pend
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index e9f65fec55c0..b6d62e4cdfdd 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -2200,6 +2200,11 @@ static int _enable(struct omap_hwmod *oh)
2200 */ 2200 */
2201static int _idle(struct omap_hwmod *oh) 2201static int _idle(struct omap_hwmod *oh)
2202{ 2202{
2203 if (oh->flags & HWMOD_NO_IDLE) {
2204 oh->_int_flags |= _HWMOD_SKIP_ENABLE;
2205 return 0;
2206 }
2207
2203 pr_debug("omap_hwmod: %s: idling\n", oh->name); 2208 pr_debug("omap_hwmod: %s: idling\n", oh->name);
2204 2209
2205 if (oh->_state != _HWMOD_STATE_ENABLED) { 2210 if (oh->_state != _HWMOD_STATE_ENABLED) {
@@ -2504,6 +2509,8 @@ static int __init _init(struct omap_hwmod *oh, void *data)
2504 oh->flags |= HWMOD_INIT_NO_RESET; 2509 oh->flags |= HWMOD_INIT_NO_RESET;
2505 if (of_find_property(np, "ti,no-idle-on-init", NULL)) 2510 if (of_find_property(np, "ti,no-idle-on-init", NULL))
2506 oh->flags |= HWMOD_INIT_NO_IDLE; 2511 oh->flags |= HWMOD_INIT_NO_IDLE;
2512 if (of_find_property(np, "ti,no-idle", NULL))
2513 oh->flags |= HWMOD_NO_IDLE;
2507 } 2514 }
2508 2515
2509 oh->_state = _HWMOD_STATE_INITIALIZED; 2516 oh->_state = _HWMOD_STATE_INITIALIZED;
@@ -2630,7 +2637,7 @@ static void __init _setup_postsetup(struct omap_hwmod *oh)
2630 * XXX HWMOD_INIT_NO_IDLE does not belong in hwmod data - 2637 * XXX HWMOD_INIT_NO_IDLE does not belong in hwmod data -
2631 * it should be set by the core code as a runtime flag during startup 2638 * it should be set by the core code as a runtime flag during startup
2632 */ 2639 */
2633 if ((oh->flags & HWMOD_INIT_NO_IDLE) && 2640 if ((oh->flags & (HWMOD_INIT_NO_IDLE | HWMOD_NO_IDLE)) &&
2634 (postsetup_state == _HWMOD_STATE_IDLE)) { 2641 (postsetup_state == _HWMOD_STATE_IDLE)) {
2635 oh->_int_flags |= _HWMOD_SKIP_ENABLE; 2642 oh->_int_flags |= _HWMOD_SKIP_ENABLE;
2636 postsetup_state = _HWMOD_STATE_ENABLED; 2643 postsetup_state = _HWMOD_STATE_ENABLED;
diff --git a/arch/arm/mach-omap2/omap_hwmod.h b/arch/arm/mach-omap2/omap_hwmod.h
index 76bce11c85a4..7c7a31169475 100644
--- a/arch/arm/mach-omap2/omap_hwmod.h
+++ b/arch/arm/mach-omap2/omap_hwmod.h
@@ -525,6 +525,8 @@ struct omap_hwmod_omap4_prcm {
525 * or idled. 525 * or idled.
526 * HWMOD_OPT_CLKS_NEEDED: The optional clocks are needed for the module to 526 * HWMOD_OPT_CLKS_NEEDED: The optional clocks are needed for the module to
527 * operate and they need to be handled at the same time as the main_clk. 527 * 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.
528 */ 530 */
529#define HWMOD_SWSUP_SIDLE (1 << 0) 531#define HWMOD_SWSUP_SIDLE (1 << 0)
530#define HWMOD_SWSUP_MSTANDBY (1 << 1) 532#define HWMOD_SWSUP_MSTANDBY (1 << 1)
@@ -541,6 +543,7 @@ struct omap_hwmod_omap4_prcm {
541#define HWMOD_SWSUP_SIDLE_ACT (1 << 12) 543#define HWMOD_SWSUP_SIDLE_ACT (1 << 12)
542#define HWMOD_RECONFIG_IO_CHAIN (1 << 13) 544#define HWMOD_RECONFIG_IO_CHAIN (1 << 13)
543#define HWMOD_OPT_CLKS_NEEDED (1 << 14) 545#define HWMOD_OPT_CLKS_NEEDED (1 << 14)
546#define HWMOD_NO_IDLE (1 << 15)
544 547
545/* 548/*
546 * omap_hwmod._int_flags definitions 549 * omap_hwmod._int_flags definitions