linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] make platform_init() weak for 8xx
@ 2004-07-19 16:13 Andreas Oberritter
  2004-07-19 16:32 ` Tom Rini
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Oberritter @ 2004-07-19 16:13 UTC (permalink / raw)
  To: Tom Rini; +Cc: linuxppc-embedded

[-- Attachment #1: Type: text/plain, Size: 269 bytes --]

Hi Tom,

this patch renames platform_init to m8xx_init in m8xx_setup.c and adds
new weak platform_init, which can be overridden by boards to allow them
to e.g. register platform_devices like redwood5.c does for 40x.

Signed-off-by: Andreas Oberritter <obi@saftware.de>

[-- Attachment #2: m8xx_setup.diff --]
[-- Type: text/x-patch, Size: 1302 bytes --]

===== arch/ppc/syslib/m8xx_setup.c 1.29 vs edited =====
--- 1.29/arch/ppc/syslib/m8xx_setup.c	2004-05-28 00:37:33 +02:00
+++ edited/arch/ppc/syslib/m8xx_setup.c	2004-07-19 17:54:03 +02:00
@@ -47,6 +47,7 @@
 #include <asm/xmon.h>

 #include "ppc8xx_pic.h"
+#include "m8xx_setup.h"

 static int m8xx_set_rtc_time(unsigned long time);
 static unsigned long m8xx_get_rtc_time(void);
@@ -363,7 +364,7 @@
 }

 void __init
-platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
+m8xx_init(unsigned long r3, unsigned long r4, unsigned long r5,
 		unsigned long r6, unsigned long r7)
 {
 	parse_bootinfo(find_bootinfo());
@@ -413,3 +414,11 @@
 	m8xx_ide_init();
 #endif
 }
+
+void __init __attribute__ ((weak))
+platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
+		unsigned long r6, unsigned long r7)
+{
+	m8xx_init(r3, r4, r5, r6, r7);
+}
+
--- /dev/null	2004-07-17 13:36:50.945552208 +0200
+++ edited/arch/ppc/syslib/m8xx_setup.h	2004-07-19 17:15:37.854994064 +0200
@@ -0,0 +1,12 @@
+/*
+ * arch/ppc/syslib/m8xx_setup.h
+ */
+
+#ifndef _PPC_SYSLIB_M8XX_SETUP_H
+#define _PPC_SYSLIB_M8XX_SETUP_H
+
+void m8xx_init(unsigned long r3, unsigned long r4, unsigned long r5,
+		unsigned long r6, unsigned long r7);
+void m8xx_setup_arch(void);
+
+#endif /* _PPC_SYSLIB_M8XX_SETUP_H */

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

end of thread, other threads:[~2004-07-27 21:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-19 16:13 [PATCH] make platform_init() weak for 8xx Andreas Oberritter
2004-07-19 16:32 ` Tom Rini
2004-07-19 17:34   ` Andreas Oberritter
2004-07-19 18:20     ` Tom Rini
2004-07-23 13:59       ` [PATCH] add board_init() (was [PATCH] make platform_init() weak for 8xx) Andreas Oberritter
2004-07-27 21:01         ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).