]> git.sur5r.net Git - u-boot/commitdiff
remove remaining CONFIG_OF_HAS_{UBOOT_ENV,BD_T} code
authorKim Phillips <kim.phillips@freescale.com>
Fri, 28 Mar 2008 22:37:49 +0000 (17:37 -0500)
committerGerald Van Baren <vanbaren@cideas.com>
Tue, 1 Apr 2008 23:46:44 +0000 (19:46 -0400)
finish off what commit 43ddd9c820fec44816188f53346b464e20b3142d,
"Remove deprecated CONFIG_OF_HAS_UBOOT_ENV and CONFIG_OF_HAS_BD_T"
started.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
README
common/ft_build.c
lib_ppc/bootm.c

diff --git a/README b/README
index 5cbe7c1e80daabeee8c43247db7041b999919025..18b720c235d2651c55707196f954e5347a6d3a02 100644 (file)
--- a/README
+++ b/README
@@ -372,19 +372,6 @@ The following options need to be configured:
 
                boards with QUICC Engines require OF_QE to set UCC mac addresses
 
-               CONFIG_OF_HAS_BD_T
-
-                * CONFIG_OF_LIBFDT - enables the "fdt bd_t" command
-                * CONFIG_OF_FLAT_TREE - The resulting flat device tree
-                    will have a copy of the bd_t.  Space should be
-                    pre-allocated in the dts for the bd_t.
-
-               CONFIG_OF_HAS_UBOOT_ENV
-
-                * CONFIG_OF_LIBFDT - enables the "fdt env" command
-                * CONFIG_OF_FLAT_TREE - The resulting flat device tree
-                    will have a copy of u-boot's environment variables
-
                CONFIG_OF_BOARD_SETUP
 
                Board code has addition modification that it wants to make
index 5a0575e89aa4036a6b1af7bf82d01c9426669a19..0e5699a95b84698d6adc30143ce67b5beb5db8d3 100644 (file)
@@ -399,72 +399,12 @@ void *ft_get_prop(void *bphp, const char *propname, int *szp)
 /* Function that returns a character from the environment */
 extern uchar(*env_get_char) (int);
 
