* [U-Boot] [PATCH] drivers: net: ldpaa_eth: check if the dpmac is enabled
@ 2019-02-08 8:59 Pankaj Bansal
2019-02-11 9:49 ` Prabhakar Kushwaha
2019-03-01 21:30 ` Joe Hershberger
0 siblings, 2 replies; 5+ messages in thread
From: Pankaj Bansal @ 2019-02-08 8:59 UTC (permalink / raw)
To: u-boot
some dpmacs in armv8a based freescale layerscape SOCs can be
configured via both serdes(sgmii, xfi, xlaui etc) bits and via
EC*_PMUX(rgmii) bits in RCW.
e.g. dpmac 17 and 18 in LX2160A can be configured as SGMII from
serdes bits and as RGMII via EC1_PMUX/EC2_PMUX bits
Now if a dpmac is enabled by serdes bits then it takes precedence
over EC*_PMUX bits. i.e. in LX2160A if we select serdes protocol
that configures dpmac17 as SGMII and set the EC1_PMUX as RGMII,
then the dpmac is SGMII and not RGMII.
Therefore, in fsl_rgmii_init function of SOC, we will check if the
dpmac is enabled or not? if it is (fsl_serdes_init has already enabled
the dpmac), then don't enable it.
Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>
---
Notes:
Dependencies:
- http://patchwork.ozlabs.org/patch/990131/
- http://patchwork.ozlabs.org/patch/990093/
drivers/net/ldpaa_eth/lx2160a.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ldpaa_eth/lx2160a.c b/drivers/net/ldpaa_eth/lx2160a.c
index 7dd46c04f6..1fbeb0d14b 100644
--- a/drivers/net/ldpaa_eth/lx2160a.c
+++ b/drivers/net/ldpaa_eth/lx2160a.c
@@ -91,7 +91,7 @@ void fsl_rgmii_init(void)
& FSL_CHASSIS3_EC1_REGSR_PRTCL_MASK;
ec >>= FSL_CHASSIS3_EC1_REGSR_PRTCL_SHIFT;
- if (!ec)
+ if (!ec && (wriop_is_enabled_dpmac(17) == -ENODEV))
wriop_init_dpmac_enet_if(17, PHY_INTERFACE_MODE_RGMII_ID);
#endif
@@ -100,7 +100,7 @@ void fsl_rgmii_init(void)
& FSL_CHASSIS3_EC2_REGSR_PRTCL_MASK;
ec >>= FSL_CHASSIS3_EC2_REGSR_PRTCL_SHIFT;
- if (!ec)
+ if (!ec && (wriop_is_enabled_dpmac(18) == -ENODEV))
wriop_init_dpmac_enet_if(18, PHY_INTERFACE_MODE_RGMII_ID);
#endif
}
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] drivers: net: ldpaa_eth: check if the dpmac is enabled
2019-02-08 8:59 [U-Boot] [PATCH] drivers: net: ldpaa_eth: check if the dpmac is enabled Pankaj Bansal
@ 2019-02-11 9:49 ` Prabhakar Kushwaha
2019-02-27 6:53 ` Pankaj Bansal
2019-03-01 21:30 ` Joe Hershberger
1 sibling, 1 reply; 5+ messages in thread
From: Prabhakar Kushwaha @ 2019-02-11 9:49 UTC (permalink / raw)
To: u-boot
Dear Joe,
> -----Original Message-----
> From: Pankaj Bansal
> Sent: Friday, February 8, 2019 2:29 PM
> To: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
> Cc: u-boot at lists.denx.de; Pankaj Bansal <pankaj.bansal@nxp.com>
> Subject: [PATCH] drivers: net: ldpaa_eth: check if the dpmac is enabled
>
> some dpmacs in armv8a based freescale layerscape SOCs can be configured
> via both serdes(sgmii, xfi, xlaui etc) bits and via
> EC*_PMUX(rgmii) bits in RCW.
> e.g. dpmac 17 and 18 in LX2160A can be configured as SGMII from serdes bits
> and as RGMII via EC1_PMUX/EC2_PMUX bits Now if a dpmac is enabled by
> serdes bits then it takes precedence over EC*_PMUX bits. i.e. in LX2160A if
> we select serdes protocol that configures dpmac17 as SGMII and set the
> EC1_PMUX as RGMII, then the dpmac is SGMII and not RGMII.
>
> Therefore, in fsl_rgmii_init function of SOC, we will check if the dpmac is
> enabled or not? if it is (fsl_serdes_init has already enabled the dpmac), then
> don't enable it.
>
> Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>
> ---
>
> Notes:
> Dependencies:
> - http://patchwork.ozlabs.org/patch/990131/
> - http://patchwork.ozlabs.org/patch/990093/
>
> drivers/net/ldpaa_eth/lx2160a.c | 4 ++--
Please let me know if you have any concern on this patch.
I would like pull this patch via u-boot-fsl-qoriq repo..
--pk
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] drivers: net: ldpaa_eth: check if the dpmac is enabled
2019-02-11 9:49 ` Prabhakar Kushwaha
@ 2019-02-27 6:53 ` Pankaj Bansal
0 siblings, 0 replies; 5+ messages in thread
From: Pankaj Bansal @ 2019-02-27 6:53 UTC (permalink / raw)
To: u-boot
Hi Joe,
Can you please check and ACK this patch?
This patch is related to http://patchwork.ozlabs.org/patch/990131/
Regards,
Pankaj Bansal
> -----Original Message-----
> From: Prabhakar Kushwaha
> Sent: Monday, 11 February, 2019 03:19 PM
> To: Pankaj Bansal <pankaj.bansal@nxp.com>; Joe Hershberger
> <joe.hershberger@ni.com>
> Cc: u-boot at lists.denx.de
> Subject: RE: [PATCH] drivers: net: ldpaa_eth: check if the dpmac is enabled
>
> Dear Joe,
>
> > -----Original Message-----
> > From: Pankaj Bansal
> > Sent: Friday, February 8, 2019 2:29 PM
> > To: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
> > Cc: u-boot at lists.denx.de; Pankaj Bansal <pankaj.bansal@nxp.com>
> > Subject: [PATCH] drivers: net: ldpaa_eth: check if the dpmac is
> > enabled
> >
> > some dpmacs in armv8a based freescale layerscape SOCs can be
> > configured via both serdes(sgmii, xfi, xlaui etc) bits and via
> > EC*_PMUX(rgmii) bits in RCW.
> > e.g. dpmac 17 and 18 in LX2160A can be configured as SGMII from serdes
> > bits and as RGMII via EC1_PMUX/EC2_PMUX bits Now if a dpmac is enabled
> > by serdes bits then it takes precedence over EC*_PMUX bits. i.e. in
> > LX2160A if we select serdes protocol that configures dpmac17 as SGMII
> > and set the EC1_PMUX as RGMII, then the dpmac is SGMII and not RGMII.
> >
> > Therefore, in fsl_rgmii_init function of SOC, we will check if the
> > dpmac is enabled or not? if it is (fsl_serdes_init has already enabled
> > the dpmac), then don't enable it.
> >
> > Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>
> > ---
> >
> > Notes:
> > Dependencies:
> > - http://patchwork.ozlabs.org/patch/990131/
> > - http://patchwork.ozlabs.org/patch/990093/
> >
> > drivers/net/ldpaa_eth/lx2160a.c | 4 ++--
>
> Please let me know if you have any concern on this patch.
>
> I would like pull this patch via u-boot-fsl-qoriq repo..
>
> --pk
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] drivers: net: ldpaa_eth: check if the dpmac is enabled
2019-02-08 8:59 [U-Boot] [PATCH] drivers: net: ldpaa_eth: check if the dpmac is enabled Pankaj Bansal
2019-02-11 9:49 ` Prabhakar Kushwaha
@ 2019-03-01 21:30 ` Joe Hershberger
2019-03-15 13:32 ` Prabhakar Kushwaha
1 sibling, 1 reply; 5+ messages in thread
From: Joe Hershberger @ 2019-03-01 21:30 UTC (permalink / raw)
To: u-boot
On Fri, Feb 8, 2019 at 2:59 AM Pankaj Bansal <pankaj.bansal@nxp.com> wrote:
>
> some dpmacs in armv8a based freescale layerscape SOCs can be
> configured via both serdes(sgmii, xfi, xlaui etc) bits and via
> EC*_PMUX(rgmii) bits in RCW.
> e.g. dpmac 17 and 18 in LX2160A can be configured as SGMII from
> serdes bits and as RGMII via EC1_PMUX/EC2_PMUX bits
> Now if a dpmac is enabled by serdes bits then it takes precedence
> over EC*_PMUX bits. i.e. in LX2160A if we select serdes protocol
> that configures dpmac17 as SGMII and set the EC1_PMUX as RGMII,
> then the dpmac is SGMII and not RGMII.
>
> Therefore, in fsl_rgmii_init function of SOC, we will check if the
> dpmac is enabled or not? if it is (fsl_serdes_init has already enabled
> the dpmac), then don't enable it.
>
> Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] drivers: net: ldpaa_eth: check if the dpmac is enabled
2019-03-01 21:30 ` Joe Hershberger
@ 2019-03-15 13:32 ` Prabhakar Kushwaha
0 siblings, 0 replies; 5+ messages in thread
From: Prabhakar Kushwaha @ 2019-03-15 13:32 UTC (permalink / raw)
To: u-boot
> -----Original Message-----
> From: Joe Hershberger <joe.hershberger@gmail.com>
> Sent: Saturday, March 2, 2019 3:00 AM
> To: Pankaj Bansal <pankaj.bansal@nxp.com>
> Cc: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>; u-
> boot at lists.denx.de
> Subject: Re: [U-Boot] [PATCH] drivers: net: ldpaa_eth: check if the dpmac is
> enabled
>
> On Fri, Feb 8, 2019 at 2:59 AM Pankaj Bansal <pankaj.bansal@nxp.com> wrote:
> >
> > some dpmacs in armv8a based freescale layerscape SOCs can be
> > configured via both serdes(sgmii, xfi, xlaui etc) bits and via
> > EC*_PMUX(rgmii) bits in RCW.
> > e.g. dpmac 17 and 18 in LX2160A can be configured as SGMII from serdes
> > bits and as RGMII via EC1_PMUX/EC2_PMUX bits Now if a dpmac is enabled
> > by serdes bits then it takes precedence over EC*_PMUX bits. i.e. in
> > LX2160A if we select serdes protocol that configures dpmac17 as SGMII
> > and set the EC1_PMUX as RGMII, then the dpmac is SGMII and not RGMII.
> >
> > Therefore, in fsl_rgmii_init function of SOC, we will check if the
> > dpmac is enabled or not? if it is (fsl_serdes_init has already enabled
> > the dpmac), then don't enable it.
> >
> > Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>
>
> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Applied fsl-qoriq, awaiting upstream
--pk
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-03-15 13:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-08 8:59 [U-Boot] [PATCH] drivers: net: ldpaa_eth: check if the dpmac is enabled Pankaj Bansal
2019-02-11 9:49 ` Prabhakar Kushwaha
2019-02-27 6:53 ` Pankaj Bansal
2019-03-01 21:30 ` Joe Hershberger
2019-03-15 13:32 ` Prabhakar Kushwaha
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.