From: Shawn Guo <shawn.guo@linaro.org>
To: "fugang.duan@freescale.com" <fugang.duan@freescale.com>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"bhutchings@solarflare.com" <bhutchings@solarflare.com>,
"stephen@networkplumber.org" <stephen@networkplumber.org>
Subject: Re: [PATCH net-next v1 2/3] ARM: imx: add FEC sleep mode callback function
Date: Wed, 7 Jan 2015 10:33:10 +0800 [thread overview]
Message-ID: <20150107023307.GA4928@dragon> (raw)
In-Reply-To: <BLUPR03MB373F1A5D01A8A6D16DC3364F5460@BLUPR03MB373.namprd03.prod.outlook.com>
On Wed, Jan 07, 2015 at 01:41:33AM +0000, fugang.duan@freescale.com wrote:
> From: Shawn Guo <shawn.guo@linaro.org> Sent: Tuesday, January 06, 2015 7:48 PM
> > To: Duan Fugang-B38611
> > Cc: davem@davemloft.net; netdev@vger.kernel.org;
> > bhutchings@solarflare.com; stephen@networkplumber.org
> > Subject: Re: [PATCH net-next v1 2/3] ARM: imx: add FEC sleep mode
> > callback function
> >
> > On Wed, Dec 24, 2014 at 05:30:40PM +0800, Fugang Duan wrote:
> > > i.MX6q/dl, i.MX6SX SOCs enet support sleep mode that magic packet can
> > > wake up system in suspend status. For different SOCs, there have some
> > > SOC specifical GPR register to set sleep on/off mode. So add these to
> > > callback function for driver.
> > >
> > > Signed-off-by: Fugang Duan <B38611@freescale.com>
> >
> > I do not like this patch. In the end, this is just a GRP register bit
> > setup per FEC driver need. Rather than messing up platform code for each
> > SoC with the same pattern, I do not see why this can not be done by FEC
> > driver itself.
> >
> > You can take a look at LDB driver (drivers/gpu/drm/imx/imx-ldb.c) to see
> > how this can be done.
> >
> > Shawn
> >
>
> Hi, Shawn,
>
> It is SOC related setting, not fec IP itself setting, and different SOC GPR setting is not different.
> So I think it better to put it to platform code.
The GPR difference between SoCs can be encoded in device tree as well.
It's pointless to repeat the same code pattern for every single
platform, that need to set up GPR bits for enabling magic packet wake
up, while the only difference is the register and bit offset.
The platform code will become quite messy and unmaintainable if every
device driver dump their GPR register setup code into platform.
Sorry, but it's NACK from me.
Shawn
next prev parent reply other threads:[~2015-01-07 2:33 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-24 9:30 [PATCH net-next v1 0/3] net: fec: add Wake-on-LAN support Fugang Duan
2014-12-24 9:30 ` [PATCH net-next v1 1/3] " Fugang Duan
2014-12-24 9:30 ` [PATCH net-next v1 2/3] ARM: imx: add FEC sleep mode callback function Fugang Duan
2015-01-06 11:48 ` Shawn Guo
2015-01-07 1:41 ` fugang.duan
2015-01-07 2:33 ` Shawn Guo [this message]
2015-01-07 2:40 ` fugang.duan
2015-01-07 3:17 ` Shawn Guo
2015-01-07 12:02 ` David Miller
2015-01-07 3:44 ` Fabio Estevam
2014-12-24 9:30 ` [PATCH net-next v1 3/3] ARM: dts: imx6qdl: enable FEC magic-packet feature Fugang Duan
2014-12-31 18:07 ` [PATCH net-next v1 0/3] net: fec: add Wake-on-LAN support David Miller
2014-12-31 19:03 ` Fabio Estevam
2014-12-31 19:20 ` David Miller
2014-12-31 19:22 ` Fabio Estevam
2015-01-04 1:39 ` fugang.duan
2015-01-06 11:21 ` Shawn Guo
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=20150107023307.GA4928@dragon \
--to=shawn.guo@linaro.org \
--cc=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=fugang.duan@freescale.com \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.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