summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKim Phillips <kim.phillips@freescale.com>2008-03-28 17:37:49 -0500
committerGerald Van Baren <vanbaren@cideas.com>2008-04-01 19:46:44 -0400
commit6fe2946f198481254a6ee9600d7456b8316a4083 (patch)
tree718919a1bb2a41942600eed7496abdc25fcf31de
parent3596d55eb22703d3f4f1b839fe4b000fabe081b3 (diff)
downloadu-boot-imx-6fe2946f198481254a6ee9600d7456b8316a4083.zip
u-boot-imx-6fe2946f198481254a6ee9600d7456b8316a4083.tar.gz
u-boot-imx-6fe2946f198481254a6ee9600d7456b8316a4083.tar.bz2
remove remaining CONFIG_OF_HAS_{UBOOT_ENV,BD_T} code
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>
-rw-r--r--README13
-rw-r--r--common/ft_build.c113
-rw-r--r--lib_ppc/bootm.c12
3 files changed, 0 insertions, 138 deletions
diff --git a/README b/README
index 5cbe7c1..18b720c 100644
--- 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
diff --git a/common/ft_build.c b/common/ft_build.c
index 5a0575e..0e5699a 100644
--- a/common/ft_build.c
+++ b/common/ft_build.c
@@ -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)
diff --git a/lib_ppc/bootm.c b/lib_ppc/bootm.c
index b893146..2901607 100644
--- a/lib_ppc/bootm.c
+++ b/lib_ppc/bootm.c
@@ -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);