• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2 * Sunxi SD/MMC host driver
3 *
4 * Copyright (C) 2015 AllWinnertech Ltd.
5 * Author: lixiang <lixiang@allwinnertech>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * This program is distributed "as is" WITHOUT ANY WARRANTY of any
12 * kind, whether express or implied; without even the implied warranty
13 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 * GNU General Public License for more details.
15 */
16 
17 #ifdef CONFIG_ARCH_SUN50IW1P1
18 
19 #ifndef __SUNXI_MMC_SUN50IW1P1_2_H__
20 #define __SUNXI_MMC_SUN50IW1P1_2_H__
21 
22 #define SUNXI_SDMMC2
23 
24 #define SUNXI_DMA_TL_SDMMC2		((0x3<<28)|(15<<16)|240)
25 /*one dma des can transfer data size = 1<<SUNXI_DES_SIZE_SDMMC2*/
26 #define SUNXI_DES_SIZE_SDMMC2	(12)
27 
28 extern int sunxi_mmc_clk_set_rate_for_sdmmc2(struct sunxi_mmc_host *host,
29 					     struct mmc_ios *ios);
30 extern void sunxi_mmc_thld_ctl_for_sdmmc2(struct sunxi_mmc_host *host,
31 					  struct mmc_ios *ios,
32 					  struct mmc_data *data);
33 
34 void sunxi_mmc_save_spec_reg2(struct sunxi_mmc_host *host);
35 void sunxi_mmc_restore_spec_reg2(struct sunxi_mmc_host *host);
36 void sunxi_mmc_dump_dly2(struct sunxi_mmc_host *host);
37 void sunxi_mmc_do_shutdown2(struct platform_device *pdev);
38 int sunxi_mmc_oclk_onoff_sdmmc2(struct sunxi_mmc_host *host, u32 oclk_en);
39 
40 extern int mmc_card_sleep(struct mmc_host *host);
41 extern int mmc_deselect_cards(struct mmc_host *host);
42 extern void mmc_power_off(struct mmc_host *host);
43 extern int mmc_card_sleepawake(struct mmc_host *host, int sleep);
44 
45 #endif
46 
47 #endif
48