SPEAr : Support for HW mac id read/write from i2c mem
This patch adds the support to read and write mac id from i2c memory. For reading: if (env contains ethaddr) pick env ethaddr else pick ethaddr from i2c memory For writing: chip_config ethaddr XX:XX:XX:XX:XX:XX writes the mac id in i2c memory Signed-off-by: Vipin <vipin.kumar@st.com>
This commit is contained in:
@@ -35,4 +35,12 @@ struct chip_data {
|
||||
uchar version[32];
|
||||
};
|
||||
|
||||
/* HW mac id in i2c memory definitions */
|
||||
#define MAGIC_OFF 0x0
|
||||
#define MAGIC_LEN 0x2
|
||||
#define MAGIC_BYTE0 0x55
|
||||
#define MAGIC_BYTE1 0xAA
|
||||
#define MAC_OFF 0x2
|
||||
#define MAC_LEN 0x6
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user