/* Get the Mac address in to the address specified. The mac register contents are read and written to buffer passed.  */
s32 synopGMAC_get_mac_addr(synopGMACdevice *gmacdev, u32 MacHigh, u32 MacLow, u8 *MacAddr)
/* Get the Mac address in to the address specified. The mac register contents are read and written to buffer passed.  */
s32 synopGMAC_get_mac_addr(synopGMACdevice *gmacdev, u32 MacHigh, u32 MacLow, u8 *MacAddr)
{
    u32 data;
    data = synopGMACReadReg(gmacdev->MacBase, MacHigh);
    MacAddr[5] = (data >> 8) & 0xff;
    MacAddr[4] = (data)      & 0xff;
    data = synopGMACReadReg(gmacdev->MacBase, MacLow);
    MacAddr[3] = (data >> 24) & 0xff;
    MacAddr[2] = (data >> 16) & 0xff;
    MacAddr[1] = (data >> 8)  & 0xff;
    MacAddr[0] = (data)       & 0xff;
    return 0;
}