diff options
author | Josh Blum <josh@joshknows.com> | 2011-01-09 20:45:35 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-01-09 20:45:35 -0800 |
commit | ac97f5ba9c07b29840eddc9f3ecfcac5d9926efd (patch) | |
tree | 83303fc8c161e31fd5c99dcd1b6c2c83b3b5278c /firmware/zpu/usrp2p/spi_flash.h | |
parent | 4ca01c6dbeb253162e64a13f69ce981fc0b8b9bd (diff) | |
download | uhd-ac97f5ba9c07b29840eddc9f3ecfcac5d9926efd.tar.gz uhd-ac97f5ba9c07b29840eddc9f3ecfcac5d9926efd.tar.bz2 uhd-ac97f5ba9c07b29840eddc9f3ecfcac5d9926efd.zip |
usrp-n210: firmware changes related to init and bootloader
added u2p init file that is called by u2init
added spi flash init and added to u2pinit
implemented mdelay usage in bootloader
Diffstat (limited to 'firmware/zpu/usrp2p/spi_flash.h')
-rw-r--r-- | firmware/zpu/usrp2p/spi_flash.h | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/firmware/zpu/usrp2p/spi_flash.h b/firmware/zpu/usrp2p/spi_flash.h index bbe7b650d..bfecab468 100644 --- a/firmware/zpu/usrp2p/spi_flash.h +++ b/firmware/zpu/usrp2p/spi_flash.h @@ -30,20 +30,15 @@ uint32_t spi_flash_rdid(void); /* Read ID */ uint32_t spi_flash_rdsr(void); /* Read Status Register */ -size_t spi_flash_log2_sector_size(void) __attribute__((pure)); /* either 16 or 18 */ -size_t spi_flash_log2_memory_size(void); - -static inline size_t -spi_flash_sector_size(void) -{ - return ((size_t) 1) << spi_flash_log2_sector_size(); -} - -static inline size_t -spi_flash_memory_size(void) -{ - return ((size_t) 1) << spi_flash_log2_memory_size(); -} + +//! call before using any spi flash utilities +void spi_flash_init(void); + +size_t spi_flash_log2_sector_size(void); + +size_t spi_flash_sector_size(void); + +size_t spi_flash_memory_size(void); void spi_flash_read(uint32_t flash_addr, size_t nbytes, void *buf); |