s3cmci.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * linux/drivers/mmc/s3cmci.h - Samsung S3C MCI driver
  4. *
  5. * Copyright (C) 2004-2006 Thomas Kleffel, All Rights Reserved.
  6. */
  7. enum s3cmci_waitfor {
  8. COMPLETION_NONE,
  9. COMPLETION_FINALIZE,
  10. COMPLETION_CMDSENT,
  11. COMPLETION_RSPFIN,
  12. COMPLETION_XFERFINISH,
  13. COMPLETION_XFERFINISH_RSPFIN,
  14. };
  15. struct s3cmci_host {
  16. struct platform_device *pdev;
  17. struct s3c24xx_mci_pdata *pdata;
  18. struct mmc_host *mmc;
  19. struct resource *mem;
  20. struct clk *clk;
  21. void __iomem *base;
  22. int irq;
  23. int irq_cd;
  24. struct dma_chan *dma;
  25. unsigned long clk_rate;
  26. unsigned long clk_div;
  27. unsigned long real_rate;
  28. u8 prescaler;
  29. int is2440;
  30. unsigned sdiimsk;
  31. unsigned sdidata;
  32. bool irq_disabled;
  33. bool irq_enabled;
  34. bool irq_state;
  35. int sdio_irqen;
  36. struct mmc_request *mrq;
  37. int cmd_is_stop;
  38. spinlock_t complete_lock;
  39. enum s3cmci_waitfor complete_what;
  40. int dma_complete;
  41. u32 pio_sgptr;
  42. u32 pio_bytes;
  43. u32 pio_count;
  44. u32 *pio_ptr;
  45. #define XFER_NONE 0
  46. #define XFER_READ 1
  47. #define XFER_WRITE 2
  48. u32 pio_active;
  49. int bus_width;
  50. char dbgmsg_cmd[301];
  51. char dbgmsg_dat[301];
  52. char *status;
  53. unsigned int ccnt, dcnt;
  54. struct tasklet_struct pio_tasklet;
  55. #ifdef CONFIG_DEBUG_FS
  56. struct dentry *debug_root;
  57. #endif
  58. #ifdef CONFIG_ARM_S3C24XX_CPUFREQ
  59. struct notifier_block freq_transition;
  60. #endif
  61. };