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

ARM: OMAP2+: hwmod: Introduce ti,no-idle dt property

Introduce a dt property, ti,no-idle, that prevents an IP to idle at any
point. This is to handle Errata i877, which tells that GMAC clocks
cannot be disabled.

Acked-by: Roger Quadros <rogerq@ti.com>
Tested-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Acked-by: Rob Herring <robh@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Paul Walmsley <paul@pwsan.com>

authored by

Lokesh Vutla and committed by
Paul Walmsley
2e18f5a1 92e963f5

+12 -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
+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