env: Rename getenv_hex(), getenv_yesno(), getenv_ulong()
[oweals/u-boot.git] / arch / powerpc / cpu / mpc85xx / fdt.c
index 67140ba9ee181a1f102c5887153f0beafb809d16..64b0a51f75e74fa15a866205a657859155278aa2 100644 (file)
@@ -92,7 +92,7 @@ void ft_fixup_cpu(void *blob, u64 memory_limit)
         * Extract hwconfig from environment.
         * Search for tdm entry in hwconfig.
         */
-       ret = getenv_f("hwconfig", buffer, sizeof(buffer));
+       ret = env_get_f("hwconfig", buffer, sizeof(buffer));
        if (ret > 0)
                tdm_hwconfig_enabled = hwconfig_f("tdm", buffer);
 
@@ -612,8 +612,6 @@ void ft_cpu_setup(void *blob, bd_t *bd)
        }
 #endif
 
-       fdt_fixup_ethernet(blob);
-
        fdt_add_enet_stashing(blob);
 
 #ifndef CONFIG_FSL_TBCLK_EXTRA_DIV
@@ -772,8 +770,15 @@ int ft_verify_fdt(void *fdt)
 
        /* First check the CCSR base address */
        off = fdt_node_offset_by_prop_value(fdt, -1, "device_type", "soc", 4);
-       if (off > 0)
-               addr = fdt_get_base_address(fdt, off);
+       if (off > 0) {
+               int size;
+               u32 naddr;
+               const fdt32_t *prop;
+
+               naddr = fdt_address_cells(fdt, off);
+               prop = fdt_getprop(fdt, off, "ranges", &size);
+               addr = fdt_translate_address(fdt, off, prop + naddr);
+       }
 
        if (!addr) {
                printf("Warning: could not determine base CCSR address in "