From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
To: Abhilash Kesavan <a.kesavan@samsung.com>
Cc: "linux-samsung-soc@vger.kernel.org"
<linux-samsung-soc@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"kgene.kim@samsung.com" <kgene.kim@samsung.com>,
"abrestic@chromium.org" <abrestic@chromium.org>,
"thomas.ab@samsung.com" <thomas.ab@samsung.com>,
"inderpal.s@samsung.com" <inderpal.s@samsung.com>,
"nicolas.pitre@linaro.org" <nicolas.pitre@linaro.org>,
Dave P Martin <Dave.Martin@arm.com>,
"t.figa@samsung.com" <t.figa@samsung.com>,
"kesavan.abhilash@gmail.com" <kesavan.abhilash@gmail.com>
Subject: Re: [PATCH v6 5/5] arm: exynos: Add MCPM call-back functions
Date: Tue, 13 May 2014 17:48:45 +0100 [thread overview]
Message-ID: <20140513164845.GA10210@red-moon> (raw)
In-Reply-To: <1399982324-27879-6-git-send-email-a.kesavan@samsung.com>
On Tue, May 13, 2014 at 12:58:44PM +0100, Abhilash Kesavan wrote:
[...]
> +static int __init exynos_mcpm_init(void)
> +{
> + struct device_node *node;
> + int ret = 0;
There is no point in initializing it to 0.
> +
> + node = of_find_compatible_node(NULL, NULL, "samsung,exynos5420");
> + if (!node)
> + return -ENODEV;
> + of_node_put(node);
> +
> + if (!cci_probed())
> + return -ENODEV;
> +
> + node = of_find_compatible_node(NULL, NULL,
> + "samsung,exynos4210-sysram-ns");
> + if (!node)
> + return -ENODEV;
> +
> + ns_sram_base_addr = of_iomap(node, 0);
> + of_node_put(node);
> + if (!ns_sram_base_addr) {
> + pr_err("failed to map non-secure iRAM base address\n");
> + return -ENOMEM;
> + }
> +
> + /*
> + * To increase the stability of KFC reset we need to program
> + * the PMU SPARE3 register
> + */
> + __raw_writel(EXYNOS5420_SWRESET_KFC_SEL, S5P_PMU_SPARE3);
> +
> + exynos_mcpm_usage_count_init();
> +
> + ret = mcpm_platform_register(&exynos_power_ops);
> + if (!ret)
> + ret = mcpm_sync_init(exynos_pm_power_up_setup);
> + if (ret) {
> + iounmap(ns_sram_base_addr);
> + return ret;
> + }
> +
> + mcpm_smp_set_ops();
> +
> + pr_info("Exynos MCPM support installed\n");
> +
> + /*
> + * Future entries into the kernel can now go
> + * through the cluster entry vectors.
> + */
> + __raw_writel(virt_to_phys(mcpm_entry_point),
> + ns_sram_base_addr + MCPM_BOOT_ADDR_OFFSET);
> +
ns_sram_base_addr must be unmapped, since it is unused after the write.
Lorenzo
> + return ret;
> +}
> +
> +early_initcall(exynos_mcpm_init);
> diff --git a/arch/arm/mach-exynos/regs-pmu.h b/arch/arm/mach-exynos/regs-pmu.h
> index f6b68a3..4179f6a 100644
> --- a/arch/arm/mach-exynos/regs-pmu.h
> +++ b/arch/arm/mach-exynos/regs-pmu.h
> @@ -38,6 +38,7 @@
> #define S5P_INFORM5 S5P_PMUREG(0x0814)
> #define S5P_INFORM6 S5P_PMUREG(0x0818)
> #define S5P_INFORM7 S5P_PMUREG(0x081C)
> +#define S5P_PMU_SPARE3 S5P_PMUREG(0x090C)
>
> #define S5P_ARM_CORE0_LOWPWR S5P_PMUREG(0x1000)
> #define S5P_DIS_IRQ_CORE0 S5P_PMUREG(0x1004)
> @@ -322,4 +323,6 @@
>
> #define EXYNOS5_OPTION_USE_RETENTION (1 << 4)
>
> +#define EXYNOS5420_SWRESET_KFC_SEL 0x3
> +
> #endif /* __ASM_ARCH_REGS_PMU_H */
> --
> 1.7.9.5
>
>
WARNING: multiple messages have this Message-ID (diff)
From: lorenzo.pieralisi@arm.com (Lorenzo Pieralisi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v6 5/5] arm: exynos: Add MCPM call-back functions
Date: Tue, 13 May 2014 17:48:45 +0100 [thread overview]
Message-ID: <20140513164845.GA10210@red-moon> (raw)
In-Reply-To: <1399982324-27879-6-git-send-email-a.kesavan@samsung.com>
On Tue, May 13, 2014 at 12:58:44PM +0100, Abhilash Kesavan wrote:
[...]
> +static int __init exynos_mcpm_init(void)
> +{
> + struct device_node *node;
> + int ret = 0;
There is no point in initializing it to 0.
> +
> + node = of_find_compatible_node(NULL, NULL, "samsung,exynos5420");
> + if (!node)
> + return -ENODEV;
> + of_node_put(node);
> +
> + if (!cci_probed())
> + return -ENODEV;
> +
> + node = of_find_compatible_node(NULL, NULL,
> + "samsung,exynos4210-sysram-ns");
> + if (!node)
> + return -ENODEV;
> +
> + ns_sram_base_addr = of_iomap(node, 0);
> + of_node_put(node);
> + if (!ns_sram_base_addr) {
> + pr_err("failed to map non-secure iRAM base address\n");
> + return -ENOMEM;
> + }
> +
> + /*
> + * To increase the stability of KFC reset we need to program
> + * the PMU SPARE3 register
> + */
> + __raw_writel(EXYNOS5420_SWRESET_KFC_SEL, S5P_PMU_SPARE3);
> +
> + exynos_mcpm_usage_count_init();
> +
> + ret = mcpm_platform_register(&exynos_power_ops);
> + if (!ret)
> + ret = mcpm_sync_init(exynos_pm_power_up_setup);
> + if (ret) {
> + iounmap(ns_sram_base_addr);
> + return ret;
> + }
> +
> + mcpm_smp_set_ops();
> +
> + pr_info("Exynos MCPM support installed\n");
> +
> + /*
> + * Future entries into the kernel can now go
> + * through the cluster entry vectors.
> + */
> + __raw_writel(virt_to_phys(mcpm_entry_point),
> + ns_sram_base_addr + MCPM_BOOT_ADDR_OFFSET);
> +
ns_sram_base_addr must be unmapped, since it is unused after the write.
Lorenzo
> + return ret;
> +}
> +
> +early_initcall(exynos_mcpm_init);
> diff --git a/arch/arm/mach-exynos/regs-pmu.h b/arch/arm/mach-exynos/regs-pmu.h
> index f6b68a3..4179f6a 100644
> --- a/arch/arm/mach-exynos/regs-pmu.h
> +++ b/arch/arm/mach-exynos/regs-pmu.h
> @@ -38,6 +38,7 @@
> #define S5P_INFORM5 S5P_PMUREG(0x0814)
> #define S5P_INFORM6 S5P_PMUREG(0x0818)
> #define S5P_INFORM7 S5P_PMUREG(0x081C)
> +#define S5P_PMU_SPARE3 S5P_PMUREG(0x090C)
>
> #define S5P_ARM_CORE0_LOWPWR S5P_PMUREG(0x1000)
> #define S5P_DIS_IRQ_CORE0 S5P_PMUREG(0x1004)
> @@ -322,4 +323,6 @@
>
> #define EXYNOS5_OPTION_USE_RETENTION (1 << 4)
>
> +#define EXYNOS5420_SWRESET_KFC_SEL 0x3
> +
> #endif /* __ASM_ARCH_REGS_PMU_H */
> --
> 1.7.9.5
>
>
next prev parent reply other threads:[~2014-05-13 16:46 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-13 11:58 [PATCH v6 0/5] MCPM backend for Exynos5420 Abhilash Kesavan
2014-05-13 11:58 ` Abhilash Kesavan
2014-05-13 11:58 ` [PATCH v6 1/5] ARM: EXYNOS: Add generic cpu power control functions for all exynos based SoCs Abhilash Kesavan
2014-05-13 11:58 ` Abhilash Kesavan
2014-05-13 11:58 ` [PATCH v6 2/5] ARM: EXYNOS: use generic exynos cpu power control functions Abhilash Kesavan
2014-05-13 11:58 ` Abhilash Kesavan
2014-05-13 11:58 ` [PATCH v6 3/5] arm: exynos: Add generic cluster " Abhilash Kesavan
2014-05-13 11:58 ` Abhilash Kesavan
2014-05-13 11:58 ` [PATCH v6 4/5] ARM: dts: exynos5420: add CCI node Abhilash Kesavan
2014-05-13 11:58 ` Abhilash Kesavan
2014-05-13 11:58 ` [PATCH v6 5/5] arm: exynos: Add MCPM call-back functions Abhilash Kesavan
2014-05-13 11:58 ` Abhilash Kesavan
2014-05-13 16:48 ` Lorenzo Pieralisi [this message]
2014-05-13 16:48 ` Lorenzo Pieralisi
2014-05-14 2:44 ` Abhilash Kesavan
2014-05-14 2:44 ` Abhilash Kesavan
2014-05-14 2:54 ` Chander Kashyap
2014-05-14 2:54 ` Chander Kashyap
2014-05-14 3:02 ` Abhilash Kesavan
2014-05-14 3:02 ` Abhilash Kesavan
2014-05-14 3:02 ` Nicolas Pitre
2014-05-14 3:02 ` Nicolas Pitre
2014-05-14 3:20 ` Chander Kashyap
2014-05-14 3:20 ` Chander Kashyap
2014-05-14 3:34 ` Nicolas Pitre
2014-05-14 3:34 ` Nicolas Pitre
2014-05-14 7:24 ` [PATCH v7 " Abhilash Kesavan
2014-05-14 7:24 ` Abhilash Kesavan
2014-05-13 17:55 ` [PATCH v6 0/5] MCPM backend for Exynos5420 Nicolas Pitre
2014-05-13 17:55 ` Nicolas Pitre
2014-05-14 4:15 ` Abhilash Kesavan
2014-05-14 4:15 ` Abhilash Kesavan
2014-05-14 4:45 ` Nicolas Pitre
2014-05-14 4:45 ` Nicolas Pitre
2014-05-14 7:34 ` Abhilash Kesavan
2014-05-14 7:34 ` Abhilash Kesavan
2014-05-14 13:33 ` Nicolas Pitre
2014-05-14 13:33 ` Nicolas Pitre
2014-05-14 13:39 ` Abhilash Kesavan
2014-05-14 13:39 ` Abhilash Kesavan
2014-05-15 15:49 ` Abhilash Kesavan
2014-05-15 15:49 ` Abhilash Kesavan
2014-05-15 16:52 ` Nicolas Pitre
2014-05-15 16:52 ` Nicolas Pitre
2014-05-16 23:55 ` Kukjin Kim
2014-05-16 23:55 ` Kukjin Kim
2014-05-19 2:38 ` Abhilash Kesavan
2014-05-19 2:38 ` Abhilash Kesavan
2014-05-19 2:38 ` Abhilash Kesavan
2014-05-19 2:38 ` Abhilash Kesavan
2014-05-20 3:30 ` Nicolas Pitre
2014-05-20 3:30 ` Nicolas Pitre
2014-05-20 4:42 ` Abhilash Kesavan
2014-05-20 4:42 ` Abhilash Kesavan
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=20140513164845.GA10210@red-moon \
--to=lorenzo.pieralisi@arm.com \
--cc=Dave.Martin@arm.com \
--cc=a.kesavan@samsung.com \
--cc=abrestic@chromium.org \
--cc=inderpal.s@samsung.com \
--cc=kesavan.abhilash@gmail.com \
--cc=kgene.kim@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=nicolas.pitre@linaro.org \
--cc=t.figa@samsung.com \
--cc=thomas.ab@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: link
Be 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.