| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * WM8505/WM8650 SD/MMC Host Controller |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2010 Tony Prisk |
|---|
| 5 | 6 | * 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 |
|---|
| 10 | 7 | */ |
|---|
| 11 | 8 | |
|---|
| 12 | 9 | #include <linux/init.h> |
|---|
| .. | .. |
|---|
| 19 | 16 | #include <linux/io.h> |
|---|
| 20 | 17 | #include <linux/irq.h> |
|---|
| 21 | 18 | #include <linux/clk.h> |
|---|
| 22 | | -#include <linux/gpio.h> |
|---|
| 23 | 19 | #include <linux/interrupt.h> |
|---|
| 24 | 20 | |
|---|
| 25 | 21 | #include <linux/of.h> |
|---|
| .. | .. |
|---|
| 853 | 849 | if (IS_ERR(priv->clk_sdmmc)) { |
|---|
| 854 | 850 | dev_err(&pdev->dev, "Error getting clock\n"); |
|---|
| 855 | 851 | ret = PTR_ERR(priv->clk_sdmmc); |
|---|
| 856 | | - goto fail5; |
|---|
| 852 | + goto fail5_and_a_half; |
|---|
| 857 | 853 | } |
|---|
| 858 | 854 | |
|---|
| 859 | 855 | ret = clk_prepare_enable(priv->clk_sdmmc); |
|---|
| .. | .. |
|---|
| 870 | 866 | return 0; |
|---|
| 871 | 867 | fail6: |
|---|
| 872 | 868 | 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); |
|---|
| 873 | 872 | fail5: |
|---|
| 874 | 873 | free_irq(dma_irq, priv); |
|---|
| 875 | 874 | fail4: |
|---|
| .. | .. |
|---|
| 994 | 993 | .remove = wmt_mci_remove, |
|---|
| 995 | 994 | .driver = { |
|---|
| 996 | 995 | .name = DRIVER_NAME, |
|---|
| 996 | + .probe_type = PROBE_PREFER_ASYNCHRONOUS, |
|---|
| 997 | 997 | .pm = wmt_mci_pm_ops, |
|---|
| 998 | 998 | .of_match_table = wmt_mci_dt_ids, |
|---|
| 999 | 999 | }, |
|---|