From: "Andreas Färber" <afaerber@suse.de> To: Kukjin Kim <kgene.kim@samsung.com>, "'Pankaj Dubey'" <pankaj.dubey@samsung.com>, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: linux@arm.linux.org.uk, t.figa@samsung.com, vikas.sajjan@samsung.com, joshi@samsung.com, naushad@samsung.com, thomas.ab@samsung.com, chow.kim@samsung.com Subject: Re: [PATCH v7 1/4] ARM: EXYNOS: Add support for mapping PMU base address via DT Date: Sun, 27 Jul 2014 05:33:19 +0200 [thread overview] Message-ID: <53D472FF.60009@suse.de> (raw) In-Reply-To: <02d701cf9c45$ce481260$6ad83720$@samsung.com> Am 10.07.2014 15:49, schrieb Kukjin Kim: > Pankaj Dubey wrote: >> >> Add support for mapping Samsung Power Management Unit (PMU) >> base address from device tree. >> >> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com> >> Reviewed-by: Tomasz Figa <t.figa@samsung.com> >> --- >> arch/arm/mach-exynos/common.h | 1 + >> arch/arm/mach-exynos/exynos.c | 37 +++++++++++++++++++++++++++++++++++++ >> 2 files changed, 38 insertions(+) >> >> diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h >> index 152b464..f8daa9c 100644 >> --- a/arch/arm/mach-exynos/common.h >> +++ b/arch/arm/mach-exynos/common.h >> @@ -113,6 +113,7 @@ IS_SAMSUNG_CPU(exynos5800, EXYNOS5800_SOC_ID, EXYNOS5_SOC_MASK) >> >> extern void __iomem *sysram_ns_base_addr; >> extern void __iomem *sysram_base_addr; >> +extern void __iomem *pmu_base_addr; >> void exynos_sysram_init(void); >> >> void exynos_firmware_init(void); >> diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c >> index 186f35d..173aac8 100644 >> --- a/arch/arm/mach-exynos/exynos.c >> +++ b/arch/arm/mach-exynos/exynos.c >> @@ -19,6 +19,7 @@ >> #include <linux/of_platform.h> >> #include <linux/platform_device.h> >> #include <linux/pm_domain.h> >> +#include <linux/irqchip.h> >> >> #include <asm/cacheflush.h> >> #include <asm/hardware/cache-l2x0.h> >> @@ -31,6 +32,8 @@ >> #include "regs-pmu.h" >> #include "regs-sys.h" >> >> +void __iomem *pmu_base_addr; >> + >> static struct map_desc exynos4_iodesc[] __initdata = { >> { >> .virtual = (unsigned long)S3C_VA_SYS, >> @@ -253,6 +256,39 @@ static void __init exynos_init_io(void) >> exynos_map_io(); >> } >> >> +static const struct of_device_id exynos_dt_pmu_match[] = { >> + { .compatible = "samsung,exynos3250-pmu" }, >> + { .compatible = "samsung,exynos4210-pmu" }, >> + { .compatible = "samsung,exynos4212-pmu" }, >> + { .compatible = "samsung,exynos4412-pmu" }, >> + { .compatible = "samsung,exynos5250-pmu" }, >> + { .compatible = "samsung,exynos5420-pmu" }, >> + { /*sentinel*/ }, >> +}; >> + >> +static void exynos_map_pmu(void) >> +{ >> + struct device_node *np; >> + >> + np = of_find_matching_node(NULL, exynos_dt_pmu_match); >> + if (np) >> + pmu_base_addr = of_iomap(np, 0); >> + >> + if (!pmu_base_addr) >> + panic("failed to find exynos pmu register\n"); >> +} >> + >> +static void __init exynos_init_irq(void) >> +{ >> + irqchip_init(); >> + /* >> + * Since platsmp.c needs pmu base address by the time >> + * DT is not unflatten so we can't use DT APIs before Either "Since platsmp.c needs ... unflattened, we can't ..." or "platsmp.c needs ... unflattened, so we can't ..." >> + * init_irq >> + */ >> + exynos_map_pmu(); >> +} >> + >> static void __init exynos_dt_machine_init(void) >> { >> struct device_node *i2c_np; >> @@ -336,6 +372,7 @@ DT_MACHINE_START(EXYNOS_DT, "SAMSUNG EXYNOS (Flattened Device Tree)") >> .smp = smp_ops(exynos_smp_ops), >> .map_io = exynos_init_io, >> .init_early = exynos_firmware_init, >> + .init_irq = exynos_init_irq, >> .init_machine = exynos_dt_machine_init, >> .init_late = exynos_init_late, >> .dt_compat = exynos_dt_compat, >> -- >> 1.7.9.5 > > Looks good to me, will apply. Unfortunately this broke the boot on ODROID-XU: Neither is there a exynos_dt_pmu_match[] entry for 5410 nor is such a node defined in exynos5410.dtsi. Not having access to a TRM, should 5410 get a node like 5420? Might SoCs beyond 5420 also require changes? Regards, Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
WARNING: multiple messages have this Message-ID (diff)
From: afaerber@suse.de (Andreas Färber) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v7 1/4] ARM: EXYNOS: Add support for mapping PMU base address via DT Date: Sun, 27 Jul 2014 05:33:19 +0200 [thread overview] Message-ID: <53D472FF.60009@suse.de> (raw) In-Reply-To: <02d701cf9c45$ce481260$6ad83720$@samsung.com> Am 10.07.2014 15:49, schrieb Kukjin Kim: > Pankaj Dubey wrote: >> >> Add support for mapping Samsung Power Management Unit (PMU) >> base address from device tree. >> >> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com> >> Reviewed-by: Tomasz Figa <t.figa@samsung.com> >> --- >> arch/arm/mach-exynos/common.h | 1 + >> arch/arm/mach-exynos/exynos.c | 37 +++++++++++++++++++++++++++++++++++++ >> 2 files changed, 38 insertions(+) >> >> diff --git a/arch/arm/mach-exynos/common.h b/arch/arm/mach-exynos/common.h >> index 152b464..f8daa9c 100644 >> --- a/arch/arm/mach-exynos/common.h >> +++ b/arch/arm/mach-exynos/common.h >> @@ -113,6 +113,7 @@ IS_SAMSUNG_CPU(exynos5800, EXYNOS5800_SOC_ID, EXYNOS5_SOC_MASK) >> >> extern void __iomem *sysram_ns_base_addr; >> extern void __iomem *sysram_base_addr; >> +extern void __iomem *pmu_base_addr; >> void exynos_sysram_init(void); >> >> void exynos_firmware_init(void); >> diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c >> index 186f35d..173aac8 100644 >> --- a/arch/arm/mach-exynos/exynos.c >> +++ b/arch/arm/mach-exynos/exynos.c >> @@ -19,6 +19,7 @@ >> #include <linux/of_platform.h> >> #include <linux/platform_device.h> >> #include <linux/pm_domain.h> >> +#include <linux/irqchip.h> >> >> #include <asm/cacheflush.h> >> #include <asm/hardware/cache-l2x0.h> >> @@ -31,6 +32,8 @@ >> #include "regs-pmu.h" >> #include "regs-sys.h" >> >> +void __iomem *pmu_base_addr; >> + >> static struct map_desc exynos4_iodesc[] __initdata = { >> { >> .virtual = (unsigned long)S3C_VA_SYS, >> @@ -253,6 +256,39 @@ static void __init exynos_init_io(void) >> exynos_map_io(); >> } >> >> +static const struct of_device_id exynos_dt_pmu_match[] = { >> + { .compatible = "samsung,exynos3250-pmu" }, >> + { .compatible = "samsung,exynos4210-pmu" }, >> + { .compatible = "samsung,exynos4212-pmu" }, >> + { .compatible = "samsung,exynos4412-pmu" }, >> + { .compatible = "samsung,exynos5250-pmu" }, >> + { .compatible = "samsung,exynos5420-pmu" }, >> + { /*sentinel*/ }, >> +}; >> + >> +static void exynos_map_pmu(void) >> +{ >> + struct device_node *np; >> + >> + np = of_find_matching_node(NULL, exynos_dt_pmu_match); >> + if (np) >> + pmu_base_addr = of_iomap(np, 0); >> + >> + if (!pmu_base_addr) >> + panic("failed to find exynos pmu register\n"); >> +} >> + >> +static void __init exynos_init_irq(void) >> +{ >> + irqchip_init(); >> + /* >> + * Since platsmp.c needs pmu base address by the time >> + * DT is not unflatten so we can't use DT APIs before Either "Since platsmp.c needs ... unflattened, we can't ..." or "platsmp.c needs ... unflattened, so we can't ..." >> + * init_irq >> + */ >> + exynos_map_pmu(); >> +} >> + >> static void __init exynos_dt_machine_init(void) >> { >> struct device_node *i2c_np; >> @@ -336,6 +372,7 @@ DT_MACHINE_START(EXYNOS_DT, "SAMSUNG EXYNOS (Flattened Device Tree)") >> .smp = smp_ops(exynos_smp_ops), >> .map_io = exynos_init_io, >> .init_early = exynos_firmware_init, >> + .init_irq = exynos_init_irq, >> .init_machine = exynos_dt_machine_init, >> .init_late = exynos_init_late, >> .dt_compat = exynos_dt_compat, >> -- >> 1.7.9.5 > > Looks good to me, will apply. Unfortunately this broke the boot on ODROID-XU: Neither is there a exynos_dt_pmu_match[] entry for 5410 nor is such a node defined in exynos5410.dtsi. Not having access to a TRM, should 5410 get a node like 5420? Might SoCs beyond 5420 also require changes? Regards, Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N?rnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend?rffer; HRB 16746 AG N?rnberg
next prev parent reply other threads:[~2014-07-27 3:33 UTC|newest] Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-07-09 4:00 [PATCH v7 0/4] ARM: Exynos: PMU cleanup and refactoring for using DT Pankaj Dubey 2014-07-09 4:00 ` Pankaj Dubey 2014-07-09 4:00 ` [PATCH v7 1/4] ARM: EXYNOS: Add support for mapping PMU base address via DT Pankaj Dubey 2014-07-09 4:00 ` Pankaj Dubey 2014-07-10 13:49 ` Kukjin Kim 2014-07-10 13:49 ` Kukjin Kim 2014-07-27 3:33 ` Andreas Färber [this message] 2014-07-27 3:33 ` Andreas Färber 2014-07-09 4:00 ` [PATCH v7 2/4] ARM: EXYNOS: Refactored code for using PMU " Pankaj Dubey 2014-07-09 4:00 ` Pankaj Dubey 2014-07-10 13:52 ` Kukjin Kim 2014-07-10 13:52 ` Kukjin Kim 2014-07-09 4:00 ` [PATCH v7 3/4] ARM: EXYNOS: Add platform driver support for Exynos PMU Pankaj Dubey 2014-07-09 4:00 ` Pankaj Dubey 2014-07-25 4:04 ` Kukjin Kim 2014-07-25 4:04 ` Kukjin Kim 2014-07-25 5:32 ` Pankaj Dubey 2014-07-25 5:32 ` Pankaj Dubey 2014-07-25 11:00 ` Tomasz Figa 2014-07-25 11:00 ` Tomasz Figa 2014-07-28 3:10 ` Pankaj Dubey 2014-07-28 3:10 ` Pankaj Dubey 2014-08-18 17:42 ` Bartlomiej Zolnierkiewicz 2014-08-18 17:42 ` Bartlomiej Zolnierkiewicz 2014-08-19 14:30 ` Tomasz Figa 2014-08-19 14:30 ` Tomasz Figa 2014-08-21 14:07 ` Pankaj Dubey 2014-08-21 14:07 ` Pankaj Dubey 2014-08-21 15:59 ` Tomasz Figa 2014-08-21 15:59 ` Tomasz Figa 2014-07-09 4:00 ` [PATCH v7 4/4] ARM: EXYNOS: Move PMU specific definitions from common.h Pankaj Dubey 2014-07-09 4:00 ` Pankaj Dubey 2014-07-11 6:10 ` [PATCH v7 0/4] ARM: Exynos: PMU cleanup and refactoring for using DT Naveen Krishna Ch 2014-07-11 6:10 ` Naveen Krishna Ch 2014-07-11 6:10 ` Naveen Krishna Ch
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=53D472FF.60009@suse.de \ --to=afaerber@suse.de \ --cc=chow.kim@samsung.com \ --cc=joshi@samsung.com \ --cc=kgene.kim@samsung.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-samsung-soc@vger.kernel.org \ --cc=linux@arm.linux.org.uk \ --cc=naushad@samsung.com \ --cc=pankaj.dubey@samsung.com \ --cc=t.figa@samsung.com \ --cc=thomas.ab@samsung.com \ --cc=vikas.sajjan@samsung.com \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.