hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/mmc/host/wmt-sdmmc.c
....@@ -1,12 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * WM8505/WM8650 SD/MMC Host Controller
34 *
45 * Copyright (C) 2010 Tony Prisk
56 * Copyright (C) 2008 WonderMedia Technologies, Inc.
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
107 */
118
129 #include <linux/init.h>
....@@ -19,7 +16,6 @@
1916 #include <linux/io.h>
2017 #include <linux/irq.h>
2118 #include <linux/clk.h>
22
-#include <linux/gpio.h>
2319 #include <linux/interrupt.h>
2420
2521 #include <linux/of.h>
....@@ -853,7 +849,7 @@
853849 if (IS_ERR(priv->clk_sdmmc)) {
854850 dev_err(&pdev->dev, "Error getting clock\n");
855851 ret = PTR_ERR(priv->clk_sdmmc);
856
- goto fail5;
852
+ goto fail5_and_a_half;
857853 }
858854
859855 ret = clk_prepare_enable(priv->clk_sdmmc);
....@@ -870,6 +866,9 @@
870866 return 0;
871867 fail6:
872868 clk_put(priv->clk_sdmmc);
869
+fail5_and_a_half:
870
+ dma_free_coherent(&pdev->dev, mmc->max_blk_count * 16,
871
+ priv->dma_desc_buffer, priv->dma_desc_device_addr);
873872 fail5:
874873 free_irq(dma_irq, priv);
875874 fail4:
....@@ -994,6 +993,7 @@
994993 .remove = wmt_mci_remove,
995994 .driver = {
996995 .name = DRIVER_NAME,
996
+ .probe_type = PROBE_PREFER_ASYNCHRONOUS,
997997 .pm = wmt_mci_pm_ops,
998998 .of_match_table = wmt_mci_dt_ids,
999999 },