Skip to contentSkip to conversation

net: dsa: b53: Extend platform data to include DSA ports

PATCH Superseded Florian Fainelli 2 participants 5 messages May 19, 2018 – May 20, 2018

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: dsa: b53: Extend platform data to include DSA ports

Provide a means for !OF platforms to supply their DSA platform data configuration using the dsa_platform_data structure.

---
 include/linux/platform_data/b53.h | 4 ++++
 1 file changed, 4 insertions(+)
include/linux/platform_data/b53.h +4 -0
index 69d279c0da96..8eaef2f2b691 100644
@@ -20,8 +20,12 @@
 #define __B53_H
 
 #include <linux/kernel.h>
+#include <net/dsa.h>
 
 struct b53_platform_data {
+	/* Must be first such that dsa_register_switch() can access it */
+	struct dsa_chip_data cd;
+
 	u32 chip_id;
 	u16 enabled_ports;
 
Signature · 1 line
2.14.1
#1 lore raw
Quoted 2 lines · Florian Fainelli

Provide a means for !OF platforms to supply their DSA platform data configuration using the dsa_platform_data structure.

Hi Florian

It seems a bit odd adding the header file, but no code. Yes, this will help simplify the merge dependencies for the ZII boards next cycle, but can we have the actual code as well?

Thanks
Andrew

Quoted 26 lines
---
 include/linux/platform_data/b53.h | 4 ++++
 1 file changed, 4 insertions(+)
include/linux/platform_data/b53.h +4 -0
index 69d279c0da96..8eaef2f2b691 100644
@@ -20,8 +20,12 @@
 #define __B53_H
 
 #include <linux/kernel.h>
+#include <net/dsa.h>
 
 struct b53_platform_data {
+	/* Must be first such that dsa_register_switch() can access it */
+	struct dsa_chip_data cd;
+
 	u32 chip_id;
 	u16 enabled_ports;
 
Signature · 1 line
2.14.1
#2 lore raw
Quoted 9 lines · Andrew Lunn
Quoted 2 lines · Florian Fainelli

Provide a means for !OF platforms to supply their DSA platform data configuration using the dsa_platform_data structure.

Hi Florian

It seems a bit odd adding the header file, but no code. Yes, this will help simplify the merge dependencies for the ZII boards next cycle, but can we have the actual code as well?

The existing b53_common.c file already makes use of platform data the only thing that was missing was a dsa_chip_data structure correctly placed for the core DSA layer to obtain port information. This was present from day one in the b53 driver because it is also the mechanism used by the bus specific drivers to pass information to the core b53 driver file. Hi Andrew,

Signature · 1 line
Florian
#3 lore raw
Quoted 5 lines · Florian Fainelli
Quoted 4 lines · Andrew Lunn
Quoted 2 lines · Florian Fainelli

Provide a means for !OF platforms to supply their DSA platform data configuration using the dsa_platform_data structure.

Quoted 7 lines
Quoted 5 lines

Hi Florian

It seems a bit odd adding the header file, but no code. Yes, this will help simplify the merge dependencies for the ZII boards next cycle, but can we have the actual code as well?

The existing b53_common.c file already makes use of platform data the only thing that was missing was a dsa_chip_data structure correctly placed for the core DSA layer to obtain port information. This was present from day one in the b53 driver because it is also the mechanism used by the bus specific drivers to pass information to the core b53 driver file.

Ah. It would of been good to say that in the commit message.

Andrew

#4 lore raw
Quoted 8 lines · Andrew Lunn
Quoted 7 lines · Florian Fainelli
Quoted 6 lines · Andrew Lunn
Quoted 2 lines · Florian Fainelli

Provide a means for !OF platforms to supply their DSA platform data configuration using the dsa_platform_data structure.

Hi Florian

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

It seems a bit odd adding the header file, but no code. Yes, this will help simplify the merge dependencies for the ZII boards next cycle, but can we have the actual code as well?

The existing b53_common.c file already makes use of platform data the only thing that was missing was a dsa_chip_data structure correctly placed for the core DSA layer to obtain port information. This was present from day one in the b53 driver because it is also the mechanism used by the bus specific drivers to pass information to the core b53 driver file.

Ah. It would of been good to say that in the commit message.

Make sense, v2 coming. Thanks!

Signature · 1 line
Florian