sdio_detect.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * Copyright (C) 2011-2014 MediaTek Inc.
  3. *
  4. * This program is free software: you can redistribute it and/or modify it under the terms of the
  5. * GNU General Public License version 2 as published by the Free Software Foundation.
  6. *
  7. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
  8. * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  9. * See the GNU General Public License for more details.
  10. *
  11. * You should have received a copy of the GNU General Public License along with this program.
  12. * If not, see <http://www.gnu.org/licenses/>.
  13. */
  14. #ifndef _SDIO_DETECT_H_
  15. #define _SDIO_DETECT_H_
  16. #include <linux/mmc/card.h>
  17. #include <linux/mmc/host.h>
  18. #include <linux/mmc/sdio_func.h>
  19. #include <linux/mmc/sdio_ids.h>
  20. #include <linux/module.h>
  21. #ifdef CONFIG_SDIOAUTOK_SUPPORT
  22. #define MTK_HIF_SDIO_AUTOK_ENABLED 1
  23. extern int wait_sdio_autok_ready(void *);
  24. #else
  25. #define MTK_HIF_SDIO_AUTOK_ENABLED 0
  26. #endif
  27. typedef struct _MTK_WCN_HIF_SDIO_CHIP_INFO_ {
  28. struct sdio_device_id deviceId;
  29. unsigned int chipId;
  30. } MTK_WCN_HIF_SDIO_CHIP_INFO, *P_MTK_WCN_HIF_SDIO_CHIP_INFO;
  31. extern int sdio_detect_exit(void);
  32. extern int sdio_detect_init(void);
  33. extern int sdio_detect_query_chipid(int waitFlag);
  34. extern int hif_sdio_is_chipid_valid(int chipId);
  35. extern int sdio_detect_do_autok(int chipId);
  36. #endif