smsc_fdc37m81x.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. * Interface for smsc fdc48m81x Super IO chip
  3. *
  4. * Author: MontaVista Software, Inc. source@mvista.com
  5. *
  6. * 2001-2003 (c) MontaVista Software, Inc. This file is licensed under
  7. * the terms of the GNU General Public License version 2. This program
  8. * is licensed "as is" without any warranty of any kind, whether express
  9. * or implied.
  10. *
  11. * Copyright (C) 2004 MontaVista Software Inc.
  12. * Manish Lachwani, mlachwani@mvista.com
  13. */
  14. #ifndef _SMSC_FDC37M81X_H_
  15. #define _SMSC_FDC37M81X_H_
  16. /* Common Registers */
  17. #define SMSC_FDC37M81X_CONFIG_INDEX 0x00
  18. #define SMSC_FDC37M81X_CONFIG_DATA 0x01
  19. #define SMSC_FDC37M81X_CONF 0x02
  20. #define SMSC_FDC37M81X_INDEX 0x03
  21. #define SMSC_FDC37M81X_DNUM 0x07
  22. #define SMSC_FDC37M81X_DID 0x20
  23. #define SMSC_FDC37M81X_DREV 0x21
  24. #define SMSC_FDC37M81X_PCNT 0x22
  25. #define SMSC_FDC37M81X_PMGT 0x23
  26. #define SMSC_FDC37M81X_OSC 0x24
  27. #define SMSC_FDC37M81X_CONFPA0 0x26
  28. #define SMSC_FDC37M81X_CONFPA1 0x27
  29. #define SMSC_FDC37M81X_TEST4 0x2B
  30. #define SMSC_FDC37M81X_TEST5 0x2C
  31. #define SMSC_FDC37M81X_TEST1 0x2D
  32. #define SMSC_FDC37M81X_TEST2 0x2E
  33. #define SMSC_FDC37M81X_TEST3 0x2F
  34. /* Logical device numbers */
  35. #define SMSC_FDC37M81X_FDD 0x00
  36. #define SMSC_FDC37M81X_PARALLEL 0x03
  37. #define SMSC_FDC37M81X_SERIAL1 0x04
  38. #define SMSC_FDC37M81X_SERIAL2 0x05
  39. #define SMSC_FDC37M81X_KBD 0x07
  40. #define SMSC_FDC37M81X_AUXIO 0x08
  41. #define SMSC_FDC37M81X_NONE 0xff
  42. /* Logical device Config Registers */
  43. #define SMSC_FDC37M81X_ACTIVE 0x30
  44. #define SMSC_FDC37M81X_BASEADDR0 0x60
  45. #define SMSC_FDC37M81X_BASEADDR1 0x61
  46. #define SMSC_FDC37M81X_INT 0x70
  47. #define SMSC_FDC37M81X_INT2 0x72
  48. #define SMSC_FDC37M81X_LDCR_F0 0xF0
  49. /* Chip Config Values */
  50. #define SMSC_FDC37M81X_CONFIG_ENTER 0x55
  51. #define SMSC_FDC37M81X_CONFIG_EXIT 0xaa
  52. #define SMSC_FDC37M81X_CHIP_ID 0x4d
  53. unsigned long smsc_fdc37m81x_init(unsigned long port);
  54. void smsc_fdc37m81x_config_beg(void);
  55. void smsc_fdc37m81x_config_end(void);
  56. u8 smsc_fdc37m81x_config_get(u8 reg);
  57. void smsc_fdc37m81x_config_set(u8 reg, u8 val);
  58. #endif