summaryrefslogtreecommitdiff
path: root/arch/powerpc/cpu/mpc8xxx/fdt.c
diff options
context:
space:
mode:
authorAndy Fleming <afleming@freescale.com>2011-04-13 00:37:12 -0500
committerAndy Fleming <afleming@freescale.com>2011-04-20 15:09:35 -0500
commit865ff856403fb4bec6fe7f18101364384880068f (patch)
tree10d0d27dd3ae1d484bf5920ce4d1be4fcb786ab1 /arch/powerpc/cpu/mpc8xxx/fdt.c
parent063c12633d5ad74d52152d9c358e715475e17629 (diff)
downloadu-boot-imx-865ff856403fb4bec6fe7f18101364384880068f.zip
u-boot-imx-865ff856403fb4bec6fe7f18101364384880068f.tar.gz
u-boot-imx-865ff856403fb4bec6fe7f18101364384880068f.tar.bz2
fsl: Change fsl_phy_enet_if to phy_interface_t
The fsl_phy_enet_if enum was, essentially, the phy_interface_t enum. This meant that drivers which used fsl_phy_enet_if to deal with PHY interfaces would have to convert between the two (or we would have to have them mirror each other, and deal with the ensuing maintenance headache). Instead, we switch all clients of fsl_phy_enet_if over to phy_interface_t, which should become the standard, anyway. Signed-off-by: Andy Fleming <afleming@freescale.com> Acked-by: Detlev Zundel <dzu@denx.de>
Diffstat (limited to 'arch/powerpc/cpu/mpc8xxx/fdt.c')
-rw-r--r--arch/powerpc/cpu/mpc8xxx/fdt.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/arch/powerpc/cpu/mpc8xxx/fdt.c b/arch/powerpc/cpu/mpc8xxx/fdt.c
index 0c166fd..520cb90 100644
--- a/arch/powerpc/cpu/mpc8xxx/fdt.c
+++ b/arch/powerpc/cpu/mpc8xxx/fdt.c
@@ -27,8 +27,8 @@
#include <libfdt.h>
#include <fdt_support.h>
#include <asm/mp.h>
-#include <asm/fsl_enet.h>
#include <asm/fsl_serdes.h>
+#include <phy.h>
#if defined(CONFIG_MP) && (defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx))
static int ft_del_cpuhandle(void *blob, int cpuhandle)
@@ -218,27 +218,10 @@ void fdt_fixup_crypto_node(void *blob, int sec_rev)
}
#endif
-int fdt_fixup_phy_connection(void *blob, int offset, enum fsl_phy_enet_if phyc)
+int fdt_fixup_phy_connection(void *blob, int offset, phy_interface_t phyc)
{
- static const char *fsl_phy_enet_if_str[] = {
- [MII] = "mii",
- [RMII] = "rmii",
- [GMII] = "gmii",
- [RGMII] = "rgmii",
- [RGMII_ID] = "rgmii-id",
- [RGMII_RXID] = "rgmii-rxid",
- [SGMII] = "sgmii",
- [TBI] = "tbi",
- [RTBI] = "rtbi",
- [XAUI] = "xgmii",
- [FSL_ETH_IF_NONE] = "",
- };
-
- if (phyc > ARRAY_SIZE(fsl_phy_enet_if_str))
- return fdt_setprop_string(blob, offset, "phy-connection-type", "");
-
return fdt_setprop_string(blob, offset, "phy-connection-type",
- fsl_phy_enet_if_str[phyc]);
+ phy_string_for_interface(phyc));
}
#ifdef CONFIG_SYS_SRIO