]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
sh: Add plat_early_device_setup()
authorMagnus Damm <damm@igel.co.jp>
Wed, 15 Apr 2009 10:50:21 +0000 (10:50 +0000)
committerPaul Mundt <lethal@linux-sh.org>
Sun, 19 Apr 2009 04:06:25 +0000 (13:06 +0900)
Add a plat_early_device_setup() function to allow
processor-specific code to register Early Platform Data.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/include/asm/device.h
arch/sh/kernel/setup.c

index efd511d0803ad4002fcb73f8a04af39aa51eede3..8688a88303ee79f3b422ca81f76d34287aa1a791 100644 (file)
@@ -10,3 +10,5 @@ struct platform_device;
 int platform_resource_setup_memory(struct platform_device *pdev,
                                   char *name, unsigned long memsize);
 
+void plat_early_device_setup(void);
+
index 04a6004fccc45d39d25087ebd00c29025f0f824f..22b976d420142aa0ca3bb6f33a868d6ae1aa54e5 100644 (file)
@@ -29,6 +29,7 @@
 #include <linux/mmzone.h>
 #include <linux/clk.h>
 #include <linux/delay.h>
+#include <linux/platform_device.h>
 #include <asm/uaccess.h>
 #include <asm/io.h>
 #include <asm/page.h>
@@ -328,6 +329,10 @@ static int __init parse_elfcorehdr(char *arg)
 early_param("elfcorehdr", parse_elfcorehdr);
 #endif
 
+void __init __attribute__ ((weak)) plat_early_device_setup(void)
+{
+}
+
 void __init setup_arch(char **cmdline_p)
 {
        enable_mmu();
@@ -381,6 +386,8 @@ void __init setup_arch(char **cmdline_p)
 
        parse_early_param();
 
+       plat_early_device_setup();
+
        sh_mv_setup();
 
        /*