public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] spi: cf_spi: Question about checking (dspi->sr & 0x0000F000) witch magic number 4
@ 2013-06-14 16:55 Axel Lin
  0 siblings, 0 replies; only message in thread
From: Axel Lin @ 2013-06-14 16:55 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-06-14 16:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-14 16:55 [U-Boot] spi: cf_spi: Question about checking (dspi->sr & 0x0000F000) witch magic number 4 Axel Lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox