diff mbox

[U-Boot,v2,1/4] zynqmp: gem: Set data bus width to 64bit for arm64

Message ID eb89182e88d1ecf03e33059fd2a4de327f131114.1432796446.git.michal.simek@xilinx.com
State Accepted
Delegated to: Michal Simek
Headers show

Commit Message

Michal Simek May 28, 2015, 7 a.m. UTC
From: Siva Durga Prasad Paladugu <siva.durga.paladugu at xilinx.com>

Set the data bus width to 64-bit AMBA Databus width in config register.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur at xilinx.com>
Signed-off-by: Michal Simek <michal.simek at xilinx.com>
---

Changes in v2:
- Select 64bit setup based on CONFIG_ARM64 not on
  CONFIG_TARGET_XILINX_ZYNQMP
- Fix type in the subject

 drivers/net/zynq_gem.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Comments

Joe Hershberger May 28, 2015, 5:56 p.m. UTC | #1
Hi Michal,

On Thu, May 28, 2015 at 2:00 AM, Michal Simek <michal.simek at xilinx.com> wrote:
> From: Siva Durga Prasad Paladugu <siva.durga.paladugu at xilinx.com>
>
> Set the data bus width to 64-bit AMBA Databus width in config register.
>
> Signed-off-by: Siva Durga Prasad Paladugu <sivadur at xilinx.com>
> Signed-off-by: Michal Simek <michal.simek at xilinx.com>
> ---

Acked-by: Joe Hershberger <joe.hershberger at ni.com>
diff mbox

Patch

diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index c723dbb0a694..df8452acc5be 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -58,7 +58,14 @@ 
 #define ZYNQ_GEM_NWCFG_MDCCLKDIV	0x000080000 /* Div pclk by 32, 80MHz */
 #define ZYNQ_GEM_NWCFG_MDCCLKDIV2	0x0000c0000 /* Div pclk by 48, 120MHz */
 
-#define ZYNQ_GEM_NWCFG_INIT		(ZYNQ_GEM_NWCFG_FDEN | \
+#ifdef CONFIG_ARM64
+# define ZYNQ_GEM_DBUS_WIDTH	(1 << 21) /* 64 bit bus */
+#else
+# define ZYNQ_GEM_DBUS_WIDTH	(0 << 21) /* 32 bit bus */
+#endif
+
+#define ZYNQ_GEM_NWCFG_INIT		(ZYNQ_GEM_DBUS_WIDTH | \
+					ZYNQ_GEM_NWCFG_FDEN | \
 					ZYNQ_GEM_NWCFG_FSREM | \
 					ZYNQ_GEM_NWCFG_MDCCLKDIV)