forked from luck/tmp_suning_uos_patched
Merge branch 'pci/misc' into next
* pci/misc: PCI: cpqphp: Cleanup and remove unreachable paths PCI: Drop "__" prefix on __pci_enable_device_flags() PCI: Use "unsigned long" for __pci_enable_device_flags to match ioport.h mn10300/PCI: Remove unused pci_root_bus frv/PCI: Remove unused pci_root_bus x86/PCI: Remove unused pci_root_bus
This commit is contained in:
commit
e84d0dedd3
@ -31,7 +31,6 @@ void pcibios_resource_survey(void);
|
||||
/* pci-vdk.c */
|
||||
|
||||
extern int __nongpreldata pcibios_last_bus;
|
||||
extern struct pci_bus *__nongpreldata pci_root_bus;
|
||||
extern struct pci_ops *__nongpreldata pci_root_ops;
|
||||
|
||||
/* pci-irq.c */
|
||||
|
@ -26,7 +26,6 @@
|
||||
unsigned int __nongpreldata pci_probe = 1;
|
||||
|
||||
int __nongpreldata pcibios_last_bus = -1;
|
||||
struct pci_bus *__nongpreldata pci_root_bus;
|
||||
struct pci_ops *__nongpreldata pci_root_ops;
|
||||
|
||||
/*
|
||||
@ -416,8 +415,7 @@ int __init pcibios_init(void)
|
||||
printk("PCI: Probing PCI hardware\n");
|
||||
pci_add_resource(&resources, &pci_ioport_resource);
|
||||
pci_add_resource(&resources, &pci_iomem_resource);
|
||||
pci_root_bus = pci_scan_root_bus(NULL, 0, pci_root_ops, NULL,
|
||||
&resources);
|
||||
pci_scan_root_bus(NULL, 0, pci_root_ops, NULL, &resources);
|
||||
|
||||
pcibios_irq_init();
|
||||
pcibios_fixup_peer_bridges();
|
||||
|
@ -36,7 +36,6 @@ extern void pcibios_resource_survey(void);
|
||||
/* pci.c */
|
||||
|
||||
extern int pcibios_last_bus;
|
||||
extern struct pci_bus *pci_root_bus;
|
||||
extern struct pci_ops *pci_root_ops;
|
||||
|
||||
extern struct irq_routing_table *pcibios_get_irq_routing_table(void);
|
||||
|
@ -24,7 +24,6 @@
|
||||
unsigned int pci_probe = 1;
|
||||
|
||||
int pcibios_last_bus = -1;
|
||||
struct pci_bus *pci_root_bus;
|
||||
struct pci_ops *pci_root_ops;
|
||||
|
||||
/*
|
||||
@ -377,8 +376,7 @@ static int __init pcibios_init(void)
|
||||
|
||||
pci_add_resource_offset(&resources, &pci_ioport_resource, io_offset);
|
||||
pci_add_resource_offset(&resources, &pci_iomem_resource, mem_offset);
|
||||
pci_root_bus = pci_scan_root_bus(NULL, 0, &pci_direct_ampci, NULL,
|
||||
&resources);
|
||||
pci_scan_root_bus(NULL, 0, &pci_direct_ampci, NULL, &resources);
|
||||
|
||||
pcibios_irq_init();
|
||||
pcibios_fixup_irqs();
|
||||
|
@ -54,7 +54,6 @@ void pcibios_set_cache_line_size(void);
|
||||
/* pci-pc.c */
|
||||
|
||||
extern int pcibios_last_bus;
|
||||
extern struct pci_bus *pci_root_bus;
|
||||
extern struct pci_ops pci_root_ops;
|
||||
|
||||
void pcibios_scan_specific_bus(int busn);
|
||||
|
@ -34,7 +34,6 @@ int noioapicreroute = 1;
|
||||
#endif
|
||||
int pcibios_last_bus = -1;
|
||||
unsigned long pirq_table_addr;
|
||||
struct pci_bus *pci_root_bus;
|
||||
const struct pci_raw_ops *__read_mostly raw_pci_ops;
|
||||
const struct pci_raw_ops *__read_mostly raw_pci_ext_ops;
|
||||
|
||||
|
@ -30,7 +30,7 @@ int __init pci_legacy_init(void)
|
||||
}
|
||||
|
||||
printk("PCI: Probing PCI hardware\n");
|
||||
pci_root_bus = pcibios_scan_root(0);
|
||||
pcibios_scan_root(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -152,7 +152,7 @@ int __init pci_numaq_init(void)
|
||||
|
||||
raw_pci_ops = &pci_direct_conf1_mq;
|
||||
|
||||
pci_root_bus = pcibios_scan_root(0);
|
||||
pcibios_scan_root(0);
|
||||
if (num_online_nodes() > 1)
|
||||
for_each_online_node(quad) {
|
||||
if (quad == 0)
|
||||
|
@ -1900,8 +1900,7 @@ static void interrupt_event_handler(struct controller *ctrl)
|
||||
dbg("power fault\n");
|
||||
} else {
|
||||
/* refresh notification */
|
||||
if (p_slot)
|
||||
update_slot_info(ctrl, p_slot);
|
||||
update_slot_info(ctrl, p_slot);
|
||||
}
|
||||
|
||||
ctrl->event_queue[loop].event_type = 0;
|
||||
@ -2520,44 +2519,28 @@ static int configure_new_function(struct controller *ctrl, struct pci_func *func
|
||||
|
||||
/* If we have IO resources copy them and fill in the bridge's
|
||||
* IO range registers */
|
||||
if (io_node) {
|
||||
memcpy(hold_IO_node, io_node, sizeof(struct pci_resource));
|
||||
io_node->next = NULL;
|
||||
memcpy(hold_IO_node, io_node, sizeof(struct pci_resource));
|
||||
io_node->next = NULL;
|
||||
|
||||
/* set IO base and Limit registers */
|
||||
temp_byte = io_node->base >> 8;
|
||||
rc = pci_bus_write_config_byte(pci_bus, devfn, PCI_IO_BASE, temp_byte);
|
||||
/* set IO base and Limit registers */
|
||||
temp_byte = io_node->base >> 8;
|
||||
rc = pci_bus_write_config_byte(pci_bus, devfn, PCI_IO_BASE, temp_byte);
|
||||
|
||||
temp_byte = (io_node->base + io_node->length - 1) >> 8;
|
||||
rc = pci_bus_write_config_byte(pci_bus, devfn, PCI_IO_LIMIT, temp_byte);
|
||||
} else {
|
||||
kfree(hold_IO_node);
|
||||
hold_IO_node = NULL;
|
||||
}
|
||||
temp_byte = (io_node->base + io_node->length - 1) >> 8;
|
||||
rc = pci_bus_write_config_byte(pci_bus, devfn, PCI_IO_LIMIT, temp_byte);
|
||||
|
||||
/* If we have memory resources copy them and fill in the
|
||||
* bridge's memory range registers. Otherwise, fill in the
|
||||
* range registers with values that disable them. */
|
||||
if (mem_node) {
|
||||
memcpy(hold_mem_node, mem_node, sizeof(struct pci_resource));
|
||||
mem_node->next = NULL;
|
||||
/* Copy the memory resources and fill in the bridge's memory
|
||||
* range registers.
|
||||
*/
|
||||
memcpy(hold_mem_node, mem_node, sizeof(struct pci_resource));
|
||||
mem_node->next = NULL;
|
||||
|
||||
/* set Mem base and Limit registers */
|
||||
temp_word = mem_node->base >> 16;
|
||||
rc = pci_bus_write_config_word(pci_bus, devfn, PCI_MEMORY_BASE, temp_word);
|
||||
/* set Mem base and Limit registers */
|
||||
temp_word = mem_node->base >> 16;
|
||||
rc = pci_bus_write_config_word(pci_bus, devfn, PCI_MEMORY_BASE, temp_word);
|
||||
|
||||
temp_word = (mem_node->base + mem_node->length - 1) >> 16;
|
||||
rc = pci_bus_write_config_word(pci_bus, devfn, PCI_MEMORY_LIMIT, temp_word);
|
||||
} else {
|
||||
temp_word = 0xFFFF;
|
||||
rc = pci_bus_write_config_word(pci_bus, devfn, PCI_MEMORY_BASE, temp_word);
|
||||
|
||||
temp_word = 0x0000;
|
||||
rc = pci_bus_write_config_word(pci_bus, devfn, PCI_MEMORY_LIMIT, temp_word);
|
||||
|
||||
kfree(hold_mem_node);
|
||||
hold_mem_node = NULL;
|
||||
}
|
||||
temp_word = (mem_node->base + mem_node->length - 1) >> 16;
|
||||
rc = pci_bus_write_config_word(pci_bus, devfn, PCI_MEMORY_LIMIT, temp_word);
|
||||
|
||||
memcpy(hold_p_mem_node, p_mem_node, sizeof(struct pci_resource));
|
||||
p_mem_node->next = NULL;
|
||||
@ -2627,7 +2610,7 @@ static int configure_new_function(struct controller *ctrl, struct pci_func *func
|
||||
/* Return unused bus resources
|
||||
* First use the temporary node to store information for
|
||||
* the board */
|
||||
if (hold_bus_node && bus_node && temp_resources.bus_head) {
|
||||
if (bus_node && temp_resources.bus_head) {
|
||||
hold_bus_node->length = bus_node->base - hold_bus_node->base;
|
||||
|
||||
hold_bus_node->next = func->bus_head;
|
||||
@ -2751,7 +2734,7 @@ static int configure_new_function(struct controller *ctrl, struct pci_func *func
|
||||
}
|
||||
/* If we have prefetchable memory space available and there
|
||||
* is some left at the end, return the unused portion */
|
||||
if (hold_p_mem_node && temp_resources.p_mem_head) {
|
||||
if (temp_resources.p_mem_head) {
|
||||
p_mem_node = do_pre_bridge_resource_split(&(temp_resources.p_mem_head),
|
||||
&hold_p_mem_node, 0x100000);
|
||||
|
||||
|
@ -1156,8 +1156,7 @@ int pci_reenable_device(struct pci_dev *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __pci_enable_device_flags(struct pci_dev *dev,
|
||||
resource_size_t flags)
|
||||
static int pci_enable_device_flags(struct pci_dev *dev, unsigned long flags)
|
||||
{
|
||||
int err;
|
||||
int i, bars = 0;
|
||||
@ -1201,7 +1200,7 @@ static int __pci_enable_device_flags(struct pci_dev *dev,
|
||||
*/
|
||||
int pci_enable_device_io(struct pci_dev *dev)
|
||||
{
|
||||
return __pci_enable_device_flags(dev, IORESOURCE_IO);
|
||||
return pci_enable_device_flags(dev, IORESOURCE_IO);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1214,7 +1213,7 @@ int pci_enable_device_io(struct pci_dev *dev)
|
||||
*/
|
||||
int pci_enable_device_mem(struct pci_dev *dev)
|
||||
{
|
||||
return __pci_enable_device_flags(dev, IORESOURCE_MEM);
|
||||
return pci_enable_device_flags(dev, IORESOURCE_MEM);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1230,7 +1229,7 @@ int pci_enable_device_mem(struct pci_dev *dev)
|
||||
*/
|
||||
int pci_enable_device(struct pci_dev *dev)
|
||||
{
|
||||
return __pci_enable_device_flags(dev, IORESOURCE_MEM | IORESOURCE_IO);
|
||||
return pci_enable_device_flags(dev, IORESOURCE_MEM | IORESOURCE_IO);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user