Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Fix device_t/softc split botches. PR port-hpcarm/4...
details: https://anonhg.NetBSD.org/src/rev/067929caf8b4
branches: trunk
changeset: 757211:067929caf8b4
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Thu Aug 19 15:17:53 2010 +0000
description:
Fix device_t/softc split botches. PR port-hpcarm/43780
diffstat:
sys/arch/arm/sa11x0/sa11x0_com.c | 20 ++++++++++++--------
sys/arch/hpcarm/dev/j720pcic.c | 13 +++++++++----
2 files changed, 21 insertions(+), 12 deletions(-)
diffs (100 lines):
diff -r 88759a3f791d -r 067929caf8b4 sys/arch/arm/sa11x0/sa11x0_com.c
--- a/sys/arch/arm/sa11x0/sa11x0_com.c Thu Aug 19 14:59:24 2010 +0000
+++ b/sys/arch/arm/sa11x0/sa11x0_com.c Thu Aug 19 15:17:53 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sa11x0_com.c,v 1.46 2009/12/06 21:33:45 dyoung Exp $ */
+/* $NetBSD: sa11x0_com.c,v 1.47 2010/08/19 15:17:53 tsutsui Exp $ */
/*-
* Copyright (c) 1998, 1999, 2001 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sa11x0_com.c,v 1.46 2009/12/06 21:33:45 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sa11x0_com.c,v 1.47 2010/08/19 15:17:53 tsutsui Exp $");
#include "opt_com.h"
#include "opt_ddb.h"
@@ -159,7 +159,7 @@
#ifdef hpcarm
/* HPCARM specific functions */
-static void sacom_j720_init(struct sa11x0_softc *, struct sacom_softc *);
+static void sacom_j720_init(device_t, device_t);
#endif
#define COMUNIT_MASK 0x7ffff
@@ -234,7 +234,7 @@
#ifdef hpcarm
struct platid_data *p;
- void (*mdinit)(device_t, struct sacom_softc *);
+ void (*mdinit)(device_t, device_t);
#endif
aprint_normal("\n");
@@ -270,7 +270,7 @@
/* Do hpcarm specific initialization, if any */
if ((p = platid_search_data(&platid, sacom_platid_table)) != NULL) {
mdinit = p->data;
- (mdinit)(parent, sc);
+ (*mdinit)(parent, self);
}
#endif
@@ -1400,12 +1400,16 @@
}
static void
-sacom_j720_init(struct sa11x0_softc *parent, struct sacom_softc *sc) {
+sacom_j720_init(device_t parent, device_t self)
+{
+ struct sa11x0_softc *sasc;
+
+ sasc = device_private(parent);
/* XXX this should be done at sc->enable function */
- bus_space_write_4(parent->sc_iot, parent->sc_gpioh,
+ bus_space_write_4(sasc->sc_iot, sasc->sc_gpioh,
SAGPIO_PCR, 0xa0000);
- bus_space_write_4(parent->sc_iot, parent->sc_gpioh,
+ bus_space_write_4(sasc->sc_iot, sasc->sc_gpioh,
SAGPIO_PSR, 0x100);
}
diff -r 88759a3f791d -r 067929caf8b4 sys/arch/hpcarm/dev/j720pcic.c
--- a/sys/arch/hpcarm/dev/j720pcic.c Thu Aug 19 14:59:24 2010 +0000
+++ b/sys/arch/hpcarm/dev/j720pcic.c Thu Aug 19 15:17:53 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: j720pcic.c,v 1.6 2009/05/29 14:15:45 rjs Exp $ */
+/* $NetBSD: j720pcic.c,v 1.7 2010/08/19 15:17:53 tsutsui Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
/* Jornada 720 PCMCIA support. */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: j720pcic.c,v 1.6 2009/05/29 14:15:45 rjs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: j720pcic.c,v 1.7 2010/08/19 15:17:53 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -99,9 +99,14 @@
static void
sacpcic_attach(device_t parent, device_t self, void *aux)
{
+ struct sacc_softc *psc;
+ struct sacpcic_softc *sc;
- sacpcic_attach_common(device_private(parent),
- device_private(self), aux, j720_socket_setup);
+ psc = device_private(parent);
+ sc = device_private(self);
+ sc->sc_pc.sc_dev = self;
+
+ sacpcic_attach_common(psc, sc, aux, j720_socket_setup);
}
static void
Home |
Main Index |
Thread Index |
Old Index