From: sachin.kamat@linaro.org (Sachin Kamat)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] ARM: EXYNOS: Fix ARM PMU irq numbers
Date: Thu, 26 Jul 2012 09:22:43 +0530 [thread overview]
Message-ID: <CAK9yfHyXzSp1Q75neuC0Q2=7RhXQXmKAQOPxE522SCsupwixTw@mail.gmail.com> (raw)
In-Reply-To: <1343262902-19073-2-git-send-email-chanho61.park@samsung.com>
On 26 July 2012 06:05, Chanho Park <chanho61.park@samsung.com> wrote:
> This patch fixes irq numbers of ARM PMU(Perfromance Monitoring Unit).
> We need to seperate arm-pmu(performance measurement unit) and exynos-pmu(power
> management unit). I decide to change EXYNOS4_IRQ_PMU to EXYNOS4_IRQ_POWER_PMU
> because there are no one use it.
> A max cpu number of exynos4 is four in case of exynos44xx. So we should define 3
> additional pmu irq numbers and enable it according to the number of cpus.
>
> Signed-off-by: Chanho Park <chanho61.park@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
> arch/arm/mach-exynos/include/mach/irqs.h | 18 ++++++++++++++++--
> arch/arm/plat-samsung/devs.c | 9 ++++++++-
> 2 files changed, 24 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/mach-exynos/include/mach/irqs.h b/arch/arm/mach-exynos/include/mach/irqs.h
> index 35bced6..329b07d 100644
> --- a/arch/arm/mach-exynos/include/mach/irqs.h
> +++ b/arch/arm/mach-exynos/include/mach/irqs.h
> @@ -128,7 +128,7 @@
> #define EXYNOS4_IRQ_ADC1 IRQ_SPI(107)
> #define EXYNOS4_IRQ_PEN1 IRQ_SPI(108)
> #define EXYNOS4_IRQ_KEYPAD IRQ_SPI(109)
> -#define EXYNOS4_IRQ_PMU IRQ_SPI(110)
> +#define EXYNOS4_IRQ_POWER_PMU IRQ_SPI(110)
> #define EXYNOS4_IRQ_GPS IRQ_SPI(111)
> #define EXYNOS4_IRQ_INTFEEDCTRL_SSS IRQ_SPI(112)
> #define EXYNOS4_IRQ_SLIMBUS IRQ_SPI(113)
> @@ -136,6 +136,11 @@
> #define EXYNOS4_IRQ_TSI IRQ_SPI(115)
> #define EXYNOS4_IRQ_SATA IRQ_SPI(116)
>
> +#define EXYNOS4_IRQ_PMU COMBINER_IRQ(2, 2)
> +#define EXYNOS4_IRQ_PMU_CPU1 COMBINER_IRQ(3, 2)
> +#define EXYNOS4_IRQ_PMU_CPU2 COMBINER_IRQ(18, 2)
> +#define EXYNOS4_IRQ_PMU_CPU3 COMBINER_IRQ(19, 2)
> +
> #define EXYNOS4_IRQ_SYSMMU_MDMA0_0 COMBINER_IRQ(4, 0)
> #define EXYNOS4_IRQ_SYSMMU_SSS_0 COMBINER_IRQ(4, 1)
> #define EXYNOS4_IRQ_SYSMMU_FIMC0_0 COMBINER_IRQ(4, 2)
> @@ -230,7 +235,6 @@
> #define IRQ_TC EXYNOS4_IRQ_PEN0
>
> #define IRQ_KEYPAD EXYNOS4_IRQ_KEYPAD
> -#define IRQ_PMU EXYNOS4_IRQ_PMU
>
> #define IRQ_FIMD0_FIFO EXYNOS4_IRQ_FIMD0_FIFO
> #define IRQ_FIMD0_VSYNC EXYNOS4_IRQ_FIMD0_VSYNC
> @@ -453,6 +457,16 @@
> #define EXYNOS5_IRQ_GPIO3_NR_GROUPS 5
> #define EXYNOS5_IRQ_GPIO4_NR_GROUPS 1
>
> +#if defined(CONFIG_ARCH_EXYNOS4)
> +#define IRQ_PMU EXYNOS4_IRQ_PMU
> +#define IRQ_PMU1 EXYNOS4_IRQ_PMU_CPU1
> +#define IRQ_PMU2 EXYNOS4_IRQ_PMU_CPU2
> +#define IRQ_PMU3 EXYNOS4_IRQ_PMU_CPU3
> +#elif defined(CONFIG_ARCH_EXYNOS5)
> +#define IRQ_PMU EXYNOS5_IRQ_PMU
> +#define IRQ_PMU1 EXYNOS5_IRQ_PMU_CPU1
> +#endif
This will not work when both Exynos 4 and 5 are enabled.
> +
> #define MAX_COMBINER_NR (EXYNOS4_MAX_COMBINER_NR > EXYNOS5_MAX_COMBINER_NR ? \
> EXYNOS4_MAX_COMBINER_NR : EXYNOS5_MAX_COMBINER_NR)
>
> diff --git a/arch/arm/plat-samsung/devs.c b/arch/arm/plat-samsung/devs.c
> index 74e31ce..91048a6 100644
> --- a/arch/arm/plat-samsung/devs.c
> +++ b/arch/arm/plat-samsung/devs.c
> @@ -1100,7 +1100,14 @@ struct platform_device s5p_device_onenand = {
>
> #ifdef CONFIG_PLAT_S5P
> static struct resource s5p_pmu_resource[] = {
> - DEFINE_RES_IRQ(IRQ_PMU)
> + DEFINE_RES_IRQ(IRQ_PMU),
> +#if (CONFIG_NR_CPUS > 1)
> + DEFINE_RES_IRQ(IRQ_PMU1),
> +#elif (CONFIG_NR_CPUS > 2)
> + DEFINE_RES_IRQ(IRQ_PMU2),
> +#elif (CONFIG_NR_CPUS > 3)
> + DEFINE_RES_IRQ(IRQ_PMU3),
> +#endif
> };
>
> static struct platform_device s5p_device_pmu = {
> --
> 1.7.9.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
With warm regards,
Sachin
next prev parent reply other threads:[~2012-07-26 3:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-26 0:35 [PATCH 0/2] Add support to enable ARM PMU for EXYNOS4/5 Chanho Park
2012-07-26 0:35 ` [PATCH 1/2] ARM: EXYNOS: Fix ARM PMU irq numbers Chanho Park
2012-07-26 3:52 ` Sachin Kamat [this message]
2012-07-26 7:12 ` Chanho Park
2012-07-26 0:35 ` [PATCH 2/2] ARM: EXYNOS: Add set_irq_affinity function for combiner_irq Chanho Park
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAK9yfHyXzSp1Q75neuC0Q2=7RhXQXmKAQOPxE522SCsupwixTw@mail.gmail.com' \
--to=sachin.kamat@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).