summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-11-23 20:12:39 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-11-23 20:12:39 +0000
commit6e701e2cbfb8fb8f8466c6e47943c4704c1f08a8 (patch)
tree74771332e3db8436fc62f5996d2d24d3b291cccb /c
parent2009-11-23 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-6e701e2cbfb8fb8f8466c6e47943c4704c1f08a8.tar.bz2
2009-11-23 Joel Sherrill <joel.sherrill@OARcorp.com>
* libchip/network/smc91111.c: Formatting.
Diffstat (limited to 'c')
-rw-r--r--c/src/ChangeLog4
-rw-r--r--c/src/libchip/network/smc91111.c79
2 files changed, 42 insertions, 41 deletions
diff --git a/c/src/ChangeLog b/c/src/ChangeLog
index 57268eac06..a79bc9d669 100644
--- a/c/src/ChangeLog
+++ b/c/src/ChangeLog
@@ -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.
diff --git a/c/src/libchip/network/smc91111.c b/c/src/libchip/network/smc91111.c
index fb3b053a5a..a3fc177b7c 100644
--- a/c/src/libchip/network/smc91111.c
+++ b/c/src/libchip/network/smc91111.c
@@ -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;