Ignore:
Timestamp:
Nov 18, 2008, 11:36:28 AM (11 years ago)
Author:
Thomas Doerfler <Thomas.Doerfler@…>
Branches:
4.9
Children:
73b019a0
Parents:
d65b2da
Message:

include/bsp.h, include/hwreg_vals.h, network/network.c:

correct some init values for HSC_CM01 boards
change strategy to determine MAC address

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/powerpc/gen83xx/network/network.c

    rd65b2da reb32e3a  
    124124   */
    125125  if (config->hardware_address == NULL) {
     126#if !defined(HAS_UBOOT)
     127    static char hw_addr [M83xx_TSEC_NIFACES][6];
     128    m83xxTSEC_Registers_t  *reg_ptr;
    126129
    127 #ifdef HAS_UBOOT
     130    /* read MAC address from hardware register */
     131    /* we expect it htere from the boot loader */
     132    reg_ptr = &mpc83xx.tsec[unitNumber - 1];
     133    config->hardware_address = hw_addr[unitNumber-1];
     134   
     135    hw_addr[unitNumber-1][5] = (reg_ptr->macstnaddr[0] >> 24) & 0xff;
     136    hw_addr[unitNumber-1][4] = (reg_ptr->macstnaddr[0] >> 16) & 0xff;
     137    hw_addr[unitNumber-1][3] = (reg_ptr->macstnaddr[0] >>  8) & 0xff;
     138    hw_addr[unitNumber-1][2] = (reg_ptr->macstnaddr[0] >>  0) & 0xff;
     139    hw_addr[unitNumber-1][1] = (reg_ptr->macstnaddr[1] >> 24) & 0xff;
     140    hw_addr[unitNumber-1][0] = (reg_ptr->macstnaddr[1] >> 16) & 0xff;
     141#endif
    128142
     143#if defined(HAS_UBOOT)
    129144    switch (unitNumber) {
    130145      case 1:
     
    154169    }
    155170
    156 #else /* HAS_UBOOT */
    157 
    158     char hw_addr [6] = { 0x00, 0x04, 0x9f, 0x00, 0x2f, 0xcb};
    159 
    160     config->hardware_address = hw_addr;
    161 
    162171#endif /* HAS_UBOOT */
    163172
Note: See TracChangeset for help on using the changeset viewer.