Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 80992
b: refs/heads/master
c: 3a1c81f
h: refs/heads/master
v: v3
  • Loading branch information
Cyrill Gorcunov authored and Paul Mackerras committed Dec 6, 2007
1 parent 0dc2614 commit 9d687e4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: eb8f2763412893147c00e065773f46be5634f263
refs/heads/master: 3a1c81f4faa8f93a36533fa8900a2f488528aab9
11 changes: 8 additions & 3 deletions trunk/arch/powerpc/platforms/celleb/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ static void celleb_config_read_fake(unsigned char *config, int where,
*val = celleb_fake_config_readl(p);
break;
}

return;
}

static void celleb_config_write_fake(unsigned char *config, int where,
Expand All @@ -158,7 +156,6 @@ static void celleb_config_write_fake(unsigned char *config, int where,
celleb_fake_config_writel(val, p);
break;
}
return;
}

static int celleb_fake_pci_read_config(struct pci_bus *bus,
Expand Down Expand Up @@ -351,6 +348,10 @@ static int __init celleb_setup_fake_pci_device(struct device_node *node,
wi1 = of_get_property(node, "vendor-id", NULL);
wi2 = of_get_property(node, "class-code", NULL);
wi3 = of_get_property(node, "revision-id", NULL);
if (!wi0 || !wi1 || !wi2 || !wi3) {
printk(KERN_ERR "PCI: Missing device tree properties.\n");
goto error;
}

celleb_config_write_fake(*config, PCI_DEVICE_ID, 2, wi0[0] & 0xffff);
celleb_config_write_fake(*config, PCI_VENDOR_ID, 2, wi1[0] & 0xffff);
Expand All @@ -372,6 +373,10 @@ static int __init celleb_setup_fake_pci_device(struct device_node *node,
celleb_setup_pci_base_addrs(hose, devno, fn, num_base_addr);

li = of_get_property(node, "interrupts", &rlen);
if (!li) {
printk(KERN_ERR "PCI: interrupts not found.\n");
goto error;
}
val = li[0];
celleb_config_write_fake(*config, PCI_INTERRUPT_PIN, 1, 1);
celleb_config_write_fake(*config, PCI_INTERRUPT_LINE, 1, val);
Expand Down

0 comments on commit 9d687e4

Please sign in to comment.