diff mbox

[04/13] ARM: dts: list the CPU nodes for Exynos5250

Message ID 1370516488-25860-4-git-send-email-chander.kashyap@linaro.org (mailing list archive)
State New, archived
Headers show

Commit Message

Chander Kashyap June 6, 2013, 11:01 a.m. UTC
Instead of having to specify the number for CPUs in Exynos5250 in platsmp.c
file, let the number of CPUs be determined by having this information listed
in Exynos5250 device tree file.

Signed-off-by: Chander Kashyap <chander.kashyap@linaro.org>
---
 arch/arm/boot/dts/exynos5250.dtsi |   14 ++++++++++++++
 arch/arm/mach-exynos/platsmp.c    |   10 +++++++---
 2 files changed, 21 insertions(+), 3 deletions(-)

Comments

Mark Rutland June 6, 2013, 4:54 p.m. UTC | #1
On Thu, Jun 06, 2013 at 12:01:18PM +0100, Chander Kashyap wrote:
> Instead of having to specify the number for CPUs in Exynos5250 in platsmp.c
> file, let the number of CPUs be determined by having this information listed
> in Exynos5250 device tree file.
> 
> Signed-off-by: Chander Kashyap <chander.kashyap@linaro.org>
> ---
>  arch/arm/boot/dts/exynos5250.dtsi |   14 ++++++++++++++
>  arch/arm/mach-exynos/platsmp.c    |   10 +++++++---
>  2 files changed, 21 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
> index e571d3b..7f6b1c7 100644
> --- a/arch/arm/boot/dts/exynos5250.dtsi
> +++ b/arch/arm/boot/dts/exynos5250.dtsi
> @@ -50,6 +50,20 @@
>  		pinctrl3 = &pinctrl_3;
>  	};
>  
> +	cpus {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		cpu@0 {
> +			compatible = "arm,cortex-a15";
> +			reg = <0>;
> +		};
> +		cpu@1 {
> +			compatible = "arm,cortex-a15";
> +			reg = <1>;
> +		};
> +	};
> +

It would be nice to have device_type = "cpu" on each of the cpu nodes.

