From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean-Christophe PLAGNIOL-VILLARD Date: Tue, 7 Jul 2009 22:37:53 +0200 Subject: [U-Boot] [PATCH/RFC 1/2]: arm: Kirkwood: Split PHY-related initialization to a common file In-Reply-To: <20090702151937.6ad3a500@marrow.netinsight.se> References: <20090702151834.5a756b34@marrow.netinsight.se> <20090702151937.6ad3a500@marrow.netinsight.se> Message-ID: <20090707203753.GP30172@game.jcrosoft.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 15:19 Thu 02 Jul , Simon Kagstrom wrote: > Split PHY-related initialization to a common file > > The mv881116 PHY initialization is split out to a common file to enable > code reuse between different boards. please note if that will be share with non Marvell code this is not the right place to store it > > Signed-off-by: Simon Kagstrom > --- > board/Marvell/common/mv881116.c | 65 +++++++++++++++++++++++++++++++++ > board/Marvell/common/mv881116.h | 29 +++++++++++++++ > board/Marvell/sheevaplug/Makefile | 2 +- > board/Marvell/sheevaplug/sheevaplug.c | 32 ++--------------- > board/Marvell/sheevaplug/sheevaplug.h | 8 ---- > 5 files changed, 98 insertions(+), 38 deletions(-) > create mode 100644 board/Marvell/common/mv881116.c > create mode 100644 board/Marvell/common/mv881116.h > > diff --git a/board/Marvell/common/mv881116.c b/board/Marvell/common/mv881116.c > new file mode 100644 > index 0000000..9f5c7f1 > --- /dev/null > +++ b/board/Marvell/common/mv881116.c > @@ -0,0 +1,65 @@ > +/* > + * (C) Copyright 2009 > + * Marvell Semiconductor > + * Written-by: Simon Kagstrom > + * as you just move code for an file to an other please let the original Copyright header > + * See file CREDITS for list of people who contributed to this > + * project. > + * > diff --git a/board/Marvell/common/mv881116.h b/board/Marvell/common/mv881116.h > new file mode 100644 > index 0000000..f1fe13f > --- /dev/null > +++ b/board/Marvell/common/mv881116.h > @@ -0,0 +1,29 @@ > +/* > + * (C) Copyright 2009 > + * Marvell Semiconductor > + * Written-by: Simon Kagstrom > + * same here > diff --git a/board/Marvell/sheevaplug/Makefile b/board/Marvell/sheevaplug/Makefile > index e378b5b..05c979d 100644 > --- a/board/Marvell/sheevaplug/Makefile > +++ b/board/Marvell/sheevaplug/Makefile > @@ -26,7 +26,7 @@ include $(TOPDIR)/config.mk > > LIB = $(obj)lib$(BOARD).a > > -COBJS := sheevaplug.o > +COBJS := sheevaplug.o ../common/mv881116.o please create a common Makefile > > SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) > OBJS := $(addprefix $(obj),$(COBJS)) > diff --git a/board/Marvell/sheevaplug/sheevaplug.c b/board/Marvell/sheevaplug/sheevaplug.c > index 547126a..f018a46 100644 > --- a/board/Marvell/sheevaplug/sheevaplug.c > +++ b/board/Marvell/sheevaplug/sheevaplug.c > @@ -27,6 +27,7 @@ > #include > #include > #include "sheevaplug.h" > +#include "../common/mv881116.h" Best Regards, J.