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

Signed-off-by: Steffen Trumtrar <s.trumt...@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

Reply via email to