* [PATCH] net/fsl_pq_mdio: add support for the Fman 1G MDIO controller
@ 2012-08-23 21:24 Timur Tabi
2012-08-24 20:24 ` [linuxppc-release] " Timur Tabi
0 siblings, 1 reply; 5+ messages in thread
From: Timur Tabi @ 2012-08-23 21:24 UTC (permalink / raw)
To: Andy Fleming, David Miller, netdev
The MDIO controller on the Frame Manager (Fman) is compatible with the
QE and Gianfar MDIO controllers, but we don't care about the TBI because
the Ethernet drivers (FMD) take care of programming it.
Signed-off-by: Timur Tabi <timur@freescale.com>
---
drivers/net/ethernet/freescale/fsl_pq_mdio.c | 36 ++++++++++++++++----------
1 files changed, 22 insertions(+), 14 deletions(-)
diff --git a/drivers/net/ethernet/freescale/fsl_pq_mdio.c b/drivers/net/ethernet/freescale/fsl_pq_mdio.c
index 9527b28..3af87cb 100644
--- a/drivers/net/ethernet/freescale/fsl_pq_mdio.c
+++ b/drivers/net/ethernet/freescale/fsl_pq_mdio.c
@@ -264,7 +264,7 @@ static int fsl_pq_mdio_probe(struct platform_device *ofdev)
struct fsl_pq_mdio_priv *priv;
struct fsl_pq_mdio __iomem *regs = NULL;
void __iomem *map;
- u32 __iomem *tbipa;
+ u32 __iomem *tbipa = NULL;
struct mii_bus *new_bus;
int tbiaddr = -1;
const u32 *addrp;
@@ -310,6 +310,7 @@ static int fsl_pq_mdio_probe(struct platform_device *ofdev)
if (of_device_is_compatible(np, "fsl,gianfar-mdio") ||
of_device_is_compatible(np, "fsl,gianfar-tbi") ||
+ of_device_is_compatible(np, "fsl,fman-mdio") ||
of_device_is_compatible(np, "fsl,ucc-mdio") ||
of_device_is_compatible(np, "ucc_geth_phy"))
map -= offsetof(struct fsl_pq_mdio, miimcfg);
@@ -350,27 +351,31 @@ static int fsl_pq_mdio_probe(struct platform_device *ofdev)
mii_mng_master = id;
ucc_set_qe_mux_mii_mng(id - 1);
}
+ } else if (of_device_is_compatible(np, "fsl,fman-mdio")) {
+ /* No TBI operations needed for Fman, but don't fail either */
} else {
err = -ENODEV;
goto err_free_irqs;
}
- for_each_child_of_node(np, tbi) {
- if (!strncmp(tbi->type, "tbi-phy", 8))
- break;
- }
+ if (tbipa) {
+ for_each_child_of_node(np, tbi) {
+ if (!strncmp(tbi->type, "tbi-phy", 8))
+ break;
+ }
- if (tbi) {
- const u32 *prop = of_get_property(tbi, "reg", NULL);
+ if (tbi) {
+ const u32 *prop = of_get_property(tbi, "reg", NULL);
- if (prop)
- tbiaddr = *prop;
+ if (prop)
+ tbiaddr = be32_to_cpup(prop);
- if (tbiaddr == -1) {
- err = -EBUSY;
- goto err_free_irqs;
- } else {
- out_be32(tbipa, tbiaddr);
+ if (tbiaddr == -1) {
+ err = -EBUSY;
+ goto err_free_irqs;
+ } else {
+ out_be32(tbipa, tbiaddr);
+ }
}
}
@@ -437,6 +442,9 @@ static struct of_device_id fsl_pq_mdio_match[] = {
{
.compatible = "fsl,etsec2-mdio",
},
+ {
+ .compatible = "fsl,fman-mdio",
+ },
{},
};
MODULE_DEVICE_TABLE(of, fsl_pq_mdio_match);
--
1.7.3.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [linuxppc-release] [PATCH] net/fsl_pq_mdio: add support for the Fman 1G MDIO controller
2012-08-23 21:24 [PATCH] net/fsl_pq_mdio: add support for the Fman 1G MDIO controller Timur Tabi
@ 2012-08-24 20:24 ` Timur Tabi
2012-08-24 20:25 ` David Miller
0 siblings, 1 reply; 5+ messages in thread
From: Timur Tabi @ 2012-08-24 20:24 UTC (permalink / raw)
To: Andy Fleming, David Miller, netdev
Timur Tabi wrote:
> The MDIO controller on the Frame Manager (Fman) is compatible with the
> QE and Gianfar MDIO controllers, but we don't care about the TBI because
> the Ethernet drivers (FMD) take care of programming it.
>
> Signed-off-by: Timur Tabi <timur@freescale.com>
This patch isn't quite right. I'll post a new version soon.
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linuxppc-release] [PATCH] net/fsl_pq_mdio: add support for the Fman 1G MDIO controller
2012-08-24 20:24 ` [linuxppc-release] " Timur Tabi
@ 2012-08-24 20:25 ` David Miller
2012-08-24 20:29 ` Timur Tabi
0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2012-08-24 20:25 UTC (permalink / raw)
To: timur; +Cc: afleming, netdev
From: Timur Tabi <timur@freescale.com>
Date: Fri, 24 Aug 2012 15:24:33 -0500
> Timur Tabi wrote:
>> The MDIO controller on the Frame Manager (Fman) is compatible with the
>> QE and Gianfar MDIO controllers, but we don't care about the TBI because
>> the Ethernet drivers (FMD) take care of programming it.
>>
>> Signed-off-by: Timur Tabi <timur@freescale.com>
>
> This patch isn't quite right. I'll post a new version soon.
I already applied it to net-next, didn't you see?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linuxppc-release] [PATCH] net/fsl_pq_mdio: add support for the Fman 1G MDIO controller
2012-08-24 20:25 ` David Miller
@ 2012-08-24 20:29 ` Timur Tabi
2012-08-24 20:37 ` David Miller
0 siblings, 1 reply; 5+ messages in thread
From: Timur Tabi @ 2012-08-24 20:29 UTC (permalink / raw)
To: David Miller; +Cc: afleming, netdev
David Miller wrote:
>> >
>> > This patch isn't quite right. I'll post a new version soon.
> I already applied it to net-next, didn't you see?
You applied this patch:
http://git.kernel.org/?p=linux/kernel/git/davem/net-next.git;a=commit;h=9f35a7342cff0be72e3c038ea972e07662ca1ce8
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linuxppc-release] [PATCH] net/fsl_pq_mdio: add support for the Fman 1G MDIO controller
2012-08-24 20:29 ` Timur Tabi
@ 2012-08-24 20:37 ` David Miller
0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2012-08-24 20:37 UTC (permalink / raw)
To: timur; +Cc: afleming, netdev
From: Timur Tabi <timur@freescale.com>
Date: Fri, 24 Aug 2012 15:29:57 -0500
> David Miller wrote:
>>> >
>>> > This patch isn't quite right. I'll post a new version soon.
>
>> I already applied it to net-next, didn't you see?
>
> You applied this patch:
>
> http://git.kernel.org/?p=linux/kernel/git/davem/net-next.git;a=commit;h=9f35a7342cff0be72e3c038ea972e07662ca1ce8
Aha, my bad. :)
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-08-24 20:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-23 21:24 [PATCH] net/fsl_pq_mdio: add support for the Fman 1G MDIO controller Timur Tabi
2012-08-24 20:24 ` [linuxppc-release] " Timur Tabi
2012-08-24 20:25 ` David Miller
2012-08-24 20:29 ` Timur Tabi
2012-08-24 20:37 ` David Miller
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).