Lines Matching +full:sg +full:- +full:micro
1 // SPDX-License-Identifier: GPL-2.0-only
3 * linux/drivers/mmc/host/au1xmmc.c - AU1XX0 MMC driver
5 * Copyright (c) 2005, Advanced Micro Devices, Inc.
9 * Copyright (c) 2003-2004 Embedded Edge, LLC.
11 * Copyright 2002 Hewlett-Packard Company
14 * (drivers/mmc/wbsd.c) Copyright (C) 2004-2005 Pierre Ossman,
25 * If the Au1100-based design is intended to support both MultiMediaCards
26 * and 1- or 4-data bit SecureDigital cards, then the solution is to
27 * connect a weak (560KOhm) pull-up resistor to connector pin 1.
28 * In doing so, a MMC card never enters SPI-mode communications,
29 * but now the SecureDigital card-detect feature of CD/DAT3 is ineffective
39 #include <linux/dma-mapping.h>
47 #include <asm/mach-au1x00/au1000.h>
48 #include <asm/mach-au1x00/au1xxx_dbdma.h>
49 #include <asm/mach-au1x00/au1100_mmc.h>
51 #define DRIVER_NAME "au1xxx-mmc"
138 #define HOST_STATUS(h) ((h)->iobase + SD_STATUS)
139 #define HOST_CONFIG(h) ((h)->iobase + SD_CONFIG)
140 #define HOST_ENABLE(h) ((h)->iobase + SD_ENABLE)
141 #define HOST_TXPORT(h) ((h)->iobase + SD_TXPORT)
142 #define HOST_RXPORT(h) ((h)->iobase + SD_RXPORT)
143 #define HOST_CMDARG(h) ((h)->iobase + SD_CMDARG)
144 #define HOST_BLKSIZE(h) ((h)->iobase + SD_BLKSIZE)
145 #define HOST_CMD(h) ((h)->iobase + SD_CMD)
146 #define HOST_CONFIG2(h) ((h)->iobase + SD_CONFIG2)
147 #define HOST_TIMEOUT(h) ((h)->iobase + SD_TIMEOUT)
148 #define HOST_DEBUG(h) ((h)->iobase + SD_DEBUG)
151 (((h)->flags & HOST_F_XMIT) ? (h)->tx_chan : (h)->rx_chan)
180 /* SEND_STOP will turn off clock control - this re-enables it */ in FLUSH_FIFO()
199 WARN_ON(host->status != HOST_S_DATA); in SEND_STOP()
200 host->status = HOST_S_STOP; in SEND_STOP()
213 if (host->platdata && host->platdata->set_power) in au1xmmc_set_power()
214 host->platdata->set_power(host->mmc, state); in au1xmmc_set_power()
221 if (host->platdata && host->platdata->card_inserted) in au1xmmc_card_inserted()
222 return !!host->platdata->card_inserted(host->mmc); in au1xmmc_card_inserted()
224 return -ENOSYS; in au1xmmc_card_inserted()
231 if (host->platdata && host->platdata->card_readonly) in au1xmmc_card_readonly()
232 return !!host->platdata->card_readonly(mmc); in au1xmmc_card_readonly()
234 return -ENOSYS; in au1xmmc_card_readonly()
239 struct mmc_request *mrq = host->mrq; in au1xmmc_finish_request()
241 host->mrq = NULL; in au1xmmc_finish_request()
242 host->flags &= HOST_F_ACTIVE | HOST_F_DMA; in au1xmmc_finish_request()
244 host->dma.len = 0; in au1xmmc_finish_request()
245 host->dma.dir = 0; in au1xmmc_finish_request()
247 host->pio.index = 0; in au1xmmc_finish_request()
248 host->pio.offset = 0; in au1xmmc_finish_request()
249 host->pio.len = 0; in au1xmmc_finish_request()
251 host->status = HOST_S_IDLE; in au1xmmc_finish_request()
253 mmc_request_done(host->mmc, mrq); in au1xmmc_finish_request()
265 u32 mmccmd = (cmd->opcode << SD_CMD_CI_SHIFT); in au1xmmc_send_command()
285 return -EINVAL; in au1xmmc_send_command()
289 if (data->flags & MMC_DATA_READ) { in au1xmmc_send_command()
290 if (data->blocks > 1) in au1xmmc_send_command()
294 } else if (data->flags & MMC_DATA_WRITE) { in au1xmmc_send_command()
295 if (data->blocks > 1) in au1xmmc_send_command()
302 __raw_writel(cmd->arg, HOST_CMDARG(host)); in au1xmmc_send_command()
317 struct mmc_request *mrq = host->mrq; in au1xmmc_data_complete()
321 WARN_ON((host->status != HOST_S_DATA) && (host->status != HOST_S_STOP)); in au1xmmc_data_complete()
323 if (host->mrq == NULL) in au1xmmc_data_complete()
326 data = mrq->cmd->data; in au1xmmc_data_complete()
332 while ((host->flags & HOST_F_XMIT) && (status & SD_STATUS_DB)) in au1xmmc_data_complete()
335 data->error = 0; in au1xmmc_data_complete()
336 dma_unmap_sg(mmc_dev(host->mmc), data->sg, data->sg_len, host->dma.dir); in au1xmmc_data_complete()
340 if (host->flags & HOST_F_XMIT) in au1xmmc_data_complete()
344 data->error = -EILSEQ; in au1xmmc_data_complete()
349 data->bytes_xfered = 0; in au1xmmc_data_complete()
351 if (!data->error) { in au1xmmc_data_complete()
352 if (host->flags & (HOST_F_DMA | HOST_F_DBDMA)) { in au1xmmc_data_complete()
356 au1x_dma_chan_t *cp = c->chan_ptr; in au1xmmc_data_complete()
357 data->bytes_xfered = cp->ddma_bytecnt; in au1xmmc_data_complete()
359 data->bytes_xfered = in au1xmmc_data_complete()
360 (data->blocks * data->blksz) - host->pio.len; in au1xmmc_data_complete()
382 struct scatterlist *sg; in au1xmmc_send_pio() local
384 data = host->mrq->data; in au1xmmc_send_pio()
386 if (!(host->flags & HOST_F_XMIT)) in au1xmmc_send_pio()
390 sg = &data->sg[host->pio.index]; in au1xmmc_send_pio()
391 sg_ptr = kmap_atomic(sg_page(sg)) + sg->offset + host->pio.offset; in au1xmmc_send_pio()
394 sg_len = data->sg[host->pio.index].length - host->pio.offset; in au1xmmc_send_pio()
397 max = (sg_len > host->pio.len) ? host->pio.len : sg_len; in au1xmmc_send_pio()
414 host->pio.len -= count; in au1xmmc_send_pio()
415 host->pio.offset += count; in au1xmmc_send_pio()
418 host->pio.index++; in au1xmmc_send_pio()
419 host->pio.offset = 0; in au1xmmc_send_pio()
422 if (host->pio.len == 0) { in au1xmmc_send_pio()
425 if (host->flags & HOST_F_STOP) in au1xmmc_send_pio()
428 tasklet_schedule(&host->data_task); in au1xmmc_send_pio()
438 struct scatterlist *sg; in au1xmmc_receive_pio() local
440 data = host->mrq->data; in au1xmmc_receive_pio()
442 if (!(host->flags & HOST_F_RECV)) in au1xmmc_receive_pio()
445 max = host->pio.len; in au1xmmc_receive_pio()
447 if (host->pio.index < host->dma.len) { in au1xmmc_receive_pio()
448 sg = &data->sg[host->pio.index]; in au1xmmc_receive_pio()
449 sg_ptr = kmap_atomic(sg_page(sg)) + sg->offset + host->pio.offset; in au1xmmc_receive_pio()
452 sg_len = sg_dma_len(&data->sg[host->pio.index]) - host->pio.offset; in au1xmmc_receive_pio()
469 DBG("RX CRC Error [%d + %d].\n", host->pdev->id, in au1xmmc_receive_pio()
470 host->pio.len, count); in au1xmmc_receive_pio()
475 DBG("RX Overrun [%d + %d]\n", host->pdev->id, in au1xmmc_receive_pio()
476 host->pio.len, count); in au1xmmc_receive_pio()
480 DBG("RX Underrun [%d + %d]\n", host->pdev->id, in au1xmmc_receive_pio()
481 host->pio.len, count); in au1xmmc_receive_pio()
493 host->pio.len -= count; in au1xmmc_receive_pio()
494 host->pio.offset += count; in au1xmmc_receive_pio()
497 host->pio.index++; in au1xmmc_receive_pio()
498 host->pio.offset = 0; in au1xmmc_receive_pio()
501 if (host->pio.len == 0) { in au1xmmc_receive_pio()
505 if (host->flags & HOST_F_STOP) in au1xmmc_receive_pio()
508 tasklet_schedule(&host->data_task); in au1xmmc_receive_pio()
512 /* This is called when a command has been completed - grab the response
517 struct mmc_request *mrq = host->mrq; in au1xmmc_cmd_complete()
522 if (!host->mrq) in au1xmmc_cmd_complete()
525 cmd = mrq->cmd; in au1xmmc_cmd_complete()
526 cmd->error = 0; in au1xmmc_cmd_complete()
528 if (cmd->flags & MMC_RSP_PRESENT) { in au1xmmc_cmd_complete()
529 if (cmd->flags & MMC_RSP_136) { in au1xmmc_cmd_complete()
530 r[0] = __raw_readl(host->iobase + SD_RESP3); in au1xmmc_cmd_complete()
531 r[1] = __raw_readl(host->iobase + SD_RESP2); in au1xmmc_cmd_complete()
532 r[2] = __raw_readl(host->iobase + SD_RESP1); in au1xmmc_cmd_complete()
533 r[3] = __raw_readl(host->iobase + SD_RESP0); in au1xmmc_cmd_complete()
540 cmd->resp[i] = (r[i] & 0x00FFFFFF) << 8; in au1xmmc_cmd_complete()
542 cmd->resp[i] |= (r[i + 1] & 0xFF000000) >> 24; in au1xmmc_cmd_complete()
552 cmd->resp[0] = __raw_readl(host->iobase + SD_RESP0); in au1xmmc_cmd_complete()
558 cmd->error = -EILSEQ; in au1xmmc_cmd_complete()
560 trans = host->flags & (HOST_F_XMIT | HOST_F_RECV); in au1xmmc_cmd_complete()
562 if (!trans || cmd->error) { in au1xmmc_cmd_complete()
564 tasklet_schedule(&host->finish_task); in au1xmmc_cmd_complete()
568 host->status = HOST_S_DATA; in au1xmmc_cmd_complete()
570 if ((host->flags & (HOST_F_DMA | HOST_F_DBDMA))) { in au1xmmc_cmd_complete()
575 if (host->flags & HOST_F_RECV) { in au1xmmc_cmd_complete()
588 unsigned int pbus = clk_get_rate(host->clk); in au1xmmc_set_clock()
589 unsigned int divisor = ((pbus / rate) / 2) - 1; in au1xmmc_set_clock()
604 int datalen = data->blocks * data->blksz; in au1xmmc_prepare_data()
606 if (data->flags & MMC_DATA_READ) in au1xmmc_prepare_data()
607 host->flags |= HOST_F_RECV; in au1xmmc_prepare_data()
609 host->flags |= HOST_F_XMIT; in au1xmmc_prepare_data()
611 if (host->mrq->stop) in au1xmmc_prepare_data()
612 host->flags |= HOST_F_STOP; in au1xmmc_prepare_data()
614 host->dma.dir = DMA_BIDIRECTIONAL; in au1xmmc_prepare_data()
616 host->dma.len = dma_map_sg(mmc_dev(host->mmc), data->sg, in au1xmmc_prepare_data()
617 data->sg_len, host->dma.dir); in au1xmmc_prepare_data()
619 if (host->dma.len == 0) in au1xmmc_prepare_data()
620 return -ETIMEDOUT; in au1xmmc_prepare_data()
622 __raw_writel(data->blksz - 1, HOST_BLKSIZE(host)); in au1xmmc_prepare_data()
624 if (host->flags & (HOST_F_DMA | HOST_F_DBDMA)) { in au1xmmc_prepare_data()
630 for (i = 0; i < host->dma.len; i++) { in au1xmmc_prepare_data()
632 struct scatterlist *sg = &data->sg[i]; in au1xmmc_prepare_data() local
633 int sg_len = sg->length; in au1xmmc_prepare_data()
637 if (i == host->dma.len - 1) in au1xmmc_prepare_data()
640 if (host->flags & HOST_F_XMIT) { in au1xmmc_prepare_data()
642 sg_phys(sg), len, flags); in au1xmmc_prepare_data()
645 sg_phys(sg), len, flags); in au1xmmc_prepare_data()
651 datalen -= len; in au1xmmc_prepare_data()
654 host->pio.index = 0; in au1xmmc_prepare_data()
655 host->pio.offset = 0; in au1xmmc_prepare_data()
656 host->pio.len = datalen; in au1xmmc_prepare_data()
658 if (host->flags & HOST_F_XMIT) in au1xmmc_prepare_data()
668 dma_unmap_sg(mmc_dev(host->mmc), data->sg, data->sg_len, in au1xmmc_prepare_data()
669 host->dma.dir); in au1xmmc_prepare_data()
670 return -ETIMEDOUT; in au1xmmc_prepare_data()
680 WARN_ON(host->status != HOST_S_IDLE); in au1xmmc_request()
682 host->mrq = mrq; in au1xmmc_request()
683 host->status = HOST_S_CMD; in au1xmmc_request()
687 mrq->cmd->error = -ENOMEDIUM; in au1xmmc_request()
692 if (mrq->data) { in au1xmmc_request()
694 ret = au1xmmc_prepare_data(host, mrq->data); in au1xmmc_request()
698 ret = au1xmmc_send_command(host, mrq->cmd, mrq->data); in au1xmmc_request()
701 mrq->cmd->error = ret; in au1xmmc_request()
745 if (ios->power_mode == MMC_POWER_OFF) in au1xmmc_set_ios()
747 else if (ios->power_mode == MMC_POWER_ON) { in au1xmmc_set_ios()
751 if (ios->clock && ios->clock != host->clock) { in au1xmmc_set_ios()
752 au1xmmc_set_clock(host, ios->clock); in au1xmmc_set_ios()
753 host->clock = ios->clock; in au1xmmc_set_ios()
757 switch (ios->bus_width) { in au1xmmc_set_ios()
788 mmc_signal_sdio_irq(host->mmc); in au1xmmc_irq()
790 if (host->mrq && (status & STATUS_TIMEOUT)) { in au1xmmc_irq()
792 host->mrq->cmd->error = -ETIMEDOUT; in au1xmmc_irq()
794 host->mrq->data->error = -ETIMEDOUT; in au1xmmc_irq()
800 tasklet_schedule(&host->finish_task); in au1xmmc_irq()
805 if (!(host->flags & HOST_F_DMA) && (status & SD_STATUS_NE)) in au1xmmc_irq()
809 /* tasklet_schedule(&host->data_task); */ in au1xmmc_irq()
814 if (host->status == HOST_S_CMD) in au1xmmc_irq()
817 } else if (!(host->flags & HOST_F_DMA)) { in au1xmmc_irq()
818 if ((host->flags & HOST_F_XMIT) && (status & STATUS_DATA_OUT)) in au1xmmc_irq()
820 else if ((host->flags & HOST_F_RECV) && (status & STATUS_DATA_IN)) in au1xmmc_irq()
824 DBG("Unhandled status %8.8x\n", host->pdev->id, in au1xmmc_irq()
851 if (!host->mrq) in au1xmmc_dbdma_callback()
854 if (host->flags & HOST_F_STOP) in au1xmmc_dbdma_callback()
857 tasklet_schedule(&host->data_task); in au1xmmc_dbdma_callback()
865 res = platform_get_resource(host->pdev, IORESOURCE_DMA, 0); in au1xmmc_dbdma_init()
867 return -ENODEV; in au1xmmc_dbdma_init()
868 txid = res->start; in au1xmmc_dbdma_init()
870 res = platform_get_resource(host->pdev, IORESOURCE_DMA, 1); in au1xmmc_dbdma_init()
872 return -ENODEV; in au1xmmc_dbdma_init()
873 rxid = res->start; in au1xmmc_dbdma_init()
876 return -ENODEV; in au1xmmc_dbdma_init()
878 host->tx_chan = au1xxx_dbdma_chan_alloc(memid, txid, in au1xmmc_dbdma_init()
880 if (!host->tx_chan) { in au1xmmc_dbdma_init()
881 dev_err(&host->pdev->dev, "cannot allocate TX DMA\n"); in au1xmmc_dbdma_init()
882 return -ENODEV; in au1xmmc_dbdma_init()
885 host->rx_chan = au1xxx_dbdma_chan_alloc(rxid, memid, in au1xmmc_dbdma_init()
887 if (!host->rx_chan) { in au1xmmc_dbdma_init()
888 dev_err(&host->pdev->dev, "cannot allocate RX DMA\n"); in au1xmmc_dbdma_init()
889 au1xxx_dbdma_chan_free(host->tx_chan); in au1xmmc_dbdma_init()
890 return -ENODEV; in au1xmmc_dbdma_init()
893 au1xxx_dbdma_set_devwidth(host->tx_chan, 8); in au1xmmc_dbdma_init()
894 au1xxx_dbdma_set_devwidth(host->rx_chan, 8); in au1xmmc_dbdma_init()
896 au1xxx_dbdma_ring_alloc(host->tx_chan, AU1XMMC_DESCRIPTOR_COUNT); in au1xmmc_dbdma_init()
897 au1xxx_dbdma_ring_alloc(host->rx_chan, AU1XMMC_DESCRIPTOR_COUNT); in au1xmmc_dbdma_init()
900 host->flags |= HOST_F_DMA | HOST_F_DBDMA; in au1xmmc_dbdma_init()
907 if (host->flags & HOST_F_DMA) { in au1xmmc_dbdma_shutdown()
908 host->flags &= ~HOST_F_DMA; in au1xmmc_dbdma_shutdown()
909 au1xxx_dbdma_chan_free(host->tx_chan); in au1xmmc_dbdma_shutdown()
910 au1xxx_dbdma_chan_free(host->rx_chan); in au1xmmc_dbdma_shutdown()
939 mmc = mmc_alloc_host(sizeof(struct au1xmmc_host), &pdev->dev); in au1xmmc_probe()
941 dev_err(&pdev->dev, "no memory for mmc_host\n"); in au1xmmc_probe()
942 ret = -ENOMEM; in au1xmmc_probe()
947 host->mmc = mmc; in au1xmmc_probe()
948 host->platdata = pdev->dev.platform_data; in au1xmmc_probe()
949 host->pdev = pdev; in au1xmmc_probe()
951 ret = -ENODEV; in au1xmmc_probe()
954 dev_err(&pdev->dev, "no mmio defined\n"); in au1xmmc_probe()
958 host->ioarea = request_mem_region(r->start, resource_size(r), in au1xmmc_probe()
959 pdev->name); in au1xmmc_probe()
960 if (!host->ioarea) { in au1xmmc_probe()
961 dev_err(&pdev->dev, "mmio already in use\n"); in au1xmmc_probe()
965 host->iobase = ioremap(r->start, 0x3c); in au1xmmc_probe()
966 if (!host->iobase) { in au1xmmc_probe()
967 dev_err(&pdev->dev, "cannot remap mmio\n"); in au1xmmc_probe()
971 host->irq = platform_get_irq(pdev, 0); in au1xmmc_probe()
972 if (host->irq < 0) in au1xmmc_probe()
975 mmc->ops = &au1xmmc_ops; in au1xmmc_probe()
977 mmc->f_min = 450000; in au1xmmc_probe()
978 mmc->f_max = 24000000; in au1xmmc_probe()
980 mmc->max_blk_size = 2048; in au1xmmc_probe()
981 mmc->max_blk_count = 512; in au1xmmc_probe()
983 mmc->ocr_avail = AU1XMMC_OCR; in au1xmmc_probe()
984 mmc->caps = MMC_CAP_4_BIT_DATA | MMC_CAP_SDIO_IRQ; in au1xmmc_probe()
985 mmc->max_segs = AU1XMMC_DESCRIPTOR_COUNT; in au1xmmc_probe()
991 mmc->max_seg_size = AU1100_MMC_DESCRIPTOR_SIZE; in au1xmmc_probe()
994 mmc->max_seg_size = AU1200_MMC_DESCRIPTOR_SIZE; in au1xmmc_probe()
998 mmc->max_seg_size = AU1200_MMC_DESCRIPTOR_SIZE; in au1xmmc_probe()
999 mmc->f_max = 52000000; in au1xmmc_probe()
1000 if (host->ioarea->start == AU1100_SD0_PHYS_ADDR) in au1xmmc_probe()
1001 mmc->caps |= MMC_CAP_8_BIT_DATA; in au1xmmc_probe()
1005 ret = request_irq(host->irq, au1xmmc_irq, iflag, DRIVER_NAME, host); in au1xmmc_probe()
1007 dev_err(&pdev->dev, "cannot grab IRQ\n"); in au1xmmc_probe()
1011 host->clk = clk_get(&pdev->dev, ALCHEMY_PERIPH_CLK); in au1xmmc_probe()
1012 if (IS_ERR(host->clk)) { in au1xmmc_probe()
1013 dev_err(&pdev->dev, "cannot find clock\n"); in au1xmmc_probe()
1014 ret = PTR_ERR(host->clk); in au1xmmc_probe()
1018 ret = clk_prepare_enable(host->clk); in au1xmmc_probe()
1020 dev_err(&pdev->dev, "cannot enable clock\n"); in au1xmmc_probe()
1024 host->status = HOST_S_IDLE; in au1xmmc_probe()
1026 /* board-specific carddetect setup, if any */ in au1xmmc_probe()
1027 if (host->platdata && host->platdata->cd_setup) { in au1xmmc_probe()
1028 ret = host->platdata->cd_setup(mmc, 1); in au1xmmc_probe()
1030 dev_warn(&pdev->dev, "board CD setup failed\n"); in au1xmmc_probe()
1031 mmc->caps |= MMC_CAP_NEEDS_POLL; in au1xmmc_probe()
1034 mmc->caps |= MMC_CAP_NEEDS_POLL; in au1xmmc_probe()
1037 if (host->platdata) in au1xmmc_probe()
1038 mmc->caps &= ~(host->platdata->mask_host_caps); in au1xmmc_probe()
1040 tasklet_init(&host->data_task, au1xmmc_tasklet_data, in au1xmmc_probe()
1043 tasklet_init(&host->finish_task, au1xmmc_tasklet_finish, in au1xmmc_probe()
1053 if (host->platdata && host->platdata->led) { in au1xmmc_probe()
1054 struct led_classdev *led = host->platdata->led; in au1xmmc_probe()
1055 led->name = mmc_hostname(mmc); in au1xmmc_probe()
1056 led->brightness = LED_OFF; in au1xmmc_probe()
1057 led->default_trigger = mmc_hostname(mmc); in au1xmmc_probe()
1068 dev_err(&pdev->dev, "cannot add mmc host\n"); in au1xmmc_probe()
1075 " (mode=%s)\n", pdev->id, host->iobase, in au1xmmc_probe()
1076 host->flags & HOST_F_DMA ? "dma" : "pio"); in au1xmmc_probe()
1082 if (host->platdata && host->platdata->led) in au1xmmc_probe()
1083 led_classdev_unregister(host->platdata->led); in au1xmmc_probe()
1091 if (host->flags & HOST_F_DBDMA) in au1xmmc_probe()
1094 tasklet_kill(&host->data_task); in au1xmmc_probe()
1095 tasklet_kill(&host->finish_task); in au1xmmc_probe()
1097 if (host->platdata && host->platdata->cd_setup && in au1xmmc_probe()
1098 !(mmc->caps & MMC_CAP_NEEDS_POLL)) in au1xmmc_probe()
1099 host->platdata->cd_setup(mmc, 0); in au1xmmc_probe()
1101 clk_disable_unprepare(host->clk); in au1xmmc_probe()
1102 clk_put(host->clk); in au1xmmc_probe()
1104 free_irq(host->irq, host); in au1xmmc_probe()
1106 iounmap((void *)host->iobase); in au1xmmc_probe()
1108 release_resource(host->ioarea); in au1xmmc_probe()
1109 kfree(host->ioarea); in au1xmmc_probe()
1121 mmc_remove_host(host->mmc); in au1xmmc_remove()
1124 if (host->platdata && host->platdata->led) in au1xmmc_remove()
1125 led_classdev_unregister(host->platdata->led); in au1xmmc_remove()
1128 if (host->platdata && host->platdata->cd_setup && in au1xmmc_remove()
1129 !(host->mmc->caps & MMC_CAP_NEEDS_POLL)) in au1xmmc_remove()
1130 host->platdata->cd_setup(host->mmc, 0); in au1xmmc_remove()
1137 tasklet_kill(&host->data_task); in au1xmmc_remove()
1138 tasklet_kill(&host->finish_task); in au1xmmc_remove()
1140 if (host->flags & HOST_F_DBDMA) in au1xmmc_remove()
1145 clk_disable_unprepare(host->clk); in au1xmmc_remove()
1146 clk_put(host->clk); in au1xmmc_remove()
1148 free_irq(host->irq, host); in au1xmmc_remove()
1149 iounmap((void *)host->iobase); in au1xmmc_remove()
1150 release_resource(host->ioarea); in au1xmmc_remove()
1151 kfree(host->ioarea); in au1xmmc_remove()
1153 mmc_free_host(host->mmc); in au1xmmc_remove()
1221 MODULE_AUTHOR("Advanced Micro Devices, Inc");
1224 MODULE_ALIAS("platform:au1xxx-mmc");