From: Andy Duan <fugang.duan@nxp.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: "andrew@lunn.ch" <andrew@lunn.ch>,
"martin.fuzzey@flowbird.group" <martin.fuzzey@flowbird.group>,
"davem@davemloft.net" <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"robh+dt@kernel.org" <robh+dt@kernel.org>,
"shawnguo@kernel.org" <shawnguo@kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"kuba@kernel.org" <kuba@kernel.org>
Subject: RE: [EXT] Re: [PATCH net v2 1/4] net: ethernet: fec: move GPR register offset and bit into DT
Date: Mon, 25 May 2020 15:38:45 +0000 [thread overview]
Message-ID: <AM6PR0402MB36079806C9FFFFE18BDE2EAAFFB30@AM6PR0402MB3607.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20200525104849.GQ11869@pengutronix.de>
From: Sascha Hauer <s.hauer@pengutronix.de> Sent: Monday, May 25, 2020 6:49 PM
> On Mon, May 25, 2020 at 03:09:26PM +0800, fugang.duan@nxp.com wrote:
> > From: Fugang Duan <fugang.duan@nxp.com>
> >
> > The commit da722186f654 (net: fec: set GPR bit on suspend by DT
> > configuration) set the GPR reigster offset and bit in driver for wake
> > on lan feature.
> >
> > But it introduces two issues here:
> > - one SOC has two instances, they have different bit
> > - different SOCs may have different offset and bit
> >
> > So to support wake-on-lan feature on other i.MX platforms, it should
> > configure the GPR reigster offset and bit from DT.
> >
> > So the patch is to improve the commit da722186f654 (net: fec: set GPR
> > bit on suspend by DT configuration) to support multiple ethernet
> > instances on i.MX series.
> >
> > v2:
> > * switch back to store the quirks bitmask in driver_data
> >
> > Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
> > ---
> > drivers/net/ethernet/freescale/fec_main.c | 103
> > ++++++++++--------------------
> > 1 file changed, 34 insertions(+), 69 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/freescale/fec_main.c
> > b/drivers/net/ethernet/freescale/fec_main.c
> > index 2e20914..4f55d30 100644
> > --- a/drivers/net/ethernet/freescale/fec_main.c
> > +++ b/drivers/net/ethernet/freescale/fec_main.c
> > @@ -86,56 +86,6 @@ static void fec_enet_itr_coal_init(struct net_device
> *ndev);
> > #define FEC_ENET_OPD_V 0xFFF0
> > #define FEC_MDIO_PM_TIMEOUT 100 /* ms */
> >
> > -struct fec_devinfo {
> > - u32 quirks;
> > - u8 stop_gpr_reg;
> > - u8 stop_gpr_bit;
> > -};
>
> Honestly I like the approach of having a struct fec_devinfo for abstracting
> differences between different hardware variants. It gives you more freedom
> to describe the differences. Converting this back to a single bitfield is a step
> backward, even when currently struct fec_devinfo only contains a single
> value.
>
> Sascha
>
Sascha, thanks for your review.
v1 patch is doing like this by using a struct fec_devinfo for abstracting differences.
In fact, I also like v1 method.
I will send the v3 version by using v1 patch.
> --
> Pengutronix e.K. |
> |
> Steuerwalder Str. 21 |
> https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.p
> engutronix.de%2F&data=02%7C01%7Cfugang.duan%40nxp.com%7C2ae
> 2657af251492ced5608d80099384e%7C686ea1d3bc2b4c6fa92cd99c5c30163
> 5%7C0%7C0%7C637260005356084997&sdata=sarhmRepUf1o4hCZ8WH
> oSBrg%2Fl128jz%2BNXxHRGAM%2FL0%3D&reserved=0 |
> 31137 Hildesheim, Germany | Phone:
> +49-5121-206917-0 |
> Amtsgericht Hildesheim, HRA 2686 | Fax:
> +49-5121-206917-5555 |
next prev parent reply other threads:[~2020-05-25 15:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-25 7:09 [PATCH net v2 0/4] net: ethernet: fec: move GPR reigster offset and bit into DT fugang.duan
2020-05-25 7:09 ` [PATCH net v2 1/4] net: ethernet: fec: move GPR register " fugang.duan
2020-05-25 10:48 ` Sascha Hauer
2020-05-25 15:38 ` Andy Duan [this message]
2020-05-25 7:09 ` [PATCH net v2 2/4] dt-bindings: fec: update the gpr property fugang.duan
2020-05-25 7:09 ` [PATCH net v2 3/4] ARM: dts: imx: add ethernet stop mode property fugang.duan
2020-05-25 13:51 ` Andrew Lunn
2020-05-25 15:39 ` [EXT] " Andy Duan
2020-05-25 7:09 ` [PATCH net v2 4/4] ARM: dts: imx6qdl-sabresd: enable fec wake-on-lan fugang.duan
2020-05-25 13:51 ` Andrew Lunn
2020-05-25 15:40 ` [EXT] " Andy Duan
2020-05-25 13:54 ` [PATCH net v2 0/4] net: ethernet: fec: move GPR reigster offset and bit into DT Andrew Lunn
2020-05-25 15:41 ` [EXT] " Andy Duan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AM6PR0402MB36079806C9FFFFE18BDE2EAAFFB30@AM6PR0402MB3607.eurprd04.prod.outlook.com \
--to=fugang.duan@nxp.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=kuba@kernel.org \
--cc=martin.fuzzey@flowbird.group \
--cc=netdev@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).