* [U-Boot-Users] how to use 'eeprom read' command
@ 2007-09-24 15:21 Sachin
2007-09-24 18:01 ` Jerry Van Baren
0 siblings, 1 reply; 3+ messages in thread
From: Sachin @ 2007-09-24 15:21 UTC (permalink / raw)
To: u-boot
Hi,
I want to read boot eeprom using u-boot.
Can you tell me which 'addr' I need to pass to the 'eeprom read' command?
--------------------------------------------------------------------------
=> help eeprom
eeprom read devaddr addr off cnt
eeprom write devaddr addr off cnt
- read/write `cnt' bytes from `devaddr` EEPROM at offset `off'
--------------------------------------------------------------------------
I want to access boot eprom which is at 'devaddr' 0x54 and offset '0' to
'10'.
But I am not clear what ro pass for the 'addr' argument.
Regards,
Sachin Rane
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot-Users] how to use 'eeprom read' command
2007-09-24 15:21 [U-Boot-Users] how to use 'eeprom read' command Sachin
@ 2007-09-24 18:01 ` Jerry Van Baren
2007-09-24 19:20 ` Stefan Roese
0 siblings, 1 reply; 3+ messages in thread
From: Jerry Van Baren @ 2007-09-24 18:01 UTC (permalink / raw)
To: u-boot
Sachin Rane, Alphion Communications wrote:
> Hi,
>
> I want to read boot eeprom using u-boot.
> Can you tell me which 'addr' I need to pass to the 'eeprom read' command?
>
> --------------------------------------------------------------------------
> => help eeprom
> eeprom read devaddr addr off cnt
> eeprom write devaddr addr off cnt
> - read/write `cnt' bytes from `devaddr` EEPROM at offset `off'
>
> --------------------------------------------------------------------------
>
> I want to access boot eprom which is at 'devaddr' 0x54 and offset '0' to
> '10'.
>
> But I am not clear what ro pass for the 'addr' argument.
>
> Regards,
> Sachin Rane
IIRC, "addr" is the memory (RAM) address that you read the eeprom data
into or is the source tow rite the eeprom data out. To read your i2c
device 0x54, you would do something like:
eeprom read 54 0 0 10
and then would be able to see the 16 bytes of data with the md command:
md 0
Hope I'm not lying,
gvb
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot-Users] how to use 'eeprom read' command
2007-09-24 18:01 ` Jerry Van Baren
@ 2007-09-24 19:20 ` Stefan Roese
0 siblings, 0 replies; 3+ messages in thread
From: Stefan Roese @ 2007-09-24 19:20 UTC (permalink / raw)
To: u-boot
On Monday 24 September 2007, Jerry Van Baren wrote:
> IIRC, "addr" is the memory (RAM) address that you read the eeprom data
> into or is the source tow rite the eeprom data out. To read your i2c
> device 0x54, you would do something like:
> eeprom read 54 0 0 10
> and then would be able to see the 16 bytes of data with the md command:
> md 0
>
> Hope I'm not lying,
No, you are correct. But I would suggest to not use RAM address 0, because on
some architectures the lower address range is reserved for exception vectors.
So please use:
=> eeprom read 54 100000 0 10
to read the first 16 (0x10) bytes to address 0x100000 (1MByte) in RAM.
Best regards,
Stefan
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-09-24 19:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-24 15:21 [U-Boot-Users] how to use 'eeprom read' command Sachin
2007-09-24 18:01 ` Jerry Van Baren
2007-09-24 19:20 ` Stefan Roese
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox