From: Andy P. <at...@us...> - 2002-04-09 12:33:51
|
Update of /cvsroot/linux-vax/kernel-2.4/include/asm-arm/arch-arc In directory usw-pr-cvs1:/tmp/cvs-serv9454/asm-arm/arch-arc Modified Files: hardware.h io.h irq.h keyboard.h memory.h system.h time.h Log Message: Synch to 2.4.15 commit 1 Index: hardware.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-arm/arch-arc/hardware.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- hardware.h 14 Jan 2001 16:58:25 -0000 1.1.1.1 +++ hardware.h 9 Apr 2002 12:33:08 -0000 1.2 @@ -46,23 +46,29 @@ #define SCREEN_BASE 0x02000000 +#define EXPMASK_BASE 0x03360000 +#define IOEB_BASE 0x03350000 +#define VIDC_BASE 0x03400000 +#define LATCHA_BASE 0x03250040 +#define LATCHB_BASE 0x03250018 +#define IOC_BASE 0x03200000 +#define FLOPPYDMA_BASE 0x0302a000 +#define PCIO_BASE 0x03010000 + +#define vidc_writel(val) __raw_writel(val, VIDC_BASE) + #ifndef __ASSEMBLY__ /* * for use with inb/outb */ -#define IO_VIDC_BASE 0x80100000 #ifdef CONFIG_ARCH_A5K -#define IOEB_VID_CTL 0x800d4012 -#define IOEB_PRESENT 0x800d4014 -#define IOEB_PSCLR 0x800d4016 -#define IOEB_MONTYPE 0x800d401c +#define IOEB_VID_CTL (IOEB_BASE + 0x48) +#define IOEB_PRESENT (IOEB_BASE + 0x50) +#define IOEB_PSCLR (IOEB_BASE + 0x58) +#define IOEB_MONTYPE (IOEB_BASE + 0x70) #endif -#define LATCHAADDR 0x80094010 -#define LATCHBADDR 0x80094006 -#define IOC_BASE 0x80080000 -#define IO_EC_IOC4_BASE 0x8009c000 #define IO_EC_IOC_BASE 0x80090000 #define IO_EC_MEMC_BASE 0x80000000 @@ -74,36 +80,9 @@ #define SCSI_BASE 0x03100000 #endif -/* - * IO definitions - */ -#define EXPMASK_BASE ((volatile unsigned char *)0x03360000) -#define IOEB_BASE ((volatile unsigned char *)0x03350050) -#define PCIO_FLOPPYDMABASE ((volatile unsigned char *)0x0302a000) -#define PCIO_BASE 0x03010000 - -/* - * RAM definitions - */ -#define GET_MEMORY_END(p) (PAGE_OFFSET + (p->u1.s.page_size) * (p->u1.s.nr_pages)) -#define PARAMS_OFFSET 0x7c000 - -#else - -#define IOEB_BASE 0x03350050 -#define IOC_BASE 0x03200000 -#define PCIO_FLOPPYDMABASE 0x0302a000 -#define PCIO_BASE 0x03010000 - -#endif - -#ifndef __ASSEMBLY__ -#define __EXPMASK(offset) (((volatile unsigned char *)EXPMASK_BASE)[offset]) -#else -#define __EXPMASK(offset) offset #endif -#define EXPMASK_STATUS __EXPMASK(0x00) -#define EXPMASK_ENABLE __EXPMASK(0x04) +#define EXPMASK_STATUS (EXPMASK_BASE + 0x00) +#define EXPMASK_ENABLE (EXPMASK_BASE + 0x04) #endif Index: io.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-arm/arch-arc/io.h,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 --- io.h 25 Feb 2001 23:14:53 -0000 1.1.1.2 +++ io.h 9 Apr 2002 12:33:08 -0000 1.2 @@ -71,7 +71,7 @@ * Dynamic IO functions - let the compiler * optimize the expressions */ -extern __inline__ void __outb (unsigned int value, unsigned int port) +static inline void __outb (unsigned int value, unsigned int port) { unsigned long temp; __asm__ __volatile__( @@ -84,7 +84,7 @@ : "cc"); } -extern __inline__ void __outw (unsigned int value, unsigned int port) +static inline void __outw (unsigned int value, unsigned int port) { unsigned long temp; __asm__ __volatile__( @@ -97,7 +97,7 @@ : "cc"); } -extern __inline__ void __outl (unsigned int value, unsigned int port) +static inline void __outl (unsigned int value, unsigned int port) { unsigned long temp; __asm__ __volatile__( @@ -111,7 +111,7 @@ } #define DECLARE_DYN_IN(sz,fnsuffix,instr) \ -extern __inline__ unsigned sz __in##fnsuffix (unsigned int port) \ +static inline unsigned sz __in##fnsuffix (unsigned int port) \ { \ unsigned long temp, value; \ __asm__ __volatile__( \ @@ -125,7 +125,7 @@ return (unsigned sz)value; \ } -extern __inline__ unsigned int __ioaddr (unsigned int port) \ +static inline unsigned int __ioaddr (unsigned int port) \ { \ if (__PORT_PCIO(port)) \ return (unsigned int)(PCIO_BASE + (port << 2)); \ Index: irq.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-arm/arch-arc/irq.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- irq.h 14 Jan 2001 16:58:26 -0000 1.1.1.1 +++ irq.h 9 Apr 2002 12:33:08 -0000 1.2 @@ -16,6 +16,7 @@ */ #include <linux/config.h> #include <asm/hardware/ioc.h> +#include <asm/io.h> #ifdef CONFIG_ARCH_ARC #define a_clf() clf() @@ -29,105 +30,81 @@ static void arc_mask_irq_ack_a(unsigned int irq) { - unsigned int temp; + unsigned int val, mask; + mask = 1 << irq; a_clf(); - __asm__ __volatile__( - "ldrb %0, [%2]\n" -" bic %0, %0, %1\n" -" strb %0, [%2]\n" -" strb %1, [%3]" - : "=&r" (temp) - : "r" (1 << (irq & 7)), "r" (ioaddr(IOC_IRQMASKA)), - "r" (ioaddr(IOC_IRQCLRA))); + val = ioc_readb(IOC_IRQMASKA); + ioc_writeb(val & ~mask, IOC_IRQMASKA); + ioc_writeb(mask, IOC_IRQCLRA); a_stf(); } static void arc_mask_irq_a(unsigned int irq) { - unsigned int temp; + unsigned int val, mask; + mask = 1 << irq; a_clf(); - __asm__ __volatile__( - "ldrb %0, [%2]\n" -" bic %0, %0, %1\n" -" strb %0, [%2]" - : "=&r" (temp) - : "r" (1 << (irq & 7)), "r" (ioaddr(IOC_IRQMASKA))); + val = ioc_readb(IOC_IRQMASKA); + ioc_writeb(val & ~mask, IOC_IRQMASKA); a_stf(); } static void arc_unmask_irq_a(unsigned int irq) { - unsigned int temp; + unsigned int val, mask; + mask = 1 << irq; a_clf(); - __asm__ __volatile__( - "ldrb %0, [%2]\n" -" orr %0, %0, %1\n" -" strb %0, [%2]" - : "=&r" (temp) - : "r" (1 << (irq & 7)), "r" (ioaddr(IOC_IRQMASKA))); + val = ioc_readb(IOC_IRQMASKA); + ioc_writeb(val | mask, IOC_IRQMASKA); a_stf(); } static void arc_mask_irq_b(unsigned int irq) { - unsigned int temp; + unsigned int val, mask; - __asm__ __volatile__( - "ldrb %0, [%2]\n" -" bic %0, %0, %1\n" -" strb %0, [%2]" - : "=&r" (temp) - : "r" (1 << (irq & 7)), "r" (ioaddr(IOC_IRQMASKB))); + mask = 1 << (irq & 7); + val = ioc_readb(IOC_IRQMASKB); + ioc_writeb(val & ~mask, IOC_IRQMASKB); } static void arc_unmask_irq_b(unsigned int irq) { - unsigned int temp; + unsigned int val, mask; - __asm__ __volatile__( - "ldrb %0, [%2]\n" -" orr %0, %0, %1\n" -" strb %0, [%2]" - : "=&r" (temp) - : "r" (1 << (irq & 7)), "r" (ioaddr(IOC_IRQMASKB))); + mask = 1 << (irq & 7); + val = ioc_readb(IOC_IRQMASKB); + ioc_writeb(val | mask, IOC_IRQMASKB); } static void arc_mask_irq_fiq(unsigned int irq) { - unsigned int temp; + unsigned int val, mask; - __asm__ __volatile__( - "ldrb %0, [%2]\n" -" bic %0, %0, %1\n" -" strb %0, [%2]" - : "=&r" (temp) - : "r" (1 << (irq & 7)), "r" (ioaddr(IOC_FIQMASK))); + mask = 1 << (irq & 7); + val = ioc_readb(IOC_FIQMASK); + ioc_writeb(val & ~mask, IOC_FIQMASK); } static void arc_unmask_irq_fiq(unsigned int irq) { - unsigned int temp; + unsigned int val, mask; - __asm__ __volatile__( - "ldrb %0, [%2]\n" -" orr %0, %0, %1\n" -" strb %0, [%2]" - : "=&r" (temp) - : "r" (1 << (irq & 7)), "r" (ioaddr(IOC_FIQMASK))); + mask = 1 << (irq & 7); + val = ioc_readb(IOC_FIQMASK); + ioc_writeb(val | mask, IOC_FIQMASK); } static __inline__ void irq_init_irq(void) { - extern void ecard_disableirq(unsigned int irq); - extern void ecard_enableirq(unsigned int irq); int irq; - outb(0, IOC_IRQMASKA); - outb(0, IOC_IRQMASKB); - outb(0, IOC_FIQMASK); + ioc_writeb(0, IOC_IRQMASKA); + ioc_writeb(0, IOC_IRQMASKB); + ioc_writeb(0, IOC_FIQMASK); for (irq = 0; irq < NR_IRQS; irq++) { switch (irq) { @@ -154,13 +131,6 @@ irq_desc[irq].mask_ack = arc_mask_irq_b; irq_desc[irq].mask = arc_mask_irq_b; irq_desc[irq].unmask = arc_unmask_irq_b; - break; - - case 32 ... 40: - irq_desc[irq].valid = 1; - irq_desc[irq].mask_ack = ecard_disableirq; - irq_desc[irq].mask = ecard_disableirq; - irq_desc[irq].unmask = ecard_enableirq; break; case 64 ... 72: Index: keyboard.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-arm/arch-arc/keyboard.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- keyboard.h 14 Jan 2001 16:58:26 -0000 1.1.1.1 +++ keyboard.h 9 Apr 2002 12:33:08 -0000 1.2 @@ -1,7 +1,7 @@ /* * linux/include/asm-arm/arch-arc/keyboard.h * - * Copyright (C) 1998 Russell King + * Copyright (C) 1998-2001 Russell King * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -10,24 +10,12 @@ * Keyboard driver definitions for Acorn Archimedes/A5000 * architecture */ - #include <asm/irq.h> #define NR_SCANCODES 128 -extern void a5kkbd_leds(unsigned char leds); extern void a5kkbd_init_hw(void); -extern unsigned char a5kkbd_sysrq_xlate[NR_SCANCODES]; - -#define kbd_setkeycode(sc,kc) (-EINVAL) -#define kbd_getkeycode(sc) (-EINVAL) - -#define kbd_translate(sc, kcp, rm) ({ *(kcp) = (sc); 1; }) -#define kbd_unexpected_up(kc) (0200) -#define kbd_leds(leds) a5kkbd_leds(leds) -#define kbd_init_hw() a5kkbd_init_hw() -#define kbd_sysrq_xlate a5kkbd_sysrq_xlate -#define kbd_disable_irq() disable_irq(IRQ_KEYBOARDRX) -#define kbd_enable_irq() enable_irq(IRQ_KEYBOARDRX) -#define SYSRQ_KEY 13 +#define kbd_disable_irq() disable_irq(IRQ_KEYBOARDRX) +#define kbd_enable_irq() enable_irq(IRQ_KEYBOARDRX) +#define kbd_init_hw() a5kkbd_init_hw() Index: memory.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-arm/arch-arc/memory.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- memory.h 14 Jan 2001 16:58:26 -0000 1.1.1.1 +++ memory.h 9 Apr 2002 12:33:08 -0000 1.2 @@ -50,4 +50,6 @@ #define __bus_to_virt__is_a_macro #define __bus_to_virt(x) (x) +#define PHYS_TO_NID(addr) (0) + #endif Index: system.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-arm/arch-arc/system.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- system.h 14 Jan 2001 16:58:24 -0000 1.1.1.1 +++ system.h 9 Apr 2002 12:33:08 -0000 1.2 @@ -13,15 +13,8 @@ while (!current->need_resched && !hlt_counter); } -extern __inline__ void arch_reset(char mode) +static inline void arch_reset(char mode) { - extern void ecard_reset(int card); - - /* - * Reset all expansion cards. - */ - ecard_reset(-1); - /* * copy branch instruction to reset location and call it */ Index: time.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/include/asm-arm/arch-arc/time.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- time.h 14 Jan 2001 16:58:26 -0000 1.1.1.1 +++ time.h 9 Apr 2002 12:33:08 -0000 1.2 @@ -24,7 +24,7 @@ /* * Set up timer interrupt. */ -extern __inline__ void setup_timer(void) +static inline void setup_timer(void) { ioctime_init(); |