aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-05-11 23:45:18 -0400
committerDavid S. Miller <davem@davemloft.net>2012-05-11 23:45:18 -0400
commit58fa4dcbc419c4d381ed7ccfe6e9e747aaf88aeb (patch)
treeadff21c6412cc83f90019160abb4b2beea233712 /arch
parent8695c37d06721c581385725eb80ba4e6d6bdf73f (diff)
sparc: Clear out unused asm/machines.h values.
Remove sun4 and sun4c machine ID values from asm/machines.h Also kill NUM_SUN_MACHINES, use ARRAY_SIZE instead. Kill asm/machines.h include and sun4c checks from asm/floppy_32.h Remove asm/machines.h include from setup_32.c and time_32.c, unused. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc/include/asm/floppy_32.h5
-rw-r--r--arch/sparc/include/asm/machines.h21
-rw-r--r--arch/sparc/kernel/idprom.c19
-rw-r--r--arch/sparc/kernel/setup_32.c1
-rw-r--r--arch/sparc/kernel/time_32.c1
5 files changed, 4 insertions, 43 deletions
diff --git a/arch/sparc/include/asm/floppy_32.h b/arch/sparc/include/asm/floppy_32.h
index 698d9559fea..80382abd1cc 100644
--- a/arch/sparc/include/asm/floppy_32.h
+++ b/arch/sparc/include/asm/floppy_32.h
@@ -12,7 +12,6 @@
12#include <asm/page.h> 12#include <asm/page.h>
13#include <asm/pgtable.h> 13#include <asm/pgtable.h>
14#include <asm/idprom.h> 14#include <asm/idprom.h>
15#include <asm/machines.h>
16#include <asm/oplib.h> 15#include <asm/oplib.h>
17#include <asm/auxio.h> 16#include <asm/auxio.h>
18#include <asm/irq.h> 17#include <asm/irq.h>
@@ -311,9 +310,7 @@ static int sun_floppy_init(void)
311 /* Forget it if we aren't on a machine that could possibly 310 /* Forget it if we aren't on a machine that could possibly
312 * ever have a floppy drive. 311 * ever have a floppy drive.
313 */ 312 */
314 if((sparc_cpu_model != sun4c && sparc_cpu_model != sun4m) || 313 if (sparc_cpu_model != sun4m) {
315 ((idprom->id_machtype == (SM_SUN4C | SM_4C_SLC)) ||
316 (idprom->id_machtype == (SM_SUN4C | SM_4C_ELC)))) {
317 /* We certainly don't have a floppy controller. */ 314 /* We certainly don't have a floppy controller. */
318 goto no_sun_fdc; 315 goto no_sun_fdc;
319 } 316 }
diff --git a/arch/sparc/include/asm/machines.h b/arch/sparc/include/asm/machines.h
index cd9c099567e..597c4780be6 100644
--- a/arch/sparc/include/asm/machines.h
+++ b/arch/sparc/include/asm/machines.h
@@ -12,11 +12,6 @@ struct Sun_Machine_Models {
12 unsigned char id_machtype; 12 unsigned char id_machtype;
13}; 13};
14 14
15/* Current number of machines we know about that has an IDPROM
16 * machtype entry including one entry for the 0x80 OBP machines.
17 */
18#define NUM_SUN_MACHINES 16
19
20/* The machine type in the idprom area looks like this: 15/* The machine type in the idprom area looks like this:
21 * 16 *
22 * --------------- 17 * ---------------
@@ -29,31 +24,15 @@ struct Sun_Machine_Models {
29 */ 24 */
30 25
31#define SM_ARCH_MASK 0xf0 26#define SM_ARCH_MASK 0xf0
32#define SM_SUN4 0x20
33#define M_LEON 0x30 27#define M_LEON 0x30
34#define SM_SUN4C 0x50
35#define SM_SUN4M 0x70 28#define SM_SUN4M 0x70
36#define SM_SUN4M_OBP 0x80 29#define SM_SUN4M_OBP 0x80
37 30
38#define SM_TYP_MASK 0x0f 31#define SM_TYP_MASK 0x0f
39/* Sun4 machines */
40#define SM_4_260 0x01 /* Sun 4/200 series */
41#define SM_4_110 0x02 /* Sun 4/100 series */
42#define SM_4_330 0x03 /* Sun 4/300 series */
43#define SM_4_470 0x04 /* Sun 4/400 series */
44 32
45/* Leon machines */ 33/* Leon machines */
46#define M_LEON3_SOC 0x02 /* Leon3 SoC */ 34#define M_LEON3_SOC 0x02 /* Leon3 SoC */
47 35
48/* Sun4c machines Full Name - PROM NAME */
49#define SM_4C_SS1 0x01 /* Sun4c SparcStation 1 - Sun 4/60 */
50#define SM_4C_IPC 0x02 /* Sun4c SparcStation IPC - Sun 4/40 */
51#define SM_4C_SS1PLUS 0x03 /* Sun4c SparcStation 1+ - Sun 4/65 */
52#define SM_4C_SLC 0x04 /* Sun4c SparcStation SLC - Sun 4/20 */
53#define SM_4C_SS2 0x05 /* Sun4c SparcStation 2 - Sun 4/75 */
54#define SM_4C_ELC 0x06 /* Sun4c SparcStation ELC - Sun 4/25 */
55#define SM_4C_IPX 0x07 /* Sun4c SparcStation IPX - Sun 4/50 */
56
57/* Sun4m machines, these predate the OpenBoot. These values only mean 36/* Sun4m machines, these predate the OpenBoot. These values only mean
58 * something if the value in the ARCH field is SM_SUN4M, if it is 37 * something if the value in the ARCH field is SM_SUN4M, if it is
59 * SM_SUN4M_OBP then you have the following situation: 38 * SM_SUN4M_OBP then you have the following situation:
diff --git a/arch/sparc/kernel/idprom.c b/arch/sparc/kernel/idprom.c
index 9167db40720..6bd75012109 100644
--- a/arch/sparc/kernel/idprom.c
+++ b/arch/sparc/kernel/idprom.c
@@ -25,22 +25,9 @@ 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 */
28static struct Sun_Machine_Models Sun_Machines[NUM_SUN_MACHINES] = { 28static struct Sun_Machine_Models Sun_Machines[] = {
29/* First, Sun4's */ 29/* First, Leon */
30{ .name = "Sun 4/100 Series", .id_machtype = (SM_SUN4 | SM_4_110) },
31{ .name = "Sun 4/200 Series", .id_machtype = (SM_SUN4 | SM_4_260) },
32{ .name = "Sun 4/300 Series", .id_machtype = (SM_SUN4 | SM_4_330) },
33{ .name = "Sun 4/400 Series", .id_machtype = (SM_SUN4 | SM_4_470) },
34/* Now Leon */
35{ .name = "Leon3 System-on-a-Chip", .id_machtype = (M_LEON | M_LEON3_SOC) }, 30{ .name = "Leon3 System-on-a-Chip", .id_machtype = (M_LEON | M_LEON3_SOC) },
36/* Now, Sun4c's */
37{ .name = "Sun4c SparcStation 1", .id_machtype = (SM_SUN4C | SM_4C_SS1) },
38{ .name = "Sun4c SparcStation IPC", .id_machtype = (SM_SUN4C | SM_4C_IPC) },
39{ .name = "Sun4c SparcStation 1+", .id_machtype = (SM_SUN4C | SM_4C_SS1PLUS) },
40{ .name = "Sun4c SparcStation SLC", .id_machtype = (SM_SUN4C | SM_4C_SLC) },
41{ .name = "Sun4c SparcStation 2", .id_machtype = (SM_SUN4C | SM_4C_SS2) },
42{ .name = "Sun4c SparcStation ELC", .id_machtype = (SM_SUN4C | SM_4C_ELC) },
43{ .name = "Sun4c SparcStation IPX", .id_machtype = (SM_SUN4C | SM_4C_IPX) },
44/* Finally, early Sun4m's */ 31/* Finally, early Sun4m's */
45{ .name = "Sun4m SparcSystem600", .id_machtype = (SM_SUN4M | SM_4M_SS60) }, 32{ .name = "Sun4m SparcSystem600", .id_machtype = (SM_SUN4M | SM_4M_SS60) },
46{ .name = "Sun4m SparcStation10/20", .id_machtype = (SM_SUN4M | SM_4M_SS50) }, 33{ .name = "Sun4m SparcStation10/20", .id_machtype = (SM_SUN4M | SM_4M_SS50) },
@@ -53,7 +40,7 @@ static void __init display_system_type(unsigned char machtype)
53 char sysname[128]; 40 char sysname[128];
54 register int i; 41 register int i;
55 42
56 for (i = 0; i < NUM_SUN_MACHINES; i++) { 43 for (i = 0; i < ARRAY_SIZE(Sun_Machines); i++) {
57 if (Sun_Machines[i].id_machtype == machtype) { 44 if (Sun_Machines[i].id_machtype == machtype) {
58 if (machtype != (SM_SUN4M_OBP | 0x00) || 45 if (machtype != (SM_SUN4M_OBP | 0x00) ||
59 prom_getproperty(prom_root_node, "banner-name", 46 prom_getproperty(prom_root_node, "banner-name",
diff --git a/arch/sparc/kernel/setup_32.c b/arch/sparc/kernel/setup_32.c
index a2123adb212..3970a78e17a 100644
--- a/arch/sparc/kernel/setup_32.c
+++ b/arch/sparc/kernel/setup_32.c
@@ -42,7 +42,6 @@
42#include <asm/vaddrs.h> 42#include <asm/vaddrs.h>
43#include <asm/mbus.h> 43#include <asm/mbus.h>
44#include <asm/idprom.h> 44#include <asm/idprom.h>
45#include <asm/machines.h>
46#include <asm/cpudata.h> 45#include <asm/cpudata.h>
47#include <asm/setup.h> 46#include <asm/setup.h>
48#include <asm/cacheflush.h> 47#include <asm/cacheflush.h>
diff --git a/arch/sparc/kernel/time_32.c b/arch/sparc/kernel/time_32.c
index 89e890bc094..157dcc58a21 100644
--- a/arch/sparc/kernel/time_32.c
+++ b/arch/sparc/kernel/time_32.c
@@ -42,7 +42,6 @@
42#include <asm/irq.h> 42#include <asm/irq.h>
43#include <asm/io.h> 43#include <asm/io.h>
44#include <asm/idprom.h> 44#include <asm/idprom.h>
45#include <asm/machines.h>
46#include <asm/page.h> 45#include <asm/page.h>
47#include <asm/pcic.h> 46#include <asm/pcic.h>
48#include <asm/irq_regs.h> 47#include <asm/irq_regs.h>