Horatiu Vultur | 236dabc | 2019-01-31 15:30:34 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */ |
| 2 | /* |
| 3 | * Copyright (c) 2018 Microsemi Corporation |
| 4 | */ |
| 5 | |
Horatiu Vultur | 6fbf161 | 2019-06-09 15:27:29 +0200 | [diff] [blame] | 6 | #ifndef _MSCC_MIIM_H_ |
| 7 | #define _MSCC_MIIM_H_ |
| 8 | |
Horatiu Vultur | 236dabc | 2019-01-31 15:30:34 +0100 | [diff] [blame] | 9 | struct mscc_miim_dev { |
| 10 | void __iomem *regs; |
Horatiu Vultur | 6fbf161 | 2019-06-09 15:27:29 +0200 | [diff] [blame] | 11 | phys_addr_t miim_base; |
| 12 | unsigned long miim_size; |
| 13 | struct mii_dev *bus; |
Horatiu Vultur | 236dabc | 2019-01-31 15:30:34 +0100 | [diff] [blame] | 14 | }; |
| 15 | |
| 16 | int mscc_miim_read(struct mii_dev *bus, int addr, int devad, int reg); |
| 17 | int mscc_miim_write(struct mii_dev *bus, int addr, int devad, int reg, u16 val); |
Horatiu Vultur | 6fbf161 | 2019-06-09 15:27:29 +0200 | [diff] [blame] | 18 | |
| 19 | struct 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_ */ |