diff options
author | Graeme Russ <graeme.russ@gmail.com> | 2011-07-15 02:20:40 +0000 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2011-07-26 14:53:55 +0200 |
commit | 53fc43c68243d5278e522c92002fce3b8cc979a9 (patch) | |
tree | 7aee34f940afd3f0e47e9644cad2d50f394c8187 /arch/arm/cpu/arm920t | |
parent | 4769be21cca65f1e7bef27bc024d886842bc6bad (diff) | |
download | u-boot-imx-53fc43c68243d5278e522c92002fce3b8cc979a9.zip u-boot-imx-53fc43c68243d5278e522c92002fce3b8cc979a9.tar.gz u-boot-imx-53fc43c68243d5278e522c92002fce3b8cc979a9.tar.bz2 |
Timer: Fix at91rm9200/spi.c timer usage
Diffstat (limited to 'arch/arm/cpu/arm920t')
-rw-r--r-- | arch/arm/cpu/arm920t/at91rm9200/spi.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/cpu/arm920t/at91rm9200/spi.c b/arch/arm/cpu/arm920t/at91rm9200/spi.c index f3cb5d8..c70efc6 100644 --- a/arch/arm/cpu/arm920t/at91rm9200/spi.c +++ b/arch/arm/cpu/arm920t/at91rm9200/spi.c @@ -108,6 +108,7 @@ void AT91F_SpiEnable(int cs) unsigned int AT91F_SpiWrite ( AT91PS_DataflashDesc pDesc ) { unsigned int timeout; + unsigned long start; pDesc->state = BUSY; @@ -132,12 +133,12 @@ unsigned int AT91F_SpiWrite ( AT91PS_DataflashDesc pDesc ) } /* arm simple, non interrupt dependent timer */ - reset_timer_masked(); + start = get_timer(0); timeout = 0; AT91C_BASE_SPI->SPI_PTCR = AT91C_PDC_TXTEN + AT91C_PDC_RXTEN; while(!(AT91C_BASE_SPI->SPI_SR & AT91C_SPI_RXBUFF) && - ((timeout = get_timer_masked() ) < CONFIG_SYS_SPI_WRITE_TOUT)); + ((timeout = get_timer(start) ) < CONFIG_SYS_SPI_WRITE_TOUT)); AT91C_BASE_SPI->SPI_PTCR = AT91C_PDC_TXTDIS + AT91C_PDC_RXTDIS; pDesc->state = IDLE; |