pci.c (597473720f4dc69749542bfcfed4a927a43d935e) pci.c (601bf18b6630d37bde945fc890a995650f53e2c9)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * New-style PCI core.
4 *
5 * Copyright (c) 2004 - 2009 Paul Mundt
6 * Copyright (c) 2002 M. R. Brown
7 *
8 * Modelled after arch/mips/pci/pci.c:

--- 106 unchanged lines hidden (view full) ---

115
116 *hose_tail = hose;
117 hose_tail = &hose->next;
118
119 /*
120 * Do not panic here but later - this might happen before console init.
121 */
122 if (!hose->io_map_base) {
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * New-style PCI core.
4 *
5 * Copyright (c) 2004 - 2009 Paul Mundt
6 * Copyright (c) 2002 M. R. Brown
7 *
8 * Modelled after arch/mips/pci/pci.c:

--- 106 unchanged lines hidden (view full) ---

115
116 *hose_tail = hose;
117 hose_tail = &hose->next;
118
119 /*
120 * Do not panic here but later - this might happen before console init.
121 */
122 if (!hose->io_map_base) {
123 printk(KERN_WARNING
124 "registering PCI controller with io_map_base unset\n");
123 pr_warn("registering PCI controller with io_map_base unset\n");
125 }
126
127 /*
128 * Setup the ERR/PERR and SERR timers, if available.
129 */
130 pcibios_enable_timers(hose);
131
132 /*

--- 7 unchanged lines hidden (view full) ---

140 }
141
142 return 0;
143
144out:
145 for (--i; i >= 0; i--)
146 release_resource(&hose->resources[i]);
147
124 }
125
126 /*
127 * Setup the ERR/PERR and SERR timers, if available.
128 */
129 pcibios_enable_timers(hose);
130
131 /*

--- 7 unchanged lines hidden (view full) ---

139 }
140
141 return 0;
142
143out:
144 for (--i; i >= 0; i--)
145 release_resource(&hose->resources[i]);
146
148 printk(KERN_WARNING "Skipping PCI bus scan due to resource conflict\n");
147 pr_warn("Skipping PCI bus scan due to resource conflict\n");
149 return -1;
150}
151
152static int __init pcibios_init(void)
153{
154 struct pci_channel *hose;
155
156 /* Scan all of the recorded PCI controllers. */

--- 51 unchanged lines hidden (view full) ---

208 continue;
209 if (status == 0xffff)
210 continue;
211
212 early_write_config_word(hose, top_bus, current_bus,
213 pci_devfn, PCI_STATUS,
214 status & status_mask);
215 if (warn)
148 return -1;
149}
150
151static int __init pcibios_init(void)
152{
153 struct pci_channel *hose;
154
155 /* Scan all of the recorded PCI controllers. */

--- 51 unchanged lines hidden (view full) ---

207 continue;
208 if (status == 0xffff)
209 continue;
210
211 early_write_config_word(hose, top_bus, current_bus,
212 pci_devfn, PCI_STATUS,
213 status & status_mask);
214 if (warn)
216 printk("(%02x:%02x: %04X) ", current_bus,
217 pci_devfn, status);
215 pr_cont("(%02x:%02x: %04X) ", current_bus, pci_devfn,
216 status);
218 }
219}
220
221/*
222 * We can't use pci_find_device() here since we are
223 * called from interrupt context.
224 */
225static void __ref

--- 18 unchanged lines hidden (view full) ---

244
245 if ((status & status_mask) == 0)
246 continue;
247
248 /* clear the status errors */
249 pci_write_config_word(dev, PCI_STATUS, status & status_mask);
250
251 if (warn)
217 }
218}
219
220/*
221 * We can't use pci_find_device() here since we are
222 * called from interrupt context.
223 */
224static void __ref

--- 18 unchanged lines hidden (view full) ---

243
244 if ((status & status_mask) == 0)
245 continue;
246
247 /* clear the status errors */
248 pci_write_config_word(dev, PCI_STATUS, status & status_mask);
249
250 if (warn)
252 printk("(%s: %04X) ", pci_name(dev), status);
251 pr_cont("(%s: %04X) ", pci_name(dev), status);
253 }
254
255 list_for_each_entry(dev, &bus->devices, bus_list)
256 if (dev->subordinate)
257 pcibios_bus_report_status(dev->subordinate, status_mask, warn);
258}
259
260void __ref pcibios_report_status(unsigned int status_mask, int warn)

--- 40 unchanged lines hidden ---
252 }
253
254 list_for_each_entry(dev, &bus->devices, bus_list)
255 if (dev->subordinate)
256 pcibios_bus_report_status(dev->subordinate, status_mask, warn);
257}
258
259void __ref pcibios_report_status(unsigned int status_mask, int warn)

--- 40 unchanged lines hidden ---