diff options
author | Christian Lamparter <chunkeey@gmail.com> | 2018-01-07 21:27:49 +0100 |
---|---|---|
committer | Mathias Kresin <dev@kresin.me> | 2018-01-12 08:00:04 +0100 |
commit | e4371779d2691553e6321e87d86212beaaa8b89d (patch) | |
tree | e5e01d3858310e1371f539e04edfa4c79b093b0b /target/linux/apm821xx/patches-4.14/030-0001-net-ibm-emac-replace-custom-rgmii_mode_name-with-phy.patch | |
parent | 15faf389ad5159fa8223344029c98a0afca6e5ef (diff) | |
download | mtk-20170518-e4371779d2691553e6321e87d86212beaaa8b89d.zip mtk-20170518-e4371779d2691553e6321e87d86212beaaa8b89d.tar.gz mtk-20170518-e4371779d2691553e6321e87d86212beaaa8b89d.tar.bz2 |
apm821xx: convert MR24 to use DT PHY defintion
Convert the MR24 to use the DT phy probing and at803x PHY driver.
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Diffstat (limited to 'target/linux/apm821xx/patches-4.14/030-0001-net-ibm-emac-replace-custom-rgmii_mode_name-with-phy.patch')
-rw-r--r-- | target/linux/apm821xx/patches-4.14/030-0001-net-ibm-emac-replace-custom-rgmii_mode_name-with-phy.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/target/linux/apm821xx/patches-4.14/030-0001-net-ibm-emac-replace-custom-rgmii_mode_name-with-phy.patch b/target/linux/apm821xx/patches-4.14/030-0001-net-ibm-emac-replace-custom-rgmii_mode_name-with-phy.patch new file mode 100644 index 0000000..28969a7 --- /dev/null +++ b/target/linux/apm821xx/patches-4.14/030-0001-net-ibm-emac-replace-custom-rgmii_mode_name-with-phy.patch @@ -0,0 +1,51 @@ +From 54e1b3004eb85f9317f6c4ceff2e097231c7f52a Mon Sep 17 00:00:00 2001 +From: Christian Lamparter <chunkeey@gmail.com> +Date: Wed, 20 Dec 2017 22:11:22 +0100 +Subject: [PATCH 1/3] net: ibm: emac: replace custom rgmii_mode_name with + phy_modes + +The common phylib defines the same names (in lower-case). +Since rgmii_mode_name() is used only in one place and +for a "notice-level" printk, I think it can be replaced. + +Signed-off-by: Christian Lamparter <chunkeey@gmail.com> +--- + drivers/net/ethernet/ibm/emac/rgmii.c | 20 +------------------- + 1 file changed, 1 insertion(+), 19 deletions(-) + +--- a/drivers/net/ethernet/ibm/emac/rgmii.c ++++ b/drivers/net/ethernet/ibm/emac/rgmii.c +@@ -59,24 +59,6 @@ static inline int rgmii_valid_mode(int p + phy_mode == PHY_MODE_RTBI; + } + +-static inline const char *rgmii_mode_name(int mode) +-{ +- switch (mode) { +- case PHY_MODE_RGMII: +- return "RGMII"; +- case PHY_MODE_TBI: +- return "TBI"; +- case PHY_MODE_GMII: +- return "GMII"; +- case PHY_MODE_MII: +- return "MII"; +- case PHY_MODE_RTBI: +- return "RTBI"; +- default: +- BUG(); +- } +-} +- + static inline u32 rgmii_mode_mask(int mode, int input) + { + switch (mode) { +@@ -115,7 +97,7 @@ int rgmii_attach(struct platform_device + out_be32(&p->fer, in_be32(&p->fer) | rgmii_mode_mask(mode, input)); + + printk(KERN_NOTICE "%pOF: input %d in %s mode\n", +- ofdev->dev.of_node, input, rgmii_mode_name(mode)); ++ ofdev->dev.of_node, input, phy_modes(mode)); + + ++dev->users; + |