ARM: mvebu: minor improvements
Subsystems (4)
cover ARM: mvebu: minor improvements
Jason, Gregory, Sebastian, Andrew,
Here are three patches making minor improvements to the mvebu code base.
* The first one moves an 370/XP specific declaration to armada-370-xp.h, in preparation for the future addition of the support for other SOCs in mach-mvebu/. It should go to mvebu/soc.
* The second one fixes the length of the registers of the Armada XP PMSU. It should go to mvebu/dt. There is no need to push this as a fix, as it *reduces* the length of the register area, so it is really only a cosmetic improvement.
* The third one makes a function static. It should to to mvebu/soc.
Thanks!
Thomas
Thomas Petazzoni (3):
ARM: mvebu: move ARMADA_XP_MAX_CPUS to armada-370-xp.h
ARM: mvebu: fix register length for Armada XP PMSU
ARM: mvebu: make armada_370_xp_pmsu_init() static
arch/arm/boot/dts/armada-xp.dtsi | 2 +- arch/arm/mach-mvebu/armada-370-xp.h | 2 ++ arch/arm/mach-mvebu/common.h | 3 --- arch/arm/mach-mvebu/pmsu.c | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-)
Signature · 1 line
1.8.3.2
PATCH 1/3 ARM: mvebu: move ARMADA_XP_MAX_CPUS to armada-370-xp.h
The ARMADA_XP_MAX_CPUS definition was in common.h, which as its name says, is common to all mvebu SoCs. It is more logical to have this XP specific definition in the already existing armada-370-xp.h header file, especially in preparation to the addition of the support for other SOCs in mach-mvebu.
--- arch/arm/mach-mvebu/armada-370-xp.h | 2 ++ arch/arm/mach-mvebu/common.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-mvebu/armada-370-xp.h +2 -0
@@ -18,6 +18,8 @@#ifdef CONFIG_SMP #include <linux/cpumask.h> +#define ARMADA_XP_MAX_CPUS 4 +void armada_mpic_send_doorbell (const struct cpumask *mask,unsigned int irq);void armada_xp_mpic_smp_cpu_init (void );#endif
arch/arm/mach-mvebu/common.h +0 -2
@@ -15,8 +15,6 @@#ifndef __ARCH_MVEBU_COMMON_H#define __ARCH_MVEBU_COMMON_H -#define ARMADA_XP_MAX_CPUS 4 -#include <linux/reboot.h> void mvebu_restart (enum reboot_mode mode,const char *cmd);
Signature · 1 line
1.8.3.2
PATCH 1/3 ARM: mvebu: move ARMADA_XP_MAX_CPUS to armada-370-xp.h
Hi Thomas,
Quoted 7 lines · Thomas Petazzoni
The
ARMADA_XP_MAX_CPUSdefinition was incommon.h, which as its name says, is common to all mvebu SoCs. It is more logical to have this XP specific definition in the already existingarmada-370-xp.hheader file, especially in preparation to the addition of the support for other SOCs in mach-mvebu.Signed-off-by Thomas Petazzoni <[email protected]>
Thanks,
Gregory
Quoted 32 lines
--- arch/arm/mach-mvebu/armada-370-xp.h | 2 ++ arch/arm/mach-mvebu/common.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-)arch/arm/mach-mvebu/armada-370-xp.h +2
-0@@ -18,6 +18,8 @@#ifdef CONFIG_SMP #include <linux/cpumask.h> +#define ARMADA_XP_MAX_CPUS 4 +void armada_mpic_send_doorbell (const struct cpumask *mask,unsigned int irq);void armada_xp_mpic_smp_cpu_init (void );#endif arch/arm/mach-mvebu/common.h +0
-2@@ -15,8 +15,6 @@#ifndef __ARCH_MVEBU_COMMON_H#define __ARCH_MVEBU_COMMON_H -#define ARMADA_XP_MAX_CPUS 4 -#include <linux/reboot.h> void mvebu_restart (enum reboot_mode mode,const char *cmd);
Signature · 4 lines
Gregory Clement, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
Jason Cooper
AppliedPATCH 1/3 ARM: mvebu: move ARMADA_XP_MAX_CPUS to armada-370-xp.h
In reply to Thomas PetazzoniQuoted 11 lines · Thomas Petazzoni
The
ARMADA_XP_MAX_CPUSdefinition was incommon.h, which as its name says, is common to all mvebu SoCs. It is more logical to have this XP specific definition in the already existingarmada-370-xp.hheader file, especially in preparation to the addition of the support for other SOCs in mach-mvebu.Signed-off-by Thomas Petazzoni <[email protected]>--- arch/arm/mach-mvebu/armada-370-xp.h | 2 ++ arch/arm/mach-mvebu/common.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-)
Applied to mvebu/soc
thx,
Jason.
PATCH 2/3 ARM: mvebu: fix register length for Armada XP PMSU
In reply to Thomas PetazzoniThe per-CPU PMSU registers documented in the datasheet start at 0x22100 and the last register for CPU3 is at 0x22428. However, the DT informations use <0x22100 0x430>, which makes the region end at 0x22530 and not 0x22430.
Moreover, looking at the datasheet, we can see that the registers for CPU0 start at 0x22100, for CPU1 at 0x22200, for CPU2 at 0x22300 and for CPU3 at 0x22400. It seems clear that 0x100 bytes of registers have been used per CPU.
Therefore, this commit reduces the length of the PMSU per-CPU register area from the incorrect 0x430 bytes to a more logical 0x400 bytes.
--- arch/arm/boot/dts/armada-xp.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/armada-xp.dtsi +1 -1
@@ -48,7 +48,7 @@ armada-370-xp-pmsu at 22000 { compatible = "marvell,armada-370-xp-pmsu"; - reg = <0x22100 0x430>, <0x20800 0x20>; + reg = <0x22100 0x400>, <0x20800 0x20>; }; serial at 12200 {
Signature · 1 line
1.8.3.2
PATCH 2/3 ARM: mvebu: fix register length for Armada XP PMSU
Hi Thomas, Jason, Sebastian, Andrew,
Quoted 10 lines · Thomas Petazzoni
The per-CPU PMSU registers documented in the datasheet start at
0x22100and the last register for CPU3 is at0x22428. However, the DT informations use <0x221000x430>, which makes the region end at0x22530and not0x22430.Moreover, looking at the datasheet, we can see that the registers for CPU0 start at
0x22100, for CPU1 at0x22200, for CPU2 at0x22300and for CPU3 at0x22400. It seems clear that0x100bytes of registers have been used per CPU.
Quoted 4 lines
Therefore, this commit reduces the length of the PMSU per-CPU register area from the incorrect
0x430bytes to a more logical0x400bytes.Signed-off-by Thomas Petazzoni <[email protected]>
Thanks,
Gregory
Quoted 18 lines
--- arch/arm/boot/dts/armada-xp.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/arm/boot/dts/armada-xp.dtsi +1
-1@@ -48,7 +48,7 @@ armada-370-xp-pmsu at 22000 { compatible = "marvell,armada-370-xp-pmsu"; - reg = <0x22100 0x430>, <0x20800 0x20>; + reg = <0x22100 0x400>, <0x20800 0x20>; }; serial at 12200 {
Signature · 4 lines
Gregory Clement, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
Jason Cooper
AppliedPATCH 2/3 ARM: mvebu: fix register length for Armada XP PMSU
In reply to Thomas PetazzoniQuoted 10 lines · Thomas Petazzoni
The per-CPU PMSU registers documented in the datasheet start at
0x22100and the last register for CPU3 is at0x22428. However, the DT informations use <0x221000x430>, which makes the region end at0x22530and not0x22430.Moreover, looking at the datasheet, we can see that the registers for CPU0 start at
0x22100, for CPU1 at0x22200, for CPU2 at0x22300and for CPU3 at0x22400. It seems clear that0x100bytes of registers have been used per CPU.
Quoted 7 lines
Therefore, this commit reduces the length of the PMSU per-CPU register area from the incorrect
0x430bytes to a more logical0x400bytes.Signed-off-by Thomas Petazzoni <[email protected]>--- arch/arm/boot/dts/armada-xp.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to mvebu/dt after a little reshuffling due to the dtsi node sorting.
thx,
Jason.
PATCH 3/3 ARM: mvebu: make armada_370_xp_pmsu_init() static
In reply to Thomas PetazzoniThe armada_370_xp_pmsu_init() function is called as an early_initcall(). Therefore, there is no need to export this function, and we can make it static.
--- arch/arm/mach-mvebu/common.h | 1 - arch/arm/mach-mvebu/pmsu.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-)
arch/arm/mach-mvebu/common.h +0 -1
@@ -24,7 +24,6 @@ void armada_370_xp_handle_irq(struct pt_regs *regs);void armada_xp_cpu_die (unsigned int cpu);int armada_370_xp_coherency_init (void ); -int armada_370_xp_pmsu_init (void );void armada_xp_secondary_startup (void );extern struct smp_operations armada_xp_smp_ops;#endif
arch/arm/mach-mvebu/pmsu.c +1 -1
@@ -58,7 +58,7 @@ int armada_xp_boot_cpu(unsigned int cpu_id, void *boot_addr) }#endif -int __init armada_370_xp_pmsu_init (void ) +static int __init armada_370_xp_pmsu_init (void ) {struct device_node *np;
Signature · 1 line
1.8.3.2
PATCH 3/3 ARM: mvebu: make armada_370_xp_pmsu_init() static
Hi Thomas,
Quoted 5 lines · Thomas Petazzoni
The
armada_370_xp_pmsu_init()function is called as anearly_initcall(). Therefore, there is no need to export this function, and we can make it static.Signed-off-by Thomas Petazzoni <[email protected]>
Thanks,
Gregory
Quoted 31 lines
--- arch/arm/mach-mvebu/common.h | 1 - arch/arm/mach-mvebu/pmsu.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-)arch/arm/mach-mvebu/common.h +0
-1@@ -24,7 +24,6 @@ void armada_370_xp_handle_irq(struct pt_regs *regs);void armada_xp_cpu_die (unsigned int cpu);int armada_370_xp_coherency_init (void ); -int armada_370_xp_pmsu_init (void );void armada_xp_secondary_startup (void );extern struct smp_operations armada_xp_smp_ops;#endif arch/arm/mach-mvebu/pmsu.c +1
-1@@ -58,7 +58,7 @@ int armada_xp_boot_cpu(unsigned int cpu_id, void *boot_addr) }#endif -int __init armada_370_xp_pmsu_init (void ) +static int __init armada_370_xp_pmsu_init (void ) {struct device_node *np;
Signature · 4 lines
Gregory Clement, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 3/3 ARM: mvebu: make armada_370_xp_pmsu_init() static
In reply to Thomas PetazzoniThomas,
Quoted 9 lines · Thomas Petazzoni
The
armada_370_xp_pmsu_init()function is called as anearly_initcall(). Therefore, there is no need to export this function, and we can make it static.Signed-off-by Thomas Petazzoni <[email protected]>--- arch/arm/mach-mvebu/common.h | 1 - arch/arm/mach-mvebu/pmsu.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-)
Thanks, but this was already cleaned up up by:
b12634e343be ARM: mvebu: fix some sparse warnings
in mvebu/soc (it was actually HEAD up until a few moments ago ;-)
Ho, ho, ho,
Jason.
Andrew Lunn
maintainercover ARM: mvebu: minor improvements
In reply to Thomas PetazzoniQuoted 9 lines · Thomas Petazzoni
Jason, Gregory, Sebastian, Andrew,
Here are three patches making minor improvements to the mvebu code base.
* The first one moves an 370/XP specific declaration to
armada-370-xp.h, in preparation for the future addition of the support for other SOCs in mach-mvebu/. It should go to mvebu/soc.
Quoted 8 lines
* The second one fixes the length of the registers of the Armada XP PMSU. It should go to mvebu/dt. There is no need to push this as a fix, as it *reduces* the length of the register area, so it is really only a cosmetic improvement.
* The third one makes a function static. It should to to mvebu/soc.
Thanks!
Hi Thomas
All look sensible to me,
Andrew