#include <linux/platform_device.h>
#include <linux/init.h>
#include <linux/netdevice.h>
#include <linux/phy.h>
#include <linux/of.h>
#include "cpsw.h"
#define AM33XX_GMII_SEL_MODE_MII …
#define AM33XX_GMII_SEL_MODE_RMII …
#define AM33XX_GMII_SEL_MODE_RGMII …
#define AM33XX_GMII_SEL_RMII2_IO_CLK_EN …
#define AM33XX_GMII_SEL_RMII1_IO_CLK_EN …
#define AM33XX_GMII_SEL_RGMII2_IDMODE …
#define AM33XX_GMII_SEL_RGMII1_IDMODE …
#define GMII_SEL_MODE_MASK …
struct cpsw_phy_sel_priv { … };
static void cpsw_gmii_sel_am3352(struct cpsw_phy_sel_priv *priv,
phy_interface_t phy_mode, int slave)
{ … }
static void cpsw_gmii_sel_dra7xx(struct cpsw_phy_sel_priv *priv,
phy_interface_t phy_mode, int slave)
{ … }
static struct platform_driver cpsw_phy_sel_driver;
static int match(struct device *dev, const void *data)
{ … }
void cpsw_phy_sel(struct device *dev, phy_interface_t phy_mode, int slave)
{ … }
EXPORT_SYMBOL_GPL(…);
static const struct of_device_id cpsw_phy_sel_id_table[] = …;
static int cpsw_phy_sel_probe(struct platform_device *pdev)
{ … }
static struct platform_driver cpsw_phy_sel_driver = …;
builtin_platform_driver(…) …;