From: per.forlin@stericsson.com (Per Forlin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/5] MMC: mmci: Add generic Device Tree bindings to mmci core code
Date: Thu, 15 Mar 2012 16:12:21 +0100 [thread overview]
Message-ID: <CAFEEs1mQr4hDC6RuvchfWe7HNq67Eh2bPtwyWN-tukw32-V0rg@mail.gmail.com> (raw)
In-Reply-To: <1331734803-17954-4-git-send-email-lee.jones@linaro.org>
On Wed, Mar 14, 2012 at 3:20 PM, Lee Jones <lee.jones@linaro.org> wrote:
> This adds the necessary bindings for collection of shared
> attributes used in the mmci driver.
>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
> ?drivers/mmc/host/mmci.c | ? 43 +++++++++++++++++++++++++++++++++++++++++++
> ?1 files changed, 43 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
> index 23b41a5..9132ca8 100644
> --- a/drivers/mmc/host/mmci.c
> +++ b/drivers/mmc/host/mmci.c
> @@ -30,6 +30,7 @@
> ?#include <linux/dma-mapping.h>
> ?#include <linux/amba/mmci.h>
> ?#include <linux/pm_runtime.h>
> +#include <linux/of_gpio.h>
>
> ?#include <asm/div64.h>
> ?#include <asm/io.h>
> @@ -1056,11 +1057,47 @@ static const struct mmc_host_ops mmci_ops = {
> ? ? ? ?.get_cd ? ? ? ? = mmci_get_cd,
> ?};
>
> +#ifdef CONFIG_OF
> +static void mmci_dt_populate_generic_pdata(struct device_node *np,
> + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? struct mmci_platform_data *pdata)
> +{
> + ? ? ? const void *prop;
> + ? ? ? int len;
> +
> + ? ? ? of_property_read_u32(np, "wp-gpios", &pdata->gpio_wp);
> + ? ? ? if (!pdata->gpio_wp)
> + ? ? ? ? ? ? ? pdata->gpio_wp = -1;
> +
> + ? ? ? of_property_read_u32(np, "cd-gpios", &pdata->gpio_cd);
> + ? ? ? if (!pdata->gpio_cd)
> + ? ? ? ? ? ? ? pdata->gpio_cd = -1;
> +
> + ? ? ? if (of_get_property(np, "cd-invert", NULL))
> + ? ? ? ? ? ? ? pdata->cd_invert = true;
> + ? ? ? else
> + ? ? ? ? ? ? ? pdata->cd_invert = false;
> +
> + ? ? ? of_property_read_u32(np, "clock_frequency", &pdata->f_max);
> + ? ? ? if (!pdata->f_max)
> + ? ? ? ? ? ? ? pr_warning("%s has no 'clock_frequency' property\n", np->full_name);
> +
> + ? ? ? if (of_get_property(np, "mmc_cap_4_bit_data", NULL))
I have no previous experience with DT. Could you please bring some
light on this.
Is it really necessary to represent each bit in the CAP with a string?
To add CAP_ERASE for instance I need to change the code here and
update the DT, right?
BR
Per
next prev parent reply other threads:[~2012-03-15 15:12 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-14 14:19 [PATCH 0/5] MMC: mmci: Provide bindings for Device Tree Lee Jones
2012-03-14 14:19 ` [PATCH 1/5] MMC: mmci: Seperate ux500 variants from generic code Lee Jones
2012-03-14 14:20 ` [PATCH 2/5] MMC: mmci: Seperate ARM " Lee Jones
2012-03-15 17:32 ` Russell King - ARM Linux
2012-03-15 17:36 ` Lee Jones
2012-03-15 17:37 ` Russell King - ARM Linux
2012-03-15 17:46 ` Arnd Bergmann
2012-03-15 17:54 ` Russell King - ARM Linux
2012-03-15 18:23 ` Arnd Bergmann
2012-03-15 20:30 ` Russell King - ARM Linux
2012-03-16 12:48 ` Arnd Bergmann
2012-03-17 21:30 ` Mark Brown
2012-03-15 17:38 ` Lee Jones
2012-03-14 14:20 ` [PATCH 3/5] MMC: mmci: Add generic Device Tree bindings to mmci core code Lee Jones
2012-03-15 15:12 ` Per Forlin [this message]
2012-03-15 15:25 ` Lee Jones
2012-03-14 14:20 ` [PATCH 4/5] MMC: mmci: Enable Device Tree support for ux500 variants Lee Jones
2012-03-14 14:20 ` [PATCH 5/5] MMC: mmci: Add required documentation for Device Tree bindings Lee Jones
2012-03-15 17:35 ` Russell King - ARM Linux
2012-03-15 17:49 ` Arnd Bergmann
2012-03-15 17:58 ` Russell King - ARM Linux
2012-03-15 17:53 ` Arnd Bergmann
2012-03-15 17:59 ` Russell King - ARM Linux
2012-03-15 15:06 ` [PATCH 0/5] MMC: mmci: Provide bindings for Device Tree Per Forlin
2012-03-15 15:25 ` Lee Jones
2012-03-15 15:32 ` Arnd Bergmann
2012-03-15 15:44 ` Lee Jones
2012-03-15 19:12 ` Per Forlin
2012-03-15 20:36 ` Russell King - ARM Linux
2012-03-15 20:58 ` Arnd Bergmann
2012-03-16 9:01 ` Linus Walleij
2012-03-16 12:36 ` Arnd Bergmann
2012-03-17 21:26 ` Mark Brown
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=CAFEEs1mQr4hDC6RuvchfWe7HNq67Eh2bPtwyWN-tukw32-V0rg@mail.gmail.com \
--to=per.forlin@stericsson.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).