diff mbox

[1/2] ARM: OMAP2+: n900 needs MMC slot names for legacy user space

Message ID 1461714383-9956-2-git-send-email-tony@atomide.com (mailing list archive)
State New, archived
Headers show

Commit Message

Tony Lindgren April 26, 2016, 11:46 p.m. UTC
Let's pass the slot names in pdata like the legacy code does.
Once we have a generic DT binding for the slot names we can
switch to that.

Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/pdata-quirks.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Ulf Hansson April 27, 2016, 8:48 a.m. UTC | #1
On 27 April 2016 at 01:46, Tony Lindgren <tony@atomide.com> wrote:
> Let's pass the slot names in pdata like the legacy code does.
> Once we have a generic DT binding for the slot names we can
> switch to that.

I am not sure we ever will get a DT binding accepted for the slot
name. It seem far from being a HW description. :-)

Instead, the long term and proper solution, is to enable userspace to
be able to use UUID/PARTID instead.

Until that happens, I guess this will have to do.

Kind regards
Uffe

>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>  arch/arm/mach-omap2/pdata-quirks.c | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
> index a935d28..cfaf45f 100644
> --- a/arch/arm/mach-omap2/pdata-quirks.c
> +++ b/arch/arm/mach-omap2/pdata-quirks.c
> @@ -21,6 +21,7 @@
>  #include <linux/regulator/fixed.h>
>
>  #include <linux/platform_data/pinctrl-single.h>
> +#include <linux/platform_data/hsmmc-omap.h>
>  #include <linux/platform_data/iommu-omap.h>
>  #include <linux/platform_data/wkup_m3.h>
>  #include <linux/platform_data/pwm_omap_dmtimer.h>
> @@ -35,6 +36,8 @@
>  #include "soc.h"
>  #include "hsmmc.h"
>
> +static struct __maybe_unused omap_hsmmc_platform_data mmc_pdata[2];
> +
>  struct pdata_init {
>         const char *compatible;
>         void (*fn)(void);
> @@ -271,6 +274,8 @@ static struct platform_device omap3_rom_rng_device = {
>  static void __init nokia_n900_legacy_init(void)
>  {
>         hsmmc2_internal_input_clk();
> +       mmc_pdata[0].name = "external";
> +       mmc_pdata[1].name = "internal";
>
>         if (omap_type() == OMAP2_DEVICE_TYPE_SEC) {
>                 if (IS_ENABLED(CONFIG_ARM_ERRATA_430973)) {
> @@ -497,6 +502,8 @@ static struct of_dev_auxdata omap_auxdata_lookup[] __initdata = {
>         OF_DEV_AUXDATA("ti,omap3-padconf", 0x48002a00, "48002a00.pinmux", &pcs_pdata),
>         OF_DEV_AUXDATA("ti,omap2-iommu", 0x5d000000, "5d000000.mmu",
>                        &omap3_iommu_pdata),
> +       OF_DEV_AUXDATA("ti,omap3-hsmmc", 0x4809c000, "4809c000.mmc", &mmc_pdata[0]),
> +       OF_DEV_AUXDATA("ti,omap3-hsmmc", 0x480b4000, "480b4000.mmc", &mmc_pdata[1]),
>         /* Only on am3517 */
>         OF_DEV_AUXDATA("ti,davinci_mdio", 0x5c030000, "davinci_mdio.0", NULL),
>         OF_DEV_AUXDATA("ti,am3517-emac", 0x5c000000, "davinci_emac.0",
> --
> 2.8.1
>
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Tony Lindgren April 27, 2016, 2:17 p.m. UTC | #2
* Ulf Hansson <ulf.hansson@linaro.org> [160427 01:50]:
> On 27 April 2016 at 01:46, Tony Lindgren <tony@atomide.com> wrote:
> > Let's pass the slot names in pdata like the legacy code does.
> > Once we have a generic DT binding for the slot names we can
> > switch to that.
> 
> I am not sure we ever will get a DT binding accepted for the slot
> name. It seem far from being a HW description. :-)

Hmm it does describe where on the the device the MMC is
located though as in "external" or "internal".

> Instead, the long term and proper solution, is to enable userspace to
> be able to use UUID/PARTID instead.

OK.

> Until that happens, I guess this will have to do.

Yeah especially as that has been working with the legacy booting
for years.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Pavel Machek May 2, 2016, 7:05 a.m. UTC | #3
On Tue 2016-04-26 16:46:22, Tony Lindgren wrote:
> Let's pass the slot names in pdata like the legacy code does.
> Once we have a generic DT binding for the slot names we can
> switch to that.
> 
> Signed-off-by: Tony Lindgren <tony@atomide.com>

Acked-by: Pavel Machek <pavel@ucw.cz>
diff mbox

Patch

diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c
index a935d28..cfaf45f 100644
--- a/arch/arm/mach-omap2/pdata-quirks.c
+++ b/arch/arm/mach-omap2/pdata-quirks.c
@@ -21,6 +21,7 @@ 
 #include <linux/regulator/fixed.h>
 
 #include <linux/platform_data/pinctrl-single.h>
+#include <linux/platform_data/hsmmc-omap.h>
 #include <linux/platform_data/iommu-omap.h>
 #include <linux/platform_data/wkup_m3.h>
 #include <linux/platform_data/pwm_omap_dmtimer.h>
@@ -35,6 +36,8 @@ 
 #include "soc.h"
 #include "hsmmc.h"
 
+static struct __maybe_unused omap_hsmmc_platform_data mmc_pdata[2];
+
 struct pdata_init {
 	const char *compatible;
 	void (*fn)(void);
@@ -271,6 +274,8 @@  static struct platform_device omap3_rom_rng_device = {
 static void __init nokia_n900_legacy_init(void)
 {
 	hsmmc2_internal_input_clk();
+	mmc_pdata[0].name = "external";
+	mmc_pdata[1].name = "internal";
 
 	if (omap_type() == OMAP2_DEVICE_TYPE_SEC) {
 		if (IS_ENABLED(CONFIG_ARM_ERRATA_430973)) {
@@ -497,6 +502,8 @@  static struct of_dev_auxdata omap_auxdata_lookup[] __initdata = {
 	OF_DEV_AUXDATA("ti,omap3-padconf", 0x48002a00, "48002a00.pinmux", &pcs_pdata),
 	OF_DEV_AUXDATA("ti,omap2-iommu", 0x5d000000, "5d000000.mmu",
 		       &omap3_iommu_pdata),
+	OF_DEV_AUXDATA("ti,omap3-hsmmc", 0x4809c000, "4809c000.mmc", &mmc_pdata[0]),
+	OF_DEV_AUXDATA("ti,omap3-hsmmc", 0x480b4000, "480b4000.mmc", &mmc_pdata[1]),
 	/* Only on am3517 */
 	OF_DEV_AUXDATA("ti,davinci_mdio", 0x5c030000, "davinci_mdio.0", NULL),
 	OF_DEV_AUXDATA("ti,am3517-emac", 0x5c000000, "davinci_emac.0",