FreeBSD Bugzilla – Attachment 10291 Details for
Bug 20670
No PC-CARD Slots; Device Not Configured
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 2.16 KB, created by
avatar
on 2000-08-17 06:40:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
avatar
Created:
2000-08-17 06:40:01 UTC
Size:
2.16 KB
patch
obsolete
>--- pcic_p.c Thu Aug 17 13:26:54 2000 >+++ /sys/pci/pcic_p.c Tue Aug 8 14:01:51 2000 >@@ -183,6 +183,59 @@ > device_printf(dev, "%s\n",buf); > } > >+/* >+ * According to the docs for the TI chipset, this will work with any YENTA >+ * conforming card bus bridge. >+ */ >+static void >+ti12xx_legacy_init(device_t self) >+{ >+ u_long bcr; /* to set interrupts */ >+ u_short io_port; /* the io_port to map this slot on */ >+ >+ /* >+ * First, just to be "safe", we muck with the power registers >+ * to put the chip into D0 power state. But read the power >+ * management capabilities register first and only do it for >+ * version 1 cards. >+ */ >+ if ((pci_read_config(self, 0xa2, 2) & 0x7) == 0x1) { >+ pci_write_config(self, 0xa4, >+ pci_read_config(self, 0xa4, 2) & ~0x3, 2); >+ } >+ >+ /* >+ * Only set legecay mode on first card. This will have >+ * functions 0 and 1 and will probe as units 0 and 1. >+ */ >+ if (device_get_unit(self) > 1) >+ return; >+ >+ /* >+ * Set legacy I/O address to 0x3e0. Only need to do this >+ * for first function/unit. >+ */ >+ if (device_get_unit(self) != 0) { >+ io_port = PCIC_INDEX_0; >+ pci_write_config(self, CLPD6832_LEGACY_16BIT_IOADDR, >+ io_port & ~PCI_MAP_IO, 4); >+ } >+ >+ /* >+ * Set default operating mode (I/O port space, Parity error enable >+ * and busmaster). >+ */ >+ pci_write_config(self, PCI_COMMAND_STATUS_REG, >+ pci_read_config(self, PCI_COMMAND_STATUS_REG, 2) | 0x47, 2); >+ >+ /* >+ * Enable isa-style IRQ interrupts. >+ */ >+ bcr = pci_read_config(self, 0x3e, 2); >+ bcr |= 0x84; >+ pci_write_config(self, 0x3e, bcr, 2); >+} >+ > static void > generic_cardbus_attach(device_t dev) > { >@@ -333,14 +386,15 @@ > pci_write_config(dev, PCI_COMMAND_STATUS_REG, command, 4); > > switch (device_id) { >- case PCI_DEVICE_ID_PCIC_TI1130: >- case PCI_DEVICE_ID_PCIC_TI1131: > case PCI_DEVICE_ID_PCIC_TI1220: > case PCI_DEVICE_ID_PCIC_TI1221: > case PCI_DEVICE_ID_PCIC_TI1250: > case PCI_DEVICE_ID_PCIC_TI1251: > case PCI_DEVICE_ID_PCIC_TI1251B: > case PCI_DEVICE_ID_PCIC_TI1225: >+ ti12xx_legacy_init(dev); >+ case PCI_DEVICE_ID_PCIC_TI1130: >+ case PCI_DEVICE_ID_PCIC_TI1131: > case PCI_DEVICE_ID_PCIC_TI1410: > case PCI_DEVICE_ID_PCIC_TI1420: > case PCI_DEVICE_ID_PCIC_TI1450:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 20670
: 10291