rtw_io.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of version 2 of the GNU General Public License as
  7. * published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful, but WITHOUT
  10. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  12. * more details.
  13. *
  14. * You should have received a copy of the GNU General Public License along with
  15. * this program; if not, write to the Free Software Foundation, Inc.,
  16. * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
  17. *
  18. *
  19. ******************************************************************************/
  20. #ifndef _RTW_IO_H_
  21. #define _RTW_IO_H_
  22. #ifdef PLATFORM_LINUX
  23. #ifdef CONFIG_USB_HCI
  24. #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
  25. #define rtw_usb_buffer_alloc(dev, size, dma) usb_alloc_coherent((dev), (size), (in_interrupt() ? GFP_ATOMIC : GFP_KERNEL), (dma))
  26. #define rtw_usb_buffer_free(dev, size, addr, dma) usb_free_coherent((dev), (size), (addr), (dma))
  27. #else
  28. #define rtw_usb_buffer_alloc(dev, size, dma) usb_buffer_alloc((dev), (size), (in_interrupt() ? GFP_ATOMIC : GFP_KERNEL), (dma))
  29. #define rtw_usb_buffer_free(dev, size, addr, dma) usb_buffer_free((dev), (size), (addr), (dma))
  30. #endif
  31. #endif //CONFIG_USB_HCI
  32. #endif //PLATFORM_LINUX
  33. #define NUM_IOREQ 8
  34. #ifdef PLATFORM_WINDOWS
  35. #define MAX_PROT_SZ 64
  36. #endif
  37. #ifdef PLATFORM_LINUX
  38. #define MAX_PROT_SZ (64-16)
  39. #endif
  40. #define _IOREADY 0
  41. #define _IO_WAIT_COMPLETE 1
  42. #define _IO_WAIT_RSP 2
  43. // IO COMMAND TYPE
  44. #define _IOSZ_MASK_ (0x7F)
  45. #define _IO_WRITE_ BIT(7)
  46. #define _IO_FIXED_ BIT(8)
  47. #define _IO_BURST_ BIT(9)
  48. #define _IO_BYTE_ BIT(10)
  49. #define _IO_HW_ BIT(11)
  50. #define _IO_WORD_ BIT(12)
  51. #define _IO_SYNC_ BIT(13)
  52. #define _IO_CMDMASK_ (0x1F80)
  53. /*
  54. For prompt mode accessing, caller shall free io_req
  55. Otherwise, io_handler will free io_req
  56. */
  57. // IO STATUS TYPE
  58. #define _IO_ERR_ BIT(2)
  59. #define _IO_SUCCESS_ BIT(1)
  60. #define _IO_DONE_ BIT(0)
  61. #define IO_RD32 (_IO_SYNC_ | _IO_WORD_)
  62. #define IO_RD16 (_IO_SYNC_ | _IO_HW_)
  63. #define IO_RD8 (_IO_SYNC_ | _IO_BYTE_)
  64. #define IO_RD32_ASYNC (_IO_WORD_)
  65. #define IO_RD16_ASYNC (_IO_HW_)
  66. #define IO_RD8_ASYNC (_IO_BYTE_)
  67. #define IO_WR32 (_IO_WRITE_ | _IO_SYNC_ | _IO_WORD_)
  68. #define IO_WR16 (_IO_WRITE_ | _IO_SYNC_ | _IO_HW_)
  69. #define IO_WR8 (_IO_WRITE_ | _IO_SYNC_ | _IO_BYTE_)
  70. #define IO_WR32_ASYNC (_IO_WRITE_ | _IO_WORD_)
  71. #define IO_WR16_ASYNC (_IO_WRITE_ | _IO_HW_)
  72. #define IO_WR8_ASYNC (_IO_WRITE_ | _IO_BYTE_)
  73. /*
  74. Only Sync. burst accessing is provided.
  75. */
  76. #define IO_WR_BURST(x) (_IO_WRITE_ | _IO_SYNC_ | _IO_BURST_ | ( (x) & _IOSZ_MASK_))
  77. #define IO_RD_BURST(x) (_IO_SYNC_ | _IO_BURST_ | ( (x) & _IOSZ_MASK_))
  78. //below is for the intf_option bit defition...
  79. #define _INTF_ASYNC_ BIT(0) //support async io
  80. struct intf_priv;
  81. struct intf_hdl;
  82. struct io_queue;
  83. struct _io_ops
  84. {
  85. u8 (*_read8)(struct intf_hdl *pintfhdl, u32 addr);
  86. u16 (*_read16)(struct intf_hdl *pintfhdl, u32 addr);
  87. u32 (*_read32)(struct intf_hdl *pintfhdl, u32 addr);
  88. int (*_write8)(struct intf_hdl *pintfhdl, u32 addr, u8 val);
  89. int (*_write16)(struct intf_hdl *pintfhdl, u32 addr, u16 val);
  90. int (*_write32)(struct intf_hdl *pintfhdl, u32 addr, u32 val);
  91. int (*_writeN)(struct intf_hdl *pintfhdl, u32 addr, u32 length, u8 *pdata);
  92. int (*_write8_async)(struct intf_hdl *pintfhdl, u32 addr, u8 val);
  93. int (*_write16_async)(struct intf_hdl *pintfhdl, u32 addr, u16 val);
  94. int (*_write32_async)(struct intf_hdl *pintfhdl, u32 addr, u32 val);
  95. void (*_read_mem)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
  96. void (*_write_mem)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
  97. void (*_sync_irp_protocol_rw)(struct io_queue *pio_q);
  98. u32 (*_read_interrupt)(struct intf_hdl *pintfhdl, u32 addr);
  99. u32 (*_read_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
  100. u32 (*_write_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
  101. u32 (*_write_scsi)(struct intf_hdl *pintfhdl,u32 cnt, u8 *pmem);
  102. void (*_read_port_cancel)(struct intf_hdl *pintfhdl);
  103. void (*_write_port_cancel)(struct intf_hdl *pintfhdl);
  104. };
  105. struct io_req {
  106. _list list;
  107. u32 addr;
  108. volatile u32 val;
  109. u32 command;
  110. u32 status;
  111. u8 *pbuf;
  112. _sema sema;
  113. #ifdef PLATFORM_OS_CE
  114. #ifdef CONFIG_USB_HCI
  115. // URB handler for rtw_write_mem
  116. USB_TRANSFER usb_transfer_write_mem;
  117. #endif
  118. #endif
  119. void (*_async_io_callback)(_adapter *padater, struct io_req *pio_req, u8 *cnxt);
  120. u8 *cnxt;
  121. #ifdef PLATFORM_OS_XP
  122. PMDL pmdl;
  123. PIRP pirp;
  124. #ifdef CONFIG_SDIO_HCI
  125. PSDBUS_REQUEST_PACKET sdrp;
  126. #endif
  127. #endif
  128. };
  129. struct intf_hdl {
  130. /*
  131. u32 intf_option;
  132. u32 bus_status;
  133. u32 do_flush;
  134. u8 *adapter;
  135. u8 *intf_dev;
  136. struct intf_priv *pintfpriv;
  137. u8 cnt;
  138. void (*intf_hdl_init)(u8 *priv);
  139. void (*intf_hdl_unload)(u8 *priv);
  140. void (*intf_hdl_open)(u8 *priv);
  141. void (*intf_hdl_close)(u8 *priv);
  142. struct _io_ops io_ops;
  143. //u8 intf_status;//moved to struct intf_priv
  144. u16 len;
  145. u16 done_len;
  146. */
  147. _adapter *padapter;
  148. struct dvobj_priv *pintf_dev;// pointer to &(padapter->dvobjpriv);
  149. struct _io_ops io_ops;
  150. };
  151. struct reg_protocol_rd {
  152. #ifdef CONFIG_LITTLE_ENDIAN
  153. //DW1
  154. u32 NumOfTrans:4;
  155. u32 Reserved1:4;
  156. u32 Reserved2:24;
  157. //DW2
  158. u32 ByteCount:7;
  159. u32 WriteEnable:1; //0:read, 1:write
  160. u32 FixOrContinuous:1; //0:continuous, 1: Fix
  161. u32 BurstMode:1;
  162. u32 Byte1Access:1;
  163. u32 Byte2Access:1;
  164. u32 Byte4Access:1;
  165. u32 Reserved3:3;
  166. u32 Reserved4:16;
  167. //DW3
  168. u32 BusAddress;
  169. //DW4
  170. //u32 Value;
  171. #else
  172. //DW1
  173. u32 Reserved1 :4;
  174. u32 NumOfTrans :4;
  175. u32 Reserved2 :24;
  176. //DW2
  177. u32 WriteEnable : 1;
  178. u32 ByteCount :7;
  179. u32 Reserved3 : 3;
  180. u32 Byte4Access : 1;
  181. u32 Byte2Access : 1;
  182. u32 Byte1Access : 1;
  183. u32 BurstMode :1 ;
  184. u32 FixOrContinuous : 1;
  185. u32 Reserved4 : 16;
  186. //DW3
  187. u32 BusAddress;
  188. //DW4
  189. //u32 Value;
  190. #endif
  191. };
  192. struct reg_protocol_wt {
  193. #ifdef CONFIG_LITTLE_ENDIAN
  194. //DW1
  195. u32 NumOfTrans:4;
  196. u32 Reserved1:4;
  197. u32 Reserved2:24;
  198. //DW2
  199. u32 ByteCount:7;
  200. u32 WriteEnable:1; //0:read, 1:write
  201. u32 FixOrContinuous:1; //0:continuous, 1: Fix
  202. u32 BurstMode:1;
  203. u32 Byte1Access:1;
  204. u32 Byte2Access:1;
  205. u32 Byte4Access:1;
  206. u32 Reserved3:3;
  207. u32 Reserved4:16;
  208. //DW3
  209. u32 BusAddress;
  210. //DW4
  211. u32 Value;
  212. #else
  213. //DW1
  214. u32 Reserved1 :4;
  215. u32 NumOfTrans :4;
  216. u32 Reserved2 :24;
  217. //DW2
  218. u32 WriteEnable : 1;
  219. u32 ByteCount :7;
  220. u32 Reserved3 : 3;
  221. u32 Byte4Access : 1;
  222. u32 Byte2Access : 1;
  223. u32 Byte1Access : 1;
  224. u32 BurstMode :1 ;
  225. u32 FixOrContinuous : 1;
  226. u32 Reserved4 : 16;
  227. //DW3
  228. u32 BusAddress;
  229. //DW4
  230. u32 Value;
  231. #endif
  232. };
  233. /*
  234. Below is the data structure used by _io_handler
  235. */
  236. struct io_queue {
  237. _lock lock;
  238. _list free_ioreqs;
  239. _list pending; //The io_req list that will be served in the single protocol read/write.
  240. _list processing;
  241. u8 *free_ioreqs_buf; // 4-byte aligned
  242. u8 *pallocated_free_ioreqs_buf;
  243. struct intf_hdl intf;
  244. };
  245. struct io_priv{
  246. _adapter *padapter;
  247. struct intf_hdl intf;
  248. };
  249. extern uint ioreq_flush(_adapter *adapter, struct io_queue *ioqueue);
  250. extern void sync_ioreq_enqueue(struct io_req *preq,struct io_queue *ioqueue);
  251. extern uint sync_ioreq_flush(_adapter *adapter, struct io_queue *ioqueue);
  252. extern uint free_ioreq(struct io_req *preq, struct io_queue *pio_queue);
  253. extern struct io_req *alloc_ioreq(struct io_queue *pio_q);
  254. extern uint register_intf_hdl(u8 *dev, struct intf_hdl *pintfhdl);
  255. extern void unregister_intf_hdl(struct intf_hdl *pintfhdl);
  256. extern void _rtw_attrib_read(_adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
  257. extern void _rtw_attrib_write(_adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
  258. extern u8 _rtw_read8(_adapter *adapter, u32 addr);
  259. extern u16 _rtw_read16(_adapter *adapter, u32 addr);
  260. extern u32 _rtw_read32(_adapter *adapter, u32 addr);
  261. extern void _rtw_read_mem(_adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
  262. extern void _rtw_read_port(_adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
  263. extern void _rtw_read_port_cancel(_adapter *adapter);
  264. extern int _rtw_write8(_adapter *adapter, u32 addr, u8 val);
  265. extern int _rtw_write16(_adapter *adapter, u32 addr, u16 val);
  266. extern int _rtw_write32(_adapter *adapter, u32 addr, u32 val);
  267. extern int _rtw_writeN(_adapter *adapter, u32 addr, u32 length, u8 *pdata);
  268. extern int _rtw_write8_async(_adapter *adapter, u32 addr, u8 val);
  269. extern int _rtw_write16_async(_adapter *adapter, u32 addr, u16 val);
  270. extern int _rtw_write32_async(_adapter *adapter, u32 addr, u32 val);
  271. extern void _rtw_write_mem(_adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
  272. extern u32 _rtw_write_port(_adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
  273. u32 _rtw_write_port_and_wait(_adapter *adapter, u32 addr, u32 cnt, u8 *pmem, int timeout_ms);
  274. extern void _rtw_write_port_cancel(_adapter *adapter);
  275. #ifdef DBG_IO
  276. bool match_read_sniff_ranges(u16 addr, u16 len);
  277. bool match_write_sniff_ranges(u16 addr, u16 len);
  278. extern u8 dbg_rtw_read8(_adapter *adapter, u32 addr, const char *caller, const int line);
  279. extern u16 dbg_rtw_read16(_adapter *adapter, u32 addr, const char *caller, const int line);
  280. extern u32 dbg_rtw_read32(_adapter *adapter, u32 addr, const char *caller, const int line);
  281. extern int dbg_rtw_write8(_adapter *adapter, u32 addr, u8 val, const char *caller, const int line);
  282. extern int dbg_rtw_write16(_adapter *adapter, u32 addr, u16 val, const char *caller, const int line);
  283. extern int dbg_rtw_write32(_adapter *adapter, u32 addr, u32 val, const char *caller, const int line);
  284. extern int dbg_rtw_writeN(_adapter *adapter, u32 addr ,u32 length , u8 *data, const char *caller, const int line);
  285. #define rtw_read8(adapter, addr) dbg_rtw_read8((adapter), (addr), __FUNCTION__, __LINE__)
  286. #define rtw_read16(adapter, addr) dbg_rtw_read16((adapter), (addr), __FUNCTION__, __LINE__)
  287. #define rtw_read32(adapter, addr) dbg_rtw_read32((adapter), (addr), __FUNCTION__, __LINE__)
  288. #define rtw_read_mem(adapter, addr, cnt, mem) _rtw_read_mem((adapter), (addr), (cnt), (mem))
  289. #define rtw_read_port(adapter, addr, cnt, mem) _rtw_read_port((adapter), (addr), (cnt), (mem))
  290. #define rtw_read_port_cancel(adapter) _rtw_read_port_cancel((adapter))
  291. #define rtw_write8(adapter, addr, val) dbg_rtw_write8((adapter), (addr), (val), __FUNCTION__, __LINE__)
  292. #define rtw_write16(adapter, addr, val) dbg_rtw_write16((adapter), (addr), (val), __FUNCTION__, __LINE__)
  293. #define rtw_write32(adapter, addr, val) dbg_rtw_write32((adapter), (addr), (val), __FUNCTION__, __LINE__)
  294. #define rtw_writeN(adapter, addr, length, data) dbg_rtw_writeN((adapter), (addr), (length), (data), __FUNCTION__, __LINE__)
  295. #define rtw_write8_async(adapter, addr, val) _rtw_write8_async((adapter), (addr), (val))
  296. #define rtw_write16_async(adapter, addr, val) _rtw_write16_async((adapter), (addr), (val))
  297. #define rtw_write32_async(adapter, addr, val) _rtw_write32_async((adapter), (addr), (val))
  298. #define rtw_write_mem(adapter, addr, cnt, mem) _rtw_write_mem((adapter), addr, cnt, mem)
  299. #define rtw_write_port(adapter, addr, cnt, mem) _rtw_write_port(adapter, addr, cnt, mem)
  300. #define rtw_write_port_and_wait(adapter, addr, cnt, mem, timeout_ms) _rtw_write_port_and_wait((adapter), (addr), (cnt), (mem), (timeout_ms))
  301. #define rtw_write_port_cancel(adapter) _rtw_write_port_cancel(adapter)
  302. #else //DBG_IO
  303. #define rtw_read8(adapter, addr) _rtw_read8((adapter), (addr))
  304. #define rtw_read16(adapter, addr) _rtw_read16((adapter), (addr))
  305. #define rtw_read32(adapter, addr) _rtw_read32((adapter), (addr))
  306. #define rtw_read_mem(adapter, addr, cnt, mem) _rtw_read_mem((adapter), (addr), (cnt), (mem))
  307. #define rtw_read_port(adapter, addr, cnt, mem) _rtw_read_port((adapter), (addr), (cnt), (mem))
  308. #define rtw_read_port_cancel(adapter) _rtw_read_port_cancel((adapter))
  309. #define rtw_write8(adapter, addr, val) _rtw_write8((adapter), (addr), (val))
  310. #define rtw_write16(adapter, addr, val) _rtw_write16((adapter), (addr), (val))
  311. #define rtw_write32(adapter, addr, val) _rtw_write32((adapter), (addr), (val))
  312. #define rtw_writeN(adapter, addr, length, data) _rtw_writeN((adapter), (addr), (length), (data))
  313. #define rtw_write8_async(adapter, addr, val) _rtw_write8_async((adapter), (addr), (val))
  314. #define rtw_write16_async(adapter, addr, val) _rtw_write16_async((adapter), (addr), (val))
  315. #define rtw_write32_async(adapter, addr, val) _rtw_write32_async((adapter), (addr), (val))
  316. #define rtw_write_mem(adapter, addr, cnt, mem) _rtw_write_mem((adapter), (addr), (cnt), (mem))
  317. #define rtw_write_port(adapter, addr, cnt, mem) _rtw_write_port((adapter), (addr), (cnt), (mem))
  318. #define rtw_write_port_and_wait(adapter, addr, cnt, mem, timeout_ms) _rtw_write_port_and_wait((adapter), (addr), (cnt), (mem), (timeout_ms))
  319. #define rtw_write_port_cancel(adapter) _rtw_write_port_cancel((adapter))
  320. #endif //DBG_IO
  321. extern void rtw_write_scsi(_adapter *adapter, u32 cnt, u8 *pmem);
  322. //ioreq
  323. extern void ioreq_read8(_adapter *adapter, u32 addr, u8 *pval);
  324. extern void ioreq_read16(_adapter *adapter, u32 addr, u16 *pval);
  325. extern void ioreq_read32(_adapter *adapter, u32 addr, u32 *pval);
  326. extern void ioreq_write8(_adapter *adapter, u32 addr, u8 val);
  327. extern void ioreq_write16(_adapter *adapter, u32 addr, u16 val);
  328. extern void ioreq_write32(_adapter *adapter, u32 addr, u32 val);
  329. extern uint async_read8(_adapter *adapter, u32 addr, u8 *pbuff,
  330. void (*_async_io_callback)(_adapter *padater, struct io_req *pio_req, u8 *cnxt), u8 *cnxt);
  331. extern uint async_read16(_adapter *adapter, u32 addr, u8 *pbuff,
  332. void (*_async_io_callback)(_adapter *padater, struct io_req *pio_req, u8 *cnxt), u8 *cnxt);
  333. extern uint async_read32(_adapter *adapter, u32 addr, u8 *pbuff,
  334. void (*_async_io_callback)(_adapter *padater, struct io_req *pio_req, u8 *cnxt), u8 *cnxt);
  335. extern void async_read_mem(_adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
  336. extern void async_read_port(_adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
  337. extern void async_write8(_adapter *adapter, u32 addr, u8 val,
  338. void (*_async_io_callback)(_adapter *padater, struct io_req *pio_req, u8 *cnxt), u8 *cnxt);
  339. extern void async_write16(_adapter *adapter, u32 addr, u16 val,
  340. void (*_async_io_callback)(_adapter *padater, struct io_req *pio_req, u8 *cnxt), u8 *cnxt);
  341. extern void async_write32(_adapter *adapter, u32 addr, u32 val,
  342. void (*_async_io_callback)(_adapter *padater, struct io_req *pio_req, u8 *cnxt), u8 *cnxt);
  343. extern void async_write_mem(_adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
  344. extern void async_write_port(_adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
  345. int rtw_init_io_priv(_adapter *padapter, void (*set_intf_ops)(_adapter *padapter,struct _io_ops *pops));
  346. extern uint alloc_io_queue(_adapter *adapter);
  347. extern void free_io_queue(_adapter *adapter);
  348. extern void async_bus_io(struct io_queue *pio_q);
  349. extern void bus_sync_io(struct io_queue *pio_q);
  350. extern u32 _ioreq2rwmem(struct io_queue *pio_q);
  351. extern void dev_power_down(_adapter * Adapter, u8 bpwrup);
  352. /*
  353. #define RTL_R8(reg) rtw_read8(padapter, reg)
  354. #define RTL_R16(reg) rtw_read16(padapter, reg)
  355. #define RTL_R32(reg) rtw_read32(padapter, reg)
  356. #define RTL_W8(reg, val8) rtw_write8(padapter, reg, val8)
  357. #define RTL_W16(reg, val16) rtw_write16(padapter, reg, val16)
  358. #define RTL_W32(reg, val32) rtw_write32(padapter, reg, val32)
  359. */
  360. /*
  361. #define RTL_W8_ASYNC(reg, val8) rtw_write32_async(padapter, reg, val8)
  362. #define RTL_W16_ASYNC(reg, val16) rtw_write32_async(padapter, reg, val16)
  363. #define RTL_W32_ASYNC(reg, val32) rtw_write32_async(padapter, reg, val32)
  364. #define RTL_WRITE_BB(reg, val32) phy_SetUsbBBReg(padapter, reg, val32)
  365. #define RTL_READ_BB(reg) phy_QueryUsbBBReg(padapter, reg)
  366. */
  367. #define PlatformEFIOWrite1Byte(_a,_b,_c) \
  368. rtw_write8(_a,_b,_c)
  369. #define PlatformEFIOWrite2Byte(_a,_b,_c) \
  370. rtw_write16(_a,_b,_c)
  371. #define PlatformEFIOWrite4Byte(_a,_b,_c) \
  372. rtw_write32(_a,_b,_c)
  373. #define PlatformEFIORead1Byte(_a,_b) \
  374. rtw_read8(_a,_b)
  375. #define PlatformEFIORead2Byte(_a,_b) \
  376. rtw_read16(_a,_b)
  377. #define PlatformEFIORead4Byte(_a,_b) \
  378. rtw_read32(_a,_b)
  379. #endif //_RTL8711_IO_H_