Haavard Skinnemoen | 7c2842a | 2006-01-20 10:03:53 +0100 | [diff] [blame] | 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 | |
| 25 | struct mmc_cid { |
| 26 | unsigned long psn; |
| 27 | unsigned short oid; |
| 28 | unsigned char mid; |
| 29 | unsigned char prv; |
| 30 | unsigned char mdt; |
| 31 | char pnm[7]; |
| 32 | }; |
| 33 | |
| 34 | struct mmc_csd |
| 35 | { |
| 36 | u8 csd_structure:2, |
| 37 | spec_vers:4, |
| 38 | rsvd1:2; |
| 39 | u8 taac; |
| 40 | u8 nsac; |
| 41 | u8 tran_speed; |
| 42 | u16 ccc:12, |
| 43 | read_bl_len:4; |
| 44 | u64 read_bl_partial:1, |
| 45 | write_blk_misalign:1, |
| 46 | read_blk_misalign:1, |
| 47 | dsr_imp:1, |
| 48 | rsvd2:2, |
| 49 | c_size:12, |
| 50 | vdd_r_curr_min:3, |
| 51 | vdd_r_curr_max:3, |
| 52 | vdd_w_curr_min:3, |
| 53 | vdd_w_curr_max:3, |
| 54 | c_size_mult:3, |
| 55 | sector_size:5, |
| 56 | erase_grp_size:5, |
| 57 | wp_grp_size:5, |
| 58 | wp_grp_enable:1, |
| 59 | default_ecc:2, |
| 60 | r2w_factor:3, |
| 61 | write_bl_len:4, |
| 62 | write_bl_partial:1, |
| 63 | rsvd3:5; |
| 64 | u8 file_format_grp:1, |
| 65 | copy:1, |
| 66 | perm_write_protect:1, |
| 67 | tmp_write_protect:1, |
| 68 | file_format:2, |
| 69 | ecc:2; |
| 70 | u8 crc:7; |
| 71 | u8 one:1; |
| 72 | }; |
| 73 | |
Haavard Skinnemoen | 7c2842a | 2006-01-20 10:03:53 +0100 | [diff] [blame] | 74 | #define R1_ILLEGAL_COMMAND (1 << 22) |
| 75 | #define R1_APP_CMD (1 << 5) |
| 76 | |
| 77 | #endif /* __ASM_AVR32_MMC_H */ |