]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - include/imx_ssp_mmc.h
Unified codebase for TX28, TX48, TX51, TX53
[karo-tx-uboot.git] / include / imx_ssp_mmc.h
1 /*
2  * IMX SSP MMC Defines
3  *-------------------------------------------------------------------
4  *
5  * Copyright (C) 2007-2008, 2010 Freescale Semiconductor, Inc.
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  *-------------------------------------------------------------------
23  *
24  */
25
26 #ifndef __IMX_SSP_MMC_H__
27 #define __IMX_SSP_MMC_H__
28
29 /* Common definition */
30 #define BM_CLKCTRL_SSP_CLKGATE          0x80000000
31 #define BM_CLKCTRL_SSP_BUSY             0x20000000
32 #define BM_CLKCTRL_SSP_DIV_FRAC_EN      0x00000200
33 #define BM_CLKCTRL_SSP_DIV              0x000001FF
34 #define BP_CLKCTRL_SSP_DIV              0
35
36 struct imx_ssp_mmc_cfg {
37         u32     ssp_mmc_base;
38
39         /* CLKCTRL register offset */
40         u32     clkctrl_ssp_offset;
41         u32     clkctrl_clkseq_ssp_offset;
42 };
43
44 #ifdef CONFIG_IMX_SSP_MMC
45 int imx_ssp_mmc_initialize(bd_t *bis, struct imx_ssp_mmc_cfg *cfg);
46
47 extern u32 ssp_mmc_is_wp(struct mmc *mmc);
48 #endif /* CONFIG_IMX_SSP_MMC */
49
50 #endif  /* __IMX_SSP_MMC_H__ */