[PATCH 34.0 v2 1/6] LEON3: console, lower bus utilization waiting for UART TX ready

Joel Sherrill joel.sherrill at OARcorp.com
Thu Apr 19 13:24:19 UTC 2012


OK to commit.

On 04/19/2012 08:21 AM, Daniel Hellstrom wrote:
> Signed-off-by: Daniel Hellstrom<daniel at gaisler.com>
> ---
>   c/src/lib/libbsp/sparc/leon3/console/debugputs.c |   10 +++++++---
>   1 files changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/c/src/lib/libbsp/sparc/leon3/console/debugputs.c b/c/src/lib/libbsp/sparc/leon3/console/debugputs.c
> index c6e0648..951218a 100644
> --- a/c/src/lib/libbsp/sparc/leon3/console/debugputs.c
> +++ b/c/src/lib/libbsp/sparc/leon3/console/debugputs.c
> @@ -13,8 +13,6 @@
>    *  The license and distribution terms for this file may be
>    *  found in the file LICENSE in this distribution or at
>    *  http://www.rtems.com/license/LICENSE.
> - *
> - *  $Id$
>    */
>
>   #include<bsp.h>
> @@ -94,7 +92,13 @@ void apbuart_outbyte_polled(
>     unsigned char ch
>   )
>   {
> -  while ( (regs->status&  LEON_REG_UART_STATUS_THE) == 0 );
> +  while ( (regs->status&  LEON_REG_UART_STATUS_THE) == 0 ) {
> +    /* Lower bus utilization while waiting for UART */
> +    asm volatile ("nop"::); asm volatile ("nop"::);
> +    asm volatile ("nop"::); asm volatile ("nop"::);
> +    asm volatile ("nop"::); asm volatile ("nop"::);
> +    asm volatile ("nop"::); asm volatile ("nop"::);
> +  }
>     regs->data = (unsigned int) ch;
>   }
>


-- 
Joel Sherrill, Ph.D.             Director of Research&   Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
     Support Available             (256) 722-9985





More information about the devel mailing list