From: Jaehoon Chung <jh80.chung@samsung.com>
To: linux-mmc@vger.kernel.org
Cc: ulf.hansson@linaro.org, shawn.lin@rock-chips.com
Subject: Re: [PATCH v2 1/3] mmc: dw_mmc: remove the quirks flags
Date: Wed, 22 Jun 2016 13:16:28 +0900 [thread overview]
Message-ID: <576A111C.1040804@samsung.com> (raw)
In-Reply-To: <1466487339-13211-1-git-send-email-jh80.chung@samsung.com>
On 06/21/2016 02:35 PM, Jaehoon Chung wrote:
> Remove the quirks flag. (DW_MCI_QUIRK_BROKEN_DTO)
> For removing this, enabled the dto_timer by defaults.
> It doesn't see any I/O performance degression.
> In future, dwmmc controller should not use the quirks flag.
>
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
Applied this patch on my repository.
Best Regards,
Jaehoon Chung
> ---
> Changelog V2:
> - Added Shawn's Reviewed-by tag
>
> drivers/mmc/host/dw_mmc-rockchip.c | 3 ---
> drivers/mmc/host/dw_mmc.c | 16 +++++-----------
> include/linux/mmc/dw_mmc.h | 9 ---------
> 3 files changed, 5 insertions(+), 23 deletions(-)
>
> diff --git a/drivers/mmc/host/dw_mmc-rockchip.c b/drivers/mmc/host/dw_mmc-rockchip.c
> index 358b0dc..d3cf1f1 100644
> --- a/drivers/mmc/host/dw_mmc-rockchip.c
> +++ b/drivers/mmc/host/dw_mmc-rockchip.c
> @@ -285,9 +285,6 @@ static int dw_mci_rockchip_init(struct dw_mci *host)
> /* It is slot 8 on Rockchip SoCs */
> host->sdio_id0 = 8;
>
> - /* It needs this quirk on all Rockchip SoCs */
> - host->pdata->quirks |= DW_MCI_QUIRK_BROKEN_DTO;
> -
> if (of_device_is_compatible(host->dev->of_node,
> "rockchip,rk3288-dw-mshc"))
> host->bus_hz /= RK3288_CLKGEN_DIV;
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index 87f8529..5cf143b 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -1802,8 +1802,7 @@ static void dw_mci_tasklet_func(unsigned long priv)
> * If all data-related interrupts don't come
> * within the given time in reading data state.
> */
> - if ((host->quirks & DW_MCI_QUIRK_BROKEN_DTO) &&
> - (host->dir_status == DW_MCI_RECV_STATUS))
> + if (host->dir_status == DW_MCI_RECV_STATUS)
> dw_mci_set_drto(host);
> break;
> }
> @@ -1845,8 +1844,7 @@ static void dw_mci_tasklet_func(unsigned long priv)
> * interrupt doesn't come within the given time.
> * in reading data state.
> */
> - if ((host->quirks & DW_MCI_QUIRK_BROKEN_DTO) &&
> - (host->dir_status == DW_MCI_RECV_STATUS))
> + if (host->dir_status == DW_MCI_RECV_STATUS)
> dw_mci_set_drto(host);
> break;
> }
> @@ -2412,8 +2410,7 @@ static irqreturn_t dw_mci_interrupt(int irq, void *dev_id)
> }
>
> if (pending & SDMMC_INT_DATA_OVER) {
> - if (host->quirks & DW_MCI_QUIRK_BROKEN_DTO)
> - del_timer(&host->dto_timer);
> + del_timer(&host->dto_timer);
>
> mci_writel(host, RINTSTS, SDMMC_INT_DATA_OVER);
> if (!host->data_status)
> @@ -3004,11 +3001,8 @@ int dw_mci_probe(struct dw_mci *host)
> setup_timer(&host->cmd11_timer,
> dw_mci_cmd11_timer, (unsigned long)host);
>
> - host->quirks = host->pdata->quirks;
> -
> - if (host->quirks & DW_MCI_QUIRK_BROKEN_DTO)
> - setup_timer(&host->dto_timer,
> - dw_mci_dto_timer, (unsigned long)host);
> + setup_timer(&host->dto_timer,
> + dw_mci_dto_timer, (unsigned long)host);
>
> spin_lock_init(&host->lock);
> spin_lock_init(&host->irq_lock);
> diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h
> index f7ed271..83b0edfc 100644
> --- a/include/linux/mmc/dw_mmc.h
> +++ b/include/linux/mmc/dw_mmc.h
> @@ -112,7 +112,6 @@ struct dw_mci_dma_slave {
> * @part_buf: Simple buffer for partial fifo reads/writes.
> * @push_data: Pointer to FIFO push function.
> * @pull_data: Pointer to FIFO pull function.
> - * @quirks: Set of quirks that apply to specific versions of the IP.
> * @vqmmc_enabled: Status of vqmmc, should be true or false.
> * @irq_flags: The flags to be passed to request_irq.
> * @irq: The irq value to be passed to request_irq.
> @@ -218,9 +217,6 @@ struct dw_mci {
> void (*push_data)(struct dw_mci *host, void *buf, int cnt);
> void (*pull_data)(struct dw_mci *host, void *buf, int cnt);
>
> - /* Workaround flags */
> - u32 quirks;
> -
> bool vqmmc_enabled;
> unsigned long irq_flags; /* IRQ flags */
> int irq;
> @@ -242,17 +238,12 @@ struct dw_mci_dma_ops {
> void (*exit)(struct dw_mci *host);
> };
>
> -/* IP Quirks/flags. */
> -/* Timer for broken data transfer over scheme */
> -#define DW_MCI_QUIRK_BROKEN_DTO BIT(0)
> -
> struct dma_pdata;
>
> /* Board platform data */
> struct dw_mci_board {
> u32 num_slots;
>
> - u32 quirks; /* Workaround / Quirk flags */
> unsigned int bus_hz; /* Clock speed at the cclk_in pad */
>
> u32 caps; /* Capabilities */
>
prev parent reply other threads:[~2016-06-22 4:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20160621053541epcas1p3387b723d08d124864a03a3abe082821f@epcas1p3.samsung.com>
2016-06-21 5:35 ` [PATCH v2 1/3] mmc: dw_mmc: remove the quirks flags Jaehoon Chung
2016-06-21 5:35 ` [PATCH v2 2/3] mmc: dw_mmc: add the card write threshold for HS400 mode Jaehoon Chung
2016-06-21 8:05 ` Shawn Lin
2016-06-22 4:16 ` Jaehoon Chung
2016-06-21 5:35 ` [PATCH v2 3/3] mmc: dw_mmc: prevent to set the wrong value Jaehoon Chung
2016-06-21 8:13 ` Shawn Lin
2016-06-22 4:15 ` Jaehoon Chung
2016-06-22 4:16 ` Jaehoon Chung [this message]
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=576A111C.1040804@samsung.com \
--to=jh80.chung@samsung.com \
--cc=linux-mmc@vger.kernel.org \
--cc=shawn.lin@rock-chips.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