summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2016-05-11 23:36:29 (GMT)
committerDavid S. Miller <davem@davemloft.net>2016-05-11 23:36:29 (GMT)
commitc1869d584a9d1e51544d747524662d5d2b8bf63f (patch)
treee438a6286d9a2cfbd56ef6e7608ed238ee4deb7e /include/net
parentcb9b9020fca5fd34ab2e21fb36fc2c7a85329426 (diff)
parentf8cd8753def081b92b93209265bce68a73885ed0 (diff)
downloadlinux-c1869d584a9d1e51544d747524662d5d2b8bf63f.tar.xz
Merge branch 'more-dsa-probing'
Andrew Lunn says: ==================== More enabler patches for DSA probing The complete set of patches for the reworked DSA probing is too big to post as once. These subset contains some enablers which are easy to review. Eventually, the Marvell driver will instantiate its own internal MDIO bus, rather than have the framework do it, thus allows devices on the bus to be listed in the device tree. Initialize the main mutex as soon as it is created, to avoid lifetime issues with the mdio bus. A previous patch renamed all the DSA probe functions to make room for a true device probe. However the recent merging of all the Marvell switch drivers resulted in mv88e6xxx going back to the old probe name. Rename it again, so we can have a driver probe function. Add minimum support for the Marvell switch driver to probe as an MDIO device, as well as an DSA driver. Later patches will then register this device with the new DSA core framework. Move the GPIO reset code out of the DSA code. Different drivers may need different reset mechanisms, e.g. via a reset controller for memory mapped devices. Don't clutter up the core with this. Let each driver implement what it needs. master_dev is no longer needed in the switch drivers, since they have access to a device pointer from the probe function. Remove it. Let the switch parse the eeprom length from its one device tree node. This is required with the new binding when the central DSA platform device no longer exists. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/dsa.h19
1 files changed, 4 insertions, 15 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h
index 8e86af8..17c3d37 100644
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
@@ -16,7 +16,6 @@
#include <linux/timer.h>
#include <linux/workqueue.h>
#include <linux/of.h>
-#include <linux/of_gpio.h>
#include <linux/phy.h>
#include <linux/phy_fixed.h>
#include <linux/ethtool.h>
@@ -65,13 +64,6 @@ struct dsa_chip_data {
* NULL if there is only one switch chip.
*/
s8 *rtable;
-
- /*
- * A switch may have a GPIO line tied to its reset pin. Parse
- * this from the device tree, and use it before performing
- * switch soft reset.
- */
- struct gpio_desc *reset;
};
struct dsa_platform_data {
@@ -128,6 +120,8 @@ struct dsa_switch_tree {
};
struct dsa_switch {
+ struct device *dev;
+
/*
* Parent switch tree, and switch index.
*/
@@ -143,18 +137,13 @@ struct dsa_switch {
/*
* Configuration data for this switch.
*/
- struct dsa_chip_data *pd;
+ struct dsa_chip_data *cd;
/*
* The used switch driver.
*/
struct dsa_switch_driver *drv;
- /*
- * Reference to host device to use.
- */
- struct device *master_dev;
-
#ifdef CONFIG_NET_DSA_HWMON
/*
* Hardware monitoring information
@@ -201,7 +190,7 @@ static inline u8 dsa_upstream_port(struct dsa_switch *ds)
if (dst->cpu_switch == ds->index)
return dst->cpu_port;
else
- return ds->pd->rtable[dst->cpu_switch];
+ return ds->cd->rtable[dst->cpu_switch];
}
struct switchdev_trans;