Changeset e85eb70 in rtems
- Timestamp:
- 12/22/07 08:28:57 (15 years ago)
- Branches:
- 4.10, 4.11, 4.9, 5, master
- Children:
- 107f4d34
- Parents:
- 1ff9922
- Location:
- c/src/lib/libbsp/m68k/mcf5235
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libbsp/m68k/mcf5235/ChangeLog
r1ff9922 re85eb70 1 2007-12-14 Chris Johns <chrisj@rtems.org> 2 3 * gdb-init: Make the first hb temporary. 4 * network/network.c: Add support for reading the MAC address from 5 the FEC if set by the boot monitor. dBug does not do this unless 6 the network is used which is a shame. 7 1 8 2007-12-14 Chris Johns <chrisj@rtems.org> 2 9 -
c/src/lib/libbsp/m68k/mcf5235/gdb-init
r1ff9922 re85eb70 8 8 # with the debugger. 9 9 # 10 hb *0xffe254c010 thb *0xffe254c0 11 11 12 12 # -
c/src/lib/libbsp/m68k/mcf5235/network/network.c
r1ff9922 re85eb70 307 307 MCF5235_INTC0_IMRL &= ~(MCF5235_INTC0_IMRL_INT27 | MCF5235_INTC0_IMRL_MASKALL); 308 308 } 309 310 /* 311 * Get the MAC address from the hardware. 312 */ 313 static void 314 fec_get_mac_address(volatile struct mcf5235_enet_struct *sc, unsigned char* hwaddr) 315 { 316 unsigned long addr; 317 318 addr = MCF5235_FEC_PALR; 319 320 hwaddr[0] = (addr >> 24) & 0xff; 321 hwaddr[1] = (addr >> 16) & 0xff; 322 hwaddr[2] = (addr >> 8) & 0xff; 323 hwaddr[3] = (addr >> 0) & 0xff; 324 325 addr = MCF5235_FEC_PAUR; 326 327 hwaddr[4] = (addr >> 24) & 0xff; 328 hwaddr[5] = (addr >> 16) & 0xff; 329 } 330 309 331 310 332 /* … … 790 812 * Is driver free? 791 813 */ 792 if ((unitNumber < = 0) || (unitNumber >NIFACES)) {793 printf(" Bad FEC unit number.\n");814 if ((unitNumber < 0) || (unitNumber >= NIFACES)) { 815 printf("mcf5235: bad FEC unit number.\n"); 794 816 return 0; 795 817 } 796 sc = &enet_driver[unitNumber - 1];818 sc = &enet_driver[unitNumber]; 797 819 ifp = &sc->arpcom.ac_if; 798 820 if (ifp->if_softc != NULL) { 799 printf(" Driver already in use.\n");821 printf("mcf5235: driver already in use.\n"); 800 822 return 0; 801 823 } … … 804 826 * Process options 805 827 */ 828 if (config->hardware_address) 829 memcpy(sc->arpcom.ac_enaddr, config->hardware_address, ETHER_ADDR_LEN); 830 else 831 fec_get_mac_address(sc, sc->arpcom.ac_enaddr); 832 806 833 hwaddr = config->hardware_address; 807 printf("%s%d: Ethernet address: %02x:%02x:%02x:%02x:%02x:%02x\n", 808 unitName, unitNumber, 809 hwaddr[0], hwaddr[1], hwaddr[2], 810 hwaddr[3], hwaddr[4], hwaddr[5]); 811 memcpy(sc->arpcom.ac_enaddr, hwaddr, ETHER_ADDR_LEN); 834 printf("%s%d: mac: %02x:%02x:%02x:%02x:%02x:%02x\n", 835 unitName, unitNumber, 836 hwaddr[0], hwaddr[1], hwaddr[2], 837 hwaddr[3], hwaddr[4], hwaddr[5]); 812 838 813 839 if (config->mtu)
Note: See TracChangeset
for help on using the changeset viewer.