{"id":856682,"url":"http://patchwork.ozlabs.org/api/patches/856682/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20180108024558.17983-11-f4bug@amsat.org/","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/projects/14/?format=json","name":"QEMU Development","link_name":"qemu-devel","list_id":"qemu-devel.nongnu.org","list_email":"qemu-devel@nongnu.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20180108024558.17983-11-f4bug@amsat.org>","list_archive_url":null,"date":"2018-01-08T02:45:39","name":"[10/29] hw/mips/malta: add fdc37m81x_init() which uses isa_superio_init()","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"d64ea7e45f79893d37fa8d17c0baf0968f40ea23","submitter":{"id":70924,"url":"http://patchwork.ozlabs.org/api/people/70924/?format=json","name":"Philippe Mathieu-Daudé","email":"f4bug@amsat.org"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20180108024558.17983-11-f4bug@amsat.org/mbox/","series":[{"id":21847,"url":"http://patchwork.ozlabs.org/api/series/21847/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/list/?series=21847","date":"2018-01-08T02:45:30","name":"remove i386/pc dependency: generic SuperIO, PIIX cleanup","version":1,"mbox":"http://patchwork.ozlabs.org/series/21847/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/856682/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/856682/checks/","tags":{},"related":[],"headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=nongnu.org\n\t(client-ip=2001:4830:134:3::11; helo=lists.gnu.org;\n\tenvelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"atUznCc6\"; dkim-atps=neutral"],"Received":["from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11])\n\t(using TLSv1 with cipher AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3zFKnM5TNJz9s71\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon,  8 Jan 2018 14:02:14 +1100 (AEDT)","from localhost ([::1]:59463 helo=lists.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.71) (envelope-from\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1eYNhT-0003Er-V8\n\tfor incoming@patchwork.ozlabs.org; Sun, 07 Jan 2018 22:02:12 -0500","from eggs.gnu.org ([2001:4830:134:3::10]:51366)\n\tby lists.gnu.org with esmtp (Exim 4.71)\n\t(envelope-from <philippe.mathieu.daude@gmail.com>)\n\tid 1eYNSX-0006so-DS\n\tfor qemu-devel@nongnu.org; Sun, 07 Jan 2018 21:46:48 -0500","from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)\n\t(envelope-from <philippe.mathieu.daude@gmail.com>)\n\tid 1eYNSW-0002UO-C6\n\tfor qemu-devel@nongnu.org; Sun, 07 Jan 2018 21:46:45 -0500","from mail-qt0-x243.google.com ([2607:f8b0:400d:c0d::243]:45868)\n\tby eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.71) (envelope-from <philippe.mathieu.daude@gmail.com>)\n\tid 1eYNSW-0002U9-7y\n\tfor qemu-devel@nongnu.org; Sun, 07 Jan 2018 21:46:44 -0500","by mail-qt0-x243.google.com with SMTP id g10so12057518qtj.12\n\tfor <qemu-devel@nongnu.org>; Sun, 07 Jan 2018 18:46:44 -0800 (PST)","from x1.local ([138.117.48.219]) by smtp.gmail.com with ESMTPSA id\n\td10sm7156245qkg.16.2018.01.07.18.46.40\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tSun, 07 Jan 2018 18:46:43 -0800 (PST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=sender:from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=2M4CPDtQw804+K03gLhnzrLOY4ogYrHD0fbnsgknilU=;\n\tb=atUznCc6i6Cy04yVUK+Sm9L1tQRY5tMsMtMRRxYxAoirWjEwl7K78tMUI0vaJCE9aX\n\te47XGjV+kUlJaZ//EacN0jIGISZ9HukOHUyHFIFc7vRXFau0naFJBBaUyLZvfICakOZZ\n\tb5ASWWpp7C25/KxI0ueypGY3Py6OIlQhpKKCHgs17xU/uhutu8uqf8Qg43VabGq74aWV\n\tLxI9vf0XKLdGNONj9jge8h98Yf/si1kZSkuiQdUJrqpDavJ6G6+wH5BwcfC1Nbr1u6QC\n\tZ0jJdYDiBUEhM1rR9iH1NezpcK1HTt8uN8AkKw/9HqEUi05/FnJx231+AzIWr92Atz01\n\tDjJw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:sender:from:to:cc:subject:date:message-id\n\t:in-reply-to:references:mime-version:content-transfer-encoding;\n\tbh=2M4CPDtQw804+K03gLhnzrLOY4ogYrHD0fbnsgknilU=;\n\tb=jp0klXeJgI2b6kNtRemdZtbhlK4n3EBk9+8Jod3NTq/NjZtGUiVqnOMbjMZOiEyC3M\n\twD/LlsHZ/QSjcwjCe6cFJNKHzM3F4BChOCDEC3BMWIF7dDYlfd10qGPND00lYvvsN9IR\n\txjSRdGw1yyxxbuGonKXNO0Ss230DzT6V2ShxygJKaES1Xgee+WCiyEGBOv8lYSegN2dY\n\tzirSuusSn5mGl3CmxVBbfZibcfiV7PpALVt/ZKKyvGIKYrwxSQCV/wVnPqUd8DKJRMs+\n\tQYpJZ/hQ+hqIs3i3P5NMYkvftEzAGJcnGC9Q4Zx3NT7na/jhA/A/lsxMwZ715PpVzy0R\n\tpPzg==","X-Gm-Message-State":"AKwxytehVYqXGNVuxdi4pfICGv9BD9kOaYs2uNVABebfKRy9CLtp7NU3\n\tcHgTK8kQWIMC6OBhPTQdzQ4=","X-Google-Smtp-Source":"ACJfBovmb4HvWs+xHf7vizbj+akoA3R/N5uHxyIO3qwzA3er9RJ5Pa1giacVTk3eBC+L+iLvvwmTEg==","X-Received":"by 10.200.51.185 with SMTP id c54mr14257926qtb.177.1515379603765;\n\tSun, 07 Jan 2018 18:46:43 -0800 (PST)","From":"=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <f4bug@amsat.org>","To":"Paolo Bonzini <pbonzini@redhat.com>,\n\t\"Michael S. Tsirkin\" <mst@redhat.com>, =?utf-8?q?Herv=C3=A9_Poussinea?=\n\t=?utf-8?q?u?= <hpoussin@reactos.org>,\n\tAurelien Jarno <aurelien@aurel32.net>, Eduardo Habkost\n\t<ehabkost@redhat.com>, Marcel Apfelbaum <marcel@redhat.com>","Date":"Sun,  7 Jan 2018 23:45:39 -0300","Message-Id":"<20180108024558.17983-11-f4bug@amsat.org>","X-Mailer":"git-send-email 2.15.1","In-Reply-To":"<20180108024558.17983-1-f4bug@amsat.org>","References":"<20180108024558.17983-1-f4bug@amsat.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"8bit","X-detected-operating-system":"by eggs.gnu.org: Genre and OS details not\n\trecognized.","X-Received-From":"2607:f8b0:400d:c0d::243","Subject":"[Qemu-devel] [PATCH 10/29] hw/mips/malta: add fdc37m81x_init()\n\twhich uses isa_superio_init()","X-BeenThere":"qemu-devel@nongnu.org","X-Mailman-Version":"2.1.21","Precedence":"list","List-Id":"<qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<http://lists.nongnu.org/archive/html/qemu-devel/>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n\t<mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Cc":"Igor Mammedov <imammedo@redhat.com>, Yongbok Kim <yongbok.kim@mips.com>, \n\t=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <f4bug@amsat.org>,\n\tqemu-devel@nongnu.org","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"\"Qemu-devel\"\n\t<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>"},"content":"Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>\n---\n hw/mips/mips_malta.c | 28 +++++++++++++---------------\n 1 file changed, 13 insertions(+), 15 deletions(-)","diff":"diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c\nindex 195d7dd59e..bfa79c374d 100644\n--- a/hw/mips/mips_malta.c\n+++ b/hw/mips/mips_malta.c\n@@ -27,14 +27,12 @@\n #include \"cpu.h\"\n #include \"hw/hw.h\"\n #include \"hw/i386/pc.h\"\n+#include \"hw/isa/superio.h\"\n #include \"hw/dma/i8257.h\"\n #include \"hw/char/serial.h\"\n-#include \"hw/char/parallel.h\"\n-#include \"hw/block/fdc.h\"\n #include \"net/net.h\"\n #include \"hw/boards.h\"\n #include \"hw/i2c/smbus.h\"\n-#include \"sysemu/block-backend.h\"\n #include \"hw/block/flash.h\"\n #include \"hw/mips/mips.h\"\n #include \"hw/mips/cpudevs.h\"\n@@ -47,7 +45,6 @@\n #include \"hw/loader.h\"\n #include \"elf.h\"\n #include \"hw/timer/mc146818rtc.h\"\n-#include \"hw/input/i8042.h\"\n #include \"hw/timer/i8254.h\"\n #include \"sysemu/blockdev.h\"\n #include \"exec/address-spaces.h\"\n@@ -980,6 +977,16 @@ static void mips_create_cpu(MaltaState *s, const char *cpu_type,\n     }\n }\n \n+#define FDC37M81X_SERIAL_COUNT      2\n+#define FDC37M81X_DRIVE_COUNT       2\n+#define FDC37M81X_PARALLEL_COUNT    1\n+\n+static ISADevice *fdc37m81x_init(ISABus *isa_bus)\n+{\n+    return isa_superio_init(isa_bus, FDC37M81X_SERIAL_COUNT,\n+                            FDC37M81X_PARALLEL_COUNT, FDC37M81X_DRIVE_COUNT);\n+}\n+\n static\n void mips_malta_init(MachineState *machine)\n {\n@@ -1008,7 +1015,6 @@ void mips_malta_init(MachineState *machine)\n     int i;\n     DriveInfo *dinfo;\n     DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS];\n-    DriveInfo *fd[MAX_FD];\n     int fl_idx = 0;\n     int fl_sectors = bios_size >> 16;\n     int be;\n@@ -1215,16 +1221,8 @@ void mips_malta_init(MachineState *machine)\n     smbus_eeprom_init(smbus, 8, smbus_eeprom_buf, smbus_eeprom_size);\n     g_free(smbus_eeprom_buf);\n \n-    /* Super I/O */\n-    isa_create_simple(isa_bus, TYPE_I8042);\n-\n-    serial_hds_isa_init(isa_bus, 0, 2);\n-    parallel_hds_isa_init(isa_bus, 1);\n-\n-    for(i = 0; i < MAX_FD; i++) {\n-        fd[i] = drive_get(IF_FLOPPY, 0, i);\n-    }\n-    fdctrl_init_isa(isa_bus, fd);\n+    /* SuperI/O: SMS FDC37M817 */\n+    fdc37m81x_init(isa_bus);\n \n     /* Network card */\n     network_init(pci_bus);\n","prefixes":["10/29"]}