Tizen 2.0 Release
[platform/kernel/u-boot.git] / arch / arm / include / asm / arch-s5p64xx / mmc.h
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 #define S5PC100_MMC_BASE        0xED800000
25 #define S5PC110_MMC_BASE        0xEB000000
26
27 #ifndef __ASSEMBLY__
28 struct s5p_mmc {
29         unsigned long   sysad;
30         unsigned short  blksize;
31         unsigned short  blkcnt;
32         unsigned long   argument;
33         unsigned short  trnmod;
34         unsigned short  cmdreg;
35         unsigned long   rspreg0;
36         unsigned long   rspreg1;
37         unsigned long   rspreg2;
38         unsigned long   rspreg3;
39         unsigned long   bdata;
40         unsigned long   prnsts;
41         unsigned char   hostctl;
42         unsigned char   pwrcon;
43         unsigned char   blkgap;
44         unsigned char   wakcon;
45         unsigned short  clkcon;
46         unsigned char   timeoutcon;
47         unsigned char   swrst;
48         unsigned short  norintsts;
49         unsigned short  errintsts;
50         unsigned short  norintstsen;
51         unsigned short  errintstsen;
52         unsigned short  norintsigen;
53         unsigned short  errintsigen;
54         unsigned short  acmd12errsts;
55         unsigned char   res1[2];
56         unsigned long   capareg;
57         unsigned char   res2[4];
58         unsigned long   maxcurr;
59         unsigned char   res3[0x34];
60         unsigned long   control2;
61         unsigned long   control3;
62         unsigned long   control4;
63         unsigned char   res4[0x6e];
64         unsigned short  hcver;
65         unsigned char   res5[0xFFF00];
66 };
67
68 struct mmc_host {
69         struct s5p_mmc *reg;
70         unsigned int version;   /* SDHCI spec. version */
71         unsigned int clock;     /* Current clock (MHz) */
72 };
73
74 int s5p_mmc_init(int dev_index, int bus_width);
75
76 #endif  /* __ASSEMBLY__ */
77 #endif