2009-11-23 Joel Sherrill <joel.sherrill@OARcorp.com>

* libchip/network/smc91111.c: Formatting.
This commit is contained in:
Joel Sherrill
2009-11-23 20:12:39 +00:00
parent 6083017bf6
commit 6e701e2cbf
2 changed files with 42 additions and 41 deletions

View File

@@ -1,3 +1,7 @@
2009-11-23 Joel Sherrill <joel.sherrill@OARcorp.com>
* libchip/network/smc91111.c: Formatting.
2009-11-12 Ralf Corsépius <ralf.corsepius@rtems.org>
* libchip/ide/ata.c (rtems_ata_initialize): Avoid implicit cast to uint16_t.

View File

@@ -441,8 +441,7 @@ static int readpacket(struct lan91cxx_priv_data *cpd)
db_printf("mbuf-chain:");
while (n) {
db_printf("[%x:%x]",
(unsigned int)(n->
m_data),
(unsigned int)(n-> m_data),
(unsigned int)(n->m_len));
n = n->m_next;
}
@@ -891,45 +890,44 @@ int _rtems_smc91111_driver_attach (struct rtems_bsdnet_ifconfig *config,
int mtu;
DEBUG_FUNCTION();
/* /\* activate io area *\/ */
/* switch (sparc_leon23_get_psr_version()) { */
/* case 0: */
/* case 2: */
/* db_printf("Activating Leon2 io port\n"); */
/* /\*configure pio *\/ */
/* *((volatile unsigned int *)0x80000000) |= 0x10f80000; */
/* *((volatile unsigned int *)0x800000A8) |= */
/* (0xe0 | chip->vector) << (8 * (chip->pio - 4)); */
/* break; */
/* default: */
/* { */
/* unsigned long irq_pio, irq_mctrl, addr_pio, addr_mctrl; */
/* if ((addr_pio = */
/* amba_find_apbslv_addr(VENDOR_GAISLER, */
/* GAISLER_PIOPORT, &irq_pio)) */
/* && (addr_mctrl = */
/* amba_find_apbslv_addr(VENDOR_ESA, */
/* ESA_MCTRL, &irq_mctrl))) { */
/* LEON3_IOPORT_Regs_Map *io = */
/* (LEON3_IOPORT_Regs_Map *) addr_pio; */
/* db_printf */
/* ("Activating Leon3 io port for smsc_lan91cxx (pio:%x mctrl:%x)\n", */
/* (unsigned int)addr_pio, */
/* (unsigned int)addr_mctrl); */
/* *((volatile unsigned int *)addr_mctrl) |= 0x10f80000; /\*mctrl ctrl 1 *\/ */
/* io->irqmask |= (1 << chip->pio); */
/* io->irqpol |= (1 << chip->pio); */
/* io->irqedge |= (1 << chip->pio); */
/* io->iodir &= ~(1 << chip->pio); */
/* } else { */
/* return 0; */
/* } */
/* } */
/* } */
#if 0
/* activate io area */
switch (sparc_leon23_get_psr_version()) {
case 0:
case 2:
db_printf("Activating Leon2 io port\n");
/*configure pio */
*((volatile unsigned int *)0x80000000) |= 0x10f80000;
*((volatile unsigned int *)0x800000A8) |=
(0xe0 | chip->vector) << (8 * (chip->pio - 4));
break;
default:
{
unsigned long irq_pio, irq_mctrl, addr_pio, addr_mctrl;
if ((addr_pio = amba_find_apbslv_addr(VENDOR_GAISLER,
GAISLER_PIOPORT, &irq_pio))
&& (addr_mctrl =
amba_find_apbslv_addr(VENDOR_ESA, ESA_MCTRL, &irq_mctrl))) {
LEON3_IOPORT_Regs_Map *io =
(LEON3_IOPORT_Regs_Map *) addr_pio;
db_printf
("Activating Leon3 io port for smsc_lan91cxx (pio:%x mctrl:%x)\n",
(unsigned int)addr_pio,
(unsigned int)addr_mctrl);
*((volatile unsigned int *)addr_mctrl) |= 0x10f80000; /*mctrl ctrl 1 */
io->irqmask |= (1 << chip->pio);
io->irqpol |= (1 << chip->pio);
io->irqedge |= (1 << chip->pio);
io->iodir &= ~(1 << chip->pio);
} else {
return 0;
}
}
}
#endif
/* parse driver name */
if ((unitNumber =
rtems_bsdnet_parse_driver_name(config, &unitName)) < 0) {
if ((unitNumber = rtems_bsdnet_parse_driver_name(config, &unitName)) < 0) {
db_printf("Unitnumber < 0: %d\n", unitNumber);
return 0;
}
@@ -948,8 +946,7 @@ int _rtems_smc91111_driver_attach (struct rtems_bsdnet_ifconfig *config,
}
if (config->hardware_address) {
memcpy(cpd->arpcom.ac_enaddr, config->hardware_address,
ETHER_ADDR_LEN);
memcpy(cpd->arpcom.ac_enaddr, config->hardware_address, ETHER_ADDR_LEN);
} else {
/* dummy default address */
cpd->arpcom.ac_enaddr[0] = 0x12;