blob: feb1f40ae5523d9fbaa3ead95724e1e41f07954a [file] [log] [blame]
Horatiu Vultur236dabc2019-01-31 15:30:34 +01001/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
2/*
3 * Copyright (c) 2018 Microsemi Corporation
4 */
5
Horatiu Vultur6fbf1612019-06-09 15:27:29 +02006#ifndef _MSCC_MIIM_H_
7#define _MSCC_MIIM_H_
8
Horatiu Vultur236dabc2019-01-31 15:30:34 +01009struct mscc_miim_dev {
10 void __iomem *regs;
Horatiu Vultur6fbf1612019-06-09 15:27:29 +020011 phys_addr_t miim_base;
12 unsigned long miim_size;
13 struct mii_dev *bus;
Horatiu Vultur236dabc2019-01-31 15:30:34 +010014};
15
16int mscc_miim_read(struct mii_dev *bus, int addr, int devad, int reg);
17int mscc_miim_write(struct mii_dev *bus, int addr, int devad, int reg, u16 val);
Horatiu Vultur6fbf1612019-06-09 15:27:29 +020018
19struct mii_dev *mscc_mdiobus_init(struct mscc_miim_dev *miim, int *miim_count,
20 phys_addr_t miim_base,
21 unsigned long miim_size);
22
23
24#endif /* _MSCC_MIIM_H_ */