Thread (15 messages) 15 messages, 7 authors, 2016-01-02

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

From: Xing Zheng <hidden>
Date: 2016-01-02 02:38:39
Also in: linux-rockchip, lkml, netdev


OK, I think I will use named structures.

Thanks.
? 2016?1?1??20:55?Arnd Bergmann [off-list ref] ???
quoted
On Tuesday 29 December 2015 14:59:59 Florian Fainelli wrote:
quoted
On December 27, 2015 11:22:20 PM PST, Xing Zheng [off-list ref] 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 <redacted>
---
<snip>
quoted
};

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help