Commit 3238e9c9 authored by Anton Blanchard's avatar Anton Blanchard Committed by Paul Mackerras

[PATCH] ppc64: indent pci code

Fix up some badly indented code.
Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 26370322
...@@ -252,7 +252,7 @@ unsigned long __init find_and_init_phbs(void) ...@@ -252,7 +252,7 @@ unsigned long __init find_and_init_phbs(void)
phb = (struct pci_controller *)kmalloc(sizeof(struct pci_controller), GFP_KERNEL); phb = (struct pci_controller *)kmalloc(sizeof(struct pci_controller), GFP_KERNEL);
if (phb == NULL) if (phb == NULL)
return -ENOMEM; return -ENOMEM;
pci_setup_pci_controller(phb); pci_setup_pci_controller(phb);
phb->pci_mem_offset = phb->local_number = bus; phb->pci_mem_offset = phb->local_number = bus;
phb->first_busno = bus; phb->first_busno = bus;
......
...@@ -283,7 +283,7 @@ static void __init setup_u3_agp(struct pci_controller* hose) ...@@ -283,7 +283,7 @@ static void __init setup_u3_agp(struct pci_controller* hose)
* the reg address cell, we shall fix that by killing struct * the reg address cell, we shall fix that by killing struct
* reg_property and using some accessor functions instead * reg_property and using some accessor functions instead
*/ */
hose->first_busno = 0xf0; hose->first_busno = 0xf0;
hose->last_busno = 0xff; hose->last_busno = 0xff;
hose->ops = &u3_agp_pci_ops; hose->ops = &u3_agp_pci_ops;
hose->cfg_addr = ioremap(0xf0000000 + 0x800000, 0x1000); hose->cfg_addr = ioremap(0xf0000000 + 0x800000, 0x1000);
...@@ -315,24 +315,24 @@ static int __init add_bridge(struct device_node *dev) ...@@ -315,24 +315,24 @@ static int __init add_bridge(struct device_node *dev)
char* disp_name; char* disp_name;
int *bus_range; int *bus_range;
int primary = 1; int primary = 1;
struct property *of_prop; struct property *of_prop;
DBG("Adding PCI host bridge %s\n", dev->full_name); DBG("Adding PCI host bridge %s\n", dev->full_name);
bus_range = (int *) get_property(dev, "bus-range", &len); bus_range = (int *) get_property(dev, "bus-range", &len);
if (bus_range == NULL || len < 2 * sizeof(int)) { if (bus_range == NULL || len < 2 * sizeof(int)) {
printk(KERN_WARNING "Can't get bus-range for %s, assume bus 0\n", printk(KERN_WARNING "Can't get bus-range for %s, assume bus 0\n",
dev->full_name); dev->full_name);
} }
hose = alloc_bootmem(sizeof(struct pci_controller)); hose = alloc_bootmem(sizeof(struct pci_controller));
if (hose == NULL) if (hose == NULL)
return -ENOMEM; return -ENOMEM;
pci_setup_pci_controller(hose); pci_setup_pci_controller(hose);
hose->arch_data = dev; hose->arch_data = dev;
hose->first_busno = bus_range ? bus_range[0] : 0; hose->first_busno = bus_range ? bus_range[0] : 0;
hose->last_busno = bus_range ? bus_range[1] : 0xff; hose->last_busno = bus_range ? bus_range[1] : 0xff;
of_prop = alloc_bootmem(sizeof(struct property) + of_prop = alloc_bootmem(sizeof(struct property) +
sizeof(hose->global_number)); sizeof(hose->global_number));
...@@ -346,25 +346,25 @@ static int __init add_bridge(struct device_node *dev) ...@@ -346,25 +346,25 @@ static int __init add_bridge(struct device_node *dev)
} }
disp_name = NULL; disp_name = NULL;
if (device_is_compatible(dev, "u3-agp")) { if (device_is_compatible(dev, "u3-agp")) {
setup_u3_agp(hose); setup_u3_agp(hose);
disp_name = "U3-AGP"; disp_name = "U3-AGP";
primary = 0; primary = 0;
} else if (device_is_compatible(dev, "u3-ht")) { } else if (device_is_compatible(dev, "u3-ht")) {
setup_u3_ht(hose); setup_u3_ht(hose);
disp_name = "U3-HT"; disp_name = "U3-HT";
primary = 1; primary = 1;
} }
printk(KERN_INFO "Found %s PCI host bridge. Firmware bus number: %d->%d\n", printk(KERN_INFO "Found %s PCI host bridge. Firmware bus number: %d->%d\n",
disp_name, hose->first_busno, hose->last_busno); disp_name, hose->first_busno, hose->last_busno);
/* Interpret the "ranges" property */ /* Interpret the "ranges" property */
/* This also maps the I/O region and sets isa_io/mem_base */ /* This also maps the I/O region and sets isa_io/mem_base */
pci_process_bridge_OF_ranges(hose, dev); pci_process_bridge_OF_ranges(hose, dev);
pci_setup_phb_io(hose, primary); pci_setup_phb_io(hose, primary);
/* Fixup "bus-range" OF property */ /* Fixup "bus-range" OF property */
fixup_bus_range(dev); fixup_bus_range(dev);
return 0; return 0;
} }
......
...@@ -388,7 +388,7 @@ static void __init setup_u3_agp(struct pci_controller* hose) ...@@ -388,7 +388,7 @@ static void __init setup_u3_agp(struct pci_controller* hose)
* the reg address cell, we shall fix that by killing struct * the reg address cell, we shall fix that by killing struct
* reg_property and using some accessor functions instead * reg_property and using some accessor functions instead
*/ */
hose->first_busno = 0xf0; hose->first_busno = 0xf0;
hose->last_busno = 0xff; hose->last_busno = 0xff;
has_uninorth = 1; has_uninorth = 1;
hose->ops = &macrisc_pci_ops; hose->ops = &macrisc_pci_ops;
...@@ -473,7 +473,7 @@ static void __init setup_u3_ht(struct pci_controller* hose) ...@@ -473,7 +473,7 @@ static void __init setup_u3_ht(struct pci_controller* hose)
continue; continue;
} }
cur++; cur++;
DBG("U3/HT: hole, %d end at %08lx, %d start at %08lx\n", DBG("U3/HT: hole, %d end at %08lx, %d start at %08lx\n",
cur-1, res->start - 1, cur, res->end + 1); cur-1, res->start - 1, cur, res->end + 1);
hose->mem_resources[cur].name = np->full_name; hose->mem_resources[cur].name = np->full_name;
hose->mem_resources[cur].flags = IORESOURCE_MEM; hose->mem_resources[cur].flags = IORESOURCE_MEM;
...@@ -603,24 +603,24 @@ static int __init add_bridge(struct device_node *dev) ...@@ -603,24 +603,24 @@ static int __init add_bridge(struct device_node *dev)
char* disp_name; char* disp_name;
int *bus_range; int *bus_range;
int primary = 1; int primary = 1;
struct property *of_prop; struct property *of_prop;
DBG("Adding PCI host bridge %s\n", dev->full_name); DBG("Adding PCI host bridge %s\n", dev->full_name);
bus_range = (int *) get_property(dev, "bus-range", &len); bus_range = (int *) get_property(dev, "bus-range", &len);
if (bus_range == NULL || len < 2 * sizeof(int)) { if (bus_range == NULL || len < 2 * sizeof(int)) {
printk(KERN_WARNING "Can't get bus-range for %s, assume bus 0\n", printk(KERN_WARNING "Can't get bus-range for %s, assume bus 0\n",
dev->full_name); dev->full_name);
} }
hose = alloc_bootmem(sizeof(struct pci_controller)); hose = alloc_bootmem(sizeof(struct pci_controller));
if (hose == NULL) if (hose == NULL)
return -ENOMEM; return -ENOMEM;
pci_setup_pci_controller(hose); pci_setup_pci_controller(hose);
hose->arch_data = dev; hose->arch_data = dev;
hose->first_busno = bus_range ? bus_range[0] : 0; hose->first_busno = bus_range ? bus_range[0] : 0;
hose->last_busno = bus_range ? bus_range[1] : 0xff; hose->last_busno = bus_range ? bus_range[1] : 0xff;
of_prop = alloc_bootmem(sizeof(struct property) + of_prop = alloc_bootmem(sizeof(struct property) +
sizeof(hose->global_number)); sizeof(hose->global_number));
...@@ -634,24 +634,24 @@ static int __init add_bridge(struct device_node *dev) ...@@ -634,24 +634,24 @@ static int __init add_bridge(struct device_node *dev)
} }
disp_name = NULL; disp_name = NULL;
if (device_is_compatible(dev, "u3-agp")) { if (device_is_compatible(dev, "u3-agp")) {
setup_u3_agp(hose); setup_u3_agp(hose);
disp_name = "U3-AGP"; disp_name = "U3-AGP";
primary = 0; primary = 0;
} else if (device_is_compatible(dev, "u3-ht")) { } else if (device_is_compatible(dev, "u3-ht")) {
setup_u3_ht(hose); setup_u3_ht(hose);
disp_name = "U3-HT"; disp_name = "U3-HT";
primary = 1; primary = 1;
} }
printk(KERN_INFO "Found %s PCI host bridge. Firmware bus number: %d->%d\n", printk(KERN_INFO "Found %s PCI host bridge. Firmware bus number: %d->%d\n",
disp_name, hose->first_busno, hose->last_busno); disp_name, hose->first_busno, hose->last_busno);
/* Interpret the "ranges" property */ /* Interpret the "ranges" property */
/* This also maps the I/O region and sets isa_io/mem_base */ /* This also maps the I/O region and sets isa_io/mem_base */
pmac_process_bridge_OF_ranges(hose, dev, primary); pmac_process_bridge_OF_ranges(hose, dev, primary);
/* Fixup "bus-range" OF property */ /* Fixup "bus-range" OF property */
fixup_bus_range(dev); fixup_bus_range(dev);
return 0; return 0;
} }
......
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