From: Xing Zheng <zhengxing@rock-chips.com>
To: linux-rockchip@lists.infradead.org
Cc: keescook@google.com, leozwang@google.comi, heiko@sntech.de,
davem@davemloft.net, Xing Zheng <zhengxing@rock-chips.com>,
Paul Gortmaker <paul.gortmaker@windriver.com>,
Geert Uytterhoeven <geert@linux-m68k.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: [RESEND PATCH v1 3/4] net: ethernet: arc: Add support emac for RK3036
Date: Mon, 28 Dec 2015 15:22:20 +0800 [thread overview]
Message-ID: <1451287341-16453-4-git-send-email-zhengxing@rock-chips.com> (raw)
In-Reply-To: <1451287341-16453-1-git-send-email-zhengxing@rock-chips.com>
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>
---
drivers/net/ethernet/arc/Kconfig | 4 ++--
drivers/net/ethernet/arc/emac_rockchip.c | 9 +++++++--
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/arc/Kconfig b/drivers/net/ethernet/arc/Kconfig
index 52a6b16..6890451 100644
--- a/drivers/net/ethernet/arc/Kconfig
+++ b/drivers/net/ethernet/arc/Kconfig
@@ -34,9 +34,9 @@ config EMAC_ROCKCHIP
select ARC_EMAC_CORE
depends on OF_IRQ && OF_NET && REGULATOR && HAS_DMA
---help---
- Support for Rockchip RK3066/RK3188 EMAC ethernet controllers.
+ Support for Rockchip RK3036/RK3066/RK3188 EMAC ethernet controllers.
This selects Rockchip SoC glue layer support for the
- emac device driver. This driver is used for RK3066/RK3188
+ emac device driver. This driver is used for RK3036/RK3066/RK3188
EMAC ethernet controller.
endif # NET_VENDOR_ARC
diff --git a/drivers/net/ethernet/arc/emac_rockchip.c b/drivers/net/ethernet/arc/emac_rockchip.c
index d1a9c28..2433eeb 100644
--- a/drivers/net/ethernet/arc/emac_rockchip.c
+++ b/drivers/net/ethernet/arc/emac_rockchip.c
@@ -69,6 +69,10 @@ static void emac_rockchip_set_mac_speed(void *priv, unsigned int speed)
static const struct emac_rockchip_soc_data emac_rockchip_dt_data[] = {
{
+ .grf_offset = 0x140, .grf_mode_offset = 8,
+ .grf_speed_offset = 9, .need_div_macclk = 1
+ }, /* rk3036 */
+ {
.grf_offset = 0x154, .grf_mode_offset = 0,
.grf_speed_offset = 1, .need_div_macclk = 0
}, /* rk3066 */
@@ -79,8 +83,9 @@ static const struct emac_rockchip_soc_data emac_rockchip_dt_data[] = {
};
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 */ }
};
--
1.7.9.5
next prev parent reply other threads:[~2015-12-28 7:22 UTC|newest]
Thread overview: 15+ 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
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-28 7:22 ` Xing Zheng [this message]
2015-12-29 22:59 ` [RESEND PATCH v1 3/4] net: ethernet: arc: Add support emac for RK3036 Florian Fainelli
2015-12-29 23:32 ` Heiko Stübner
2016-01-01 12:55 ` Arnd Bergmann
2016-01-02 2:38 ` Xing Zheng
2015-12-28 7:22 ` [RESEND PATCH v1 4/4] ARM: dts: rockchip: " 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
2015-12-30 10:17 ` Geert Uytterhoeven
2015-12-30 15:03 ` Rob Herring
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=1451287341-16453-4-git-send-email-zhengxing@rock-chips.com \
--to=zhengxing@rock-chips.com \
--cc=davem@davemloft.net \
--cc=geert@linux-m68k.org \
--cc=heiko@sntech.de \
--cc=keescook@google.com \
--cc=leozwang@google.comi \
--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 \
/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).