i8042-ip22io.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. #ifndef _I8042_IP22_H
  2. #define _I8042_IP22_H
  3. #include <asm/sgi/ioc.h>
  4. #include <asm/sgi/ip22.h>
  5. /*
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms of the GNU General Public License version 2 as published by
  8. * the Free Software Foundation.
  9. */
  10. /*
  11. * Names.
  12. */
  13. #define I8042_KBD_PHYS_DESC "hpc3ps2/serio0"
  14. #define I8042_AUX_PHYS_DESC "hpc3ps2/serio1"
  15. #define I8042_MUX_PHYS_DESC "hpc3ps2/serio%d"
  16. /*
  17. * IRQs.
  18. */
  19. #define I8042_KBD_IRQ SGI_KEYBD_IRQ
  20. #define I8042_AUX_IRQ SGI_KEYBD_IRQ
  21. /*
  22. * Register numbers.
  23. */
  24. #define I8042_COMMAND_REG ((unsigned long)&sgioc->kbdmouse.command)
  25. #define I8042_STATUS_REG ((unsigned long)&sgioc->kbdmouse.command)
  26. #define I8042_DATA_REG ((unsigned long)&sgioc->kbdmouse.data)
  27. static inline int i8042_read_data(void)
  28. {
  29. return sgioc->kbdmouse.data;
  30. }
  31. static inline int i8042_read_status(void)
  32. {
  33. return sgioc->kbdmouse.command;
  34. }
  35. static inline void i8042_write_data(int val)
  36. {
  37. sgioc->kbdmouse.data = val;
  38. }
  39. static inline void i8042_write_command(int val)
  40. {
  41. sgioc->kbdmouse.command = val;
  42. }
  43. static inline int i8042_platform_init(void)
  44. {
  45. #if 0
  46. /* XXX sgi_kh is a virtual address */
  47. if (!request_mem_region(sgi_kh, sizeof(struct hpc_keyb), "i8042"))
  48. return -EBUSY;
  49. #endif
  50. i8042_reset = I8042_RESET_ALWAYS;
  51. return 0;
  52. }
  53. static inline void i8042_platform_exit(void)
  54. {
  55. #if 0
  56. release_mem_region(JAZZ_KEYBOARD_ADDRESS, sizeof(struct hpc_keyb));
  57. #endif
  58. }
  59. #endif /* _I8042_IP22_H */