diff options
author | Vipin KUMAR <vipin.kumar@st.com> | 2010-01-15 13:45:49 (GMT) |
---|---|---|
committer | Tom Rix <Tom.Rix@windriver.com> | 2010-01-23 14:15:49 (GMT) |
commit | f92994f0f7403b84366ce04e554e461f624e6868 (patch) | |
tree | 7c5da7e375042f3bad37acff3216bd0b445a2e48 /include/asm-arm/arch-spear | |
parent | 566c9c16fe4e501c3193ae6605bc9c663c6ea706 (diff) | |
download | u-boot-fsl-qoriq-f92994f0f7403b84366ce04e554e461f624e6868.tar.xz |
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>
Diffstat (limited to 'include/asm-arm/arch-spear')
-rw-r--r-- | include/asm-arm/arch-spear/spr_defs.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/asm-arm/arch-spear/spr_defs.h b/include/asm-arm/arch-spear/spr_defs.h index 9dde54a..fa8412c 100644 --- a/include/asm-arm/arch-spear/spr_defs.h +++ b/include/asm-arm/arch-spear/spr_defs.h @@ -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 |