Thanks,
Mark.
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Tomasz Figa June 8, 2013, 11:16 a.m. UTC | #2
On Thursday 06 of June 2013 16:31:18 Chander Kashyap wrote:
> Instead of having to specify the number for CPUs in Exynos5250 in
> platsmp.c file, let the number of CPUs be determined by having this
> information listed in Exynos5250 device tree file.
> 
> Signed-off-by: Chander Kashyap <chander.kashyap@linaro.org>
> ---
>  arch/arm/boot/dts/exynos5250.dtsi |   14 ++++++++++++++
>  arch/arm/mach-exynos/platsmp.c    |   10 +++++++---
>  2 files changed, 21 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/exynos5250.dtsi
> b/arch/arm/boot/dts/exynos5250.dtsi index e571d3b..7f6b1c7 100644
> --- a/arch/arm/boot/dts/exynos5250.dtsi
> +++ b/arch/arm/boot/dts/exynos5250.dtsi
> @@ -50,6 +50,20 @@
>  		pinctrl3 = &pinctrl_3;
>  	};
> 
> +	cpus {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		cpu@0 {
> +			compatible = "arm,cortex-a15";
> +			reg = <0>;
> +		};
> +		cpu@1 {
> +			compatible = "arm,cortex-a15";
> +			reg = <1>;
> +		};
> +	};
> +
>  	pd_gsc: gsc-power-domain@0x10044000 {
>  		compatible = "samsung,exynos4210-pd";
>  		reg = <0x10044000 0x20>;
> diff --git a/arch/arm/mach-exynos/platsmp.c
> b/arch/arm/mach-exynos/platsmp.c index 1a4e4e5..85ea4ca 100644
> --- a/arch/arm/mach-exynos/platsmp.c
> +++ b/arch/arm/mach-exynos/platsmp.c
> @@ -180,10 +180,14 @@ static void __init exynos_smp_init_cpus(void)
>  	void __iomem *scu_base = scu_base_addr();
>  	unsigned int i, ncores;
> 
> -	if (soc_is_exynos5250())
> -		ncores = 2;
> -	else
> +	if (read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A9)
>  		ncores = scu_base ? scu_get_core_count(scu_base) : 1;
> +	else
> +		/*
> +		 * CPU Nodes are passed thru DT and set_cpu_possible
> +		 * is set by "arm_dt_init_cpu_maps".
> +		 */
> +		return;
> 
>  	/* sanity check */
>  	if (ncores > nr_cpu_ids) {

Looks good. Same thing should be done for remaining Exynos SoCs as well.

Reviewed-by: Tomasz Figa <t.figa@samsung.com>

Best regards,
Tomasz

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Chander Kashyap June 10, 2013, 9:18 a.m. UTC | #3
Hi Mark,

On 6 June 2013 22:24, Mark Rutland <mark.rutland@arm.com> wrote:
> On Thu, Jun 06, 2013 at 12:01:18PM +0100, Chander Kashyap wrote:
>> Instead of having to specify the number for CPUs in Exynos5250 in platsmp.c
>> file, let the number of CPUs be determined by having this information listed
>> in Exynos5250 device tree file.
>>
>> Signed-off-by: Chander Kashyap <chander.kashyap@linaro.org>
>> ---
>>  arch/arm/boot/dts/exynos5250.dtsi |   14 ++++++++++++++
>>  arch/arm/mach-exynos/platsmp.c    |   10 +++++++---
>>  2 files changed, 21 insertions(+), 3 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
>> index e571d3b..7f6b1c7 100644
>> --- a/arch/arm/boot/dts/exynos5250.dtsi
>> +++ b/arch/arm/boot/dts/exynos5250.dtsi
>> @@ -50,6 +50,20 @@
>>               pinctrl3 = &pinctrl_3;
>>       };
>>
>> +     cpus {
>> +             #address-cells = <1>;
>> +             #size-cells = <0>;
>> +
>> +             cpu@0 {
>> +                     compatible = "arm,cortex-a15";
>> +                     reg = <0>;
>> +             };
>> +             cpu@1 {
>> +                     compatible = "arm,cortex-a15";
>> +                     reg = <1>;
>> +             };
>> +     };
>> +
>
> It would be nice to have device_type = "cpu" on each of the cpu nodes.
Sure, i will populate the nodes.
thanks.
>
> Thanks,
> Mark.



--
with warm regards,
Chander Kashyap
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Chander Kashyap June 10, 2013, 9:18 a.m. UTC | #4
On 8 June 2013 16:46, Tomasz Figa <tomasz.figa@gmail.com> wrote:
> On Thursday 06 of June 2013 16:31:18 Chander Kashyap wrote:
>> Instead of having to specify the number for CPUs in Exynos5250 in
>> platsmp.c file, let the number of CPUs be determined by having this
>> information listed in Exynos5250 device tree file.
>>
>> Signed-off-by: Chander Kashyap <chander.kashyap@linaro.org>
>> ---
>>  arch/arm/boot/dts/exynos5250.dtsi |   14 ++++++++++++++
>>  arch/arm/mach-exynos/platsmp.c    |   10 +++++++---
>>  2 files changed, 21 insertions(+), 3 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/exynos5250.dtsi
>> b/arch/arm/boot/dts/exynos5250.dtsi index e571d3b..7f6b1c7 100644
>> --- a/arch/arm/boot/dts/exynos5250.dtsi
>> +++ b/arch/arm/boot/dts/exynos5250.dtsi
>> @@ -50,6 +50,20 @@
>>               pinctrl3 = &pinctrl_3;
>>       };
>>
>> +     cpus {
>> +             #address-cells = <1>;
>> +             #size-cells = <0>;
>> +
>> +             cpu@0 {
>> +                     compatible = "arm,cortex-a15";
>> +                     reg = <0>;
>> +             };
>> +             cpu@1 {
>> +                     compatible = "arm,cortex-a15";
>> +                     reg = <1>;
>> +             };
>> +     };
>> +
>>       pd_gsc: gsc-power-domain@0x10044000 {
>>               compatible = "samsung,exynos4210-pd";
>>               reg = <0x10044000 0x20>;
>> diff --git a/arch/arm/mach-exynos/platsmp.c
>> b/arch/arm/mach-exynos/platsmp.c index 1a4e4e5..85ea4ca 100644
>> --- a/arch/arm/mach-exynos/platsmp.c
>> +++ b/arch/arm/mach-exynos/platsmp.c
>> @@ -180,10 +180,14 @@ static void __init exynos_smp_init_cpus(void)
>>       void __iomem *scu_base = scu_base_addr();
>>       unsigned int i, ncores;
>>
>> -     if (soc_is_exynos5250())
>> -             ncores = 2;
>> -     else
>> +     if (read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A9)
>>               ncores = scu_base ? scu_get_core_count(scu_base) : 1;
>> +     else
>> +             /*
>> +              * CPU Nodes are passed thru DT and set_cpu_possible
>> +              * is set by "arm_dt_init_cpu_maps".
>> +              */
>> +             return;
>>
>>       /* sanity check */
>>       if (ncores > nr_cpu_ids) {
>
> Looks good. Same thing should be done for remaining Exynos SoCs as well.
Thanks for reviewing.
>
> Reviewed-by: Tomasz Figa <t.figa@samsung.com>
>
> Best regards,
> Tomasz
>



--
with warm regards,
Chander Kashyap
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
index e571d3b..7f6b1c7 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -50,6 +50,20 @@ 
 		pinctrl3 = &pinctrl_3;
 	};
 
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu@0 {
+			compatible = "arm,cortex-a15";
+			reg = <0>;
+		};
+		cpu@1 {
+			compatible = "arm,cortex-a15";
+			reg = <1>;
+		};
+	};
+
 	pd_gsc: gsc-power-domain@0x10044000 {
 		compatible = "samsung,exynos4210-pd";
 		reg = <0x10044000 0x20>;
diff --git a/arch/arm/mach-exynos/platsmp.c b/arch/arm/mach-exynos/platsmp.c
index 1a4e4e5..85ea4ca 100644
--- a/arch/arm/mach-exynos/platsmp.c
+++ b/arch/arm/mach-exynos/platsmp.c
@@ -180,10 +180,14 @@  static void __init exynos_smp_init_cpus(void)
 	void __iomem *scu_base = scu_base_addr();
 	unsigned int i, ncores;
 
-	if (soc_is_exynos5250())
-		ncores = 2;
-	else
+	if (read_cpuid_part_number() == ARM_CPU_PART_CORTEX_A9)
 		ncores = scu_base ? scu_get_core_count(scu_base) : 1;
+	else
+		/*
+		 * CPU Nodes are passed thru DT and set_cpu_possible
+		 * is set by "arm_dt_init_cpu_maps".
+		 */
+		return;
 
 	/* sanity check */
 	if (ncores > nr_cpu_ids) {