mmc.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. * (C) Copyright 2009 SAMSUNG Electronics
  3. * Minkyu Kang <mk7.kang@samsung.com>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  18. *
  19. */
  20. #ifndef __ASM_ARCH_MMC_H_
  21. #define __ASM_ARCH_MMC_H_
  22. #ifndef __ASSEMBLY__
  23. struct s5p_mmc {
  24. unsigned int sysad;
  25. unsigned short blksize;
  26. unsigned short blkcnt;
  27. unsigned int argument;
  28. unsigned short trnmod;
  29. unsigned short cmdreg;
  30. unsigned int rspreg0;
  31. unsigned int rspreg1;
  32. unsigned int rspreg2;
  33. unsigned int rspreg3;
  34. unsigned int bdata;
  35. unsigned int prnsts;
  36. unsigned char hostctl;
  37. unsigned char pwrcon;
  38. unsigned char blkgap;
  39. unsigned char wakcon;
  40. unsigned short clkcon;
  41. unsigned char timeoutcon;
  42. unsigned char swrst;
  43. unsigned int norintsts; /* errintsts */
  44. unsigned int norintstsen; /* errintstsen */
  45. unsigned int norintsigen; /* errintsigen */
  46. unsigned short acmd12errsts;
  47. unsigned char res1[2];
  48. unsigned int capareg;
  49. unsigned char res2[4];
  50. unsigned int maxcurr;
  51. unsigned char res3[0x34];
  52. unsigned int control2;
  53. unsigned int control3;
  54. unsigned char res4[4];
  55. unsigned int control4;
  56. unsigned char res5[0x6e];
  57. unsigned short hcver;
  58. unsigned char res6[0xFF00];
  59. };
  60. struct mmc_host {
  61. struct s5p_mmc *reg;
  62. unsigned int version; /* SDHCI spec. version */
  63. unsigned int clock; /* Current clock (MHz) */
  64. int dev_index;
  65. };
  66. int s5p_mmc_init(int dev_index, int bus_width);
  67. #endif /* __ASSEMBLY__ */
  68. #endif