summaryrefslogtreecommitdiff
path: root/cpu/74xx_7xx
diff options
context:
space:
mode:
authorMarkus Klotzbuecher <mk@denx.de>2008-07-10 10:26:07 +0200
committerMarkus Klotzbuecher <mk@denx.de>2008-07-10 10:26:07 +0200
commit794a5924972fc8073616e98a2668da4a5f9aea90 (patch)
treedd0db39b3e183b5bcb0300d5377d7a0d5ac5fd0c /cpu/74xx_7xx
parentf2aeecc320f5b181b30effcaa67683aec8d5a843 (diff)
parent4188f0491886b3b486164e819c0a83fdb97efd7d (diff)
downloadu-boot-imx-794a5924972fc8073616e98a2668da4a5f9aea90.zip
u-boot-imx-794a5924972fc8073616e98a2668da4a5f9aea90.tar.gz
u-boot-imx-794a5924972fc8073616e98a2668da4a5f9aea90.tar.bz2
Merge branch 'master' of git://www.denx.de/git/u-boot
Diffstat (limited to 'cpu/74xx_7xx')
-rw-r--r--cpu/74xx_7xx/cpu.c35
-rw-r--r--cpu/74xx_7xx/start.S6
2 files changed, 16 insertions, 25 deletions
diff --git a/cpu/74xx_7xx/cpu.c b/cpu/74xx_7xx/cpu.c
index 9c8998b..ea43c9a 100644
--- a/cpu/74xx_7xx/cpu.c
+++ b/cpu/74xx_7xx/cpu.c
@@ -44,8 +44,9 @@
#include <74xx_7xx.h>
#include <asm/cache.h>
-#if defined(CONFIG_OF_FLAT_TREE)
-#include <ft_build.h>
+#if defined(CONFIG_OF_LIBFDT)
+#include <libfdt.h>
+#include <fdt_support.h>
#endif
#ifdef CONFIG_AMIGAONEG3SE
@@ -301,29 +302,19 @@ watchdog_reset(void)
/* ------------------------------------------------------------------------- */
-#ifdef CONFIG_OF_FLAT_TREE
-void
-ft_cpu_setup (void *blob, bd_t *bd)
+#ifdef CONFIG_OF_LIBFDT
+void ft_cpu_setup(void *blob, bd_t *bd)
{
- u32 *p;
- ulong clock;
- int len;
-
- clock = bd->bi_busfreq;
+ do_fixup_by_prop_u32(blob, "device_type", "cpu", 4,
+ "timebase-frequency", bd->bi_busfreq / 4, 1);
+ do_fixup_by_prop_u32(blob, "device_type", "cpu", 4,
+ "bus-frequency", bd->bi_busfreq, 1);
+ do_fixup_by_prop_u32(blob, "device_type", "cpu", 4,
+ "clock-frequency", bd->bi_intfreq, 1);
- p = ft_get_prop (blob, "/cpus/" OF_CPU "/bus-frequency", &len);
- if (p != NULL)
- *p = cpu_to_be32 (clock);
+ fdt_fixup_memory(blob, (u64)bd->bi_memstart, (u64)bd->bi_memsize);
-#if defined(CONFIG_TSI108_ETH)
- p = ft_get_prop (blob, "/" OF_TSI "/ethernet@6200/address", &len);
- memcpy (p, bd->bi_enetaddr, 6);
-#endif
-
-#if defined(CONFIG_HAS_ETH1)
- p = ft_get_prop (blob, "/" OF_TSI "/ethernet@6600/address", &len);
- memcpy (p, bd->bi_enet1addr, 6);
-#endif
+ fdt_fixup_ethernet(blob, bd);
}
#endif
/* ------------------------------------------------------------------------- */
diff --git a/cpu/74xx_7xx/start.S b/cpu/74xx_7xx/start.S
index b5834b9..42b0f72 100644
--- a/cpu/74xx_7xx/start.S
+++ b/cpu/74xx_7xx/start.S
@@ -316,7 +316,7 @@ invalidate_bats:
mtspr IBAT1U, r0
mtspr IBAT2U, r0
mtspr IBAT3U, r0
-#ifdef CONFIG_750FX
+#ifdef CONFIG_HIGH_BATS
mtspr IBAT4U, r0
mtspr IBAT5U, r0
mtspr IBAT6U, r0
@@ -327,7 +327,7 @@ invalidate_bats:
mtspr DBAT1U, r0
mtspr DBAT2U, r0
mtspr DBAT3U, r0
-#ifdef CONFIG_750FX
+#ifdef CONFIG_HIGH_BATS
mtspr DBAT4U, r0
mtspr DBAT5U, r0
mtspr DBAT6U, r0
@@ -414,7 +414,7 @@ setup_bats:
mtspr DBAT3U, r3
isync
-#ifdef CONFIG_750FX
+#ifdef CONFIG_HIGH_BATS
/* IBAT 4 */
addis r4, r0, CFG_IBAT4L@h
ori r4, r4, CFG_IBAT4L@l