mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
mmc: cqhci: Port two trivial fixes in cqhci from earlier kernels
This is a squash of below two minor fixes: 8fec754f57a8 mmc: cmdq: trigger get queue status after dcmd 327fd3225911 mmc: cqhci: CQ Register changes for v5.0 onwards. Change-Id: I1bb6cae5a647c4ea189a992d5ace7b6c1e3a1c87 Signed-off-by: Sarthak Garg <sartgarg@codeaurora.org>
This commit is contained in:
parent
5b47848843
commit
d3028e1ef5
2 changed files with 17 additions and 0 deletions
|
|
@ -102,6 +102,10 @@ static void cqhci_set_irqs(struct cqhci_host *cq_host, u32 set)
|
|||
static void cqhci_dumpregs(struct cqhci_host *cq_host)
|
||||
{
|
||||
struct mmc_host *mmc = cq_host->mmc;
|
||||
int offset = 0;
|
||||
|
||||
if (cq_host->offset_changed)
|
||||
offset = CQE_V5_VENDOR_CFG;
|
||||
|
||||
CQHCI_DUMP("============ CQHCI REGISTER DUMP ===========\n");
|
||||
|
||||
|
|
@ -138,6 +142,8 @@ static void cqhci_dumpregs(struct cqhci_host *cq_host)
|
|||
CQHCI_DUMP("Resp idx: 0x%08x | Resp arg: 0x%08x\n",
|
||||
cqhci_readl(cq_host, CQHCI_CRI),
|
||||
cqhci_readl(cq_host, CQHCI_CRA));
|
||||
CQHCI_DUMP("Vendor cfg 0x%08x\n",
|
||||
cqhci_readl(cq_host, CQHCI_VENDOR_CFG + offset));
|
||||
|
||||
cqhci_crypto_debug(cq_host);
|
||||
|
||||
|
|
@ -793,6 +799,10 @@ static void cqhci_finish_mrq(struct mmc_host *mmc, unsigned int tag)
|
|||
struct cqhci_slot *slot = &cq_host->slot[tag];
|
||||
struct mmc_request *mrq = slot->mrq;
|
||||
struct mmc_data *data;
|
||||
int offset = 0;
|
||||
|
||||
if (cq_host->offset_changed)
|
||||
offset = CQE_V5_VENDOR_CFG;
|
||||
|
||||
if (!mrq) {
|
||||
WARN_ONCE(1, "%s: cqhci: spurious TCN for tag %d\n",
|
||||
|
|
@ -818,6 +828,11 @@ static void cqhci_finish_mrq(struct mmc_host *mmc, unsigned int tag)
|
|||
data->bytes_xfered = 0;
|
||||
else
|
||||
data->bytes_xfered = data->blksz * data->blocks;
|
||||
} else {
|
||||
cqhci_writel(cq_host, cqhci_readl(cq_host,
|
||||
CQHCI_VENDOR_CFG + offset) |
|
||||
CMDQ_SEND_STATUS_TRIGGER,
|
||||
CQHCI_VENDOR_CFG + offset);
|
||||
}
|
||||
|
||||
mmc_cqe_request_done(mmc, mrq);
|
||||
|
|
|
|||
|
|
@ -118,6 +118,8 @@
|
|||
* register address for SDHC v5.0 onwards.
|
||||
*/
|
||||
#define CQE_V5_VENDOR_CFG 0x900
|
||||
#define CQHCI_VENDOR_CFG 0x100
|
||||
#define CMDQ_SEND_STATUS_TRIGGER (1 << 31)
|
||||
|
||||
#define CQHCI_INT_ALL 0xF
|
||||
#define CQHCI_IC_DEFAULT_ICCTH 31
|
||||
|
|
|
|||
Loading…
Reference in a new issue