diff options
author | Josh Blum <josh@joshknows.com> | 2010-11-05 21:22:54 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-11-05 21:22:54 -0700 |
commit | 374f6ff05e66d10830a7567d2d793de2bf77c06b (patch) | |
tree | ca170bd9473de690ffff45b2041cf10f83fb0228 /firmware/microblaze | |
parent | 92b5034cb5a6e17fe7ebc437f7ef26147d69eba3 (diff) | |
parent | c2cc364f9fde9633e2d7c04fa5b07275e17ba093 (diff) | |
download | uhd-374f6ff05e66d10830a7567d2d793de2bf77c06b.tar.gz uhd-374f6ff05e66d10830a7567d2d793de2bf77c06b.tar.bz2 uhd-374f6ff05e66d10830a7567d2d793de2bf77c06b.zip |
Merge branch 'master' into flow_ctrl
Conflicts:
host/lib/usrp/usrp2/mboard_impl.cpp
host/lib/usrp/usrp2/usrp2_impl.hpp
Diffstat (limited to 'firmware/microblaze')
-rw-r--r-- | firmware/microblaze/lib/eth_addrs.c | 6 | ||||
-rw-r--r-- | firmware/microblaze/lib/u2_init.c | 11 | ||||
-rw-r--r-- | firmware/microblaze/lib/u2_init.h | 3 |
3 files changed, 6 insertions, 14 deletions
diff --git a/firmware/microblaze/lib/eth_addrs.c b/firmware/microblaze/lib/eth_addrs.c index d7c1e0394..c6320e4fa 100644 --- a/firmware/microblaze/lib/eth_addrs.c +++ b/firmware/microblaze/lib/eth_addrs.c @@ -23,6 +23,12 @@ #include "i2c.h" #include "usrp2/fw_common.h" +//////////////////////////////////////////////////////////////////////// +// EEPROM Layout +//////////////////////////////////////////////////////////////////////// +#define USRP2_EE_MBOARD_MAC_ADDR 0x02 //6 bytes +#define USRP2_EE_MBOARD_IP_ADDR 0x0C //uint32, big-endian + static bool unprogrammed(const void *t, size_t len) { diff --git a/firmware/microblaze/lib/u2_init.c b/firmware/microblaze/lib/u2_init.c index 8d666b76b..c9b4beb2b 100644 --- a/firmware/microblaze/lib/u2_init.c +++ b/firmware/microblaze/lib/u2_init.c @@ -28,16 +28,6 @@ #include "usrp2/fw_common.h" #include "nonstdio.h" -unsigned char u2_hw_rev_major; -unsigned char u2_hw_rev_minor; - -static inline void -get_hw_rev(void) -{ - bool ok = eeprom_read(USRP2_I2C_ADDR_MBOARD, USRP2_EE_MBOARD_REV_LSB, &u2_hw_rev_minor, 1); - ok &= eeprom_read(USRP2_I2C_ADDR_MBOARD, USRP2_EE_MBOARD_REV_MSB, &u2_hw_rev_major, 1); -} - /* * We ought to arrange for this to be called before main, but for now, * we require that the user's main call u2_init as the first thing... @@ -60,7 +50,6 @@ u2_init(void) pic_init(); // progammable interrupt controller i2c_init(); hal_enable_ints(); - get_hw_rev(); bp_init(); // buffer pool diff --git a/firmware/microblaze/lib/u2_init.h b/firmware/microblaze/lib/u2_init.h index 334791189..848bd88de 100644 --- a/firmware/microblaze/lib/u2_init.h +++ b/firmware/microblaze/lib/u2_init.h @@ -20,9 +20,6 @@ #include <stdbool.h> -extern unsigned char u2_hw_rev_major; -extern unsigned char u2_hw_rev_minor; - /*! * one-time init */ |