s3cmci.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. int 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. int dodma;
  36. int dmatogo;
  37. bool irq_disabled;
  38. bool irq_enabled;
  39. bool irq_state;
  40. int sdio_irqen;
  41. struct mmc_request *mrq;
  42. int cmd_is_stop;
  43. spinlock_t complete_lock;
  44. enum s3cmci_waitfor complete_what;
  45. int dma_complete;
  46. u32 pio_sgptr;
  47. u32 pio_bytes;
  48. u32 pio_count;
  49. u32 *pio_ptr;
  50. #define XFER_NONE 0
  51. #define XFER_READ 1
  52. #define XFER_WRITE 2
  53. u32 pio_active;
  54. int bus_width;
  55. char dbgmsg_cmd[301];
  56. char dbgmsg_dat[301];
  57. char *status;
  58. unsigned int ccnt, dcnt;
  59. struct tasklet_struct pio_tasklet;
  60. #ifdef CONFIG_DEBUG_FS
  61. struct dentry *debug_root;
  62. struct dentry *debug_state;
  63. struct dentry *debug_regs;
  64. #endif
  65. #ifdef CONFIG_CPU_FREQ
  66. struct notifier_block freq_transition;
  67. #endif
  68. };