mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Steffen Trumtrar <s.trumtrar@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Subject: [PATCH 3/3] ARM: zedboard: add ethernet device
Date: Wed,  3 Apr 2013 09:55:45 +0200	[thread overview]
Message-ID: <1364975745-1479-4-git-send-email-s.trumtrar@pengutronix.de> (raw)
In-Reply-To: <1364975745-1479-1-git-send-email-s.trumtrar@pengutronix.de>

The ZedBoard has a connection for the GEM0. Use it.

Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
---
 arch/arm/boards/avnet-zedboard/board.c    | 13 +++++++++++++
 arch/arm/boards/avnet-zedboard/lowlevel.c | 11 ++++++++++-
 2 files changed, 23 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boards/avnet-zedboard/board.c b/arch/arm/boards/avnet-zedboard/board.c
index 4e3d5a5..7b95754 100644
--- a/arch/arm/boards/avnet-zedboard/board.c
+++ b/arch/arm/boards/avnet-zedboard/board.c
@@ -29,6 +29,19 @@ static int zedboard_mem_init(void)
 }
 mem_initcall(zedboard_mem_init);
 
+static struct macb_platform_data macb_pdata = {
+	.phy_interface = PHY_INTERFACE_MODE_RGMII,
+	.phy_addr = 0x0,
+};
+
+static int zedboard_device_init(void)
+{
+	zynq_add_eth0(&macb_pdata);
+
+	return 0;
+}
+device_initcall(zedboard_device_init);
+
 static int zedboard_console_init(void)
 {
 	zynq_add_uart1();
diff --git a/arch/arm/boards/avnet-zedboard/lowlevel.c b/arch/arm/boards/avnet-zedboard/lowlevel.c
index b50886e..fb05ef8 100644
--- a/arch/arm/boards/avnet-zedboard/lowlevel.c
+++ b/arch/arm/boards/avnet-zedboard/lowlevel.c
@@ -233,14 +233,23 @@ void __naked barebox_arm_reset_vector(void)
 	/* poor mans clkctrl */
 	writel(0x00001403, ZYNQ_CLOCK_CTRL_BASE + ZYNQ_UART_CLK_CTRL);
 
+	/* GEM0 */
 	writel(0x00000001, 0xf8000138);
-	writel(0x00100801, 0xf8000140);
+	writel(0x00500801, 0xf8000140);
 	writel(0x00000302, 0xf8000740);
 	writel(0x00000302, 0xf8000744);
 	writel(0x00000302, 0xf8000748);
 	writel(0x00000302, 0xf800074C);
 	writel(0x00000302, 0xf8000750);
 	writel(0x00000302, 0xf8000754);
+	writel(0x00001303, 0xf8000758);
+	writel(0x00001303, 0xf800075C);
+	writel(0x00001303, 0xf8000760);
+	writel(0x00001303, 0xf8000764);
+	writel(0x00001303, 0xf8000768);
+	writel(0x00001303, 0xf800076C);
+	writel(0x00001280, 0xf80007D0);
+	writel(0x00001280, 0xf80007D4);
 
 	writel(0x00000001, 0xf8000B00);
 
-- 
1.8.2.rc2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      parent reply	other threads:[~2013-04-03  7:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-03  7:55 [PATCH 0/3] ARM: zynq: add support for ethernet Steffen Trumtrar
2013-04-03  7:55 ` [PATCH 1/3] net: macb: turn off endian_swp_pkt_en Steffen Trumtrar
2013-04-03  7:55 ` [PATCH 2/3] ARM: zynq: add support for ethernet Steffen Trumtrar
2013-04-03  7:55 ` Steffen Trumtrar [this message]

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=1364975745-1479-4-git-send-email-s.trumtrar@pengutronix.de \
    --to=s.trumtrar@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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