[U-Boot] [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.
Signed-off-by: Troy Kisky troy.kisky@boundarydevices.com Acked-by: Vladimir Zapolskiy vz@mleia.com
--- v2: add ack --- drivers/net/phy/micrel.c | 15 +++++++++++++-- include/configs/mx6qsabrelite.h | 1 + 2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index e3043df..30f3264 100644 --- a/drivers/net/phy/micrel.c +++ b/drivers/net/phy/micrel.c @@ -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; } diff --git a/include/configs/mx6qsabrelite.h b/include/configs/mx6qsabrelite.h index feabc05..8623320 100644 --- a/include/configs/mx6qsabrelite.h +++ b/include/configs/mx6qsabrelite.h @@ -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

On 6/28/2012 11:00 AM, Troy Kisky wrote:
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.
Signed-off-by: Troy Kisky troy.kisky@boundarydevices.com Acked-by: Vladimir Zapolskiy vz@mleia.com
v2: add ack
drivers/net/phy/micrel.c | 15 +++++++++++++-- include/configs/mx6qsabrelite.h | 1 + 2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index e3043df..30f3264 100644 --- a/drivers/net/phy/micrel.c +++ b/drivers/net/phy/micrel.c @@ -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; } diff --git a/include/configs/mx6qsabrelite.h b/include/configs/mx6qsabrelite.h index feabc05..8623320 100644 --- a/include/configs/mx6qsabrelite.h +++ b/include/configs/mx6qsabrelite.h @@ -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....

On 11.07.2012 02:53, Troy Kisky wrote:
On 6/28/2012 11:00 AM, Troy Kisky wrote:
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.
Signed-off-by: Troy Kisky troy.kisky@boundarydevices.com Acked-by: Vladimir Zapolskiy vz@mleia.com
v2: add ack
drivers/net/phy/micrel.c | 15 +++++++++++++-- include/configs/mx6qsabrelite.h | 1 + 2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index e3043df..30f3264 100644 --- a/drivers/net/phy/micrel.c +++ b/drivers/net/phy/micrel.c @@ -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; } diff --git a/include/configs/mx6qsabrelite.h b/include/configs/mx6qsabrelite.h index feabc05..8623320 100644 --- a/include/configs/mx6qsabrelite.h +++ b/include/configs/mx6qsabrelite.h @@ -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....
Yes, ping from me, too.
Thanks
Dirk

-----Original Message----- From: u-boot-bounces@lists.denx.de [mailto:u-boot- bounces@lists.denx.de] On Behalf Of Dirk Behme Sent: 11 July 2012 12:23 To: u-boot@lists.denx.de; Joe Hershberger Subject: Re: [U-Boot] [PATCH V2 1/1] net: phy: micrel: make ksz9021 phy accessible
On 11.07.2012 02:53, Troy Kisky wrote:
On 6/28/2012 11:00 AM, Troy Kisky wrote:
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.
Signed-off-by: Troy Kisky troy.kisky@boundarydevices.com Acked-by: Vladimir Zapolskiy vz@mleia.com
v2: add ack
drivers/net/phy/micrel.c | 15 +++++++++++++-- include/configs/mx6qsabrelite.h | 1 + 2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index e3043df..30f3264 100644 --- a/drivers/net/phy/micrel.c +++ b/drivers/net/phy/micrel.c @@ -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!!!!!
These comments attracted my attention. I doubt these are valid comments that should get mainlined???
Regards... Prafulla . . .

Hi Prafulla,
On Wed, Jul 11, 2012 at 3:28 AM, Prafulla Wadaskar prafulla@marvell.com wrote:
-----Original Message----- From: u-boot-bounces@lists.denx.de [mailto:u-boot- bounces@lists.denx.de] On Behalf Of Dirk Behme Sent: 11 July 2012 12:23 To: u-boot@lists.denx.de; Joe Hershberger Subject: Re: [U-Boot] [PATCH V2 1/1] net: phy: micrel: make ksz9021 phy accessible
On 11.07.2012 02:53, Troy Kisky wrote:
On 6/28/2012 11:00 AM, Troy Kisky wrote:
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.
Signed-off-by: Troy Kisky troy.kisky@boundarydevices.com Acked-by: Vladimir Zapolskiy vz@mleia.com
v2: add ack
drivers/net/phy/micrel.c | 15 +++++++++++++-- include/configs/mx6qsabrelite.h | 1 + 2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index e3043df..30f3264 100644 --- a/drivers/net/phy/micrel.c +++ b/drivers/net/phy/micrel.c @@ -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!!!!!
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

On 7/11/2012 1:28 AM, Prafulla Wadaskar wrote:
-----Original Message----- From: u-boot-bounces@lists.denx.de [mailto:u-boot- bounces@lists.denx.de] On Behalf Of Dirk Behme Sent: 11 July 2012 12:23 To: u-boot@lists.denx.de; Joe Hershberger Subject: Re: [U-Boot] [PATCH V2 1/1] net: phy: micrel: make ksz9021 phy accessible
On 11.07.2012 02:53, Troy Kisky wrote:
On 6/28/2012 11:00 AM, Troy Kisky wrote:
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.
Signed-off-by: Troy Kisky troy.kisky@boundarydevices.com Acked-by: Vladimir Zapolskiy vz@mleia.com
v2: add ack
drivers/net/phy/micrel.c | 15 +++++++++++++-- include/configs/mx6qsabrelite.h | 1 + 2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index e3043df..30f3264 100644 --- a/drivers/net/phy/micrel.c +++ b/drivers/net/phy/micrel.c @@ -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!!!!!
These comments attracted my attention. I doubt these are valid comments that should get mainlined???
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

Hi Troy,
On Wed, Jul 11, 2012 at 1:54 PM, Troy Kisky troy.kisky@boundarydevices.com wrote:
On 7/11/2012 1:28 AM, Prafulla Wadaskar wrote:
-----Original Message----- From: u-boot-bounces@lists.denx.de [mailto:u-boot- bounces@lists.denx.de] On Behalf Of Dirk Behme Sent: 11 July 2012 12:23 To: u-boot@lists.denx.de; Joe Hershberger Subject: Re: [U-Boot] [PATCH V2 1/1] net: phy: micrel: make ksz9021 phy accessible
On 11.07.2012 02:53, Troy Kisky wrote:
On 6/28/2012 11:00 AM, Troy Kisky wrote:
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.
Signed-off-by: Troy Kisky troy.kisky@boundarydevices.com Acked-by: Vladimir Zapolskiy vz@mleia.com
v2: add ack
drivers/net/phy/micrel.c | 15 +++++++++++++-- include/configs/mx6qsabrelite.h | 1 + 2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index e3043df..30f3264 100644 --- a/drivers/net/phy/micrel.c +++ b/drivers/net/phy/micrel.c @@ -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!!!!!
These comments attracted my attention. I doubt these are valid comments that should get mainlined???
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

Hi Troy Kisky,
On Thu, Jun 28, 2012 at 1:00 PM, Troy Kisky troy.kisky@boundarydevices.com wrote:
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.
Signed-off-by: Troy Kisky troy.kisky@boundarydevices.com Acked-by: Vladimir Zapolskiy vz@mleia.com
Applied to next, thanks.
-Joe
participants (4)
-
Dirk Behme
-
Joe Hershberger
-
Prafulla Wadaskar
-
Troy Kisky