diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1998-06-30 00:21:34 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1998-06-30 00:21:34 +0000 |
commit | 3917ac5846dd0f9ad1238166f90caab9912052e6 (patch) | |
tree | 1c298935def4f29edb39192365a65d73de999155 /arch/mips/sgi/kernel | |
parent | af2f803c8b2d469fe38e4a7ce952658dfcb6681a (diff) |
o Merge with Linux 2.1.100.
o Cleanup the machine dependencies of floppy and rtc. The driver for
the Dallas thingy in the Indy is still missing.
o Handle allocation of zero'd pages correct for R4000SC / R4400SC.
o Page colouring shit to match the virtual and physical colour of all
mapped pages. This tends to produce extreme fragmentation problems,
so it's deactivated for now. Users of R4000SC / R4400SC may re-enable
the code in arch/mips/mm/init.c by removing the definition of
CONF_GIVE_A_SHIT_ABOUT_COLOURS. Should get them somewhat further -
but don't shake to hard ...
o Fixed ptrace(2)-ing of syscalls, strace is now working again.
o Fix the interrupt forwarding from the keyboard driver to the psaux
driver, PS/2 mice are now working on the Indy. The fix is somewhat
broken as it prevents generic kernels for Indy and machines which handle
things different.
o Things I can't remember.
Diffstat (limited to 'arch/mips/sgi/kernel')
-rw-r--r-- | arch/mips/sgi/kernel/Makefile | 7 | ||||
-rw-r--r-- | arch/mips/sgi/kernel/indy_int.c | 7 | ||||
-rw-r--r-- | arch/mips/sgi/kernel/indy_rtc.c | 37 | ||||
-rw-r--r-- | arch/mips/sgi/kernel/indy_timer.c | 30 | ||||
-rw-r--r-- | arch/mips/sgi/kernel/setup.c | 11 |
5 files changed, 56 insertions, 36 deletions
diff --git a/arch/mips/sgi/kernel/Makefile b/arch/mips/sgi/kernel/Makefile index 43758c5f7..1c6fbed7d 100644 --- a/arch/mips/sgi/kernel/Makefile +++ b/arch/mips/sgi/kernel/Makefile @@ -1,4 +1,5 @@ -# $Id: Makefile,v 1.1.1.1 1997/06/01 03:16:40 ralf Exp $ +# $Id: Makefile,v 1.2 1998/03/04 08:29:10 ralf Exp $ +# # Makefile for the SGI specific kernel interface routines # under Linux. # @@ -13,8 +14,8 @@ .S.o: $(CC) $(CFLAGS) -c $< -o $*.o -OBJS = indy_mc.o indy_sc.o indy_hpc.o indy_int.o system.o indy_timer.o \ - indyIRQ.o reset.o setup.o time.o +OBJS = indy_mc.o indy_sc.o indy_hpc.o indy_int.o indy_rtc.o system.o \ + indy_timer.o indyIRQ.o reset.o setup.o time.o all: sgikern.a diff --git a/arch/mips/sgi/kernel/indy_int.c b/arch/mips/sgi/kernel/indy_int.c index 65340f786..5e9e3083e 100644 --- a/arch/mips/sgi/kernel/indy_int.c +++ b/arch/mips/sgi/kernel/indy_int.c @@ -1,10 +1,10 @@ -/* +/* $Id: indy_int.c,v 1.8 1998/05/07 02:57:20 ralf Exp $ + * * indy_int.c: Routines for generic manipulation of the INT[23] ASIC * found on INDY workstations.. * * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com) - * - * $Id: indy_int.c,v 1.7 1998/04/05 11:23:58 ralf Exp $ + * Copyright (C) 1997, 1998 Ralf Baechle (ralf@gnu.org) */ #include <linux/config.h> #include <linux/init.h> @@ -27,7 +27,6 @@ #include <asm/irq.h> #include <asm/mipsregs.h> #include <asm/system.h> -#include <asm/vector.h> #include <asm/ptrace.h> #include <asm/processor.h> diff --git a/arch/mips/sgi/kernel/indy_rtc.c b/arch/mips/sgi/kernel/indy_rtc.c new file mode 100644 index 000000000..5ef066773 --- /dev/null +++ b/arch/mips/sgi/kernel/indy_rtc.c @@ -0,0 +1,37 @@ +/* $Id: indy_rtc.c,v 1.1 1998/06/25 20:19:17 ralf Exp $ + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + * + * RTC routines for Indy style attached Dallas chip. + * + * Copyright (C) 1998 by Ralf Baechle + */ +#include <linux/mc146818rtc.h> +#include <asm/sgihpc.h> + +static unsigned char indy_rtc_read_data(unsigned long addr) +{ + volatile unsigned int *rtcregs = (void *)INDY_CLOCK_REGS; + + return rtcregs[addr]; +} + +static void indy_rtc_write_data(unsigned char data, unsigned long addr) +{ + volatile unsigned int *rtcregs = (void *)INDY_CLOCK_REGS; + + rtcregs[addr] = data; +} + +static int indy_rtc_bcd_mode(void) +{ + return 0; +} + +struct rtc_ops indy_rtc_ops = { + &indy_rtc_read_data, + &indy_rtc_write_data, + &indy_rtc_bcd_mode +}; diff --git a/arch/mips/sgi/kernel/indy_timer.c b/arch/mips/sgi/kernel/indy_timer.c index a1270e7f3..7ba361d92 100644 --- a/arch/mips/sgi/kernel/indy_timer.c +++ b/arch/mips/sgi/kernel/indy_timer.c @@ -1,9 +1,9 @@ -/* +/* $Id: indy_timer.c,v 1.8 1998/04/05 11:23:59 ralf Exp $ + * * indy_timer.c: Setting up the clock on the INDY 8254 controller. * * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com) - * - * $Id: indy_timer.c,v 1.7 1998/03/22 23:27:17 ralf Exp $ + * Copyright (C) 1998 Ralf Baechle (ralf@gnu.org) */ #include <linux/errno.h> #include <linux/init.h> @@ -26,26 +26,6 @@ #include <asm/sgihpc.h> #include <asm/sgint23.h> -/* The layout of registers for the INDY Dallas 1286 clock chipset. */ -struct indy_clock { - volatile unsigned int hsec; - volatile unsigned int sec; - volatile unsigned int min; - volatile unsigned int malarm; - volatile unsigned int hr; - volatile unsigned int halarm; - volatile unsigned int day; - volatile unsigned int dalarm; - volatile unsigned int date; - volatile unsigned int month; - volatile unsigned int year; - volatile unsigned int cmd; - volatile unsigned int whsec; - volatile unsigned int wsec; - volatile unsigned int _unused0[50]; -}; - -#define INDY_CLOCK_REGS ((struct indy_clock *)(KSEG1ADDR(0x1fbe0000))) /* Because of a bug in the i8254 timer we need to use the onchip r4k * counter as our system wide timer interrupt running at 100HZ. @@ -60,7 +40,7 @@ static inline void ack_r4ktimer(unsigned long newval) static int set_rtc_mmss(unsigned long nowtime) { - struct indy_clock *clock = INDY_CLOCK_REGS; + struct indy_clock *clock = (struct indy_clock *)INDY_CLOCK_REGS; int retval = 0; int real_seconds, real_minutes, clock_minutes; @@ -197,7 +177,7 @@ static inline unsigned long mktime(unsigned int year, unsigned int mon, __initfunc(static unsigned long get_indy_time(void)) { - struct indy_clock *clock = INDY_CLOCK_REGS; + struct indy_clock *clock = (struct indy_clock *)INDY_CLOCK_REGS; unsigned int year, mon, day, hour, min, sec; /* Freeze it. */ diff --git a/arch/mips/sgi/kernel/setup.c b/arch/mips/sgi/kernel/setup.c index 5107edb6f..9699f812c 100644 --- a/arch/mips/sgi/kernel/setup.c +++ b/arch/mips/sgi/kernel/setup.c @@ -1,16 +1,19 @@ -/* $Id: setup.c,v 1.8 1998/05/06 02:46:46 ralf Exp $ +/* $Id: setup.c,v 1.9 1998/05/07 02:57:21 ralf Exp $ * * setup.c: SGI specific setup, including init of the feature struct. * * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com) + * Copyright (C) 1997, 1998 Ralf Baechle (ralf@gnu.org) */ #include <linux/init.h> #include <linux/kernel.h> #include <linux/sched.h> +#include <linux/mc146818rtc.h> #include <asm/addrspace.h> #include <asm/bcache.h> #include <asm/keyboard.h> +#include <asm/irq.h> #include <asm/reboot.h> #include <asm/vector.h> #include <asm/sgialib.h> @@ -25,8 +28,7 @@ extern void sgi_machine_restart(char *command); extern void sgi_machine_halt(void); extern void sgi_machine_power_off(void); -struct feature sgi_feature = { -}; +extern struct rtc_ops indy_rtc_ops; static volatile struct hpc_keyb *sgi_kh = (struct hpc_keyb *) (KSEG1 + 0x1fbd9800 + 64); @@ -80,7 +82,6 @@ __initfunc(void sgi_setup(void)) char *ctype; irq_setup = sgi_irq_setup; - feature = &sgi_feature; keyboard_setup = sgi_keyboard_setup; _machine_restart = sgi_machine_restart; @@ -117,4 +118,6 @@ __initfunc(void sgi_setup(void)) prom_imode(); } } + + rtc_ops = &indy_rtc_ops; } |