diff options
| author | Russell King <rmk@flint.arm.linux.org.uk> | 2002-07-27 02:16:08 +0100 |
|---|---|---|
| committer | Russell King <rmk@flint.arm.linux.org.uk> | 2002-07-27 02:16:08 +0100 |
| commit | 03e7ecabf2a7b71e45a7dc52dc7f8f7b8ce72f25 (patch) | |
| tree | 37ebe3a5f54ca1f4e2b55e575f57112b0aff9859 /include | |
| parent | b0ab8396bab3f08959ebd903c55409475975f0aa (diff) | |
| parent | 44d9a1809c1230b022bb64458c53d7c4e8bdee7c (diff) | |
Merge flint.arm.linux.org.uk:/usr/src/linux-bk-2.5/linux-2.5
into flint.arm.linux.org.uk:/usr/src/linux-bk-2.5/linux-2.5-rmk
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-arm/arch-ebsa285/keyboard.h | 61 | ||||
| -rw-r--r-- | include/asm-arm/arch-integrator/keyboard.h | 11 | ||||
| -rw-r--r-- | include/asm-arm/arch-rpc/keyboard.h | 11 | ||||
| -rw-r--r-- | include/asm-arm/arch-sa1100/keyboard.h | 13 | ||||
| -rw-r--r-- | include/asm-arm/hardware/sa1111.h | 137 | ||||
| -rw-r--r-- | include/asm-arm/io.h | 7 |
6 files changed, 36 insertions, 204 deletions
diff --git a/include/asm-arm/arch-ebsa285/keyboard.h b/include/asm-arm/arch-ebsa285/keyboard.h index 968163b3f883..f47b43fe800c 100644 --- a/include/asm-arm/arch-ebsa285/keyboard.h +++ b/include/asm-arm/arch-ebsa285/keyboard.h @@ -6,63 +6,4 @@ * Copyright (C) 1998-2001 Russell King * (C) 1998 Phil Blundell */ -#include <linux/config.h> -#include <linux/ioport.h> -#include <asm/irq.h> -#include <asm/system.h> - -#define KEYBOARD_IRQ IRQ_ISA_KEYBOARD -#define NR_SCANCODES 128 - -#define kbd_disable_irq() do { } while (0) -#define kbd_enable_irq() do { } while (0) - -extern int pckbd_setkeycode(unsigned int scancode, unsigned int keycode); -extern int pckbd_getkeycode(unsigned int scancode); -extern int pckbd_translate(unsigned char scancode, unsigned char *keycode, - char raw_mode); -extern char pckbd_unexpected_up(unsigned char keycode); -extern void pckbd_leds(unsigned char leds); -extern void pckbd_init_hw(void); -extern unsigned char pckbd_sysrq_xlate[128]; - -static inline void kbd_init_hw(void) -{ - if (have_isa_bridge) { - k_setkeycode = pckbd_setkeycode; - k_getkeycode = pckbd_getkeycode; - k_translate = pckbd_translate; - k_unexpected_up = pckbd_unexpected_up; - k_leds = pckbd_leds; -#ifdef CONFIG_MAGIC_SYSRQ - k_sysrq_key = 0x54; - k_sysrq_xlate = pckbd_sysrq_xlate; -#endif - pckbd_init_hw(); - } -} - - -/* - * The rest of this file is to do with supporting pc_keyb.c - */ - -/* resource allocation */ -#define kbd_request_region() request_region(0x60, 16, "keyboard") -#define kbd_request_irq(handler) request_irq(KEYBOARD_IRQ, handler, 0, \ - "keyboard", NULL) - -/* How to access the keyboard macros on this platform. */ -#define kbd_read_input() inb(KBD_DATA_REG) -#define kbd_read_status() inb(KBD_STATUS_REG) -#define kbd_write_output(val) outb(val, KBD_DATA_REG) -#define kbd_write_command(val) outb(val, KBD_CNTL_REG) - -/* Some stoneage hardware needs delays after some operations. */ -#define kbd_pause() do { } while(0) - -#define aux_request_irq(hand, dev_id) \ - request_irq(AUX_IRQ, hand, SA_SHIRQ, "PS/2 Mouse", dev_id) - -#define aux_free_irq(dev_id) free_irq(AUX_IRQ, dev_id) - +#define kbd_init_hw() do { } while (0) diff --git a/include/asm-arm/arch-integrator/keyboard.h b/include/asm-arm/arch-integrator/keyboard.h index 48aab706c868..2ca4754586a9 100644 --- a/include/asm-arm/arch-integrator/keyboard.h +++ b/include/asm-arm/arch-integrator/keyboard.h @@ -17,13 +17,6 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Keyboard driver definitions for the Integrator architecture + * Now using the input subsystem... */ -#include <asm/irq.h> - -#define NR_SCANCODES 128 - -extern int kmi_kbd_init(void); - -#define kbd_disable_irq() disable_irq(IRQ_KMIINT0) -#define kbd_enable_irq() enable_irq(IRQ_KMIINT0) -#define kbd_init_hw() kmi_kbd_init() +#define kbd_init_hw() do { } while (0) diff --git a/include/asm-arm/arch-rpc/keyboard.h b/include/asm-arm/arch-rpc/keyboard.h index 8aed4bd00fba..db187f96b1cc 100644 --- a/include/asm-arm/arch-rpc/keyboard.h +++ b/include/asm-arm/arch-rpc/keyboard.h @@ -8,13 +8,6 @@ * published by the Free Software Foundation. * * Keyboard driver definitions for RiscPC architecture + * Now using the input subsystem... */ -#include <asm/irq.h> - -#define NR_SCANCODES 128 - -extern int ps2kbd_init_hw(void); - -#define kbd_disable_irq() disable_irq(IRQ_KEYBOARDRX) -#define kbd_enable_irq() enable_irq(IRQ_KEYBOARDRX) -#define kbd_init_hw() ps2kbd_init_hw() +#define kbd_init_hw() do { } while (0) diff --git a/include/asm-arm/arch-sa1100/keyboard.h b/include/asm-arm/arch-sa1100/keyboard.h index aa7f317092e5..e2a0c0196bfc 100644 --- a/include/asm-arm/arch-sa1100/keyboard.h +++ b/include/asm-arm/arch-sa1100/keyboard.h @@ -8,21 +8,13 @@ #include <linux/config.h> #include <asm/mach-types.h> -#include <asm/arch/assabet.h> -#define kbd_disable_irq() do { } while(0) -#define kbd_enable_irq() do { } while(0) - -extern int sa1111_kbd_init_hw(void); extern void gc_kbd_init_hw(void); extern void smartio_kbd_init_hw(void); extern void cerf_kbd_init_hw(void); static inline void kbd_init_hw(void) { - if ((machine_is_assabet() && machine_has_neponset()) || - machine_is_graphicsmaster()) - sa1111_kbd_init_hw(); if (machine_is_graphicsclient()) gc_kbd_init_hw(); if (machine_is_adsbitsy()) @@ -31,11 +23,6 @@ static inline void kbd_init_hw(void) if (machine_is_cerf()) cerf_kbd_init_hw(); #endif -#ifdef CONFIG_SA1100_PT_SYSTEM3 - /* TODO: add system 3 board specific functions here */ - if (machine_is_pt_system3()) - sa1111_kbd_init_hw(); -#endif } #endif /* _SA1100_KEYBOARD_H */ diff --git a/include/asm-arm/hardware/sa1111.h b/include/asm-arm/hardware/sa1111.h index a6ef00569bc6..f00889d5976c 100644 --- a/include/asm-arm/hardware/sa1111.h +++ b/include/asm-arm/hardware/sa1111.h @@ -529,120 +529,31 @@ * */ -#define _KBD( x ) _SA1111( 0x0A00 ) -#define _MSE( x ) _SA1111( 0x0C00 ) - -#define _KBDCR _SA1111( 0x0A00 ) -#define _KBDSTAT _SA1111( 0x0A04 ) -#define _KBDDATA _SA1111( 0x0A08 ) -#define _KBDCLKDIV _SA1111( 0x0A0C ) -#define _KBDPRECNT _SA1111( 0x0A10 ) -#define _MSECR _SA1111( 0x0C00 ) -#define _MSESTAT _SA1111( 0x0C04 ) -#define _MSEDATA _SA1111( 0x0C08 ) -#define _MSECLKDIV _SA1111( 0x0C0C ) -#define _MSEPRECNT _SA1111( 0x0C10 ) - -#if ( LANGUAGE == C ) - -#define KBDCR __CCREG(0x0a00) -#define KBDSTAT __CCREG(0x0a04) -#define KBDDATA __CCREG(0x0a08) -#define KBDCLKDIV __CCREG(0x0a0c) -#define KBDPRECNT __CCREG(0x0a10) -#define MSECR __CCREG(0x0c00) -#define MSESTAT __CCREG(0x0c04) -#define MSEDATA __CCREG(0x0c08) -#define MSECLKDIV __CCREG(0x0c0c) -#define MSEPRECNT __CCREG(0x0c10) - -#define KBDCR_ENA 0x08 -#define KBDCR_FKD 0x02 -#define KBDCR_FKC 0x01 - -#define KBDSTAT_TXE 0x80 -#define KBDSTAT_TXB 0x40 -#define KBDSTAT_RXF 0x20 -#define KBDSTAT_RXB 0x10 -#define KBDSTAT_ENA 0x08 -#define KBDSTAT_RXP 0x04 -#define KBDSTAT_KBD 0x02 -#define KBDSTAT_KBC 0x01 - -#define KBDCLKDIV_DivVal Fld(4,0) - -#define MSECR_ENA 0x08 -#define MSECR_FKD 0x02 -#define MSECR_FKC 0x01 - -#define MSESTAT_TXE 0x80 -#define MSESTAT_TXB 0x40 -#define MSESTAT_RXF 0x20 -#define MSESTAT_RXB 0x10 -#define MSESTAT_ENA 0x08 -#define MSESTAT_RXP 0x04 -#define MSESTAT_MSD 0x02 -#define MSESTAT_MSC 0x01 - -#define MSECLKDIV_DivVal Fld(4,0) - -#define KBDTEST1_CD 0x80 -#define KBDTEST1_RC1 0x40 -#define KBDTEST1_MC 0x20 -#define KBDTEST1_C Fld(2,3) -#define KBDTEST1_T2 0x40 -#define KBDTEST1_T1 0x20 -#define KBDTEST1_T0 0x10 -#define KBDTEST2_TICBnRES 0x08 -#define KBDTEST2_RKC 0x04 -#define KBDTEST2_RKD 0x02 -#define KBDTEST2_SEL 0x01 -#define KBDTEST3_ms_16 0x80 -#define KBDTEST3_us_64 0x40 -#define KBDTEST3_us_16 0x20 -#define KBDTEST3_DIV8 0x10 -#define KBDTEST3_DIn 0x08 -#define KBDTEST3_CIn 0x04 -#define KBDTEST3_KD 0x02 -#define KBDTEST3_KC 0x01 -#define KBDTEST4_BC12 0x80 -#define KBDTEST4_BC11 0x40 -#define KBDTEST4_TRES 0x20 -#define KBDTEST4_CLKOE 0x10 -#define KBDTEST4_CRES 0x08 -#define KBDTEST4_RXB 0x04 -#define KBDTEST4_TXB 0x02 -#define KBDTEST4_SRX 0x01 - -#define MSETEST1_CD 0x80 -#define MSETEST1_RC1 0x40 -#define MSETEST1_MC 0x20 -#define MSETEST1_C Fld(2,3) -#define MSETEST1_T2 0x40 -#define MSETEST1_T1 0x20 -#define MSETEST1_T0 0x10 -#define MSETEST2_TICBnRES 0x08 -#define MSETEST2_RKC 0x04 -#define MSETEST2_RKD 0x02 -#define MSETEST2_SEL 0x01 -#define MSETEST3_ms_16 0x80 -#define MSETEST3_us_64 0x40 -#define MSETEST3_us_16 0x20 -#define MSETEST3_DIV8 0x10 -#define MSETEST3_DIn 0x08 -#define MSETEST3_CIn 0x04 -#define MSETEST3_KD 0x02 -#define MSETEST3_KC 0x01 -#define MSETEST4_BC12 0x80 -#define MSETEST4_BC11 0x40 -#define MSETEST4_TRES 0x20 -#define MSETEST4_CLKOE 0x10 -#define MSETEST4_CRES 0x08 -#define MSETEST4_RXB 0x04 -#define MSETEST4_TXB 0x02 -#define MSETEST4_SRX 0x01 +#define SA1111_KBD 0x0a00 +#define SA1111_MSE 0x0c00 -#endif /* LANGUAGE == C */ +/* + * These are offsets from the above bases. + */ +#define SA1111_PS2CR 0x0000 +#define SA1111_PS2STAT 0x0004 +#define SA1111_PS2DATA 0x0008 +#define SA1111_PS2CLKDIV 0x000c +#define SA1111_PS2PRECNT 0x0010 + +#define PS2CR_ENA 0x08 +#define PS2CR_FKD 0x02 +#define PS2CR_FKC 0x01 + +#define PS2STAT_STP 0x0100 +#define PS2STAT_TXE 0x0080 +#define PS2STAT_TXB 0x0040 +#define PS2STAT_RXF 0x0020 +#define PS2STAT_RXB 0x0010 +#define PS2STAT_ENA 0x0008 +#define PS2STAT_RXP 0x0004 +#define PS2STAT_KBD 0x0002 +#define PS2STAT_KBC 0x0001 /* * PCMCIA Interface diff --git a/include/asm-arm/io.h b/include/asm-arm/io.h index 21ca5ae0b847..ebaef59d788a 100644 --- a/include/asm-arm/io.h +++ b/include/asm-arm/io.h @@ -29,6 +29,13 @@ #include <asm/arch/hardware.h> /* + * ISA I/O bus memory addresses are 1:1 with the physical address. + */ +#define isa_virt_to_bus virt_to_phys +#define isa_page_to_bus page_to_phys +#define isa_bus_to_virt phys_to_virt + +/* * Generic IO read/write. These perform native-endian accesses. Note * that some architectures will want to re-define __raw_{read,write}w. */ |
