summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2006-05-12 05:04:46 +0000
committerjhb <jhb@FreeBSD.org>2006-05-12 05:04:46 +0000
commit0f921e0992f543c4aafd5604a99a6edaa059ff36 (patch)
tree9e7fa374ce86cf10beca9d2dca94fc077a700745 /sys/dev
parent95826ec6b414b9b651fe4cf4b08cf9e0e16a11f2 (diff)
downloadFreeBSD-src-0f921e0992f543c4aafd5604a99a6edaa059ff36.zip
FreeBSD-src-0f921e0992f543c4aafd5604a99a6edaa059ff36.tar.gz
Remove various bits of conditional Alpha code and fixup a few comments.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/agp/agp.c10
-rw-r--r--sys/dev/asr/asr.c5
-rw-r--r--sys/dev/ata/ata-all.c3
-rw-r--r--sys/dev/ata/ata-pci.c20
-rw-r--r--sys/dev/atkbdc/atkbd.c2
-rw-r--r--sys/dev/atkbdc/atkbdc.c2
-rw-r--r--sys/dev/dc/if_dc.c49
-rw-r--r--sys/dev/de/if_de.c39
-rw-r--r--sys/dev/lge/if_lgereg.h5
-rw-r--r--sys/dev/nge/if_ngereg.h5
-rw-r--r--sys/dev/pdq/pdq_freebsd.h4
-rw-r--r--sys/dev/pdq/pdqvar.h2
-rw-r--r--sys/dev/ppc/ppc.c9
-rw-r--r--sys/dev/sf/if_sfreg.h5
-rw-r--r--sys/dev/sound/isa/gusc.c3
-rw-r--r--sys/dev/sym/sym_hipd.c2
-rw-r--r--sys/dev/syscons/scterm-sc.c12
-rw-r--r--sys/dev/syscons/scvgarndr.c8
-rw-r--r--sys/dev/syscons/syscons.h2
-rw-r--r--sys/dev/vr/if_vrreg.h6
20 files changed, 7 insertions, 186 deletions
diff --git a/sys/dev/agp/agp.c b/sys/dev/agp/agp.c
index a0deb5f..b4ef386 100644
--- a/sys/dev/agp/agp.c
+++ b/sys/dev/agp/agp.c
@@ -90,12 +90,6 @@ agp_flush_cache()
#if defined(__i386__) || defined(__amd64__)
wbinvd();
#endif
-#ifdef __alpha__
- /* FIXME: This is most likely not correct as it doesn't flush CPU
- * write caches, but we don't have a facility to do that and
- * this is all linux does, too */
- alpha_mb();
-#endif
}
u_int8_t
@@ -507,10 +501,6 @@ agp_generic_bind_memory(device_t dev, struct agp_memory *mem,
/*
* Bind the individual pages and flush the chipset's
* TLB.
- *
- * XXX Presumably, this needs to be the pci address on alpha
- * (i.e. use alpha_XXX_dmamap()). I don't have access to any
- * alpha AGP hardware to check.
*/
VM_OBJECT_LOCK(mem->am_obj);
for (i = 0; i < mem->am_size; i += PAGE_SIZE) {
diff --git a/sys/dev/asr/asr.c b/sys/dev/asr/asr.c
index 510078d..66b5146 100644
--- a/sys/dev/asr/asr.c
+++ b/sys/dev/asr/asr.c
@@ -146,9 +146,6 @@
#define ASR_IOCTL_COMPAT
#endif /* ASR_COMPAT */
#endif /* !BURN_BRIDGES */
-
-#elif defined(__alpha__)
-#include <alpha/include/pmap.h>
#endif
#include <machine/vmparam.h>
@@ -3715,8 +3712,6 @@ asr_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *t
case CPU_686:
Info.processorType = PROC_SEXIUM; break;
}
-#elif defined(__alpha__)
- Info.processorType = PROC_ALPHA;
#endif
Info.osType = OS_BSDI_UNIX;
diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c
index e9cffe1..d76b11b 100644
--- a/sys/dev/ata/ata-all.c
+++ b/sys/dev/ata/ata-all.c
@@ -47,9 +47,6 @@ __FBSDID("$FreeBSD$");
#include <machine/resource.h>
#include <machine/bus.h>
#include <sys/rman.h>
-#ifdef __alpha__
-#include <machine/md_var.h>
-#endif
#include <dev/ata/ata-all.h>
#include <ata_if.h>
diff --git a/sys/dev/ata/ata-pci.c b/sys/dev/ata/ata-pci.c
index 38d3c06..e322757 100644
--- a/sys/dev/ata/ata-pci.c
+++ b/sys/dev/ata/ata-pci.c
@@ -42,9 +42,6 @@ __FBSDID("$FreeBSD$");
#include <machine/stdarg.h>
#include <machine/resource.h>
#include <machine/bus.h>
-#ifdef __alpha__
-#include <machine/md_var.h>
-#endif
#include <sys/rman.h>
#include <dev/pci/pcivar.h>
#include <dev/pci/pcireg.h>
@@ -288,14 +285,10 @@ ata_pci_alloc_resource(device_t dev, device_t child, int type, int *rid,
}
if (type == SYS_RES_IRQ && *rid == ATA_IRQ_RID) {
if (ata_legacy(dev)) {
-#ifdef __alpha__
- res = alpha_platform_alloc_ide_intr(unit);
-#else
int irq = (unit == 0 ? 14 : 15);
res = BUS_ALLOC_RESOURCE(device_get_parent(dev), child,
SYS_RES_IRQ, rid, irq, irq, 1, flags);
-#endif
}
else
res = controller->r_irq;
@@ -331,12 +324,8 @@ ata_pci_release_resource(device_t dev, device_t child, int type, int rid,
return ENOENT;
if (ata_legacy(dev)) {
-#ifdef __alpha__
- return alpha_platform_release_ide_intr(unit, r);
-#else
return BUS_RELEASE_RESOURCE(device_get_parent(dev), child,
SYS_RES_IRQ, rid, r);
-#endif
}
else
return 0;
@@ -350,13 +339,8 @@ ata_pci_setup_intr(device_t dev, device_t child, struct resource *irq,
void **cookiep)
{
if (ata_legacy(dev)) {
-#ifdef __alpha__
- return alpha_platform_setup_ide_intr(child, irq, function, argument,
- cookiep);
-#else
return BUS_SETUP_INTR(device_get_parent(dev), child, irq,
flags, function, argument, cookiep);
-#endif
}
else {
struct ata_pci_controller *controller = device_get_softc(dev);
@@ -374,11 +358,7 @@ ata_pci_teardown_intr(device_t dev, device_t child, struct resource *irq,
void *cookie)
{
if (ata_legacy(dev)) {
-#ifdef __alpha__
- return alpha_platform_teardown_ide_intr(child, irq, cookie);
-#else
return BUS_TEARDOWN_INTR(device_get_parent(dev), child, irq, cookie);
-#endif
}
else {
struct ata_pci_controller *controller = device_get_softc(dev);
diff --git a/sys/dev/atkbdc/atkbd.c b/sys/dev/atkbdc/atkbd.c
index 9987787..19bd7a3 100644
--- a/sys/dev/atkbdc/atkbd.c
+++ b/sys/dev/atkbdc/atkbd.c
@@ -1330,7 +1330,7 @@ init_keyboard(KBDC kbdc, int *type, int flags)
}
}
-#if defined(__alpha__) || defined(__sparc64__)
+#if defined(__sparc64__)
if (send_kbd_command_and_data(
kbdc, KBDC_SET_SCANCODE_SET, 2) != KBD_ACK) {
printf("atkbd: can't set translation.\n");
diff --git a/sys/dev/atkbdc/atkbdc.c b/sys/dev/atkbdc/atkbdc.c
index 247a116..248ac2f 100644
--- a/sys/dev/atkbdc/atkbdc.c
+++ b/sys/dev/atkbdc/atkbdc.c
@@ -174,8 +174,6 @@ atkbdc_configure(void)
tag = I386_BUS_SPACE_IO;
#elif defined(__amd64__)
tag = AMD64_BUS_SPACE_IO;
-#elif defined(__alpha__)
- tag = busspace_isa_io;
#elif defined(__ia64__)
tag = IA64_BUS_SPACE_IO;
#elif defined(__sparc64__)
diff --git a/sys/dev/dc/if_dc.c b/sys/dev/dc/if_dc.c
index 1d781bd..fb141ea 100644
--- a/sys/dev/dc/if_dc.c
+++ b/sys/dev/dc/if_dc.c
@@ -128,9 +128,6 @@ __FBSDID("$FreeBSD$");
#include <dev/pci/pcivar.h>
#define DC_USEIOSPACE
-#ifdef __alpha__
-#define SRM_MEDIA
-#endif
#include <dev/dc/if_dcreg.h>
@@ -2281,32 +2278,6 @@ dc_attach(device_t dev)
callout_init_mtx(&sc->dc_stat_ch, &sc->dc_mtx, 0);
-#ifdef SRM_MEDIA
- sc->dc_srm_media = 0;
-
- /* Remember the SRM console media setting */
- if (DC_IS_INTEL(sc)) {
- command = pci_read_config(dev, DC_PCI_CFDD, 4);
- command &= ~(DC_CFDD_SNOOZE_MODE | DC_CFDD_SLEEP_MODE);
- switch ((command >> 8) & 0xff) {
- case 3:
- sc->dc_srm_media = IFM_10_T;
- break;
- case 4:
- sc->dc_srm_media = IFM_10_T | IFM_FDX;
- break;
- case 5:
- sc->dc_srm_media = IFM_100_TX;
- break;
- case 6:
- sc->dc_srm_media = IFM_100_TX | IFM_FDX;
- break;
- }
- if (sc->dc_srm_media)
- sc->dc_srm_media |= IFM_ACTIVE | IFM_ETHER;
- }
-#endif
-
/*
* Call MI attach routine.
*/
@@ -3400,19 +3371,7 @@ dc_init(void *xsc)
DC_LOCK(sc);
dc_init_locked(sc);
-#ifdef SRM_MEDIA
- if(sc->dc_srm_media) {
- struct ifreq ifr;
- struct mii_data *mii;
-
- ifr.ifr_media = sc->dc_srm_media;
- sc->dc_srm_media = 0;
- DC_UNLOCK(sc);
- mii = device_get_softc(sc->dc_miibus);
- ifmedia_ioctl(sc->dc_ifp, &ifr, &mii->mii_media, SIOCSIFMEDIA);
- } else
-#endif
- DC_UNLOCK(sc);
+ DC_UNLOCK(sc);
}
static void
@@ -3684,12 +3643,6 @@ dc_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
case SIOCSIFMEDIA:
mii = device_get_softc(sc->dc_miibus);
error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, command);
-#ifdef SRM_MEDIA
- DC_LOCK(sc);
- if (sc->dc_srm_media)
- sc->dc_srm_media = 0;
- DC_UNLOCK(sc);
-#endif
break;
case SIOCSIFCAP:
#ifdef DEVICE_POLLING
diff --git a/sys/dev/de/if_de.c b/sys/dev/de/if_de.c
index aee08fd..ea7451e 100644
--- a/sys/dev/de/if_de.c
+++ b/sys/dev/de/if_de.c
@@ -4436,15 +4436,6 @@ tulip_attach(tulip_softc_t * const sc)
== TULIP_HAVE_ISVSROM ? " (invalid EESPROM checksum)" : "");
TULIP_LOCK(sc);
-#if defined(__alpha__)
- /*
- * In case the SRM console told us about a bogus media,
- * we need to check to be safe.
- */
- if (sc->tulip_mediums[sc->tulip_media] == NULL)
- sc->tulip_media = TULIP_MEDIA_UNKNOWN;
-#endif
-
(*sc->tulip_boardsw->bd_media_probe)(sc);
ifmedia_init(&sc->tulip_ifmedia, 0,
tulip_ifmedia_change,
@@ -4749,9 +4740,6 @@ static int
tulip_pci_attach(device_t dev)
{
tulip_softc_t *sc;
-#if defined(__alpha__)
- tulip_media_t media = TULIP_MEDIA_UNKNOWN;
-#endif
int retval, idx;
u_int32_t revinfo, cfdainfo;
unsigned csroffset = TULIP_PCI_CSROFFSET;
@@ -4829,23 +4817,6 @@ tulip_pci_attach(device_t dev)
pci_write_config(dev, PCI_CFDA, cfdainfo, 4);
DELAY(11*1000);
}
-#if defined(__alpha__)
- /*
- * The Alpha SRM console encodes a console set media in the driver
- * part of the CFDA register. Note that the Multia presents a
- * problem in that its BNC mode is really EXTSIA. So in that case
- * force a probe.
- */
- switch ((cfdainfo >> 8) & 0xff) {
- case 1: media = chipid > TULIP_21040 ? TULIP_MEDIA_AUI : TULIP_MEDIA_AUIBNC; break;
- case 2: media = chipid > TULIP_21040 ? TULIP_MEDIA_BNC : TULIP_MEDIA_UNKNOWN; break;
- case 3: media = TULIP_MEDIA_10BASET; break;
- case 4: media = TULIP_MEDIA_10BASET_FD; break;
- case 5: media = TULIP_MEDIA_100BASETX; break;
- case 6: media = TULIP_MEDIA_100BASETX_FD; break;
- default: media = TULIP_MEDIA_UNKNOWN; break;
- }
-#endif
sc->tulip_unit = unit;
sc->tulip_revinfo = revinfo;
@@ -4911,9 +4882,6 @@ tulip_pci_attach(device_t dev)
if (sc->tulip_features & TULIP_HAVE_SHAREDINTR)
intr_rtn = tulip_intr_shared;
-#if defined(__alpha__)
- sc->tulip_media = media;
-#endif
tulip_attach(sc);
/* Setup interrupt last. */
@@ -4933,13 +4901,6 @@ tulip_pci_attach(device_t dev)
return ENXIO;
}
}
-
-#if defined(__alpha__)
- TULIP_LOCK(sc);
- if (sc->tulip_media != TULIP_MEDIA_UNKNOWN)
- tulip_linkup(sc, media);
- TULIP_UNLOCK(sc);
-#endif
}
return 0;
}
diff --git a/sys/dev/lge/if_lgereg.h b/sys/dev/lge/if_lgereg.h
index 53889f3..4808607 100644
--- a/sys/dev/lge/if_lgereg.h
+++ b/sys/dev/lge/if_lgereg.h
@@ -607,8 +607,3 @@ struct lge_softc {
#define LGE_PSTATE_D3 0x0003
#define LGE_PME_EN 0x0010
#define LGE_PME_STATUS 0x8000
-
-#ifdef __alpha__
-#undef vtophys
-#define vtophys(va) alpha_XXX_dmamap((vm_offset_t)va)
-#endif
diff --git a/sys/dev/nge/if_ngereg.h b/sys/dev/nge/if_ngereg.h
index caedfcb..913b1ee 100644
--- a/sys/dev/nge/if_ngereg.h
+++ b/sys/dev/nge/if_ngereg.h
@@ -731,8 +731,3 @@ struct nge_softc {
#define NGE_PSTATE_D3 0x0003
#define NGE_PME_EN 0x0010
#define NGE_PME_STATUS 0x8000
-
-#ifdef __alpha__
-#undef vtophys
-#define vtophys(va) alpha_XXX_dmamap((vm_offset_t)va)
-#endif
diff --git a/sys/dev/pdq/pdq_freebsd.h b/sys/dev/pdq/pdq_freebsd.h
index d6932fb..e2ad2b4 100644
--- a/sys/dev/pdq/pdq_freebsd.h
+++ b/sys/dev/pdq/pdq_freebsd.h
@@ -164,11 +164,7 @@ typedef struct _pdq_os_ctx_t {
#define PDQ_OS_CSR_FMT "0x%x"
#define PDQ_OS_USEC_DELAY(n) DELAY(n)
-#ifdef __alpha__
-#define PDQ_OS_VA_TO_BUSPA(pdq, p) alpha_XXX_dmamap((vm_offset_t)p)
-#else
#define PDQ_OS_VA_TO_BUSPA(pdq, p) vtophys(p)
-#endif
#define PDQ_OS_MEMALLOC(n) malloc(n, M_DEVBUF, M_NOWAIT)
#define PDQ_OS_MEMFREE(p, n) free((void *) p, M_DEVBUF)
diff --git a/sys/dev/pdq/pdqvar.h b/sys/dev/pdq/pdqvar.h
index de576ba..5e85ca9 100644
--- a/sys/dev/pdq/pdqvar.h
+++ b/sys/dev/pdq/pdqvar.h
@@ -165,7 +165,7 @@ typedef struct _pdq_os_ctx_t {
struct ifmedia sc_ifmedia;
#endif
pdq_t *sc_pdq;
-#if defined(__alpha__) || defined(__i386__)
+#if defined(__i386__)
pdq_bus_ioport_t sc_iobase;
#endif
#if defined(PDQ_IOMAPPED)
diff --git a/sys/dev/ppc/ppc.c b/sys/dev/ppc/ppc.c
index 48a9889..5d4e68d 100644
--- a/sys/dev/ppc/ppc.c
+++ b/sys/dev/ppc/ppc.c
@@ -1681,15 +1681,6 @@ ppc_probe(device_t dev, int rid)
IO_LPTSIZE_EXTENDED);
}
#endif
-#ifdef __alpha__
- /*
- * There isn't a bios list on alpha. Put it in the usual place.
- */
- if (error) {
- bus_set_resource(dev, SYS_RES_IOPORT, rid, 0x3bc,
- IO_LPTSIZE_NORMAL);
- }
-#endif
/* IO port is mandatory */
diff --git a/sys/dev/sf/if_sfreg.h b/sys/dev/sf/if_sfreg.h
index 652f804..9b3826d 100644
--- a/sys/dev/sf/if_sfreg.h
+++ b/sys/dev/sf/if_sfreg.h
@@ -1056,8 +1056,3 @@ struct sf_softc {
#define SF_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->sf_mtx, MA_OWNED)
#define SF_TIMEOUT 1000
-
-#ifdef __alpha__
-#undef vtophys
-#define vtophys(va) alpha_XXX_dmamap((vm_offset_t)va)
-#endif
diff --git a/sys/dev/sound/isa/gusc.c b/sys/dev/sound/isa/gusc.c
index cb1b1ad..36adec4 100644
--- a/sys/dev/sound/isa/gusc.c
+++ b/sys/dev/sound/isa/gusc.c
@@ -41,9 +41,6 @@
#include <isa/isavar.h>
#include <isa/isa_common.h>
-#ifdef __alpha__ /* XXX workaround a stupid warning */
-#include <alpha/isa/isavar.h>
-#endif
SND_DECLARE_FILE("$FreeBSD$");
diff --git a/sys/dev/sym/sym_hipd.c b/sys/dev/sym/sym_hipd.c
index 6d355b0..9a2549e 100644
--- a/sys/dev/sym/sym_hipd.c
+++ b/sys/dev/sym/sym_hipd.c
@@ -137,8 +137,6 @@ typedef u_int32_t u32;
#if defined __i386__ || defined __amd64__
#define MEMORY_BARRIER() do { ; } while(0)
-#elif defined __alpha__
-#define MEMORY_BARRIER() alpha_mb()
#elif defined __powerpc__
#define MEMORY_BARRIER() __asm__ volatile("eieio; sync" : : : "memory")
#elif defined __ia64__
diff --git a/sys/dev/syscons/scterm-sc.c b/sys/dev/syscons/scterm-sc.c
index aa240aa..e89debb 100644
--- a/sys/dev/syscons/scterm-sc.c
+++ b/sys/dev/syscons/scterm-sc.c
@@ -178,22 +178,10 @@ static void
scterm_scan_esc(scr_stat *scp, term_stat *tcp, u_char c)
{
static u_char ansi_col[16] = {
-#ifdef __alpha__
- /*
- * DEC is evil. They switch the red and blue attributes in
- * the palette in the system console. As a simple work-around,
- * re-map the ANSI colors appropriately.
- */
- FG_BLACK, FG_BLUE, FG_GREEN, FG_CYAN,
- FG_RED, FG_MAGENTA, FG_BROWN, FG_LIGHTGREY,
- FG_DARKGREY, FG_LIGHTBLUE, FG_LIGHTGREEN, FG_LIGHTCYAN,
- FG_LIGHTRED, FG_LIGHTMAGENTA, FG_YELLOW, FG_WHITE
-#else
FG_BLACK, FG_RED, FG_GREEN, FG_BROWN,
FG_BLUE, FG_MAGENTA, FG_CYAN, FG_LIGHTGREY,
FG_DARKGREY, FG_LIGHTRED, FG_LIGHTGREEN, FG_YELLOW,
FG_LIGHTBLUE, FG_LIGHTMAGENTA, FG_LIGHTCYAN, FG_WHITE
-#endif
};
static int cattrs[] = {
0, /* block */
diff --git a/sys/dev/syscons/scvgarndr.c b/sys/dev/syscons/scvgarndr.c
index 81498ec..5b056d3 100644
--- a/sys/dev/syscons/scvgarndr.c
+++ b/sys/dev/syscons/scvgarndr.c
@@ -1038,7 +1038,7 @@ draw_pxlmouse_planar(scr_stat *scp, int x, int y)
#if defined(__i386__) || defined(__amd64__)
*(u_char *)p &= m >> 8;
*(u_char *)(p + 1) &= m;
-#elif defined(__alpha__)
+#else
writeb(p, readb(p) & (m >> 8));
writeb(p + 1, readb(p + 1) & (m >> 8));
#endif
@@ -1050,7 +1050,7 @@ draw_pxlmouse_planar(scr_stat *scp, int x, int y)
m = ~(mouse_and_mask[j] >> xoff);
#if defined(__i386__) || defined(__amd64__)
*(u_char *)p &= m;
-#elif defined(__alpha__)
+#else
writeb(p, readb(p) & (m >> 8));
#endif
p += line_width;
@@ -1064,7 +1064,7 @@ draw_pxlmouse_planar(scr_stat *scp, int x, int y)
#if defined(__i386__) || defined(__amd64__)
*(u_char *)p &= m >> 8;
*(u_char *)(p + 1) &= m;
-#elif defined(__alpha__)
+#else
writeb(p, readb(p) & (m >> 8));
writeb(p + 1, readb(p + 1) & (m >> 8));
#endif
@@ -1075,7 +1075,7 @@ draw_pxlmouse_planar(scr_stat *scp, int x, int y)
m = mouse_or_mask[j] >> xoff;
#if defined(__i386__) || defined(__amd64__)
*(u_char *)p &= m;
-#elif defined(__alpha__)
+#else
writeb(p, readb(p) & (m >> 8));
#endif
p += line_width;
diff --git a/sys/dev/syscons/syscons.h b/sys/dev/syscons/syscons.h
index 45e96ae..1cd33b2 100644
--- a/sys/dev/syscons/syscons.h
+++ b/sys/dev/syscons/syscons.h
@@ -40,8 +40,6 @@
#include <pc98/cbus/sc_machdep.h>
#elif defined(__i386__)
/* nothing for the moment */
-#elif defined(__alpha__)
-/* nothing for the moment */
#endif
/* default values for configuration options */
diff --git a/sys/dev/vr/if_vrreg.h b/sys/dev/vr/if_vrreg.h
index 1ef3756..7caab56 100644
--- a/sys/dev/vr/if_vrreg.h
+++ b/sys/dev/vr/if_vrreg.h
@@ -589,9 +589,3 @@ struct vr_softc {
#define VR_PSTATE_D3 0x0003
#define VR_PME_EN 0x0010
#define VR_PME_STATUS 0x8000
-
-
-#ifdef __alpha__
-#undef vtophys
-#define vtophys(va) alpha_XXX_dmamap((vm_offset_t)va)
-#endif
OpenPOWER on IntegriCloud