ARM: keystone2: Use macro for DSP GEM power domain
authorSuman Anna <s-anna@ti.com>
Fri, 4 Mar 2016 16:36:38 +0000 (10:36 -0600)
committerTom Rini <trini@konsulko.com>
Mon, 14 Mar 2016 23:18:42 +0000 (19:18 -0400)
Define a macro for the DSP GEM power domain id number and
use it instead of a hard-coded number in the code that
disables all the DSPs on various Keystone2 SoCs.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
arch/arm/mach-keystone/include/mach/hardware.h
arch/arm/mach-keystone/keystone.c

index edebcd7bc587760c9ffd758a2d70a4df40c7b2a6..8ca19bbcdbe914f31a913b48ea0102474e460ccd 100644 (file)
@@ -160,6 +160,7 @@ typedef volatile unsigned int   *dv_reg_p;
 #define KS2_LPSC_GEM_0                 15
 #define KS2_LPSC_TETRIS                        52
 #define KS2_TETRIS_PWR_DOMAIN          31
+#define KS2_GEM_0_PWR_DOMAIN           8
 
 /* Chip configuration unlock codes and registers */
 #define KS2_KICK0                      (KS2_DEVICE_STATE_CTRL_BASE + 0x38)
index 11a9357db4140d3dec56e01246c1a3615e13c834..a8071270e9bf5bc1cdf233aa8970536d2f855996 100644 (file)
@@ -54,7 +54,7 @@ static void turn_off_all_dsps(int num_dsps)
                if (psc_disable_module(i + KS2_LPSC_GEM_0))
                        printf("Cannot disable module for #%d DSP", i);
 
-               if (psc_disable_domain(i + 8))
+               if (psc_disable_domain(i + KS2_GEM_0_PWR_DOMAIN))
                        printf("Cannot disable domain for #%d DSP", i);
        }
 }