From nobody Fri Apr 4 04:02:00 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=reject dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1741467212; cv=none; d=zohomail.com; s=zohoarc; b=Mg0n7Ffmn1j6ngaeK+PierbAMKzjGMc+6jTk+EUoC/2P1WmynNK6dgSAESK6yBH+dtiygA4ubgmzw7Hb6xD4RwmbzSDLGbHxy8CIYvSNbklJ1ispSkT72rroM/PG5eWmjfYkVSCbFFr4uamasM2w4uBc/OPeVo+nwILS0rYanzk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741467212; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=VEnJnSJjBCRbG7Bxvx6dXvx5T06oIdnpdDOMMIg6Pl8=; b=F5Y8287EgJ/Dt/08qQKV0i2XOwC5tFA6cQ4TJNqIVrWLqkdlsj9q/zcrUa7KUHosYEWcFzj7oAoXXSPpWccq46AoV769YQhRgnnyk61mM9dOXO71sGKR/RHEhHky3S2i+kmQXrsfFq/4/6WX8fOeB6tNqSqsUyVE32H/HM5k9uU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 174146721248720.81092660445438; Sat, 8 Mar 2025 12:53:32 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tr1AG-0003HE-Oj; Sat, 08 Mar 2025 15:52:58 -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 1tr1AD-00037y-9l; Sat, 08 Mar 2025 15:52:53 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tr1AB-0007Sd-Fu; Sat, 08 Mar 2025 15:52:52 -0500 Received: from pps.filterd (m0353725.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 528KcS6N007400; Sat, 8 Mar 2025 20:52:43 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 458w3yg17n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 08 Mar 2025 20:52:42 +0000 (GMT) Received: from m0353725.ppops.net (m0353725.ppops.net [127.0.0.1]) by pps.reinject (8.18.0.8/8.18.0.8) with ESMTP id 528KqgrX030294; Sat, 8 Mar 2025 20:52:42 GMT Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 458w3yg17k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 08 Mar 2025 20:52:42 +0000 (GMT) Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 528HKxHL013720; Sat, 8 Mar 2025 20:52:41 GMT Received: from smtprelay03.fra02v.mail.ibm.com ([9.218.2.224]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 454e2mdu0t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 08 Mar 2025 20:52:41 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay03.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 528KqbwW57278730 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 8 Mar 2025 20:52:38 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C96FA20043; Sat, 8 Mar 2025 20:52:37 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 90A6220040; Sat, 8 Mar 2025 20:52:35 +0000 (GMT) Received: from li-3c92a0cc-27cf-11b2-a85c-b804d9ca68fa.ibm.com (unknown [9.39.22.32]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Sat, 8 Mar 2025 20:52:34 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pp1; bh=VEnJnS JjBCRbG7Bxvx6dXvx5T06oIdnpdDOMMIg6Pl8=; b=eP9Z46V1PzPlJi9ulRvNbC geExR+BFmRZcFy2BMRlBs/zaytIracj3kvSjlzOsQMvoDYEIsv5cyD+wBJ0WHlnv qeC1RvPxZtSZeO5QIZ+yMGKGVVWoRVZ4SbpOEq0RedSd6tSi40rJeJ9cII1EWLMs WYygDPNgG0bxM4KN5HW4Vp1K0a2ZXSWc/KzrlKJm6h9t+xBwnwW0/vflI92oYJuh Qhh1FUFpOUP+yqgBidGBECM3BDCmKVogf4GZLN8bQZQOnmbX9i4M4HGJktdTRucA u5+jLgL1SIEaBhjsY0hUJHFtgcS6d9yQANSlXZO0vVnwsJa/GUOpmzdY9XAbbidw == From: Aditya Gupta To: Mahesh J Salgaonkar , Madhavan Srinivasan , Nicholas Piggin , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Harsh Prateek Bora , =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Barrat?= Cc: , Subject: [PATCH v5 6/8] ppc/pnv: Add ChipTOD model for Power11 Date: Sun, 9 Mar 2025 02:21:39 +0530 Message-ID: <20250308205141.3219333-7-adityag@linux.ibm.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250308205141.3219333-1-adityag@linux.ibm.com> References: <20250308205141.3219333-1-adityag@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: Rz-_5Fop3zK3vw3ztdVPC5Z5QDSHEVNu X-Proofpoint-GUID: dA-oJkZySJ0hFYp5_SqOXgZ40XXr88Gd X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1093,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-03-08_08,2025-03-07_03,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 lowpriorityscore=0 malwarescore=0 clxscore=1015 phishscore=0 spamscore=0 bulkscore=0 priorityscore=1501 suspectscore=0 mlxscore=0 mlxlogscore=964 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2502100000 definitions=main-2503080159 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=148.163.158.5; envelope-from=adityag@linux.ibm.com; helo=mx0b-001b2d01.pphosted.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @ibm.com) X-ZM-MESSAGEID: 1741467213771019100 Power11 core is same as Power10. Introduce Power11 ChipTod, which relies on the common PnvChipTOD, similar to Power10's ChipTOD. Cc: C=C3=A9dric Le Goater Cc: Fr=C3=A9d=C3=A9ric Barrat Cc: Mahesh J Salgaonkar Cc: Madhavan Srinivasan Cc: Nicholas Piggin Signed-off-by: Aditya Gupta --- hw/ppc/pnv_chiptod.c | 37 ++++++++++++++++++++++++++++++++++++ include/hw/ppc/pnv_chiptod.h | 2 ++ 2 files changed, 39 insertions(+) diff --git a/hw/ppc/pnv_chiptod.c b/hw/ppc/pnv_chiptod.c index c8987ae67a2a..b5e1a2c24647 100644 --- a/hw/ppc/pnv_chiptod.c +++ b/hw/ppc/pnv_chiptod.c @@ -520,6 +520,42 @@ static const TypeInfo pnv_chiptod_power10_type_info = =3D { } }; =20 +static int pnv_chiptod_power11_dt_xscom(PnvXScomInterface *dev, void *fdt, + int xscom_offset) +{ + const char compat[] =3D "ibm,power-chiptod\0ibm,power11-chiptod"; + + return pnv_chiptod_dt_xscom(dev, fdt, xscom_offset, compat, sizeof(com= pat)); +} + +static void pnv_chiptod_power11_class_init(ObjectClass *klass, void *data) +{ + PnvChipTODClass *pctc =3D PNV_CHIPTOD_CLASS(klass); + DeviceClass *dc =3D DEVICE_CLASS(klass); + PnvXScomInterfaceClass *xdc =3D PNV_XSCOM_INTERFACE_CLASS(klass); + + dc->desc =3D "PowerNV ChipTOD Controller (POWER11)"; + device_class_set_props(dc, pnv_chiptod_properties); + + xdc->dt_xscom =3D pnv_chiptod_power11_dt_xscom; + + pctc->broadcast_ttype =3D chiptod_power10_broadcast_ttype; + pctc->tx_ttype_target =3D chiptod_power10_tx_ttype_target; + + pctc->xscom_size =3D PNV_XSCOM_CHIPTOD_SIZE; +} + +static const TypeInfo pnv_chiptod_power11_type_info =3D { + .name =3D TYPE_PNV11_CHIPTOD, + .parent =3D TYPE_PNV_CHIPTOD, + .instance_size =3D sizeof(PnvChipTOD), + .class_init =3D pnv_chiptod_power11_class_init, + .interfaces =3D (InterfaceInfo[]) { + { TYPE_PNV_XSCOM_INTERFACE }, + { } + } +}; + static void pnv_chiptod_reset(void *dev) { PnvChipTOD *chiptod =3D PNV_CHIPTOD(dev); @@ -579,6 +615,7 @@ static void pnv_chiptod_register_types(void) type_register_static(&pnv_chiptod_type_info); type_register_static(&pnv_chiptod_power9_type_info); type_register_static(&pnv_chiptod_power10_type_info); + type_register_static(&pnv_chiptod_power11_type_info); } =20 type_init(pnv_chiptod_register_types); diff --git a/include/hw/ppc/pnv_chiptod.h b/include/hw/ppc/pnv_chiptod.h index fde569bcbfa9..466b06560a28 100644 --- a/include/hw/ppc/pnv_chiptod.h +++ b/include/hw/ppc/pnv_chiptod.h @@ -17,6 +17,8 @@ OBJECT_DECLARE_TYPE(PnvChipTOD, PnvChipTODClass, PNV_CHIP= TOD) DECLARE_INSTANCE_CHECKER(PnvChipTOD, PNV9_CHIPTOD, TYPE_PNV9_CHIPTOD) #define TYPE_PNV10_CHIPTOD TYPE_PNV_CHIPTOD "-POWER10" DECLARE_INSTANCE_CHECKER(PnvChipTOD, PNV10_CHIPTOD, TYPE_PNV10_CHIPTOD) +#define TYPE_PNV11_CHIPTOD TYPE_PNV_CHIPTOD "-POWER11" +DECLARE_INSTANCE_CHECKER(PnvChipTOD, PNV11_CHIPTOD, TYPE_PNV11_CHIPTOD) =20 enum tod_state { tod_error =3D 0, --=20 2.48.1