All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] Davinci: Make MAC address offset in EEPROM configurable, CONFIG_MAC_EEPROM_ADDR
Date: Thu, 31 Jan 2013 17:27:34 -0500	[thread overview]
Message-ID: <510AEFD6.3010302@ti.com> (raw)
In-Reply-To: <4014368E77617E44944113A4A656BD682856AAEB@VMPREVAS1.prevas.se>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 01/30/2013 03:10 AM, Kim B?ndergaard Poulsen wrote:
> Hi Tom
> 
> 
>> -----Original Message----- From: Tom Rini [mailto:trini at ti.com] 
>> Sent: 29. januar 2013 21:32 To: Kim B?ndergaard Poulsen Cc: 
>> u-boot at lists.denx.de; vapier at gentoo.org; manjunath.hadli at ti.com 
>> Subject: Re: [PATCH 1/2] Davinci: Make MAC address offset in 
>> EEPROM configurable, CONFIG_MAC_EEPROM_ADDR
>> 
> On 01/29/2013 02:28 AM, Kim B?ndergaard wrote:
>>>> --- arch/arm/cpu/arm926ejs/davinci/misc.c | 5 ++++- 1 file 
>>>> changed, 4 insertions(+), 1 deletion(-)
>>>> 
>>>> diff --git a/arch/arm/cpu/arm926ejs/davinci/misc.c 
>>>> b/arch/arm/cpu/arm926ejs/davinci/misc.c index 
>>>> c310c69..d0389a4 100644 --- 
>>>> a/arch/arm/cpu/arm926ejs/davinci/misc.c +++ 
>>>> b/arch/arm/cpu/arm926ejs/davinci/misc.c @@ -55,11 +55,14 @@ 
>>>> void dram_init_banksize(void) * Read ethernet MAC address 
>>>> from EEPROM for DVEVM compatible boards. * Returns 1 if 
>>>> found, 0 otherwise. */ +#ifndef CONFIG_MAC_EEPROM_ADDR 
>>>> +#define
> CONFIG_MAC_EEPROM_ADDR
>>>> 0x7F00 +#endif int dvevm_read_mac_address(uint8_t *buf) { 
>>>> #ifdef CONFIG_SYS_I2C_EEPROM_ADDR /* Read MAC address. */ - 
>>>> if (i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR, 0x7F00, +	if 
>>>> (i2c_read(CONFIG_SYS_I2C_EEPROM_ADDR,
> CONFIG_MAC_EEPROM_ADDR,
>>>> CONFIG_SYS_I2C_EEPROM_ADDR_LEN, (uint8_t *) &buf[0], 6))
>>>> goto i2cerr;
> 
> Lets use CONFIG_SYS_I2C_EEPROM_MAC_OFFSET and just set it in all
> of the davinci configs (yes, that's touching more files).  Thanks!
> 
> 
>> So what you suggest is to add a #define 
>> CONFIG_SYS_I2C_EEPROM_MAC_OFFSET 0x7F00
> 
>> in all DAVINCI related include/configs/*.h ?
> 
>> Also I assume you want me to remove the #ifdef 
>> CONFIG_SYS_I2C_EEPROM_MAC_OFFSET in misc.c?
> 
>> My only problem is that I don't know if it makes sense to define 
>> it for all boards
> 
>> grep -l DAVINCI * in include/configs gives me the following 
>> files: calimain.h cam_enc_4xx.h da830evm.h da850evm.h 
>> davinci_dm355evm.h davinci_dm355leopard.h davinci_dm365evm.h 
>> davinci_dm6467evm.h davinci_dvevm.h davinci_schmoogie.h 
>> davinci_sffsdr.h davinci_sonata.h ea20.h enbw_cmc.h hawkboard.h 
>> tnetv107x_evm.h
> 
>> Anyone who knows if they all have I2C eeproms

The subset of these with CONFIG_SYS_I2C_EEPROM set to start with,
should as they have been reading there already.  Cc'ing the various
board maintainers with the patch would be good.

- -- 
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJRCu/WAAoJENk4IS6UOR1WKBcP/3bE685l64rhKRGhsVp7zdsT
3XsD4oKMqIeFiHwiSiiS5PXuRibgt3h3aLgbbJnrhMGKBrXsDkEvb9Mjg3f/2yqg
duuWIiER6utP2WW16PzjwR5Y/RNjjttzBHfDKsZCOtoZqA8v2+MmnMNrcBZmGI48
foimzTD2VikxO63UElzX3vB83JyFkBaicNfk06vjE73wU2dRR1dnPi5+ufbyMp8r
ra9BI5++xVQHBmeZiGngRkO2tESll+L6L9HiTp3NNcNU3TWvV0675lwTnmXXHYy5
yoQHCI4wXQteBixPybp/903p3BhFbw8jRnAok0icSP2chcp8Dvjt8z8n29/JCxYZ
1ZOJdfbrPQXg68Un9+AQnXIoP1wby0ldkVnUfySVNL+ZzKXNA249idx8aY4s1V/K
8jBwP9xMhEaCVirP/DnLV3MetXNKy8hiE9pXqMUhuRn1xe3GwUGV4VUC0EgHJNfx
iK8Ne/p68Oeol8WHrWqG3gG9UMZgSzUqWKMSeSIILclLoo8DXLNRM2HM630rfgdA
E1MMzpBHPp4XB7RArlWXmibbh9A+ZLFraUZzCp75+OF3Ox0Tdn+vPKyMkf5qXV8w
WMZSKZBQbFI2xAYzi6YlcqBP2jC/6e2zOwFXvehQErRI51H5gLMsv0MoPnPx54t4
sUbq0r0V0EdaH2LCS2iM
=zDPr
-----END PGP SIGNATURE-----

  parent reply	other threads:[~2013-01-31 22:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-29  7:28 [U-Boot] [PATCH 0/2] Davinci: MAC address updates Kim Bøndergaard
2013-01-29  7:28 ` [U-Boot] [PATCH 1/2] Davinci: Make MAC address offset in EEPROM configurable, CONFIG_MAC_EEPROM_ADDR Kim Bøndergaard
2013-01-29 20:31   ` Tom Rini
     [not found]     ` <4014368E77617E44944113A4A656BD682856AAEB@VMPREVAS1.prevas.se>
2013-01-31 22:27       ` Tom Rini [this message]
2013-01-29  7:28 ` [U-Boot] [PATCH 2/2] Davinci: Fix, console output confusing while setting MAC address Kim Bøndergaard
  -- strict thread matches above, loose matches on Subject: below --
2013-01-22 13:19 [U-Boot] [PATCH 0/2] Davinci, MAC addr improvements Kim Bøndergaard
2013-01-22 13:19 ` [U-Boot] [PATCH 1/2] Davinci: Make MAC address offset in EEPROM configurable, CONFIG_MAC_EEPROM_ADDR Kim Bøndergaard

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=510AEFD6.3010302@ti.com \
    --to=trini@ti.com \
    --cc=u-boot@lists.denx.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.