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>
48 #include <asm/mach-au1x00/au1000.h>
49 #include <asm/mach-au1x00/au1xxx_dbdma.h>
50 #include <asm/mach-au1x00/au1100_mmc.h>
52 #define DRIVER_NAME "au1xxx-mmc"
139 #define HOST_STATUS(h) ((h)->iobase + SD_STATUS)
140 #define HOST_CONFIG(h) ((h)->iobase + SD_CONFIG)
141 #define HOST_ENABLE(h) ((h)->iobase + SD_ENABLE)
142 #define HOST_TXPORT(h) ((h)->iobase + SD_TXPORT)
143 #define HOST_RXPORT(h) ((h)->iobase + SD_RXPORT)
144 #define HOST_CMDARG(h) ((h)->iobase + SD_CMDARG)
145 #define HOST_BLKSIZE(h) ((h)->iobase + SD_BLKSIZE)
146 #define HOST_CMD(h) ((h)->iobase + SD_CMD)
147 #define HOST_CONFIG2(h) ((h)->iobase + SD_CONFIG2)
148 #define HOST_TIMEOUT(h) ((h)->iobase + SD_TIMEOUT)
149 #define HOST_DEBUG(h) ((h)->iobase + SD_DEBUG)
152 (((h)->flags & HOST_F_XMIT) ? (h)->tx_chan : (h)->rx_chan)
181 /* SEND_STOP will turn off clock control - this re-enables it */ in FLUSH_FIFO()
200 WARN_ON(host->status != HOST_S_DATA); in SEND_STOP()
201 host->status = HOST_S_STOP; in SEND_STOP()
214 if (host->platdata && host->platdata->set_power) in au1xmmc_set_power()
215 host->platdata->set_power(host->mmc, state); in au1xmmc_set_power()
222 if (host->platdata && host->platdata->card_inserted) in au1xmmc_card_inserted()
223 return !!host->platdata->card_inserted(host->mmc); in au1xmmc_card_inserted()
225 return -ENOSYS; in au1xmmc_card_inserted()
232 if (host->platdata && host->platdata->card_readonly) in au1xmmc_card_readonly()
233 return !!host->platdata->card_readonly(mmc); in au1xmmc_card_readonly()
235 return -ENOSYS; in au1xmmc_card_readonly()
240 struct mmc_request *mrq = host->mrq; in au1xmmc_finish_request()
242 host->mrq = NULL; in au1xmmc_finish_request()
243 host->flags &= HOST_F_ACTIVE | HOST_F_DMA; in au1xmmc_finish_request()
245 host->dma.len = 0; in au1xmmc_finish_request()
246 host->dma.dir = 0; in au1xmmc_finish_request()
248 host->pio.index = 0; in au1xmmc_finish_request()
249 host->pio.offset = 0; in au1xmmc_finish_request()
250 host->pio.len = 0; in au1xmmc_finish_request()
252 host->status = HOST_S_IDLE; in au1xmmc_finish_request()
254 mmc_request_done(host->mmc, mrq); in au1xmmc_finish_request()
266 u32 mmccmd = (cmd->opcode << SD_CMD_CI_SHIFT); in au1xmmc_send_command()
286 return -EINVAL; in au1xmmc_send_command()
290 if (data->flags & MMC_DATA_READ) { in au1xmmc_send_command()
291 if (data->blocks > 1) in au1xmmc_send_command()
295 } else if (data->flags & MMC_DATA_WRITE) { in au1xmmc_send_command()
296 if (data->blocks > 1) in au1xmmc_send_command()
303 __raw_writel(cmd->arg, HOST_CMDARG(host)); in au1xmmc_send_command()
318 struct mmc_request *mrq = host->mrq; in au1xmmc_data_complete()
322 WARN_ON((host->status != HOST_S_DATA) && (host->status != HOST_S_STOP)); in au1xmmc_data_complete()
324 if (host->mrq == NULL) in au1xmmc_data_complete()
327 data = mrq->cmd->data; in au1xmmc_data_complete()
333 while ((host->flags & HOST_F_XMIT) && (status & SD_STATUS_DB)) in au1xmmc_data_complete()
336 data->error = 0; in au1xmmc_data_complete()
337 dma_unmap_sg(mmc_dev(host->mmc), data->sg, data->sg_len, host->dma.dir); in au1xmmc_data_complete()
341 if (host->flags & HOST_F_XMIT) in au1xmmc_data_complete()
345 data->error = -EILSEQ; in au1xmmc_data_complete()
350 data->bytes_xfered = 0; in au1xmmc_data_complete()
352 if (!data->error) { in au1xmmc_data_complete()
353 if (host->flags & (HOST_F_DMA | HOST_F_DBDMA)) { in au1xmmc_data_complete()
357 au1x_dma_chan_t *cp = c->chan_ptr; in au1xmmc_data_complete()
358 data->bytes_xfered = cp->ddma_bytecnt; in au1xmmc_data_complete()
360 data->bytes_xfered = in au1xmmc_data_complete()
361 (data->blocks * data->blksz) - host->pio.len; in au1xmmc_data_complete()
383 struct scatterlist *sg; in au1xmmc_send_pio() local
385 data = host->mrq->data; in au1xmmc_send_pio()
387 if (!(host->flags & HOST_F_XMIT)) in au1xmmc_send_pio()
391 sg = &data->sg[host->pio.index]; in au1xmmc_send_pio()
392 sg_ptr = kmap_local_page(sg_page(sg)) + sg->offset + host->pio.offset; in au1xmmc_send_pio()
395 sg_len = data->sg[host->pio.index].length - host->pio.offset; in au1xmmc_send_pio()
398 max = (sg_len > host->pio.len) ? host->pio.len : sg_len; in au1xmmc_send_pio()
415 host->pio.len -= count; in au1xmmc_send_pio()
416 host->pio.offset += count; in au1xmmc_send_pio()
419 host->pio.index++; in au1xmmc_send_pio()
420 host->pio.offset = 0; in au1xmmc_send_pio()
423 if (host->pio.len == 0) { in au1xmmc_send_pio()
426 if (host->flags & HOST_F_STOP) in au1xmmc_send_pio()
429 queue_work(system_bh_wq, &host->data_bh_work); in au1xmmc_send_pio()
439 struct scatterlist *sg; in au1xmmc_receive_pio() local
441 data = host->mrq->data; in au1xmmc_receive_pio()
443 if (!(host->flags & HOST_F_RECV)) in au1xmmc_receive_pio()
446 max = host->pio.len; in au1xmmc_receive_pio()
448 if (host->pio.index < host->dma.len) { in au1xmmc_receive_pio()
449 sg = &data->sg[host->pio.index]; in au1xmmc_receive_pio()
450 sg_ptr = kmap_local_page(sg_page(sg)) + sg->offset + host->pio.offset; in au1xmmc_receive_pio()
453 sg_len = sg_dma_len(&data->sg[host->pio.index]) - host->pio.offset; in au1xmmc_receive_pio()
470 DBG("RX CRC Error [%d + %d].\n", host->pdev->id, in au1xmmc_receive_pio()
471 host->pio.len, count); in au1xmmc_receive_pio()
476 DBG("RX Overrun [%d + %d]\n", host->pdev->id, in au1xmmc_receive_pio()
477 host->pio.len, count); in au1xmmc_receive_pio()
481 DBG("RX Underrun [%d + %d]\n", host->pdev->id, in au1xmmc_receive_pio()
482 host->pio.len, count); in au1xmmc_receive_pio()
494 host->pio.len -= count; in au1xmmc_receive_pio()
495 host->pio.offset += count; in au1xmmc_receive_pio()
498 host->pio.index++; in au1xmmc_receive_pio()
499 host->pio.offset = 0; in au1xmmc_receive_pio()
502 if (host->pio.len == 0) { in au1xmmc_receive_pio()
506 if (host->flags & HOST_F_STOP) in au1xmmc_receive_pio()
509 queue_work(system_bh_wq, &host->data_bh_work); in au1xmmc_receive_pio()
513 /* This is called when a command has been completed - grab the response
518 struct mmc_request *mrq = host->mrq; in au1xmmc_cmd_complete()
523 if (!host->mrq) in au1xmmc_cmd_complete()
526 cmd = mrq->cmd; in au1xmmc_cmd_complete()
527 cmd->error = 0; in au1xmmc_cmd_complete()
529 if (cmd->flags & MMC_RSP_PRESENT) { in au1xmmc_cmd_complete()
530 if (cmd->flags & MMC_RSP_136) { in au1xmmc_cmd_complete()
531 r[0] = __raw_readl(host->iobase + SD_RESP3); in au1xmmc_cmd_complete()
532 r[1] = __raw_readl(host->iobase + SD_RESP2); in au1xmmc_cmd_complete()
533 r[2] = __raw_readl(host->iobase + SD_RESP1); in au1xmmc_cmd_complete()
534 r[3] = __raw_readl(host->iobase + SD_RESP0); in au1xmmc_cmd_complete()
541 cmd->resp[i] = (r[i] & 0x00FFFFFF) << 8; in au1xmmc_cmd_complete()
543 cmd->resp[i] |= (r[i + 1] & 0xFF000000) >> 24; in au1xmmc_cmd_complete()
553 cmd->resp[0] = __raw_readl(host->iobase + SD_RESP0); in au1xmmc_cmd_complete()
559 cmd->error = -EILSEQ; in au1xmmc_cmd_complete()
561 trans = host->flags & (HOST_F_XMIT | HOST_F_RECV); in au1xmmc_cmd_complete()
563 if (!trans || cmd->error) { in au1xmmc_cmd_complete()
565 queue_work(system_bh_wq, &host->finish_bh_work); in au1xmmc_cmd_complete()
569 host->status = HOST_S_DATA; in au1xmmc_cmd_complete()
571 if ((host->flags & (HOST_F_DMA | HOST_F_DBDMA))) { in au1xmmc_cmd_complete()
576 if (host->flags & HOST_F_RECV) { in au1xmmc_cmd_complete()
589 unsigned int pbus = clk_get_rate(host->clk); in au1xmmc_set_clock()
590 unsigned int divisor = ((pbus / rate) / 2) - 1; in au1xmmc_set_clock()
605 int datalen = data->blocks * data->blksz; in au1xmmc_prepare_data()
607 if (data->flags & MMC_DATA_READ) in au1xmmc_prepare_data()
608 host->flags |= HOST_F_RECV; in au1xmmc_prepare_data()
610 host->flags |= HOST_F_XMIT; in au1xmmc_prepare_data()
612 if (host->mrq->stop) in au1xmmc_prepare_data()
613 host->flags |= HOST_F_STOP; in au1xmmc_prepare_data()
615 host->dma.dir = DMA_BIDIRECTIONAL; in au1xmmc_prepare_data()
617 host->dma.len = dma_map_sg(mmc_dev(host->mmc), data->sg, in au1xmmc_prepare_data()
618 data->sg_len, host->dma.dir); in au1xmmc_prepare_data()
620 if (host->dma.len == 0) in au1xmmc_prepare_data()
621 return -ETIMEDOUT; in au1xmmc_prepare_data()
623 __raw_writel(data->blksz - 1, HOST_BLKSIZE(host)); in au1xmmc_prepare_data()
625 if (host->flags & (HOST_F_DMA | HOST_F_DBDMA)) { in au1xmmc_prepare_data()
631 for (i = 0; i < host->dma.len; i++) { in au1xmmc_prepare_data()
633 struct scatterlist *sg = &data->sg[i]; in au1xmmc_prepare_data() local
634 int sg_len = sg->length; in au1xmmc_prepare_data()
638 if (i == host->dma.len - 1) in au1xmmc_prepare_data()
641 if (host->flags & HOST_F_XMIT) { in au1xmmc_prepare_data()
643 sg_phys(sg), len, flags); in au1xmmc_prepare_data()
646 sg_phys(sg), len, flags); in au1xmmc_prepare_data()
652 datalen -= len; in au1xmmc_prepare_data()
655 host->pio.index = 0; in au1xmmc_prepare_data()
656 host->pio.offset = 0; in au1xmmc_prepare_data()
657 host->pio.len = datalen; in au1xmmc_prepare_data()
659 if (host->flags & HOST_F_XMIT) in au1xmmc_prepare_data()
669 dma_unmap_sg(mmc_dev(host->mmc), data->sg, data->sg_len, in au1xmmc_prepare_data()
670 host->dma.dir); in au1xmmc_prepare_data()
671 return -ETIMEDOUT; in au1xmmc_prepare_data()
681 WARN_ON(host->status != HOST_S_IDLE); in au1xmmc_request()
683 host->mrq = mrq; in au1xmmc_request()
684 host->status = HOST_S_CMD; in au1xmmc_request()
688 mrq->cmd->error = -ENOMEDIUM; in au1xmmc_request()
693 if (mrq->data) { in au1xmmc_request()
695 ret = au1xmmc_prepare_data(host, mrq->data); in au1xmmc_request()
699 ret = au1xmmc_send_command(host, mrq->cmd, mrq->data); in au1xmmc_request()
702 mrq->cmd->error = ret; in au1xmmc_request()
746 if (ios->power_mode == MMC_POWER_OFF) in au1xmmc_set_ios()
748 else if (ios->power_mode == MMC_POWER_ON) { in au1xmmc_set_ios()
752 if (ios->clock && ios->clock != host->clock) { in au1xmmc_set_ios()
753 au1xmmc_set_clock(host, ios->clock); in au1xmmc_set_ios()
754 host->clock = ios->clock; in au1xmmc_set_ios()
758 switch (ios->bus_width) { in au1xmmc_set_ios()
789 mmc_signal_sdio_irq(host->mmc); in au1xmmc_irq()
791 if (host->mrq && (status & STATUS_TIMEOUT)) { in au1xmmc_irq()
793 host->mrq->cmd->error = -ETIMEDOUT; in au1xmmc_irq()
795 host->mrq->data->error = -ETIMEDOUT; in au1xmmc_irq()
801 queue_work(system_bh_wq, &host->finish_bh_work); in au1xmmc_irq()
806 if (!(host->flags & HOST_F_DMA) && (status & SD_STATUS_NE)) in au1xmmc_irq()
810 /* queue_work(system_bh_wq, &host->data_bh_work); */ in au1xmmc_irq()
815 if (host->status == HOST_S_CMD) in au1xmmc_irq()
818 } else if (!(host->flags & HOST_F_DMA)) { in au1xmmc_irq()
819 if ((host->flags & HOST_F_XMIT) && (status & STATUS_DATA_OUT)) in au1xmmc_irq()
821 else if ((host->flags & HOST_F_RECV) && (status & STATUS_DATA_IN)) in au1xmmc_irq()
825 DBG("Unhandled status %8.8x\n", host->pdev->id, in au1xmmc_irq()
852 if (!host->mrq) in au1xmmc_dbdma_callback()
855 if (host->flags & HOST_F_STOP) in au1xmmc_dbdma_callback()
858 queue_work(system_bh_wq, &host->data_bh_work); in au1xmmc_dbdma_callback()
866 res = platform_get_resource(host->pdev, IORESOURCE_DMA, 0); in au1xmmc_dbdma_init()
868 return -ENODEV; in au1xmmc_dbdma_init()
869 txid = res->start; in au1xmmc_dbdma_init()
871 res = platform_get_resource(host->pdev, IORESOURCE_DMA, 1); in au1xmmc_dbdma_init()
873 return -ENODEV; in au1xmmc_dbdma_init()
874 rxid = res->start; in au1xmmc_dbdma_init()
877 return -ENODEV; in au1xmmc_dbdma_init()
879 host->tx_chan = au1xxx_dbdma_chan_alloc(memid, txid, in au1xmmc_dbdma_init()
881 if (!host->tx_chan) { in au1xmmc_dbdma_init()
882 dev_err(&host->pdev->dev, "cannot allocate TX DMA\n"); in au1xmmc_dbdma_init()
883 return -ENODEV; in au1xmmc_dbdma_init()
886 host->rx_chan = au1xxx_dbdma_chan_alloc(rxid, memid, in au1xmmc_dbdma_init()
888 if (!host->rx_chan) { in au1xmmc_dbdma_init()
889 dev_err(&host->pdev->dev, "cannot allocate RX DMA\n"); in au1xmmc_dbdma_init()
890 au1xxx_dbdma_chan_free(host->tx_chan); in au1xmmc_dbdma_init()
891 return -ENODEV; in au1xmmc_dbdma_init()
894 au1xxx_dbdma_set_devwidth(host->tx_chan, 8); in au1xmmc_dbdma_init()
895 au1xxx_dbdma_set_devwidth(host->rx_chan, 8); in au1xmmc_dbdma_init()
897 au1xxx_dbdma_ring_alloc(host->tx_chan, AU1XMMC_DESCRIPTOR_COUNT); in au1xmmc_dbdma_init()
898 au1xxx_dbdma_ring_alloc(host->rx_chan, AU1XMMC_DESCRIPTOR_COUNT); in au1xmmc_dbdma_init()
901 host->flags |= HOST_F_DMA | HOST_F_DBDMA; in au1xmmc_dbdma_init()
908 if (host->flags & HOST_F_DMA) { in au1xmmc_dbdma_shutdown()
909 host->flags &= ~HOST_F_DMA; in au1xmmc_dbdma_shutdown()
910 au1xxx_dbdma_chan_free(host->tx_chan); in au1xmmc_dbdma_shutdown()
911 au1xxx_dbdma_chan_free(host->rx_chan); in au1xmmc_dbdma_shutdown()
940 mmc = mmc_alloc_host(sizeof(struct au1xmmc_host), &pdev->dev); in au1xmmc_probe()
942 dev_err(&pdev->dev, "no memory for mmc_host\n"); in au1xmmc_probe()
943 ret = -ENOMEM; in au1xmmc_probe()
948 host->mmc = mmc; in au1xmmc_probe()
949 host->platdata = pdev->dev.platform_data; in au1xmmc_probe()
950 host->pdev = pdev; in au1xmmc_probe()
952 ret = -ENODEV; in au1xmmc_probe()
955 dev_err(&pdev->dev, "no mmio defined\n"); in au1xmmc_probe()
959 host->ioarea = request_mem_region(r->start, resource_size(r), in au1xmmc_probe()
960 pdev->name); in au1xmmc_probe()
961 if (!host->ioarea) { in au1xmmc_probe()
962 dev_err(&pdev->dev, "mmio already in use\n"); in au1xmmc_probe()
966 host->iobase = ioremap(r->start, 0x3c); in au1xmmc_probe()
967 if (!host->iobase) { in au1xmmc_probe()
968 dev_err(&pdev->dev, "cannot remap mmio\n"); in au1xmmc_probe()
972 host->irq = platform_get_irq(pdev, 0); in au1xmmc_probe()
973 if (host->irq < 0) { in au1xmmc_probe()
974 ret = host->irq; in au1xmmc_probe()
978 mmc->ops = &au1xmmc_ops; in au1xmmc_probe()
980 mmc->f_min = 450000; in au1xmmc_probe()
981 mmc->f_max = 24000000; in au1xmmc_probe()
983 mmc->max_blk_size = 2048; in au1xmmc_probe()
984 mmc->max_blk_count = 512; in au1xmmc_probe()
986 mmc->ocr_avail = AU1XMMC_OCR; in au1xmmc_probe()
987 mmc->caps = MMC_CAP_4_BIT_DATA | MMC_CAP_SDIO_IRQ; in au1xmmc_probe()
988 mmc->max_segs = AU1XMMC_DESCRIPTOR_COUNT; in au1xmmc_probe()
994 mmc->max_seg_size = AU1100_MMC_DESCRIPTOR_SIZE; in au1xmmc_probe()
997 mmc->max_seg_size = AU1200_MMC_DESCRIPTOR_SIZE; in au1xmmc_probe()
1001 mmc->max_seg_size = AU1200_MMC_DESCRIPTOR_SIZE; in au1xmmc_probe()
1002 mmc->f_max = 52000000; in au1xmmc_probe()
1003 if (host->ioarea->start == AU1100_SD0_PHYS_ADDR) in au1xmmc_probe()
1004 mmc->caps |= MMC_CAP_8_BIT_DATA; in au1xmmc_probe()
1008 ret = request_irq(host->irq, au1xmmc_irq, iflag, DRIVER_NAME, host); in au1xmmc_probe()
1010 dev_err(&pdev->dev, "cannot grab IRQ\n"); in au1xmmc_probe()
1014 host->clk = clk_get(&pdev->dev, ALCHEMY_PERIPH_CLK); in au1xmmc_probe()
1015 if (IS_ERR(host->clk)) { in au1xmmc_probe()
1016 dev_err(&pdev->dev, "cannot find clock\n"); in au1xmmc_probe()
1017 ret = PTR_ERR(host->clk); in au1xmmc_probe()
1021 ret = clk_prepare_enable(host->clk); in au1xmmc_probe()
1023 dev_err(&pdev->dev, "cannot enable clock\n"); in au1xmmc_probe()
1027 host->status = HOST_S_IDLE; in au1xmmc_probe()
1029 /* board-specific carddetect setup, if any */ in au1xmmc_probe()
1030 if (host->platdata && host->platdata->cd_setup) { in au1xmmc_probe()
1031 ret = host->platdata->cd_setup(mmc, 1); in au1xmmc_probe()
1033 dev_warn(&pdev->dev, "board CD setup failed\n"); in au1xmmc_probe()
1034 mmc->caps |= MMC_CAP_NEEDS_POLL; in au1xmmc_probe()
1037 mmc->caps |= MMC_CAP_NEEDS_POLL; in au1xmmc_probe()
1040 if (host->platdata) in au1xmmc_probe()
1041 mmc->caps &= ~(host->platdata->mask_host_caps); in au1xmmc_probe()
1043 INIT_WORK(&host->data_bh_work, au1xmmc_data_bh_work); in au1xmmc_probe()
1045 INIT_WORK(&host->finish_bh_work, au1xmmc_finish_bh_work); in au1xmmc_probe()
1054 if (host->platdata && host->platdata->led) { in au1xmmc_probe()
1055 struct led_classdev *led = host->platdata->led; in au1xmmc_probe()
1056 led->name = mmc_hostname(mmc); in au1xmmc_probe()
1057 led->brightness = LED_OFF; in au1xmmc_probe()
1058 led->default_trigger = mmc_hostname(mmc); in au1xmmc_probe()
1069 dev_err(&pdev->dev, "cannot add mmc host\n"); in au1xmmc_probe()
1076 " (mode=%s)\n", pdev->id, host->iobase, in au1xmmc_probe()
1077 host->flags & HOST_F_DMA ? "dma" : "pio"); in au1xmmc_probe()
1083 if (host->platdata && host->platdata->led) in au1xmmc_probe()
1084 led_classdev_unregister(host->platdata->led); in au1xmmc_probe()
1092 if (host->flags & HOST_F_DBDMA) in au1xmmc_probe()
1095 cancel_work_sync(&host->data_bh_work); in au1xmmc_probe()
1096 cancel_work_sync(&host->finish_bh_work); in au1xmmc_probe()
1098 if (host->platdata && host->platdata->cd_setup && in au1xmmc_probe()
1099 !(mmc->caps & MMC_CAP_NEEDS_POLL)) in au1xmmc_probe()
1100 host->platdata->cd_setup(mmc, 0); in au1xmmc_probe()
1102 clk_disable_unprepare(host->clk); in au1xmmc_probe()
1104 clk_put(host->clk); in au1xmmc_probe()
1106 free_irq(host->irq, host); in au1xmmc_probe()
1108 iounmap((void *)host->iobase); in au1xmmc_probe()
1110 release_resource(host->ioarea); in au1xmmc_probe()
1111 kfree(host->ioarea); in au1xmmc_probe()
1123 mmc_remove_host(host->mmc); in au1xmmc_remove()
1126 if (host->platdata && host->platdata->led) in au1xmmc_remove()
1127 led_classdev_unregister(host->platdata->led); in au1xmmc_remove()
1130 if (host->platdata && host->platdata->cd_setup && in au1xmmc_remove()
1131 !(host->mmc->caps & MMC_CAP_NEEDS_POLL)) in au1xmmc_remove()
1132 host->platdata->cd_setup(host->mmc, 0); in au1xmmc_remove()
1139 cancel_work_sync(&host->data_bh_work); in au1xmmc_remove()
1140 cancel_work_sync(&host->finish_bh_work); in au1xmmc_remove()
1142 if (host->flags & HOST_F_DBDMA) in au1xmmc_remove()
1147 clk_disable_unprepare(host->clk); in au1xmmc_remove()
1148 clk_put(host->clk); in au1xmmc_remove()
1150 free_irq(host->irq, host); in au1xmmc_remove()
1151 iounmap((void *)host->iobase); in au1xmmc_remove()
1152 release_resource(host->ioarea); in au1xmmc_remove()
1153 kfree(host->ioarea); in au1xmmc_remove()
1155 mmc_free_host(host->mmc); in au1xmmc_remove()
1222 MODULE_AUTHOR("Advanced Micro Devices, Inc");
1225 MODULE_ALIAS("platform:au1xxx-mmc");