aboutsummaryrefslogtreecommitdiffstats
path: root/mpm/tools/eeprom.h
diff options
context:
space:
mode:
Diffstat (limited to 'mpm/tools/eeprom.h')
-rw-r--r--mpm/tools/eeprom.h26
1 files changed, 18 insertions, 8 deletions
diff --git a/mpm/tools/eeprom.h b/mpm/tools/eeprom.h
index fc5b47426..04f468dd9 100644
--- a/mpm/tools/eeprom.h
+++ b/mpm/tools/eeprom.h
@@ -29,32 +29,41 @@ struct usrp_sulfur_eeprom {
u16 rev;
u8 serial[8];
u8 eth_addr0[ETH_ALEN];
- u8 __pad_0[2];
+ u16 dt_compat;
u8 eth_addr1[ETH_ALEN];
- u8 __pad_1[2];
+ u16 mcu_compat;
u8 eth_addr2[ETH_ALEN];
u8 __pad_2[2];
u32 crc;
} __attribute__((packed));
+struct db_rev {
+ u8 rev;
+ u8 dt_compat;
+} __attribute__((packed));
+
struct usrp_sulfur_db_eeprom {
u32 magic;
u32 version;
u16 pid;
- u16 rev;
- u8 serial[8];
+ union rev {
+ u16 v1_rev;
+ struct db_rev v2_rev;
+ } rev;
+ char serial[8];
u32 crc;
-
} __attribute__((packed));
/* Motherboard EEPROM stuff */
struct usrp_sulfur_eeprom *usrp_sulfur_eeprom_new(const u32 *mcu_flags,
const u16 pid,
const u16 rev,
- const u8 *serial,
+ const char *serial,
const char *eth_addr0,
const char *eth_addr1,
- const char *eth_addr2);
+ const char *eth_addr2,
+ const u16 dt_compat,
+ const u16 mcu_compat);
void usrp_sulfur_eeprom_to_i2c(struct usrp_sulfur_eeprom *ep, const char *path);
@@ -70,7 +79,8 @@ void usrp_sulfur_eeprom_print(const struct usrp_sulfur_eeprom *ep);
/* Daughterboard EEPROM stuff */
struct usrp_sulfur_db_eeprom *usrp_sulfur_db_eeprom_new(const u16 pid,
const u16 rev,
- const u8 *serial);
+ const char *serial,
+ const u16 dt_compat);
void usrp_sulfur_db_eeprom_to_file(struct usrp_sulfur_db_eeprom *ep,
const char *path);