[U-Boot] [PATCH] added i2c read function

Frans Meulenbroeks fransmeulenbroeks at gmail.com
Fri Feb 19 15:17:51 CET 2010


Dear all,

The patch below adds a command i2c read which reads from i2c to memory.

That way the value read can be used in later itest commands to control
the boot process.

I've tried to stay as close as possible to the i2c md command as far
as command syntax concerns.
main differences wrt the command syntax:

- length is mandatory
- additional argument memaddr
- no repeat possibility (it didn't seem too useful to me and only uses bytes)

While doing so I also have expanded the subcommand names to their full
length instead of going to two character abbreviations
(otherwise read and reset would clash). I saw other places also use
longer commands.

(actually personally I would have used strcmp instead of strncmp, but
it seems most other files in common use strncmp, so I left that part
as is).

Feel free to comment.

Frans

PS: unfortunately git send-email does not pass our corp firewall and
doing the patch as attachement is rejected by the mailing list.
If there are problems with the patch, just drop me a note and I'll
resend from home.

Frans.



More information about the U-Boot mailing list