[U-Boot-Users] [PATCH 1/1] Add support for the hammerhead (AVR32) board

Julien May mailinglist at miromico.ch
Thu Jul 24 13:51:38 CEST 2008



> > Did so and it works now. I could make for this an incremental patch and 
> > send this to you.
> 
> That would be great.
> 

Please find below the incrementel patch. This patch just fixes the eth 
stuff of our board. As hopefully understood right the patch from ben 
sould fix the rest.

- Julien

>From 6c1e0c05e7c65ebdf3877b139a2ea313d32e5680 Mon Sep 17 00:00:00 2001
From: Julien May <mailinglist at miromico.ch>
Date: Thu, 24 Jul 2008 13:48:36 +0200
Subject: [PATCH 1/1] This makes the eth stuff work again according to the api changes.


Signed-off-by: Julien May <mailinglist at miromico.ch>
---
 board/miromico/hammerhead/Makefile     |    2 +-
 board/miromico/hammerhead/eth.c        |   37 --------------------------------
 board/miromico/hammerhead/hammerhead.c |   10 ++++++++
 3 files changed, 11 insertions(+), 38 deletions(-)
 delete mode 100644 board/miromico/hammerhead/eth.c

diff --git a/board/miromico/hammerhead/Makefile b/board/miromico/hammerhead/Makefile
index c5fc67a..4b74d16 100644
--- a/board/miromico/hammerhead/Makefile
+++ b/board/miromico/hammerhead/Makefile
@@ -22,7 +22,7 @@ include $(TOPDIR)/config.mk
 
 LIB	:= $(obj)lib$(BOARD).a
 
-COBJS	:= $(BOARD).o eth.o
+COBJS	:= $(BOARD).o
 
 SRCS	:= $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS	:= $(addprefix $(obj),$(SOBJS) $(COBJS))
diff --git a/board/miromico/hammerhead/eth.c b/board/miromico/hammerhead/eth.c
deleted file mode 100644
index 056e9ca..0000000
--- a/board/miromico/hammerhead/eth.c
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2008 Miromico AG
- *
- * Ethernet initialization for the Miromico Hammerhead AVR32 board
- *
- * Mostly copied form Atmel ATNGW100 sources
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-#include <common.h>
-
-#include <asm/arch/memory-map.h>
-
-extern int macb_eth_initialize(int id, void *regs, unsigned int phy_addr);
-
-#ifdef CONFIG_CMD_NET
-void board_eth_init(bd_t *bi)
-{
-	macb_eth_initialize(0, (void *)MACB0_BASE, bi->bi_phy_id[0]);
-}
-#endif
diff --git a/board/miromico/hammerhead/hammerhead.c b/board/miromico/hammerhead/hammerhead.c
index c63ef06..cd79557 100644
--- a/board/miromico/hammerhead/hammerhead.c
+++ b/board/miromico/hammerhead/hammerhead.c
@@ -31,6 +31,7 @@
 #include <asm/arch/clk.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/hmatrix.h>
+#include <asm/arch/memory-map.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -50,6 +51,15 @@ static const struct sdram_config sdram_config = {
 	.refresh_period	= (781 * (SDRAMC_BUS_HZ / 1000)) / 100000,
 };
 
+extern int macb_eth_initialize(int id, void *regs, unsigned int phy_addr);
+
+#ifdef CONFIG_CMD_NET
+int board_eth_init(bd_t *bis)
+{
+	return macb_eth_initialize(0, (void *)MACB0_BASE, bis->bi_phy_id[0]);
+}
+#endif
+
 int board_early_init_f(void)
 {
 	/* Enable SDRAM in the EBI mux */
-- 
1.5.5.GIT





More information about the U-Boot mailing list