Skip to contentSkip to conversation

ARM: mvebu: additional cleanups

PATCH New Thomas Petazzoni 3 participants 9 messages Dec 26, 2013 – Dec 27, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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
#1 lore raw

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
index e366010..4c84689 100644
@@ -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
#2 lore raw

PATCH 2/2 ARM: mvebu: move Armada 370/XP specific definitions to armada-370-xp.h

In reply to Thomas Petazzoni

In 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
index c612b2c..775d9c3 100644
@@ -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
index 4c84689..c23b077 100644
@@ -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
maintainer
#3 lore raw

PATCH 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.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.

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
---
 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
index c612b2c..775d9c3 100644
@@ -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
index 4c84689..c23b077 100644
@@ -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
#4 lore raw

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.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.

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
maintainer
#5 lore raw

PATCH 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.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?

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.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.

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

#6 lore raw

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.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.

Quoted 8 lines

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?

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
#7 lore raw

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.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.

Quoted 8 lines

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?

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.

#8 lore raw

cover ARM: mvebu: additional cleanups

In reply to Thomas Petazzoni
Quoted 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 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(-)

Whole series applied to mvebu/soc

thx,

Jason.