From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Lezcano Subject: Re: [PATCH v2 2/3] arm: exynos: Add MCPM call-back functions Date: Wed, 23 Apr 2014 22:56:57 +0200 Message-ID: <53582919.1040905@linaro.org> References: <1397239311-27717-6-git-send-email-a.kesavan@samsung.com> <1398147435-3122-1-git-send-email-a.kesavan@samsung.com> <535650AE.90501@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Abhilash Kesavan Cc: Andrew Bresticker , Thomas P Abraham , "inderpal.s-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org" , Lorenzo Pieralisi , linux-arm-kernel , Kukjin Kim , Nicolas Pitre , Dave Martin , Tomasz Figa , "mark.rutland" , devicetree , Arnd Bergmann , Will Deacon , robh+dt , Grant Likely List-Id: devicetree@vger.kernel.org On 04/23/2014 05:31 PM, Abhilash Kesavan wrote: > Hi Daniel, > On Tue, Apr 22, 2014 at 4:51 PM, Daniel Lezcano > wrote: >> On 04/22/2014 08:17 AM, Abhilash Kesavan wrote: >>> >>> Add machine-dependent MCPM call-backs for Exynos5420. These are use= d >>> to power up/down the secondary CPUs during boot, shutdown, s2r and >>> switching. >>> >>> Signed-off-by: Thomas Abraham >>> Signed-off-by: Inderpal Singh >>> Signed-off-by: Andrew Bresticker >>> Signed-off-by: Abhilash Kesavan >>> --- [ ... ] >>> +#include >>> +#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) * 0x8= 0)) >>> +#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) * 0x8= 0)) >>> +#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 ne= w > 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 --=20 Linaro.org =E2=94=82 Open source software fo= r ARM SoCs =46ollow Linaro: Facebook | Twitter | Blog -- To unsubscribe from this list: send the line "unsubscribe devicetree" i= n the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html