PPC: Fix interrupt numbers

We changed several interrupt numbers in Qemu to better reflect real
world hardware. Also, since we're now using proper interrupt maps, we
need to make sure we specify interrupts in the way the respective map
requires it.

Signed-off-by: Alexander Graf <agraf@suse.de>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@680 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Alexander Graf
2010-02-22 18:52:28 +00:00
parent 81605d775a
commit b2036c0313
2 changed files with 32 additions and 4 deletions

View File

@@ -197,7 +197,12 @@ ob_cuda_initialize (int *idx)
set_property(ph, "reg", (char *)&props, sizeof(props));
set_int_property(ph, "interrupts", 0x12);
/* on newworld machines the cuda is on interrupt 0x19 */
props[0] = 0x19;
props[1] = 0;
NEWWORLD(set_property(ph, "interrupts", (char *)props, sizeof(props)));
NEWWORLD(set_int_property(ph, "#interrupt-cells", 2));
/* we emulate an oldworld hardware, so we must use
* non-standard oldworld property (needed by linux 2.6.18)

View File

@@ -1421,9 +1421,11 @@ int ob_ide_init(const char *path, uint32_t io_port0, uint32_t ctl_port0,
dnode = find_dev(nodebuff);
#ifndef CONFIG_PPC
props[0]=14; props[1]=0;
set_property(dnode, "interrupts",
(char *)&props, 2*sizeof(cell));
#endif
props[0] = __cpu_to_be32(chan->io_regs[0]);
props[1] = __cpu_to_be32(1); props[2] = __cpu_to_be32(8);
@@ -1578,10 +1580,31 @@ int macio_ide_init(const char *path, uint32_t addr, int nb_channels)
OLDWORLD(set_property(dnode, "AAPL,pio-timing",
(char *)&props, 8*sizeof(cell)));
props[0] = 0x0000000d;
props[1] = 0x00000000;
/* The first interrupt entry is the ide interrupt, the second
the dbdma interrupt */
switch (current_channel) {
case 1:
props[0] = 0x0000000d;
props[2] = 0x00000002;
break;
case 2:
props[0] = 0x0000000e;
props[2] = 0x00000003;
break;
case 3:
props[0] = 0x0000000f;
props[2] = 0x00000004;
break;
default:
props[0] = 0x00000000;
props[2] = 0x00000000;
break;
}
props[1] = 0x00000000; /* XXX level triggered on real hw */
props[3] = 0x00000000;
set_property(dnode, "interrupts",
(char *)&props, 2*sizeof(cell));
(char *)&props, 4*sizeof(cell));
set_int_property(dnode, "#interrupt-cells", 2);
OLDWORLD(set_property(dnode, "AAPL,interrupts",
(char *)&props, 2*sizeof(cell)));