From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=60489 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Orv3x-00036A-CE for qemu-devel@nongnu.org; Sat, 04 Sep 2010 11:53:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Orv3w-0004n4-7g for qemu-devel@nongnu.org; Sat, 04 Sep 2010 11:53:53 -0400 Received: from mail-qy0-f173.google.com ([209.85.216.173]:45930) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Orv3w-0004mw-3E for qemu-devel@nongnu.org; Sat, 04 Sep 2010 11:53:52 -0400 Received: by qyk34 with SMTP id 34so1205804qyk.4 for ; Sat, 04 Sep 2010 08:53:51 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: From: Blue Swirl Date: Sat, 4 Sep 2010 15:53:31 +0000 Message-ID: Subject: Re: [Qemu-devel] [PATCH 4/5] pxa2xx: fix SSSR TFN logic Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: andrzej zaborowski Cc: qemu-devel On Sat, Sep 4, 2010 at 3:30 PM, andrzej zaborowski wrot= e: > Hi, > > On 4 September 2010 16:17, Blue Swirl wrote: >> Fix SSSR TFN logic: TX FIFO is never filled, so it is always in >> underrun condition if SSP is enabled. > > As far as I see this doesn't make any change when the port is enabled? > =C2=A0How does it fix the logic then? Before, TFS flag was never cleared, so if the port was enabled and then disabled the flag remained set. According to my reading of the manual, this shouldn't be the case. As you noticed, the logic does not change for the case where the port is enabled. The previous check was always true. If you prefer, the patch could be simplified to something like this: - if (0 <=3D SSCR1_TFT(s->sscr[1])) - s->sssr |=3D SSSR_TFS; - else - s->sssr &=3D ~SSSR_TFS; + /* TX FIFO is never filled, so it is always in underrun + condition if SSP is enabled */ + s->sssr |=3D SSSR_TFS;