include/spd_bin.h: Add SPD IO layer
[coreboot2.git] / src / include / device / mdio.h
blob44ce48b7f3a9227b0de334fb5ff918f7c0d900f5
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #ifndef __DEVICE_MDIO_H__
4 #define __DEVICE_MDIO_H__
6 #include <device/device.h>
7 #include <types.h>
9 struct mdio_bus_operations {
10 uint16_t (*read)(struct device *dev, uint8_t phy_adr, uint8_t reg_adr);
11 void (*write)(struct device *dev, uint8_t phy_adr, uint8_t reg_adr, uint16_t data);
14 /* Helper for getting mdio operations from a device */
15 const struct mdio_bus_operations *dev_get_mdio_ops(struct device *dev);
17 uint16_t mdio_read(struct device *dev, uint8_t offset);
18 void mdio_write(struct device *dev, uint8_t offset, uint16_t val);
20 #endif /* __DEVICE_MDIO_H__ */