diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-06-24 11:38:41 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2009-06-24 11:38:41 +0000 |
commit | 17a9c2cb31dc9e022ae56cd4a1e3d659fdf177c5 (patch) | |
tree | 76f7c9cbd404605bb054a3b1310d5e77be5d6972 /sys/dev | |
parent | 74eb12422d55fa5cd187c1f16e494a3545c33d4c (diff) |
for the isp(4) driver, invert the meaning of the options which pull
firmwares into the smaller (and larger) media
ok krw
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/isp_pci.c | 66 | ||||
-rw-r--r-- | sys/dev/sbus/isp_sbus.c | 16 |
2 files changed, 67 insertions, 15 deletions
diff --git a/sys/dev/pci/isp_pci.c b/sys/dev/pci/isp_pci.c index a0caffdc95c..4b8c6ce001f 100644 --- a/sys/dev/pci/isp_pci.c +++ b/sys/dev/pci/isp_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: isp_pci.c,v 1.47 2009/06/24 11:00:53 krw Exp $ */ +/* $OpenBSD: isp_pci.c,v 1.48 2009/06/24 11:38:40 deraadt Exp $ */ /* $FreeBSD: src/sys/dev/isp/isp_pci.c,v 1.148 2007/06/26 23:08:57 mjacob Exp $*/ /*- * Copyright (c) 1997-2006 by Matthew Jacob @@ -44,15 +44,63 @@ #include <mips64/archtype.h> #endif +#ifndef ISP_NOFIRMWARE +#define ISP_FIRMWARE_1040 +#define ISP_FIRMWARE_1080 +#define ISP_FIRMWARE_12160 +#define ISP_FIRMWARE_2100 +#define ISP_FIRMWARE_2200 +#define ISP_FIRMWARE_2300 +#endif + +#if defined(ISP_FIRMWARE_1040) +#define ISP_1040_RISC_CODE (u_int16_t *) isp_1040_risc_code #include <dev/microcode/isp/asm_1040.h> +#else +#define ISP_1040_RISC_CODE NULL +#endif + +#if defined(ISP_FIRMWARE_1080) +#define ISP_1080_RISC_CODE (u_int16_t *) isp_1080_risc_code #include <dev/microcode/isp/asm_1080.h> +#else +#define ISP_1080_RISC_CODE NULL +#endif + +#if defined(ISP_FIRMWARE_12160) +#define ISP_12160_RISC_CODE (u_int16_t *) isp_12160_risc_code #include <dev/microcode/isp/asm_12160.h> +#else +#define ISP_12160_RISC_CODE NULL +#endif + +#if defined(ISP_FIRMWARE_2100) +#define ISP_2100_RISC_CODE (u_int16_t *) isp_2100_risc_code #include <dev/microcode/isp/asm_2100.h> +#else +#define ISP_2100_RISC_CODE NULL +#endif + +#if defined(ISP_FIRMWARE_2200) +#define ISP_2200_RISC_CODE (u_int16_t *) isp_2200_risc_code #include <dev/microcode/isp/asm_2200.h> +#else +#define ISP_2200_RISC_CODE NULL +#endif + +#if defined(ISP_FIRMWARE_2300) +#define ISP_2300_RISC_CODE (u_int16_t *) isp_2300_risc_code #include <dev/microcode/isp/asm_2300.h> -#include <dev/microcode/isp/asm_2400.h> +#else +#define ISP_2300_RISC_CODE NULL +#endif -#define BUS_PROBE_DEFAULT 0 +#if defined(ISP_FIRMWARE_2400) +#define ISP_2400_RISC_CODE (u_int16_t *) isp_2400_risc_code +#include <dev/microcode/isp/asm_2400.h> +#else +#define ISP_2400_RISC_CODE NULL +#endif uint32_t isp_pci_rd_reg(ispsoftc_t *, int); void isp_pci_wr_reg(ispsoftc_t *, int, uint32_t); @@ -84,7 +132,7 @@ static struct ispmdvec mdvec = { isp_pci_reset0, isp_pci_reset1, isp_pci_dumpregs, - NULL, + ISP_1040_RISC_CODE, BIU_BURST_ENABLE|BIU_PCI_CONF1_FIFO_64 }; @@ -98,7 +146,7 @@ static struct ispmdvec mdvec_1080 = { isp_pci_reset0, isp_pci_reset1, isp_pci_dumpregs, - isp_1080_risc_code, + ISP_1080_RISC_CODE, BIU_BURST_ENABLE|BIU_PCI_CONF1_FIFO_64 }; @@ -112,7 +160,7 @@ static struct ispmdvec mdvec_12160 = { isp_pci_reset0, isp_pci_reset1, isp_pci_dumpregs, - isp_12160_risc_code, + ISP_12160_RISC_CODE, BIU_BURST_ENABLE|BIU_PCI_CONF1_FIFO_64 }; @@ -126,7 +174,7 @@ static struct ispmdvec mdvec_2100 = { isp_pci_reset0, isp_pci_reset1, isp_pci_dumpregs, - isp_2100_risc_code + ISP_2100_RISC_CODE }; static struct ispmdvec mdvec_2200 = { @@ -139,7 +187,7 @@ static struct ispmdvec mdvec_2200 = { isp_pci_reset0, isp_pci_reset1, isp_pci_dumpregs, - isp_2200_risc_code + ISP_2200_RISC_CODE }; static struct ispmdvec mdvec_2300 = { @@ -152,7 +200,7 @@ static struct ispmdvec mdvec_2300 = { isp_pci_reset0, isp_pci_reset1, isp_pci_dumpregs, - isp_2300_risc_code + ISP_2300_RISC_CODE }; static struct ispmdvec mdvec_2400 = { diff --git a/sys/dev/sbus/isp_sbus.c b/sys/dev/sbus/isp_sbus.c index a92dfaebc20..d23bf3066f8 100644 --- a/sys/dev/sbus/isp_sbus.c +++ b/sys/dev/sbus/isp_sbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: isp_sbus.c,v 1.13 2009/06/24 11:00:53 krw Exp $ */ +/* $OpenBSD: isp_sbus.c,v 1.14 2009/06/24 11:38:40 deraadt Exp $ */ /* $NetBSD: isp_sbus.c,v 1.46 2001/09/26 20:53:14 eeh Exp $ */ /* @@ -72,9 +72,17 @@ #include <machine/autoconf.h> #include <dev/ic/isp_openbsd.h> -#if defined(ISP_COMPILE_FW) || defined(ISP_COMPILE_1000_FW) + +#ifndef ISP_NOFIRMWARE +#define ISP_FIRMWARE_1000 +#endif + +#if defined(ISP_FIRMWARE_1000) #include <dev/microcode/isp/asm_sbus.h> +#else +#define ISP_1000_RISC_CODE NULL #endif + #include <dev/sbus/sbusvar.h> static int isp_sbus_intr(void *); @@ -87,10 +95,6 @@ static int isp_sbus_dmasetup(struct ispsoftc *, XS_T *, ispreq_t *, u_int32_t *, u_int32_t); static void isp_sbus_dmateardown(struct ispsoftc *, XS_T *, u_int32_t); -#ifndef ISP_1000_RISC_CODE -#define ISP_1000_RISC_CODE NULL -#endif - static struct ispmdvec mdvec = { isp_sbus_rd_isr, isp_sbus_rd_reg, |