void sd_suspend(struct memory_card *card) { struct aml_card_info *aml_card_info = card->card_plat_info; struct card_host *host = card->host; SD_MMC_Card_Info_t *sd_mmc_info = (SD_MMC_Card_Info_t *)card->card_info; printk("***Entered %s:%s\n", __FILE__,__func__); __card_claim_host(host, card); if(card->card_type == CARD_SDIO) { card_release_host(host); return; } memset(sd_mmc_info, 0, sizeof(SD_MMC_Card_Info_t)); if (card->host->dma_buf != NULL) { sd_mmc_info->sd_mmc_buf = card->host->dma_buf; sd_mmc_info->sd_mmc_phy_buf = card->host->dma_phy_buf; } card->card_io_init(card); sd_mmc_info->io_pad_type = aml_card_info->io_pad_type; sd_mmc_info->bus_width = SD_BUS_SINGLE; sd_mmc_info->sdio_clk_unit = 3000; sd_mmc_info->clks_nac = SD_MMC_TIME_NAC_DEFAULT; sd_mmc_info->max_blk_count = card->host->max_blk_count; card_release_host(host); }
static int card_claim_card_get(struct memory_card *card) { if(card->card_status == CARD_REMOVED){ printk("%s:%d,card->card_status: removed\n",__func__,__LINE__); return -ENODEV; } printk("%s:%d,card->card_status:%d\n",__func__,__LINE__,card->card_status); return __card_claim_host(card->host, card); }
static inline int card_claim_card(struct memory_card *card) { if(card->card_status == CARD_REMOVED) return -ENODEV; return __card_claim_host(card->host, card); }