mmc.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /*
  2. * Copyright (C) 2004-2006 Atmel Corporation
  3. *
  4. * See file CREDITS for list of people who contributed to this
  5. * project.
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation; either version 2 of
  10. * the License, or (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  20. * MA 02111-1307 USA
  21. */
  22. #ifndef __ASM_AVR32_MMC_H
  23. #define __ASM_AVR32_MMC_H
  24. struct mmc_cid {
  25. unsigned long psn;
  26. unsigned short oid;
  27. unsigned char mid;
  28. unsigned char prv;
  29. unsigned char mdt;
  30. char pnm[7];
  31. };
  32. struct mmc_csd
  33. {
  34. u8 csd_structure:2,
  35. spec_vers:4,
  36. rsvd1:2;
  37. u8 taac;
  38. u8 nsac;
  39. u8 tran_speed;
  40. u16 ccc:12,
  41. read_bl_len:4;
  42. u64 read_bl_partial:1,
  43. write_blk_misalign:1,
  44. read_blk_misalign:1,
  45. dsr_imp:1,
  46. rsvd2:2,
  47. c_size:12,
  48. vdd_r_curr_min:3,
  49. vdd_r_curr_max:3,
  50. vdd_w_curr_min:3,
  51. vdd_w_curr_max:3,
  52. c_size_mult:3,
  53. sector_size:5,
  54. erase_grp_size:5,
  55. wp_grp_size:5,
  56. wp_grp_enable:1,
  57. default_ecc:2,
  58. r2w_factor:3,
  59. write_bl_len:4,
  60. write_bl_partial:1,
  61. rsvd3:5;
  62. u8 file_format_grp:1,
  63. copy:1,
  64. perm_write_protect:1,
  65. tmp_write_protect:1,
  66. file_format:2,
  67. ecc:2;
  68. u8 crc:7;
  69. u8 one:1;
  70. };
  71. #define R1_ILLEGAL_COMMAND (1 << 22)
  72. #define R1_APP_CMD (1 << 5)
  73. #endif /* __ASM_AVR32_MMC_H */