Skip to content

Commit 45977e5

Browse files
Noltaridavem330
authored andcommitted
net: dsa: b53: mmap: add phy ops
Implement phy_read16() and phy_write16() ops for B53 MMAP to avoid accessing B53_PORT_MII_PAGE registers which hangs the device. This access should be done through the MDIO Mux bus controller. Signed-off-by: Álvaro Fernández Rojas <[email protected]> Acked-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent f2e9d08 commit 45977e5

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

drivers/net/dsa/b53/b53_mmap.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,18 @@ static int b53_mmap_write64(struct b53_device *dev, u8 page, u8 reg,
216216
return 0;
217217
}
218218

219+
static int b53_mmap_phy_read16(struct b53_device *dev, int addr, int reg,
220+
u16 *value)
221+
{
222+
return -EIO;
223+
}
224+
225+
static int b53_mmap_phy_write16(struct b53_device *dev, int addr, int reg,
226+
u16 value)
227+
{
228+
return -EIO;
229+
}
230+
219231
static const struct b53_io_ops b53_mmap_ops = {
220232
.read8 = b53_mmap_read8,
221233
.read16 = b53_mmap_read16,
@@ -227,6 +239,8 @@ static const struct b53_io_ops b53_mmap_ops = {
227239
.write32 = b53_mmap_write32,
228240
.write48 = b53_mmap_write48,
229241
.write64 = b53_mmap_write64,
242+
.phy_read16 = b53_mmap_phy_read16,
243+
.phy_write16 = b53_mmap_phy_write16,
230244
};
231245

232246
static int b53_mmap_probe_of(struct platform_device *pdev,

0 commit comments

Comments
 (0)