Thread (1 message) 1 message, 1 author, 2014-04-23

[PATCH v2 2/3] arm: exynos: Add MCPM call-back functions

From: Daniel Lezcano <hidden>
Date: 2014-04-23 20:56:57
Also in: linux-devicetree

On 04/23/2014 05:31 PM, Abhilash Kesavan wrote:
Hi Daniel,
On Tue, Apr 22, 2014 at 4:51 PM, Daniel Lezcano
[off-list ref] wrote:
quoted
On 04/22/2014 08:17 AM, Abhilash Kesavan wrote:
quoted
Add machine-dependent MCPM call-backs for Exynos5420. These are used
to power up/down the secondary CPUs during boot, shutdown, s2r and
switching.

Signed-off-by: Thomas Abraham <redacted>
Signed-off-by: Inderpal Singh <redacted>
Signed-off-by: Andrew Bresticker <redacted>
Signed-off-by: Abhilash Kesavan <redacted>
---
[ ... ]
quoted
quoted
+#include <plat/cpu.h>
+#include "regs-pmu.h"
+
+#define EXYNOS5420_CPUS_PER_CLUSTER    4
+#define EXYNOS5420_NR_CLUSTERS         2
+
+/* Secondary CPU entry point */
+#define REG_ENTRY_ADDR         (S5P_VA_SYSRAM_NS + 0x1C)
+
+#define EXYNOS_CORE_LOCAL_PWR_EN               0x3
+#define EXYNOS_CORE_LOCAL_PWR_DIS              0x0

+#define EXYNOS_ARM_COMMON_CONFIGURATION                S5P_PMUREG(0x2500)
+#define EXYNOS_ARM_L2_CONFIGURATION            S5P_PMUREG(0x2600)
+
+#define EXYNOS_ARM_CORE_CONFIGURATION(_nr)     \
+                       (S5P_ARM_CORE0_CONFIGURATION + ((_nr) * 0x80))
+#define EXYNOS_ARM_CORE_STATUS(_nr)            \
+                       (S5P_ARM_CORE0_STATUS + ((_nr) * 0x80))
+
+#define EXYNOS_COMMON_CONFIGURATION(_nr)       \
+                       (EXYNOS_ARM_COMMON_CONFIGURATION + ((_nr) * 0x80))
+#define EXYNOS_COMMON_STATUS(_nr)              \
+                       (EXYNOS_COMMON_CONFIGURATION(_nr) + 0x4)
+
+#define EXYNOS_L2_CONFIGURATION(_nr)           \
+                       (EXYNOS_ARM_L2_CONFIGURATION + ((_nr) * 0x80))
+#define EXYNOS_L2_STATUS(_nr)                  \
+                       (EXYNOS_L2_CONFIGURATION(_nr) + 0x4)
+

Is it possible to share the definition of those macros with the rest of the
code via functions, so they can be re-used for the other sub-systems ? eg:
https://patches.linaro.org/27798/
OK..I will work on making wrapper functions for these. Would these new
functions be better placed in the mcpm code or the pm code ?
Hi Abhilash,

yes, in the pm code. That would make more sense.

Thanks
   -- Daniel


-- 
  <http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help