From mboxrd@z Thu Jan 1 00:00:00 1970 From: Axel Lin Date: Sat, 15 Jun 2013 00:55:25 +0800 Subject: [U-Boot] spi: cf_spi: Question about checking (dspi->sr & 0x0000F000) witch magic number 4 Message-ID: <1371228925.4087.2.camel@phoenix> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, While reading the code in cfspi_tx(): while ((dspi->sr & 0x0000F000) >= 4) ; I don't see the point of checking "(dspi->sr & 0x0000F000) >= 4)". I'm wondering if it should be while ((dspi->sr & 0x0000F000) >> 12) >= 4) ; or simply while (dspi->sr & 0x0000F000) ; Current code actually has the same effect as "while (dspi->sr & 0x0000F000) ;". comments? Axel