summaryrefslogtreecommitdiff
path: root/src/include/device
diff options
context:
space:
mode:
authorWerner Zeh <werner.zeh@siemens.com>2022-11-15 08:27:19 +0100
committerMartin L Roth <gaumless@gmail.com>2022-11-24 05:58:28 +0000
commit49ec39fa7f05c4a3d320b5a60593108e1affb19f (patch)
tree4b399cea39be705c04e10db2f4e2adff223216b4 /src/include/device
parentd4ab2ee38fcc91edaa31617558068fa9d8ca0f65 (diff)
device/mdio: Provide helper functions for read and write
This patch provides helper functions to read or write a register via the MDIO bus. They can be used from drivers to easily access registers on the MDIO bus. Change-Id: I293d93435d27269a071b4b9b94a1b55307c575a7 Signed-off-by: Werner Zeh <werner.zeh@siemens.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/69611 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/include/device')
-rw-r--r--src/include/device/mdio.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/include/device/mdio.h b/src/include/device/mdio.h
index 39e60f582d..44ce48b7f3 100644
--- a/src/include/device/mdio.h
+++ b/src/include/device/mdio.h
@@ -14,4 +14,7 @@ struct mdio_bus_operations {
/* Helper for getting mdio operations from a device */
const struct mdio_bus_operations *dev_get_mdio_ops(struct device *dev);
+uint16_t mdio_read(struct device *dev, uint8_t offset);
+void mdio_write(struct device *dev, uint8_t offset, uint16_t val);
+
#endif /* __DEVICE_MDIO_H__ */