Commit 5fc080de authored by Vladimir Oltean's avatar Vladimir Oltean Committed by Jakub Kicinski

net: dsa: felix: remove felix_info :: imdio_res

The imdio_res is used only by vsc9959, which references its own
vsc9959_imdio_res through the common felix_info->imdio_res pointer.
Since the common code doesn't care about this resource (and it can't be
part of the common array of resources, either, because it belongs in a
different PCI BAR), just reference it directly.
Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent b48b89f9
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
struct felix_info { struct felix_info {
const struct resource *target_io_res; const struct resource *target_io_res;
const struct resource *port_io_res; const struct resource *port_io_res;
const struct resource *imdio_res;
const struct reg_field *regfields; const struct reg_field *regfields;
const u32 *const *map; const u32 *const *map;
const struct ocelot_ops *ops; const struct ocelot_ops *ops;
......
...@@ -1021,7 +1021,7 @@ static int vsc9959_mdio_bus_alloc(struct ocelot *ocelot) ...@@ -1021,7 +1021,7 @@ static int vsc9959_mdio_bus_alloc(struct ocelot *ocelot)
return -ENOMEM; return -ENOMEM;
} }
memcpy(&res, felix->info->imdio_res, sizeof(res)); memcpy(&res, &vsc9959_imdio_res, sizeof(res));
res.flags = IORESOURCE_MEM; res.flags = IORESOURCE_MEM;
res.start += felix->imdio_base; res.start += felix->imdio_base;
res.end += felix->imdio_base; res.end += felix->imdio_base;
...@@ -2592,7 +2592,6 @@ static const struct ocelot_ops vsc9959_ops = { ...@@ -2592,7 +2592,6 @@ static const struct ocelot_ops vsc9959_ops = {
static const struct felix_info felix_info_vsc9959 = { static const struct felix_info felix_info_vsc9959 = {
.target_io_res = vsc9959_target_io_res, .target_io_res = vsc9959_target_io_res,
.port_io_res = vsc9959_port_io_res, .port_io_res = vsc9959_port_io_res,
.imdio_res = &vsc9959_imdio_res,
.regfields = vsc9959_regfields, .regfields = vsc9959_regfields,
.map = vsc9959_regmap, .map = vsc9959_regmap,
.ops = &vsc9959_ops, .ops = &vsc9959_ops,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment