aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68knommu
diff options
context:
space:
mode:
authorGreg Ungerer <gerg@snapgear.com>2006-06-25 20:33:10 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-25 20:43:34 -0400
commit7877d01e8ea205e047fa308e20e5e05c58952b1a (patch)
tree3a282993e3f97a832cccab7b9d61c59ad3d72634 /arch/m68knommu
parentbb28632c0d651f26dddf99afb7d7703e8e0ce293 (diff)
[PATCH] m68knommu: cleanup setup.c
A cleanup of m68knommu/kernel/setup.c : - No need to initialize global pointers to NULL, they will have that value automatically, and they eat up space in my data segment image in FLASH. - Remove get_cpuinfo. It has been replaced by show_cpuinfo. Signed-off-by: Philippe De Muyter <phdm@macqel.be> Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/m68knommu')
-rw-r--r--arch/m68knommu/kernel/setup.c68
1 files changed, 21 insertions, 47 deletions
diff --git a/arch/m68knommu/kernel/setup.c b/arch/m68knommu/kernel/setup.c
index 93120b9bfff1..99d038e9ab31 100644
--- a/arch/m68knommu/kernel/setup.c
+++ b/arch/m68knommu/kernel/setup.c
@@ -42,7 +42,6 @@
42#include <asm/pgtable.h> 42#include <asm/pgtable.h>
43#endif 43#endif
44 44
45unsigned long rom_length;
46unsigned long memory_start; 45unsigned long memory_start;
47unsigned long memory_end; 46unsigned long memory_end;
48 47
@@ -56,29 +55,29 @@ static void dummy_waitbut(void)
56{ 55{
57} 56}
58 57
59void (*mach_sched_init) (irqreturn_t (*handler)(int, void *, struct pt_regs *)) = NULL; 58void (*mach_sched_init) (irqreturn_t (*handler)(int, void *, struct pt_regs *));
60void (*mach_tick)( void ) = NULL; 59void (*mach_tick)( void );
61/* machine dependent keyboard functions */ 60/* machine dependent keyboard functions */
62int (*mach_keyb_init) (void) = NULL; 61int (*mach_keyb_init) (void);
63int (*mach_kbdrate) (struct kbd_repeat *) = NULL; 62int (*mach_kbdrate) (struct kbd_repeat *);
64void (*mach_kbd_leds) (unsigned int) = NULL; 63void (*mach_kbd_leds) (unsigned int);
65/* machine dependent irq functions */ 64/* machine dependent irq functions */
66void (*mach_init_IRQ) (void) = NULL; 65void (*mach_init_IRQ) (void);
67irqreturn_t (*(*mach_default_handler)[]) (int, void *, struct pt_regs *) = NULL; 66irqreturn_t (*(*mach_default_handler)[]) (int, void *, struct pt_regs *);
68int (*mach_get_irq_list) (struct seq_file *, void *) = NULL; 67int (*mach_get_irq_list) (struct seq_file *, void *);
69void (*mach_process_int) (int irq, struct pt_regs *fp) = NULL; 68void (*mach_process_int) (int irq, struct pt_regs *fp);
70void (*mach_trap_init) (void); 69void (*mach_trap_init) (void);
71/* machine dependent timer functions */ 70/* machine dependent timer functions */
72unsigned long (*mach_gettimeoffset) (void) = NULL; 71unsigned long (*mach_gettimeoffset) (void);
73void (*mach_gettod) (int*, int*, int*, int*, int*, int*) = NULL; 72void (*mach_gettod) (int*, int*, int*, int*, int*, int*);
74int (*mach_hwclk) (int, struct hwclk_time*) = NULL; 73int (*mach_hwclk) (int, struct hwclk_time*);
75int (*mach_set_clock_mmss) (unsigned long) = NULL; 74int (*mach_set_clock_mmss) (unsigned long);
76void (*mach_mksound)( unsigned int count, unsigned int ticks ) = NULL; 75void (*mach_mksound)( unsigned int count, unsigned int ticks );
77void (*mach_reset)( void ) = NULL; 76void (*mach_reset)( void );
78void (*waitbut)(void) = dummy_waitbut; 77void (*waitbut)(void) = dummy_waitbut;
79void (*mach_debug_init)(void) = NULL; 78void (*mach_debug_init)(void);
80void (*mach_halt)( void ) = NULL; 79void (*mach_halt)( void );
81void (*mach_power_off)( void ) = NULL; 80void (*mach_power_off)( void );
82 81
83 82
84#ifdef CONFIG_M68000 83#ifdef CONFIG_M68000
@@ -129,6 +128,9 @@ void (*mach_power_off)( void ) = NULL;
129#if defined(CONFIG_M5307) 128#if defined(CONFIG_M5307)
130 #define CPU "COLDFIRE(m5307)" 129 #define CPU "COLDFIRE(m5307)"
131#endif 130#endif
131#if defined(CONFIG_M532x)
132 #define CPU "COLDFIRE(m532x)"
133#endif
132#if defined(CONFIG_M5407) 134#if defined(CONFIG_M5407)
133 #define CPU "COLDFIRE(m5407)" 135 #define CPU "COLDFIRE(m5407)"
134#endif 136#endif
@@ -267,34 +269,6 @@ void setup_arch(char **cmdline_p)
267 paging_init(); 269 paging_init();
268} 270}
269 271
270int get_cpuinfo(char * buffer)
271{
272 char *cpu, *mmu, *fpu;
273 u_long clockfreq;
274
275 cpu = CPU;
276 mmu = "none";
277 fpu = "none";
278
279#ifdef CONFIG_COLDFIRE
280 clockfreq = (loops_per_jiffy*HZ)*3;
281#else
282 clockfreq = (loops_per_jiffy*HZ)*16;
283#endif
284
285 return(sprintf(buffer, "CPU:\t\t%s\n"
286 "MMU:\t\t%s\n"
287 "FPU:\t\t%s\n"
288 "Clocking:\t%lu.%1luMHz\n"
289 "BogoMips:\t%lu.%02lu\n"
290 "Calibration:\t%lu loops\n",
291 cpu, mmu, fpu,
292 clockfreq/1000000,(clockfreq/100000)%10,
293 (loops_per_jiffy*HZ)/500000,((loops_per_jiffy*HZ)/5000)%100,
294 (loops_per_jiffy*HZ)));
295
296}
297
298/* 272/*
299 * Get CPU information for use by the procfs. 273 * Get CPU information for use by the procfs.
300 */ 274 */