From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 2002:a5d:6089:0:0:0:0:0 with SMTP id w9csp859354wrt; Fri, 4 Jan 2019 09:59:34 -0800 (PST) X-Google-Smtp-Source: AFSGD/VJtw1ncFQmEml8peKiXQpnHAY+6nv+/ZacnYaAXCZvpHA5SvNJYXOsAmNueknbYtHJCA1q X-Received: by 2002:ac8:75cc:: with SMTP id z12mr49759131qtq.249.1546624774412; Fri, 04 Jan 2019 09:59:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546624774; cv=none; d=google.com; s=arc-20160816; b=KyUR+VpZkAXsZh9uxAA6UQtCAHpRWU9H9r/Vm2954EjfrtUVkb4U/EqAg+Ec0Alfuj T2iLYC1EaZwqU0HMMXSV0q4w/jRqGXcDBcQ9oejoHNsYXj2dpsAJLUAq+yUnaDApcS3S PkSZeJ8i6u6bTBZ3XU7za+oAYsHNYMupYBVLRmw1JGi6Z296/V3sURW7Bu1cuFCDrj2w C1IvfrVVS0LOlH4KpqjHLllNH7ik0duhQQQiTH2Ii8Sees7VooovqwN8053d69DzNuam g0L19dyr/WCfkYjhRkjuTEndi93v6bfHyHevbt825DfwuK7y70IfhEKk7uECvxfKnBo2 SlKw== 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=L62FMk76x2nExQvhqX4Ys6D8pZxyQ+vkYc9WswNA5+A=; b=uri97Lw1MlUMcddI8cpPPM7f2ne3lA/P4ZyTvQI5d4J122EEStwoOH8LugyviGsbCV hKuXdeOH5jUK+reeH24GSCs5LlQELgkauUk99nboaOfhVYaFblQtIvF8Zu8i5HOWU7Qg MJCm7wrM/Qm6v2EZEsRfAlT6/FkfdbRa97KcP+LkqjP7pphDwDaL9mahqAb0P4Z4N7cW L1mEyTddopiW++hN0sC+c+v2tOxgLb1mzKPd/HCUUUxY9/ZB+iCu0atdnVE/ICIRmy4Q bu/OU1SIElKDiQShWUgxcyJsxGzFpUD+hTNoezioLfjemej+OpJOPeOBCFcks3PkWMpE DXzw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 208.118.235.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. [208.118.235.17]) by mx.google.com with ESMTPS id k5si2162377qvq.148.2019.01.04.09.59.34 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 04 Jan 2019 09:59:34 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 208.118.235.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]:37673 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gfTkr-0002TZ-Sx for alex.bennee@linaro.org; Fri, 04 Jan 2019 12:59:33 -0500 Received: from eggs.gnu.org ([208.118.235.92]:51731) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gfTke-0002Rq-QC for qemu-arm@nongnu.org; Fri, 04 Jan 2019 12:59:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gfTke-0004FH-1m for qemu-arm@nongnu.org; Fri, 04 Jan 2019 12:59:20 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35676) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gfTkd-0004F0-RD; Fri, 04 Jan 2019 12:59:19 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D24B186671; Fri, 4 Jan 2019 17:59:18 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-119.brq.redhat.com [10.40.204.119]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A34CA5D75C; Fri, 4 Jan 2019 17:59:10 +0000 (UTC) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org, Thomas Huth Date: Fri, 4 Jan 2019 18:58:32 +0100 Message-Id: <20190104175847.6290-2-philmd@redhat.com> In-Reply-To: <20190104175847.6290-1-philmd@redhat.com> References: <20190104175847.6290-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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Fri, 04 Jan 2019 17:59:19 +0000 (UTC) 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: 209.132.183.28 Subject: [Qemu-arm] [PATCH 01/16] 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 , Gerd Hoffmann , Rob Herring , Magnus Damm , Joel Stanley , David Gibson , Andrzej Zaborowski , Beniamino Galvani , qemu-arm@nongnu.org, Peter Chubb , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Richard Henderson , 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: +HFigw+WU6Ay 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..817f9e1400 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_TMP1= 05, + 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.17.2