mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Baruch Siach <baruch@tkos.co.il>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v2 3/6] imx iim: add mac address support
Date: Tue, 17 Aug 2010 08:52:58 +0200	[thread overview]
Message-ID: <20100817065258.GU27749@pengutronix.de> (raw)
In-Reply-To: <ba700c1797f3cc6fbf0427c53ac3183325129848.1281966840.git.baruch@tkos.co.il>

On Mon, Aug 16, 2010 at 05:10:35PM +0300, Baruch Siach wrote:
> ---
>  arch/arm/mach-imx/iim.c              |   22 +++++++++++++++++++++-
>  arch/arm/mach-imx/include/mach/iim.h |   13 +++++++++++++
>  2 files changed, 34 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/mach-imx/iim.c b/arch/arm/mach-imx/iim.c
> index 73369b7..9d14d35 100644
> --- a/arch/arm/mach-imx/iim.c
> +++ b/arch/arm/mach-imx/iim.c
> @@ -29,6 +29,8 @@
>  
>  #define DRIVERNAME	"imx_iim"
>  
> +static unsigned long mac_addr_base;
> +
>  static int do_fuse_sense(unsigned long reg_base, unsigned int bank,
>  		unsigned int row)
>  {
> @@ -224,6 +226,11 @@ static int imx_iim_blow_enable_set(struct device_d *dev, struct param_d *param,
>  
>  static int imx_iim_probe(struct device_d *dev)
>  {
> +	struct imx_iim_platform_data *pdata = dev->platform_data;
> +
> +	if (pdata)
> +		mac_addr_base = pdata->mac_addr_base;
> +
>  	return 0;
>  }
>  
> @@ -288,4 +295,17 @@ static int imx_iim_init(void)
>  
>  	return 0;
>  }
> -device_initcall(imx_iim_init);
> +coredevice_initcall(imx_iim_init);
> +
> +int imx_iim_get_mac(unsigned char *mac)
> +{
> +	int i;
> +
> +	if (mac_addr_base == 0)
> +		return -EINVAL;
> +
> +	for (i = 0; i < 6; i++)
> +		 mac[i] = readb(mac_addr_base + i*4);
> +
> +	return 0;
> +}
> diff --git a/arch/arm/mach-imx/include/mach/iim.h b/arch/arm/mach-imx/include/mach/iim.h
> index 6e13547..4d54cc0 100644
> --- a/arch/arm/mach-imx/include/mach/iim.h
> +++ b/arch/arm/mach-imx/include/mach/iim.h
> @@ -39,4 +39,17 @@
>  #define IIM_SCS2	0x0034
>  #define IIM_SCS3	0x0038
>  
> +struct imx_iim_platform_data {
> +	unsigned long	mac_addr_base;
> +};
> +
> +#ifdef CONFIG_IMX_IIM
> +int imx_iim_get_mac(unsigned char *mac);
> +#else
> +int imx_iim_get_mac(unsigned char *mac)

static inline please. Otherwise linking fails if this function gets a
second user.

Otherwise the series looks fine. Thanks for your work.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

  reply	other threads:[~2010-08-17  6:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-16 14:10 [PATCH v2 0/6] imx: support for the IIM fusebox Baruch Siach
2010-08-16 14:10 ` [PATCH v2 1/6] imx: move IIM registers to their own header Baruch Siach
2010-08-16 14:10 ` [PATCH v2 2/6] imx: driver for the IIM fusebox Baruch Siach
2010-08-16 14:10 ` [PATCH v2 3/6] imx iim: add mac address support Baruch Siach
2010-08-17  6:52   ` Sascha Hauer [this message]
2010-08-17  8:00     ` [PATCH v3] " Baruch Siach
2010-08-16 14:10 ` [PATCH v2 4/6] imx25: add chip specific IIM fusebox defines Baruch Siach
2011-03-03 15:13   ` Eric Benard
2011-03-03 15:31     ` Baruch Siach
2011-03-03 15:38       ` Eric Benard
2011-03-03 15:46       ` Sascha Hauer
2010-08-16 14:10 ` [PATCH v2 5/6] imx25: add iim platform code Baruch Siach
2010-08-16 14:10 ` [PATCH v2 6/6] fec_imx: add support for IIM stored mac address Baruch Siach
2010-08-17  8:01 ` [PATCH] iim/imx25: fix MAC and UID offsets Baruch Siach

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=20100817065258.GU27749@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=baruch@tkos.co.il \
    /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