Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 81130
b: refs/heads/master
c: 9ac71d0
h: refs/heads/master
v: v3
  • Loading branch information
Cyrill Gorcunov authored and Paul Mackerras committed Dec 20, 2007
1 parent 199f3d9 commit 1984d34
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 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: 08a644ecef9383b109b763f5087265fd1759875f
refs/heads/master: 9ac71d00398674aaec664f30559f0a21d963862f
13 changes: 9 additions & 4 deletions trunk/arch/powerpc/platforms/chrp/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ void chrp_show_cpuinfo(struct seq_file *m)
seq_printf(m, "machine\t\t: CHRP %s\n", model);

/* longtrail (goldengate) stuff */
if (!strncmp(model, "IBM,LongTrail", 13)) {
if (model && !strncmp(model, "IBM,LongTrail", 13)) {
/* VLSI VAS96011/12 `Golden Gate 2' */
/* Memory banks */
sdramen = (in_le32(gg2_pci_config_base + GG2_PCI_DRAM_CTRL)
Expand Down Expand Up @@ -203,15 +203,20 @@ static void __init sio_fixup_irq(const char *name, u8 device, u8 level,
static void __init sio_init(void)
{
struct device_node *root;
const char *model;

if ((root = of_find_node_by_path("/")) &&
!strncmp(of_get_property(root, "model", NULL),
"IBM,LongTrail", 13)) {
root = of_find_node_by_path("/");
if (!root)
return;

model = of_get_property(root, "model", NULL);
if (model && !strncmp(model, "IBM,LongTrail", 13)) {
/* logical device 0 (KBC/Keyboard) */
sio_fixup_irq("keyboard", 0, 1, 2);
/* select logical device 1 (KBC/Mouse) */
sio_fixup_irq("mouse", 1, 12, 2);
}

of_node_put(root);
}

Expand Down

0 comments on commit 1984d34

Please sign in to comment.