mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 11:03:43 +02:00
net: dsa: lantiq_gswip: split into common and MMIO parts
Move all parts specific for the MMIO/SoC driver into a module of its own to prepare for supporting MDIO-connected switch ICs. Modify gswip_probe() functions by splitting it into a common function gswip_probe_common() which covers allocating, initializing and registering the DSA switch, while keeping transport-specific regmap initialization as well as PHY firmware loading in the new MMIO/SoC-specific gswip_probe() function. Signed-off-by: Daniel Golle <daniel@makrotopia.org> Tested-by: Alexander Sverdlin <alexander.sverdlin@siemens.com> Reviewed-by: Vladimir Oltean <olteanv@gmail.com> Link: https://patch.msgid.link/dc7da5b65ec220ba8e9bc4bd04fe1ed7de046656.1762170107.git.daniel@makrotopia.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
1ec9871fbb
commit
322a1e6f3d
|
|
@ -1,8 +1,12 @@
|
|||
config NET_DSA_LANTIQ_COMMON
|
||||
tristate
|
||||
select REGMAP
|
||||
|
||||
config NET_DSA_LANTIQ_GSWIP
|
||||
tristate "Lantiq / Intel GSWIP"
|
||||
depends on HAS_IOMEM
|
||||
select NET_DSA_TAG_GSWIP
|
||||
select REGMAP
|
||||
select NET_DSA_LANTIQ_COMMON
|
||||
help
|
||||
This enables support for the Lantiq / Intel GSWIP 2.1 found in
|
||||
the xrx200 / VR9 SoC.
|
||||
|
|
|
|||
|
|
@ -1 +1,2 @@
|
|||
obj-$(CONFIG_NET_DSA_LANTIQ_GSWIP) += lantiq_gswip.o
|
||||
obj-$(CONFIG_NET_DSA_LANTIQ_COMMON) += lantiq_gswip_common.o
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -278,4 +278,8 @@ struct gswip_priv {
|
|||
u16 version;
|
||||
};
|
||||
|
||||
void gswip_disable_switch(struct gswip_priv *priv);
|
||||
|
||||
int gswip_probe_common(struct gswip_priv *priv, u32 version);
|
||||
|
||||
#endif /* __LANTIQ_GSWIP_H */
|
||||
|
|
|
|||
1622
drivers/net/dsa/lantiq/lantiq_gswip_common.c
Normal file
1622
drivers/net/dsa/lantiq/lantiq_gswip_common.c
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user