Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+22 -1
+1
Documentation/devicetree/bindings/arm/omap/omap.txt
··· 23 23 during suspend. 24 24 - ti,no-reset-on-init: When present, the module should not be reset at init 25 25 - 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. 26 27 27 28 Example: 28 29
+10
arch/arm/boot/dts/dra7.dtsi
··· 1500 1500 0x48485200 0x2E00>; 1501 1501 #address-cells = <1>; 1502 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 1514 * rx_thresh_pend 1505 1515 * rx_pend
+8 -1
arch/arm/mach-omap2/omap_hwmod.c
··· 2200 2200 */ 2201 2201 static 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 2208 pr_debug("omap_hwmod: %s: idling\n", oh->name); 2204 2209 2205 2210 if (oh->_state != _HWMOD_STATE_ENABLED) { ··· 2509 2504 oh->flags |= HWMOD_INIT_NO_RESET; 2510 2505 if (of_find_property(np, "ti,no-idle-on-init", NULL)) 2511 2506 oh->flags |= HWMOD_INIT_NO_IDLE; 2507 + if (of_find_property(np, "ti,no-idle", NULL)) 2508 + oh->flags |= HWMOD_NO_IDLE; 2512 2509 } 2513 2510 2514 2511 oh->_state = _HWMOD_STATE_INITIALIZED; ··· 2637 2630 * XXX HWMOD_INIT_NO_IDLE does not belong in hwmod data - 2638 2631 * it should be set by the core code as a runtime flag during startup 2639 2632 */ 2640 - if ((oh->flags & HWMOD_INIT_NO_IDLE) && 2633 + if ((oh->flags & (HWMOD_INIT_NO_IDLE | HWMOD_NO_IDLE)) && 2641 2634 (postsetup_state == _HWMOD_STATE_IDLE)) { 2642 2635 oh->_int_flags |= _HWMOD_SKIP_ENABLE; 2643 2636 postsetup_state = _HWMOD_STATE_ENABLED;
+3
arch/arm/mach-omap2/omap_hwmod.h
··· 525 525 * or idled. 526 526 * HWMOD_OPT_CLKS_NEEDED: The optional clocks are needed for the module to 527 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 531 #define HWMOD_SWSUP_SIDLE (1 << 0) 530 532 #define HWMOD_SWSUP_MSTANDBY (1 << 1) ··· 543 541 #define HWMOD_SWSUP_SIDLE_ACT (1 << 12) 544 542 #define HWMOD_RECONFIG_IO_CHAIN (1 << 13) 545 543 #define HWMOD_OPT_CLKS_NEEDED (1 << 14) 544 + #define HWMOD_NO_IDLE (1 << 15) 546 545 547 546 /* 548 547 * omap_hwmod._int_flags definitions