* [PATCH 1/6] 82xx: Add the support of Wind River SBC PowerQUICCII 82xx
@ 2007-06-08 8:48 Mark Zhan
2007-06-08 12:43 ` Kumar Gala
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Mark Zhan @ 2007-06-08 8:48 UTC (permalink / raw)
To: paulus@samba.org; +Cc: linuxppc-dev@ozlabs.org
Current MII bitbang bus driver hard-codes the phy mask of mii_bus to
~0x09, which is actually specific for the FSL boards. This patch will
make the bitbang driver to generate MII bus phy_mask dynamically.
Signed-off-by: Mark Zhan <rongkai.zhan@windriver.com>
---
b/drivers/net/fs_enet/mii-bitbang.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/net/fs_enet/mii-bitbang.c
b/drivers/net/fs_enet/mii-bitbang.c
index d384010..3732d69 100644
--- a/drivers/net/fs_enet/mii-bitbang.c
+++ b/drivers/net/fs_enet/mii-bitbang.c
@@ -315,7 +315,7 @@ static int __devinit fs_enet_mdio_probe(
struct fs_mii_bb_platform_info *pdata;
struct mii_bus *new_bus;
struct bb_info *bitbang;
- int err = 0;
+ int i, err = 0;
if (NULL == dev)
return -EINVAL;
@@ -336,14 +336,17 @@ static int __devinit fs_enet_mdio_probe(
new_bus->reset = &fs_enet_mii_bb_reset,
new_bus->id = pdev->id;
- new_bus->phy_mask = ~0x9;
pdata = (struct fs_mii_bb_platform_info *)pdev->dev.platform_data;
-
if (NULL == pdata) {
printk(KERN_ERR "gfar mdio %d: Missing platform data!\n", pdev->id);
return -ENODEV;
}
+ new_bus->phy_mask = 0xFFFFFFFF;
+ for (i = 0; i < PHY_MAX_ADDR; i++)
+ if (pdata->irq[i] != -1)
+ new_bus->phy_mask &= ~(1 << i);
+
/*set up workspace*/
fs_mii_bitbang_init(bitbang, pdata);
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 1/6] 82xx: Add the support of Wind River SBC PowerQUICCII 82xx
@ 2007-06-08 12:19 Mark Zhan
0 siblings, 0 replies; 5+ messages in thread
From: Mark Zhan @ 2007-06-08 12:19 UTC (permalink / raw)
To: paulus@samba.org; +Cc: linuxppc-dev@ozlabs.org
Current MII bitbang bus driver hard-codes the phy mask of mii_bus to
~0x09, which is actually specific for the FSL boards. This patch will
make the bitbang driver to generate MII bus phy_mask dynamically.
Signed-off-by: Mark Zhan <rongkai.zhan@windriver.com>
---
b/drivers/net/fs_enet/mii-bitbang.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/net/fs_enet/mii-bitbang.c
b/drivers/net/fs_enet/mii-bitbang.c
index d384010..3732d69 100644
--- a/drivers/net/fs_enet/mii-bitbang.c
+++ b/drivers/net/fs_enet/mii-bitbang.c
@@ -315,7 +315,7 @@ static int __devinit fs_enet_mdio_probe(
struct fs_mii_bb_platform_info *pdata;
struct mii_bus *new_bus;
struct bb_info *bitbang;
- int err = 0;
+ int i, err = 0;
if (NULL == dev)
return -EINVAL;
@@ -336,14 +336,17 @@ static int __devinit fs_enet_mdio_probe(
new_bus->reset = &fs_enet_mii_bb_reset,
new_bus->id = pdev->id;
- new_bus->phy_mask = ~0x9;
pdata = (struct fs_mii_bb_platform_info *)pdev->dev.platform_data;
-
if (NULL == pdata) {
printk(KERN_ERR "gfar mdio %d: Missing platform data!\n", pdev->id);
return -ENODEV;
}
+ new_bus->phy_mask = 0xFFFFFFFF;
+ for (i = 0; i < PHY_MAX_ADDR; i++)
+ if (pdata->irq[i] != -1)
+ new_bus->phy_mask &= ~(1 << i);
+
/*set up workspace*/
fs_mii_bitbang_init(bitbang, pdata);
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/6] 82xx: Add the support of Wind River SBC PowerQUICCII 82xx
2007-06-08 8:48 [PATCH 1/6] 82xx: Add the support of Wind River SBC PowerQUICCII 82xx Mark Zhan
@ 2007-06-08 12:43 ` Kumar Gala
2007-06-09 15:08 ` Vitaly Bordug
2007-06-11 21:02 ` Scott Wood
2 siblings, 0 replies; 5+ messages in thread
From: Kumar Gala @ 2007-06-08 12:43 UTC (permalink / raw)
To: Mark Zhan; +Cc: linuxppc-dev@ozlabs.org, paulus@samba.org
On Jun 8, 2007, at 3:48 AM, Mark Zhan wrote:
> Current MII bitbang bus driver hard-codes the phy mask of mii_bus to
> ~0x09, which is actually specific for the FSL boards. This patch will
> make the bitbang driver to generate MII bus phy_mask dynamically.
Your patch subject's should be unique in a patch series, they all
shouldn't be 'add support for ...'
Also, this patch should be going via netdev and probably CC'd to
Vitaly Bordug.
- k
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/6] 82xx: Add the support of Wind River SBC PowerQUICCII 82xx
2007-06-08 8:48 [PATCH 1/6] 82xx: Add the support of Wind River SBC PowerQUICCII 82xx Mark Zhan
2007-06-08 12:43 ` Kumar Gala
@ 2007-06-09 15:08 ` Vitaly Bordug
2007-06-11 21:02 ` Scott Wood
2 siblings, 0 replies; 5+ messages in thread
From: Vitaly Bordug @ 2007-06-09 15:08 UTC (permalink / raw)
To: Mark Zhan; +Cc: linuxppc-dev@ozlabs.org, paulus@samba.org
On Fri, 08 Jun 2007 16:48:53 +0800
Mark Zhan <rongkai.zhan@windriver.com> wrote:
> Current MII bitbang bus driver hard-codes the phy mask of mii_bus to
> ~0x09, which is actually specific for the FSL boards. This patch will
> make the bitbang driver to generate MII bus phy_mask dynamically.
>
Please send this to netdev, CC me.
Of course since subject goes into SCM, it should be individual
and reflect briefly the nature of the specific change.
> Signed-off-by: Mark Zhan <rongkai.zhan@windriver.com>
> ---
--
Sincerely,
Vitaly
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/6] 82xx: Add the support of Wind River SBC PowerQUICCII 82xx
2007-06-08 8:48 [PATCH 1/6] 82xx: Add the support of Wind River SBC PowerQUICCII 82xx Mark Zhan
2007-06-08 12:43 ` Kumar Gala
2007-06-09 15:08 ` Vitaly Bordug
@ 2007-06-11 21:02 ` Scott Wood
2 siblings, 0 replies; 5+ messages in thread
From: Scott Wood @ 2007-06-11 21:02 UTC (permalink / raw)
To: Mark Zhan; +Cc: linuxppc-dev@ozlabs.org, paulus@samba.org
On Fri, Jun 08, 2007 at 04:48:53PM +0800, Mark Zhan wrote:
> + new_bus->phy_mask = 0xFFFFFFFF;
> + for (i = 0; i < PHY_MAX_ADDR; i++)
> + if (pdata->irq[i] != -1)
> + new_bus->phy_mask &= ~(1 << i);
> +
This assumes that all PHYs have an IRQ.
I have patches forthcoming to of_platform-ize this code when
CONFIG_PPC_MERGE is defined; phy_mask will be set properly then.
Though, I notice that this is the only driver that sets phy_mask. Is
there any reason we can't just leave the mask clear, and let the probe
for non-existent phys fail?
-Scott
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-06-11 21:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-08 8:48 [PATCH 1/6] 82xx: Add the support of Wind River SBC PowerQUICCII 82xx Mark Zhan
2007-06-08 12:43 ` Kumar Gala
2007-06-09 15:08 ` Vitaly Bordug
2007-06-11 21:02 ` Scott Wood
-- strict thread matches above, loose matches on Subject: below --
2007-06-08 12:19 Mark Zhan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).