From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Mon, 3 Oct 2011 22:30:41 -0700 Subject: [U-Boot] [PATCH V5] console: Implement pre-console buffer In-Reply-To: References: <1314874107-10146-1-git-send-email-graeme.russ@gmail.com> <1314874326-10231-1-git-send-email-graeme.russ@gmail.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Graeme, On Wed, Sep 21, 2011 at 4:18 PM, Simon Glass wrote: > Hi Graeme, > > On Thu, Sep 1, 2011 at 3:52 AM, Graeme Russ wrote: > > Allow redirection of console output prior to console initialisation to a > > temporary buffer. > > > > To enable this functionality, the board (or arch) must define: > > - CONFIG_PRE_CONSOLE_BUFFER - Enable pre-console buffer > > - CONFIG_PRE_CON_BUF_ADDR - Base address of pre-console buffer > > - CONFIG_PRE_CON_BUF_SZ - Size of pre-console buffer (in bytes) > > > > The pre-console buffer will buffer the last CONFIG_PRE_CON_BUF_SZ bytes > > Any earlier characters are silently dropped. > > > > Signed-off-by: Graeme Russ > > I tested this on a Tegra2 Seaboard. > > Tested-by: Simon Glass > Further to this, I pushed it a little further and managed to get early console output from the AVP (an ARM7) before the Cortex-A9s are fired up on a Tegra20/30. That's pretty early! This is a great patch and very useful for early bring-up I think. I hope it will be merged this window. Any other comments? Regards, Simon > > Regards, > Simon > > > --- > > Grrrr - Repost of V5 with an SoB. There has to be a better way of > > automating patch updates ;) > > > > Changes since V4 > > - Fixed typo in README > > - Made *pre_console* functions in console.c static > > - Slight tweak to commit message - Some may choose to set the > > configuration defines at the arch level > > > > Changes since V3 > > - Fixed blank subject caused by gap between the Cc: list and Date: > > > > Changes since V2 > > - Cast buffer size to unsigned long to help compilers produce tighter > > code > > - Use inline stub functions to reduce #ifdef clutter > > - Add documentation to README > > > > Changes Since V1 > > - Implemented circular buffer > > - Trivial code styl corrections > > > > --- > > README | 14 +++++++++ > > arch/arm/include/asm/global_data.h | 3 ++ > > arch/avr32/include/asm/global_data.h | 3 ++ > > arch/blackfin/include/asm/global_data.h | 3 ++ > > arch/m68k/include/asm/global_data.h | 3 ++ > > arch/microblaze/include/asm/global_data.h | 3 ++ > > arch/mips/include/asm/global_data.h | 3 ++ > > arch/nios2/include/asm/global_data.h | 3 ++ > > arch/powerpc/include/asm/global_data.h | 3 ++ > > arch/sh/include/asm/global_data.h | 3 ++ > > arch/sparc/include/asm/global_data.h | 3 ++ > > arch/x86/include/asm/global_data.h | 3 ++ > > common/console.c | 43 > +++++++++++++++++++++++++++- > > 13 files changed, 88 insertions(+), 2 deletions(-) > > > > diff --git a/README b/README > > index 0886987..cf6c01f 100644 > [snip] >