aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Foster <nick@nerdnetworks.org>2011-04-22 11:47:17 -0700
committerNick Foster <nick@nerdnetworks.org>2011-04-22 11:47:17 -0700
commit7b509d6fe4ac4cfcafc63f11f5b298d3e0237acd (patch)
tree5b2f0fd5937b181a754323ec202f6367d09be48e
parent0366d6110761c6bb34c49a0f1dbadabafc92a997 (diff)
downloaduhd-7b509d6fe4ac4cfcafc63f11f5b298d3e0237acd.tar.gz
uhd-7b509d6fe4ac4cfcafc63f11f5b298d3e0237acd.tar.bz2
uhd-7b509d6fe4ac4cfcafc63f11f5b298d3e0237acd.zip
N210 fw: Move spif_init into bootload_utils
-rw-r--r--firmware/zpu/apps/txrx_uhd.c2
-rw-r--r--firmware/zpu/usrp2p/bootloader_utils.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/firmware/zpu/apps/txrx_uhd.c b/firmware/zpu/apps/txrx_uhd.c
index fcccf6959..a9dc2aa4c 100644
--- a/firmware/zpu/apps/txrx_uhd.c
+++ b/firmware/zpu/apps/txrx_uhd.c
@@ -297,8 +297,8 @@ main(void)
#ifdef BOOTLOADER
//load the production FPGA image or firmware if appropriate
- spif_init();
do_the_bootload_thing();
+ //if we get here we've fallen through to safe firmware
set_default_mac_addr();
set_default_ip_addr();
#endif
diff --git a/firmware/zpu/usrp2p/bootloader_utils.c b/firmware/zpu/usrp2p/bootloader_utils.c
index 15e21f054..1efa643b6 100644
--- a/firmware/zpu/usrp2p/bootloader_utils.c
+++ b/firmware/zpu/usrp2p/bootloader_utils.c
@@ -15,6 +15,7 @@
#include <nonstdio.h>
#include <xilinx_s3_icap.h>
#include <mdelay.h>
+#include "spi.h"
#define BUTTON_PUSHED ((router_status->irqs & PIC_BUTTON) ? 0 : 1)
@@ -53,6 +54,8 @@ void start_program(void)
}
void do_the_bootload_thing(void) {
+ spif_init(); //initialize SPI flash clock
+
bool production_image = find_safe_booted_flag();
set_safe_booted_flag(0); //haven't booted yet