From patchwork Tue Jan 10 08:25:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 640833 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp2591287pvb; Tue, 10 Jan 2023 01:11:34 -0800 (PST) X-Google-Smtp-Source: AMrXdXubPsNzUYxJelcyIKdWZJOC3fWrVc23zLnHPJ2vevR8M15BRtG4qgaYY+SKGTM3Nef2d8kL X-Received: by 2002:a05:622a:a0b:b0:3a6:a7f6:701d with SMTP id bv11-20020a05622a0a0b00b003a6a7f6701dmr108499517qtb.36.1673341893915; Tue, 10 Jan 2023 01:11:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673341893; cv=none; d=google.com; s=arc-20160816; b=VBmrjM51KMOdV59IeAGtYmxlhVpCXR8Fe4Bd5relRfpQMw97tXwV9K+qZMKppuWoyR y3cBasbs4osbulfwmtCaMYP+vOjCnAv3i91m++Yp3Hjur2uyrd/Pl2XfKnBxO3bg0vKB UaJQ18rLjYoT7DOksDIzGSrsnogoVzy5DAo6plsDsBxUzhkGN94YMsV9AE4iUQ1cYeUb Ls8Z5WGxX9htxAWuxoBChRAJ9OaMKjX98lh9UdR/WXYdx0uPaFGhWwXlArrN9huijPmY AFAJu32PdI+OP+W23MzPqcGVFj90lf7BoYOQffIbycrk0RVtVB6cvhkhsYGpz1/xgY3C 07xA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=oMTwqkBab9qLw7qsOi2RxqfZ6soVzk4ZQTHI3CEHkGc=; b=SXm6+EdNLDHC5vfkT48JyP6PIQhbHN2dLebzW6cZVJ9vHl8kEUnfxW84miJsVwaSMw eCABH/prAsAGRzOEaL/TZOZopsh65q7GEnyRcGGChh52ip0gPGT96d6VtjkMm876OzbZ XPstb21XqV+GDjCRZXZFkQhGl+7rBI2Z2+f20f5eJ/tBiYKTHBod7nYo4bvX9Ycb++LC dW2aboTP5fRj5U4PXZo0chXs88SrYOudgpCq4wDaFjBhN6+8zb/mTOHNQKPzQXKSn7tG bNJgJEOzDDAmUM87C7aNY8lfbMIsc1XMBvcetqclIAjrBfHicgLKAvm5IBDHugXeto+Q +nQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=u3xuOp6W; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id p20-20020ac87414000000b003a4ea208149si5986871qtq.252.2023.01.10.01.11.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Jan 2023 01:11:33 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=u3xuOp6W; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pF9wf-0005WC-9B; Tue, 10 Jan 2023 03:25:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pF9wc-0005VU-UX for qemu-devel@nongnu.org; Tue, 10 Jan 2023 03:25:18 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pF9wb-0004Tp-1k for qemu-devel@nongnu.org; Tue, 10 Jan 2023 03:25:18 -0500 Received: by mail-wr1-x433.google.com with SMTP id bn26so10906852wrb.0 for ; Tue, 10 Jan 2023 00:25:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=oMTwqkBab9qLw7qsOi2RxqfZ6soVzk4ZQTHI3CEHkGc=; b=u3xuOp6W/3B1hAw29XFkYE8PIuOpvIPawpBszSXwSG6oz9rNLXTCtoz02q6xeWyzPf 4N7EE6Myw2BbFRf1gUp3pJvv7m3/PCVTku0b38dEE67xcCDCA6sGQIWt49ZyY862ipV2 yLvFkRxvGtBUBmBNHunDTm5jZRpM2qnJ9FPeKjKY8eL+MqFnCet1EjUN1XhKAX8cOcLQ QVHSjOJT5mc4X8DrTXOJE+io5Ni42j192E8COzwd9uhvK8ORTUWAFGE5Vp9xKioCtgrR CB+csQBC7tLSkI0OkN6DEHj8O8J9iEBNNZ9LE5Og31lWLpa27/bnVjDXEX6yKq3f2a3F F6gg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oMTwqkBab9qLw7qsOi2RxqfZ6soVzk4ZQTHI3CEHkGc=; b=wEMl1blMNVKUecqWQ4HwOzbtAVe7B72hzbicIk7Jz02x2mClfuCTeeU4IpForh/82J 1bDmyBcmrrVfso0Ek/gX5n8SCPVQwiTLSCwqljDFu7AuyA/Ln0NCca15SKDADRUKaf1S eCICx+j5fEkaNrFtm5QYSRz67stKGqgdDjWwIMaGwQwF94DlouvV2THvUDnG7C5C0ZlI zcBFNsE34q1Rfwu6gAnZDM2nMqZs6AjJ/93NsQsBO4Iur7TqmQhKm4KcCImQEGzCLLcK 4qQXAZu+y67Nox6Q2ISoLORcfcmzhQaGZGrV95AhOX1uw0qOjENN+GQi0nslpFdPA9FW AXdg== X-Gm-Message-State: AFqh2koKqI37trdvwyFdQdwTsML/SslZq6Iok3BnoYKpSvR4DHInGHte oowJ6axDlqfh7JqsYqlRHyMga1v7c5cU0J34 X-Received: by 2002:a5d:6e83:0:b0:2b3:e803:a041 with SMTP id k3-20020a5d6e83000000b002b3e803a041mr11914969wrz.44.1673339114950; Tue, 10 Jan 2023 00:25:14 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id w6-20020adfd4c6000000b0027cb20605e3sm10392844wrk.105.2023.01.10.00.25.14 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 10 Jan 2023 00:25:14 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PATCH v2 1/5] hw/i2c/versatile_i2c: Drop useless casts from void * to pointer Date: Tue, 10 Jan 2023 09:25:04 +0100 Message-Id: <20230110082508.24038-2-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230110082508.24038-1-philmd@linaro.org> References: <20230110082508.24038-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=philmd@linaro.org; helo=mail-wr1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- hw/i2c/versatile_i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/i2c/versatile_i2c.c b/hw/i2c/versatile_i2c.c index 3a04ba3969..52a650f45e 100644 --- a/hw/i2c/versatile_i2c.c +++ b/hw/i2c/versatile_i2c.c @@ -45,7 +45,7 @@ REG32(CONTROL_CLR, 4) static uint64_t versatile_i2c_read(void *opaque, hwaddr offset, unsigned size) { - VersatileI2CState *s = (VersatileI2CState *)opaque; + VersatileI2CState *s = opaque; switch (offset) { case A_CONTROL_SET: @@ -60,7 +60,7 @@ static uint64_t versatile_i2c_read(void *opaque, hwaddr offset, static void versatile_i2c_write(void *opaque, hwaddr offset, uint64_t value, unsigned size) { - VersatileI2CState *s = (VersatileI2CState *)opaque; + VersatileI2CState *s = opaque; switch (offset) { case A_CONTROL_SET: From patchwork Tue Jan 10 08:25:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 640832 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp2590906pvb; Tue, 10 Jan 2023 01:10:30 -0800 (PST) X-Google-Smtp-Source: AMrXdXtNRq/G9xTjF5OaJrmL11GQdp6An8niBmetJi75y08uN0ZJDCteZWhOt7qzY+oFrpU17mTu X-Received: by 2002:ac8:468f:0:b0:3a9:7568:fb92 with SMTP id g15-20020ac8468f000000b003a97568fb92mr91545244qto.50.1673341830391; Tue, 10 Jan 2023 01:10:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673341830; cv=none; d=google.com; s=arc-20160816; b=x6xU4Mop1FPXalj5goabNBrHeFaXb0lNgDso6aYZKRSIrfejf7lSaFFnyu74aTkB/G 5vxirPIZHtsoS4nCYxijfICBXNc+wzeiV3+6+a0ebpUtECFhARaPhyV46B4BkrRac3U2 z0iIe748lZDUb2fGpMG6U24fNdezSO8uJLmeOl248t4HflUqVxIIBPM1IKdkSZbQIbTK BE6b/xB6fre1B1cnD5cypvQ33mGOGb0IKAMhHLMA2AoENimE4eiX3hXAmKnSDRbsZlr8 Rjh40QvyN6A5cgwyf1+jj0iVmkvx8GOGLjC9GCQBS8ITP84LbpmdIMqHYgUL/PjZyGHG 749w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/ti15IV9GQmTjc2dtF2pUFnsEJ5Eg/sMdeoZUB/d2rk=; b=ExYrGgn/Fd1Fvd0+wSELhpKk4gmlciaU/er9DsqhNE/CnQJuKTxLCX6+ttKlGAk3XF MidX1aZaAsfBNO7zy+51gdekxYDoem4KmHKRc7+OEsBfg2Cnlc6TgnDj6Qr8PkEsUk1H tu5fB3Qqsv8jiqz/kgG3AQaHNyRL+2QQ81S4WMTas3k6I29wzV9WOXcnWlSGvvcDXhUf mZ5pWY0ne7rFtfYOk2HDWxZ/lUwHl3b3zrTjQwHGibS+jKv9lOD/C1GiPBpX/bYA3yq2 lxsObzxcRwgxw9+DeUKqvz2HlBpG0FxbwFCOsIN+L29n/hRyMKSh2zC9E7kqlUDIrLdd qgRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vNOhICyD; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r15-20020a05620a298f00b006fcc513ec60si6310459qkp.93.2023.01.10.01.10.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Jan 2023 01:10:30 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vNOhICyD; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pF9wj-0005Yx-9z; Tue, 10 Jan 2023 03:25:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pF9wg-0005X2-OW for qemu-devel@nongnu.org; Tue, 10 Jan 2023 03:25:22 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pF9wf-0004Wn-9A for qemu-devel@nongnu.org; Tue, 10 Jan 2023 03:25:22 -0500 Received: by mail-wm1-x335.google.com with SMTP id l26so8168294wme.5 for ; Tue, 10 Jan 2023 00:25:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/ti15IV9GQmTjc2dtF2pUFnsEJ5Eg/sMdeoZUB/d2rk=; b=vNOhICyDsZR3mOCc5Zv7CZ1MbzPMBaS4IWceBba88/ctkdVbz6hkItpl6oDg6nRAWt 6qe6qZNiYAL+Q6/7DmDidIow6A/nzJubVX9yOv5K+Su9C8QN/77t7X5j+9XwM8sVgcFT qa1TKcG19moivkp0pmROVamEAQdEt7phT7yY0MUpayk5iwk1Yw38IzdLl6VWJacz1JT6 7Qa+nymP+FzzdlW2ixoBJCENtC0VS3jIH5AfT/HFauROJYGlvv5umEWZfNZ6rhXCp4vy iL0Y1s/YD+sGAxaDZU9OKXseKdN1giK+TCLmSRlaNSBAmIvjWz/eAc9pAHJu0tKxyOht ilGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/ti15IV9GQmTjc2dtF2pUFnsEJ5Eg/sMdeoZUB/d2rk=; b=YcY+EMJm24okxCbwj85vRiUk4vx+edxSrppCPbV1s0hF8acoX6RWWRHROGswSq5D7N HCJ6kOVE4PIFwMoml5rFg75g4s/EplUaRUPJFpUDOtf310xFS7riBqVXPMSUhY67eZRw QYaQa+7a1uXuhLdGZpzNxMIXWzqnqzd45AmzQy5gyU9vjg8qcab/KPSJIk3GuTbYbO6f 3+Iyhhr/maQNRdNFuj+5OBG8ohOTCUm1Umr+75r4Vl0+KXsB2h+gRSE0c9f8WY1PnB89 a5ewOt1ARHxSjVawvQH9XouKsVKAdz7s/f+oYV6GZZiMxX+zBajYV6mCB8ShbPB8aayC fG0g== X-Gm-Message-State: AFqh2kqbUauQAtPwdBxPtnnaYNdO0RAN02qt2a5PTATS36CG8un4cCVP py8U0aO9zEoLTxme8zC53KPRw1mRrGe79MJ9 X-Received: by 2002:a05:600c:2318:b0:3c6:e63e:23e9 with SMTP id 24-20020a05600c231800b003c6e63e23e9mr51419102wmo.24.1673339119781; Tue, 10 Jan 2023 00:25:19 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id g14-20020a05600c310e00b003cf5ec79bf9sm15275356wmo.40.2023.01.10.00.25.19 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 10 Jan 2023 00:25:19 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PATCH v2 2/5] hw/i2c/versatile_i2c: Replace VersatileI2CState -> ArmSbconI2CState Date: Tue, 10 Jan 2023 09:25:05 +0100 Message-Id: <20230110082508.24038-3-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230110082508.24038-1-philmd@linaro.org> References: <20230110082508.24038-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org In order to rename TYPE_VERSATILE_I2C as TYPE_ARM_SBCON_I2C (the formal ARM naming), start renaming its state. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- hw/i2c/versatile_i2c.c | 10 +++++----- include/hw/i2c/arm_sbcon_i2c.h | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/hw/i2c/versatile_i2c.c b/hw/i2c/versatile_i2c.c index 52a650f45e..ee095762e5 100644 --- a/hw/i2c/versatile_i2c.c +++ b/hw/i2c/versatile_i2c.c @@ -30,7 +30,7 @@ #include "qom/object.h" typedef ArmSbconI2CState VersatileI2CState; -DECLARE_INSTANCE_CHECKER(VersatileI2CState, VERSATILE_I2C, +DECLARE_INSTANCE_CHECKER(ArmSbconI2CState, VERSATILE_I2C, TYPE_VERSATILE_I2C) @@ -45,7 +45,7 @@ REG32(CONTROL_CLR, 4) static uint64_t versatile_i2c_read(void *opaque, hwaddr offset, unsigned size) { - VersatileI2CState *s = opaque; + ArmSbconI2CState *s = opaque; switch (offset) { case A_CONTROL_SET: @@ -60,7 +60,7 @@ static uint64_t versatile_i2c_read(void *opaque, hwaddr offset, static void versatile_i2c_write(void *opaque, hwaddr offset, uint64_t value, unsigned size) { - VersatileI2CState *s = opaque; + ArmSbconI2CState *s = opaque; switch (offset) { case A_CONTROL_SET: @@ -86,7 +86,7 @@ static const MemoryRegionOps versatile_i2c_ops = { static void versatile_i2c_init(Object *obj) { DeviceState *dev = DEVICE(obj); - VersatileI2CState *s = VERSATILE_I2C(obj); + ArmSbconI2CState *s = VERSATILE_I2C(obj); SysBusDevice *sbd = SYS_BUS_DEVICE(obj); I2CBus *bus; @@ -100,7 +100,7 @@ static void versatile_i2c_init(Object *obj) static const TypeInfo versatile_i2c_info = { .name = TYPE_VERSATILE_I2C, .parent = TYPE_SYS_BUS_DEVICE, - .instance_size = sizeof(VersatileI2CState), + .instance_size = sizeof(ArmSbconI2CState), .instance_init = versatile_i2c_init, }; diff --git a/include/hw/i2c/arm_sbcon_i2c.h b/include/hw/i2c/arm_sbcon_i2c.h index f54d1e5413..0101422d9d 100644 --- a/include/hw/i2c/arm_sbcon_i2c.h +++ b/include/hw/i2c/arm_sbcon_i2c.h @@ -21,8 +21,7 @@ #define TYPE_ARM_SBCON_I2C TYPE_VERSATILE_I2C typedef struct ArmSbconI2CState ArmSbconI2CState; -DECLARE_INSTANCE_CHECKER(ArmSbconI2CState, ARM_SBCON_I2C, - TYPE_ARM_SBCON_I2C) +DECLARE_INSTANCE_CHECKER(ArmSbconI2CState, ARM_SBCON_I2C, TYPE_ARM_SBCON_I2C) struct ArmSbconI2CState { /*< private >*/ From patchwork Tue Jan 10 08:25:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 640835 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp2592583pvb; Tue, 10 Jan 2023 01:15:02 -0800 (PST) X-Google-Smtp-Source: AMrXdXsGsAIb0+S6B58IxVNS7X6J9CXr65knlv5Es2nKVAmlcaJBU8MQ3RXVCZNB+frSRH0gk7G4 X-Received: by 2002:ac8:7318:0:b0:3a8:1178:5651 with SMTP id x24-20020ac87318000000b003a811785651mr83768941qto.37.1673342102458; Tue, 10 Jan 2023 01:15:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673342102; cv=none; d=google.com; s=arc-20160816; b=SMKoOZTikL1uf8Fuqw10bl9Vi99iL2NI/f5SFX6K9xglDR3+b1JDyB5rA0gTqge7BM F8eD2P76n5RDusUx4+kRNs5A0XmpgKhfkQmnQrxCnat840YzE3qgzFWyj5DxZ/I7Mt1Y tO67KsTfim1+/e1rxjfERUs4KPzavok30ZIgB0phUwTV4xalpbgH+lwvXhGsHvccUR0/ bmPoYbfoNhA0Us1gMuA12/SG/R6ZHnvXo1LFTtQU9K1BLTgrHfihNmeB4fhMp3DNXTEn LVLAJL750MvITs1anBCaYDIpb5gKsYLrf+PH/a8czaJqhwBx6uJxyJjt3GH74RivVuiq P0yQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+jh8sIE6Y37qV3H2XxaUrJ6N81p/E5fXu9XJULweaMI=; b=pf3l8K2X/eyTtxZ69l6vVc7ZQPXI9yO/enX0AE++NyQwp6wPVqYu4FE3GXdLr3sucb yguKUzcSzzFTpzTByQ4b6p8gTFM5MI815wrJbvcplZfpUlHjUfSaFuGlvgCNsVKpR/va eLfAvujwH1DKuRLvSzUMtpsZAHbVevPEW3G4o8s5og/Iaqpu0NY8uWukQ2II0gcRycvC FAeYagEoYKRhmV+HHxKcsxTnoOI9aRusZg5Bg1zGhbV5HGrNWvRadGnkVJnqxNcb+Aro axXRXvTU7SNLa9UpIMpRhOsBSmdSPQYP3HE/kK4JomaBw66iMXo4iOZqVfT1qiCRuM9d TLjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bSp65Bmr; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id l10-20020ac8078a000000b0039fd6dca359si5878668qth.97.2023.01.10.01.15.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Jan 2023 01:15:02 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bSp65Bmr; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pF9wn-0005aG-HO; Tue, 10 Jan 2023 03:25:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pF9wl-0005ZI-Sh for qemu-devel@nongnu.org; Tue, 10 Jan 2023 03:25:27 -0500 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pF9wk-0004ax-AL for qemu-devel@nongnu.org; Tue, 10 Jan 2023 03:25:27 -0500 Received: by mail-wm1-x336.google.com with SMTP id c4-20020a1c3504000000b003d9e2f72093so6345862wma.1 for ; Tue, 10 Jan 2023 00:25:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+jh8sIE6Y37qV3H2XxaUrJ6N81p/E5fXu9XJULweaMI=; b=bSp65BmrBaDbtUfu6yKRggSBppxWB9O8gYVA+fbtzSdbKzxWa5lyogoMgs65O5OQnP 0paxOFBD60ZzF+dzjUPUuvAThO+QKfCYw5yUvvup1h1VVjgPnMaDOdNnKuWGN2AiIwY4 vsIJb2YRA+1VcNdAl0PLeXlT36Wsn7Prl9xcxR998enlfhXOV91M9a26uMbJwumMof7k j2upF+ZM9T2KOwi0+iQWYoB1GjT77cjDQXBQ+kV80pu7PqghPpqkK5v35+lXmju0C9XU opsqp4UNuX9UXwn0WuFAJD1w4Z343GNFhoaGoRDZAwvZ6rlnEtVXOrz643AId7zI9nhy hE+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+jh8sIE6Y37qV3H2XxaUrJ6N81p/E5fXu9XJULweaMI=; b=1pm5lwVruLrT7r8SeZG2XxfCfYSSwWRtodKSk7khWUsa7J+bmcMlBK2bDYKFD7SkkW x8NmI2RiobTiKo6DZTsRelrjV3UfiN19zQJYJRJDsNDRVj6uXyAcOnhyaCFPV30qp98a UqvAfXPVH+jeYLBiZkN2pCUT83MMIvTAI7LPtVZy1Ix70KlBSdXVvwUnRqO3NEgMeS3f O/+EVEd8OoXL+EeC9AwuZ1G9+JY5QAO8KCT2ZvLHAISdj8hXt293I4ikLyh+8BV+/6yY lB18yytu/3s28I6zsRM88RIahzYIw4WVnfjc99U6RdS3+xvfYQ4qZITYYs4J28d/Dx1f g/WA== X-Gm-Message-State: AFqh2koBiFvLkj/i1fIJQ7ZUon9uQB3+6lj2MHyiLlgMH7yYdYF1BOUO 1ENeWHn7A4jqgRPWahikO3r1NM24thauNBuI X-Received: by 2002:a05:600c:3507:b0:3d9:f8a1:710d with SMTP id h7-20020a05600c350700b003d9f8a1710dmr1031687wmq.6.1673339124708; Tue, 10 Jan 2023 00:25:24 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id m17-20020a05600c3b1100b003cfbbd54178sm1222467wms.2.2023.01.10.00.25.23 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 10 Jan 2023 00:25:24 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PATCH v2 3/5] hw/i2c/versatile_i2c: Replace TYPE_VERSATILE_I2C -> TYPE_ARM_SBCON_I2C Date: Tue, 10 Jan 2023 09:25:06 +0100 Message-Id: <20230110082508.24038-4-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230110082508.24038-1-philmd@linaro.org> References: <20230110082508.24038-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- hw/arm/realview.c | 2 +- hw/arm/versatilepb.c | 2 +- hw/arm/vexpress.c | 2 +- hw/i2c/versatile_i2c.c | 4 ++-- include/hw/i2c/arm_sbcon_i2c.h | 3 +-- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/hw/arm/realview.c b/hw/arm/realview.c index d2dc8a8952..a5aa2f046a 100644 --- a/hw/arm/realview.c +++ b/hw/arm/realview.c @@ -309,7 +309,7 @@ static void realview_init(MachineState *machine, } } - dev = sysbus_create_simple(TYPE_VERSATILE_I2C, 0x10002000, NULL); + dev = sysbus_create_simple(TYPE_ARM_SBCON_I2C, 0x10002000, NULL); i2c = (I2CBus *)qdev_get_child_bus(dev, "i2c"); i2c_slave_create_simple(i2c, "ds1338", 0x68); diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c index ecc1f6cf74..e4fff668e2 100644 --- a/hw/arm/versatilepb.c +++ b/hw/arm/versatilepb.c @@ -336,7 +336,7 @@ static void versatile_init(MachineState *machine, int board_id) /* Add PL031 Real Time Clock. */ sysbus_create_simple("pl031", 0x101e8000, pic[10]); - dev = sysbus_create_simple(TYPE_VERSATILE_I2C, 0x10002000, NULL); + dev = sysbus_create_simple(TYPE_ARM_SBCON_I2C, 0x10002000, NULL); i2c = (I2CBus *)qdev_get_child_bus(dev, "i2c"); i2c_slave_create_simple(i2c, "ds1338", 0x68); diff --git a/hw/arm/vexpress.c b/hw/arm/vexpress.c index e1d1983ae6..391199d458 100644 --- a/hw/arm/vexpress.c +++ b/hw/arm/vexpress.c @@ -646,7 +646,7 @@ static void vexpress_common_init(MachineState *machine) sysbus_create_simple("sp804", map[VE_TIMER01], pic[2]); sysbus_create_simple("sp804", map[VE_TIMER23], pic[3]); - dev = sysbus_create_simple(TYPE_VERSATILE_I2C, map[VE_SERIALDVI], NULL); + dev = sysbus_create_simple(TYPE_ARM_SBCON_I2C, map[VE_SERIALDVI], NULL); i2c = (I2CBus *)qdev_get_child_bus(dev, "i2c"); i2c_slave_create_simple(i2c, "sii9022", 0x39); diff --git a/hw/i2c/versatile_i2c.c b/hw/i2c/versatile_i2c.c index ee095762e5..b95c70608b 100644 --- a/hw/i2c/versatile_i2c.c +++ b/hw/i2c/versatile_i2c.c @@ -31,7 +31,7 @@ typedef ArmSbconI2CState VersatileI2CState; DECLARE_INSTANCE_CHECKER(ArmSbconI2CState, VERSATILE_I2C, - TYPE_VERSATILE_I2C) + TYPE_ARM_SBCON_I2C) @@ -98,7 +98,7 @@ static void versatile_i2c_init(Object *obj) } static const TypeInfo versatile_i2c_info = { - .name = TYPE_VERSATILE_I2C, + .name = TYPE_ARM_SBCON_I2C, .parent = TYPE_SYS_BUS_DEVICE, .instance_size = sizeof(ArmSbconI2CState), .instance_init = versatile_i2c_init, diff --git a/include/hw/i2c/arm_sbcon_i2c.h b/include/hw/i2c/arm_sbcon_i2c.h index 0101422d9d..da9b5e8f83 100644 --- a/include/hw/i2c/arm_sbcon_i2c.h +++ b/include/hw/i2c/arm_sbcon_i2c.h @@ -17,8 +17,7 @@ #include "hw/i2c/bitbang_i2c.h" #include "qom/object.h" -#define TYPE_VERSATILE_I2C "versatile_i2c" -#define TYPE_ARM_SBCON_I2C TYPE_VERSATILE_I2C +#define TYPE_ARM_SBCON_I2C "versatile_i2c" typedef struct ArmSbconI2CState ArmSbconI2CState; DECLARE_INSTANCE_CHECKER(ArmSbconI2CState, ARM_SBCON_I2C, TYPE_ARM_SBCON_I2C) From patchwork Tue Jan 10 08:25:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 640841 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp2625365pvb; Tue, 10 Jan 2023 02:52:25 -0800 (PST) X-Google-Smtp-Source: AMrXdXtL9/mmkp/DLZ4DH+MRuMj9CMwGNLAiwZYupbGiw7i7N8FI/sQn6DDgJdlFJ+4jlpl85CA3 X-Received: by 2002:ac8:5710:0:b0:3a9:86dd:3c60 with SMTP id 16-20020ac85710000000b003a986dd3c60mr126938222qtw.47.1673347945139; Tue, 10 Jan 2023 02:52:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673347945; cv=none; d=google.com; s=arc-20160816; b=t0RJq5CzfuFxdSgBEG9Eet4C3QE2cuODtB0Tjqk82VW+aOeLz5PQCdUEw2edE2D4mc zh91t+iH/deiXJd5iJAHczJkUV3koTKY3TUA/pIuw5a3uKku76s17bkiJNawN/qhc8mc EXTCbu8DfeIp2msyBn35FULX7iBwtDzeJeydQdjEDs+dkx4cyrrLsm2I7hLdV640lmKF 0hfSr1KNHI7TLQm3eI4tSB7dVuGonB5+Bc0lCfsNwGfl1nEphSAULpOJT8u03DrvvIds Mz0z8dpw/ctw1Op3QbQrtacefdzfHIW4XyzfDn59UVKyZDlL7WHgSOG+imVcQIjaX4jJ CCkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=yDI+NMLY3kwFwk/S7hyFI2p4AMTGBHGEpIPdQhrWZDA=; b=zB/f03QvWDZRHJrGEG+K1eOvpcl8eOp7LYbfz5kPd5qmtZJDx7+WRY7MrhvX70ehGS x2OseIXv/dpieouWtKxYakNXSkjeCXUfbvi0wv4jBnx4kF/wid9/dQkZU7uSad1eSZQf QmhVInXNVeUnVK0kqtN24+IyR/U5EK4WCOrtg+N9A9g9qTUuYtfhuO5YhE7Jy9FnFtyW vlrxCpe+7Nj888T/0Pj0d6ovVUtDMqX3YEXduNnmeb72DaEFpBD2926/klmbN02SfjzW ysJXvWHZMxsW6IwCzwo6EA361wSt4n5TIeG6wGMRyNZXVQe4yuknGUjD5QfEGG0G6grt GWjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fcz5Ry+q; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id o4-20020a05620a2a0400b006fe3de1ccebsi6677779qkp.483.2023.01.10.02.52.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Jan 2023 02:52:25 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fcz5Ry+q; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pF9ws-0005cf-Iq; Tue, 10 Jan 2023 03:25:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pF9wq-0005bM-Ij for qemu-devel@nongnu.org; Tue, 10 Jan 2023 03:25:32 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pF9wp-0004eX-2S for qemu-devel@nongnu.org; Tue, 10 Jan 2023 03:25:32 -0500 Received: by mail-wr1-x42f.google.com with SMTP id z5so9821261wrt.6 for ; Tue, 10 Jan 2023 00:25:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yDI+NMLY3kwFwk/S7hyFI2p4AMTGBHGEpIPdQhrWZDA=; b=fcz5Ry+qWpo+SNgb49kngVWkzWmmab32dwHA4AbVp//EPjzQ/d1OCwBeG02Hp8Qg4i Pbayxa1fvcmbW7FdkntSNOBbMmoOXWfwIHgYDPRaoFIEkdBg94Iz0JRC4uoq2WbHu6MJ 0A1NzMg/DrkdyNC1jx6VMgKejSyObyz1kSBQkuYLMaouxWB6az0fM2tyyOaJbasczxkj Tw6guBfl11wj8fQpGX+E/tXiB1woVGaSzMVbtNClt1JKo4vHv6/dnwMyTAZ9uU5MtK+S 4PzRagd3mWZ7MVleDh/2v0/FPM/rtoohSK9yv+kC/SyXh/CU88K/AlOr6Hp+DmxrbPxu TmoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yDI+NMLY3kwFwk/S7hyFI2p4AMTGBHGEpIPdQhrWZDA=; b=xfF25rL3syd45MfPO6mnLP//tmeKFtl38tritUA8MxhSRcj4ddI2JPwRBGo5mH3WBY C+uxdP7adTiYeqZn08YZk76/cSqovRVzujVVm7JAb4r98p5u5BjfQID5j4To7LyPYPw8 2lUORddMujGjELG/P5u/BHWroQvHQbVR5GUKJhJfQIrGT9s2VXkWm02gHvTtKUzp5HyE ADb9ei3GJJQqmqdafKjzZ4ELfG5iDFzUmgovIazBtAr+nOcpEDRDiI1PzUdxDvPrJgIn JmQgCl8Z2hGohyxI40cJVsKTo/leJZJ4s9oP9w9OACwTKkvBKYhz/4ZOevIe0Jxl5qZr XpFg== X-Gm-Message-State: AFqh2ko5AOYJgQKyGl+bGXlfbXrb/mPz6EucWCdBGuSwB54dgAkGWAMI cu5/0LrWeZo3jR8DmmUUXP54FKOK2ZisU3nJ X-Received: by 2002:adf:fe0a:0:b0:2bd:6ddc:3a44 with SMTP id n10-20020adffe0a000000b002bd6ddc3a44mr779612wrr.62.1673339129539; Tue, 10 Jan 2023 00:25:29 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id u14-20020adfdd4e000000b002366e3f1497sm10663791wrm.6.2023.01.10.00.25.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 10 Jan 2023 00:25:29 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PATCH v2 4/5] hw/i2c/versatile_i2c: Use ARM_SBCON_I2C() macro Date: Tue, 10 Jan 2023 09:25:07 +0100 Message-Id: <20230110082508.24038-5-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230110082508.24038-1-philmd@linaro.org> References: <20230110082508.24038-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=philmd@linaro.org; helo=mail-wr1-x42f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org ARM_SBCON_I2C() macro and ArmSbconI2CState typedef are already declared via the QOM DECLARE_INSTANCE_CHECKER() macro in "hw/i2c/arm_sbcon_i2c.h". Drop the VERSATILE_I2C declarations from versatile_i2c.c. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- hw/i2c/versatile_i2c.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/hw/i2c/versatile_i2c.c b/hw/i2c/versatile_i2c.c index b95c70608b..d19df62265 100644 --- a/hw/i2c/versatile_i2c.c +++ b/hw/i2c/versatile_i2c.c @@ -29,11 +29,6 @@ #include "qemu/module.h" #include "qom/object.h" -typedef ArmSbconI2CState VersatileI2CState; -DECLARE_INSTANCE_CHECKER(ArmSbconI2CState, VERSATILE_I2C, - TYPE_ARM_SBCON_I2C) - - REG32(CONTROL_GET, 0) REG32(CONTROL_SET, 0) @@ -86,7 +81,7 @@ static const MemoryRegionOps versatile_i2c_ops = { static void versatile_i2c_init(Object *obj) { DeviceState *dev = DEVICE(obj); - ArmSbconI2CState *s = VERSATILE_I2C(obj); + ArmSbconI2CState *s = ARM_SBCON_I2C(obj); SysBusDevice *sbd = SYS_BUS_DEVICE(obj); I2CBus *bus; From patchwork Tue Jan 10 08:25:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 640837 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp2593693pvb; Tue, 10 Jan 2023 01:18:07 -0800 (PST) X-Google-Smtp-Source: AMrXdXu2qr/rqR1FD1tXUw2fKtakSCCRGeGs4XWKe/QJTRQ7CDgK20wKgqo9dZnAR8SFb5aV2RDB X-Received: by 2002:a05:6214:9a6:b0:531:e2c5:c400 with SMTP id du6-20020a05621409a600b00531e2c5c400mr31408188qvb.16.1673342287733; Tue, 10 Jan 2023 01:18:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673342287; cv=none; d=google.com; s=arc-20160816; b=CAKEzdYbKJ5qTEe8UerOw42nmZqhOdKD0JPjrR4TLdqvIUIXlx1Sy0hgjr8JhYdnhp UmVaRhxYNVmCMwTqqtsxI4FxBCxqPyAAnDMshOzbd8hvsEqK/EHiGLxDxdXtSpDrATzk YYNhM6dwN54tjHiZgHj7Zkbg4HtBFGVeE/RdYH4vBk2BwlP0qwlqcTlkZraWMMMkZRcC TfJGjKtx6JQOsjLQvx3P7Bjp7z0gzmo0R/NGzxnG5U0n3UXFPVEs0UN2CIG607Xqgg7J U8/GKdUYxFGQq+/aqIANU9zfSEMkDIj3EdW9bAbmtO3ojSws8qkgc6EVN54YhiGp8wxy rXBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=rl8UZbbfBdr+8xfBuGOP7BJXh/NrLDijG8q8CoIHOmk=; b=iZdBRjpdMtzbQRgxDHzAz44zjGFnorj5ew9jOT2ly63A025JyBgAY3/AgPZgJ5pqrN EHD8ixeHaDT1kieCcR75QJrkU+lBiWrVb5bjeihg8pV79moYE/r5ngpJUuUPxOTnj2FT kV/cJL/TPayUWZe8iWzavUVzpfnFhzRJgzGQRq9KtJSSDGjst2siQK+uPfb+Qf3LwvYy aYb73fN9wstHp7bye53jLGupncp4ylmILO7sGLKT3RbF9MA28nI/jWlnsS260tb5PPpc DpkXrDF7L3JbitFM/dB6Sax2LBK7zS1tv3Ux0ato2EfJN2ScsHsi4c2b5tclSMhObqwI PqFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="p/51Jqkt"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 191-20020a3706c8000000b006ee9451ddf1si5547892qkg.322.2023.01.10.01.18.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Jan 2023 01:18:07 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="p/51Jqkt"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pF9wx-0005g4-0o; Tue, 10 Jan 2023 03:25:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pF9wv-0005e1-2A for qemu-devel@nongnu.org; Tue, 10 Jan 2023 03:25:37 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pF9wt-0004T0-99 for qemu-devel@nongnu.org; Tue, 10 Jan 2023 03:25:36 -0500 Received: by mail-wm1-x332.google.com with SMTP id k26-20020a05600c1c9a00b003d972646a7dso11159592wms.5 for ; Tue, 10 Jan 2023 00:25:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=rl8UZbbfBdr+8xfBuGOP7BJXh/NrLDijG8q8CoIHOmk=; b=p/51JqktB+D0Ev2QBj/AL1LmIzR1MwKmRZDdmaleUJSF9x3tywhGX+dNVtxE7EhExN +JAvl8MjPIaWpCxvbfERDg7wgr3JnRCi6QZ2vtPwtIqvo0iQrkhx1Is7c+mqEE9/P+FI hj9T5XOP4zmJmT/CC8M+kyPFdEaKbTPIKXLBfazjVW3k+h18l+0LA9BR1OI4jeQuTetL eG+sLj1604HMrNMaa2KMSC9XjWaHVZP2TxnoyeJE38Q/Hx2nD2owNTmf5dfBLlxBcwBT bQC7F4sQNLcT0lPq2XH6XTHaEXcV17hwtv9RlEWstT2WPz7SQ8CSYfstQbXVQJQHTYz9 ltNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rl8UZbbfBdr+8xfBuGOP7BJXh/NrLDijG8q8CoIHOmk=; b=MCi19RcZDAXkYpSZ1RlF3MeoHycykJRO9ZTxGNi/Hk40jW3X/YRwbkaTbzoHfmfQRF uiJUcl0iK/I+ElZ5HNDGeqAbmYKUy3mEQHoCHkyu/FyjUT9SFrVkS00Rpz7zr+EdbBB1 hH/VHWFmmNCF7A5q/Dhgg5KUak1ZYJY8hDn/HusLD/rbFOSXevpwWKC2OdpeVp99LKBl AdH+88BtJZBy870kf4efJJDh+kveJ8KpmhMj8RkSQRs/0HucZQVmjlVPMmjlKKDsc7xz 4wqaXl6Bk1xeezDFjDwVioPm5V4itJ8Q9HqL32eE6wzdUtUMgS/XXI43MCpCITEf8qKT nLhw== X-Gm-Message-State: AFqh2kp5fd9cx9LHfycTQRECxWTXex1a4+Ht4VQ6q+jj2phU9hSHeFqE 89sEq7Q5xvUDGYo/g9uZnoyueXAM/lO2Hxs9 X-Received: by 2002:a05:600c:34cd:b0:3d5:1175:92c3 with SMTP id d13-20020a05600c34cd00b003d5117592c3mr47919044wmq.23.1673339134408; Tue, 10 Jan 2023 00:25:34 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id f7-20020a5d6647000000b002bbeb700c38sm5445555wrw.91.2023.01.10.00.25.33 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 10 Jan 2023 00:25:34 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PATCH v2 5/5] hw/i2c/versatile_i2c: Rename versatile_i2c -> arm_sbcon_i2c Date: Tue, 10 Jan 2023 09:25:08 +0100 Message-Id: <20230110082508.24038-6-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230110082508.24038-1-philmd@linaro.org> References: <20230110082508.24038-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org This device model started with the Versatile board, named TYPE_VERSATILE_I2C, then ended up renamed TYPE_ARM_SBCON_I2C as per the official "ARM SBCon two-wire serial bus interface" description from: https://developer.arm.com/documentation/dui0440/b/programmer-s-reference/two-wire-serial-bus-interface--sbcon Use the latter name as a better description. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- MAINTAINERS | 1 + hw/arm/Kconfig | 4 ++-- hw/i2c/Kconfig | 2 +- hw/i2c/{versatile_i2c.c => arm_sbcon_i2c.c} | 24 ++++++++++----------- hw/i2c/meson.build | 2 +- 5 files changed, 17 insertions(+), 16 deletions(-) rename hw/i2c/{versatile_i2c.c => arm_sbcon_i2c.c} (81%) diff --git a/MAINTAINERS b/MAINTAINERS index 5606e5dbd2..e6bfce8fe2 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -942,6 +942,7 @@ M: Peter Maydell L: qemu-arm@nongnu.org S: Maintained F: hw/*/versatile* +F: hw/i2c/arm_sbcon_i2c.c F: include/hw/i2c/arm_sbcon_i2c.h F: hw/misc/arm_sysctl.c F: docs/system/arm/versatile.rst diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index 17fcde8e1c..7db0ad7e8f 100644 --- a/hw/arm/Kconfig +++ b/hw/arm/Kconfig @@ -207,7 +207,7 @@ config REALVIEW select PL110 select PL181 # display select PL310 # cache controller - select VERSATILE_I2C + select ARM_SBCON_I2C select DS1338 # I2C RTC+NVRAM select USB_OHCI @@ -472,7 +472,7 @@ config MPS2 select SPLIT_IRQ select UNIMP select CMSDK_APB_WATCHDOG - select VERSATILE_I2C + select ARM_SBCON_I2C config FSL_IMX7 bool diff --git a/hw/i2c/Kconfig b/hw/i2c/Kconfig index 9bb8870517..7ac9cadffa 100644 --- a/hw/i2c/Kconfig +++ b/hw/i2c/Kconfig @@ -14,7 +14,7 @@ config SMBUS_EEPROM bool select SMBUS -config VERSATILE_I2C +config ARM_SBCON_I2C bool select BITBANG_I2C diff --git a/hw/i2c/versatile_i2c.c b/hw/i2c/arm_sbcon_i2c.c similarity index 81% rename from hw/i2c/versatile_i2c.c rename to hw/i2c/arm_sbcon_i2c.c index d19df62265..979ccbe0ed 100644 --- a/hw/i2c/versatile_i2c.c +++ b/hw/i2c/arm_sbcon_i2c.c @@ -37,7 +37,7 @@ REG32(CONTROL_CLR, 4) #define SCL BIT(0) #define SDA BIT(1) -static uint64_t versatile_i2c_read(void *opaque, hwaddr offset, +static uint64_t arm_sbcon_i2c_read(void *opaque, hwaddr offset, unsigned size) { ArmSbconI2CState *s = opaque; @@ -52,7 +52,7 @@ static uint64_t versatile_i2c_read(void *opaque, hwaddr offset, } } -static void versatile_i2c_write(void *opaque, hwaddr offset, +static void arm_sbcon_i2c_write(void *opaque, hwaddr offset, uint64_t value, unsigned size) { ArmSbconI2CState *s = opaque; @@ -72,13 +72,13 @@ static void versatile_i2c_write(void *opaque, hwaddr offset, s->in = bitbang_i2c_set(&s->bitbang, BITBANG_I2C_SDA, (s->out & SDA) != 0); } -static const MemoryRegionOps versatile_i2c_ops = { - .read = versatile_i2c_read, - .write = versatile_i2c_write, +static const MemoryRegionOps arm_sbcon_i2c_ops = { + .read = arm_sbcon_i2c_read, + .write = arm_sbcon_i2c_write, .endianness = DEVICE_NATIVE_ENDIAN, }; -static void versatile_i2c_init(Object *obj) +static void arm_sbcon_i2c_init(Object *obj) { DeviceState *dev = DEVICE(obj); ArmSbconI2CState *s = ARM_SBCON_I2C(obj); @@ -87,21 +87,21 @@ static void versatile_i2c_init(Object *obj) bus = i2c_init_bus(dev, "i2c"); bitbang_i2c_init(&s->bitbang, bus); - memory_region_init_io(&s->iomem, obj, &versatile_i2c_ops, s, + memory_region_init_io(&s->iomem, obj, &arm_sbcon_i2c_ops, s, "arm_sbcon_i2c", 0x1000); sysbus_init_mmio(sbd, &s->iomem); } -static const TypeInfo versatile_i2c_info = { +static const TypeInfo arm_sbcon_i2c_info = { .name = TYPE_ARM_SBCON_I2C, .parent = TYPE_SYS_BUS_DEVICE, .instance_size = sizeof(ArmSbconI2CState), - .instance_init = versatile_i2c_init, + .instance_init = arm_sbcon_i2c_init, }; -static void versatile_i2c_register_types(void) +static void arm_sbcon_i2c_register_types(void) { - type_register_static(&versatile_i2c_info); + type_register_static(&arm_sbcon_i2c_info); } -type_init(versatile_i2c_register_types) +type_init(arm_sbcon_i2c_register_types) diff --git a/hw/i2c/meson.build b/hw/i2c/meson.build index 6e7340aaac..32ac30abae 100644 --- a/hw/i2c/meson.build +++ b/hw/i2c/meson.build @@ -11,7 +11,7 @@ i2c_ss.add(when: 'CONFIG_MPC_I2C', if_true: files('mpc_i2c.c')) i2c_ss.add(when: 'CONFIG_NRF51_SOC', if_true: files('microbit_i2c.c')) i2c_ss.add(when: 'CONFIG_NPCM7XX', if_true: files('npcm7xx_smbus.c')) i2c_ss.add(when: 'CONFIG_SMBUS_EEPROM', if_true: files('smbus_eeprom.c')) -i2c_ss.add(when: 'CONFIG_VERSATILE_I2C', if_true: files('versatile_i2c.c')) +i2c_ss.add(when: 'CONFIG_ARM_SBCON_I2C', if_true: files('arm_sbcon_i2c.c')) i2c_ss.add(when: 'CONFIG_OMAP', if_true: files('omap_i2c.c')) i2c_ss.add(when: 'CONFIG_PPC4XX', if_true: files('ppc4xx_i2c.c')) i2c_ss.add(when: 'CONFIG_PCA954X', if_true: files('i2c_mux_pca954x.c'))