From: Andrea Merello <andrea.merello@gmail.com>
To: ulf.hansson@linaro.org, mcoquelin.stm32@gmail.com,
alexandre.torgue@st.com
Cc: linux-mmc@vger.kernel.org, Andrea Merello <andrea.merello@gmail.com>
Subject: [PATCH 3/9] mmc: mmci: don't pretend all variants to have MCI_STARBITERR flag
Date: Tue, 8 Nov 2016 14:43:39 +0100 [thread overview]
Message-ID: <1478612625-23256-4-git-send-email-andrea.merello@gmail.com> (raw)
In-Reply-To: <1478612625-23256-1-git-send-email-andrea.merello@gmail.com>
This patch prepares for supporting the STM32 variant, that has no such bit
in the status register.
Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
---
drivers/mmc/host/mmci.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index b1dfde3..0c629e3 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -106,6 +106,7 @@ struct variant_data {
bool qcom_fifo;
bool qcom_dml;
bool reversed_irq_handling;
+ bool has_start_err;
};
static __maybe_unused struct variant_data variant_arm = {
@@ -115,6 +116,7 @@ static __maybe_unused struct variant_data variant_arm = {
.pwrreg_powerup = MCI_PWR_UP,
.f_max = 100000000,
.reversed_irq_handling = true,
+ .has_start_err = true,
};
static __maybe_unused struct variant_data variant_arm_extended_fifo = {
@@ -123,6 +125,7 @@ static __maybe_unused struct variant_data variant_arm_extended_fifo = {
.datalength_bits = 16,
.pwrreg_powerup = MCI_PWR_UP,
.f_max = 100000000,
+ .has_start_err = true,
};
static __maybe_unused struct variant_data variant_arm_extended_fifo_hwfc = {
@@ -132,6 +135,7 @@ static __maybe_unused struct variant_data variant_arm_extended_fifo_hwfc = {
.datalength_bits = 16,
.pwrreg_powerup = MCI_PWR_UP,
.f_max = 100000000,
+ .has_start_err = true,
};
static __maybe_unused struct variant_data variant_u300 = {
@@ -147,6 +151,7 @@ static __maybe_unused struct variant_data variant_u300 = {
.signal_direction = true,
.pwrreg_clkgate = true,
.pwrreg_nopower = true,
+ .has_start_err = true,
};
static __maybe_unused struct variant_data variant_nomadik = {
@@ -163,6 +168,7 @@ static __maybe_unused struct variant_data variant_nomadik = {
.signal_direction = true,
.pwrreg_clkgate = true,
.pwrreg_nopower = true,
+ .has_start_err = true,
};
static __maybe_unused struct variant_data variant_ux500 = {
@@ -182,6 +188,7 @@ static __maybe_unused struct variant_data variant_ux500 = {
.pwrreg_clkgate = true,
.busy_detect = true,
.pwrreg_nopower = true,
+ .has_start_err = true,
};
static __maybe_unused struct variant_data variant_ux500v2 = {
@@ -203,6 +210,7 @@ static __maybe_unused struct variant_data variant_ux500v2 = {
.pwrreg_clkgate = true,
.busy_detect = true,
.pwrreg_nopower = true,
+ .has_start_err = true,
};
static __maybe_unused struct variant_data variant_qcom = {
@@ -221,6 +229,7 @@ static __maybe_unused struct variant_data variant_qcom = {
.explicit_mclk_control = true,
.qcom_fifo = true,
.qcom_dml = true,
+ .has_start_err = true,
};
static int mmci_card_busy(struct mmc_host *mmc)
@@ -909,8 +918,9 @@ mmci_data_irq(struct mmci_host *host, struct mmc_data *data,
return;
/* First check for errors */
- if (status & (MCI_DATACRCFAIL|MCI_DATATIMEOUT|MCI_STARTBITERR|
- MCI_TXUNDERRUN|MCI_RXOVERRUN)) {
+ if (status & (MCI_DATACRCFAIL | MCI_DATATIMEOUT |
+ (host->variant->has_start_err ? MCI_STARTBITERR : 0) |
+ MCI_TXUNDERRUN | MCI_RXOVERRUN)) {
u32 remain, success;
/* Terminate the DMA transfer */
--
2.7.4
next prev parent reply other threads:[~2016-11-08 13:44 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-08 13:43 [PATCH 0/9] mmc: mmci: add support for STM32 SD controller Andrea Merello
2016-11-08 13:43 ` [PATCH 1/9] mmc: mmci: don't pretend IP variants with only one IRQ to have two mask regs Andrea Merello
2016-11-08 13:43 ` [PATCH 2/9] mmc: mmci: add support for not-amba, but still compatible, variants Andrea Merello
2016-11-08 17:39 ` kbuild test robot
2016-11-08 17:41 ` kbuild test robot
2016-11-08 13:43 ` Andrea Merello [this message]
2016-11-08 13:43 ` [PATCH 4/9] mmc: mmci: add support for setting pad type via pinctrl Andrea Merello
2016-11-08 13:43 ` [PATCH 5/9] mmc: mmci: add STM32 variant Andrea Merello
2016-11-08 13:43 ` [PATCH 6/9] DT: stm32f429: add pin map for SDIO controller Andrea Merello
2016-11-10 10:51 ` Alexandre Torgue
2016-11-14 10:19 ` Andrea Merello
2016-11-08 13:43 ` [PATCH 7/9] DT: stm32f429: add node " Andrea Merello
2016-11-08 13:43 ` [PATCH 8/9] DT: stm32f469-disco: " Andrea Merello
2016-11-10 10:54 ` Alexandre Torgue
2016-11-14 10:36 ` Andrea Merello
2016-11-14 10:42 ` Alexandre Torgue
2016-11-08 13:43 ` [PATCH 9/9] Documentation: document mmci STM32 DT binding Andrea Merello
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1478612625-23256-4-git-send-email-andrea.merello@gmail.com \
--to=andrea.merello@gmail.com \
--cc=alexandre.torgue@st.com \
--cc=linux-mmc@vger.kernel.org \
--cc=mcoquelin.stm32@gmail.com \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).