Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 287994
b: refs/heads/master
c: e3e09f2
h: refs/heads/master
v: v3
  • Loading branch information
Giuseppe CAVALLARO authored and David S. Miller committed Feb 23, 2012
1 parent 626bb88 commit 9e89c22
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b8e3995af4c7da7707b1710332a31f66e06b74dc
refs/heads/master: e3e09f2645b435062a34a2587a32ae8e5a5b48ab
31 changes: 17 additions & 14 deletions trunk/drivers/net/phy/icplus.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@
#include <asm/irq.h>
#include <asm/uaccess.h>

MODULE_DESCRIPTION("ICPlus IP175C/IP101A/IC1001 PHY drivers");
MODULE_DESCRIPTION("ICPlus IP175C/IP101A/IP101G/IC1001 PHY drivers");
MODULE_AUTHOR("Michael Barkowski");
MODULE_LICENSE("GPL");

/* IP101A/IP1001 */
#define IP10XX_SPEC_CTRL_STATUS 16 /* Spec. Control Register */
#define IP1001_SPEC_CTRL_STATUS_2 20 /* IP1001 Spec. Control Reg 2 */
#define IP1001_PHASE_SEL_MASK 3 /* IP1001 RX/TXPHASE_SEL */
#define IP1001_APS_ON 11 /* IP1001 APS Mode bit */
#define IP101A_APS_ON 2 /* IP101A APS Mode bit */
/* IP101A/G - IP1001 */
#define IP10XX_SPEC_CTRL_STATUS 16 /* Spec. Control Register */
#define IP1001_SPEC_CTRL_STATUS_2 20 /* IP1001 Spec. Control Reg 2 */
#define IP1001_PHASE_SEL_MASK 3 /* IP1001 RX/TXPHASE_SEL */
#define IP1001_APS_ON 11 /* IP1001 APS Mode bit */
#define IP101A_G_APS_ON 2 /* IP101A/G APS Mode bit */

static int ip175c_config_init(struct phy_device *phydev)
{
Expand Down Expand Up @@ -151,7 +151,7 @@ static int ip1001_config_init(struct phy_device *phydev)
return 0;
}

static int ip101a_config_init(struct phy_device *phydev)
static int ip101a_g_config_init(struct phy_device *phydev)
{
int c;

Expand All @@ -161,7 +161,7 @@ static int ip101a_config_init(struct phy_device *phydev)

/* Enable Auto Power Saving mode */
c = phy_read(phydev, IP10XX_SPEC_CTRL_STATUS);
c |= IP101A_APS_ON;
c |= IP101A_G_APS_ON;
return c;
}

Expand Down Expand Up @@ -203,6 +203,7 @@ static struct phy_driver ip1001_driver = {
.phy_id_mask = 0x0ffffff0,
.features = PHY_GBIT_FEATURES | SUPPORTED_Pause |
SUPPORTED_Asym_Pause,
.flags = PHY_HAS_INTERRUPT,
.config_init = &ip1001_config_init,
.config_aneg = &genphy_config_aneg,
.read_status = &genphy_read_status,
Expand All @@ -211,13 +212,14 @@ static struct phy_driver ip1001_driver = {
.driver = { .owner = THIS_MODULE,},
};

static struct phy_driver ip101a_driver = {
static struct phy_driver ip101a_g_driver = {
.phy_id = 0x02430c54,
.name = "ICPlus IP101A",
.name = "ICPlus IP101A/G",
.phy_id_mask = 0x0ffffff0,
.features = PHY_BASIC_FEATURES | SUPPORTED_Pause |
SUPPORTED_Asym_Pause,
.config_init = &ip101a_config_init,
.flags = PHY_HAS_INTERRUPT,
.config_init = &ip101a_g_config_init,
.config_aneg = &genphy_config_aneg,
.read_status = &genphy_read_status,
.suspend = genphy_suspend,
Expand All @@ -233,7 +235,7 @@ static int __init icplus_init(void)
if (ret < 0)
return -ENODEV;

ret = phy_driver_register(&ip101a_driver);
ret = phy_driver_register(&ip101a_g_driver);
if (ret < 0)
return -ENODEV;

Expand All @@ -243,7 +245,7 @@ static int __init icplus_init(void)
static void __exit icplus_exit(void)
{
phy_driver_unregister(&ip1001_driver);
phy_driver_unregister(&ip101a_driver);
phy_driver_unregister(&ip101a_g_driver);
phy_driver_unregister(&ip175c_driver);
}

Expand All @@ -253,6 +255,7 @@ module_exit(icplus_exit);
static struct mdio_device_id __maybe_unused icplus_tbl[] = {
{ 0x02430d80, 0x0ffffff0 },
{ 0x02430d90, 0x0ffffff0 },
{ 0x02430c54, 0x0ffffff0 },
{ }
};

Expand Down

0 comments on commit 9e89c22

Please sign in to comment.