aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/sun3
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@kernel.org>2008-07-17 15:16:27 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-20 20:24:39 -0400
commit07b8125949de66b6552966de8d4280c3a8620359 (patch)
tree63452e21b34a57d8bd0ee3341d419781a77adddb /arch/m68k/sun3
parent22deb527ce5d13e07652f81a53032aa0214ea8c3 (diff)
m68k/sun3/: possible cleanups
This patch contains the following possible cleanups: - make the following needlessly global code static: - config.c: sun3_bootmem_alloc() - config.c: sun3_sched_init() - dvma.c: dvma_page() - idprom.c: struct Sun_Machines[] - mmu_emu.c: struct ctx_alloc[] - sun3dvma.c: iommu_use[] - sun3ints.c: led_pattern[] - remove the unused sbus.c Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/m68k/sun3')
-rw-r--r--arch/m68k/sun3/Makefile2
-rw-r--r--arch/m68k/sun3/config.c7
-rw-r--r--arch/m68k/sun3/dvma.c2
-rw-r--r--arch/m68k/sun3/idprom.c2
-rw-r--r--arch/m68k/sun3/mmu_emu.c2
-rw-r--r--arch/m68k/sun3/sbus.c27
-rw-r--r--arch/m68k/sun3/sun3dvma.c2
-rw-r--r--arch/m68k/sun3/sun3ints.c2
8 files changed, 10 insertions, 36 deletions
diff --git a/arch/m68k/sun3/Makefile b/arch/m68k/sun3/Makefile
index be1a8470d636..38ba0e0cedad 100644
--- a/arch/m68k/sun3/Makefile
+++ b/arch/m68k/sun3/Makefile
@@ -2,6 +2,6 @@
2# Makefile for Linux arch/m68k/sun3 source directory 2# Makefile for Linux arch/m68k/sun3 source directory
3# 3#
4 4
5obj-y := sun3ints.o sun3dvma.o sbus.o idprom.o 5obj-y := sun3ints.o sun3dvma.o idprom.o
6 6
7obj-$(CONFIG_SUN3) += config.o mmu_emu.o leds.o dvma.o intersil.o 7obj-$(CONFIG_SUN3) += config.o mmu_emu.o leds.o dvma.o intersil.o
diff --git a/arch/m68k/sun3/config.c b/arch/m68k/sun3/config.c
index c0fbd278fbb1..732087d0735c 100644
--- a/arch/m68k/sun3/config.c
+++ b/arch/m68k/sun3/config.c
@@ -36,7 +36,7 @@ extern char _text, _end;
36char sun3_reserved_pmeg[SUN3_PMEGS_NUM]; 36char sun3_reserved_pmeg[SUN3_PMEGS_NUM];
37 37
38extern unsigned long sun3_gettimeoffset(void); 38extern unsigned long sun3_gettimeoffset(void);
39extern void sun3_sched_init(irq_handler_t handler); 39static void sun3_sched_init(irq_handler_t handler);
40extern void sun3_get_model (char* model); 40extern void sun3_get_model (char* model);
41extern void idprom_init (void); 41extern void idprom_init (void);
42extern int sun3_hwclk(int set, struct rtc_time *t); 42extern int sun3_hwclk(int set, struct rtc_time *t);
@@ -114,7 +114,8 @@ static void sun3_halt (void)
114 114
115/* sun3 bootmem allocation */ 115/* sun3 bootmem allocation */
116 116
117void __init sun3_bootmem_alloc(unsigned long memory_start, unsigned long memory_end) 117static void __init sun3_bootmem_alloc(unsigned long memory_start,
118 unsigned long memory_end)
118{ 119{
119 unsigned long start_page; 120 unsigned long start_page;
120 121
@@ -164,7 +165,7 @@ void __init config_sun3(void)
164 sun3_bootmem_alloc(memory_start, memory_end); 165 sun3_bootmem_alloc(memory_start, memory_end);
165} 166}
166 167
167void __init sun3_sched_init(irq_handler_t timer_routine) 168static void __init sun3_sched_init(irq_handler_t timer_routine)
168{ 169{
169 sun3_disable_interrupts(); 170 sun3_disable_interrupts();
170 intersil_clock->cmd_reg=(INTERSIL_RUN|INTERSIL_INT_DISABLE|INTERSIL_24H_MODE); 171 intersil_clock->cmd_reg=(INTERSIL_RUN|INTERSIL_INT_DISABLE|INTERSIL_24H_MODE);
diff --git a/arch/m68k/sun3/dvma.c b/arch/m68k/sun3/dvma.c
index d2b3093f2405..d522eaab4551 100644
--- a/arch/m68k/sun3/dvma.c
+++ b/arch/m68k/sun3/dvma.c
@@ -19,7 +19,7 @@
19 19
20static unsigned long ptelist[120]; 20static unsigned long ptelist[120];
21 21
22inline unsigned long dvma_page(unsigned long kaddr, unsigned long vaddr) 22static unsigned long dvma_page(unsigned long kaddr, unsigned long vaddr)
23{ 23{
24 unsigned long pte; 24 unsigned long pte;
25 unsigned long j; 25 unsigned long j;
diff --git a/arch/m68k/sun3/idprom.c b/arch/m68k/sun3/idprom.c
index 6c5336d62fae..c86ac37d1983 100644
--- a/arch/m68k/sun3/idprom.c
+++ b/arch/m68k/sun3/idprom.c
@@ -25,7 +25,7 @@ static struct idprom idprom_buffer;
25 * of the Sparc CPU and have a meaningful IDPROM machtype value that we 25 * of the Sparc CPU and have a meaningful IDPROM machtype value that we
26 * know about. See asm-sparc/machines.h for empirical constants. 26 * know about. See asm-sparc/machines.h for empirical constants.
27 */ 27 */
28struct Sun_Machine_Models Sun_Machines[NUM_SUN_MACHINES] = { 28static struct Sun_Machine_Models Sun_Machines[NUM_SUN_MACHINES] = {
29/* First, Sun3's */ 29/* First, Sun3's */
30 { .name = "Sun 3/160 Series", .id_machtype = (SM_SUN3 | SM_3_160) }, 30 { .name = "Sun 3/160 Series", .id_machtype = (SM_SUN3 | SM_3_160) },
31 { .name = "Sun 3/50", .id_machtype = (SM_SUN3 | SM_3_50) }, 31 { .name = "Sun 3/50", .id_machtype = (SM_SUN3 | SM_3_50) },
diff --git a/arch/m68k/sun3/mmu_emu.c b/arch/m68k/sun3/mmu_emu.c
index fb0f6a20cc3c..60f9d4500d72 100644
--- a/arch/m68k/sun3/mmu_emu.c
+++ b/arch/m68k/sun3/mmu_emu.c
@@ -55,7 +55,7 @@ unsigned char pmeg_ctx[PMEGS_NUM];
55 55
56/* pointers to the mm structs for each task in each 56/* pointers to the mm structs for each task in each
57 context. 0xffffffff is a marker for kernel context */ 57 context. 0xffffffff is a marker for kernel context */
58struct mm_struct *ctx_alloc[CONTEXTS_NUM] = { 58static struct mm_struct *ctx_alloc[CONTEXTS_NUM] = {
59 [0] = (struct mm_struct *)0xffffffff 59 [0] = (struct mm_struct *)0xffffffff
60}; 60};
61 61
diff --git a/arch/m68k/sun3/sbus.c b/arch/m68k/sun3/sbus.c
deleted file mode 100644
index babdbfa3cda7..000000000000
--- a/arch/m68k/sun3/sbus.c
+++ /dev/null
@@ -1,27 +0,0 @@
1/*
2 * SBus helper functions
3 *
4 * Sun3 don't have a sbus, but many of the used devices are also
5 * used on Sparc machines with sbus. To avoid having a lot of
6 * duplicate code, we provide necessary glue stuff to make using
7 * of the sbus driver code possible.
8 *
9 * (C) 1999 Thomas Bogendoerfer (tsbogend@alpha.franken.de)
10 */
11
12#include <linux/types.h>
13#include <linux/compiler.h>
14#include <linux/init.h>
15
16int __init sbus_init(void)
17{
18 return 0;
19}
20
21void *sparc_alloc_io (u32 address, void *virtual, int len, char *name,
22 u32 bus_type, int rdonly)
23{
24 return (void *)address;
25}
26
27subsys_initcall(sbus_init);
diff --git a/arch/m68k/sun3/sun3dvma.c b/arch/m68k/sun3/sun3dvma.c
index 8709677fa025..f9277e8b4159 100644
--- a/arch/m68k/sun3/sun3dvma.c
+++ b/arch/m68k/sun3/sun3dvma.c
@@ -29,7 +29,7 @@ static inline void dvma_unmap_iommu(unsigned long a, int b)
29extern void sun3_dvma_init(void); 29extern void sun3_dvma_init(void);
30#endif 30#endif
31 31
32unsigned long iommu_use[IOMMU_TOTAL_ENTRIES]; 32static unsigned long iommu_use[IOMMU_TOTAL_ENTRIES];
33 33
34#define dvma_index(baddr) ((baddr - DVMA_START) >> DVMA_PAGE_SHIFT) 34#define dvma_index(baddr) ((baddr - DVMA_START) >> DVMA_PAGE_SHIFT)
35 35
diff --git a/arch/m68k/sun3/sun3ints.c b/arch/m68k/sun3/sun3ints.c
index cf93481adb1d..7364cd67455e 100644
--- a/arch/m68k/sun3/sun3ints.c
+++ b/arch/m68k/sun3/sun3ints.c
@@ -30,7 +30,7 @@ void sun3_enable_interrupts(void)
30 sun3_enable_irq(0); 30 sun3_enable_irq(0);
31} 31}
32 32
33int led_pattern[8] = { 33static int led_pattern[8] = {
34 ~(0x80), ~(0x01), 34 ~(0x80), ~(0x01),
35 ~(0x40), ~(0x02), 35 ~(0x40), ~(0x02),
36 ~(0x20), ~(0x04), 36 ~(0x20), ~(0x04),