When running qemu in -M mac99 mode, interrupts failed on me all the time.
I finally managed to track things down and it seems like we're missing some properties in several devices.
While at it, I also bumped the ESCC IRQs to 0x24 / 0x25, as that's what qemu now maps them on.
This patch (plus the qemu set) gets PPC64 Linux booting with console=ttyPZ0.
Signed-off-by: Alexander Graf agraf@suse.de
Index: drivers/macio.c =================================================================== --- drivers/macio.c (revision 644) +++ drivers/macio.c (working copy) @@ -145,6 +145,7 @@ static void openpic_init(const char *path, uint32_t addr) { + phandle_t target_node; phandle_t dnode; int props[2]; char buf[128]; @@ -154,7 +155,6 @@ fword("new-device"); push_str("interrupt-controller"); fword("device-name"); - fword("finish-device");
snprintf(buf, sizeof(buf), "%s/interrupt-controller", path); dnode = find_dev(buf); @@ -168,6 +168,21 @@ set_int_property(dnode, "#address-cells", 0); set_property(dnode, "interrupt-controller", "", 0); set_int_property(dnode, "clock-frequency", 4166666); + + fword("finish-device"); + + if (is_newworld()) { + /* patch in interrupt parent */ + dnode = find_dev(buf); + target_node = find_dev("/pci"); + set_int_property(target_node, "interrupt-parent", dnode); + + target_node = find_dev("/pci/mac-io/escc/ch-a"); + set_int_property(target_node, "interrupt-parent", dnode); + + target_node = find_dev("/pci/mac-io/escc/ch-b"); + set_int_property(target_node, "interrupt-parent", dnode); + } }
DECLARE_NODE(ob_macio, INSTALL_OPEN, sizeof(int), "Tmac-io"); Index: drivers/escc.c =================================================================== --- drivers/escc.c (revision 644) +++ drivers/escc.c (working copy) @@ -418,6 +418,11 @@ OLDWORLD(set_property(dnode, "AAPL,interrupts", (char *)&props, 1 * sizeof(cell)));
+ props[0] = 0; + props[0] = (0x24) + offset; + NEWWORLD(set_property(dnode, "interrupts", + (char *)&props, 2 * sizeof(cell))); + device_end();
uart_init_line((unsigned char*)addr + IO_ESCC_OFFSET + offset * 0x20,