ixp: remove the option to include the Microcode
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Sat, 31 Jan 2009 08:53:39 +0000 (09:53 +0100)
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Sat, 31 Jan 2009 08:53:39 +0000 (09:53 +0100)
instead the board will have to load it from flash or ram
which will be specified by npe_ucode env var

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
README
cpu/ixp/npe/IxNpeDlImageMgr.c
cpu/ixp/npe/Makefile
include/configs/actux1.h
include/configs/actux2.h
include/configs/actux3.h
include/configs/actux4.h

diff --git a/README b/README
index 86c1304f91b1567ce26d67df13580743099a849e..522471cf781a55ed85e41e23832e5dfa6edf1aa4 100644 (file)
--- a/README
+++ b/README
@@ -3021,8 +3021,7 @@ Some configuration options can be set using Environment Variables:
                  Useful on scripts which control the retry operation
                  themselves.
 
-  npe_ucode    - see CONFIG_IXP4XX_NPE_EXT_UCOD
-                 if set load address for the NPE microcode
+  npe_ucode    - set load address for the NPE microcode
 
   tftpsrcport  - If this is set, the value is used for TFTP's
                  UDP source port.
index ccc0da7ebde86838b17bdd8a60da138ea222e0e5..9bcdc9c0d885ea103fbfa7be96b7dc95eedfd51e 100644 (file)
@@ -133,20 +133,14 @@ typedef struct
  */
 static IxNpeDlImageMgrStats ixNpeDlImageMgrStats;
 
-/* default image */
-#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
-
 static UINT32* getIxNpeMicroCodeImageLibrary(void)
 {
        char *s;
+
        if ((s = getenv("npe_ucode")) != NULL)
                return (UINT32*) simple_strtoul(s, NULL, 16);
        else
-               return IxNpeMicroCodeImageLibrary;
+               return NULL;
 }
 
 /*
@@ -422,7 +416,7 @@ ixNpeDlImageMgrSignatureCheck (UINT32 *microCodeImageLibrary)
        (IxNpeDlImageMgrImageLibraryHeader *) microCodeImageLibrary;
     BOOL result = TRUE;
 
-    if (header->signature != IX_NPEDL_IMAGEMGR_SIGNATURE)
+    if (!header || header->signature != IX_NPEDL_IMAGEMGR_SIGNATURE)
     {
        result = FALSE;
        ixNpeDlImageMgrStats.invalidSignature++;
@@ -643,6 +637,11 @@ ixNpeDlImageMgrImageFind (
        }
 #else
        imageLibrary = getIxNpeMicroCodeImageLibrary();
+       if (imageLibrary == NULL)
+        {
+           printf ("npe:  ERROR, no Microcode found in memory\n");
+           return IX_FAIL;
+       }
 #endif /* IX_NPEDL_READ_MICROCODE_FROM_FILE */
     }
 
index aa664a16d47231c208e0a34814db9f0cc4a5a2e1..9309f37f63b12efc04c5f23082fd8c256eeca7c9 100644 (file)
@@ -79,10 +79,6 @@ COBJS-$(CONFIG_IXP4XX_NPE) := npe.o \
        IxNpeMhSolicitedCbMgr.o \
        IxNpeMhUnsolicitedCbMgr.o
 
-ifndef CONFIG_IXP4XX_NPE_EXT_UCODE_BASE
-COBJS-$(CONFIG_IXP4XX_NPE) += IxNpeMicrocode.o
-endif
-
 SRCS   := $(SOBJS:.o=.S) $(COBJS-y:.o=.c)
 OBJS   := $(addprefix $(obj),$(COBJS-y))
 SOBJS  := $(addprefix $(obj),$(SOBJS))
index a3b04b1affbf18276b819dee0b84b6dbb771c308..58d56ee8c931f482e56d504ea491d739334a0a0b 100644 (file)
 
 /* include IXP4xx NPE support */
 #define CONFIG_IXP4XX_NPE              1
-/* use separate flash sector with ucode images */
-#define CONFIG_IXP4XX_NPE_EXT_UCODE_BASE       0x50040000
 #define CONFIG_NET_MULTI               1
 /* NPE0 PHY address */
 #define        CONFIG_PHY_ADDR                 0
 #define CONFIG_SYS_USE_PPCENV                  1
 
 #define CONFIG_EXTRA_ENV_SETTINGS \
+       "npe_ucode=50040000\0"                                          \
        "mtd=IXP4XX-Flash.0:256k(uboot),64k(ucode),1152k(linux),-(root)\0" \
        "kerneladdr=50050000\0"                                         \
        "rootaddr=50170000\0"                                           \
index 7e6e8f28248768d3b1aabf63a94b830ea9cfa5a4..6f59a510e73c8d26751b5d671c19399d8f9616be 100644 (file)
 
 /* include IXP4xx NPE support */
 #define CONFIG_IXP4XX_NPE              1
-/* use separate flash sector with ucode images */
-#define CONFIG_IXP4XX_NPE_EXT_UCODE_BASE       0x50040000
 #define CONFIG_NET_MULTI               1
 /* NPE0 PHY address */
 #define        CONFIG_PHY_ADDR                 0x00
 #define CONFIG_SYS_USE_PPCENV                  1
 
 #define CONFIG_EXTRA_ENV_SETTINGS                                      \
+       "npe_ucode=50040000\0"                                          \
        "mtd=IXP4XX-Flash.0:256k(uboot),64k(ucode),1152k(linux),-(root)\0" \
        "kerneladdr=50050000\0"                                         \
        "rootaddr=50170000\0"                                           \
index 3f42ed497cdb158ecaf611e302e39a58bb8d47fb..a7bb38c912a5b9915bff7ce9cfbecc3650df10a7 100644 (file)
 
 /* include IXP4xx NPE support */
 #define CONFIG_IXP4XX_NPE              1
-/* use separate flash sector with ucode images */
-#define CONFIG_IXP4XX_NPE_EXT_UCODE_BASE       0x50040000
 
 #define CONFIG_NET_MULTI               1
 /* NPE0 PHY address */
 #define CONFIG_SYS_USE_PPCENV                  1
 
 #define CONFIG_EXTRA_ENV_SETTINGS                                      \
+       "npe_ucode=50040000\0"                                          \
        "mtd=IXP4XX-Flash.0:256k(uboot),64k(ucode),1152k(linux),-(root)\0" \
        "kerneladdr=50050000\0"                                         \
        "rootaddr=50170000\0"                                           \
index 3cf1b2058b25de00bac2ff1a1d75d33be9dc23dd..f2b701f8f156181367be90154d067e99a89d0cf7 100644 (file)
 
 /* include IXP4xx NPE support */
 #define CONFIG_IXP4XX_NPE              1
-/* use separate flash sector with ucode images */
-#define CONFIG_IXP4XX_NPE_EXT_UCODE_BASE       0x51000000
 
 #define CONFIG_NET_MULTI               1
 /* NPE0 PHY address */
 #define CONFIG_ENV_ADDR                        (PHYS_FLASH_1 + 0x3f000)
 
 #define CONFIG_EXTRA_ENV_SETTINGS                                      \
+       "npe_ucode=51000000\0"                                          \
        "mtd=IXP4XX-Flash.0:252k(uboot),4k(uboot_env);"                 \
        "IXP4XX-Flash.1:128k(ucode),1280k(linux),-(root)\0"             \
        "kerneladdr=51020000\0"                                         \