core.h 637 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * linux/drivers/mmc/core/core.h
  3. *
  4. * Copyright (C) 2003 Russell King, All Rights Reserved.
  5. * Copyright 2007 Pierre Ossman
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. */
  11. #ifndef _MMC_CORE_CORE_H
  12. #define _MMC_CORE_CORE_H
  13. #include <linux/delay.h>
  14. #define MMC_CMD_RETRIES 3
  15. void mmc_set_chip_select(struct mmc_host *host, int mode);
  16. static inline void mmc_delay(unsigned int ms)
  17. {
  18. if (ms < 1000 / HZ) {
  19. cond_resched();
  20. mdelay(ms);
  21. } else {
  22. msleep(ms);
  23. }
  24. }
  25. #endif