aboutsummaryrefslogtreecommitdiffstats
path: root/firmware/microblaze/usrp2p/spi_flash.h
diff options
context:
space:
mode:
authorNick Foster <nick@nerdnetworks.org>2010-08-18 14:49:52 -0700
committerNick Foster <nick@nerdnetworks.org>2010-08-18 14:49:52 -0700
commit769b565dbdc3fa1bb0891d4dcdbb74695f1dc875 (patch)
tree32ec8c11dd8894a2a6c45f002aab204521bd7948 /firmware/microblaze/usrp2p/spi_flash.h
parent2da87fa5082c507d324dce743d63667a6d21fd80 (diff)
parent42547a0be8e52758d340fd1eba51a2dd5274a652 (diff)
downloaduhd-769b565dbdc3fa1bb0891d4dcdbb74695f1dc875.tar.gz
uhd-769b565dbdc3fa1bb0891d4dcdbb74695f1dc875.tar.bz2
uhd-769b565dbdc3fa1bb0891d4dcdbb74695f1dc875.zip
Merge branch 'usrp2p_udpfw' of ettus.sourcerepo.com:ettus/uhdpriv into usrp2p
Diffstat (limited to 'firmware/microblaze/usrp2p/spi_flash.h')
-rw-r--r--firmware/microblaze/usrp2p/spi_flash.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/firmware/microblaze/usrp2p/spi_flash.h b/firmware/microblaze/usrp2p/spi_flash.h
index f65f28477..bbe7b650d 100644
--- a/firmware/microblaze/usrp2p/spi_flash.h
+++ b/firmware/microblaze/usrp2p/spi_flash.h
@@ -31,6 +31,7 @@
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)
@@ -38,6 +39,12 @@ 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();
+}
+
void spi_flash_read(uint32_t flash_addr, size_t nbytes, void *buf);
/*