From: Andy P. <at...@us...> - 2002-04-25 08:46:24
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-vax In directory usw-pr-cvs1:/tmp/cvs-serv20812/include/asm-vax Modified Files: clock.h mv.h vsa.h Added Files: mc146818rtc.h Log Message: Real time clock driver for vaxstations with dallas chip --- NEW FILE --- /* * mc146818.h. macros for /dev/rtc (see drivers/char/rtc.c * and functions in arch/vax/kernel/time.c * * Copyright atp Mar 2002. * * Adapted from asm-mips/mc146818rtc.h for decstations. * * There are two types of "hardware clock" for the VAX family of * systems. These are the TODR (time of day register) used on the * big vaxes, and the standard CMOS clock, which is based on the * familiar dallas chip, used in the desktop vaxes (KA41, 42, etc.. * * This file only addresses the desktop vax CMOS clock. */ #ifndef _ASM_MC146818RTC_H #define _ASM_MC146818RTC_H #include <linux/config.h> #include <asm/mv.h> /* machine vector */ #ifndef RTC_PORT #define RTC_PORT(x) ((x)) #endif /* access macros for the clock page. */ /* -- we should have these in the mv too, perhaps with a * single rtc_ops structure like the mips, which the * mv entry can point at. However at the mo, we only * have a real implementation for the ka4x cmos clock. */ unsigned char ka4x_clock_read(unsigned long addr); void ka4x_clock_write(unsigned char val, unsigned long addr); #define CMOS_READ(addr) ({ \ ka4x_clock_read(addr); \ }) #define CMOS_WRITE(val, addr) ({ \ ka4x_clock_write(val, addr); \ }) #define RTC_ALWAYS_BCD 0 /* for the time being, unless there is a vsbus int for it */ #define RTC_IRQ 0 #endif /* _ASM_MC146818RTC_H */ Index: clock.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/clock.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- clock.h 17 Jan 2001 16:18:52 -0000 1.1 +++ clock.h 25 Apr 2002 08:46:20 -0000 1.2 @@ -18,5 +18,8 @@ #define ICCS_INTENABLE (0x00000010) /* enable clock interrupts */ #define ICCS_RUN (0x00000001) /* enable counter */ +/* prototypes for clock handling functions in arch/vax/clock.c */ +void generic_clock_init(void); +void ka4x_clock_init(void); #endif /* _VAX_CLOCK_H_ */ Index: mv.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/mv.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- mv.h 26 Jun 2001 19:01:11 -0000 1.2 +++ mv.h 25 Apr 2002 08:46:20 -0000 1.3 @@ -36,6 +36,9 @@ void (*init_devices)(void); /* Optional */ const char * (*cpu_type_str)(void); + /* clock routines */ + void (*clock_init)(void); /* called by time_init() to set up RTC */ + unsigned int *clock_base; /* address of clock page for vsbus RTC */ }; #endif /* !__ASSEMBLY__ */ Index: vsa.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-vax/vsa.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- vsa.h 4 Feb 2002 22:55:49 -0000 1.6 +++ vsa.h 25 Apr 2002 08:46:20 -0000 1.7 @@ -35,6 +35,9 @@ +#define VSA_CLOCK_BASE 0x200b0000 #define VSA_BASE_REGS 0x20080000 #define VSA_KA55_BASE_REGS 0x25c00000 + + #endif |