isa-bridge.c (9a64e8e0ace51b309fdcff4b4754b3649250382a) isa-bridge.c (cad5cef62a5a0c525d39118d2e94b6e2034d5e05)
1/*
2 * Routines for tracking a legacy ISA bridge
3 *
4 * Copyrigh 2007 Benjamin Herrenschmidt <benh@kernel.crashing.org>, IBM Corp.
5 *
6 * Some bits and pieces moved over from pci_64.c
7 *
8 * Copyrigh 2003 Anton Blanchard <anton@au.ibm.com>, IBM Corp.

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

36/* Cached ISA bridge dev. */
37static struct device_node *isa_bridge_devnode;
38struct pci_dev *isa_bridge_pcidev;
39EXPORT_SYMBOL_GPL(isa_bridge_pcidev);
40
41#define ISA_SPACE_MASK 0x1
42#define ISA_SPACE_IO 0x1
43
1/*
2 * Routines for tracking a legacy ISA bridge
3 *
4 * Copyrigh 2007 Benjamin Herrenschmidt <benh@kernel.crashing.org>, IBM Corp.
5 *
6 * Some bits and pieces moved over from pci_64.c
7 *
8 * Copyrigh 2003 Anton Blanchard <anton@au.ibm.com>, IBM Corp.

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

36/* Cached ISA bridge dev. */
37static struct device_node *isa_bridge_devnode;
38struct pci_dev *isa_bridge_pcidev;
39EXPORT_SYMBOL_GPL(isa_bridge_pcidev);
40
41#define ISA_SPACE_MASK 0x1
42#define ISA_SPACE_IO 0x1
43
44static void __devinit pci_process_ISA_OF_ranges(struct device_node *isa_node,
45 unsigned long phb_io_base_phys)
44static void pci_process_ISA_OF_ranges(struct device_node *isa_node,
45 unsigned long phb_io_base_phys)
46{
47 /* We should get some saner parsing here and remove these structs */
48 struct pci_address {
49 u32 a_hi;
50 u32 a_mid;
51 u32 a_lo;
52 };
53

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

165
166 pr_debug("ISA bridge (early) is %s\n", np->full_name);
167}
168
169/**
170 * isa_bridge_find_late - Find and map the ISA IO space upon discovery of
171 * a new ISA bridge
172 */
46{
47 /* We should get some saner parsing here and remove these structs */
48 struct pci_address {
49 u32 a_hi;
50 u32 a_mid;
51 u32 a_lo;
52 };
53

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

165
166 pr_debug("ISA bridge (early) is %s\n", np->full_name);
167}
168
169/**
170 * isa_bridge_find_late - Find and map the ISA IO space upon discovery of
171 * a new ISA bridge
172 */
173static void __devinit isa_bridge_find_late(struct pci_dev *pdev,
174 struct device_node *devnode)
173static void isa_bridge_find_late(struct pci_dev *pdev,
174 struct device_node *devnode)
175{
176 struct pci_controller *hose = pci_bus_to_host(pdev->bus);
177
178 /* Store ISA device node and PCI device */
179 isa_bridge_devnode = of_node_get(devnode);
180 isa_bridge_pcidev = pdev;
181
182 /* Now parse the "ranges" property and setup the ISA mapping */

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

210
211 /* Unmap the ISA area */
212 __iounmap_at((void *)ISA_IO_BASE, 0x10000);
213}
214
215/**
216 * isa_bridge_notify - Get notified of PCI devices addition/removal
217 */
175{
176 struct pci_controller *hose = pci_bus_to_host(pdev->bus);
177
178 /* Store ISA device node and PCI device */
179 isa_bridge_devnode = of_node_get(devnode);
180 isa_bridge_pcidev = pdev;
181
182 /* Now parse the "ranges" property and setup the ISA mapping */

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

210
211 /* Unmap the ISA area */
212 __iounmap_at((void *)ISA_IO_BASE, 0x10000);
213}
214
215/**
216 * isa_bridge_notify - Get notified of PCI devices addition/removal
217 */
218static int __devinit isa_bridge_notify(struct notifier_block *nb,
219 unsigned long action, void *data)
218static int isa_bridge_notify(struct notifier_block *nb, unsigned long action,
219 void *data)
220{
221 struct device *dev = data;
222 struct pci_dev *pdev = to_pci_dev(dev);
223 struct device_node *devnode = pci_device_to_OF_node(pdev);
224
225 switch(action) {
226 case BUS_NOTIFY_ADD_DEVICE:
227 /* Check if we have an early ISA device, without PCI dev */

--- 39 unchanged lines hidden ---
220{
221 struct device *dev = data;
222 struct pci_dev *pdev = to_pci_dev(dev);
223 struct device_node *devnode = pci_device_to_OF_node(pdev);
224
225 switch(action) {
226 case BUS_NOTIFY_ADD_DEVICE:
227 /* Check if we have an early ISA device, without PCI dev */

--- 39 unchanged lines hidden ---