public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] PATCH: load ixp42x NPE firmware from separate flash block, remove dead code
@ 2007-11-10 15:44 Michael Schwingen
  2008-01-09 10:47 ` Wolfgang Denk
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Schwingen @ 2007-11-10 15:44 UTC (permalink / raw)
  To: u-boot

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 <michael@schwingen.org>

diff --git a/cpu/ixp/npe/IxNpeDl.c b/cpu/ixp/npe/IxNpeDl.c
index ffe355c..572f314 100644
--- a/cpu/ixp/npe/IxNpeDl.c
+++ b/cpu/ixp/npe/IxNpeDl.c
@@ -108,6 +108,7 @@ static BOOL ixNpeDlNpeStarted[IX_NPEDL_NPEID_MAX] ={FALSE, FALSE, FALSE} ;
 PRIVATE IX_STATUS
 ixNpeDlNpeInitAndStartInternal (UINT32 *imageLibrary, UINT32 imageId);
 
+#if 0
 /*
  * Function definition: ixNpeDlMicrocodeImageLibraryOverride
  */
@@ -139,6 +140,7 @@ ixNpeDlMicrocodeImageLibraryOverride (UINT32 *clientImageLibrary)
                      "status = %d\n", status);
     return status;
 }
+#endif
 
 /*
  * Function definition: ixNpeDlImageDownload
diff --git a/cpu/ixp/npe/IxNpeDlImageMgr.c b/cpu/ixp/npe/IxNpeDlImageMgr.c
index e05c228..069b505 100644
--- a/cpu/ixp/npe/IxNpeDlImageMgr.c
+++ b/cpu/ixp/npe/IxNpeDlImageMgr.c
@@ -134,8 +134,8 @@ typedef struct
 static IxNpeDlImageMgrStats ixNpeDlImageMgrStats;
 
 /* default image */
-#ifdef IX_NPEDL_READ_MICROCODE_FROM_FILE
-static UINT32 *IxNpeMicroCodeImageLibrary = NULL;  /* Gets set to proper value at runtime */
+#ifdef CONFIG_IXP4XX_NPE_EXT_UCODE_BASE
+static UINT32 *IxNpeMicroCodeImageLibrary = (UINT32 *)CONFIG_IXP4XX_NPE_EXT_UCODE_BASE;
 #else
 static UINT32 *IxNpeMicroCodeImageLibrary = (UINT32 *)IxNpeMicrocode_array;
 #endif
@@ -158,6 +158,7 @@ PRIVATE BOOL
 ixNpeDlImageMgrNpeFunctionIdCompare (IxNpeDlImageId *imageIdA,
     				       IxNpeDlImageId *imageIdB);
 
+#if 0
 PRIVATE IX_STATUS
 ixNpeDlImageMgrImageFind_legacy (UINT32 *imageLibrary,
                                  UINT32 imageId,
@@ -195,7 +196,7 @@ ixNpeDlImageMgrMicrocodeImageLibraryOverride (
 		     status);
     return status;
 }
-
+#endif
 
 /*
  * Function definition: ixNpeDlImageMgrImageListExtract
@@ -527,6 +528,7 @@ ixNpeDlImageMgrStatsReset (void)
 }
 
 
+#if 0
 /*
  * Function definition: ixNpeDlImageMgrImageFind_legacy
  *
@@ -600,7 +602,7 @@ ixNpeDlImageMgrImageFind_legacy (
 		     "Exiting ixNpeDlImageMgrImageFind: status = %d\n", status);
     return status;
 }
-
+#endif
 
 /*
  * Function definition: ixNpeDlImageMgrImageFind
@@ -635,6 +637,7 @@ ixNpeDlImageMgrImageFind (
 #endif /* IX_NPEDL_READ_MICROCODE_FROM_FILE */
     }
 
+#if 0
     /* For backward's compatibility with previous image format */
     if (ixNpeDlImageMgrSignatureCheck(imageLibrary))
     {
@@ -643,6 +646,7 @@ ixNpeDlImageMgrImageFind (
                                                imagePtr,
                                                imageSize);
     }
+#endif
 
     while (*(imageLibrary+offset) == NPE_IMAGE_MARKER)
     {

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot-Users] PATCH: load ixp42x NPE firmware from separate flash block, remove dead code
  2007-11-10 15:44 [U-Boot-Users] PATCH: load ixp42x NPE firmware from separate flash block, remove dead code Michael Schwingen
@ 2008-01-09 10:47 ` Wolfgang Denk
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Denk @ 2008-01-09 10:47 UTC (permalink / raw)
  To: u-boot

In message <20071110154411.GA11163@discworld.dascon.de> you wrote:
> 
> 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 <michael@schwingen.org>

I appreciate this patch, yet I have to NAK it in it's current form.

> diff --git a/cpu/ixp/npe/IxNpeDl.c b/cpu/ixp/npe/IxNpeDl.c
> index ffe355c..572f314 100644
> --- a/cpu/ixp/npe/IxNpeDl.c
> +++ b/cpu/ixp/npe/IxNpeDl.c
> @@ -108,6 +108,7 @@ static BOOL ixNpeDlNpeStarted[IX_NPEDL_NPEID_MAX] ={FALSE, FALSE, FALSE} ;
>  PRIVATE IX_STATUS
>  ixNpeDlNpeInitAndStartInternal (UINT32 *imageLibrary, UINT32 imageId);
>  
> +#if 0
>  /*
>   * Function definition: ixNpeDlMicrocodeImageLibraryOverride
>   */
> @@ -139,6 +140,7 @@ ixNpeDlMicrocodeImageLibraryOverride (UINT32 *clientImageLibrary)
>                       "status = %d\n", status);
>      return status;
>  }
> +#endif
...
> +#if 0
...
> +#endif

etc.

Please don't do this - instead, remove the dead code.

We have a source code management system to track such changes.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
C++ was an interesting and valuable experiment, but we've learned its
lessons and it's time to move on.
                            - Peter Curran in <DCqM4z.BxB@isgtec.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-01-09 10:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-10 15:44 [U-Boot-Users] PATCH: load ixp42x NPE firmware from separate flash block, remove dead code Michael Schwingen
2008-01-09 10:47 ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox