• Home
  • Raw
  • Download

Lines Matching full:mmc

3  *  WM8505/WM8650 SD/MMC Host Controller
26 #include <linux/mmc/host.h>
27 #include <linux/mmc/mmc.h>
28 #include <linux/mmc/sd.h>
36 /* MMC/SD controller registers */
122 /* MMC/SD DMA Controller Registers */
186 struct mmc_host *mmc; member
223 static void wmt_mci_read_response(struct mmc_host *mmc) in wmt_mci_read_response() argument
230 priv = mmc_priv(mmc); in wmt_mci_read_response()
254 static int wmt_mci_send_command(struct mmc_host *mmc, u8 command, u8 cmdtype, in wmt_mci_send_command() argument
260 priv = mmc_priv(mmc); in wmt_mci_send_command()
303 dma_unmap_sg(mmc_dev(priv->mmc), req->data->sg, in wmt_complete_data_request()
306 dma_unmap_sg(mmc_dev(priv->mmc), req->data->sg, in wmt_complete_data_request()
311 mmc_request_done(priv->mmc, req); in wmt_complete_data_request()
313 wmt_mci_read_response(priv->mmc); in wmt_complete_data_request()
316 mmc_request_done(priv->mmc, req); in wmt_complete_data_request()
326 wmt_mci_send_command(priv->mmc, req->data->stop->opcode, in wmt_complete_data_request()
388 mmc_detect_change(priv->mmc, 0); in wmt_mci_regular_isr()
417 wmt_mci_read_response(priv->mmc); in wmt_mci_regular_isr()
421 mmc_request_done(priv->mmc, priv->req); in wmt_mci_regular_isr()
462 static void wmt_reset_hardware(struct mmc_host *mmc) in wmt_reset_hardware() argument
467 priv = mmc_priv(mmc); in wmt_reset_hardware()
501 static int wmt_dma_init(struct mmc_host *mmc) in wmt_dma_init() argument
505 priv = mmc_priv(mmc); in wmt_dma_init()
525 static void wmt_dma_config(struct mmc_host *mmc, u32 descaddr, u8 dir) in wmt_dma_config() argument
530 priv = mmc_priv(mmc); in wmt_dma_config()
559 static void wmt_mci_request(struct mmc_host *mmc, struct mmc_request *req) in wmt_mci_request() argument
576 priv = mmc_priv(mmc); in wmt_mci_request()
599 wmt_mci_send_command(mmc, command, cmdtype, arg, rsptype); in wmt_mci_request()
607 wmt_dma_init(mmc); in wmt_mci_request()
620 sg_cnt = dma_map_sg(mmc_dev(mmc), req->data->sg, in wmt_mci_request()
626 sg_cnt = dma_map_sg(mmc_dev(mmc), req->data->sg, in wmt_mci_request()
654 wmt_dma_config(mmc, priv->dma_desc_device_addr, in wmt_mci_request()
657 wmt_dma_config(mmc, priv->dma_desc_device_addr, in wmt_mci_request()
660 wmt_mci_send_command(mmc, command, cmdtype, arg, rsptype); in wmt_mci_request()
670 static void wmt_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) in wmt_mci_set_ios() argument
675 priv = mmc_priv(mmc); in wmt_mci_set_ios()
678 wmt_reset_hardware(mmc); in wmt_mci_set_ios()
710 static int wmt_mci_get_ro(struct mmc_host *mmc) in wmt_mci_get_ro() argument
712 struct wmt_mci_priv *priv = mmc_priv(mmc); in wmt_mci_get_ro()
717 static int wmt_mci_get_cd(struct mmc_host *mmc) in wmt_mci_get_cd() argument
719 struct wmt_mci_priv *priv = mmc_priv(mmc); in wmt_mci_get_cd()
751 struct mmc_host *mmc; in wmt_mci_probe() local
781 mmc = mmc_alloc_host(sizeof(struct wmt_mci_priv), &pdev->dev); in wmt_mci_probe()
782 if (!mmc) { in wmt_mci_probe()
788 mmc->ops = &wmt_mci_ops; in wmt_mci_probe()
789 mmc->f_min = wmt_caps->f_min; in wmt_mci_probe()
790 mmc->f_max = wmt_caps->f_max; in wmt_mci_probe()
791 mmc->ocr_avail = wmt_caps->ocr_avail; in wmt_mci_probe()
792 mmc->caps = wmt_caps->caps; in wmt_mci_probe()
794 mmc->max_seg_size = wmt_caps->max_seg_size; in wmt_mci_probe()
795 mmc->max_segs = wmt_caps->max_segs; in wmt_mci_probe()
796 mmc->max_blk_size = wmt_caps->max_blk_size; in wmt_mci_probe()
798 mmc->max_req_size = (16*512*mmc->max_segs); in wmt_mci_probe()
799 mmc->max_blk_count = mmc->max_req_size / 512; in wmt_mci_probe()
801 priv = mmc_priv(mmc); in wmt_mci_probe()
802 priv->mmc = mmc; in wmt_mci_probe()
837 mmc->max_blk_count * 16, in wmt_mci_probe()
846 platform_set_drvdata(pdev, mmc); in wmt_mci_probe()
860 wmt_reset_hardware(mmc); in wmt_mci_probe()
862 mmc_add_host(mmc); in wmt_mci_probe()
876 mmc_free_host(mmc); in wmt_mci_probe()
883 struct mmc_host *mmc; in wmt_mci_remove() local
888 mmc = platform_get_drvdata(pdev); in wmt_mci_remove()
889 priv = mmc_priv(mmc); in wmt_mci_remove()
900 dma_free_coherent(&pdev->dev, priv->mmc->max_blk_count * 16, in wmt_mci_remove()
903 mmc_remove_host(mmc); in wmt_mci_remove()
916 mmc_free_host(mmc); in wmt_mci_remove()
927 struct mmc_host *mmc = dev_get_drvdata(dev); in wmt_mci_suspend() local
930 if (!mmc) in wmt_mci_suspend()
933 priv = mmc_priv(mmc); in wmt_mci_suspend()
951 struct mmc_host *mmc = dev_get_drvdata(dev); in wmt_mci_resume() local
954 if (mmc) { in wmt_mci_resume()
955 priv = mmc_priv(mmc); in wmt_mci_resume()
1001 MODULE_DESCRIPTION("Wondermedia MMC/SD Driver");