From: magnus.damm@gmail.com (Magnus Damm)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/7] mmc: sh-mmcif: provide default allowed voltage
Date: Mon, 26 Nov 2012 13:06:26 +0900 [thread overview]
Message-ID: <CANqRtoT8yFx8fe0Fkmh6F91NxajgcPYmheSwpqKk4HtQkX6_pw@mail.gmail.com> (raw)
In-Reply-To: <1353889014-17142-2-git-send-email-horms@verge.net.au>
Hi Simon,
On Mon, Nov 26, 2012 at 9:16 AM, Simon Horman <horms@verge.net.au> wrote:
> Use MMC_VDD_165_195 as the allowed voltages in the absence of
> platform data. This should allow device tree to initialise MMCIF
> for a number of boards.
>
> A more complete solution would be to provide either MMCIF or MMC device
> try bindings to set the allowed voltages.
>
> Tested on the KZM-A9-GT board
>
> Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> Signed-off-by: Simon Horman <horms@verge.net.au>
> ---
> drivers/mmc/host/sh_mmcif.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
Thanks for your patch!
> diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
> index 11d2bc3..88d6866 100644
> --- a/drivers/mmc/host/sh_mmcif.c
> +++ b/drivers/mmc/host/sh_mmcif.c
> @@ -1293,12 +1293,9 @@ static void sh_mmcif_init_ocr(struct sh_mmcif_host *host)
>
> mmc_regulator_get_supply(mmc);
>
> - if (!pd)
> - return;
> -
> if (!mmc->ocr_avail)
> - mmc->ocr_avail = pd->ocr;
> - else if (pd->ocr)
> + mmc->ocr_avail = pd ? pd->ocr : MMC_VDD_165_195;
> + else if (pd && pd->ocr)
> dev_warn(mmc_dev(mmc), "Platform OCR mask is ignored\n");
> }
I may be mistaken, but I somehow thought that the code in
mmc_regulator_get_supply() would take care of this automatically for
us already. So this kind of patch isn't really needed as long as you
tie in regulators via DT as expected.
Thanks,
/ magnus
next prev parent reply other threads:[~2012-11-26 4:06 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-26 0:16 [PATCH 0/7] ARM: mach-shmobile: kzm9g: Reference DT implementation Simon Horman
2012-11-26 0:16 ` [PATCH 1/7] mmc: sh-mmcif: provide default allowed voltage Simon Horman
2012-11-26 4:06 ` Magnus Damm [this message]
2012-11-26 4:39 ` Simon Horman
2012-11-26 0:16 ` [PATCH 2/7] mmc: sdhi: enchance OF support for flags and cd-gpios Simon Horman
2012-11-26 10:16 ` Guennadi Liakhovetski
2012-11-26 10:18 ` Guennadi Liakhovetski
2012-11-26 0:16 ` [PATCH 3/7] sh: pfc: Allow device tree registration Simon Horman
2012-11-26 12:54 ` Laurent Pinchart
2012-11-27 0:07 ` Laurent Pinchart
2012-11-27 0:42 ` Simon Horman
2012-11-26 0:16 ` [PATCH 4/7] ARM: shmobile: pfc-sh73a0: Register device tree Simon Horman
2012-11-26 14:06 ` Laurent Pinchart
2012-11-27 3:36 ` Simon Horman
2012-11-26 0:16 ` [PATCH 5/7] ARM: mach-shmobile: sh73a0: Allow initialisation of GIC by DT Simon Horman
2012-11-26 0:16 ` [PATCH 6/7] ARM: mach-shmobile: sh73a0: Minimal setup using DT Simon Horman
2012-11-26 4:23 ` Magnus Damm
2012-11-26 4:58 ` Simon Horman
2012-11-26 12:53 ` Laurent Pinchart
2012-11-27 0:32 ` Simon Horman
2012-11-26 0:16 ` [PATCH 7/7] ARM: mach-shmobile: kzm9g: Reference DT implementation Simon Horman
2012-11-26 8:34 ` Tetsuyuki Kobayashi
2012-11-27 0:33 ` Simon Horman
2012-11-26 6:10 ` [PATCH 0/7] " Tetsuyuki Kobayashi
2012-11-27 0:32 ` Simon Horman
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=CANqRtoT8yFx8fe0Fkmh6F91NxajgcPYmheSwpqKk4HtQkX6_pw@mail.gmail.com \
--to=magnus.damm@gmail.com \
--cc=linux-arm-kernel@lists.infradead.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).