From: Vincent Yang <Vincent.Yang@tw.fujitsu.com> To: linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: andy.green@linaro.org, patches@linaro.org, jaswinder.singh@linaro.org, arnd@arndb.de, olof@lixom.net, linux@arm.linux.org.uk, chris@printf.net, anton@enomsg.org, t.takinishi@jp.fujitsu.com, mollie.wu@linaro.org, Vincent.Yang@tw.fujitsu.com Subject: [PATCH 2/4] mmc: sdhci: add quirk for tuning work around Date: Sun, 13 Jul 2014 13:21:08 +0800 [thread overview] Message-ID: <1405228870-5088-3-git-send-email-Vincent.Yang@tw.fujitsu.com> (raw) In-Reply-To: <1405228870-5088-1-git-send-email-Vincent.Yang@tw.fujitsu.com> This patch defines a quirk for tuning work around for some sdhci host controller. It sets both SDHCI_CTRL_EXEC_TUNING and SDHCI_CTRL_TUNED_CLK for tuning. It is a preparation and will be used by Fujitsu SDHCI controller f_sdh30 driver. Signed-off-by: Vincent Yang <Vincent.Yang@tw.fujitsu.com> --- drivers/mmc/host/sdhci.c | 2 ++ include/linux/mmc/sdhci.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index d62262b..900b4e4 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -1867,6 +1867,8 @@ static int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode) ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2); ctrl |= SDHCI_CTRL_EXEC_TUNING; + if (host->quirks2 & SDHCI_QUIRK2_TUNING_WORK_AROUND) + ctrl |= SDHCI_CTRL_TUNED_CLK; sdhci_writew(host, ctrl, SDHCI_HOST_CONTROL2); /* diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h index 5433f04..bcbad45 100644 --- a/include/linux/mmc/sdhci.h +++ b/include/linux/mmc/sdhci.h @@ -100,6 +100,8 @@ struct sdhci_host { #define SDHCI_QUIRK2_BROKEN_DDR50 (1<<7) /* Do a callback when switching voltages so do controller-specific actions */ #define SDHCI_QUIRK2_VOLTAGE_SWITCH (1<<8) +/* forced tuned clock */ +#define SDHCI_QUIRK2_TUNING_WORK_AROUND (1<<9) int irq; /* Device IRQ */ void __iomem *ioaddr; /* Mapped address */ -- 1.9.0
WARNING: multiple messages have this Message-ID (diff)
From: Vincent.Yang@tw.fujitsu.com (Vincent Yang) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/4] mmc: sdhci: add quirk for tuning work around Date: Sun, 13 Jul 2014 13:21:08 +0800 [thread overview] Message-ID: <1405228870-5088-3-git-send-email-Vincent.Yang@tw.fujitsu.com> (raw) In-Reply-To: <1405228870-5088-1-git-send-email-Vincent.Yang@tw.fujitsu.com> This patch defines a quirk for tuning work around for some sdhci host controller. It sets both SDHCI_CTRL_EXEC_TUNING and SDHCI_CTRL_TUNED_CLK for tuning. It is a preparation and will be used by Fujitsu SDHCI controller f_sdh30 driver. Signed-off-by: Vincent Yang <Vincent.Yang@tw.fujitsu.com> --- drivers/mmc/host/sdhci.c | 2 ++ include/linux/mmc/sdhci.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index d62262b..900b4e4 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -1867,6 +1867,8 @@ static int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode) ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2); ctrl |= SDHCI_CTRL_EXEC_TUNING; + if (host->quirks2 & SDHCI_QUIRK2_TUNING_WORK_AROUND) + ctrl |= SDHCI_CTRL_TUNED_CLK; sdhci_writew(host, ctrl, SDHCI_HOST_CONTROL2); /* diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h index 5433f04..bcbad45 100644 --- a/include/linux/mmc/sdhci.h +++ b/include/linux/mmc/sdhci.h @@ -100,6 +100,8 @@ struct sdhci_host { #define SDHCI_QUIRK2_BROKEN_DDR50 (1<<7) /* Do a callback when switching voltages so do controller-specific actions */ #define SDHCI_QUIRK2_VOLTAGE_SWITCH (1<<8) +/* forced tuned clock */ +#define SDHCI_QUIRK2_TUNING_WORK_AROUND (1<<9) int irq; /* Device IRQ */ void __iomem *ioaddr; /* Mapped address */ -- 1.9.0
next prev parent reply other threads:[~2014-07-13 5:23 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-07-13 5:21 [PATCH 0/4] mmc: sdhci: adding support for a new Fujitsu sdhci IP Vincent Yang 2014-07-13 5:21 ` Vincent Yang 2014-07-13 5:21 ` [PATCH 1/4] mmc: sdhci: add quirk for voltage switch callback Vincent Yang 2014-07-13 5:21 ` Vincent Yang 2014-07-13 8:21 ` Russell King - ARM Linux 2014-07-13 8:21 ` Russell King - ARM Linux 2014-07-13 9:44 ` Vincent.Yang 2014-07-13 9:44 ` Vincent.Yang 2014-07-13 5:21 ` Vincent Yang [this message] 2014-07-13 5:21 ` [PATCH 2/4] mmc: sdhci: add quirk for tuning work around Vincent Yang 2014-07-13 5:21 ` [PATCH 3/4] mmc: sdhci: add quirk for single block transactions Vincent Yang 2014-07-13 5:21 ` Vincent Yang 2014-07-13 5:21 ` [PATCH 4/4] mmc: core: hold SD Clock before CMD11 during Signal Vincent Yang 2014-07-13 5:21 ` Vincent Yang 2014-07-13 8:30 ` Russell King - ARM Linux 2014-07-13 8:30 ` Russell King - ARM Linux 2014-07-13 9:49 ` Vincent.Yang 2014-07-13 9:49 ` Vincent.Yang
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=1405228870-5088-3-git-send-email-Vincent.Yang@tw.fujitsu.com \ --to=vincent.yang@tw.fujitsu.com \ --cc=andy.green@linaro.org \ --cc=anton@enomsg.org \ --cc=arnd@arndb.de \ --cc=chris@printf.net \ --cc=jaswinder.singh@linaro.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-mmc@vger.kernel.org \ --cc=linux@arm.linux.org.uk \ --cc=mollie.wu@linaro.org \ --cc=olof@lixom.net \ --cc=patches@linaro.org \ --cc=t.takinishi@jp.fujitsu.com \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.