Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
[pandora-kernel.git] / arch / sh / kernel / setup.c
index 04a6004..dd38338 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>
@@ -155,7 +156,7 @@ static void __init reserve_crashkernel(void)
                        &crash_size, &crash_base);
        if (ret == 0 && crash_size) {
                if (crash_base <= 0) {
-                       vp = alloc_bootmem_nopanic(crash_size); 
+                       vp = alloc_bootmem_nopanic(crash_size);
                        if (!vp) {
                                printk(KERN_INFO "crashkernel allocation "
                                       "failed\n");
@@ -184,7 +185,6 @@ static inline void __init reserve_crashkernel(void)
 {}
 #endif
 
-#ifndef CONFIG_GENERIC_CALIBRATE_DELAY
 void __cpuinit calibrate_delay(void)
 {
        struct clk *clk = clk_get(NULL, "cpu_clk");
@@ -200,7 +200,6 @@ void __cpuinit calibrate_delay(void)
                         (loops_per_jiffy/(5000/HZ)) % 100,
                         loops_per_jiffy);
 }
-#endif
 
 void __init __add_active_range(unsigned int nid, unsigned long start_pfn,
                                                unsigned long end_pfn)
@@ -328,6 +327,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 +384,8 @@ void __init setup_arch(char **cmdline_p)
 
        parse_early_param();
 
+       plat_early_device_setup();
+
        sh_mv_setup();
 
        /*
@@ -415,6 +420,18 @@ void __init setup_arch(char **cmdline_p)
 #endif
 }
 
+/* processor boot mode configuration */
+int generic_mode_pins(void)
+{
+       pr_warning("generic_mode_pins(): missing mode pin configuration\n");
+       return 0;
+}
+
+int test_mode_pin(int pin)
+{
+       return sh_mv.mv_mode_pins() & pin;
+}
+
 static const char *cpu_name[] = {
        [CPU_SH7201]    = "SH7201",
        [CPU_SH7203]    = "SH7203",     [CPU_SH7263]    = "SH7263",
@@ -435,7 +452,8 @@ static const char *cpu_name[] = {
        [CPU_SH7722]    = "SH7722",     [CPU_SHX3]      = "SH-X3",
        [CPU_SH5_101]   = "SH5-101",    [CPU_SH5_103]   = "SH5-103",
        [CPU_MXG]       = "MX-G",       [CPU_SH7723]    = "SH7723",
-       [CPU_SH7366]    = "SH7366",     [CPU_SH_NONE]   = "Unknown"
+       [CPU_SH7366]    = "SH7366",     [CPU_SH7724]    = "SH7724",
+       [CPU_SH_NONE]   = "Unknown"
 };
 
 const char *get_cpu_subtype(struct sh_cpuinfo *c)