i8042-jazzio.h 1.3 KB

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