Skip to contentSkip to conversation

net: phy: micrel: make ksz9021 phy accessible

PATCH New Troy Kisky 4 participants 8 messages Jun 28, 2012 – Jul 11, 2012

Subsystems (2)
lore
Share & tools
lore

Troy Kisky

author
#0 lore raw

PATCH v2 1/1 net: phy: micrel: make ksz9021 phy accessible

Micrel accidentally used the same part number
for the KS8721 and KSZ9021. So, both cannot be
in the same build of u-boot. Add a config option to handle this.

---
v2: add ack

---
 drivers/net/phy/micrel.c        |   15 +++++++++++++--
 include/configs/mx6qsabrelite.h |    1 +
 2 files changed, 14 insertions(+), 2 deletions(-)
drivers/net/phy/micrel.c +13 -2
index e3043df..30f3264 100644
@@ -35,6 +35,12 @@ static struct phy_driver KSZ804_driver = {
 	.shutdown = &genphy_shutdown,
 };
 
+#ifndef CONFIG_PHY_MICREL_KSZ9021
+/*
+ * I can't believe Micrel used the exact same part number
+ * for the KSZ9021
+ * Shame Micrel, Shame!!!!!
+ */
 static struct phy_driver KS8721_driver = {
 	.name = "Micrel KS8721BL",
 	.uid = 0x221610,
@@ -44,7 +50,9 @@ static struct phy_driver KS8721_driver = {
 	.startup = &genphy_startup,
 	.shutdown = &genphy_shutdown,
 };
+#endif
 
+#ifdef CONFIG_PHY_MICREL_KSZ9021
 /* ksz9021 PHY Registers */
 #define MII_KSZ9021_EXTENDED_CTRL	0x0b
 #define MII_KSZ9021_EXTENDED_DATAW	0x0c
@@ -127,12 +135,15 @@ static struct phy_driver ksz9021_driver = {
 	.startup = &ksz9021_startup,
 	.shutdown = &genphy_shutdown,
 };
+#endif
 
 int phy_micrel_init(void)
 {
 	phy_register(&KSZ804_driver);
-	phy_register(&KS8721_driver);
+#ifdef CONFIG_PHY_MICREL_KSZ9021
 	phy_register(&ksz9021_driver);
-
+#else
+	phy_register(&KS8721_driver);
+#endif
 	return 0;
 }
include/configs/mx6qsabrelite.h +1 -0
index feabc05..8623320 100644
@@ -97,6 +97,7 @@
 #define CONFIG_FEC_MXC_PHYADDR		6
 #define CONFIG_PHYLIB
 #define CONFIG_PHY_MICREL
+#define CONFIG_PHY_MICREL_KSZ9021
 
 /* USB Configs */
 #define CONFIG_CMD_USB
Signature · 1 line
1.7.9.5
author
#1 lore raw

PATCH v2 1/1 net: phy: micrel: make ksz9021 phy accessible

Quoted 65 lines · Troy Kisky

Micrel accidentally used the same part number
for the KS8721 and KSZ9021. So, both cannot be
in the same build of u-boot. Add a config option to handle this.

---
v2: add ack

---
  drivers/net/phy/micrel.c        |   15 +++++++++++++--
  include/configs/mx6qsabrelite.h |    1 +
  2 files changed, 14 insertions(+), 2 deletions(-)
drivers/net/phy/micrel.c +13 -2
index e3043df..30f3264 100644
@@ -35,6 +35,12 @@ static struct phy_driver KSZ804_driver = {
  	.shutdown = &genphy_shutdown,
  };
 
+#ifndef CONFIG_PHY_MICREL_KSZ9021
+/*
+ * I can't believe Micrel used the exact same part number
+ * for the KSZ9021
+ * Shame Micrel, Shame!!!!!
+ */
  static struct phy_driver KS8721_driver = {
  	.name = "Micrel KS8721BL",
  	.uid = 0x221610,
@@ -44,7 +50,9 @@ static struct phy_driver KS8721_driver = {
  	.startup = &genphy_startup,
  	.shutdown = &genphy_shutdown,
  };
+#endif
 
+#ifdef CONFIG_PHY_MICREL_KSZ9021
  /* ksz9021 PHY Registers */
  #define MII_KSZ9021_EXTENDED_CTRL	0x0b
  #define MII_KSZ9021_EXTENDED_DATAW	0x0c
@@ -127,12 +135,15 @@ static struct phy_driver ksz9021_driver = {
  	.startup = &ksz9021_startup,
  	.shutdown = &genphy_shutdown,
  };
+#endif
 
  int phy_micrel_init(void)
  {
  	phy_register(&KSZ804_driver);
-	phy_register(&KS8721_driver);
+#ifdef CONFIG_PHY_MICREL_KSZ9021
  	phy_register(&ksz9021_driver);
-
+#else
+	phy_register(&KS8721_driver);
+#endif
  	return 0;
  }
include/configs/mx6qsabrelite.h +0 -0
index feabc05..8623320 100644

include/configs/mx6qsabrelite.h line 103

Quoted 7 lines
include/configs/mx6qsabrelite.h +1 -0
@@ -97,6 +97,7 @@
  #define CONFIG_FEC_MXC_PHYADDR		6
  #define CONFIG_PHYLIB
  #define CONFIG_PHY_MICREL
+#define CONFIG_PHY_MICREL_KSZ9021
 
  /* USB Configs */
  #define CONFIG_CMD_USB

ping....

#2 lore raw

PATCH v2 1/1 net: phy: micrel: make ksz9021 phy accessible

Quoted 71 lines · Troy Kisky
Quoted 70 lines · Troy Kisky

Micrel accidentally used the same part number
for the KS8721 and KSZ9021. So, both cannot be
in the same build of u-boot. Add a config option to handle this.

---
v2: add ack

---
  drivers/net/phy/micrel.c        |   15 +++++++++++++--
  include/configs/mx6qsabrelite.h |    1 +
  2 files changed, 14 insertions(+), 2 deletions(-)
drivers/net/phy/micrel.c +13 -2
index e3043df..30f3264 100644
@@ -35,6 +35,12 @@ static struct phy_driver KSZ804_driver = {
  	.shutdown = &genphy_shutdown,
  };
 
+#ifndef CONFIG_PHY_MICREL_KSZ9021
+/*
+ * I can't believe Micrel used the exact same part number
+ * for the KSZ9021
+ * Shame Micrel, Shame!!!!!
+ */
  static struct phy_driver KS8721_driver = {
  	.name = "Micrel KS8721BL",
  	.uid = 0x221610,
@@ -44,7 +50,9 @@ static struct phy_driver KS8721_driver = {
  	.startup = &genphy_startup,
  	.shutdown = &genphy_shutdown,
  };
+#endif
 
+#ifdef CONFIG_PHY_MICREL_KSZ9021
  /* ksz9021 PHY Registers */
  #define MII_KSZ9021_EXTENDED_CTRL	0x0b
  #define MII_KSZ9021_EXTENDED_DATAW	0x0c
@@ -127,12 +135,15 @@ static struct phy_driver ksz9021_driver = {
  	.startup = &ksz9021_startup,
  	.shutdown = &genphy_shutdown,
  };
+#endif
 
  int phy_micrel_init(void)
  {
  	phy_register(&KSZ804_driver);
-	phy_register(&KS8721_driver);
+#ifdef CONFIG_PHY_MICREL_KSZ9021
  	phy_register(&ksz9021_driver);
-
+#else
+	phy_register(&KS8721_driver);
+#endif
  	return 0;
  }
include/configs/mx6qsabrelite.h +1 -0
index feabc05..8623320 100644
@@ -97,6 +97,7 @@
  #define CONFIG_FEC_MXC_PHYADDR		6
  #define CONFIG_PHYLIB
  #define CONFIG_PHY_MICREL
+#define CONFIG_PHY_MICREL_KSZ9021
 
Quoted 3 lines

include/configs/mx6qsabrelite.h line 103

Quoted 2 lines
include/configs/mx6qsabrelite.h +0 -0
  /* USB Configs */
  #define CONFIG_CMD_USB

ping....

Yes, ping from me, too.

Thanks

Dirk

#3 lore raw

PATCH v2 1/1 net: phy: micrel: make ksz9021 phy accessible

Quoted 35 lines

-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot- bounces at lists.denx.de] On Behalf Of Dirk Behme
Sent: 11 July 2012 12:23
To: u-boot at lists.denx.de; Joe Hershberger
Subject: Re: [U-Boot] [PATCH V2 1/1] net: phy: micrel: make ksz9021 phy accessible

Quoted 24 lines · Troy Kisky
Quoted 23 lines · Troy Kisky

Micrel accidentally used the same part number
for the KS8721 and KSZ9021. So, both cannot be
in the same build of u-boot. Add a config option to handle this.

---
v2: add ack

---
  drivers/net/phy/micrel.c        |   15 +++++++++++++--
  include/configs/mx6qsabrelite.h |    1 +
  2 files changed, 14 insertions(+), 2 deletions(-)
drivers/net/phy/micrel.c +0 -0
index e3043df..30f3264 100644
@@ -35,6 +35,12 @@ static struct phy_driver KSZ804_driver = {
  	.shutdown = &genphy_shutdown,
  };
 
Quoted 5 lines
Quoted 5 lines

drivers/net/phy/micrel.c static struct phy_driver KSZ804_driver = { · line 42

Quoted 5 lines
drivers/net/phy/micrel.c +5 -0
+#ifndef CONFIG_PHY_MICREL_KSZ9021
+/*
+ * I can't believe Micrel used the exact same part number
+ * for the KSZ9021
+ * Shame Micrel, Shame!!!!!

These comments attracted my attention. I doubt these are valid comments that should get mainlined???

Regards...
Prafulla . . .

#4 lore raw

PATCH v2 1/1 net: phy: micrel: make ksz9021 phy accessible

Hi Prafulla,

Quoted 35 lines · Prafulla Wadaskar
Quoted 35 lines

-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot- bounces at lists.denx.de] On Behalf Of Dirk Behme
Sent: 11 July 2012 12:23
To: u-boot at lists.denx.de; Joe Hershberger
Subject: Re: [U-Boot] [PATCH V2 1/1] net: phy: micrel: make ksz9021 phy accessible

Quoted 24 lines · Troy Kisky
Quoted 23 lines · Troy Kisky

Micrel accidentally used the same part number
for the KS8721 and KSZ9021. So, both cannot be
in the same build of u-boot. Add a config option to handle this.

---
v2: add ack

---
  drivers/net/phy/micrel.c        |   15 +++++++++++++--
  include/configs/mx6qsabrelite.h |    1 +
  2 files changed, 14 insertions(+), 2 deletions(-)
drivers/net/phy/micrel.c +0 -0
index e3043df..30f3264 100644
@@ -35,6 +35,12 @@ static struct phy_driver KSZ804_driver = {
   .shutdown = &genphy_shutdown,
  };
 
Quoted 7 lines
Quoted 5 lines
Quoted 5 lines

drivers/net/phy/micrel.c static struct phy_driver KSZ804_driver = { · line 42

Quoted 5 lines
drivers/net/phy/micrel.c +5 -0
+#ifndef CONFIG_PHY_MICREL_KSZ9021
+/*
+ * I can't believe Micrel used the exact same part number
+ * for the KSZ9021
+ * Shame Micrel, Shame!!!!!

These comments attracted my attention. I doubt these are valid comments that should get mainlined???

It's not profane. A little levity is not a big deal IMO. If you feel strongly, we can make a patch to remove it.

Thanks,
-Joe

author
#5 lore raw

PATCH v2 1/1 net: phy: micrel: make ksz9021 phy accessible

In reply to Prafulla Wadaskar
Quoted 41 lines · Prafulla Wadaskar
Quoted 34 lines

-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot- bounces at lists.denx.de] On Behalf Of Dirk Behme
Sent: 11 July 2012 12:23
To: u-boot at lists.denx.de; Joe Hershberger
Subject: Re: [U-Boot] [PATCH V2 1/1] net: phy: micrel: make ksz9021 phy accessible

Quoted 24 lines · Troy Kisky
Quoted 23 lines · Troy Kisky

Micrel accidentally used the same part number
for the KS8721 and KSZ9021. So, both cannot be
in the same build of u-boot. Add a config option to handle this.

---
v2: add ack

---
   drivers/net/phy/micrel.c        |   15 +++++++++++++--
   include/configs/mx6qsabrelite.h |    1 +
   2 files changed, 14 insertions(+), 2 deletions(-)
drivers/net/phy/micrel.c +0 -0
index e3043df..30f3264 100644
@@ -35,6 +35,12 @@ static struct phy_driver KSZ804_driver = {
   	.shutdown = &genphy_shutdown,
   };
 
Quoted 5 lines
Quoted 5 lines

drivers/net/phy/micrel.c static struct phy_driver KSZ804_driver = { · line 42

Quoted 5 lines
drivers/net/phy/micrel.c +5 -0
+#ifndef CONFIG_PHY_MICREL_KSZ9021
+/*
+ * I can't believe Micrel used the exact same part number
+ * for the KSZ9021
+ * Shame Micrel, Shame!!!!!

These comments attracted my attention. I doubt these are valid comments that should get mainlined???

Quoted 3 lines

Regards...
Prafulla . . .

Yeah, I was a little pissed when I found this problem. Joe, do you want me to tone down the language?
I still think Micrel should be very embarrassed to have done such a thing.

Thanks
Troy

#6 lore raw

PATCH v2 1/1 net: phy: micrel: make ksz9021 phy accessible

Hi Troy,

Quoted 47 lines · Troy Kisky
Quoted 46 lines · Prafulla Wadaskar
Quoted 37 lines

-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot- bounces at lists.denx.de] On Behalf Of Dirk Behme
Sent: 11 July 2012 12:23
To: u-boot at lists.denx.de; Joe Hershberger
Subject: Re: [U-Boot] [PATCH V2 1/1] net: phy: micrel: make ksz9021 phy accessible

Quoted 26 lines · Troy Kisky
Quoted 24 lines · Troy Kisky

Micrel accidentally used the same part number
for the KS8721 and KSZ9021. So, both cannot be
in the same build of u-boot. Add a config option to handle this.

---
v2: add ack

---
   drivers/net/phy/micrel.c        |   15 +++++++++++++--
   include/configs/mx6qsabrelite.h |    1 +
   2 files changed, 14 insertions(+), 2 deletions(-)
drivers/net/phy/micrel.c +0 -0
index e3043df..30f3264 100644
@@ -35,6 +35,12 @@ static struct phy_driver KSZ804_driver = {
        .shutdown = &genphy_shutdown,
   };
 
Quoted 5 lines
Quoted 5 lines

drivers/net/phy/micrel.c static struct phy_driver KSZ804_driver = { · line 42

Quoted 5 lines
drivers/net/phy/micrel.c +5 -0
+#ifndef CONFIG_PHY_MICREL_KSZ9021
+/*
+ * I can't believe Micrel used the exact same part number
+ * for the KSZ9021
+ * Shame Micrel, Shame!!!!!

These comments attracted my attention. I doubt these are valid comments that should get mainlined???

Quoted 6 lines
Quoted 3 lines

Regards...
Prafulla . . .

Yeah, I was a little pissed when I found this problem. Joe, do you want me to tone down the language?
I still think Micrel should be very embarrassed to have done such a thing.

I don't care either way. I already applied it, so if you or others care to change it, submit it as a patch on top.

Thanks,
-Joe