From: Ramon Fried <rfried.dev@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/6] net: macb: add support for faster clk rates
Date: Tue, 11 Jun 2019 18:19:26 +0300 [thread overview]
Message-ID: <20190611151930.15852-2-rfried.dev@gmail.com> (raw)
In-Reply-To: <20190611151930.15852-1-rfried.dev@gmail.com>
add support for clock rates higher than 2.4Mhz
Signed-off-by: Ramon Fried <rfried.dev@gmail.com>
---
drivers/net/macb.c | 6 +++++-
drivers/net/macb.h | 2 ++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index 5858004858..6885da9c38 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -901,8 +901,12 @@ static u32 gem_mdc_clk_div(int id, struct macb_device *macb)
config = GEM_BF(CLK, GEM_CLK_DIV48);
else if (macb_hz < 160000000)
config = GEM_BF(CLK, GEM_CLK_DIV64);
- else
+ else if (macb_hz < 240000000)
config = GEM_BF(CLK, GEM_CLK_DIV96);
+ else if (macb_hz < 320000000)
+ config = GEM_BF(CLK, GEM_CLK_DIV128);
+ else
+ config = GEM_BF(CLK, GEM_CLK_DIV224);
return config;
}
diff --git a/drivers/net/macb.h b/drivers/net/macb.h
index 8966c793a7..9b16383eba 100644
--- a/drivers/net/macb.h
+++ b/drivers/net/macb.h
@@ -613,6 +613,8 @@
#define GEM_CLK_DIV48 3
#define GEM_CLK_DIV64 4
#define GEM_CLK_DIV96 5
+#define GEM_CLK_DIV128 6
+#define GEM_CLK_DIV224 7
/* Constants for MAN register */
#define MACB_MAN_SOF 1
--
2.21.0
next prev parent reply other threads:[~2019-06-11 15:19 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-11 15:19 [U-Boot] [PATCH 1/6] net: macb: sync header definitions as taken from Linux Ramon Fried
2019-06-11 15:19 ` Ramon Fried [this message]
2019-07-03 3:35 ` [U-Boot] [PATCH 2/6] net: macb: add support for faster clk rates Anup Patel
2019-07-08 23:09 ` Joe Hershberger
2019-06-11 15:19 ` [U-Boot] [PATCH 3/6] net: macb: use bit access macro from header file Ramon Fried
2019-07-03 3:35 ` Anup Patel
2019-07-08 23:11 ` Joe Hershberger
2019-06-11 15:19 ` [U-Boot] [PATCH 4/6] net: macb: add support for SGMII phy interface Ramon Fried
2019-07-03 3:35 ` Anup Patel
2019-07-08 23:12 ` Joe Hershberger
2019-06-11 15:19 ` [U-Boot] [PATCH 5/6] net: macb: add dma_burst_length config Ramon Fried
2019-07-03 3:35 ` Anup Patel
2019-07-08 23:23 ` Joe Hershberger
2019-06-11 15:19 ` [U-Boot] [PATCH 6/6] net: macb: apply sane DMA configuration Ramon Fried
2019-07-03 3:36 ` Anup Patel
2019-07-08 23:26 ` Joe Hershberger
2019-07-03 3:35 ` [U-Boot] [PATCH 1/6] net: macb: sync header definitions as taken from Linux Anup Patel
2019-07-08 23:08 ` Joe Hershberger
2019-07-15 18:31 ` Joe Hershberger
2019-07-15 20:19 ` Ramon Fried
2019-07-15 20:25 ` Ramon Fried
2019-07-15 20:48 ` Joe Hershberger
2019-07-16 5:02 ` Ramon Fried
2019-07-16 18:42 ` Joe Hershberger
2019-07-16 18:54 ` Ramon Fried
-- strict thread matches above, loose matches on Subject: below --
2019-07-16 19:03 [U-Boot] [PATCH v2 " Ramon Fried
2019-07-16 19:03 ` [U-Boot] [PATCH 2/6] net: macb: add support for faster clk rates Ramon Fried
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=20190611151930.15852-2-rfried.dev@gmail.com \
--to=rfried.dev@gmail.com \
--cc=u-boot@lists.denx.de \
/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