Minkyu Kang | 5000284 | 2010-07-06 20:26:06 +0900 | [diff] [blame] | 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 | |
| 21 | #ifndef __ASM_ARCH_MMC_H_ |
| 22 | #define __ASM_ARCH_MMC_H_ |
| 23 | |
| 24 | #ifndef __ASSEMBLY__ |
| 25 | struct s5p_mmc { |
| 26 | unsigned int sysad; |
| 27 | unsigned short blksize; |
| 28 | unsigned short blkcnt; |
| 29 | unsigned int argument; |
| 30 | unsigned short trnmod; |
| 31 | unsigned short cmdreg; |
| 32 | unsigned int rspreg0; |
| 33 | unsigned int rspreg1; |
| 34 | unsigned int rspreg2; |
| 35 | unsigned int rspreg3; |
| 36 | unsigned int bdata; |
| 37 | unsigned int prnsts; |
| 38 | unsigned char hostctl; |
| 39 | unsigned char pwrcon; |
| 40 | unsigned char blkgap; |
| 41 | unsigned char wakcon; |
| 42 | unsigned short clkcon; |
| 43 | unsigned char timeoutcon; |
| 44 | unsigned char swrst; |
| 45 | unsigned int norintsts; /* errintsts */ |
| 46 | unsigned int norintstsen; /* errintstsen */ |
| 47 | unsigned int norintsigen; /* errintsigen */ |
| 48 | unsigned short acmd12errsts; |
| 49 | unsigned char res1[2]; |
| 50 | unsigned int capareg; |
| 51 | unsigned char res2[4]; |
| 52 | unsigned int maxcurr; |
| 53 | unsigned char res3[0x34]; |
| 54 | unsigned int control2; |
| 55 | unsigned int control3; |
Chander Kashyap | bef5f85 | 2011-03-22 01:29:38 +0000 | [diff] [blame] | 56 | unsigned char res4[4]; |
Minkyu Kang | 5000284 | 2010-07-06 20:26:06 +0900 | [diff] [blame] | 57 | unsigned int control4; |
Chander Kashyap | bef5f85 | 2011-03-22 01:29:38 +0000 | [diff] [blame] | 58 | unsigned char res5[0x6e]; |
Minkyu Kang | 5000284 | 2010-07-06 20:26:06 +0900 | [diff] [blame] | 59 | unsigned short hcver; |
Chander Kashyap | bef5f85 | 2011-03-22 01:29:38 +0000 | [diff] [blame] | 60 | unsigned char res6[0xFFF00]; |
Minkyu Kang | 5000284 | 2010-07-06 20:26:06 +0900 | [diff] [blame] | 61 | }; |
| 62 | |
| 63 | struct mmc_host { |
| 64 | struct s5p_mmc *reg; |
| 65 | unsigned int version; /* SDHCI spec. version */ |
| 66 | unsigned int clock; /* Current clock (MHz) */ |
Jaehoon Chung | 68a8cbf | 2011-05-17 21:19:17 +0000 | [diff] [blame] | 67 | int dev_index; |
Minkyu Kang | 5000284 | 2010-07-06 20:26:06 +0900 | [diff] [blame] | 68 | }; |
| 69 | |
Jaehoon Chung | 1727e21 | 2010-09-27 15:43:52 +0900 | [diff] [blame] | 70 | int s5p_mmc_init(int dev_index, int bus_width); |
Minkyu Kang | 5000284 | 2010-07-06 20:26:06 +0900 | [diff] [blame] | 71 | |
| 72 | #endif /* __ASSEMBLY__ */ |
| 73 | #endif |