From be62f6be4e3edc66289ba8cf8264b6312b937279 Mon Sep 17 00:00:00 2001 From: ticso Date: Sun, 23 Dec 2007 14:46:30 +0000 Subject: BWCT boards uses two different SPI flash chips check for both status codes --- sys/boot/arm/at91/libat91/spi_flash.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys/boot/arm/at91') diff --git a/sys/boot/arm/at91/libat91/spi_flash.c b/sys/boot/arm/at91/libat91/spi_flash.c index a35e798..591b9eb 100644 --- a/sys/boot/arm/at91/libat91/spi_flash.c +++ b/sys/boot/arm/at91/libat91/spi_flash.c @@ -256,11 +256,12 @@ SPI_InitFlash(void) value = pSPI->SPI_RDR; value = pSPI->SPI_SR; + value = GetFlashStatus() & 0xFC; #ifdef BOOT_BWCT - if (((value = GetFlashStatus()) & 0xFC) != 0xB4) + if (value != 0xB4 && value != 0xAC) printf(" Bad SPI status: 0x%x\n", value); #else - if (((value = GetFlashStatus()) & 0xFC) != 0xBC) + if (value != 0xBC) printf(" Bad SPI status: 0x%x\n", value); #endif } -- cgit v1.1