summaryrefslogtreecommitdiffstats
path: root/firmware/microblaze
diff options
context:
space:
mode:
authorNick Foster <nick@nerdnetworks.org>2010-08-10 17:02:47 -0700
committerNick Foster <nick@nerdnetworks.org>2010-08-10 17:02:47 -0700
commit663808e847c4970551c6c8127c2c5d816e2a2014 (patch)
tree12183a2d7ea5434880dccfa414d8a378ae134abc /firmware/microblaze
parent90a5d84a18aaa338092e572ff257aab1fdcc8e6b (diff)
parent9e419c7b7f35062ceb2ed4e508cadb163067593f (diff)
downloaduhd-663808e847c4970551c6c8127c2c5d816e2a2014.tar.gz
uhd-663808e847c4970551c6c8127c2c5d816e2a2014.tar.bz2
uhd-663808e847c4970551c6c8127c2c5d816e2a2014.zip
Merge branch 'master' into usrp2p
this was the merge from hell Conflicts: firmware/microblaze/Makefile.am firmware/microblaze/bootstrap firmware/microblaze/configure.ac firmware/microblaze/lib/Makefile.inc host/lib/CMakeLists.txt host/lib/usrp/mimo_usrp.cpp host/lib/usrp/simple_usrp.cpp host/lib/usrp/usrp2/clock_ctrl.cpp host/lib/usrp/usrp2/codec_impl.cpp host/lib/usrp/usrp2/dboard_impl.cpp host/lib/usrp/usrp2/mboard_impl.cpp host/lib/usrp/usrp2/usrp2_iface.hpp host/lib/usrp/usrp2/usrp2_impl.hpp host/lib/usrp/usrp2/usrp2_regs.hpp host/test/CMakeLists.txt
Diffstat (limited to 'firmware/microblaze')
-rw-r--r--firmware/microblaze/Makefile.am1
-rw-r--r--firmware/microblaze/apps/burnrev40.c162
-rw-r--r--firmware/microblaze/apps/txrx_uhd.c11
l---------firmware/microblaze/config.guess1
l---------firmware/microblaze/config.sub1
5 files changed, 7 insertions, 169 deletions
diff --git a/firmware/microblaze/Makefile.am b/firmware/microblaze/Makefile.am
index ffc59192d..52fa649c2 100644
--- a/firmware/microblaze/Makefile.am
+++ b/firmware/microblaze/Makefile.am
@@ -26,3 +26,4 @@ SUBDIRS = \
usrp2 \
usrp2p \
usrp2p/bootloader
+
diff --git a/firmware/microblaze/apps/burnrev40.c b/firmware/microblaze/apps/burnrev40.c
deleted file mode 100644
index 362270961..000000000
--- a/firmware/microblaze/apps/burnrev40.c
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Copyright 2007,2008 Free Software Foundation, Inc.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "u2_init.h"
-#include "memory_map.h"
-#include "spi.h"
-#include "hal_io.h"
-#include "buffer_pool.h"
-#include "pic.h"
-#include <stdbool.h>
-#include "ethernet.h"
-#include "nonstdio.h"
-#include "usrp2_eth_packet.h"
-#include "dbsm.h"
-#include "app_common_v2.h"
-#include "memcpy_wa.h"
-#include <stddef.h>
-#include <stdlib.h>
-#include <string.h>
-#include <i2c.h>
-#include <usrp2_i2c_addr.h>
-#include <clocks.h>
-#include "sd.h"
-#include "mdelay.h"
-
-#define HW_REV_MAJOR 4
-#define HW_REV_MINOR 0
-
-int test_ram()
-{
- int i,j,k;
- output_regs->ram_page = 1<<10;
-
- extram[0] = 0xDEADBEEF;
- extram[1] = 0xF00D1234;
- extram[7] = 0x76543210;
-
- output_regs->ram_page = 2<<10;
- extram[7] = 0x55555555;
- extram[1] = 0xaaaaaaaa;
- extram[0] = 0xeeeeeeee;
-
- output_regs->ram_page = 1<<10;
-
- i = extram[0];
- k = extram[1];
- j = extram[7];
-
- if((i != 0xDEADBEEF)||(j!=0x76543210)||(k!=0xF00D1234)) {
- puts("RAM FAIL1!\n");
- puthex32_nl(i);
- puthex32_nl(j);
- puthex32_nl(k);
- return 0;
- }
-
- output_regs->ram_page = 2<<10;
-
- j = extram[7];
- k = extram[1];
- i = extram[0];
-
- if((i != 0xeeeeeeee)||(j!=0x55555555)||(k!=0xaaaaaaaa)) {
- puts("RAM FAIL2!\n");
- puthex32_nl(i);
- puthex32_nl(j);
- puthex32_nl(k);
- return 0;
- }
- return 1;
-}
-
-int test_sd()
-{
- int i = sd_init();
- if(i==0) {
- puts("FAILED INIT of Card\n");
- return 0;
- }
-
- unsigned char buf[512];
- i = sd_read_block(2048,buf);
- if(i == 0) {
- puts("READ Command Rejected\n");
- return 0;
- }
- if((buf[0]==0xb8)&&(buf[1]==0x08)&&(buf[2]==0x00)&&(buf[3]==0x50))
- ;
- else {
- puts("Read bad data from SD Card\n");
- return 0;
- }
- return 1;
-}
-
-int
-main(void)
-{
- u2_init();
-
- putstr("\nFactory Test, Board Rev 4.0\n");
-
- bool ok = true;
- unsigned char maj = HW_REV_MAJOR;
- unsigned char min = HW_REV_MINOR;
- ok = eeprom_write(I2C_ADDR_MBOARD, MBOARD_REV_MSB, &maj, 1);
- ok &= eeprom_write(I2C_ADDR_MBOARD, MBOARD_REV_LSB, &min, 1);
-
- putstr("\nset_hw_rev\n");
- if (ok)
- printf("OK: set h/w rev to %d.%d\n", HW_REV_MAJOR, HW_REV_MINOR);
- else {
- printf("FAILED to set h/w rev to %d.%d\n", HW_REV_MAJOR, HW_REV_MINOR);
- hal_finish();
- return 0;
- }
-
- if(test_sd())
- puts("SD OK\n");
- else {
- puts("SD FAIL\n");
- //hal_finish();
- //return 0;
- }
- if(test_ram())
- puts("RAM OK\n");
- else {
- puts("RAM FAIL\n");
- hal_finish();
- return 0;
- }
-
- print_mac_addr(ethernet_mac_addr()->addr);
- newline();
-
- clocks_mimo_config(MC_WE_LOCK_TO_SMA);
-
- while (!clocks_lock_detect()) {
- puts("No Lock");
- mdelay(1000);
- }
- puts("Clock Locked\n");
-
-}
diff --git a/firmware/microblaze/apps/txrx_uhd.c b/firmware/microblaze/apps/txrx_uhd.c
index 092d216aa..f0a9702be 100644
--- a/firmware/microblaze/apps/txrx_uhd.c
+++ b/firmware/microblaze/apps/txrx_uhd.c
@@ -181,9 +181,9 @@ void handle_udp_ctrl_packet(
uint32_t ctrl_data_in_id = ctrl_data_in->id;
//ensure that the protocol versions match
- if (payload_len >= sizeof(uint32_t) && ctrl_data_in->proto_ver != USRP2_PROTO_VERSION){
- printf("!Error in control packet handler: Expected protocol version %d, but got %d\n",
- USRP2_PROTO_VERSION, ctrl_data_in->proto_ver
+ if (payload_len >= sizeof(uint32_t) && ctrl_data_in->proto_ver != USRP2_FW_COMPAT_NUM){
+ printf("!Error in control packet handler: Expected compatibility number %d, but got %d\n",
+ USRP2_FW_COMPAT_NUM, ctrl_data_in->proto_ver
);
ctrl_data_in_id = USRP2_CTRL_ID_WAZZUP_BRO;
}
@@ -198,7 +198,7 @@ void handle_udp_ctrl_packet(
//setup the output data
usrp2_ctrl_data_t ctrl_data_out = {
- .proto_ver = USRP2_PROTO_VERSION,
+ .proto_ver = USRP2_FW_COMPAT_NUM,
.id=USRP2_CTRL_ID_HUH_WHAT,
.seq=ctrl_data_in->seq
};
@@ -441,7 +441,8 @@ main(void)
print_mac_addr(ethernet_mac_addr()->addr);
newline();
print_ip_addr(get_ip_addr()); newline();
- printf("Control protocol version: %d\n", USRP2_PROTO_VERSION);
+ printf("FPGA compatibility number: %d\n", USRP2_FPGA_COMPAT_NUM);
+ printf("Firmware compatibility number: %d\n", USRP2_FW_COMPAT_NUM);
ethernet_register_link_changed_callback(link_changed_callback);
ethernet_init();
diff --git a/firmware/microblaze/config.guess b/firmware/microblaze/config.guess
deleted file mode 120000
index 405bc3235..000000000
--- a/firmware/microblaze/config.guess
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/automake-1.11/config.guess \ No newline at end of file
diff --git a/firmware/microblaze/config.sub b/firmware/microblaze/config.sub
deleted file mode 120000
index 4d47fbcbc..000000000
--- a/firmware/microblaze/config.sub
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/automake-1.11/config.sub \ No newline at end of file