From: Wolfgang Denk Date: Fri, 05 Jun 2009 00:18:59 +0200 Subject: [U-Boot] [PATCH] nvedit: speed up printing of environment In-Reply-To: <1243146379-5699-1-git-send-email-vapier@gentoo.org> References: <1243146379-5699-1-git-send-email-vapier@gentoo.org> Message-ID: <20090604221859.B9150832E416@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Mike Frysinger, In message <1243146379-5699-1-git-send-email-vapier@gentoo.org> you wrote: > 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 > --- > common/cmd_nvedit.c | 94 ++++++++++++++++++++++++++++++--------------------- > 1 files changed, 55 insertions(+), 39 deletions(-) Applied to next, thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Swap read error. You lose your mind.