combine all checks for missing MAC address

enable FPU, if POSIX init task present
 explicitly disable all edge port interrupts
This commit is contained in:
Thomas Doerfler
2010-02-25 11:01:35 +00:00
parent 6f8d49b427
commit 28b38f3c30
4 changed files with 24 additions and 21 deletions
@@ -1,3 +1,10 @@
2010-02-24 Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
* network/network.c: combine all checks for missing MAC address
* startup/bspstart.c: enable FPU, if POSIX init task present
* startup/init548x.c: explicitly disable all edge port interrupts
2009-12-16 Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
* console/console.c: adapted to new prototype for *_write
@@ -1721,13 +1721,6 @@ int rtems_mcf548x_fec_driver_attach(struct rtems_bsdnet_ifconfig *config)
/* There is no entry in NVRAM, but there is in the ifconfig struct, so use it. */
memcpy((void *)sc->arpcom.ac_enaddr, config->hardware_address, ETHER_ADDR_LEN);
}
else
{
/* There is no ethernet address provided, so it could be read
* from the Ethernet protocol block of SCC1 in DPRAM.
*/
rtems_panic("No Ethernet address specified!\n");
}
#else /* NVRAM_CONFIGURE != 1 */
@@ -1736,15 +1729,6 @@ int rtems_mcf548x_fec_driver_attach(struct rtems_bsdnet_ifconfig *config)
memcpy(sc->arpcom.ac_enaddr, config->hardware_address, ETHER_ADDR_LEN);
}
else
{
/* There is no ethernet address provided, so it could be read
* from the Ethernet protocol block of SCC1 in DPRAM.
*/
rtems_panic("No Ethernet address specified!\n");
}
#endif /* NVRAM_CONFIGURE != 1 */
@@ -1770,6 +1754,14 @@ int rtems_mcf548x_fec_driver_attach(struct rtems_bsdnet_ifconfig *config)
);
}
#endif
if ((sc->arpcom.ac_enaddr[0] == 0) &&
(sc->arpcom.ac_enaddr[1] == 0) &&
(sc->arpcom.ac_enaddr[2] == 0)) {
/* There is no ethernet address provided, so it could be read
* from the Ethernet protocol block of SCC1 in DPRAM.
*/
rtems_panic("No Ethernet address specified!\n");
}
if(config->mtu)
mtu = config->mtu;
else
@@ -274,11 +274,11 @@ void bsp_start( void )
_CPU_cacr_shadow = BSP_CACR_INIT;
/* Switch on FPU in CACR shadow register if necessary */
if (
Configuration_RTEMS_API.User_initialization_tasks_table != NULL &&
(Configuration_RTEMS_API.User_initialization_tasks_table->attribute_set
& RTEMS_FLOATING_POINT) != 0
) {
if ((Configuration_POSIX_API.number_of_initialization_threads > 0) ||
((Configuration_RTEMS_API.number_of_initialization_tasks > 0) &&
(Configuration_RTEMS_API.User_initialization_tasks_table
->attribute_set & RTEMS_FLOATING_POINT) != 0)
) {
_CPU_cacr_shadow &= ~MCF548X_CACR_DF;
}
@@ -321,4 +321,8 @@ gpio_init(void)
);
#endif
/*
* make sure the "edge port" has all interrupts disabled
*/
MCF548X_EPORT_EPIER = 0;
}