diff options
author | Graeme Russ <graeme.russ@gmail.com> | 2011-07-15 23:31:37 +0000 |
---|---|---|
committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2011-07-16 11:55:00 +0200 |
commit | a60d1e5b8e5007f53c198acc5ca636ae570ae180 (patch) | |
tree | ce621710efc0ecace5a53c22e93f4c6dfcf03be2 /drivers/mtd | |
parent | 4e0499ebb0ac53aca45735ed63a3230df3280fb8 (diff) | |
download | u-boot-imx-a60d1e5b8e5007f53c198acc5ca636ae570ae180.zip u-boot-imx-a60d1e5b8e5007f53c198acc5ca636ae570ae180.tar.gz u-boot-imx-a60d1e5b8e5007f53c198acc5ca636ae570ae180.tar.bz2 |
Timer: Fix misuse of ARM *timer_masked() functions outside arch/arm
Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/spi/eeprom_m95xxx.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/mtd/spi/eeprom_m95xxx.c b/drivers/mtd/spi/eeprom_m95xxx.c index 632db4e..ef8ed6f 100644 --- a/drivers/mtd/spi/eeprom_m95xxx.c +++ b/drivers/mtd/spi/eeprom_m95xxx.c @@ -75,6 +75,7 @@ ssize_t spi_write (uchar *addr, int alen, uchar *buffer, int len) { struct spi_slave *slave; char buf[3]; + ulong start; slave = spi_setup_slave(CONFIG_DEFAULT_SPI_BUS, 1, 1000000, CONFIG_DEFAULT_SPI_MODE); @@ -102,7 +103,7 @@ ssize_t spi_write (uchar *addr, int alen, uchar *buffer, int len) if(spi_xfer(slave, len * 8, buffer, NULL, SPI_XFER_END)) return -1; - reset_timer_masked(); + start = get_timer(0); do { buf[0] = SPI_EEPROM_RDSR; buf[1] = 0; @@ -111,7 +112,7 @@ ssize_t spi_write (uchar *addr, int alen, uchar *buffer, int len) if (!(buf[1] & 1)) break; - } while (get_timer_masked() < CONFIG_SYS_SPI_WRITE_TOUT); + } while (get_timer(start) < CONFIG_SYS_SPI_WRITE_TOUT); if (buf[1] & 1) printf ("*** spi_write: Time out while writing!\n"); |