Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/macppc more device/softc splitting
details: https://anonhg.NetBSD.org/src/rev/1b63f1b8122c
branches: trunk
changeset: 770631:1b63f1b8122c
user: macallan <macallan%NetBSD.org@localhost>
date: Wed Oct 26 13:54:18 2011 +0000
description:
more device/softc splitting
diffstat:
sys/arch/macppc/dev/uni-n.c | 9 +++++----
sys/arch/macppc/macppc/memory.c | 9 +++++----
2 files changed, 10 insertions(+), 8 deletions(-)
diffs (84 lines):
diff -r 5a7c9b361cc3 -r 1b63f1b8122c sys/arch/macppc/dev/uni-n.c
--- a/sys/arch/macppc/dev/uni-n.c Wed Oct 26 09:02:20 2011 +0000
+++ b/sys/arch/macppc/dev/uni-n.c Wed Oct 26 13:54:18 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uni-n.c,v 1.5 2011/06/18 08:08:28 matt Exp $ */
+/* $NetBSD: uni-n.c,v 1.6 2011/10/26 13:54:18 macallan Exp $ */
/*-
* Copyright (C) 2005 Michael Lorenz.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uni-n.c,v 1.5 2011/06/18 08:08:28 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uni-n.c,v 1.6 2011/10/26 13:54:18 macallan Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -47,11 +47,11 @@
static int uni_n_print(void *, const char *);
struct uni_n_softc {
- struct device sc_dev;
+ device_t sc_dev;
int sc_node;
};
-CFATTACH_DECL(uni_n, sizeof(struct uni_n_softc),
+CFATTACH_DECL_NEW(uni_n, sizeof(struct uni_n_softc),
uni_n_match, uni_n_attach, NULL, NULL);
int
@@ -84,6 +84,7 @@
int intr[6];
char name[32];
+ sc->sc_dev = self;
node = OF_finddevice("/uni-n");
sc->sc_node = node;
printf(" address 0x%08x\n",our_ca->ca_reg[0]);
diff -r 5a7c9b361cc3 -r 1b63f1b8122c sys/arch/macppc/macppc/memory.c
--- a/sys/arch/macppc/macppc/memory.c Wed Oct 26 09:02:20 2011 +0000
+++ b/sys/arch/macppc/macppc/memory.c Wed Oct 26 13:54:18 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: memory.c,v 1.4 2011/06/18 08:08:28 matt Exp $ */
+/* $NetBSD: memory.c,v 1.5 2011/10/26 13:54:18 macallan Exp $ */
/* $OpenBSD: mem.c,v 1.15 2007/10/14 17:29:04 kettenis Exp $ */
/*-
@@ -46,7 +46,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: memory.c,v 1.4 2011/06/18 08:08:28 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: memory.c,v 1.5 2011/10/26 13:54:18 macallan Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -60,7 +60,7 @@
#include <dev/ofw/openfirm.h>
struct memory_softc {
- struct device sc_dev;
+ device_t sc_dev;
u_char *sc_buf;
int sc_len;
@@ -72,7 +72,7 @@
int memory_match(device_t, cfdata_t, void *);
void memory_attach(device_t, device_t, void *);
-CFATTACH_DECL(memory, sizeof(struct memory_softc), memory_match, memory_attach,
+CFATTACH_DECL_NEW(memory, sizeof(struct memory_softc), memory_match, memory_attach,
NULL, NULL);
int memory_i2c_acquire_bus(void *, int);
@@ -98,6 +98,7 @@
struct i2c_controller ic;
struct i2c_attach_args ia;
+ sc->sc_dev = self;
sc->sc_len = OF_getproplen(ca->ca_node, "dimm-info");
if (sc->sc_len > 0) {
sc->sc_buf = malloc(sc->sc_len, M_DEVBUF, M_NOWAIT);
Home |
Main Index |
Thread Index |
Old Index