From: Arnd Bergmann <arnd@arndb.de>
To: linux-arm-kernel@lists.infradead.org
Cc: Florian Fainelli <f.fainelli@gmail.com>,
heiko@sntech.de, Xing Zheng <zhengxing@rock-chips.com>,
Paul Gortmaker <paul.gortmaker@windriver.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-rockchip@lists.infradead.org,
Geert Uytterhoeven <geert@linux-m68k.org>,
keescook@google.com, davem@davemloft.net, leozwang@google.com
Subject: Re: [RESEND PATCH v1 3/4] net: ethernet: arc: Add support emac for RK3036
Date: Fri, 01 Jan 2016 13:55:42 +0100 [thread overview]
Message-ID: <3169681.aSJgN2TRic@wuerfel> (raw)
In-Reply-To: <FFCE9129-357E-4643-A350-9927A5AD5720@gmail.com>
On Tuesday 29 December 2015 14:59:59 Florian Fainelli wrote:
> On December 27, 2015 11:22:20 PM PST, Xing Zheng <zhengxing@rock-chips.com> wrote:
> >The RK3036's GRFs offset are different with RK3066/RK3188, and need to
> >set
> >mac TX/RX clock before probe emac.
> >
> >Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
> >---
> <snip>
> > };
> >
> > static const struct of_device_id emac_rockchip_dt_ids[] = {
> >- { .compatible = "rockchip,rk3066-emac", .data =
> >&emac_rockchip_dt_data[0] },
> >- { .compatible = "rockchip,rk3188-emac", .data =
> >&emac_rockchip_dt_data[1] },
> >+ { .compatible = "rockchip,rk3036-emac", .data =
> >&emac_rockchip_dt_data[0] },
> >+ { .compatible = "rockchip,rk3066-emac", .data =
> >&emac_rockchip_dt_data[1] },
> >+ { .compatible = "rockchip,rk3188-emac", .data =
> >&emac_rockchip_dt_data[2] },
> > { /* Sentinel */ }
>
> Food for thought, you might want to use an enum here to index emac_rockchip_dt_data which would be less error prone if you add/remove entries in this structure.
>
I would use named structures instead:
static const struct emac_rockchip_soc_data emac_rk3066_emac_data = {
.grf_offset = 0x154,
};
static const struct of_device_id emac_rockchip_dt_ids[] = {
{ .compatible = "rockchip,rk3066-emac", .data = &emac_rk3066_emac_data,
...
};
Armd
next prev parent reply other threads:[~2016-01-01 12:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-28 7:22 [RESEND PATCH v1 0/4] Add support emac for the RK3036 SoC platform Xing Zheng
[not found] ` <1451287341-16453-1-git-send-email-zhengxing-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2015-12-28 7:22 ` [RESEND PATCH v1 1/4] net: ethernet: arc: Probe emac after set RMII clock Xing Zheng
2015-12-28 7:22 ` [RESEND PATCH v1 2/4] net: ethernet: arc: Keep emac compatibility for more Rockchip SoCs Xing Zheng
2015-12-29 20:53 ` [RESEND PATCH v1 0/4] Add support emac for the RK3036 SoC platform David Miller
2015-12-29 22:27 ` Heiko Stübner
2015-12-29 22:56 ` Florian Fainelli
2015-12-30 1:48 ` David Miller
[not found] ` <20151229.204847.578920480799799256.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2015-12-30 10:17 ` Geert Uytterhoeven
[not found] ` <CAMuHMdVEj6MGtUPYLmGCtMcLxKs4rLoh+if23_Bk1p=qwQM_Gg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-12-30 15:03 ` Rob Herring
2015-12-28 7:22 ` [RESEND PATCH v1 3/4] net: ethernet: arc: Add support emac for RK3036 Xing Zheng
2015-12-29 22:59 ` Florian Fainelli
2015-12-29 23:32 ` Heiko Stübner
2016-01-01 12:55 ` Arnd Bergmann [this message]
2016-01-02 2:38 ` Xing Zheng
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=3169681.aSJgN2TRic@wuerfel \
--to=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=geert@linux-m68k.org \
--cc=heiko@sntech.de \
--cc=keescook@google.com \
--cc=leozwang@google.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=netdev@vger.kernel.org \
--cc=paul.gortmaker@windriver.com \
--cc=zhengxing@rock-chips.com \
/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