summaryrefslogtreecommitdiffstats
path: root/sys/pccard/pcic_pci.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2001-04-17 23:15:00 +0000
committerimp <imp@FreeBSD.org>2001-04-17 23:15:00 +0000
commit92b1af4042f0a5a158f0e99c1478e07d76ae7525 (patch)
tree75878d95632007e692fffea60f97abe7f6af7c07 /sys/pccard/pcic_pci.c
parent023d47cd6f83379d1b74c9acd77bff16f6143a50 (diff)
downloadFreeBSD-src-92b1af4042f0a5a158f0e99c1478e07d76ae7525.zip
FreeBSD-src-92b1af4042f0a5a158f0e99c1478e07d76ae7525.tar.gz
When booting, turn on the 3E0 compatibility address for ricoh cardbus
parts. This is based on the newcard code that turns it off :-). We can now reboot after NEWCARD or Windows and have OLDCARD work. Add support for the RL5C466 while I'm at it. Treat TI1031 the same as the CLPD6832. It doesn't work yet, but sucks less than it did before. Also add a few #defines for other changes in the pipe.
Diffstat (limited to 'sys/pccard/pcic_pci.c')
-rw-r--r--sys/pccard/pcic_pci.c28
1 files changed, 25 insertions, 3 deletions
diff --git a/sys/pccard/pcic_pci.c b/sys/pccard/pcic_pci.c
index 9d8c911..92704c7 100644
--- a/sys/pccard/pcic_pci.c
+++ b/sys/pccard/pcic_pci.c
@@ -316,9 +316,24 @@ pcic_pci_probe(device_t dev)
}
+static void
+ricoh_init(device_t dev)
+{
+ u_int16_t brgcntl;
+ /*
+ * Ricoh chips have a legacy bridge enable different than most
+ * Code cribbed from NEWBUS's bridge code since I can't find a
+ * datasheet for them that has register definitions.
+ */
+ brgcntl = pci_read_config(dev, CB_PCI_BRIDGE_CTRL, 2);
+ brgcntl |= CB_BCR_RL_3E0_EN;
+ brgcntl &= ~CB_BCR_RL_3E2_EN;
+ pci_write_config(dev, CLPD6832_BRIDGE_CONTROL, brgcntl, 4);
+}
+
/*
* General PCI based card dispatch routine. Right now
- * it only understands the CL-PD6832 and TI parts. It does
+ * it only understands the Ricoh, CL-PD6832 and TI parts. It does
* try to do generic things with other parts.
*/
static int
@@ -341,6 +356,14 @@ pcic_pci_attach(device_t dev)
pci_write_config(dev, PCIR_COMMAND, command, 4);
switch (device_id) {
+ case PCI_DEVICE_ID_RICOH_RL5C465:
+ case PCI_DEVICE_ID_RICOH_RL5C466:
+ case PCI_DEVICE_ID_RICOH_RL5C475:
+ case PCI_DEVICE_ID_RICOH_RL5C476:
+ case PCI_DEVICE_ID_RICOH_RL5C478:
+ ricoh_init(dev);
+ generic_cardbus_attach(dev);
+ break;
case PCI_DEVICE_ID_PCIC_TI1130:
case PCI_DEVICE_ID_PCIC_TI1131:
case PCI_DEVICE_ID_PCIC_TI1211:
@@ -360,9 +383,8 @@ pcic_pci_attach(device_t dev)
generic_cardbus_attach(dev);
break;
case PCI_DEVICE_ID_PCIC_CLPD6832:
- pd6832_legacy_init(dev);
- break;
case PCI_DEVICE_ID_PCIC_TI1031:
+ pd6832_legacy_init(dev);
break;
}
OpenPOWER on IntegriCloud