diff options
author | Claudiu Manoil <claudiu.manoil@nxp.com> | 2019-11-14 18:03:20 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-11-15 23:32:16 +0300 |
commit | 259630e08c2135df6582040b20bd5bb1383964a3 (patch) | |
tree | 960da18df052728242add34149784e0147a599a0 /drivers/net/ethernet/mscc/ocelot.h | |
parent | e7be235fa783209a661c8a324c1e394a5e4d9170 (diff) | |
download | linux-259630e08c2135df6582040b20bd5bb1383964a3.tar.xz |
net: mscc: ocelot: move resource ioremap and regmap init to common code
Let's make this ioremap and regmap init code common. It should not
be platform dependent as it should be usable by PCI devices too.
Use better names where necessary to avoid clashes.
Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mscc/ocelot.h')
-rw-r--r-- | drivers/net/ethernet/mscc/ocelot.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/mscc/ocelot.h b/drivers/net/ethernet/mscc/ocelot.h index 4d8e769ccad9..b5802cea7cc4 100644 --- a/drivers/net/ethernet/mscc/ocelot.h +++ b/drivers/net/ethernet/mscc/ocelot.h @@ -546,9 +546,7 @@ void ocelot_port_writel(struct ocelot_port *port, u32 val, u32 reg); int ocelot_regfields_init(struct ocelot *ocelot, const struct reg_field *const regfields); -struct regmap *ocelot_io_platform_init(struct ocelot *ocelot, - struct platform_device *pdev, - const char *name); +struct regmap *ocelot_regmap_init(struct ocelot *ocelot, struct resource *res); #define ocelot_field_write(ocelot, reg, val) regmap_field_write((ocelot)->regfields[(reg)], (val)) #define ocelot_field_read(ocelot, reg, val) regmap_field_read((ocelot)->regfields[(reg)], (val)) |