public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] add ft_cpu_setup(..)-function for mpc8260
@ 2007-09-05 14:01 Sergej Stepanov
  2007-09-06 22:31 ` Wolfgang Denk
  0 siblings, 1 reply; 3+ messages in thread
From: Sergej Stepanov @ 2007-09-05 14:01 UTC (permalink / raw)
  To: u-boot

Hello everybody.

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

Signed-off-by: Sergej Stepanov <Sergej.Stepanov@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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-09-07  1:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-05 14:01 [U-Boot-Users] [PATCH] add ft_cpu_setup(..)-function for mpc8260 Sergej Stepanov
2007-09-06 22:31 ` Wolfgang Denk
2007-09-07  1:09   ` Jerry Van Baren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox