summaryrefslogtreecommitdiff
path: root/board/ge/bx50v3/vpd_reader.h
diff options
context:
space:
mode:
authorIan Ray <ian.ray@ge.com>2017-08-22 09:03:54 +0300
committerStefano Babic <sbabic@denx.de>2017-09-20 15:34:59 +0200
commitbe2808c3b0671751827b39753e7abe7278d33c62 (patch)
tree7c817b82a1c59d322148d848d64c53317c929bb2 /board/ge/bx50v3/vpd_reader.h
parentb1e8512e9dbe1771da9c3ad3ddfaf7681318fe0e (diff)
board: ge: bx50v3: set eth0 MAC address
Define i2c mux configuration. Add new vpd_reader which is used to read vital product data. Read VPD from EEPROM and set eth0 MAC address. Signed-off-by: Ian Ray <ian.ray@ge.com> Signed-off-by: Jose Alarcon <jose.alarcon@ge.com>
Diffstat (limited to 'board/ge/bx50v3/vpd_reader.h')
-rw-r--r--board/ge/bx50v3/vpd_reader.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/board/ge/bx50v3/vpd_reader.h b/board/ge/bx50v3/vpd_reader.h
new file mode 100644
index 0000000000..efa172a915
--- /dev/null
+++ b/board/ge/bx50v3/vpd_reader.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2016 General Electric Company
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */
+
+#include "common.h"
+
+/*
+ * Read VPD from given data, verify content, and call callback
+ * for each vital product data block.
+ *
+ * Returns Non-zero on error. Negative numbers encode errno.
+ */
+int vpd_reader(
+ size_t size,
+ uint8_t * data,
+ void * userdata,
+ int (*fn)(
+ void * userdata,
+ uint8_t id,
+ uint8_t version,
+ uint8_t type,
+ size_t size,
+ uint8_t const * data));