cm4040_cs.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _CM4040_H_
  3. #define _CM4040_H_
  4. #define CM_MAX_DEV 4
  5. #define DEVICE_NAME "cmx"
  6. #define MODULE_NAME "cm4040_cs"
  7. #define REG_OFFSET_BULK_OUT 0
  8. #define REG_OFFSET_BULK_IN 0
  9. #define REG_OFFSET_BUFFER_STATUS 1
  10. #define REG_OFFSET_SYNC_CONTROL 2
  11. #define BSR_BULK_IN_FULL 0x02
  12. #define BSR_BULK_OUT_FULL 0x01
  13. #define SCR_HOST_TO_READER_START 0x80
  14. #define SCR_ABORT 0x40
  15. #define SCR_EN_NOTIFY 0x20
  16. #define SCR_ACK_NOTIFY 0x10
  17. #define SCR_READER_TO_HOST_DONE 0x08
  18. #define SCR_HOST_TO_READER_DONE 0x04
  19. #define SCR_PULSE_INTERRUPT 0x02
  20. #define SCR_POWER_DOWN 0x01
  21. #define CMD_PC_TO_RDR_ICCPOWERON 0x62
  22. #define CMD_PC_TO_RDR_GETSLOTSTATUS 0x65
  23. #define CMD_PC_TO_RDR_ICCPOWEROFF 0x63
  24. #define CMD_PC_TO_RDR_SECURE 0x69
  25. #define CMD_PC_TO_RDR_GETPARAMETERS 0x6C
  26. #define CMD_PC_TO_RDR_RESETPARAMETERS 0x6D
  27. #define CMD_PC_TO_RDR_SETPARAMETERS 0x61
  28. #define CMD_PC_TO_RDR_XFRBLOCK 0x6F
  29. #define CMD_PC_TO_RDR_ESCAPE 0x6B
  30. #define CMD_PC_TO_RDR_ICCCLOCK 0x6E
  31. #define CMD_PC_TO_RDR_TEST_SECURE 0x74
  32. #define CMD_PC_TO_RDR_OK_SECURE 0x89
  33. #define CMD_RDR_TO_PC_SLOTSTATUS 0x81
  34. #define CMD_RDR_TO_PC_DATABLOCK 0x80
  35. #define CMD_RDR_TO_PC_PARAMETERS 0x82
  36. #define CMD_RDR_TO_PC_ESCAPE 0x83
  37. #define CMD_RDR_TO_PC_OK_SECURE 0x89
  38. #endif /* _CM4040_H_ */