From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] mmc: omap_hsmmc: Check if MMC slot name is passed in pdata
Date: Tue, 26 Apr 2016 16:46:23 -0700 [thread overview]
Message-ID: <1461714383-9956-3-git-send-email-tony@atomide.com> (raw)
In-Reply-To: <1461714383-9956-1-git-send-email-tony@atomide.com>
The legacy user space for n900 relies on the MMC slot names.
Let's check if those are passed in pdata and use them.
Then when we have a generic MMC slot name binding we can
switch to use that assuming it works for the n900 legacy
user space too.
As this makes the DT booting compatible with legacy booting,
we should be able to start dropping omap3 legacy booting
support in v4.8.
Cc: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Kishon Vijay Abraham I <kishon@ti.com>
Cc: linux-mmc at vger.kernel.org
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
Ulf, this is safe to pick separately to the MMC tree if it looks
acceptable to you.
drivers/mmc/host/omap_hsmmc.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index e9d75c6..3563321 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -1946,13 +1946,17 @@ MODULE_DEVICE_TABLE(of, omap_mmc_of_match);
static struct omap_hsmmc_platform_data *of_get_hsmmc_pdata(struct device *dev)
{
- struct omap_hsmmc_platform_data *pdata;
+ struct omap_hsmmc_platform_data *pdata, *legacy;
struct device_node *np = dev->of_node;
pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
if (!pdata)
return ERR_PTR(-ENOMEM); /* out of memory */
+ legacy = dev_get_platdata(dev);
+ if (legacy && legacy->name)
+ pdata->name = legacy->name;
+
if (of_find_property(np, "ti,dual-volt", NULL))
pdata->controller_flags |= OMAP_HSMMC_SUPPORTS_DUAL_VOLT;
--
2.8.1
next prev parent reply other threads:[~2016-04-26 23:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-26 23:46 [PATCH 0/2] Pass n900 MMC slot names in pdata for legacy user space Tony Lindgren
2016-04-26 23:46 ` [PATCH 1/2] ARM: OMAP2+: n900 needs MMC slot names " Tony Lindgren
2016-04-27 8:48 ` Ulf Hansson
2016-04-27 14:17 ` Tony Lindgren
2016-05-02 7:05 ` Pavel Machek
2016-04-26 23:46 ` Tony Lindgren [this message]
2016-04-27 8:52 ` [PATCH 2/2] mmc: omap_hsmmc: Check if MMC slot name is passed in pdata Ulf Hansson
2016-04-27 14:17 ` Tony Lindgren
2016-04-28 20:33 ` [PATCH 0/2] Pass n900 MMC slot names in pdata for legacy user space Ivaylo Dimitrov
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=1461714383-9956-3-git-send-email-tony@atomide.com \
--to=tony@atomide.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).