summaryrefslogtreecommitdiff
path: root/src/device/mdio.c
blob: 9f560e6bdf9847da2fe4a854f9ca812ecd0ded47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* SPDX-License-Identifier: GPL-2.0-only */

#include <console/console.h>
#include <device/device.h>
#include <device/mdio.h>
#include <stddef.h>

const struct mdio_bus_operations *dev_get_mdio_ops(struct device *dev)
{
	if (!dev || !dev->ops || !dev->ops->ops_mdio) {
		printk(BIOS_ERR, "Could not get MDIO operations.\n");
		return NULL;
	}

	return dev->ops->ops_mdio;
}