From: Vincent Yang <vincent.yang.fujitsu@gmail.com> To: linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: ulf.hansson@linaro.org, andy.green@linaro.org, linux@arm.linux.org.uk, patches@linaro.org, chris@printf.net, Vincent Yang <Vincent.Yang@tw.fujitsu.com>, jaswinder.singh@linaro.org Subject: [PATCH v3 1/4] mmc: sdhci: add a voltage switch callback function Date: Fri, 9 Jan 2015 19:41:42 +0800 [thread overview] Message-ID: <1420803705-4539-2-git-send-email-Vincent.Yang@tw.fujitsu.com> (raw) In-Reply-To: <1420803705-4539-1-git-send-email-Vincent.Yang@tw.fujitsu.com> This patch adds a callback function to do controller-specific actions when switching voltages. 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 | 4 ++++ drivers/mmc/host/sdhci.h | 1 + 2 files changed, 5 insertions(+) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index cbb245b..cd1f311 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -1827,6 +1827,10 @@ static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host, ctrl |= SDHCI_CTRL_VDD_180; sdhci_writew(host, ctrl, SDHCI_HOST_CONTROL2); + /* Some controller need to do more when switching */ + if (host->ops->voltage_switch) + host->ops->voltage_switch(host); + /* 1.8V regulator output should be stable within 5 ms */ ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2); if (ctrl & SDHCI_CTRL_VDD_180) diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index 41a2c34..0315e18 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -339,6 +339,7 @@ struct sdhci_ops { void (*adma_workaround)(struct sdhci_host *host, u32 intmask); void (*platform_init)(struct sdhci_host *host); void (*card_event)(struct sdhci_host *host); + void (*voltage_switch)(struct sdhci_host *host); }; #ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS -- 1.9.0
WARNING: multiple messages have this Message-ID (diff)
From: vincent.yang.fujitsu@gmail.com (Vincent Yang) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 1/4] mmc: sdhci: add a voltage switch callback function Date: Fri, 9 Jan 2015 19:41:42 +0800 [thread overview] Message-ID: <1420803705-4539-2-git-send-email-Vincent.Yang@tw.fujitsu.com> (raw) In-Reply-To: <1420803705-4539-1-git-send-email-Vincent.Yang@tw.fujitsu.com> This patch adds a callback function to do controller-specific actions when switching voltages. 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 | 4 ++++ drivers/mmc/host/sdhci.h | 1 + 2 files changed, 5 insertions(+) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index cbb245b..cd1f311 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -1827,6 +1827,10 @@ static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host, ctrl |= SDHCI_CTRL_VDD_180; sdhci_writew(host, ctrl, SDHCI_HOST_CONTROL2); + /* Some controller need to do more when switching */ + if (host->ops->voltage_switch) + host->ops->voltage_switch(host); + /* 1.8V regulator output should be stable within 5 ms */ ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2); if (ctrl & SDHCI_CTRL_VDD_180) diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index 41a2c34..0315e18 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -339,6 +339,7 @@ struct sdhci_ops { void (*adma_workaround)(struct sdhci_host *host, u32 intmask); void (*platform_init)(struct sdhci_host *host); void (*card_event)(struct sdhci_host *host); + void (*voltage_switch)(struct sdhci_host *host); }; #ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS -- 1.9.0
next prev parent reply other threads:[~2015-01-09 11:41 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-01-09 11:41 [PATCH v3 0/4] mmc: sdhci: adding support for a new Fujitsu sdhci IP Vincent Yang 2015-01-09 11:41 ` Vincent Yang 2015-01-09 11:41 ` Vincent Yang [this message] 2015-01-09 11:41 ` [PATCH v3 1/4] mmc: sdhci: add a voltage switch callback function Vincent Yang 2015-01-09 11:41 ` [PATCH v3 2/4] mmc: sdhci: add a quirk for tuning work around Vincent Yang 2015-01-09 11:41 ` Vincent Yang 2015-01-09 11:41 ` [PATCH v3 3/4] mmc: sdhci: add a quirk for single block transactions Vincent Yang 2015-01-09 11:41 ` Vincent Yang 2015-01-09 11:41 ` [PATCH v3 4/4] mmc: sdhci: host: add new f_sdh30 Vincent Yang 2015-01-09 11:41 ` Vincent Yang 2015-01-13 12:19 ` Ulf Hansson 2015-01-13 12:19 ` Ulf Hansson 2015-01-16 3:33 ` Vincent Yang 2015-01-16 3:33 ` Vincent Yang 2015-01-16 8:36 ` Ulf Hansson 2015-01-16 8:36 ` Ulf Hansson 2015-01-16 17:09 ` Vincent Yang 2015-01-16 17:09 ` 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=1420803705-4539-2-git-send-email-Vincent.Yang@tw.fujitsu.com \ --to=vincent.yang.fujitsu@gmail.com \ --cc=Vincent.Yang@tw.fujitsu.com \ --cc=andy.green@linaro.org \ --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=patches@linaro.org \ --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: 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.