aboutsummaryrefslogtreecommitdiffstats
path: root/firmware/microblaze/usrp2p/spi_flash.h
diff options
context:
space:
mode:
authorNick Foster <nick@nerdnetworks.org>2010-08-17 18:35:11 -0700
committerNick Foster <nick@nerdnetworks.org>2010-08-17 18:35:11 -0700
commit9d10efa5f0f81e1a971e92b28ba7f38e0384fdab (patch)
tree7b797016a4da8625dabc41c9bcc9ee0216092507 /firmware/microblaze/usrp2p/spi_flash.h
parent40faee2e6d87f7364a0c0c2cf310f1483c0331cf (diff)
downloaduhd-9d10efa5f0f81e1a971e92b28ba7f38e0384fdab.tar.gz
uhd-9d10efa5f0f81e1a971e92b28ba7f38e0384fdab.tar.bz2
uhd-9d10efa5f0f81e1a971e92b28ba7f38e0384fdab.zip
UDP firmware update support for USRP2P.
The hooks are in there for USRP2, but without CPLD changes it won't support it. Added an app host/utils/usrp2p_fw_update.py to write to USRP2P over the wire. Lots of TODOs in that file. Caveat -- fw_common.h, bootloader_utils.h, and the .py app MUST ALL AGREE!
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);
/*