Path: blob/master/drivers/input/serio/i8042-ip22io.h
15111 views
#ifndef _I8042_IP22_H1#define _I8042_IP22_H23#include <asm/sgi/ioc.h>4#include <asm/sgi/ip22.h>56/*7* This program is free software; you can redistribute it and/or modify it8* under the terms of the GNU General Public License version 2 as published by9* the Free Software Foundation.10*/1112/*13* Names.14*/1516#define I8042_KBD_PHYS_DESC "hpc3ps2/serio0"17#define I8042_AUX_PHYS_DESC "hpc3ps2/serio1"18#define I8042_MUX_PHYS_DESC "hpc3ps2/serio%d"1920/*21* IRQs.22*/2324#define I8042_KBD_IRQ SGI_KEYBD_IRQ25#define I8042_AUX_IRQ SGI_KEYBD_IRQ2627/*28* Register numbers.29*/3031#define I8042_COMMAND_REG ((unsigned long)&sgioc->kbdmouse.command)32#define I8042_STATUS_REG ((unsigned long)&sgioc->kbdmouse.command)33#define I8042_DATA_REG ((unsigned long)&sgioc->kbdmouse.data)3435static inline int i8042_read_data(void)36{37return sgioc->kbdmouse.data;38}3940static inline int i8042_read_status(void)41{42return sgioc->kbdmouse.command;43}4445static inline void i8042_write_data(int val)46{47sgioc->kbdmouse.data = val;48}4950static inline void i8042_write_command(int val)51{52sgioc->kbdmouse.command = val;53}5455static inline int i8042_platform_init(void)56{57#if 058/* XXX sgi_kh is a virtual address */59if (!request_mem_region(sgi_kh, sizeof(struct hpc_keyb), "i8042"))60return -EBUSY;61#endif6263i8042_reset = 1;6465return 0;66}6768static inline void i8042_platform_exit(void)69{70#if 071release_mem_region(JAZZ_KEYBOARD_ADDRESS, sizeof(struct hpc_keyb));72#endif73}7475#endif /* _I8042_IP22_H */767778