OSDN Git Service

mmc: cmdq_hci: add set_transfer_params() to CQ unhalt
authorSahitya Tummala <stummala@codeaurora.org>
Tue, 12 Apr 2016 07:54:51 +0000 (13:24 +0530)
committerKyle Yan <kyan@codeaurora.org>
Tue, 14 Jun 2016 02:06:21 +0000 (19:06 -0700)
Some of the transfer parameters like DMA mode will be changed
only when CQ is in HALT state to send some legacy commands like
tuning etc.

Also, fix a typo with set_transfer_params() host op.

Change-Id: I3a9856e0d60ce6a9cc1727cd8ccd10ef33bb707c
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
drivers/mmc/host/cmdq_hci.c
drivers/mmc/host/cmdq_hci.h

index c9ad899..458f83a 100644 (file)
@@ -729,8 +729,6 @@ static int cmdq_request(struct mmc_host *mmc, struct mmc_request *mrq)
        }
 
        cq_host->mrq_slot[tag] = mrq;
-       if (cq_host->ops->set_tranfer_params)
-               cq_host->ops->set_tranfer_params(mmc);
 
        /* PM QoS */
        sdhci_msm_pm_qos_irq_vote(host);
@@ -997,6 +995,8 @@ static int cmdq_halt(struct mmc_host *mmc, bool halt)
                }
                ret = retries ? 0 : -ETIMEDOUT;
        } else {
+               if (cq_host->ops->set_transfer_params)
+                       cq_host->ops->set_transfer_params(mmc);
                if (cq_host->ops->set_block_size)
                        cq_host->ops->set_block_size(mmc);
                if (cq_host->ops->set_data_timeout)
index 91cb25b..e1cbb12 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 and
@@ -197,7 +197,7 @@ struct cmdq_host {
 };
 
 struct cmdq_host_ops {
-       void (*set_tranfer_params)(struct mmc_host *mmc);
+       void (*set_transfer_params)(struct mmc_host *mmc);
        void (*set_data_timeout)(struct mmc_host *mmc, u32 val);
        void (*clear_set_irqs)(struct mmc_host *mmc, bool clear);
        void (*set_block_size)(struct mmc_host *mmc);