From: Detlev Zundel <dzu@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] added i2c read function
Date: Fri, 19 Feb 2010 16:35:19 +0100 [thread overview]
Message-ID: <m2zl3544so.fsf@ohwell.denx.de> (raw)
In-Reply-To: <ac9c93b11002190617v6679820dof71cf9995772676f@mail.gmail.com> (Frans Meulenbroeks's message of "Fri, 19 Feb 2010 15:17:51 +0100")
Hi Frans,
> The patch below adds a command i2c read which reads from i2c to memory.
Thanks for picking up the hint! ;)
> 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).
Well actually if you _do_ touch this place, why not convert it to use
cmd_tbl which does all this handling for you? For an example, look at
common/cmd_bootm.c around line 465.
> 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.
Even after manually stripping the header and the introductory text, the
patch is damaged:
[dzu at pollux u-boot-testing (master)]$ git am ~/p01
Applying: cmd_i2c.c: added command to read to memory
fatal: corrupt patch at line 75
Patch failed at 0001 cmd_i2c.c: added command to read to memory
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".
Cheers
Detlev
--
Programming X-Windows is like trying to find the square root of pi
using roman numerals.
-- The UNIX Haters Handbook
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
prev parent reply other threads:[~2010-02-19 15:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.5361.1266585700.8190.u-boot@lists.denx.de>
2010-02-19 14:17 ` [U-Boot] [PATCH] added i2c read function Frans Meulenbroeks
2010-02-19 15:35 ` Detlev Zundel [this message]
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=m2zl3544so.fsf@ohwell.denx.de \
--to=dzu@denx.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox