[U-Boot-Users] [PATCH] add ft_cpu_setup(..)-function for mpc8260

Sergej Stepanov Sergej.Stepanov at ids.de
Wed Sep 5 16:01:45 CEST 2007


Hello everybody.

On proposal from Heiko Schocher:
 This patch adds ft_cpu_setup(..) - function for mpc8260.

Signed-off-by: Sergej Stepanov <Sergej.Stepanov at ids.de>
--

diff -pruN --exclude='\.svn' u-boot-1.2.0-orig/cpu/mpc8260/cpu.c u-boot-1.2.0/cpu/mpc8260/cpu.c
--- u-boot-1.2.0-orig/cpu/mpc8260/cpu.c	2007-01-07 00:13:11.000000000 +0100
+++ u-boot-1.2.0/cpu/mpc8260/cpu.c	2007-09-03 14:02:54.000000000 +0200
@@ -294,3 +294,18 @@ void watchdog_reset (void)
 #endif /* CONFIG_WATCHDOG */
 
 /* ------------------------------------------------------------------------- */
+
+#if defined(CONFIG_OF_FLAT_TREE)
+void ft_cpu_setup (void *blob, bd_t *bd)
+{
+	u32 *p;
+	ulong clock;
+	int len;
+
+	clock = bd->bi_busfreq;
+	p = ft_get_prop (blob, "/cpus/" OF_CPU "/bus-frequency", &len);
+	if (p != NULL)
+		*p = cpu_to_be32 (clock);
+}
+#endif /* CONFIG_OF_FLAT_TREE */
+/* ------------------------------------------------------------------------- */


-- 
Sergej I. Stepanov
IDS GmbH
Nobelstr. 18, Zim. 2.1.05
D-76275 Ettlingen
T +49 (0) 72 43/2 18-615
F +49 (0) 72 43/2 18-400
http://www.ids.de
Email: Sergej.Stepanov at ids.de





More information about the U-Boot mailing list