From nobody Tue Oct 28 12:16:32 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1515380616921593.3440979621581; Sun, 7 Jan 2018 19:03:36 -0800 (PST) Received: from localhost ([::1]:59563 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYNio-0004W6-FT for importer@patchew.org; Sun, 07 Jan 2018 22:03:34 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51366) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYNSX-0006so-DS for qemu-devel@nongnu.org; Sun, 07 Jan 2018 21:46:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eYNSW-0002UO-C6 for qemu-devel@nongnu.org; Sun, 07 Jan 2018 21:46:45 -0500 Received: from mail-qt0-x243.google.com ([2607:f8b0:400d:c0d::243]:45868) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eYNSW-0002U9-7y for qemu-devel@nongnu.org; Sun, 07 Jan 2018 21:46:44 -0500 Received: by mail-qt0-x243.google.com with SMTP id g10so12057518qtj.12 for ; Sun, 07 Jan 2018 18:46:44 -0800 (PST) Received: from x1.local ([138.117.48.219]) by smtp.gmail.com with ESMTPSA id d10sm7156245qkg.16.2018.01.07.18.46.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 07 Jan 2018 18:46:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2M4CPDtQw804+K03gLhnzrLOY4ogYrHD0fbnsgknilU=; b=atUznCc6i6Cy04yVUK+Sm9L1tQRY5tMsMtMRRxYxAoirWjEwl7K78tMUI0vaJCE9aX e47XGjV+kUlJaZ//EacN0jIGISZ9HukOHUyHFIFc7vRXFau0naFJBBaUyLZvfICakOZZ b5ASWWpp7C25/KxI0ueypGY3Py6OIlQhpKKCHgs17xU/uhutu8uqf8Qg43VabGq74aWV LxI9vf0XKLdGNONj9jge8h98Yf/si1kZSkuiQdUJrqpDavJ6G6+wH5BwcfC1Nbr1u6QC Z0jJdYDiBUEhM1rR9iH1NezpcK1HTt8uN8AkKw/9HqEUi05/FnJx231+AzIWr92Atz01 DjJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=2M4CPDtQw804+K03gLhnzrLOY4ogYrHD0fbnsgknilU=; b=jp0klXeJgI2b6kNtRemdZtbhlK4n3EBk9+8Jod3NTq/NjZtGUiVqnOMbjMZOiEyC3M wD/LlsHZ/QSjcwjCe6cFJNKHzM3F4BChOCDEC3BMWIF7dDYlfd10qGPND00lYvvsN9IR xjSRdGw1yyxxbuGonKXNO0Ss230DzT6V2ShxygJKaES1Xgee+WCiyEGBOv8lYSegN2dY zirSuusSn5mGl3CmxVBbfZibcfiV7PpALVt/ZKKyvGIKYrwxSQCV/wVnPqUd8DKJRMs+ QYpJZ/hQ+hqIs3i3P5NMYkvftEzAGJcnGC9Q4Zx3NT7na/jhA/A/lsxMwZ715PpVzy0R pPzg== X-Gm-Message-State: AKwxytehVYqXGNVuxdi4pfICGv9BD9kOaYs2uNVABebfKRy9CLtp7NU3 cHgTK8kQWIMC6OBhPTQdzQ4= X-Google-Smtp-Source: ACJfBovmb4HvWs+xHf7vizbj+akoA3R/N5uHxyIO3qwzA3er9RJ5Pa1giacVTk3eBC+L+iLvvwmTEg== X-Received: by 10.200.51.185 with SMTP id c54mr14257926qtb.177.1515379603765; Sun, 07 Jan 2018 18:46:43 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Paolo Bonzini , "Michael S. Tsirkin" , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Aurelien Jarno , Eduardo Habkost , Marcel Apfelbaum 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: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::243 Subject: [Qemu-devel] [PATCH 10/29] hw/mips/malta: add fdc37m81x_init() which uses isa_superio_init() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Igor Mammedov , Yongbok Kim , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/mips/mips_malta.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c index 195d7dd59e..bfa79c374d 100644 --- a/hw/mips/mips_malta.c +++ b/hw/mips/mips_malta.c @@ -27,14 +27,12 @@ #include "cpu.h" #include "hw/hw.h" #include "hw/i386/pc.h" +#include "hw/isa/superio.h" #include "hw/dma/i8257.h" #include "hw/char/serial.h" -#include "hw/char/parallel.h" -#include "hw/block/fdc.h" #include "net/net.h" #include "hw/boards.h" #include "hw/i2c/smbus.h" -#include "sysemu/block-backend.h" #include "hw/block/flash.h" #include "hw/mips/mips.h" #include "hw/mips/cpudevs.h" @@ -47,7 +45,6 @@ #include "hw/loader.h" #include "elf.h" #include "hw/timer/mc146818rtc.h" -#include "hw/input/i8042.h" #include "hw/timer/i8254.h" #include "sysemu/blockdev.h" #include "exec/address-spaces.h" @@ -980,6 +977,16 @@ static void mips_create_cpu(MaltaState *s, const char = *cpu_type, } } =20 +#define FDC37M81X_SERIAL_COUNT 2 +#define FDC37M81X_DRIVE_COUNT 2 +#define FDC37M81X_PARALLEL_COUNT 1 + +static ISADevice *fdc37m81x_init(ISABus *isa_bus) +{ + return isa_superio_init(isa_bus, FDC37M81X_SERIAL_COUNT, + FDC37M81X_PARALLEL_COUNT, FDC37M81X_DRIVE_COUN= T); +} + static void mips_malta_init(MachineState *machine) { @@ -1008,7 +1015,6 @@ void mips_malta_init(MachineState *machine) int i; DriveInfo *dinfo; DriveInfo *hd[MAX_IDE_BUS * MAX_IDE_DEVS]; - DriveInfo *fd[MAX_FD]; int fl_idx =3D 0; int fl_sectors =3D bios_size >> 16; int be; @@ -1215,16 +1221,8 @@ void mips_malta_init(MachineState *machine) smbus_eeprom_init(smbus, 8, smbus_eeprom_buf, smbus_eeprom_size); g_free(smbus_eeprom_buf); =20 - /* Super I/O */ - isa_create_simple(isa_bus, TYPE_I8042); - - serial_hds_isa_init(isa_bus, 0, 2); - parallel_hds_isa_init(isa_bus, 1); - - for(i =3D 0; i < MAX_FD; i++) { - fd[i] =3D drive_get(IF_FLOPPY, 0, i); - } - fdctrl_init_isa(isa_bus, fd); + /* SuperI/O: SMS FDC37M817 */ + fdc37m81x_init(isa_bus); =20 /* Network card */ network_init(pci_bus); --=20 2.15.1