From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1gqnVv-0000h7-OM for mharc-qemu-trivial@gnu.org; Mon, 04 Feb 2019 18:18:55 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49912) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqnVt-0000dY-MA for qemu-trivial@nongnu.org; Mon, 04 Feb 2019 18:18:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gqnVs-0000W5-VL for qemu-trivial@nongnu.org; Mon, 04 Feb 2019 18:18:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54110) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gqnVf-000071-LX; Mon, 04 Feb 2019 18:18:40 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 64C2E14AAB; Mon, 4 Feb 2019 23:18:36 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-98.brq.redhat.com [10.40.204.98]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1D79017989; Mon, 4 Feb 2019 23:18:29 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-trivial@nongnu.org, qemu-devel@nongnu.org Cc: Richard Henderson , Andrew Jeffery , Peter Maydell , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Jan Kiszka , Igor Mitsyanko , Michael Walle , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Edgar E. Iglesias" , qemu-ppc@nongnu.org, Peter Chubb , Beniamino Galvani , BALATON Zoltan , Magnus Damm , Gerd Hoffmann , Aurelien Jarno , Joel Stanley , Andrzej Zaborowski , David Gibson , Bastian Koppelmann , qemu-arm@nongnu.org, Jason Wang , Rob Herring , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth Date: Tue, 5 Feb 2019 00:18:05 +0100 Message-Id: <20190204231815.29661-2-philmd@redhat.com> In-Reply-To: <20190204231815.29661-1-philmd@redhat.com> References: <20190204231815.29661-1-philmd@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 04 Feb 2019 23:18:36 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-trivial] [PATCH v2 01/11] hw/arm/aspeed: Use TYPE_TMP105/TYPE_PCA9552 instead of hardcoded string X-BeenThere: qemu-trivial@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2019 23:18:54 -0000 Reviewed-by: Thomas Huth Reviewed-by: C=C3=A9dric Le Goater Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/arm/aspeed.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index 5158985482..e98ede5a86 100644 --- a/hw/arm/aspeed.c +++ b/hw/arm/aspeed.c @@ -19,6 +19,8 @@ #include "hw/arm/aspeed_soc.h" #include "hw/boards.h" #include "hw/i2c/smbus.h" +#include "hw/misc/pca9552.h" +#include "hw/misc/tmp105.h" #include "qemu/log.h" #include "sysemu/block-backend.h" #include "hw/loader.h" @@ -267,7 +269,8 @@ static void ast2500_evb_i2c_init(AspeedBoardState *bm= c) eeprom_buf); =20 /* The AST2500 EVB expects a LM75 but a TMP105 is compatible */ - i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 7), "tmp105",= 0x4d); + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 7), + TYPE_TMP105, 0x4d); =20 /* The AST2500 EVB does not have an RTC. Let's pretend that one is * plugged on the I2C bus header */ @@ -288,13 +291,15 @@ static void witherspoon_bmc_i2c_init(AspeedBoardSta= te *bmc) AspeedSoCState *soc =3D &bmc->soc; uint8_t *eeprom_buf =3D g_malloc0(8 * 1024); =20 - i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 3), "pca9552"= , 0x60); + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 3), TYPE_PCA9= 552, + 0x60); =20 i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 4), "tmp423",= 0x4c); i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 5), "tmp423",= 0x4c); =20 /* The Witherspoon expects a TMP275 but a TMP105 is compatible */ - i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 9), "tmp105",= 0x4a); + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 9), TYPE_TMP1= 05, + 0x4a); =20 /* The witherspoon board expects Epson RX8900 I2C RTC but a ds1338 i= s * good enough */ @@ -302,7 +307,7 @@ static void witherspoon_bmc_i2c_init(AspeedBoardState= *bmc) =20 smbus_eeprom_init_one(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 11), 0x5= 1, eeprom_buf); - i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 11), "pca9552= ", + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 11), TYPE_PCA= 9552, 0x60); } =20 --=20 2.20.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 2002:a5d:6089:0:0:0:0:0 with SMTP id w9csp4111802wrt; Mon, 4 Feb 2019 15:19:07 -0800 (PST) X-Google-Smtp-Source: AHgI3IbJUIwreL/hLu8YRNcEk0sll+uC7cKRl2KFczn9D7O2n1rYXmPGRRFowgmZx3DBMUINdv3R X-Received: by 2002:a25:1342:: with SMTP id 63mr1623590ybt.465.1549322347882; Mon, 04 Feb 2019 15:19:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549322347; cv=none; d=google.com; s=arc-20160816; b=Ci5FKFRjaz/z76OzixOXtH6njt5TYQ96WENs4cYgiqh/b60coc+lOO20cNd3lD3PLc DlfgwAzyHaV13+sx414FNPXxlSJYMkwj929p6nArt8WIykUcnDLgdYK8FvoT/YL6ZprP V31XlwEshgm6SIETDGBY+z8fo0Y/hJXS3/w+hf2t1NMinnjrLXRgrK2EjUv9pZ6rLtbk Hcsb+j2v7JFpUNhM1yPSqyDUhIyoIvR6LOGdpir7C4qzolxK+06zFUOr622wu5vMxuSm QEEstU0uxMgRvpgsSI9OC9OZKOjJHcdoE3o6bpieVJYB2/zsBsJFSXPHTSlUJDxhatF0 t1DA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from; bh=zsTge17mOfijGk/JUAGSHo/UTG5AcGF5/6Cj9NNSOeI=; b=QMbFG1cWr1W9FqQG4Xg0BLkjksGl7KAbGuj3DKFGYQDio39GpJ/CxNfSeiBubpsGNn 2j9LmMDOqycSZ31YdszyyJkvkXag7LZcHy3VMKxRtFIl0nm/c6HZjQfeIrMazGworTih 1Uh4vcQLheTReH42SzNsOKWbz4QnmXnSaxA0tTwtR/f+gU5VZmJ80CWfEzUmZ7PtLe2k qGy+A3BwDFFdyOFY1fxeE1z6jRy4hsvJmNYnZnZwsxjqmYu35aF3024wO9biEOr3wQJ/ NxELdQMvcKCRhmsDXaM/VtYGI4AYkTZxtJWoQ5/HJm4FBA4tGWxs9BpGY1ukGbdncOLL h5QQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a7si893131ybp.2.2019.02.04.15.19.07 for (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 04 Feb 2019 15:19:07 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([127.0.0.1]:50878 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqnW7-0000bp-Ay for alex.bennee@linaro.org; Mon, 04 Feb 2019 18:19:07 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49786) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqnVl-0000Yd-0k for qemu-arm@nongnu.org; Mon, 04 Feb 2019 18:18:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gqnVi-0000Cs-PV for qemu-arm@nongnu.org; Mon, 04 Feb 2019 18:18:44 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54110) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gqnVf-000071-LX; Mon, 04 Feb 2019 18:18:40 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 64C2E14AAB; Mon, 4 Feb 2019 23:18:36 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-98.brq.redhat.com [10.40.204.98]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1D79017989; Mon, 4 Feb 2019 23:18:29 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-trivial@nongnu.org, qemu-devel@nongnu.org Date: Tue, 5 Feb 2019 00:18:05 +0100 Message-Id: <20190204231815.29661-2-philmd@redhat.com> In-Reply-To: <20190204231815.29661-1-philmd@redhat.com> References: <20190204231815.29661-1-philmd@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 04 Feb 2019 23:18:36 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-arm] [PATCH v2 01/11] hw/arm/aspeed: Use TYPE_TMP105/TYPE_PCA9552 instead of hardcoded string X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Jason Wang , BALATON Zoltan , Gerd Hoffmann , Rob Herring , Magnus Damm , Joel Stanley , Richard Henderson , Andrzej Zaborowski , Thomas Huth , Beniamino Galvani , qemu-arm@nongnu.org, Peter Chubb , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , David Gibson , Andrew Jeffery , Bastian Koppelmann , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Igor Mitsyanko , Michael Walle , qemu-ppc@nongnu.org, Jan Kiszka , Aurelien Jarno Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: "Qemu-arm" X-TUID: JyIvESMx2XLf Reviewed-by: Thomas Huth Reviewed-by: C=C3=A9dric Le Goater Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/arm/aspeed.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index 5158985482..e98ede5a86 100644 --- a/hw/arm/aspeed.c +++ b/hw/arm/aspeed.c @@ -19,6 +19,8 @@ #include "hw/arm/aspeed_soc.h" #include "hw/boards.h" #include "hw/i2c/smbus.h" +#include "hw/misc/pca9552.h" +#include "hw/misc/tmp105.h" #include "qemu/log.h" #include "sysemu/block-backend.h" #include "hw/loader.h" @@ -267,7 +269,8 @@ static void ast2500_evb_i2c_init(AspeedBoardState *bm= c) eeprom_buf); =20 /* The AST2500 EVB expects a LM75 but a TMP105 is compatible */ - i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 7), "tmp105",= 0x4d); + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 7), + TYPE_TMP105, 0x4d); =20 /* The AST2500 EVB does not have an RTC. Let's pretend that one is * plugged on the I2C bus header */ @@ -288,13 +291,15 @@ static void witherspoon_bmc_i2c_init(AspeedBoardSta= te *bmc) AspeedSoCState *soc =3D &bmc->soc; uint8_t *eeprom_buf =3D g_malloc0(8 * 1024); =20 - i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 3), "pca9552"= , 0x60); + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 3), TYPE_PCA9= 552, + 0x60); =20 i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 4), "tmp423",= 0x4c); i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 5), "tmp423",= 0x4c); =20 /* The Witherspoon expects a TMP275 but a TMP105 is compatible */ - i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 9), "tmp105",= 0x4a); + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 9), TYPE_TMP1= 05, + 0x4a); =20 /* The witherspoon board expects Epson RX8900 I2C RTC but a ds1338 i= s * good enough */ @@ -302,7 +307,7 @@ static void witherspoon_bmc_i2c_init(AspeedBoardState= *bmc) =20 smbus_eeprom_init_one(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 11), 0x5= 1, eeprom_buf); - i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 11), "pca9552= ", + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 11), TYPE_PCA= 9552, 0x60); } =20 --=20 2.20.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:49842) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqnVp-0000aM-27 for qemu-devel@nongnu.org; Mon, 04 Feb 2019 18:18:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gqnVm-0000KL-Up for qemu-devel@nongnu.org; Mon, 04 Feb 2019 18:18:48 -0500 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Tue, 5 Feb 2019 00:18:05 +0100 Message-Id: <20190204231815.29661-2-philmd@redhat.com> In-Reply-To: <20190204231815.29661-1-philmd@redhat.com> References: <20190204231815.29661-1-philmd@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v2 01/11] hw/arm/aspeed: Use TYPE_TMP105/TYPE_PCA9552 instead of hardcoded string List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-trivial@nongnu.org, qemu-devel@nongnu.org Cc: Richard Henderson , Andrew Jeffery , Peter Maydell , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Jan Kiszka , Igor Mitsyanko , Michael Walle , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Edgar E. Iglesias" , qemu-ppc@nongnu.org, Peter Chubb , Beniamino Galvani , BALATON Zoltan , Magnus Damm , Gerd Hoffmann , Aurelien Jarno , Joel Stanley , Andrzej Zaborowski , David Gibson , Bastian Koppelmann , qemu-arm@nongnu.org, Jason Wang , Rob Herring , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth Reviewed-by: Thomas Huth Reviewed-by: C=C3=A9dric Le Goater Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/arm/aspeed.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index 5158985482..e98ede5a86 100644 --- a/hw/arm/aspeed.c +++ b/hw/arm/aspeed.c @@ -19,6 +19,8 @@ #include "hw/arm/aspeed_soc.h" #include "hw/boards.h" #include "hw/i2c/smbus.h" +#include "hw/misc/pca9552.h" +#include "hw/misc/tmp105.h" #include "qemu/log.h" #include "sysemu/block-backend.h" #include "hw/loader.h" @@ -267,7 +269,8 @@ static void ast2500_evb_i2c_init(AspeedBoardState *bm= c) eeprom_buf); =20 /* The AST2500 EVB expects a LM75 but a TMP105 is compatible */ - i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 7), "tmp105",= 0x4d); + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 7), + TYPE_TMP105, 0x4d); =20 /* The AST2500 EVB does not have an RTC. Let's pretend that one is * plugged on the I2C bus header */ @@ -288,13 +291,15 @@ static void witherspoon_bmc_i2c_init(AspeedBoardSta= te *bmc) AspeedSoCState *soc =3D &bmc->soc; uint8_t *eeprom_buf =3D g_malloc0(8 * 1024); =20 - i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 3), "pca9552"= , 0x60); + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 3), TYPE_PCA9= 552, + 0x60); =20 i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 4), "tmp423",= 0x4c); i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 5), "tmp423",= 0x4c); =20 /* The Witherspoon expects a TMP275 but a TMP105 is compatible */ - i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 9), "tmp105",= 0x4a); + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 9), TYPE_TMP1= 05, + 0x4a); =20 /* The witherspoon board expects Epson RX8900 I2C RTC but a ds1338 i= s * good enough */ @@ -302,7 +307,7 @@ static void witherspoon_bmc_i2c_init(AspeedBoardState= *bmc) =20 smbus_eeprom_init_one(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 11), 0x5= 1, eeprom_buf); - i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 11), "pca9552= ", + i2c_create_slave(aspeed_i2c_get_bus(DEVICE(&soc->i2c), 11), TYPE_PCA= 9552, 0x60); } =20 --=20 2.20.1