# This is a BitKeeper generated patch for the following project: # Project Name: Linux 2.4 # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.138 -> 1.139 # include/asm-ppc/mc146818rtc.h 1.7 -> 1.8 # include/asm-ppc/m48t35.h 1.7 -> 1.8 # arch/ppc/mm/init.c 1.33 -> 1.34 # arch/ppc/kernel/open_pic.h 1.12 -> 1.13 # arch/ppc/kernel/todc_time.c 1.1 -> 1.2 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 01/06/07 trini@opus.bloom.county 1.139 # Cleanups. # -------------------------------------------- # diff -Nru a/arch/ppc/kernel/open_pic.h b/arch/ppc/kernel/open_pic.h --- a/arch/ppc/kernel/open_pic.h Thu Jun 7 12:28:21 2001 +++ b/arch/ppc/kernel/open_pic.h Thu Jun 7 12:28:21 2001 @@ -47,6 +47,8 @@ extern void openpic_init_processor(u_int cpumask); extern void openpic_setup_ISU(int isu_num, unsigned long addr); extern void openpic_cause_IPI(u_int ipi, u_int cpumask); +extern u_int openpic_irq(void); +extern void openpic_eoi(void); extern inline int openpic_to_irq(int irq) { diff -Nru a/arch/ppc/kernel/todc_time.c b/arch/ppc/kernel/todc_time.c --- a/arch/ppc/kernel/todc_time.c Thu Jun 7 12:28:21 2001 +++ b/arch/ppc/kernel/todc_time.c Thu Jun 7 12:28:21 2001 @@ -19,7 +19,6 @@ #include #include #include -#include #include #include diff -Nru a/arch/ppc/mm/init.c b/arch/ppc/mm/init.c --- a/arch/ppc/mm/init.c Thu Jun 7 12:28:21 2001 +++ b/arch/ppc/mm/init.c Thu Jun 7 12:28:21 2001 @@ -399,6 +399,12 @@ void iounmap(void *addr) { + /* + * If mapped by BATs then there is nothing to do. + * Calling vfree() generates a benign warning. + */ + if (v_mapped_by_bats((unsigned long)addr)) return; + if (addr > high_memory && (unsigned long) addr < ioremap_bot) vfree((void *) (PAGE_MASK & (unsigned long) addr)); } diff -Nru a/include/asm-ppc/m48t35.h b/include/asm-ppc/m48t35.h --- a/include/asm-ppc/m48t35.h Thu Jun 7 12:28:21 2001 +++ b/include/asm-ppc/m48t35.h Thu Jun 7 12:28:21 2001 @@ -3,25 +3,81 @@ */ /* * Registers for the SGS-Thomson M48T35 Timekeeper RAM chip + * and + * Registers for the SGS-Thomson M48T37 Timekeeper RAM chip + * The 37 is the 35 plus alarm and century thus the offsets + * are shifted by the extra registers. */ #ifndef __PPC_M48T35_H #define __PPC_M48T35_H /* RTC offsets */ -#define M48T35_RTC_CONTROL 0 -#define M48T35_RTC_SECONDS 1 -#define M48T35_RTC_MINUTES 2 -#define M48T35_RTC_HOURS 3 -#define M48T35_RTC_DAY 4 -#define M48T35_RTC_DOM 5 -#define M48T35_RTC_MONTH 6 -#define M48T35_RTC_YEAR 7 +#define M48T35_RTC_FLAGS (-8) /* the negative regs are really T37 only */ +#define M48T35_RTC_CENTURY (-7) +#define M48T35_RTC_AL_SEC (-6) +#define M48T35_RTC_AL_MIN (-5) +#define M48T35_RTC_AL_HRS (-4) +#define M48T35_RTC_AL_DOM (-3) +#define M48T35_RTC_INTERRUPT (-2) +#define M48T35_RTC_WATCHDOG (-1) +#define M48T35_RTC_CONTROL 0 /* T35 starts here */ +#define M48T35_RTC_SECONDS 1 +#define M48T35_RTC_MINUTES 2 +#define M48T35_RTC_HOURS 3 +#define M48T35_RTC_DAY 4 +#define M48T35_RTC_DOM 5 +#define M48T35_RTC_MONTH 6 +#define M48T35_RTC_YEAR 7 +/* this way help us know which bits go with which regs */ +#define M48T35_RTC_FLAGS_BL 0x10 +#define M48T35_RTC_FLAGS_AF 0x40 +#define M48T35_RTC_FLAGS_WDF 0x80 + +#define M48T35_RTC_INTERRUPT_AFE 0x80 +#define M48T35_RTC_INTERRUPT_ABE 0x20 +#define M48T35_RTC_INTERRUPT_ALL (M48T35_RTC_INTERRUPT_AFE|M48T35_RTC_INTERRUPT_ABE) + +#define M48T35_RTC_WATCHDOG_RB 0x03 +#define M48T35_RTC_WATCHDOG_BMB 0x7c +#define M48T35_RTC_WATCHDOG_WDS 0x80 +#define M48T35_RTC_WATCHDOG_ALL (M48T35_RTC_WATCHDOG_RB|M48T35_RTC_WATCHDOG_BMB|M48T35_RTC_W + +#define M48T35_RTC_CONTROL_WRITE 0x80 +#define M48T35_RTC_CONTROL_READ 0x40 +#define M48T35_RTC_CONTROL_CAL_SIGN 0x20 +#define M48T35_RTC_CONTROL_CAL_VALUE 0x1f +#define M48T35_RTC_CONTROL_LOCKED (M48T35_RTC_WRITE|M48T35_RTC_READ) +#define M48T35_RTC_CONTROL_CALIBRATION (M48T35_RTC_CONTROL_CAL_SIGN|M48T35_RTC_CONTROL_CAL_VALUE) + +#define M48T35_RTC_SECONDS_SEC_1 0x0f +#define M48T35_RTC_SECONDS_SEC_10 0x70 +#define M48T35_RTC_SECONDS_ST 0x80 +#define M48T35_RTC_SECONDS_SEC_ALL (M48T35_RTC_SECONDS_SEC_1|M48T35_RTC_SECONDS_SEC_10) + +#define M48T35_RTC_MINUTES_MIN_1 0x0f +#define M48T35_RTC_MINUTES_MIN_10 0x70 +#define M48T35_RTC_MINUTES_MIN_ALL (M48T35_RTC_MINUTES_MIN_1|M48T35_RTC_MINUTES_MIN_10) + +#define M48T35_RTC_HOURS_HRS_1 0x0f +#define M48T35_RTC_HOURS_HRS_10 0x30 +#define M48T35_RTC_HOURS_HRS_ALL (M48T35_RTC_HOURS_HRS_1|M48T35_RTC_HOURS_HRS_10) + +#define M48T35_RTC_DAY_DAY_1 0x03 +#define M48T35_RTC_DAY_FT 0x40 + +#define M48T35_RTC_ALARM_OFF 0x00 +#define M48T35_RTC_WATCHDOG_OFF 0x00 + + +/* legacy */ #define M48T35_RTC_SET 0x80 #define M48T35_RTC_STOPPED 0x80 #define M48T35_RTC_READ 0x40 + +/* read/write conversions */ #ifndef BCD_TO_BIN #define BCD_TO_BIN(x) ((x)=((x)&15) + ((x)>>4)*10) #endif diff -Nru a/include/asm-ppc/mc146818rtc.h b/include/asm-ppc/mc146818rtc.h --- a/include/asm-ppc/mc146818rtc.h Thu Jun 7 12:28:21 2001 +++ b/include/asm-ppc/mc146818rtc.h Thu Jun 7 12:28:21 2001 @@ -9,6 +9,7 @@ #define __ASM_PPC_MC146818RTC_H #include +#include #ifndef RTC_PORT #define RTC_PORT(x) (0x70 + (x))