mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-08-14 17:26:15 -04:00
NET: Cosmetic changes
Signed-off-by: Larry Johnson <lrj@acm.org> Signed-off-by: Ben Warren <bwarren@qstreams.com>
This commit is contained in:
parent
881cf02f47
commit
298035df49
@ -87,15 +87,16 @@ void miiphy_register(char *name,
|
|||||||
list_for_each (entry, &mii_devs) {
|
list_for_each (entry, &mii_devs) {
|
||||||
miidev = list_entry (entry, struct mii_dev, link);
|
miidev = list_entry (entry, struct mii_dev, link);
|
||||||
if (strcmp (miidev->name, name) == 0) {
|
if (strcmp (miidev->name, name) == 0) {
|
||||||
printf("miiphy_register: non unique device name '%s'\n",
|
printf ("miiphy_register: non unique device name "
|
||||||
name);
|
"'%s'\n", name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* allocate memory */
|
/* allocate memory */
|
||||||
name_len = strlen (name);
|
name_len = strlen (name);
|
||||||
new_dev = (struct mii_dev *)malloc(sizeof(struct mii_dev) + name_len + 1);
|
new_dev =
|
||||||
|
(struct mii_dev *)malloc (sizeof (struct mii_dev) + name_len + 1);
|
||||||
|
|
||||||
if (new_dev == NULL) {
|
if (new_dev == NULL) {
|
||||||
printf ("miiphy_register: cannot allocate memory for '%s'\n",
|
printf ("miiphy_register: cannot allocate memory for '%s'\n",
|
||||||
@ -242,7 +243,6 @@ void miiphy_listdev(void)
|
|||||||
printf ("Current device: '%s'\n", current_mii->name);
|
printf ("Current device: '%s'\n", current_mii->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
||||||
* Read the OUI, manufacture's model number, and revision number.
|
* Read the OUI, manufacture's model number, and revision number.
|
||||||
@ -254,9 +254,7 @@ void miiphy_listdev(void)
|
|||||||
* Returns:
|
* Returns:
|
||||||
* 0 on success
|
* 0 on success
|
||||||
*/
|
*/
|
||||||
int miiphy_info (char *devname,
|
int miiphy_info (char *devname, unsigned char addr, unsigned int *oui,
|
||||||
unsigned char addr,
|
|
||||||
unsigned int *oui,
|
|
||||||
unsigned char *model, unsigned char *rev)
|
unsigned char *model, unsigned char *rev)
|
||||||
{
|
{
|
||||||
unsigned int reg = 0;
|
unsigned int reg = 0;
|
||||||
@ -294,7 +292,6 @@ int miiphy_info (char *devname,
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
||||||
* Reset the PHY.
|
* Reset the PHY.
|
||||||
@ -345,7 +342,6 @@ int miiphy_reset (char *devname, unsigned char addr)
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
||||||
* Determine the ethernet speed (10/100).
|
* Determine the ethernet speed (10/100).
|
||||||
@ -359,7 +355,8 @@ int miiphy_speed (char *devname, unsigned char addr)
|
|||||||
printf ("PHY 1000BT Status read failed\n");
|
printf ("PHY 1000BT Status read failed\n");
|
||||||
} else {
|
} else {
|
||||||
if (reg != 0xFFFF) {
|
if (reg != 0xFFFF) {
|
||||||
if ((reg & (PHY_1000BTSR_1000FD | PHY_1000BTSR_1000HD)) !=0) {
|
if ((reg & (PHY_1000BTSR_1000FD | PHY_1000BTSR_1000HD))
|
||||||
|
!= 0) {
|
||||||
return (_1000BASET);
|
return (_1000BASET);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -393,7 +390,6 @@ int miiphy_speed (char *devname, unsigned char addr)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
||||||
* Determine full/half duplex.
|
* Determine full/half duplex.
|
||||||
@ -469,5 +465,4 @@ int miiphy_link (char *devname, unsigned char addr)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* CONFIG_MII */
|
#endif /* CONFIG_MII */
|
||||||
|
@ -26,14 +26,6 @@
|
|||||||
|
|
|
|
||||||
| Author: Mark Wisner
|
| Author: Mark Wisner
|
||||||
|
|
|
|
||||||
| Change Activity-
|
|
||||||
|
|
|
||||||
| Date Description of Change BY
|
|
||||||
| --------- --------------------- ---
|
|
||||||
| 04-May-99 Created MKW
|
|
||||||
| 07-Jul-99 Added full duplex support MKW
|
|
||||||
| 08-Sep-01 Tweaks gvb
|
|
||||||
|
|
|
||||||
+----------------------------------------------------------------------------*/
|
+----------------------------------------------------------------------------*/
|
||||||
#ifndef _miiphy_h_
|
#ifndef _miiphy_h_
|
||||||
#define _miiphy_h_
|
#define _miiphy_h_
|
||||||
@ -149,7 +141,7 @@ int bb_miiphy_write (char *devname, unsigned char addr,
|
|||||||
#define PHY_ANLPAR_PSB_802_3 0x0001
|
#define PHY_ANLPAR_PSB_802_3 0x0001
|
||||||
#define PHY_ANLPAR_PSB_802_9 0x0002
|
#define PHY_ANLPAR_PSB_802_9 0x0002
|
||||||
|
|
||||||
/* PHY_1000BTSR */
|
/* phy 1000BTSR */
|
||||||
#define PHY_1000BTSR_MSCF 0x8000
|
#define PHY_1000BTSR_MSCF 0x8000
|
||||||
#define PHY_1000BTSR_MSCR 0x4000
|
#define PHY_1000BTSR_MSCR 0x4000
|
||||||
#define PHY_1000BTSR_LRS 0x2000
|
#define PHY_1000BTSR_LRS 0x2000
|
||||||
|
Loading…
x
Reference in New Issue
Block a user