patch-2.4.19 linux-2.4.19/arch/sparc64/kernel/pci_psycho.c
Next file: linux-2.4.19/arch/sparc64/kernel/pci_sabre.c
Previous file: linux-2.4.19/arch/sparc64/kernel/pci_common.c
Back to the patch index
Back to the overall index
- Lines: 90
- Date:
Fri Aug 2 17:39:43 2002
- Orig file:
linux-2.4.18/arch/sparc64/kernel/pci_psycho.c
- Orig date:
Mon Feb 25 11:37:56 2002
diff -urN linux-2.4.18/arch/sparc64/kernel/pci_psycho.c linux-2.4.19/arch/sparc64/kernel/pci_psycho.c
@@ -1,4 +1,4 @@
-/* $Id: pci_psycho.c,v 1.30.2.2 2002/02/01 00:57:47 davem Exp $
+/* $Id: pci_psycho.c,v 1.30.2.3 2002/03/03 10:31:56 davem Exp $
* pci_psycho.c: PSYCHO/U2P specific PCI controller support.
*
* Copyright (C) 1997, 1998, 1999 David S. Miller (davem@caipfs.rutgers.edu)
@@ -326,15 +326,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 */
@@ -344,7 +344,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 psycho_ino_to_pil(struct pci_dev *pdev, unsigned int ino)
@@ -353,7 +353,7 @@
ret = psycho_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:
@@ -376,7 +376,7 @@
break;
default:
- ret = 1;
+ ret = 4;
break;
};
}
@@ -409,6 +409,10 @@
/* Now build the IRQ bucket. */
pil = psycho_ino_to_pil(pdev, ino);
+
+ if (PIL_RESERVED(pil))
+ BUG();
+
imap = p->controller_regs + imap_off;
imap += 4;
@@ -1097,7 +1101,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)
@@ -1113,6 +1124,10 @@
pci_read_config_dword(pdev, where, ®);
reg = ((reg & size) |
(((u32)(res->start - root->start)) & ~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
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)