Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1299166

Re: [RESEND PATCH v1 3/4] net: ethernet: arc: Add support emac for RK3036

From Heiko Stübner <heiko@sntech.de>
Newsgroups linux.kernel
Subject Re: [RESEND PATCH v1 3/4] net: ethernet: arc: Add support emac for RK3036
Date 2015-12-30 00:40 +0100
Message-ID <qLc1Y-76R-17@gated-at.bofh.it> (permalink)
References <qKApH-79E-3@gated-at.bofh.it> <qKApH-79E-1@gated-at.bofh.it> <qLbyV-6Wl-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Am Dienstag, 29. Dezember 2015, 14:59:59 schrieb Florian Fainelli:
> 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.

Or just have the structs separately and not in array-form at all, aka
rk3066_emac_dt_data, rk3036_emac_dt_data.

I don't think the original array really improves anything.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RESEND PATCH v1 3/4] net: ethernet: arc: Add support emac for RK3036 Xing Zheng <zhengxing@rock-chips.com> - 2015-12-28 08:30 +0100
  Re: [RESEND PATCH v1 3/4] net: ethernet: arc: Add support emac for RK3036 Florian Fainelli <f.fainelli@gmail.com> - 2015-12-30 00:10 +0100
    Re: [RESEND PATCH v1 3/4] net: ethernet: arc: Add support emac for RK3036 Heiko Stübner <heiko@sntech.de> - 2015-12-30 00:40 +0100
    Re: [RESEND PATCH v1 3/4] net: ethernet: arc: Add support emac for RK3036 Arnd Bergmann <arnd@arndb.de> - 2016-01-01 14:00 +0100

csiph-web