-#define BDM(x) {       .name = #x, .offset = offsetof(bd_t, bi_ ##x ) }
-
-#ifdef CONFIG_OF_HAS_BD_T
-static const struct {
-       const char *name;
-       int offset;
-} bd_map[] = {
-       BDM(memstart),
-       BDM(memsize),
-       BDM(flashstart),
-       BDM(flashsize),
-       BDM(flashoffset),
-       BDM(sramstart),
-       BDM(sramsize),
-#if defined(CONFIG_5xx) || defined(CONFIG_8xx) || defined(CONFIG_8260) \
-       || defined(CONFIG_E500)
-       BDM(immr_base),
-#endif
-#if defined(CONFIG_MPC5xxx)
-       BDM(mbar_base),
-#endif
-#if defined(CONFIG_MPC83XX)
-       BDM(immrbar),
-#endif
-#if defined(CONFIG_MPC8220)
-       BDM(mbar_base),
-       BDM(inpfreq),
-       BDM(pcifreq),
-       BDM(pevfreq),
-       BDM(flbfreq),
-       BDM(vcofreq),
-#endif
-       BDM(bootflags),
-       BDM(ip_addr),
-       BDM(intfreq),
-       BDM(busfreq),
-#ifdef CONFIG_CPM2
-       BDM(cpmfreq),
-       BDM(brgfreq),
-       BDM(sccfreq),
-       BDM(vco),
-#endif
-#if defined(CONFIG_MPC5xxx)
-       BDM(ipbfreq),
-       BDM(pcifreq),
-#endif
-       BDM(baudrate),
-};
-#endif
-
 void ft_setup(void *blob, bd_t * bd, ulong initrd_start, ulong initrd_end)
 {
        u32 *p;
        int len;
        struct ft_cxt cxt;
        ulong clock;
-#if defined(CONFIG_OF_HAS_UBOOT_ENV)
-       int k, nxt;
-#endif
-#if defined(CONFIG_OF_HAS_BD_T)
-       u8 *end;
-#endif
-#if defined(CONFIG_OF_HAS_UBOOT_ENV) || defined(CONFIG_OF_HAS_BD_T)
-       int i;
-       static char tmpenv[256];
-#endif
 
        /* disable OF tree; booting old kernel */
        if (getenv("disable_of") != NULL) {
@@ -485,30 +425,6 @@ void ft_setup(void *blob, bd_t * bd, ulong initrd_start, ulong initrd_end)
        /* back into root */
        ft_backtrack_node(&cxt);
 
-#ifdef CONFIG_OF_HAS_UBOOT_ENV
-       ft_begin_node(&cxt, "u-boot-env");
-
-       for (i = 0; env_get_char(i) != '\0'; i = nxt + 1) {
-               char *s, *lval, *rval;
-
-               for (nxt = i; env_get_char(nxt) != '\0'; ++nxt) ;
-               s = tmpenv;
-               for (k = i; k < nxt && s < &tmpenv[sizeof(tmpenv) - 1]; ++k)
-                       *s++ = env_get_char(k);
-               *s++ = '\0';
-               lval = tmpenv;
-               s = strchr(tmpenv, '=');
-               if (s != NULL) {
-                       *s++ = '\0';
-                       rval = s;
-               } else
-                       continue;
-               ft_prop_str(&cxt, lval, rval);
-       }
-
-       ft_end_node(&cxt);
-#endif
-
        ft_begin_node(&cxt, "chosen");
        ft_prop_str(&cxt, "name", "chosen");
 
@@ -529,36 +445,7 @@ void ft_setup(void *blob, bd_t * bd, ulong initrd_start, ulong initrd_end)
        ft_end_tree(&cxt);
        ft_finalize_tree(&cxt);
 
-#ifdef CONFIG_OF_HAS_BD_T
-       /* paste the bd_t at the end of the flat tree */
-       end = (char *)blob +
-           be32_to_cpu(((struct boot_param_header *)blob)->totalsize);
-       memcpy(end, bd, sizeof(*bd));
-#endif
-
 #ifdef CONFIG_PPC
-
-#ifdef CONFIG_OF_HAS_BD_T
-       for (i = 0; i < sizeof(bd_map)/sizeof(bd_map[0]); i++) {
-               uint32_t v;
-
-               sprintf(tmpenv, "/bd_t/%s", bd_map[i].name);
-               v = *(uint32_t *)((char *)bd + bd_map[i].offset);
-
-               p = ft_get_prop(blob, tmpenv, &len);
-               if (p != NULL)
-                       *p = cpu_to_be32(v);
-       }
-
-       p = ft_get_prop(blob, "/bd_t/enetaddr", &len);
-       if (p != NULL)
-               memcpy(p, bd->bi_enetaddr, 6);
-
-       p = ft_get_prop(blob, "/bd_t/ethspeed", &len);
-       if (p != NULL)
-               *p = cpu_to_be32((uint32_t) bd->bi_ethspeed);
-#endif
-
        clock = bd->bi_intfreq;
        p = ft_get_prop(blob, "/cpus/" OF_CPU "/clock-frequency", &len);
        if (p != NULL)
index b893146fcb5be2cdb17ddb4941a9f64393d7b046..29016075d78222df623510f2c09992e2e8a825bd 100644 (file)
@@ -184,18 +184,6 @@ do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[],
                        fdt_error ("/chosen node create failed");
                        goto error;
                }
-#ifdef CONFIG_OF_HAS_UBOOT_ENV
-               if (fdt_env(of_flat_tree) < 0) {
-                       fdt_error ("/u-boot-env node create failed");
-                       goto error;
-               }
-#endif
-#ifdef CONFIG_OF_HAS_BD_T
-               if (fdt_bd_t(of_flat_tree) < 0) {
-                       fdt_error ("/bd_t node create failed");
-                       goto error;
-               }
-#endif
 #ifdef CONFIG_OF_BOARD_SETUP
                /* Call the board-specific fixup routine */
                ft_board_setup(of_flat_tree, gd->bd);