ARM: mvebu: additional cleanups
Subsystems (3)
cover ARM: mvebu: additional cleanups
Jason, Gregory, Andrew, Sebastian,
Here are two additional minor cleanups to the mach-mvebu code base. They are intended for mvebu/soc. Note that they are based on 3.13-rc5, so there might be some conflicts while applying them to mvebu/soc, but the resolution should be trivial considering how simple the patches are.
Thanks!
Thomas
Thomas Petazzoni (2):
ARM: mvebu: remove prototypes of non-existing functions from common.h
ARM: mvebu: move Armada 370/XP specific definitions to armada-370-xp.h
arch/arm/mach-mvebu/armada-370-xp.h | 2 ++ arch/arm/mach-mvebu/common.h | 8 +------- 2 files changed, 3 insertions(+), 7 deletions(-)
Signature · 1 line
1.8.3.2
PATCH 1/2 ARM: mvebu: remove prototypes of non-existing functions from common.h
The mach-mvebu/common.h file contains prototypes of functions that have been removed, so this commit removes the corresponding prototypes.
--- arch/arm/mach-mvebu/common.h | 5 ----- 1 file changed, 5 deletions(-)
arch/arm/mach-mvebu/common.h +0 -5
@@ -21,12 +21,7 @@void mvebu_restart (enum reboot_mode mode,const char *cmd); -void armada_370_xp_init_irq (void ); -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
Signature · 1 line
1.8.3.2
PATCH 2/2 ARM: mvebu: move Armada 370/XP specific definitions to armada-370-xp.h
In reply to Thomas PetazzoniIn preparation to the introduction of the support for additional SoC, the mvebu/common.h should be clear of Armada 370/XP-specific definitions. Therefore, move the Armada 370/XP SMP specific definitions to the armada-370-xp.h file.
--- arch/arm/mach-mvebu/armada-370-xp.h | 2 ++ arch/arm/mach-mvebu/common.h | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-)
arch/arm/mach-mvebu/armada-370-xp.h +2 -0
@@ -20,6 +20,8 @@void armada_mpic_send_doorbell (const struct cpumask *mask,unsigned int irq);void armada_xp_mpic_smp_cpu_init (void ); +void armada_xp_secondary_startup (void ); +extern struct smp_operations armada_xp_smp_ops;#endif #endif /* __MACH_ARMADA_370_XP_H */
arch/arm/mach-mvebu/common.h +1 -2
@@ -22,6 +22,5 @@void mvebu_restart (enum reboot_mode mode,const char *cmd);void armada_xp_cpu_die (unsigned int cpu); -void armada_xp_secondary_startup (void ); -extern struct smp_operations armada_xp_smp_ops; +#endif
Signature · 1 line
1.8.3.2
Andrew Lunn
maintainerPATCH 2/2 ARM: mvebu: move Armada 370/XP specific definitions to armada-370-xp.h
Quoted 4 lines · Thomas Petazzoni
In preparation to the introduction of the support for additional SoC, the
mvebu/common.hshould be clear of Armada 370/XP-specific definitions. Therefore, move the Armada 370/XP SMP specific definitions to thearmada-370-xp.hfile.
Hi Thomas
Just a question. How much of armada-370-xp.h is specific to just one of these? Things like all the SMP support is XP only. Does it make sense to have armada-370.h, armada-xp.h, then a shared armada-370-xp.h, followed by common.h?
As more SoCs move in, having a clean well defined structure is going to help with the merging.
Thanks
Andrew
Quoted 35 lines
Signed-off-by Thomas Petazzoni <[email protected]>--- arch/arm/mach-mvebu/armada-370-xp.h | 2 ++ arch/arm/mach-mvebu/common.h | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-)arch/arm/mach-mvebu/armada-370-xp.h +2
-0@@ -20,6 +20,8 @@void armada_mpic_send_doorbell (const struct cpumask *mask,unsigned int irq);void armada_xp_mpic_smp_cpu_init (void ); +void armada_xp_secondary_startup (void ); +extern struct smp_operations armada_xp_smp_ops;#endif #endif /* __MACH_ARMADA_370_XP_H */ arch/arm/mach-mvebu/common.h +1
-2@@ -22,6 +22,5 @@void mvebu_restart (enum reboot_mode mode,const char *cmd);void armada_xp_cpu_die (unsigned int cpu); -void armada_xp_secondary_startup (void ); -extern struct smp_operations armada_xp_smp_ops; +#endif Signature · 1 line
1.8.3.2
PATCH 2/2 ARM: mvebu: move Armada 370/XP specific definitions to armada-370-xp.h
Dear Andrew Lunn,
Quoted 7 lines · Andrew Lunn
Just a question. How much of
armada-370-xp.his specific to just one of these? Things like all the SMP support is XP only. Does it make sense to havearmada-370.h,armada-xp.h, then a sharedarmada-370-xp.h, followed bycommon.h?As more SoCs move in, having a clean well defined structure is going to help with the merging.
As it is today, none of the contents of armada-370-xp.h are useful for Armada 370. However, the "main" file is also named armada-370-xp.c and handles both SoC, so it made sense to have a file named armada-370-xp.h as well.
That said, I'm fine with moving the Armada XP SMP specific bits in a armada-xp.h, file included in armada-370-xp.c. For now, we wouldn't need a armada-370.h file or even an armada-370-xp.h file.
The upcoming SOCs will not be handled in armada-370-xp.c, due to quite important differences in these SOCs compared to 370/XP.
Thanks for the feedback!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
Andrew Lunn
maintainerPATCH 2/2 ARM: mvebu: move Armada 370/XP specific definitions to armada-370-xp.h
Quoted 9 lines · Thomas Petazzoni
Dear Andrew Lunn,
Quoted 5 lines · Andrew Lunn
Just a question. How much of
armada-370-xp.his specific to just one of these? Things like all the SMP support is XP only. Does it make sense to havearmada-370.h,armada-xp.h, then a sharedarmada-370-xp.h, followed bycommon.h?
Quoted 7 lines
Quoted 2 lines
As more SoCs move in, having a clean well defined structure is going to help with the merging.
As it is today, none of the contents of
armada-370-xp.hare useful for Armada 370. However, the "main" file is also namedarmada-370-xp.cand handles both SoC, so it made sense to have a file namedarmada-370-xp.has well.
Hi Thomas
So thinking about dove, kirkwood, this new SoC, all living in mvebu, should we have a board-dt.c file which all SoCs share, and then one .c/.h pair of files per SoC? I'm saying this without looking at the actual content, so i've no idea is this is actually possible. I guess we need to do something like this sometime, but does it need to be now?
Andrew
PATCH 2/2 ARM: mvebu: move Armada 370/XP specific definitions to armada-370-xp.h
Dear Andrew Lunn,
Quoted 5 lines · Andrew Lunn
Quoted 4 lines
As it is today, none of the contents of
armada-370-xp.hare useful for Armada 370. However, the "main" file is also namedarmada-370-xp.cand handles both SoC, so it made sense to have a file namedarmada-370-xp.has well.
Quoted 8 lines
Hi Thomas
So thinking about dove, kirkwood, this new SoC, all living in mvebu, should we have a
board-dt.cfile which all SoCs share, and then one .c/.h pair of files per SoC? I'm saying this without looking at the actual content, so i've no idea is this is actually possible. I guess we need to do something like this sometime, but does it need to be now?
I think it's a bit hard to see now what will be the common parts. I personally would worry too much about this though, as code can easily be reorganized as needed as we see patterns emerge and gain a better understanding of what's common and what's specific.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 2/2 ARM: mvebu: move Armada 370/XP specific definitions to armada-370-xp.h
Quoted 18 lines · Thomas Petazzoni
Dear Andrew Lunn,
Quoted 5 lines · Andrew Lunn
Quoted 4 lines
As it is today, none of the contents of
armada-370-xp.hare useful for Armada 370. However, the "main" file is also namedarmada-370-xp.cand handles both SoC, so it made sense to have a file namedarmada-370-xp.has well.Quoted 8 lines
Hi Thomas
So thinking about dove, kirkwood, this new SoC, all living in mvebu, should we have a
board-dt.cfile which all SoCs share, and then one .c/.h pair of files per SoC? I'm saying this without looking at the actual content, so i've no idea is this is actually possible. I guess we need to do something like this sometime, but does it need to be now?
Quoted 4 lines
I think it's a bit hard to see now what will be the common parts. I personally would worry too much about this though, as code can easily be reorganized as needed as we see patterns emerge and gain a better understanding of what's common and what's specific.
I agree. We need to keep an eye on it, but no need to churn. The necessary changes can be made as new code is introduced.
thx,
Jason.
cover ARM: mvebu: additional cleanups
In reply to Thomas PetazzoniQuoted 12 lines · Thomas Petazzoni
Jason, Gregory, Andrew, Sebastian,
Here are two additional minor cleanups to the mach-mvebu code base. They are intended for mvebu/soc. Note that they are based on 3.13-rc5, so there might be some conflicts while applying them to mvebu/soc, but the resolution should be trivial considering how simple the patches are.
Thanks!
Thomas
Quoted 7 lines
Thomas Petazzoni (2):
ARM: mvebu: remove prototypes of non-existing functions fromcommon.h
ARM: mvebu: move Armada 370/XP specific definitions toarmada-370-xp.harch/arm/mach-mvebu/armada-370-xp.h | 2 ++ arch/arm/mach-mvebu/common.h | 8 +------- 2 files changed, 3 insertions(+), 7 deletions(-)
Whole series applied to mvebu/soc
thx,
Jason.