mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: Uwe Kleine-K??nig <u.kleine-koenig@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] mci: mxs: support overwriting the device name via platform data
Date: Thu, 7 Nov 2013 17:04:24 +0100	[thread overview]
Message-ID: <20131107160424.GL26639@ns203013.ovh.net> (raw)
In-Reply-To: <1383821462-29348-1-git-send-email-u.kleine-koenig@pengutronix.de>

On 11:51 Thu 07 Nov     , Uwe Kleine-K??nig wrote:
> The current implementation of the bootloader specification depends on the
> hardware name and the name of the device in /dev to match. As the default
> hardware name is mciX and the device name is diskY the bootloader spec
> cannot be used as is.
> 
> This patch implements a way to overwrite the device name similar to what is
> possible for the imx-esdhc driver.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  arch/arm/mach-mxs/include/mach/mci.h | 1 +
>  drivers/mci/mxs.c                    | 3 +++
>  include/mci.h                        | 2 +-
>  3 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/mach-mxs/include/mach/mci.h b/arch/arm/mach-mxs/include/mach/mci.h
> index 4faab37..c47c24c 100644
> --- a/arch/arm/mach-mxs/include/mach/mci.h
> +++ b/arch/arm/mach-mxs/include/mach/mci.h
> @@ -15,6 +15,7 @@
>  #define __MACH_MMC_H
>  
>  struct mxs_mci_platform_data {
> +	const char *devname;
>  	unsigned caps;	/**< supported operating modes (MMC_MODE_*) */
>  	unsigned voltages; /**< supported voltage range (MMC_VDD_*) */
>  	unsigned f_min;	/**< min operating frequency in Hz (0 -> no limit) */
> diff --git a/drivers/mci/mxs.c b/drivers/mci/mxs.c
> index 1b935f7..52d0656 100644
> --- a/drivers/mci/mxs.c
> +++ b/drivers/mci/mxs.c
> @@ -571,6 +571,9 @@ static int mxs_mci_probe(struct device_d *hw_dev)
>  	host->voltages = pd->voltages;
>  	host->host_caps = pd->caps;
>  
> +	if (pd->devname)
> +		host->devname = pd->devname;

why bother to test it?

Best Regards,
J.

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2013-11-07 16:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-07 10:51 Uwe Kleine-König
2013-11-07 16:04 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2013-11-08  0:11   ` Uwe Kleine-König
2013-11-11 10:16     ` Sascha Hauer

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=20131107160424.GL26639@ns203013.ovh.net \
    --to=plagnioj@jcrosoft.com \
    --cc=barebox@lists.infradead.org \
    --cc=u.kleine-koenig@pengutronix.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