s3cmci.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. /* FIXME: DMA Resource management ?! */
  11. #define S3CMCI_DMA 0
  12. enum s3cmci_waitfor {
  13. COMPLETION_NONE,
  14. COMPLETION_FINALIZE,
  15. COMPLETION_CMDSENT,
  16. COMPLETION_RSPFIN,
  17. COMPLETION_XFERFINISH,
  18. COMPLETION_XFERFINISH_RSPFIN,
  19. };
  20. struct s3cmci_host {
  21. struct platform_device *pdev;
  22. struct s3c24xx_mci_pdata *pdata;
  23. struct mmc_host *mmc;
  24. struct resource *mem;
  25. struct clk *clk;
  26. void __iomem *base;
  27. int irq;
  28. int irq_cd;
  29. int dma;
  30. unsigned long clk_rate;
  31. unsigned long clk_div;
  32. unsigned long real_rate;
  33. u8 prescaler;
  34. int is2440;
  35. unsigned sdiimsk;
  36. unsigned sdidata;
  37. int dodma;
  38. int dmatogo;
  39. bool irq_disabled;
  40. bool irq_enabled;
  41. bool irq_state;
  42. int sdio_irqen;
  43. struct mmc_request *mrq;
  44. int cmd_is_stop;
  45. spinlock_t complete_lock;
  46. enum s3cmci_waitfor complete_what;
  47. int dma_complete;
  48. u32 pio_sgptr;
  49. u32 pio_bytes;
  50. u32 pio_count;
  51. u32 *pio_ptr;
  52. #define XFER_NONE 0
  53. #define XFER_READ 1
  54. #define XFER_WRITE 2
  55. u32 pio_active;
  56. int bus_width;
  57. char dbgmsg_cmd[301];
  58. char dbgmsg_dat[301];
  59. char *status;
  60. unsigned int ccnt, dcnt;
  61. struct tasklet_struct pio_tasklet;
  62. #ifdef CONFIG_DEBUG_FS
  63. struct dentry *debug_root;
  64. struct dentry *debug_state;
  65. struct dentry *debug_regs;
  66. #endif
  67. #ifdef CONFIG_CPU_FREQ
  68. struct notifier_block freq_transition;
  69. #endif
  70. };