Commit 58fa4dcb authored by David S. Miller's avatar David S. Miller

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: default avatarDavid S. Miller <davem@davemloft.net>
parent 8695c37d
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
#include <asm/page.h> #include <asm/page.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
#include <asm/idprom.h> #include <asm/idprom.h>
#include <asm/machines.h>
#include <asm/oplib.h> #include <asm/oplib.h>
#include <asm/auxio.h> #include <asm/auxio.h>
#include <asm/irq.h> #include <asm/irq.h>
...@@ -311,9 +310,7 @@ static int sun_floppy_init(void) ...@@ -311,9 +310,7 @@ static int sun_floppy_init(void)
/* Forget it if we aren't on a machine that could possibly /* Forget it if we aren't on a machine that could possibly
* ever have a floppy drive. * ever have a floppy drive.
*/ */
if((sparc_cpu_model != sun4c && sparc_cpu_model != sun4m) || if (sparc_cpu_model != sun4m) {
((idprom->id_machtype == (SM_SUN4C | SM_4C_SLC)) ||
(idprom->id_machtype == (SM_SUN4C | SM_4C_ELC)))) {
/* We certainly don't have a floppy controller. */ /* We certainly don't have a floppy controller. */
goto no_sun_fdc; goto no_sun_fdc;
} }
......
...@@ -12,11 +12,6 @@ struct Sun_Machine_Models { ...@@ -12,11 +12,6 @@ struct Sun_Machine_Models {
unsigned char id_machtype; unsigned char id_machtype;
}; };
/* Current number of machines we know about that has an IDPROM
* machtype entry including one entry for the 0x80 OBP machines.
*/
#define NUM_SUN_MACHINES 16
/* The machine type in the idprom area looks like this: /* The machine type in the idprom area looks like this:
* *
* --------------- * ---------------
...@@ -29,31 +24,15 @@ struct Sun_Machine_Models { ...@@ -29,31 +24,15 @@ struct Sun_Machine_Models {
*/ */
#define SM_ARCH_MASK 0xf0 #define SM_ARCH_MASK 0xf0
#define SM_SUN4 0x20
#define M_LEON 0x30 #define M_LEON 0x30
#define SM_SUN4C 0x50
#define SM_SUN4M 0x70 #define SM_SUN4M 0x70
#define SM_SUN4M_OBP 0x80 #define SM_SUN4M_OBP 0x80
#define SM_TYP_MASK 0x0f #define SM_TYP_MASK 0x0f
/* Sun4 machines */
#define SM_4_260 0x01 /* Sun 4/200 series */
#define SM_4_110 0x02 /* Sun 4/100 series */
#define SM_4_330 0x03 /* Sun 4/300 series */
#define SM_4_470 0x04 /* Sun 4/400 series */
/* Leon machines */ /* Leon machines */
#define M_LEON3_SOC 0x02 /* Leon3 SoC */ #define M_LEON3_SOC 0x02 /* Leon3 SoC */
/* Sun4c machines Full Name - PROM NAME */
#define SM_4C_SS1 0x01 /* Sun4c SparcStation 1 - Sun 4/60 */
#define SM_4C_IPC 0x02 /* Sun4c SparcStation IPC - Sun 4/40 */
#define SM_4C_SS1PLUS 0x03 /* Sun4c SparcStation 1+ - Sun 4/65 */
#define SM_4C_SLC 0x04 /* Sun4c SparcStation SLC - Sun 4/20 */
#define SM_4C_SS2 0x05 /* Sun4c SparcStation 2 - Sun 4/75 */
#define SM_4C_ELC 0x06 /* Sun4c SparcStation ELC - Sun 4/25 */
#define SM_4C_IPX 0x07 /* Sun4c SparcStation IPX - Sun 4/50 */
/* Sun4m machines, these predate the OpenBoot. These values only mean /* Sun4m machines, these predate the OpenBoot. These values only mean
* something if the value in the ARCH field is SM_SUN4M, if it is * something if the value in the ARCH field is SM_SUN4M, if it is
* SM_SUN4M_OBP then you have the following situation: * SM_SUN4M_OBP then you have the following situation:
......
...@@ -25,22 +25,9 @@ static struct idprom idprom_buffer; ...@@ -25,22 +25,9 @@ static struct idprom idprom_buffer;
* of the Sparc CPU and have a meaningful IDPROM machtype value that we * of the Sparc CPU and have a meaningful IDPROM machtype value that we
* know about. See asm-sparc/machines.h for empirical constants. * know about. See asm-sparc/machines.h for empirical constants.
*/ */
static struct Sun_Machine_Models Sun_Machines[NUM_SUN_MACHINES] = { static struct Sun_Machine_Models Sun_Machines[] = {
/* First, Sun4's */ /* First, Leon */
{ .name = "Sun 4/100 Series", .id_machtype = (SM_SUN4 | SM_4_110) },
{ .name = "Sun 4/200 Series", .id_machtype = (SM_SUN4 | SM_4_260) },
{ .name = "Sun 4/300 Series", .id_machtype = (SM_SUN4 | SM_4_330) },
{ .name = "Sun 4/400 Series", .id_machtype = (SM_SUN4 | SM_4_470) },
/* Now Leon */
{ .name = "Leon3 System-on-a-Chip", .id_machtype = (M_LEON | M_LEON3_SOC) }, { .name = "Leon3 System-on-a-Chip", .id_machtype = (M_LEON | M_LEON3_SOC) },
/* Now, Sun4c's */
{ .name = "Sun4c SparcStation 1", .id_machtype = (SM_SUN4C | SM_4C_SS1) },
{ .name = "Sun4c SparcStation IPC", .id_machtype = (SM_SUN4C | SM_4C_IPC) },
{ .name = "Sun4c SparcStation 1+", .id_machtype = (SM_SUN4C | SM_4C_SS1PLUS) },
{ .name = "Sun4c SparcStation SLC", .id_machtype = (SM_SUN4C | SM_4C_SLC) },
{ .name = "Sun4c SparcStation 2", .id_machtype = (SM_SUN4C | SM_4C_SS2) },
{ .name = "Sun4c SparcStation ELC", .id_machtype = (SM_SUN4C | SM_4C_ELC) },
{ .name = "Sun4c SparcStation IPX", .id_machtype = (SM_SUN4C | SM_4C_IPX) },
/* Finally, early Sun4m's */ /* Finally, early Sun4m's */
{ .name = "Sun4m SparcSystem600", .id_machtype = (SM_SUN4M | SM_4M_SS60) }, { .name = "Sun4m SparcSystem600", .id_machtype = (SM_SUN4M | SM_4M_SS60) },
{ .name = "Sun4m SparcStation10/20", .id_machtype = (SM_SUN4M | SM_4M_SS50) }, { .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,7 +40,7 @@ static void __init display_system_type(unsigned char machtype)
char sysname[128]; char sysname[128];
register int i; register int i;
for (i = 0; i < NUM_SUN_MACHINES; i++) { for (i = 0; i < ARRAY_SIZE(Sun_Machines); i++) {
if (Sun_Machines[i].id_machtype == machtype) { if (Sun_Machines[i].id_machtype == machtype) {
if (machtype != (SM_SUN4M_OBP | 0x00) || if (machtype != (SM_SUN4M_OBP | 0x00) ||
prom_getproperty(prom_root_node, "banner-name", prom_getproperty(prom_root_node, "banner-name",
......
...@@ -42,7 +42,6 @@ ...@@ -42,7 +42,6 @@
#include <asm/vaddrs.h> #include <asm/vaddrs.h>
#include <asm/mbus.h> #include <asm/mbus.h>
#include <asm/idprom.h> #include <asm/idprom.h>
#include <asm/machines.h>
#include <asm/cpudata.h> #include <asm/cpudata.h>
#include <asm/setup.h> #include <asm/setup.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
......
...@@ -42,7 +42,6 @@ ...@@ -42,7 +42,6 @@
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/idprom.h> #include <asm/idprom.h>
#include <asm/machines.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/pcic.h> #include <asm/pcic.h>
#include <asm/irq_regs.h> #include <asm/irq_regs.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment