]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
nvedit: speed up printing of environment
authorMike Frysinger <vapier@gentoo.org>
Sun, 24 May 2009 06:26:19 +0000 (02:26 -0400)
committerWolfgang Denk <wd@denx.de>
Fri, 12 Jun 2009 18:45:48 +0000 (20:45 +0200)
commit4c94f6c54bbc4dc5f418da01d8ec01e2adf636be
treefd2cda9d5f298aa359a1bf69dd19adfce1a4bc55
parent3112030a430553768de5d30c05bedf8710784452
nvedit: speed up printing of environment

The printing code would check the same environment byte multiple times and
write to the console one byte at a time.  For some devices (such as the
Blackfin JTAG console which operates in 8 bytes at a time), this is pretty
damned slow.  So create a small 16 byte buffer to fill up and send to puts
as needed.  In the process, unify the different print functions, shrink
the resulting code (source and compiled), and avoid excess env reads as
those too can be somewhat expensive depending on the board.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
common/cmd_nvedit.c