Skip to content

Commit

Permalink
sparc: remove CONFIG_SUN4
Browse files Browse the repository at this point in the history
While doing some easy cleanups on the sparc code I noticed that the
CONFIG_SUN4 code seems to be worse than the rest - there were some
"I don't know how it should work, but the current code definitely cannot
work." places.

And while I have seen people running Linux on machines like a
SPARCstation 5 a few years ago I don't recall having seen sun4
machines, even less ones running Linux.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Adrian Bunk authored and David S. Miller committed Sep 1, 2008
1 parent b69416b commit 5110bd2
Show file tree
Hide file tree
Showing 39 changed files with 82 additions and 1,068 deletions.
15 changes: 0 additions & 15 deletions arch/sparc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -210,17 +210,6 @@ config SUN_PM
Enable power management and CPU standby features on supported
SPARC platforms.

config SUN4
bool "Support for SUN4 machines (disables SUN4[CDM] support)"
depends on !SMP
default n
help
Say Y here if, and only if, your machine is a sun4. Note that
a kernel compiled with this option will run only on sun4.
(And the current version will probably work only on sun4/330.)

if !SUN4

config PCI
bool "Support for PCI and PS/2 keyboard/mouse"
help
Expand All @@ -233,8 +222,6 @@ config PCI_SYSCALL

source "drivers/pci/Kconfig"

endif

config SUN_OPENPROMFS
tristate "Openprom tree appears in /proc/openprom"
help
Expand Down Expand Up @@ -266,9 +253,7 @@ source "net/Kconfig"

source "drivers/Kconfig"

if !SUN4
source "drivers/sbus/char/Kconfig"
endif

# This one must be before the filesystem configs. -DaveM

Expand Down
5 changes: 0 additions & 5 deletions arch/sparc/include/asm/asmmacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,7 @@
/* sun4 probably wants half word accesses to ASI_SEGMAP, while sun4c+
likes byte accesses. These are to avoid ifdef mania. */

#ifdef CONFIG_SUN4
#define lduXa lduha
#define stXa stha
#else
#define lduXa lduba
#define stXa stba
#endif

