All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v2] net: dsa: b53: Extend platform data to include DSA ports
@ 2018-05-20 15:56 Florian Fainelli
  2018-05-20 22:59 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Florian Fainelli @ 2018-05-20 15:56 UTC (permalink / raw)
  To: netdev; +Cc: andrew, vivien.didelot, Florian Fainelli, open list

The b53 driver already defines and internally uses platform data to let the
glue drivers specify parameters such as the chip id.  What we were missing was
a way to tell the core DSA layer about the ports and their type.

Place a dsa_chip_data structure at the beginning of b53_platform_data for
dsa_register_switch() to access it. This does not require modifications to
b53_common.c which will pass platform_data trough.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
Changes in v2:

- update commit message

 include/linux/platform_data/b53.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/linux/platform_data/b53.h b/include/linux/platform_data/b53.h
index 69d279c0da96..8eaef2f2b691 100644
--- a/include/linux/platform_data/b53.h
+++ b/include/linux/platform_data/b53.h
@@ -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;
 
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next v2] net: dsa: b53: Extend platform data to include DSA ports
  2018-05-20 15:56 [PATCH net-next v2] net: dsa: b53: Extend platform data to include DSA ports Florian Fainelli
@ 2018-05-20 22:59 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-05-20 22:59 UTC (permalink / raw)
  To: f.fainelli; +Cc: netdev, andrew, vivien.didelot, linux-kernel

From: Florian Fainelli <f.fainelli@gmail.com>
Date: Sun, 20 May 2018 08:56:30 -0700

> The b53 driver already defines and internally uses platform data to let the
> glue drivers specify parameters such as the chip id.  What we were missing was
> a way to tell the core DSA layer about the ports and their type.
> 
> Place a dsa_chip_data structure at the beginning of b53_platform_data for
> dsa_register_switch() to access it. This does not require modifications to
> b53_common.c which will pass platform_data trough.
> 
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-05-20 22:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-20 15:56 [PATCH net-next v2] net: dsa: b53: Extend platform data to include DSA ports Florian Fainelli
2018-05-20 22:59 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.