From: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
To: srinivas kandagatla <srinivas.kandagatla-qxv4g6HH51o@public.gmane.org>
Cc: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>,
Giuseppe Cavallaro <peppe.cavallaro-qxv4g6HH51o@public.gmane.org>,
netdev <netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>,
devicetree <devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
linux-arm-kernel
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
linux-kernel
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
linux-sunxi <linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: [PATCH 04/10] net: stmmac: sunxi platfrom extensions for GMAC in Allwinner A20 SoC's
Date: Tue, 10 Dec 2013 21:23:00 +0100 [thread overview]
Message-ID: <20131210202300.GG3651@lukather> (raw)
In-Reply-To: <52A72C6D.60100-qxv4g6HH51o@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 4463 bytes --]
On Tue, Dec 10, 2013 at 02:59:57PM +0000, srinivas kandagatla wrote:
>
> On 09/12/13 17:34, Chen-Yu Tsai wrote:
> > Hi,
> >
> > On Mon, Dec 9, 2013 at 7:10 PM, srinivas kandagatla
> > <srinivas.kandagatla-qxv4g6HH51o@public.gmane.org> wrote:
> >> Hi Chen,
> >> Good to know that Allwinner uses gmac.
> >
> > To my knowledge, Allwinner has never confirmed this.
> >
> >> On ST SoC, we have very similar requirements, before we merge any of
> >> these changes I think we need to come up with common way to solve both
> >> Allwinner and ST SOCs use cases.
> >>
> >> I have already posted few patches on to net-dev
> >> http://lkml.org/lkml/2013/11/12/243 to add Glue driver on top of stmmac
> >> driver.
> >>
> >>
> >> There are few reasons for the way I have done it.
> >>
> >> 1> I did not want to modify gmac driver in any sense to when a new SOC
> >> support is added.
> >
> > My approach would add one line (compatible strings) each time.
>
> This would be a best case, But in reality the defination of the
> configuration register can change per each soc, so the data associated
> with it will also change and hence you will have to change more than
> then just compatible strings.
>
>
> >
> >> 2> As the SOC specific glue logic sits on top of standard GMAC IP, it
> >> makes sense to represent it proper harware hierarchy.
> >
> > My feeling is that the SoC specifics are not a glue layer around dwmac,
> > rather an interconnected extension. Arguably I do not have the whole
> > picture. Allwinner has refused to provide us with any specifics beyond
> > the SoC manual and drivers. As such I can only make educated guesses on
> > how the dwmac core interacts with the other modules.
>
> I would be good to get actual picture of this hw setup, On ST the
> additional glue logic which sits on top of the GMAC is to resposible for
> selecting the correct retime clock.
>
> >
> >> 3> Did not want to change any generic gmac bindings for SOC specific
> >> stuff as requirements if SOC glue would be very different in each case.
> >
> > We could try to define a standard set of clocks and reset controllers.
> > The dwmac does not have much additional tunables in the driver.
> > Anything else should be SoC specific, put in an extension, and
> > documented as such.
>
> I think it will be impossible to standardize SOC specifics as this
> glue/logic keeps changing across SOCs/Vendors.
In our case, it's barely just an additional clock (and a reset line in
the not-yet-submitted A31 GMAC).
So I can't really get what is !standard about that. We already have
defined bindings for such cases, that we can totally make optionnal.
We don't have anything like you seem to have in ST SoCs, where you
actually have some hardware around the GMAC IP. We don't. It's really
only about clocks and reset.
[...]
> >>> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> >>> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> >>> @@ -35,6 +35,9 @@ static const struct of_device_id stmmac_dt_ids[] = {
> >>> { .compatible = "snps,dwmac-3.70a"},
> >>> { .compatible = "snps,dwmac-3.710"},
> >>> { .compatible = "snps,dwmac"},
> >>> +#ifdef CONFIG_DWMAC_SUNXI
> >>> + { .compatible = "allwinner,sun7i-gmac", .data = &sun7i_gmac_data},
> >>> +#endif
> >> ...]
> >>
> >> Personally, I did not want to do this kind of stuff in stmmac, As this
> >> list would keep growing, and this file need to be edited for every new
> >> SOC or every different type of glue logic.
> >>
> >> Please let me know what your opnion on doing Allwinner glue driver in
> >> line with http://lkml.org/lkml/2013/11/12/462
> >
> >
> > I needed to set some fields in the platform data,
> > as was set in the driver provided by Allwinner, and
> > out of our own needs.
>
> >
> > 1. .tx_coe
> > This is not exported in the DT bindings.
> > Looking at stmmac code, not setting this seems to disable all
> > checksum offloading.
>
> Why cant this go via DT as well?
> I think, this will be overriden by stmmac on MACs > 3.50a.
How is that about hardware? Especially if we can derive it from the
version of the IP, and hence from the compatible, putting it into the
DT would be both redundant and useless.
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-12-10 20:23 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-06 17:29 [PATCH 00/10] net: stmmac: Add sun7i GMAC glue layer Chen-Yu Tsai
[not found] ` <1386350983-13281-1-git-send-email-wens-jdAy2FN1RRM@public.gmane.org>
2013-12-06 17:29 ` [PATCH 01/10] net: stmmac: Enable stmmac main clock when probing hardware Chen-Yu Tsai
[not found] ` <1386350983-13281-2-git-send-email-wens-jdAy2FN1RRM@public.gmane.org>
2013-12-07 10:33 ` Maxime Ripard
2013-12-09 2:43 ` Chen-Yu Tsai
[not found] ` <CAGb2v65YOSq_BMWSzSHX8w_hbo+0vwquBT2pnLuwNVZkWRfLvA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-12-09 10:09 ` Hans de Goede
2013-12-10 20:05 ` Maxime Ripard
2013-12-12 4:31 ` Chen-Yu Tsai
2013-12-09 7:14 ` Giuseppe CAVALLARO
[not found] ` <52A56DE5.5010206-qxv4g6HH51o@public.gmane.org>
2013-12-09 7:26 ` Chen-Yu Tsai
2013-12-06 17:29 ` [PATCH 02/10] net: stmmac: Honor DT parameter to force DMA store and forward mode Chen-Yu Tsai
2013-12-06 21:26 ` David Miller
[not found] ` <20131206.162606.2277176361893801778.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2013-12-07 1:19 ` Chen-Yu Tsai
2013-12-07 1:23 ` Chen-Yu Tsai
[not found] ` <CAGb2v67ZNtbQm+ZW5v_3wNbz1=oLhXks6gbTSjLYa=Nnoz8w-A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-12-07 10:07 ` maxime.ripard
2013-12-07 11:06 ` Tomasz Figa
2013-12-09 2:59 ` Chen-Yu Tsai
[not found] ` <CAGb2v64BMNjbbc7j2XesuPEXZV+RnjtP1sAPQ4icU=-wjh3YNQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-12-10 20:10 ` maxime.ripard
2013-12-06 17:29 ` [PATCH 03/10] net: stmmac: Use platform data tied with compatible strings Chen-Yu Tsai
2013-12-06 21:26 ` David Miller
[not found] ` <20131206.162633.125107323851595113.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2013-12-07 2:13 ` Chen-Yu Tsai
2013-12-06 17:29 ` [PATCH 04/10] net: stmmac: sunxi platfrom extensions for GMAC in Allwinner A20 SoC's Chen-Yu Tsai
[not found] ` <1386350983-13281-5-git-send-email-wens-jdAy2FN1RRM@public.gmane.org>
2013-12-07 10:27 ` Maxime Ripard
2013-12-07 11:12 ` Tomasz Figa
2013-12-07 11:46 ` Maxime Ripard
2013-12-07 12:50 ` Tomasz Figa
2013-12-07 13:34 ` Emilio López
2013-12-09 11:10 ` srinivas kandagatla
[not found] ` <52A5A52C.50605-qxv4g6HH51o@public.gmane.org>
2013-12-09 16:16 ` Hans de Goede
[not found] ` <52A5ECF4.6030301-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-12-09 17:56 ` Chen-Yu Tsai
[not found] ` <CAGb2v64LNxnz--vn0u9zwmt7MQJZ=uz2fs0H3zDSse_XDfdK4Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-12-09 19:04 ` Hans de Goede
[not found] ` <52A61435.6040803-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-12-10 20:14 ` Maxime Ripard
2013-12-09 17:34 ` Chen-Yu Tsai
[not found] ` <CAGb2v67WiCaMpJEzA_X6o7uOu6i3w3FCEz7=N5HY0amQb01SZA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-12-10 14:59 ` srinivas kandagatla
[not found] ` <52A72C6D.60100-qxv4g6HH51o@public.gmane.org>
2013-12-10 20:23 ` Maxime Ripard [this message]
2013-12-11 12:17 ` Chen-Yu Tsai
[not found] ` <CAGb2v64qQvqJSicA6MTAxeh1sGjWY=Pk=vDq=9J3pTQW+wkXrA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-12-11 14:45 ` srinivas kandagatla
[not found] ` <52A87A74.8040807-qxv4g6HH51o@public.gmane.org>
2013-12-12 7:27 ` Chen-Yu Tsai
2013-12-12 9:04 ` Maxime Ripard
2013-12-12 10:31 ` Chen-Yu Tsai
2013-12-13 10:38 ` Maxime Ripard
2013-12-24 3:27 ` Chen-Yu Tsai
[not found] ` <CAGb2v64Q1PSMw_nULBHMR5eOC44hWBPewchxE_4sO+4XN8_sDA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-01-02 13:11 ` srinivas kandagatla
[not found] ` <52C5656A.4060402-qxv4g6HH51o@public.gmane.org>
2014-01-07 10:24 ` Chen-Yu Tsai
2013-12-09 11:21 ` srinivas kandagatla
[not found] ` <52A5A7B2.4000509-qxv4g6HH51o@public.gmane.org>
2013-12-09 13:44 ` Sergei Shtylyov
[not found] ` <52A5C950.7070903-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2013-12-09 15:45 ` Chen-Yu Tsai
2013-12-06 17:29 ` [PATCH 05/10] ARM: dts: sun7i: Add GMAC controller node to sun7i DTSI Chen-Yu Tsai
2013-12-06 17:29 ` [PATCH 06/10] ARM: dts: sun7i: Add pin muxing options for the GMAC Chen-Yu Tsai
2013-12-06 17:29 ` [PATCH 07/10] ARM: dts: sun7i: cubietruck: Enable " Chen-Yu Tsai
2013-12-06 21:09 ` Florian Fainelli
[not found] ` <CAGVrzcb_r9_p4urz4XkE2A-G85KAHJa4PJ=Gt9a4RPYQNJ6j0g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-12-07 1:35 ` Chen-Yu Tsai
[not found] ` <CAGb2v64yFhkTXvdq=1VpemULhXew-5fvmSoTBzEb6iFDiSqy1Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-12-07 1:57 ` Florian Fainelli
[not found] ` <CAGVrzcaxV88dU3vEVGUiEQihUHLxq+QvQVQ6VvmOFVRsqbbX7w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-12-09 2:55 ` Chen-Yu Tsai
[not found] ` <CAGb2v675Cg6S512zfM1z4b+wqE_PesDGWdgcmpzWmPzyzXqbeA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-12-09 17:48 ` Florian Fainelli
2013-12-10 4:11 ` Chen-Yu Tsai
[not found] ` <CAGb2v665xtY4m4uCTb_iMojG+ox0HvyCgz6p0P7oxJVvZ0SW9w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-12-10 17:23 ` Florian Fainelli
2013-12-13 10:21 ` Giuseppe CAVALLARO
2013-12-06 17:29 ` [PATCH 08/10] ARM: dts: sun7i: cubieboard2: Enable GMAC instead of EMAC Chen-Yu Tsai
[not found] ` <1386350983-13281-9-git-send-email-wens-jdAy2FN1RRM@public.gmane.org>
2013-12-06 21:10 ` Florian Fainelli
2013-12-06 17:29 ` [PATCH 09/10] ARM: dts: sun7i: olinuxino-micro: " Chen-Yu Tsai
2013-12-06 17:29 ` [PATCH 10/10] ARM: dts: sun7i: Add ethernet alias for GMAC Chen-Yu Tsai
[not found] ` <1386350983-13281-11-git-send-email-wens-jdAy2FN1RRM@public.gmane.org>
2013-12-07 10:15 ` Maxime Ripard
2013-12-07 16:20 ` Chen-Yu Tsai
2013-12-06 20:52 ` [PATCH 00/10] net: stmmac: Add sun7i GMAC glue layer Michal Suchanek
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=20131210202300.GG3651@lukather \
--to=maxime.ripard-wi1+55scjutkeb57/3fjtnbpr1lh4cv8@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=peppe.cavallaro-qxv4g6HH51o@public.gmane.org \
--cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org \
--cc=srinivas.kandagatla-qxv4g6HH51o@public.gmane.org \
--cc=wens-jdAy2FN1RRM@public.gmane.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).