#endif /* !(_SPARC_ASMMACRO_H) */
7 changes: 2 additions & 5 deletions arch/sparc/include/asm/elf_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,8 @@ typedef struct {
#define ELF_DATA ELFDATA2MSB

#define USE_ELF_CORE_DUMP
#ifndef CONFIG_SUN4

#define ELF_EXEC_PAGESIZE 4096
#else
#define ELF_EXEC_PAGESIZE 8192
#endif


/* This is the location that an ET_DYN program is loaded if exec'ed. Typical
Expand All @@ -126,7 +123,7 @@ typedef struct {
/* Sun4c has none of the capabilities, most sun4m's have them all.
* XXX This is gross, set some global variable at boot time. -DaveM
*/
#define ELF_HWCAP ((ARCH_SUN4C_SUN4) ? 0 : \
#define ELF_HWCAP ((ARCH_SUN4C) ? 0 : \
(HWCAP_SPARC_FLUSH | HWCAP_SPARC_STBAR | \
HWCAP_SPARC_SWAP | \
((srmmu_modtype != Cypress && \
Expand Down
40 changes: 1 addition & 39 deletions arch/sparc/include/asm/mostek.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,44 +128,6 @@ struct mostek48t08 {
struct mostek48t02 regs; /* Here is what we are interested in. */
};

#ifdef CONFIG_SUN4
enum sparc_clock_type { MSTK48T02, MSTK48T08, \
INTERSIL, MSTK_INVALID };
#else
enum sparc_clock_type { MSTK48T02, MSTK48T08, \
MSTK_INVALID };
#endif

#ifdef CONFIG_SUN4
/* intersil on a sun 4/260 code data from harris doc */
struct intersil_dt {
volatile unsigned char int_csec;
volatile unsigned char int_hour;
volatile unsigned char int_min;
volatile unsigned char int_sec;
volatile unsigned char int_month;
volatile unsigned char int_day;
volatile unsigned char int_year;
volatile unsigned char int_dow;
};

struct intersil {
struct intersil_dt clk;
struct intersil_dt cmp;
volatile unsigned char int_intr_reg;
volatile unsigned char int_cmd_reg;
};

#define INTERSIL_STOP 0x0
#define INTERSIL_START 0x8
#define INTERSIL_INTR_DISABLE 0x0
#define INTERSIL_INTR_ENABLE 0x10
#define INTERSIL_32K 0x0
#define INTERSIL_NORMAL 0x0
#define INTERSIL_24H 0x4
#define INTERSIL_INT_100HZ 0x2

/* end of intersil info */
#endif
enum sparc_clock_type { MSTK48T02, MSTK48T08, MSTK_INVALID };

#endif /* !(_SPARC_MOSTEK_H) */
1 change: 0 additions & 1 deletion arch/sparc/include/asm/oplib_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ enum prom_major_version {
PROM_V2, /* sun4c and early sun4m V2 prom */
PROM_V3, /* sun4m and later, up to sun4d/sun4e machines V3 */
PROM_P1275, /* IEEE compliant ISA based Sun PROM, only sun4u */
PROM_SUN4, /* Old sun4 proms are totally different, but we'll shoehorn it to make it fit */
};

extern enum prom_major_version prom_vers;
Expand Down
5 changes: 1 addition & 4 deletions arch/sparc/include/asm/page_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,8 @@
#ifndef _SPARC_PAGE_H
#define _SPARC_PAGE_H

#ifdef CONFIG_SUN4
#define PAGE_SHIFT 13
#else
#define PAGE_SHIFT 12
#endif

#ifndef __ASSEMBLY__
/* I have my suspicions... -DaveM */
#define PAGE_SIZE (1UL << PAGE_SHIFT)
Expand Down
4 changes: 0 additions & 4 deletions arch/sparc/include/asm/pgtable_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@
#include <linux/spinlock.h>
#include <linux/swap.h>
#include <asm/types.h>
#ifdef CONFIG_SUN4
#include <asm/pgtsun4.h>
#else
#include <asm/pgtsun4c.h>
#endif
#include <asm/pgtsrmmu.h>
#include <asm/vac-ops.h>
#include <asm/oplib.h>
Expand Down
56 changes: 0 additions & 56 deletions arch/sparc/include/asm/sun4paddr.h

This file was deleted.

83 changes: 0 additions & 83 deletions arch/sparc/include/asm/sun4prom.h

This file was deleted.

8 changes: 1 addition & 7 deletions arch/sparc/include/asm/system_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,7 @@ enum sparc_cpu {

extern enum sparc_cpu sparc_cpu_model;

#ifndef CONFIG_SUN4
#define ARCH_SUN4C_SUN4 (sparc_cpu_model==sun4c)
#define ARCH_SUN4 0
#else
#define ARCH_SUN4C_SUN4 1
#define ARCH_SUN4 1
#endif
#define ARCH_SUN4C (sparc_cpu_model==sun4c)

#define SUN4M_NCPUS 4 /* Architectural limit of sun4m. */

Expand Down
5 changes: 2 additions & 3 deletions arch/sparc/include/asm/system_64.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ enum sparc_cpu {

#define sparc_cpu_model sun4u

/* This cannot ever be a sun4c nor sun4 :) That's just history. */
#define ARCH_SUN4C_SUN4 0
#define ARCH_SUN4 0
/* This cannot ever be a sun4c :) That's just history. */
#define ARCH_SUN4C 0

extern char reboot_command[];

Expand Down
4 changes: 0 additions & 4 deletions arch/sparc/include/asm/thread_info_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,7 @@ register struct thread_info *current_thread_info_reg asm("g6");
/*
* thread information allocation
*/
#if PAGE_SHIFT == 13
#define THREAD_INFO_ORDER 0
#else /* PAGE_SHIFT */
#define THREAD_INFO_ORDER 1
#endif

#define __HAVE_ARCH_THREAD_INFO_ALLOCATOR

Expand Down
8 changes: 1 addition & 7 deletions arch/sparc/include/asm/timer_32.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#define _SPARC_TIMER_H

#include <asm/system.h> /* For SUN4M_NCPUS */
#include <asm/sun4paddr.h>
#include <asm/btfixup.h>

/* Timer structures. The interrupt timer has two properties which
Expand All @@ -34,12 +33,7 @@ struct sun4c_timer_info {
__volatile__ unsigned int timer_limit14;
};

#define SUN4C_TIMER_PHYSADDR 0xf3000000
#ifdef CONFIG_SUN4
#define SUN_TIMER_PHYSADDR SUN4_300_TIMER_PHYSADDR
#else
#define SUN_TIMER_PHYSADDR SUN4C_TIMER_PHYSADDR
#endif
#define SUN_TIMER_PHYSADDR 0xf3000000

/* A sun4m has two blocks of registers which are probably of the same
* structure. LSI Logic's L64851 is told to _decrement_ from the limit
Expand Down
7 changes: 0 additions & 7 deletions arch/sparc/include/asm/vac-ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,7 @@
* cacheable bit in the pte's of all such pages.
*/

#ifdef CONFIG_SUN4
#define S4CVAC_BADBITS 0x0001e000
#else
#define S4CVAC_BADBITS 0x0000f000
#endif

/* The following is true if vaddr1 and vaddr2 would cause
* a 'bad alias'.
Expand All @@ -94,10 +90,7 @@
*/
struct sun4c_vac_props {
unsigned int num_bytes; /* Size of the cache */
unsigned int num_lines; /* Number of cache lines */
unsigned int do_hwflushes; /* Hardware flushing available? */
enum { VAC_NONE, VAC_WRITE_THROUGH,
VAC_WRITE_BACK } type; /* What type of VAC? */
unsigned int linesize; /* Size of each line in bytes */
unsigned int log2lsize; /* log2(linesize) */
unsigned int on; /* VAC is enabled */
Expand Down
1 change: 0 additions & 1 deletion arch/sparc/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ obj-y := entry.o wof.o wuf.o etrap.o rtrap.o traps.o $(IRQ_OBJS) \
devres-y = ../../../kernel/irq/devres.o

obj-$(CONFIG_PCI) += pcic.o
obj-$(CONFIG_SUN4) += sun4setup.o
obj-$(CONFIG_SMP) += trampoline.o smp.o sun4m_smp.o sun4d_smp.o
obj-$(CONFIG_SUN_AUXIO) += auxio.o
obj-$(CONFIG_SUN_PM) += apc.o pmc.o
Expand Down
2 changes: 1 addition & 1 deletion arch/sparc/kernel/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ void __init device_scan(void)
#endif
clock_stop_probe();

if (ARCH_SUN4C_SUN4)
if (ARCH_SUN4C)
sun4c_probe_memerr_reg();

return;
Expand Down
Loading

0 comments on commit 5110bd2

Please sign in to comment.