[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8e7b6ac2-9d92-4f37-97c4-ae295f7cdbd4@intel.com>
Date: Tue, 5 Dec 2023 13:26:47 +0200
From: Adrian Hunter <adrian.hunter@...el.com>
To: Jyan Chou [周芷安] <jyanchou@...ltek.com>,
"ulf.hansson@...aro.org" <ulf.hansson@...aro.org>,
"jh80.chung@...sung.com" <jh80.chung@...sung.com>,
"riteshh@...eaurora.org" <riteshh@...eaurora.org>,
"robh+dt@...nel.org" <robh+dt@...nel.org>,
"krzysztof.kozlowski+dt@...aro.org"
<krzysztof.kozlowski+dt@...aro.org>
Cc: "conor+dt@...nel.org" <conor+dt@...nel.org>,
"asutoshd@...eaurora.org" <asutoshd@...eaurora.org>,
"p.zabel@...gutronix.de" <p.zabel@...gutronix.de>,
"linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"arnd@...db.de" <arnd@...db.de>,
"briannorris@...omium.org" <briannorris@...omium.org>,
"doug@...morgal.com" <doug@...morgal.com>,
"tonyhuang.sunplus@...il.com" <tonyhuang.sunplus@...il.com>,
"abel.vesa@...aro.org" <abel.vesa@...aro.org>,
"william.qiu@...rfivetech.com" <william.qiu@...rfivetech.com>
Subject: Re: [PATCH v7][2/4] mmc: Add Synopsys DesignWare mmc cmdq host driver
On 5/12/23 11:19, Jyan Chou [周芷安] wrote:
>>> +
>>> +static irqreturn_t dw_mci_cqe_interrupt(int irq, void *dev_id) {
>>> + struct dw_mci *host = dev_id;
>>> + struct mmc_host *mmc = host->slot->mmc;
>>> + struct cqhci_host *cq_host = NULL;
>>> + int cmd_error = 0, data_error = 0;
>>> +
>>> + if (host->pdata && (host->pdata->caps2 & MMC_CAP2_CQE))
>>> + cq_host = mmc->cqe_private;
>>> +
>>> + dw_mci_get_int(host);
>>> +
>>> + if (host->pdata && (host->pdata->caps2 & MMC_CAP2_CQE)) {
>>> + if (!mmc->cqe_on && !cq_host->activated)
>>
>> Shouldn't really look at internals like mmc->cqe_on or cq_host->activated.
>> There are the cqhci_host_ops ->enable() and ->disable() callbacks to keep track
>> of whether cqhci is expecting interrupts.
>
> Does this means we need to use cqhci_host_ops ->enable() and ->disable() callbacks
> instead of mmc->cqe_on && !cq_host->activated? Thanks.
Yes. ->enable() is always called before cqhci operation and ->disable()
before non-cqhci operation, so they can be used to determine if an interrupt
is for cqhci.
Powered by blists - more mailing lists