forked from Imagelibrary/rtems
get vital data from dBUG monitor for COBRA5475 board
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2009-12-14 Thomas Doerfler <Thomas.Doerfler@embedded-brains.de>
|
||||
|
||||
* console/console.c, include/bsp.h, network/network.c: get vital
|
||||
data from dBUG for COBRA5475 board
|
||||
|
||||
2009-11-03 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||
|
||||
* startup/init548x.c: Comment out junk from end of #endif.
|
||||
|
||||
@@ -291,7 +291,11 @@ static int
|
||||
IntUartSetAttributes(int minor, const struct termios *t)
|
||||
{
|
||||
/* set default index values */
|
||||
#ifdef HAS_DBUG
|
||||
int baud = DBUG_SETTINGS.console_baudrate;
|
||||
#else
|
||||
int baud = (int)BSP_CONSOLE_BAUD;
|
||||
#endif
|
||||
int databits = (int)MCF548X_PSC_MR_BC_8;
|
||||
int parity = (int)MCF548X_PSC_MR_PM_NONE;
|
||||
int stopbits = (int)MCF548X_PSC_MR_SB_STOP_BITS_1;
|
||||
@@ -387,7 +391,7 @@ IntUartInterruptHandler(rtems_vector_number v)
|
||||
{
|
||||
|
||||
/* put data in rx buffer */
|
||||
info->rx_buffer[info->rx_in] = *((uint8_t *)&MCF548X_PSC_RB(chan));
|
||||
info->rx_buffer[info->rx_in] = *((volatile uint8_t *)&MCF548X_PSC_RB(chan));
|
||||
|
||||
/* check for errors */
|
||||
if ( MCF548X_PSC_SR(chan) & MCF548X_PSC_SR_ERROR )
|
||||
@@ -529,7 +533,7 @@ IntUartInterruptWrite (int minor, const char *buf, int len)
|
||||
rtems_interrupt_disable(level);
|
||||
|
||||
/* write out character */
|
||||
MCF548X_PSC_TB(minor) = *buf;
|
||||
*(volatile uint8_t *)(&MCF548X_PSC_TB(minor)) = *buf;
|
||||
|
||||
/* enable tx interrupt */
|
||||
IntUartInfo[minor].imr |= MCF548X_PSC_IMR_TXRDY;
|
||||
|
||||
@@ -116,6 +116,21 @@ extern int rtems_mcf548x_fec_driver_attach_detach(struct rtems_bsdnet_ifconfig *
|
||||
#define RTEMS_BSP_NETWORK_DRIVER_NAME "fec1"
|
||||
#define RTEMS_BSP_NETWORK_DRIVER_NAME2 "fec2"
|
||||
|
||||
#ifdef HAS_DBUG
|
||||
typedef struct {
|
||||
uint32_t console_baudrate;
|
||||
uint8_t server_ip [4];
|
||||
uint8_t client_ip [4];
|
||||
uint8_t gateway_ip[4];
|
||||
uint8_t netmask [4];
|
||||
uint8_t spare[4];
|
||||
uint8_t macaddr [6];
|
||||
uint32_t ethport; /* default fec port: 1 = fec1, 2 = fec2 */
|
||||
uint32_t uartport; /* default fec port: 1 = psc0, 2 = psc1... */
|
||||
} dbug_settings_t;
|
||||
|
||||
#define DBUG_SETTINGS (*(const dbug_settings_t *)0xFC020000)
|
||||
#endif /* HAS_DBUG */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1758,6 +1758,17 @@ int rtems_mcf548x_fec_driver_attach(struct rtems_bsdnet_ifconfig *config)
|
||||
ETHER_ADDR_LEN
|
||||
);
|
||||
}
|
||||
#endif
|
||||
#ifdef HAS_DBUG
|
||||
if ((sc->arpcom.ac_enaddr[0] == 0) &&
|
||||
(sc->arpcom.ac_enaddr[1] == 0) &&
|
||||
(sc->arpcom.ac_enaddr[2] == 0)) {
|
||||
memcpy(
|
||||
(void *)sc->arpcom.ac_enaddr,
|
||||
DBUG_SETTINGS.macaddr,
|
||||
ETHER_ADDR_LEN
|
||||
);
|
||||
}
|
||||
#endif
|
||||
if(config->mtu)
|
||||
mtu = config->mtu;
|
||||
|
||||
Reference in New Issue
Block a user