patch-2.4.19 linux-2.4.19/arch/sparc64/kernel/pci_sabre.c
Next file: linux-2.4.19/arch/sparc64/kernel/pci_schizo.c
Previous file: linux-2.4.19/arch/sparc64/kernel/pci_psycho.c
Back to the patch index
Back to the overall index
- Lines: 99
- Date:
Fri Aug 2 17:39:43 2002
- Orig file:
linux-2.4.18/arch/sparc64/kernel/pci_sabre.c
- Orig date:
Fri Dec 21 09:41:53 2001
diff -urN linux-2.4.18/arch/sparc64/kernel/pci_sabre.c linux-2.4.19/arch/sparc64/kernel/pci_sabre.c
@@ -1,4 +1,4 @@
-/* $Id: pci_sabre.c,v 1.41 2001/11/14 13:17:56 davem Exp $
+/* $Id: pci_sabre.c,v 1.41.2.1 2002/03/03 10:31:56 davem Exp $
* pci_sabre.c: Sabre specific PCI controller support.
*
* Copyright (C) 1997, 1998, 1999 David S. Miller (davem@caipfs.rutgers.edu)
@@ -564,15 +564,15 @@
/*0x14*/0, 0, 0, 0, /* PCI B slot 1 Int A, B, C, D */
/*0x18*/0, 0, 0, 0, /* PCI B slot 2 Int A, B, C, D */
/*0x1c*/0, 0, 0, 0, /* PCI B slot 3 Int A, B, C, D */
-/*0x20*/3, /* SCSI */
+/*0x20*/4, /* SCSI */
/*0x21*/5, /* Ethernet */
/*0x22*/8, /* Parallel Port */
/*0x23*/13, /* Audio Record */
/*0x24*/14, /* Audio Playback */
/*0x25*/15, /* PowerFail */
-/*0x26*/3, /* second SCSI */
+/*0x26*/4, /* second SCSI */
/*0x27*/11, /* Floppy */
-/*0x28*/2, /* Spare Hardware */
+/*0x28*/4, /* Spare Hardware */
/*0x29*/9, /* Keyboard */
/*0x2a*/4, /* Mouse */
/*0x2b*/12, /* Serial */
@@ -582,7 +582,7 @@
/*0x2f*/15, /* Correctable ECC */
/*0x30*/15, /* PCI Bus A Error */
/*0x31*/15, /* PCI Bus B Error */
-/*0x32*/1, /* Power Management */
+/*0x32*/15, /* Power Management */
};
static int __init sabre_ino_to_pil(struct pci_dev *pdev, unsigned int ino)
@@ -596,7 +596,7 @@
ret = sabre_pil_table[ino];
if (ret == 0 && pdev == NULL) {
- ret = 1;
+ ret = 4;
} else if (ret == 0) {
switch ((pdev->class >> 16) & 0xff) {
case PCI_BASE_CLASS_STORAGE:
@@ -619,7 +619,7 @@
break;
default:
- ret = 1;
+ ret = 4;
break;
};
}
@@ -651,6 +651,10 @@
/* Now build the IRQ bucket. */
pil = sabre_ino_to_pil(pdev, ino);
+
+ if (PIL_RESERVED(pil))
+ BUG();
+
imap = p->controller_regs + imap_off;
imap += 4;
@@ -1063,7 +1067,14 @@
int where, size, is_64bit;
res = &pdev->resource[resource];
- where = PCI_BASE_ADDRESS_0 + (resource * 4);
+ if (resource < 6) {
+ where = PCI_BASE_ADDRESS_0 + (resource * 4);
+ } else if (resource == PCI_ROM_RESOURCE) {
+ where = pdev->rom_base_reg;
+ } else {
+ /* Somebody might have asked allocation of a non-standard resource */
+ return;
+ }
is_64bit = 0;
if (res->flags & IORESOURCE_IO)
@@ -1079,6 +1090,10 @@
pci_read_config_dword(pdev, where, ®);
reg = ((reg & size) |
(((u32)(res->start - base)) & ~size));
+ if (resource == PCI_ROM_RESOURCE) {
+ reg |= PCI_ROM_ADDRESS_ENABLE;
+ res->flags |= PCI_ROM_ADDRESS_ENABLE;
+ }
pci_write_config_dword(pdev, where, reg);
/* This knows that the upper 32-bits of the address
@@ -1144,7 +1159,7 @@
static void __init sabre_scan_bus(struct pci_controller_info *p)
{
- static int once = 0;
+ static int once;
struct pci_bus *sabre_bus;
struct pci_pbm_info *pbm;
struct pcidev_cookie *cookie;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)