summaryrefslogtreecommitdiff
path: root/drivers/net/phy/miiphybb.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2009-07-23 19:20:26 +0200
committerWolfgang Denk <wd@denx.de>2009-07-23 19:20:26 +0200
commit4fb799aeafa71c4e6caacd3acdc4a4547cfbd5d4 (patch)
tree6c49be563c2bcf3d24af9279493a054b613999ff /drivers/net/phy/miiphybb.c
parentb201171f2b4d509f3ad510b214bee70ff902e3d6 (diff)
parent97cfe86163505ea18e7ff7b71e78df5bb03dad57 (diff)
downloadu-boot-imx-4fb799aeafa71c4e6caacd3acdc4a4547cfbd5d4.zip
u-boot-imx-4fb799aeafa71c4e6caacd3acdc4a4547cfbd5d4.tar.gz
u-boot-imx-4fb799aeafa71c4e6caacd3acdc4a4547cfbd5d4.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot-net
Diffstat (limited to 'drivers/net/phy/miiphybb.c')
-rw-r--r--drivers/net/phy/miiphybb.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/phy/miiphybb.c b/drivers/net/phy/miiphybb.c
index e3c163a..b77c917 100644
--- a/drivers/net/phy/miiphybb.c
+++ b/drivers/net/phy/miiphybb.c
@@ -127,6 +127,11 @@ int bb_miiphy_read (char *devname, unsigned char addr,
volatile ioport_t *iop = ioport_addr ((immap_t *) CONFIG_SYS_IMMR, MDIO_PORT);
#endif
+ if (value == NULL) {
+ puts("NULL value pointer\n");
+ return (-1);
+ }
+
miiphy_pre (1, addr, reg);
/* tri-state our MDIO I/O pin so we can read */
@@ -145,6 +150,8 @@ int bb_miiphy_read (char *devname, unsigned char addr,
MDC (1);
MIIDELAY;
}
+ /* There is no PHY, set value to 0xFFFF and return */
+ *value = 0xFFFF;
return (-1);
}