File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ config SUPERH
66 select ARCH_ENABLE_MEMORY_HOTREMOVE if SPARSEMEM && MMU
77 select ARCH_HAVE_NMI_SAFE_CMPXCHG if (GUSA_RB || CPU_SH4A)
88 select ARCH_HAS_BINFMT_FLAT if !MMU
9+ select ARCH_HAS_CPU_FINALIZE_INIT
910 select ARCH_HAS_CURRENT_STACK_POINTER
1011 select ARCH_HAS_GIGANTIC_PAGE
1112 select ARCH_HAS_GCOV_PROFILE_ALL
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -166,6 +166,8 @@ extern unsigned int instruction_size(unsigned int insn);
166166#define instruction_size (insn ) (2)
167167#endif
168168
169+ void select_idle_routine (void );
170+
169171#endif /* __ASSEMBLY__ */
170172
171173#include <asm/processor_32.h>
Original file line number Diff line number Diff line change 1515#include <linux/irqflags.h>
1616#include <linux/smp.h>
1717#include <linux/atomic.h>
18+ #include <asm/processor.h>
1819#include <asm/smp.h>
1920#include <asm/bl_bit.h>
2021
Original file line number Diff line number Diff line change 4343#include <asm/smp.h>
4444#include <asm/mmu_context.h>
4545#include <asm/mmzone.h>
46+ #include <asm/processor.h>
4647#include <asm/sparsemem.h>
4748#include <asm/platform_early.h>
4849
@@ -354,3 +355,57 @@ int test_mode_pin(int pin)
354355{
355356 return sh_mv .mv_mode_pins () & pin ;
356357}
358+
359+ void __init arch_cpu_finalize_init (void )
360+ {
361+ char * p = & init_utsname ()-> machine [2 ]; /* "sh" */
362+
363+ select_idle_routine ();
364+
365+ current_cpu_data .loops_per_jiffy = loops_per_jiffy ;
366+
367+ switch (current_cpu_data .family ) {
368+ case CPU_FAMILY_SH2 :
369+ * p ++ = '2' ;
370+ break ;
371+ case CPU_FAMILY_SH2A :
372+ * p ++ = '2' ;
373+ * p ++ = 'a' ;
374+ break ;
375+ case CPU_FAMILY_SH3 :
376+ * p ++ = '3' ;
377+ break ;
378+ case CPU_FAMILY_SH4 :
379+ * p ++ = '4' ;
380+ break ;
381+ case CPU_FAMILY_SH4A :
382+ * p ++ = '4' ;
383+ * p ++ = 'a' ;
384+ break ;
385+ case CPU_FAMILY_SH4AL_DSP :
386+ * p ++ = '4' ;
387+ * p ++ = 'a' ;
388+ * p ++ = 'l' ;
389+ * p ++ = '-' ;
390+ * p ++ = 'd' ;
391+ * p ++ = 's' ;
392+ * p ++ = 'p' ;
393+ break ;
394+ case CPU_FAMILY_UNKNOWN :
395+ /*
396+ * Specifically use CPU_FAMILY_UNKNOWN rather than
397+ * default:, so we're able to have the compiler whine
398+ * about unhandled enumerations.
399+ */
400+ break ;
401+ }
402+
403+ pr_info ("CPU: %s\n" , get_cpu_subtype (& current_cpu_data ));
404+
405+ #ifndef __LITTLE_ENDIAN__
406+ /* 'eb' means 'Endian Big' */
407+ * p ++ = 'e' ;
408+ * p ++ = 'b' ;
409+ #endif
410+ * p = '\0' ;
411+ }
You can’t perform that action at this time.
0 commit comments