From: Michael Schwingen Date: Thu, 10 Jan 2008 23:05:13 +0100 Subject: [U-Boot-Users] [PATCH] PATCH: load ixp42x NPE firmware from separate flash block, remove dead code In-Reply-To: <1199881811-14259-1-git-send-email-plagnioj@jcrosoft.com> References: <1199881811-14259-1-git-send-email-plagnioj@jcrosoft.com> Message-ID: <20080110220512.GB9180@discworld.dascon.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Wed, Jan 09, 2008 at 01:30:11PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote: > From: Michael Schwingen > > Hi, > > the following patch adds support to move the IXP42X NPE firmware to a > separate flash block, whose start address is defined in > CONFIG_IXP4XX_NPE_EXT_UCODE_BASE. Using that, it is possible to build > NPE-enabled u-boot without copyright problems due to the NPE firmware. > > I have also removed some unused code (#if 0 currently - should we completely > remove those unused parts?) > > I hope the patch applies, I get whitespace-related differences in the NPE > files due to trailing whitespace in the original versions. > > Signed-off-by: Michael Schwingen > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD Thanks - I had expected some more discussion if those NPE code cleanups should be done. Now for CONFIG_IXP4XX_NPE_EXT_UCODE_BASE to really work, one more change in the Makefile is required (which I left out when I sent the patch, but with the new Makefile structure, this is really easy to do): Signed-off-by: Michael Schwingen diff --git a/cpu/ixp/npe/Makefile b/cpu/ixp/npe/Makefile index 7f020b5..25117d7 100644 --- a/cpu/ixp/npe/Makefile +++ b/cpu/ixp/npe/Makefile @@ -72,7 +72,6 @@ COBJS := npe.o \ IxNpeDlImageMgr.o \ IxNpeDlNpeMgr.o \ IxNpeDlNpeMgrUtils.o \ - IxNpeMicrocode.o \ IxNpeMh.o \ IxNpeMhConfig.o \ IxNpeMhReceive.o \ @@ -80,6 +79,9 @@ COBJS := npe.o \ IxNpeMhSolicitedCbMgr.o \ IxNpeMhUnsolicitedCbMgr.o +ifndef CONFIG_IXP4XX_NPE_EXT_UCODE_BASE +COBJS += IxNpeMicrocode.o +endif SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) Having the NPE microcode in a seperate flash sector works well with both u-boot and with the OpenWRT patches, which expect the microcode in a separate MTD partition, so the code is in flash only once, and it should be GPL compliant. cu Michael