s3cmci.h 1.5 KB

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