blob: 260c49d608207261bc202ada94432f3cb063d58d [file] [log] [blame]
Bryan Huntsman3f2bc4d2011-08-16 17:27:22 -07001#ifndef CSDIO_H
2#define CSDIO_H
3
4#include <linux/ioctl.h>
5
6#define CSDIO_IOC_MAGIC 'm'
7
8#define CSDIO_IOC_ENABLE_HIGHSPEED_MODE _IO(CSDIO_IOC_MAGIC, 0)
9#define CSDIO_IOC_SET_DATA_TRANSFER_CLOCKS _IO(CSDIO_IOC_MAGIC, 1)
10#define CSDIO_IOC_SET_OP_CODE _IO(CSDIO_IOC_MAGIC, 2)
11#define CSDIO_IOC_FUNCTION_SET_BLOCK_SIZE _IO(CSDIO_IOC_MAGIC, 3)
12#define CSDIO_IOC_SET_BLOCK_MODE _IO(CSDIO_IOC_MAGIC, 4)
13#define CSDIO_IOC_CONNECT_ISR _IO(CSDIO_IOC_MAGIC, 5)
14#define CSDIO_IOC_DISCONNECT_ISR _IO(CSDIO_IOC_MAGIC, 6)
15#define CSDIO_IOC_CMD52 _IO(CSDIO_IOC_MAGIC, 7)
16#define CSDIO_IOC_CMD53 _IO(CSDIO_IOC_MAGIC, 8)
17#define CSDIO_IOC_ENABLE_ISR _IO(CSDIO_IOC_MAGIC, 9)
18#define CSDIO_IOC_DISABLE_ISR _IO(CSDIO_IOC_MAGIC, 10)
19#define CSDIO_IOC_SET_VDD _IO(CSDIO_IOC_MAGIC, 11)
20#define CSDIO_IOC_GET_VDD _IO(CSDIO_IOC_MAGIC, 12)
21
22#define CSDIO_IOC_MAXNR 12
23
24struct csdio_cmd53_ctrl_t {
25 uint32_t m_block_mode; /* data tran. byte(0)/block(1) mode */
26 uint32_t m_op_code; /* address auto increment flag */
27 uint32_t m_address;
28} __attribute__ ((packed));
29
30struct csdio_cmd52_ctrl_t {
31 uint32_t m_write;
32 uint32_t m_address;
33 uint32_t m_data;
34 uint32_t m_ret;
35} __attribute__ ((packed));
36
37#endif