Skip to contentSkip to conversation

spi: cf_spi: Question about checking (dspi->sr & 0x0000F000) witch magic number 4

U-Boot Axel Lin 1 participant 1 message Jun 14, 2013

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

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