load ixp42x NPE firmware from separate flash block, remove dead code
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 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 <michael@schwingen.org> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
This commit is contained in:
parent
f188896c2f
commit
63ebcc4615
|
@ -108,38 +108,6 @@ static BOOL ixNpeDlNpeStarted[IX_NPEDL_NPEID_MAX] ={FALSE, FALSE, FALSE} ;
|
||||||
PRIVATE IX_STATUS
|
PRIVATE IX_STATUS
|
||||||
ixNpeDlNpeInitAndStartInternal (UINT32 *imageLibrary, UINT32 imageId);
|
ixNpeDlNpeInitAndStartInternal (UINT32 *imageLibrary, UINT32 imageId);
|
||||||
|
|
||||||
/*
|
|
||||||
* Function definition: ixNpeDlMicrocodeImageLibraryOverride
|
|
||||||
*/
|
|
||||||
PUBLIC IX_STATUS
|
|
||||||
ixNpeDlMicrocodeImageLibraryOverride (UINT32 *clientImageLibrary)
|
|
||||||
{
|
|
||||||
IX_STATUS status = IX_SUCCESS;
|
|
||||||
|
|
||||||
IX_NPEDL_TRACE0 (IX_NPEDL_FN_ENTRY_EXIT,
|
|
||||||
"Entering ixNpeDlMicrocodeImageLibraryOverride\n");
|
|
||||||
|
|
||||||
if (clientImageLibrary == NULL)
|
|
||||||
{
|
|
||||||
status = IX_NPEDL_PARAM_ERR;
|
|
||||||
IX_NPEDL_ERROR_REPORT ("ixNpeDlMicrocodeImageLibraryOverride - "
|
|
||||||
"invalid parameter\n");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
status = ixNpeDlImageMgrMicrocodeImageLibraryOverride (clientImageLibrary);
|
|
||||||
if (status != IX_SUCCESS)
|
|
||||||
{
|
|
||||||
status = IX_FAIL;
|
|
||||||
}
|
|
||||||
} /* end of if-else(clientImageLibrary) */
|
|
||||||
|
|
||||||
IX_NPEDL_TRACE1 (IX_NPEDL_FN_ENTRY_EXIT,
|
|
||||||
"Exiting ixNpeDlMicrocodeImageLibraryOverride : "
|
|
||||||
"status = %d\n", status);
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Function definition: ixNpeDlImageDownload
|
* Function definition: ixNpeDlImageDownload
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -134,8 +134,8 @@ typedef struct
|
||||||
static IxNpeDlImageMgrStats ixNpeDlImageMgrStats;
|
static IxNpeDlImageMgrStats ixNpeDlImageMgrStats;
|
||||||
|
|
||||||
/* default image */
|
/* default image */
|
||||||
#ifdef IX_NPEDL_READ_MICROCODE_FROM_FILE
|
#ifdef CONFIG_IXP4XX_NPE_EXT_UCODE_BASE
|
||||||
static UINT32 *IxNpeMicroCodeImageLibrary = NULL; /* Gets set to proper value at runtime */
|
static UINT32 *IxNpeMicroCodeImageLibrary = (UINT32 *)CONFIG_IXP4XX_NPE_EXT_UCODE_BASE;
|
||||||
#else
|
#else
|
||||||
static UINT32 *IxNpeMicroCodeImageLibrary = (UINT32 *)IxNpeMicrocode_array;
|
static UINT32 *IxNpeMicroCodeImageLibrary = (UINT32 *)IxNpeMicrocode_array;
|
||||||
#endif
|
#endif
|
||||||
|
@ -158,6 +158,7 @@ PRIVATE BOOL
|
||||||
ixNpeDlImageMgrNpeFunctionIdCompare (IxNpeDlImageId *imageIdA,
|
ixNpeDlImageMgrNpeFunctionIdCompare (IxNpeDlImageId *imageIdA,
|
||||||
IxNpeDlImageId *imageIdB);
|
IxNpeDlImageId *imageIdB);
|
||||||
|
|
||||||
|
#if 0
|
||||||
PRIVATE IX_STATUS
|
PRIVATE IX_STATUS
|
||||||
ixNpeDlImageMgrImageFind_legacy (UINT32 *imageLibrary,
|
ixNpeDlImageMgrImageFind_legacy (UINT32 *imageLibrary,
|
||||||
UINT32 imageId,
|
UINT32 imageId,
|
||||||
|
@ -195,7 +196,7 @@ ixNpeDlImageMgrMicrocodeImageLibraryOverride (
|
||||||
status);
|
status);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Function definition: ixNpeDlImageMgrImageListExtract
|
* Function definition: ixNpeDlImageMgrImageListExtract
|
||||||
|
@ -527,6 +528,7 @@ ixNpeDlImageMgrStatsReset (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if 0
|
||||||
/*
|
/*
|
||||||
* Function definition: ixNpeDlImageMgrImageFind_legacy
|
* Function definition: ixNpeDlImageMgrImageFind_legacy
|
||||||
*
|
*
|
||||||
|
@ -600,7 +602,7 @@ ixNpeDlImageMgrImageFind_legacy (
|
||||||
"Exiting ixNpeDlImageMgrImageFind: status = %d\n", status);
|
"Exiting ixNpeDlImageMgrImageFind: status = %d\n", status);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Function definition: ixNpeDlImageMgrImageFind
|
* Function definition: ixNpeDlImageMgrImageFind
|
||||||
|
@ -635,6 +637,7 @@ ixNpeDlImageMgrImageFind (
|
||||||
#endif /* IX_NPEDL_READ_MICROCODE_FROM_FILE */
|
#endif /* IX_NPEDL_READ_MICROCODE_FROM_FILE */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
/* For backward's compatibility with previous image format */
|
/* For backward's compatibility with previous image format */
|
||||||
if (ixNpeDlImageMgrSignatureCheck(imageLibrary))
|
if (ixNpeDlImageMgrSignatureCheck(imageLibrary))
|
||||||
{
|
{
|
||||||
|
@ -643,6 +646,7 @@ ixNpeDlImageMgrImageFind (
|
||||||
imagePtr,
|
imagePtr,
|
||||||
imageSize);
|
imageSize);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
while (*(imageLibrary+offset) == NPE_IMAGE_MARKER)
|
while (*(imageLibrary+offset) == NPE_IMAGE_MARKER)
|
||||||
{
|
{
|
||||||
|
|
|
@ -72,7 +72,6 @@ COBJS := npe.o \
|
||||||
IxNpeDlImageMgr.o \
|
IxNpeDlImageMgr.o \
|
||||||
IxNpeDlNpeMgr.o \
|
IxNpeDlNpeMgr.o \
|
||||||
IxNpeDlNpeMgrUtils.o \
|
IxNpeDlNpeMgrUtils.o \
|
||||||
IxNpeMicrocode.o \
|
|
||||||
IxNpeMh.o \
|
IxNpeMh.o \
|
||||||
IxNpeMhConfig.o \
|
IxNpeMhConfig.o \
|
||||||
IxNpeMhReceive.o \
|
IxNpeMhReceive.o \
|
||||||
|
@ -80,6 +79,9 @@ COBJS := npe.o \
|
||||||
IxNpeMhSolicitedCbMgr.o \
|
IxNpeMhSolicitedCbMgr.o \
|
||||||
IxNpeMhUnsolicitedCbMgr.o
|
IxNpeMhUnsolicitedCbMgr.o
|
||||||
|
|
||||||
|
ifndef CONFIG_IXP4XX_NPE_EXT_UCODE_BASE
|
||||||
|
COBJS += IxNpeMicrocode.o
|
||||||
|
endif
|
||||||
|
|
||||||
SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
|
SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c)
|
||||||
OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
|
OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS))
|
||||||
|
|
Loading…
Reference in New Issue