Move setting of TI113X_PCI_CARD_CONTROL register sooner

This commit is contained in:
Warner Losh 2001-04-17 23:56:12 +00:00
parent 1f3da134c7
commit c18e19a64d
2 changed files with 4 additions and 6 deletions

View File

@ -147,6 +147,8 @@ ti1xxx_pci_init(device_t dev)
*/ */
cardcntl |= TI113X_CARDCNTL_PCI_IREQ; cardcntl |= TI113X_CARDCNTL_PCI_IREQ;
cardcntl |= TI113X_CARDCNTL_PCI_CSC; cardcntl |= TI113X_CARDCNTL_PCI_CSC;
pci_write_config(dev, TI113X_PCI_CARD_CONTROL, cardcntl, 1);
cardcntl = pci_read_config(dev, TI113X_PCI_CARD_CONTROL, 1);
if (syscntl & TI113X_SYSCNTL_CLKRUN_ENA){ if (syscntl & TI113X_SYSCNTL_CLKRUN_ENA){
if (syscntl & TI113X_SYSCNTL_CLKRUN_SEL) if (syscntl & TI113X_SYSCNTL_CLKRUN_SEL)
strcat(buf, "[clkrun irq 12]"); strcat(buf, "[clkrun irq 12]");
@ -175,9 +177,6 @@ ti1xxx_pci_init(device_t dev)
strcat(buf, "[FUNC pci int + CSC serial isa irq]"); strcat(buf, "[FUNC pci int + CSC serial isa irq]");
break; break;
} }
pci_write_config(dev, TI113X_PCI_CARD_CONTROL, cardcntl, 1);
if (ti113x)
cardcntl = pci_read_config(dev, TI113X_PCI_CARD_CONTROL, 1);
device_printf(dev, "%s\n",buf); device_printf(dev, "%s\n",buf);
} }

View File

@ -147,6 +147,8 @@ ti1xxx_pci_init(device_t dev)
*/ */
cardcntl |= TI113X_CARDCNTL_PCI_IREQ; cardcntl |= TI113X_CARDCNTL_PCI_IREQ;
cardcntl |= TI113X_CARDCNTL_PCI_CSC; cardcntl |= TI113X_CARDCNTL_PCI_CSC;
pci_write_config(dev, TI113X_PCI_CARD_CONTROL, cardcntl, 1);
cardcntl = pci_read_config(dev, TI113X_PCI_CARD_CONTROL, 1);
if (syscntl & TI113X_SYSCNTL_CLKRUN_ENA){ if (syscntl & TI113X_SYSCNTL_CLKRUN_ENA){
if (syscntl & TI113X_SYSCNTL_CLKRUN_SEL) if (syscntl & TI113X_SYSCNTL_CLKRUN_SEL)
strcat(buf, "[clkrun irq 12]"); strcat(buf, "[clkrun irq 12]");
@ -175,9 +177,6 @@ ti1xxx_pci_init(device_t dev)
strcat(buf, "[FUNC pci int + CSC serial isa irq]"); strcat(buf, "[FUNC pci int + CSC serial isa irq]");
break; break;
} }
pci_write_config(dev, TI113X_PCI_CARD_CONTROL, cardcntl, 1);
if (ti113x)
cardcntl = pci_read_config(dev, TI113X_PCI_CARD_CONTROL, 1);
device_printf(dev, "%s\n",buf); device_printf(dev, "%s\n",buf);
} }