Commit c10fccdd authored by Linus Torvalds's avatar Linus Torvalds
parents 5f64f739 bcc488ab
...@@ -72,6 +72,7 @@ static struct amd_ide_chip { ...@@ -72,6 +72,7 @@ static struct amd_ide_chip {
{ PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA2, 0x50, AMD_UDMA_133 }, { PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA2, 0x50, AMD_UDMA_133 },
{ PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_IDE, 0x50, AMD_UDMA_133 }, { PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_IDE, 0x50, AMD_UDMA_133 },
{ PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE, 0x50, AMD_UDMA_133 }, { PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE, 0x50, AMD_UDMA_133 },
{ PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_IDE, 0x50, AMD_UDMA_133 },
{ 0 } { 0 }
}; };
...@@ -487,6 +488,7 @@ static ide_pci_device_t amd74xx_chipsets[] __devinitdata = { ...@@ -487,6 +488,7 @@ static ide_pci_device_t amd74xx_chipsets[] __devinitdata = {
/* 12 */ DECLARE_NV_DEV("NFORCE3-250-SATA2"), /* 12 */ DECLARE_NV_DEV("NFORCE3-250-SATA2"),
/* 13 */ DECLARE_NV_DEV("NFORCE-CK804"), /* 13 */ DECLARE_NV_DEV("NFORCE-CK804"),
/* 14 */ DECLARE_NV_DEV("NFORCE-MCP04"), /* 14 */ DECLARE_NV_DEV("NFORCE-MCP04"),
/* 15 */ DECLARE_NV_DEV("NFORCE-MCP51"),
}; };
static int __devinit amd74xx_probe(struct pci_dev *dev, const struct pci_device_id *id) static int __devinit amd74xx_probe(struct pci_dev *dev, const struct pci_device_id *id)
...@@ -521,6 +523,7 @@ static struct pci_device_id amd74xx_pci_tbl[] = { ...@@ -521,6 +523,7 @@ static struct pci_device_id amd74xx_pci_tbl[] = {
#endif #endif
{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 13 }, { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 13 },
{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 14 }, { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 14 },
{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 15 },
{ 0, }, { 0, },
}; };
MODULE_DEVICE_TABLE(pci, amd74xx_pci_tbl); MODULE_DEVICE_TABLE(pci, amd74xx_pci_tbl);
......
This diff is collapsed.
/* /*
* CompactPCI Hot Plug Driver PCI functions * CompactPCI Hot Plug Driver PCI functions
* *
* Copyright (C) 2002 by SOMA Networks, Inc. * Copyright (C) 2002,2005 by SOMA Networks, Inc.
* *
* All rights reserved. * All rights reserved.
* *
...@@ -38,10 +38,10 @@ extern int cpci_debug; ...@@ -38,10 +38,10 @@ extern int cpci_debug;
#define dbg(format, arg...) \ #define dbg(format, arg...) \
do { \ do { \
if(cpci_debug) \ if (cpci_debug) \
printk (KERN_DEBUG "%s: " format "\n", \ printk (KERN_DEBUG "%s: " format "\n", \
MY_NAME , ## arg); \ MY_NAME , ## arg); \
} while(0) } while (0)
#define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME , ## arg) #define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME , ## arg)
#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME , ## arg) #define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME , ## arg)
#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME , ## arg) #define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME , ## arg)
...@@ -57,16 +57,15 @@ u8 cpci_get_attention_status(struct slot* slot) ...@@ -57,16 +57,15 @@ u8 cpci_get_attention_status(struct slot* slot)
hs_cap = pci_bus_find_capability(slot->bus, hs_cap = pci_bus_find_capability(slot->bus,
slot->devfn, slot->devfn,
PCI_CAP_ID_CHSWP); PCI_CAP_ID_CHSWP);
if(!hs_cap) { if (!hs_cap)
return 0; return 0;
}
if(pci_bus_read_config_word(slot->bus, if (pci_bus_read_config_word(slot->bus,
slot->devfn, slot->devfn,
hs_cap + 2, hs_cap + 2,
&hs_csr)) { &hs_csr))
return 0; return 0;
}
return hs_csr & 0x0008 ? 1 : 0; return hs_csr & 0x0008 ? 1 : 0;
} }
...@@ -78,27 +77,22 @@ int cpci_set_attention_status(struct slot* slot, int status) ...@@ -78,27 +77,22 @@ int cpci_set_attention_status(struct slot* slot, int status)
hs_cap = pci_bus_find_capability(slot->bus, hs_cap = pci_bus_find_capability(slot->bus,
slot->devfn, slot->devfn,
PCI_CAP_ID_CHSWP); PCI_CAP_ID_CHSWP);
if(!hs_cap) { if (!hs_cap)
return 0; return 0;
} if (pci_bus_read_config_word(slot->bus,
if(pci_bus_read_config_word(slot->bus,
slot->devfn, slot->devfn,
hs_cap + 2, hs_cap + 2,
&hs_csr)) { &hs_csr))
return 0; return 0;
} if (status)
if(status) {
hs_csr |= HS_CSR_LOO; hs_csr |= HS_CSR_LOO;
} else { else
hs_csr &= ~HS_CSR_LOO; hs_csr &= ~HS_CSR_LOO;
} if (pci_bus_write_config_word(slot->bus,
if(pci_bus_write_config_word(slot->bus,
slot->devfn, slot->devfn,
hs_cap + 2, hs_cap + 2,
hs_csr)) { hs_csr))
return 0; return 0;
}
return 1; return 1;
} }
...@@ -110,16 +104,13 @@ u16 cpci_get_hs_csr(struct slot* slot) ...@@ -110,16 +104,13 @@ u16 cpci_get_hs_csr(struct slot* slot)
hs_cap = pci_bus_find_capability(slot->bus, hs_cap = pci_bus_find_capability(slot->bus,
slot->devfn, slot->devfn,
PCI_CAP_ID_CHSWP); PCI_CAP_ID_CHSWP);
if(!hs_cap) { if (!hs_cap)
return 0xFFFF; return 0xFFFF;
} if (pci_bus_read_config_word(slot->bus,
if(pci_bus_read_config_word(slot->bus,
slot->devfn, slot->devfn,
hs_cap + 2, hs_cap + 2,
&hs_csr)) { &hs_csr))
return 0xFFFF; return 0xFFFF;
}
return hs_csr; return hs_csr;
} }
...@@ -132,23 +123,21 @@ int cpci_check_and_clear_ins(struct slot* slot) ...@@ -132,23 +123,21 @@ int cpci_check_and_clear_ins(struct slot* slot)
hs_cap = pci_bus_find_capability(slot->bus, hs_cap = pci_bus_find_capability(slot->bus,
slot->devfn, slot->devfn,
PCI_CAP_ID_CHSWP); PCI_CAP_ID_CHSWP);
if(!hs_cap) { if (!hs_cap)
return 0; return 0;
} if (pci_bus_read_config_word(slot->bus,
if(pci_bus_read_config_word(slot->bus,
slot->devfn, slot->devfn,
hs_cap + 2, hs_cap + 2,
&hs_csr)) { &hs_csr))
return 0; return 0;
} if (hs_csr & HS_CSR_INS) {
if(hs_csr & HS_CSR_INS) {
/* Clear INS (by setting it) */ /* Clear INS (by setting it) */
if(pci_bus_write_config_word(slot->bus, if (pci_bus_write_config_word(slot->bus,
slot->devfn, slot->devfn,
hs_cap + 2, hs_cap + 2,
hs_csr)) { hs_csr))
ins = 0; ins = 0;
} else
ins = 1; ins = 1;
} }
return ins; return ins;
...@@ -163,18 +152,15 @@ int cpci_check_ext(struct slot* slot) ...@@ -163,18 +152,15 @@ int cpci_check_ext(struct slot* slot)
hs_cap = pci_bus_find_capability(slot->bus, hs_cap = pci_bus_find_capability(slot->bus,
slot->devfn, slot->devfn,
PCI_CAP_ID_CHSWP); PCI_CAP_ID_CHSWP);
if(!hs_cap) { if (!hs_cap)
return 0; return 0;
} if (pci_bus_read_config_word(slot->bus,
if(pci_bus_read_config_word(slot->bus,
slot->devfn, slot->devfn,
hs_cap + 2, hs_cap + 2,
&hs_csr)) { &hs_csr))
return 0; return 0;
} if (hs_csr & HS_CSR_EXT)
if(hs_csr & HS_CSR_EXT) {
ext = 1; ext = 1;
}
return ext; return ext;
} }
...@@ -186,24 +172,21 @@ int cpci_clear_ext(struct slot* slot) ...@@ -186,24 +172,21 @@ int cpci_clear_ext(struct slot* slot)
hs_cap = pci_bus_find_capability(slot->bus, hs_cap = pci_bus_find_capability(slot->bus,
slot->devfn, slot->devfn,
PCI_CAP_ID_CHSWP); PCI_CAP_ID_CHSWP);
if(!hs_cap) { if (!hs_cap)
return -ENODEV; return -ENODEV;
} if (pci_bus_read_config_word(slot->bus,
if(pci_bus_read_config_word(slot->bus,
slot->devfn, slot->devfn,
hs_cap + 2, hs_cap + 2,
&hs_csr)) { &hs_csr))
return -ENODEV; return -ENODEV;
} if (hs_csr & HS_CSR_EXT) {
if(hs_csr & HS_CSR_EXT) {
/* Clear EXT (by setting it) */ /* Clear EXT (by setting it) */
if(pci_bus_write_config_word(slot->bus, if (pci_bus_write_config_word(slot->bus,
slot->devfn, slot->devfn,
hs_cap + 2, hs_cap + 2,
hs_csr)) { hs_csr))
return -ENODEV; return -ENODEV;
} }
}
return 0; return 0;
} }
...@@ -215,18 +198,16 @@ int cpci_led_on(struct slot* slot) ...@@ -215,18 +198,16 @@ int cpci_led_on(struct slot* slot)
hs_cap = pci_bus_find_capability(slot->bus, hs_cap = pci_bus_find_capability(slot->bus,
slot->devfn, slot->devfn,
PCI_CAP_ID_CHSWP); PCI_CAP_ID_CHSWP);
if(!hs_cap) { if (!hs_cap)
return -ENODEV; return -ENODEV;
} if (pci_bus_read_config_word(slot->bus,
if(pci_bus_read_config_word(slot->bus,
slot->devfn, slot->devfn,
hs_cap + 2, hs_cap + 2,
&hs_csr)) { &hs_csr))
return -ENODEV; return -ENODEV;
} if ((hs_csr & HS_CSR_LOO) != HS_CSR_LOO) {
if((hs_csr & HS_CSR_LOO) != HS_CSR_LOO) {
hs_csr |= HS_CSR_LOO; hs_csr |= HS_CSR_LOO;
if(pci_bus_write_config_word(slot->bus, if (pci_bus_write_config_word(slot->bus,
slot->devfn, slot->devfn,
hs_cap + 2, hs_cap + 2,
hs_csr)) { hs_csr)) {
...@@ -246,18 +227,16 @@ int cpci_led_off(struct slot* slot) ...@@ -246,18 +227,16 @@ int cpci_led_off(struct slot* slot)
hs_cap = pci_bus_find_capability(slot->bus, hs_cap = pci_bus_find_capability(slot->bus,
slot->devfn, slot->devfn,
PCI_CAP_ID_CHSWP); PCI_CAP_ID_CHSWP);
if(!hs_cap) { if (!hs_cap)
return -ENODEV; return -ENODEV;
} if (pci_bus_read_config_word(slot->bus,
if(pci_bus_read_config_word(slot->bus,
slot->devfn, slot->devfn,
hs_cap + 2, hs_cap + 2,
&hs_csr)) { &hs_csr))
return -ENODEV; return -ENODEV;
} if (hs_csr & HS_CSR_LOO) {
if(hs_csr & HS_CSR_LOO) {
hs_csr &= ~HS_CSR_LOO; hs_csr &= ~HS_CSR_LOO;
if(pci_bus_write_config_word(slot->bus, if (pci_bus_write_config_word(slot->bus,
slot->devfn, slot->devfn,
hs_cap + 2, hs_cap + 2,
hs_csr)) { hs_csr)) {
...@@ -274,19 +253,6 @@ int cpci_led_off(struct slot* slot) ...@@ -274,19 +253,6 @@ int cpci_led_off(struct slot* slot)
* Device configuration functions * Device configuration functions
*/ */
static void cpci_enable_device(struct pci_dev *dev)
{
struct pci_bus *bus;
pci_enable_device(dev);
if(dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) {
bus = dev->subordinate;
list_for_each_entry(dev, &bus->devices, bus_list) {
cpci_enable_device(dev);
}
}
}
int cpci_configure_slot(struct slot* slot) int cpci_configure_slot(struct slot* slot)
{ {
unsigned char busnr; unsigned char busnr;
...@@ -294,14 +260,14 @@ int cpci_configure_slot(struct slot* slot) ...@@ -294,14 +260,14 @@ int cpci_configure_slot(struct slot* slot)
dbg("%s - enter", __FUNCTION__); dbg("%s - enter", __FUNCTION__);
if(slot->dev == NULL) { if (slot->dev == NULL) {
dbg("pci_dev null, finding %02x:%02x:%x", dbg("pci_dev null, finding %02x:%02x:%x",
slot->bus->number, PCI_SLOT(slot->devfn), PCI_FUNC(slot->devfn)); slot->bus->number, PCI_SLOT(slot->devfn), PCI_FUNC(slot->devfn));
slot->dev = pci_find_slot(slot->bus->number, slot->devfn); slot->dev = pci_get_slot(slot->bus, slot->devfn);
} }
/* Still NULL? Well then scan for it! */ /* Still NULL? Well then scan for it! */
if(slot->dev == NULL) { if (slot->dev == NULL) {
int n; int n;
dbg("pci_dev still null"); dbg("pci_dev still null");
...@@ -311,10 +277,10 @@ int cpci_configure_slot(struct slot* slot) ...@@ -311,10 +277,10 @@ int cpci_configure_slot(struct slot* slot)
*/ */
n = pci_scan_slot(slot->bus, slot->devfn); n = pci_scan_slot(slot->bus, slot->devfn);
dbg("%s: pci_scan_slot returned %d", __FUNCTION__, n); dbg("%s: pci_scan_slot returned %d", __FUNCTION__, n);
if(n > 0) if (n > 0)
pci_bus_add_devices(slot->bus); pci_bus_add_devices(slot->bus);
slot->dev = pci_find_slot(slot->bus->number, slot->devfn); slot->dev = pci_get_slot(slot->bus, slot->devfn);
if(slot->dev == NULL) { if (slot->dev == NULL) {
err("Could not find PCI device for slot %02x", slot->number); err("Could not find PCI device for slot %02x", slot->number);
return 1; return 1;
} }
...@@ -329,8 +295,6 @@ int cpci_configure_slot(struct slot* slot) ...@@ -329,8 +295,6 @@ int cpci_configure_slot(struct slot* slot)
pci_bus_assign_resources(slot->dev->bus); pci_bus_assign_resources(slot->dev->bus);
cpci_enable_device(slot->dev);
dbg("%s - exit", __FUNCTION__); dbg("%s - exit", __FUNCTION__);
return 0; return 0;
} }
...@@ -341,15 +305,15 @@ int cpci_unconfigure_slot(struct slot* slot) ...@@ -341,15 +305,15 @@ int cpci_unconfigure_slot(struct slot* slot)
struct pci_dev *dev; struct pci_dev *dev;
dbg("%s - enter", __FUNCTION__); dbg("%s - enter", __FUNCTION__);
if(!slot->dev) { if (!slot->dev) {
err("No device for slot %02x\n", slot->number); err("No device for slot %02x\n", slot->number);
return -ENODEV; return -ENODEV;
} }
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
dev = pci_find_slot(slot->bus->number, dev = pci_get_slot(slot->bus,
PCI_DEVFN(PCI_SLOT(slot->devfn), i)); PCI_DEVFN(PCI_SLOT(slot->devfn), i));
if(dev) { if (dev) {
pci_remove_bus_device(dev); pci_remove_bus_device(dev);
slot->dev = NULL; slot->dev = NULL;
} }
......
...@@ -1626,7 +1626,7 @@ int shpchprm_set_hpp( ...@@ -1626,7 +1626,7 @@ int shpchprm_set_hpp(
pci_bus->number = func->bus; pci_bus->number = func->bus;
devfn = PCI_DEVFN(func->device, func->function); devfn = PCI_DEVFN(func->device, func->function);
ab = find_acpi_bridge_by_bus(acpi_bridges_head, ctrl->seg, ctrl->bus); ab = find_acpi_bridge_by_bus(acpi_bridges_head, ctrl->seg, ctrl->slot_bus);
if (ab) { if (ab) {
if (ab->_hpp) { if (ab->_hpp) {
...@@ -1681,7 +1681,7 @@ void shpchprm_enable_card( ...@@ -1681,7 +1681,7 @@ void shpchprm_enable_card(
| PCI_COMMAND_IO | PCI_COMMAND_MEMORY; | PCI_COMMAND_IO | PCI_COMMAND_MEMORY;
bcmd = bcommand = bcommand | PCI_BRIDGE_CTL_NO_ISA; bcmd = bcommand = bcommand | PCI_BRIDGE_CTL_NO_ISA;
ab = find_acpi_bridge_by_bus(acpi_bridges_head, ctrl->seg, ctrl->bus); ab = find_acpi_bridge_by_bus(acpi_bridges_head, ctrl->seg, ctrl->slot_bus);
if (ab) { if (ab) {
if (ab->_hpp) { if (ab->_hpp) {
if (ab->_hpp->enable_perr) { if (ab->_hpp->enable_perr) {
......
...@@ -1230,6 +1230,12 @@ ...@@ -1230,6 +1230,12 @@
#define PCI_DEVICE_ID_NVIDIA_QUADRO4_900XGL 0x0258 #define PCI_DEVICE_ID_NVIDIA_QUADRO4_900XGL 0x0258
#define PCI_DEVICE_ID_NVIDIA_QUADRO4_750XGL 0x0259 #define PCI_DEVICE_ID_NVIDIA_QUADRO4_750XGL 0x0259
#define PCI_DEVICE_ID_NVIDIA_QUADRO4_700XGL 0x025B #define PCI_DEVICE_ID_NVIDIA_QUADRO4_700XGL 0x025B
#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_IDE 0x0265
#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA 0x0266
#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA2 0x0267
#define PCI_DEVICE_ID_NVIDIA_NVENET_12 0x0268
#define PCI_DEVICE_ID_NVIDIA_NVENET_13 0x0269
#define PCI_DEVICE_ID_NVIDIA_MCP51_AUDIO 0x026B
#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4800 0x0280 #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4800 0x0280
#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4800_8X 0x0281 #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4800_8X 0x0281
#define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4800SE 0x0282 #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4800SE 0x0282
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment