From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/7] mmc: uniphier-sd: Properly handle pin voltage configuration
Date: Tue, 16 Jan 2018 18:13:24 +0100 [thread overview]
Message-ID: <e2d2338b-15b2-d563-2f62-09cb3ac3446c@gmail.com> (raw)
In-Reply-To: <c8d30131-a17c-9b75-e4eb-d09b9043e4e2@samsung.com>
On 01/12/2018 10:15 AM, Jaehoon Chung wrote:
> On 01/07/2018 04:29 AM, Marek Vasut wrote:
>> Factor out the regulator handling into set_ios and add support for
>> selecting pin configuration based on the voltage to support UHS modes.
>>
>> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
>> Cc: Jaehoon Chung <jh80.chung@samsung.com>
>> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
>> ---
>> drivers/mmc/uniphier-sd.c | 33 ++++++++++++++++++++++++---------
>> 1 file changed, 24 insertions(+), 9 deletions(-)
>>
>> diff --git a/drivers/mmc/uniphier-sd.c b/drivers/mmc/uniphier-sd.c
>> index 552e37d852..ebcc12a8ae 100644
>> --- a/drivers/mmc/uniphier-sd.c
>> +++ b/drivers/mmc/uniphier-sd.c
>> @@ -10,6 +10,7 @@
>> #include <fdtdec.h>
>> #include <mmc.h>
>> #include <dm.h>
>> +#include <dm/pinctrl.h>
>> #include <linux/compat.h>
>> #include <linux/dma-direction.h>
>> #include <linux/io.h>
>> @@ -134,6 +135,9 @@ struct uniphier_sd_priv {
>> #define UNIPHIER_SD_CAP_DMA_INTERNAL BIT(1) /* have internal DMA engine */
>> #define UNIPHIER_SD_CAP_DIV1024 BIT(2) /* divisor 1024 is available */
>> #define UNIPHIER_SD_CAP_64BIT BIT(3) /* Controller is 64bit */
>> +#ifdef CONFIG_DM_REGULATOR
>> + struct udevice *vqmmc_dev;
>> +#endif
>> };
>>
>> static u64 uniphier_sd_readq(struct uniphier_sd_priv *priv, unsigned int reg)
>> @@ -676,6 +680,24 @@ static void uniphier_sd_set_clk_rate(struct uniphier_sd_priv *priv,
>> udelay(1000);
>> }
>>
>> +static void uniphier_sd_set_pins(struct udevice *dev)
>> +{
>> + struct uniphier_sd_priv *priv = dev_get_priv(dev);
>> + struct mmc *mmc = mmc_get_mmc_dev(dev);
>> +
>> + if (priv->vqmmc_dev) {
>
> You added #ifdef CONFIG_DM_REGULATOR in struct uniphier_sd_priv.
> If CONFIG_DM_REGULATOR is disabled, it can't refer the vqmmc_dev.?
Oh, thanks. V2 is coming.
--
Best regards,
Marek Vasut
next prev parent reply other threads:[~2018-01-16 17:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-06 19:29 [U-Boot] [PATCH 1/7] mmc: uniphier-sd: Use mmc_of_parse() Marek Vasut
2018-01-06 19:29 ` [U-Boot] [PATCH 2/7] mmc: uniphier-sd: Properly handle pin voltage configuration Marek Vasut
2018-01-12 9:15 ` Jaehoon Chung
2018-01-16 17:13 ` Marek Vasut [this message]
2018-01-06 19:29 ` [U-Boot] [PATCH 3/7] mmc: uniphier-sd: Add Renesas RCar quirks Marek Vasut
2018-01-06 19:29 ` [U-Boot] [PATCH 4/7] mmc: uniphier-sd: Handle Renesas div-by-1 Marek Vasut
2018-01-06 19:29 ` [U-Boot] [PATCH 5/7] mmc: uniphier-sd: Add Renesas SDR104/HS200 tuning support Marek Vasut
2018-01-06 19:29 ` [U-Boot] [PATCH 6/7] mmc: uniphier-sd: Handle DMA completion flag differences Marek Vasut
2018-01-06 19:29 ` [U-Boot] [PATCH 7/7] mmc: uniphier-sd: Always check controller version Marek Vasut
2018-01-06 19:39 ` [U-Boot] [PATCH 1/7] mmc: uniphier-sd: Use mmc_of_parse() Marek Vasut
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=e2d2338b-15b2-d563-2f62-09cb3ac3446c@gmail.com \
--to=marek.vasut@gmail.com \
--cc=u-boot@lists.denx.de \
/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