From nobody Tue Feb 10 15:46:13 2026 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 1529664742428562.5926977639928; Fri, 22 Jun 2018 03:52:22 -0700 (PDT) Received: from localhost ([::1]:60758 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWJfx-00059f-O7 for importer@patchew.org; Fri, 22 Jun 2018 06:52:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45784) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fWJPv-0000hh-Mc for qemu-devel@nongnu.org; Fri, 22 Jun 2018 06:35:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fWJPt-0003TY-C4 for qemu-devel@nongnu.org; Fri, 22 Jun 2018 06:35:47 -0400 Received: from ozlabs.org ([203.11.71.1]:58089) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fWJPs-0003QF-HW; Fri, 22 Jun 2018 06:35:45 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 41Bw2H5zD1z9sBZ; Fri, 22 Jun 2018 20:35:34 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1529663735; bh=mibbBfDv2VFUbRVnNO+PsjzgrZmShFebtR4HjSYnUcs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QnvO+bgPmyJrFwi/Li7GzNHp3P2TBV041i+fQBhWU0NoZTfbYKhsUM4WayJkUlr3b 7cjcYYkB5gCUe+oKp0unj4/5DxPeykcusXrAdE9zu1U9X2hwYP8XBXdr0OxdqRslmz Jo5OPRgGjk2HN+tEgBwz2nd83mFRXzxKDGE7j6J8= From: David Gibson To: peter.maydell@linaro.org Date: Fri, 22 Jun 2018 20:35:18 +1000 Message-Id: <20180622103528.28598-16-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180622103528.28598-1-david@gibson.dropbear.id.au> References: <20180622103528.28598-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 203.11.71.1 Subject: [Qemu-devel] [PULL 15/25] ppc4xx_i2c: Remove unimplemented sdata and intr registers 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: lvivier@redhat.com, aik@ozlabs.ru, qemu-devel@nongnu.org, agraf@suse.de, groug@kaod.org, qemu-ppc@nongnu.org, clg@kaod.org, David Gibson 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 Content-Type: text/plain; charset="utf-8" From: BALATON Zoltan We don't emulate slave mode so related registers are not needed. [lh]sadr are only retained to avoid too many warnings and simplify debugging but sdata is not even correct because device has a 4 byte FIFO instead so just remove this unimplemented register for now. The intr register is also not implemented correctly, it is for diagnostics and normally not even visible on device without explicitly enabling it. As no guests are known to need this remove it as well. Signed-off-by: BALATON Zoltan Signed-off-by: David Gibson --- hw/i2c/ppc4xx_i2c.c | 16 +--------------- include/hw/i2c/ppc4xx_i2c.h | 4 +--- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/hw/i2c/ppc4xx_i2c.c b/hw/i2c/ppc4xx_i2c.c index d1936dbdca..4e0aaae1fc 100644 --- a/hw/i2c/ppc4xx_i2c.c +++ b/hw/i2c/ppc4xx_i2c.c @@ -3,7 +3,7 @@ * * Copyright (c) 2007 Jocelyn Mayer * Copyright (c) 2012 Fran=C3=A7ois Revol - * Copyright (c) 2016 BALATON Zoltan + * Copyright (c) 2016-2018 BALATON Zoltan * * Permission is hereby granted, free of charge, to any person obtaining a= copy * of this software and associated documentation files (the "Software"), t= o deal @@ -63,7 +63,6 @@ static void ppc4xx_i2c_reset(DeviceState *s) i2c->mdcntl =3D 0; i2c->sts =3D 0; i2c->extsts =3D 0x8f; - i2c->sdata =3D 0; i2c->lsadr =3D 0; i2c->hsadr =3D 0; i2c->clkdiv =3D 0; @@ -71,7 +70,6 @@ static void ppc4xx_i2c_reset(DeviceState *s) i2c->xfrcnt =3D 0; i2c->xtcntlss =3D 0; i2c->directcntl =3D 0xf; - i2c->intr =3D 0; } =20 static inline bool ppc4xx_i2c_is_master(PPC4xxI2CState *i2c) @@ -139,9 +137,6 @@ static uint64_t ppc4xx_i2c_readb(void *opaque, hwaddr a= ddr, unsigned int size) TYPE_PPC4xx_I2C, __func__); } break; - case 2: - ret =3D i2c->sdata; - break; case 4: ret =3D i2c->lmadr; break; @@ -181,9 +176,6 @@ static uint64_t ppc4xx_i2c_readb(void *opaque, hwaddr a= ddr, unsigned int size) case 16: ret =3D i2c->directcntl; break; - case 17: - ret =3D i2c->intr; - break; default: if (addr < PPC4xx_I2C_MEM_SIZE) { qemu_log_mask(LOG_UNIMP, "%s: Unimplemented register 0x%" @@ -229,9 +221,6 @@ static void ppc4xx_i2c_writeb(void *opaque, hwaddr addr= , uint64_t value, } } break; - case 2: - i2c->sdata =3D value; - break; case 4: i2c->lmadr =3D value; if (i2c_bus_busy(i2c->bus)) { @@ -302,9 +291,6 @@ static void ppc4xx_i2c_writeb(void *opaque, hwaddr addr= , uint64_t value, case 16: i2c->directcntl =3D value & 0x7; break; - case 17: - i2c->intr =3D value; - break; default: if (addr < PPC4xx_I2C_MEM_SIZE) { qemu_log_mask(LOG_UNIMP, "%s: Unimplemented register 0x%" diff --git a/include/hw/i2c/ppc4xx_i2c.h b/include/hw/i2c/ppc4xx_i2c.h index 3c603071bd..e4b6ded855 100644 --- a/include/hw/i2c/ppc4xx_i2c.h +++ b/include/hw/i2c/ppc4xx_i2c.h @@ -3,7 +3,7 @@ * * Copyright (c) 2007 Jocelyn Mayer * Copyright (c) 2012 Fran=C3=A7ois Revol - * Copyright (c) 2016 BALATON Zoltan + * Copyright (c) 2016-2018 BALATON Zoltan * * Permission is hereby granted, free of charge, to any person obtaining a= copy * of this software and associated documentation files (the "Software"), t= o deal @@ -49,7 +49,6 @@ typedef struct PPC4xxI2CState { uint8_t mdcntl; uint8_t sts; uint8_t extsts; - uint8_t sdata; uint8_t lsadr; uint8_t hsadr; uint8_t clkdiv; @@ -57,7 +56,6 @@ typedef struct PPC4xxI2CState { uint8_t xfrcnt; uint8_t xtcntlss; uint8_t directcntl; - uint8_t intr; } PPC4xxI2CState; =20 #endif /* PPC4XX_I2C_H */ --=20 2.17.1