OemNicConfig.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /** @file
  2. *
  3. * Copyright (c) 2016, Hisilicon Limited. All rights reserved.
  4. * Copyright (c) 2016, Linaro Limited. All rights reserved.
  5. *
  6. * This program and the accompanying materials
  7. * are licensed and made available under the terms and conditions of the BSD License
  8. * which accompanies this distribution. The full text of the license may be found at
  9. * http://opensource.org/licenses/bsd-license.php
  10. *
  11. * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
  13. *
  14. **/
  15. #ifndef __OEM_NIC_CONFIG_H__
  16. #define __OEM_NIC_CONFIG_H__
  17. #define I2C_SLAVEADDR_EEPROM (0x52)
  18. #define I2C_OFFSET_EEPROM_ETH0 (0xc00)
  19. #define I2C_OFFSET_EEPROM_ETH1 (I2C_OFFSET_EEPROM_ETH0 + 6)
  20. #define I2C_OFFSET_EEPROM_ETH2 (I2C_OFFSET_EEPROM_ETH1 + 6)
  21. #define I2C_OFFSET_EEPROM_ETH3 (I2C_OFFSET_EEPROM_ETH2 + 6)
  22. #define I2C_OFFSET_EEPROM_ETH4 (I2C_OFFSET_EEPROM_ETH3 + 6)
  23. #define I2C_OFFSET_EEPROM_ETH5 (I2C_OFFSET_EEPROM_ETH4 + 6)
  24. #define I2C_OFFSET_EEPROM_ETH6 (I2C_OFFSET_EEPROM_ETH5 + 6)
  25. #define I2C_OFFSET_EEPROM_ETH7 (I2C_OFFSET_EEPROM_ETH6 + 6)
  26. #define MAC_ADDR_LEN 6
  27. #pragma pack(1)
  28. typedef struct {
  29. UINT16 Crc16;
  30. UINT16 MacLen;
  31. UINT8 Mac[MAC_ADDR_LEN];
  32. } NIC_MAC_ADDRESS;
  33. #pragma pack()
  34. #endif