Skip to content

Commit

Permalink
net: dsa: b53: Extend platform data to include DSA ports
Browse files Browse the repository at this point in the history
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Florian Fainelli authored and David S. Miller committed May 20, 2018
1 parent bf4bd7a commit bf3c592
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/linux/platform_data/b53.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit bf3c592

Please sign in to comment.