summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorTimur Tabi <timur@freescale.com>2012-08-14 06:47:24 +0000
committerAndy Fleming <afleming@freescale.com>2012-08-23 10:24:19 -0500
commit4376b4c00e7ff81d950410a5fffe1e4c495e42d3 (patch)
tree46b6319181d004e7c39fa042708b44a651822866 /drivers/net
parent45b092d3010caa8d9a1f8c4f89afcbb6c5e5bee6 (diff)
downloadu-boot-imx-4376b4c00e7ff81d950410a5fffe1e4c495e42d3.zip
u-boot-imx-4376b4c00e7ff81d950410a5fffe1e4c495e42d3.tar.gz
u-boot-imx-4376b4c00e7ff81d950410a5fffe1e4c495e42d3.tar.bz2
fm-eth: use fdt_status_disabled() function in ft_fixup_port()
We have a dedicated function for setting the node status now, so use it. Also improve a comment and fix the type of the phandle variable. Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Andy Fleming <afleming@freescale.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/fm/init.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/fm/init.c b/drivers/net/fm/init.c
index 8a5311c..736b8b9 100644
--- a/drivers/net/fm/init.c
+++ b/drivers/net/fm/init.c
@@ -200,7 +200,8 @@ void board_ft_fman_fixup_port(void *blob, char * prop, phys_addr_t pa,
static void ft_fixup_port(void *blob, struct fm_eth_info *info, char *prop)
{
- int off, ph;
+ int off;
+ uint32_t ph;
phys_addr_t paddr = CONFIG_SYS_CCSRBAR_PHYS + info->compat_offset;
u64 dtsec1_addr = (u64)CONFIG_SYS_CCSRBAR_PHYS +
CONFIG_SYS_FSL_FM1_DTSEC1_OFFSET;
@@ -217,12 +218,10 @@ static void ft_fixup_port(void *blob, struct fm_eth_info *info, char *prop)
off = fdt_node_offset_by_compat_reg(blob, prop, paddr);
/* Don't disable FM1-DTSEC1 MAC as its used for MDIO */
- if (paddr != dtsec1_addr) {
- /* disable the mac node */
- fdt_setprop_string(blob, off, "status", "disabled");
- }
+ if (paddr != dtsec1_addr)
+ fdt_status_disabled(blob, off); /* disable the MAC node */
- /* disable the node point to the mac */
+ /* disable the fsl,dpa-ethernet node that points to the MAC */
ph = fdt_get_phandle(blob, off);
do_fixup_by_prop(blob, "fsl,fman-mac", &ph, sizeof(ph),
"status", "disabled", strlen("disabled") + 1, 1);