sdio_ops_linux.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2007 - 2017 Realtek Corporation.
  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. *****************************************************************************/
  15. #ifndef __SDIO_OPS_LINUX_H__
  16. #define __SDIO_OPS_LINUX_H__
  17. #ifndef RTW_HALMAC
  18. u8 sd_f0_read8(struct intf_hdl *pintfhdl, u32 addr, s32 *err);
  19. void sd_f0_write8(struct intf_hdl *pintfhdl, u32 addr, u8 v, s32 *err);
  20. s32 _sd_cmd52_read(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pdata);
  21. s32 _sd_cmd52_write(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pdata);
  22. s32 sd_cmd52_read(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pdata);
  23. s32 sd_cmd52_write(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pdata);
  24. u8 _sd_read8(struct intf_hdl *pintfhdl, u32 addr, s32 *err);
  25. u8 sd_read8(struct intf_hdl *pintfhdl, u32 addr, s32 *err);
  26. u16 sd_read16(struct intf_hdl *pintfhdl, u32 addr, s32 *err);
  27. u32 _sd_read32(struct intf_hdl *pintfhdl, u32 addr, s32 *err);
  28. u32 sd_read32(struct intf_hdl *pintfhdl, u32 addr, s32 *err);
  29. void sd_write8(struct intf_hdl *pintfhdl, u32 addr, u8 v, s32 *err);
  30. void sd_write16(struct intf_hdl *pintfhdl, u32 addr, u16 v, s32 *err);
  31. void _sd_write32(struct intf_hdl *pintfhdl, u32 addr, u32 v, s32 *err);
  32. void sd_write32(struct intf_hdl *pintfhdl, u32 addr, u32 v, s32 *err);
  33. #endif /* RTW_HALMAC */
  34. bool rtw_is_sdio30(_adapter *adapter);
  35. /* The unit of return value is Hz */
  36. static inline u32 rtw_sdio_get_clock(struct dvobj_priv *d)
  37. {
  38. return d->intf_data.clock;
  39. }
  40. s32 _sd_read(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, void *pdata);
  41. s32 sd_read(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, void *pdata);
  42. s32 _sd_write(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, void *pdata);
  43. s32 sd_write(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, void *pdata);
  44. void rtw_sdio_set_irq_thd(struct dvobj_priv *dvobj, _thread_hdl_ thd_hdl);
  45. int __must_check rtw_sdio_raw_read(struct dvobj_priv *d, unsigned int addr,
  46. void *buf, size_t len, bool fixed);
  47. int __must_check rtw_sdio_raw_write(struct dvobj_priv *d, unsigned int addr,
  48. void *buf, size_t len, bool fixed);
  49. #endif /* __SDIO_OPS_LINUX_H__ */