Module Name: src
Committed By: kiyohara
Date: Sat Aug 28 04:30:25 UTC 2010
Modified Files:
src/sys/arch/evbarm/gumstix: if_smsh_gxio.c
Log Message:
+ Struct smsh_gxio is obsolated, and struct lan9118_softc is used.
We do not have private data at all.
+ Fix typo. sms_gxio_attach -> smsh_gxio_attach
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/gumstix/if_smsh_gxio.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/evbarm/gumstix/if_smsh_gxio.c
diff -u src/sys/arch/evbarm/gumstix/if_smsh_gxio.c:1.2 src/sys/arch/evbarm/gumstix/if_smsh_gxio.c:1.3
--- src/sys/arch/evbarm/gumstix/if_smsh_gxio.c:1.2 Sun Nov 29 10:08:15 2009
+++ src/sys/arch/evbarm/gumstix/if_smsh_gxio.c Sat Aug 28 04:30:24 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: if_smsh_gxio.c,v 1.2 2009/11/29 10:08:15 kiyohara Exp $ */
+/* $NetBSD: if_smsh_gxio.c,v 1.3 2010/08/28 04:30:24 kiyohara Exp $ */
/*
* Copyright (c) 2008 KIYOHARA Takashi
* All rights reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_smsh_gxio.c,v 1.2 2009/11/29 10:08:15 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_smsh_gxio.c,v 1.3 2010/08/28 04:30:24 kiyohara Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -51,21 +51,9 @@
static int smsh_gxio_match(device_t, struct cfdata *, void *);
static void smsh_gxio_attach(device_t, device_t, void *);
-static int ether_serial_digit = 1;
+static int ether_serial_digit = 1;
-struct smsh_gxio_softc {
- struct lan9118_softc sc_smsh;
- void *sc_ih;
-
- /*
- * Board independent DMA stuffs, if uses master DMA.
- * We use PXA2x0's DMA.
- */
- struct dmac_xfer *sc_txfer;
- struct dmac_xfer *sc_rxfer;
-};
-
-CFATTACH_DECL_NEW(smsh_gxio, sizeof(struct smsh_gxio_softc),
+CFATTACH_DECL_NEW(smsh_gxio, sizeof(struct lan9118_softc),
smsh_gxio_match, smsh_gxio_attach, NULL, NULL);
@@ -104,9 +92,9 @@
static void
smsh_gxio_attach(device_t parent, device_t self, void *aux)
{
- struct smsh_gxio_softc *gsc = device_private(self);
- struct lan9118_softc *sc = &gsc->sc_smsh;
+ struct lan9118_softc *sc = device_private(self);
struct gxio_attach_args *gxa = aux;
+ void *ih;
KASSERT(system_serial_high != 0 || system_serial_low != 0);
@@ -115,7 +103,7 @@
/* Map i/o space. */
if (bus_space_map(gxa->gxa_iot, gxa->gxa_addr, LAN9118_IOSIZE, 0,
&sc->sc_ioh))
- panic("sms_gxio_attach: can't map i/o space");
+ panic("smsh_gxio_attach: can't map i/o space");
sc->sc_iot = gxa->gxa_iot;
sc->sc_enaddr[0] = ((system_serial_high >> 8) & 0xfe) | 0x02;
@@ -132,9 +120,9 @@
}
/* Establish the interrupt handler. */
- gsc->sc_ih = gxio_intr_establish(gxa->gxa_sc,
+ ih = gxio_intr_establish(gxa->gxa_sc,
gxa->gxa_gpirq, IST_EDGE_FALLING, IPL_NET, lan9118_intr, sc);
- if (gsc->sc_ih == NULL) {
+ if (ih == NULL) {
aprint_error_dev(self,
"couldn't establish interrupt handler\n");
bus_space_unmap(sc->sc_iot, sc->sc_ioh, LAN9118_IOSIZE);