diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2003-09-06 22:24:15 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2003-09-06 22:24:15 +0000 |
commit | 26436ffa8c425e275487cb04c9b48e76cf5c1ff8 (patch) | |
tree | a51a97ddf1c862db85cb17cc6e9ef9781abaefa8 /sys/dev | |
parent | 82222111187dc4f6b4ee306751765ea7e73df985 (diff) |
A couple of hppa-only changes, allowing siop to work on pci hppa
machines.
Align siop_xfer on 128 byte boundary, and don't use on-board RAM.
Aligning siop_xfer will be made general, post-3.4.
From mickey@.
ok deraadt@ mickey@.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/siopvar.h | 7 | ||||
-rw-r--r-- | sys/dev/ic/siopvar_common.h | 7 | ||||
-rw-r--r-- | sys/dev/pci/siop_pci_common.c | 6 |
3 files changed, 17 insertions, 3 deletions
diff --git a/sys/dev/ic/siopvar.h b/sys/dev/ic/siopvar.h index 7cbde2ef2b8..25f74aa6fb2 100644 --- a/sys/dev/ic/siopvar.h +++ b/sys/dev/ic/siopvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: siopvar.h,v 1.6 2002/09/16 00:53:12 krw Exp $ */ +/* $OpenBSD: siopvar.h,v 1.7 2003/09/06 22:24:14 krw Exp $ */ /* $NetBSD: siopvar.h,v 1.18 2002/04/23 20:41:15 bouyer Exp $ */ /* @@ -43,7 +43,12 @@ struct siop_xfer { struct siop_common_xfer siop_tables; /* u_int32_t resel[sizeof(load_dsa) / sizeof(load_dsa[0])]; */ +#ifdef __hppa__ + /* XXX Add some entries to make size 384 bytes (256+128) */ + u_int32_t resel[36]; +#else u_int32_t resel[25]; +#endif } __attribute__((__packed__)); /* diff --git a/sys/dev/ic/siopvar_common.h b/sys/dev/ic/siopvar_common.h index ce5741c15b4..9a281de76a5 100644 --- a/sys/dev/ic/siopvar_common.h +++ b/sys/dev/ic/siopvar_common.h @@ -1,4 +1,4 @@ -/* $OpenBSD: siopvar_common.h,v 1.14 2003/07/01 17:15:06 krw Exp $ */ +/* $OpenBSD: siopvar_common.h,v 1.15 2003/09/06 22:24:14 krw Exp $ */ /* $NetBSD: siopvar_common.h,v 1.22 2002/10/23 02:32:36 christos Exp $ */ /* @@ -44,7 +44,12 @@ typedef struct scr_table { } scr_table_t __attribute__((__packed__)); /* Number of scatter/gather entries */ +#ifdef __hppa__ +/* XXX Ensure alignment of siop_xfer's. For hppa only at the moment. */ +#define SIOP_NSG 17 /* XXX (MAXPHYS/NBPG + 1) */ +#else #define SIOP_NSG (MAXPHYS/NBPG + 1) /* XXX NBPG */ +#endif /* * This structure interfaces the SCRIPT with the driver; it describes a full diff --git a/sys/dev/pci/siop_pci_common.c b/sys/dev/pci/siop_pci_common.c index f90d620e8c9..301634027e3 100644 --- a/sys/dev/pci/siop_pci_common.c +++ b/sys/dev/pci/siop_pci_common.c @@ -1,4 +1,4 @@ -/* $OpenBSD: siop_pci_common.c,v 1.9 2002/09/16 00:53:12 krw Exp $ */ +/* $OpenBSD: siop_pci_common.c,v 1.10 2003/09/06 22:24:14 krw Exp $ */ /* $NetBSD: siop_pci_common.c,v 1.17 2002/05/04 18:11:06 bouyer Exp $ */ /* @@ -233,6 +233,10 @@ siop_pci_attach_common(pci_sc, siop_sc, pa, intr) } /* copy interesting infos about the chip */ siop_sc->features = pci_sc->sc_pp->features; +#ifdef __hppa__ + /* XXX On board ram doesn't work (yet?) on hppa. */ + siop_sc->features &= ~SF_CHIP_RAM; +#endif #ifdef SIOP_SYMLED /* XXX Should be a devprop! */ siop_sc->features |= SF_CHIP_LED0; #endif |