net: dsa: b53: Extend platform data to include DSA ports
Subsystems (3)
PATCH v2 1/1 net: dsa: b53: Extend platform data to include DSA ports
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.
---
Changes in v2:
- update commit message
include/linux/platform_data/b53.h | 4 ++++ 1 file changed, 4 insertions(+)
include/linux/platform_data/b53.h +4 -0
@@ -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
From: Florian Fainelli <[email protected]>
Date: Sun, 20 May 2018 08:56:30 -0700
Quoted 9 lines
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_datastructure at the beginning ofb53_platform_datafordsa_register_switch()to access it. This does not require modifications tob53_common.cwhich will passplatform_datatrough.Signed-off-by Florian Fainelli <[email protected]>
Applied, thanks.