Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/macppc/pci first step to make genfb work with /chao...
details: https://anonhg.NetBSD.org/src/rev/87de49554d19
branches: trunk
changeset: 346344:87de49554d19
user: macallan <macallan%NetBSD.org@localhost>
date: Fri Jul 08 22:21:52 2016 +0000
description:
first step to make genfb work with /chaos/control - don't do config space
writes on /chaos.
tested by jak
diffstat:
sys/arch/macppc/pci/bandit.c | 22 +++++++++++++++++++---
1 files changed, 19 insertions(+), 3 deletions(-)
diffs (71 lines):
diff -r 1fc204427f4f -r 87de49554d19 sys/arch/macppc/pci/bandit.c
--- a/sys/arch/macppc/pci/bandit.c Fri Jul 08 09:15:38 2016 +0000
+++ b/sys/arch/macppc/pci/bandit.c Fri Jul 08 22:21:52 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bandit.c,v 1.31 2015/10/02 05:22:51 msaitoh Exp $ */
+/* $NetBSD: bandit.c,v 1.32 2016/07/08 22:21:52 macallan Exp $ */
/*-
* Copyright (c) 2000 Tsubai Masanari. All rights reserved.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bandit.c,v 1.31 2015/10/02 05:22:51 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bandit.c,v 1.32 2016/07/08 22:21:52 macallan Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -46,6 +46,7 @@
struct genppc_pci_chipset sc_pc;
struct powerpc_bus_space sc_iot;
struct powerpc_bus_space sc_memt;
+ boolean_t sc_is_chaos;
};
static void bandit_attach(device_t, device_t, void *);
@@ -53,6 +54,7 @@
static pcireg_t bandit_conf_read(void *, pcitag_t, int);
static void bandit_conf_write(void *, pcitag_t, int, pcireg_t);
+static void chaos_conf_write(void *, pcitag_t, int, pcireg_t);
static void bandit_init(struct bandit_softc *);
@@ -89,6 +91,8 @@
aprint_normal("\n");
sc->sc_dev = self;
+ sc->sc_is_chaos = (strcmp(ca->ca_name, "chaos") == 0);
+
/* Bandit address */
if (OF_getprop(node, "reg", reg, sizeof(reg)) < 8)
return;
@@ -131,7 +135,10 @@
pc->pc_data = mapiodev(reg[0] + 0xc00000, 8, false);
pc->pc_bus = busrange[0];
pc->pc_conf_read = bandit_conf_read;
- pc->pc_conf_write = bandit_conf_write;
+ if (sc->sc_is_chaos) {
+ pc->pc_conf_write = chaos_conf_write;
+ } else
+ pc->pc_conf_write = bandit_conf_write;
bandit_init(sc);
@@ -225,6 +232,15 @@
splx(s);
}
+/*
+ * XXX
+ * /chaos really hates writes to config space, so we just don't do them
+ */
+static void
+chaos_conf_write(void *cookie, pcitag_t tag, int reg, pcireg_t data)
+{
+}
+
#define PCI_BANDIT 11
#define PCI_REG_MODE_SELECT 0x50
Home |
Main Index |
Thread Index |
Old Index