summaryrefslogtreecommitdiff
path: root/include/dsa.h
Commit message (Collapse)AuthorAgeFilesLines
* net: dsa: add adjust_link supportOleksij Rempel2023-03-211-0/+1
| | | | | | | | | | The required functionality is essential for cable hot plugging or asynchronous link detection. In its current state, DSA will only operate if the cable was connected prior to booting. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://lore.barebox.org/20230316134209.4068801-1-o.rempel@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: dsa: add struct dsa_switch::priv member for driver useAhmad Fatoum2023-01-231-0/+1
| | | | | | | | | While we could use container_of, this makes porting and synchronizing with Linux drivers easier. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20230116134501.2006391-9-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: dsa: add some helpers to ease porting kernel driversAhmad Fatoum2023-01-231-0/+16
| | | | | | | | | These make port of the realtek driver in a follow-up commit a bit more similar to the Linux driver. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20230116134501.2006391-8-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: dsa: rename dsa_ops to dsa_switch_opsAhmad Fatoum2023-01-231-2/+2
| | | | | | | | | Linux calls the ops dsa_switch_ops and we have some members, which are the same in both, so adopt the Linux naming. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20230116134501.2006391-4-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Rename struct device_d to deviceSascha Hauer2023-01-101-2/+2
| | | | | | | | | | | | | The '_d' suffix was originally introduced in case we want to import Linux struct device as a separate struct into barebox. Over time it became clear that this won't happen, instead barebox struct device_d is basically the same as Linux struct device. Rename the struct name accordingly to make porting Linux code easier. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Marco Felsch <m.felsch@pengutronix.de> Link: https://lore.barebox.org/20221214123512.189688-3-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: dsa: fix of_device_ensure_probed*() for switch portsOleksij Rempel2022-11-081-1/+1
| | | | | | | | | | | | Create ports by using of_platform_device_create() in the same way as it is used by of_device_ensure_probed*(). Otherwise we are creating multiple devices for the same node. At same time we need to link dummy driver to make this logic work. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://lore.barebox.org/20221108061009.4168735-6-o.rempel@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: add DSA framework to support basic switch functionalityOleksij Rempel2022-04-141-0/+90
Add DSA based port multiplexing functionality for barebox. With this framework we will be able to use different ports of as switch separately. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://lore.barebox.org/20220413082205.429509-5-o.rempel@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>