From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from el-out-1112.google.com (el-out-1112.google.com [209.85.162.182]) by ozlabs.org (Postfix) with ESMTP id F1B17DDE2D for ; Sat, 29 Sep 2007 06:04:06 +1000 (EST) Received: by el-out-1112.google.com with SMTP id s27so702262ele for ; Fri, 28 Sep 2007 13:04:05 -0700 (PDT) Message-ID: Date: Fri, 28 Sep 2007 14:04:04 -0600 From: "Grant Likely" Sender: glikely@secretlab.ca To: "Arnd Bergmann" Subject: Re: [PATCH 01/18] Virtex: Add uartlite bootwrapper driver In-Reply-To: <200709282145.09411.arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 References: <20070928181421.18608.74224.stgit@trillian.cg.shawcable.net> <20070928181551.18608.88418.stgit@trillian.cg.shawcable.net> <200709282145.09411.arnd@arndb.de> Cc: linuxppc-dev@ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 9/28/07, Arnd Bergmann wrote: > On Friday 28 September 2007, Grant Likely wrote: > > +static void uartlite_putc(unsigned char c) > > +{ > > +while ((in_be32(reg_base + 0x8) & 0x08) != 0); /* spin */ > > +out_be32(reg_base + 0x4, c); > > +} > > When coding a spin-loop, it's better to do a cpu_relax() between > each attempt. Is cpu_relax even implemented in the bootwrapper? g. -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. grant.likely@secretlab.ca (403) 399-0195