From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 26CA7C07E8B for ; Tue, 8 Aug 2023 16:30:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232755AbjHHQaE (ORCPT ); Tue, 8 Aug 2023 12:30:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232772AbjHHQ2z (ORCPT ); Tue, 8 Aug 2023 12:28:55 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3762812538; Tue, 8 Aug 2023 08:51:10 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9D43F62461; Tue, 8 Aug 2023 08:41:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8003EC433C8; Tue, 8 Aug 2023 08:41:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691484113; bh=RmuHI6SnVuFMKUQ2d0Pd88TnzEPcPc2NGqkjG7ikYO4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cwr+yMbUV+NM94lVf0ySZk4FQ2nozF+U9wyhfVylYCpXbt1OL0ssrTMJwXSxsdsHi 18rTqTqxxueHW+nMM+ermi6IQknqO8+usQdaIiyi1h1tiB82F262sqvPDUGDacSDkO a+eTTnFx91yf6zmVoeagFEWEQ3lln0JhVGRC83P65FbUnGAKxwHLFQyg6fLOXTTdZn A1EoGEKnrrv1NvaNJ3siqRI5n1/LCn3oUKEUABC06gGoEHMihEoitC1g2km+U7SlBq HDlEJ7VYY0XrzBN2J0H3HcQA4IRPSXjHrlCgv6J3k9J5QInU+H7jleqW4Lu80DSrip ExqC2/GRUi8eA== Date: Tue, 8 Aug 2023 09:41:45 +0100 From: Conor Dooley To: Sunil V L Cc: linux-doc@vger.kernel.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org, Heikki Krogerus , "Rafael J . Wysocki" , Catalin Marinas , Atish Kumar Patra , Conor Dooley , Will Deacon , Haibo Xu , Jonathan Corbet , Marc Zyngier , Daniel Lezcano , Robert Moore , Andrew Jones , Albert Ou , Paul Walmsley , Bjorn Helgaas , Thomas Gleixner , Andy Shevchenko , Greg Kroah-Hartman , Daniel Scally , Palmer Dabbelt , Sakari Ailus , Anup Patel , Len Brown Subject: Re: [RFC PATCH v1 20/21] RISC-V: ACPI: Create PLIC platform device Message-ID: <20230808-chalice-easing-1369c7386082@spud> References: <20230803175916.3174453-1-sunilvl@ventanamicro.com> <20230803175916.3174453-21-sunilvl@ventanamicro.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="yKOyY2Nm+bU0Ajrr" Content-Disposition: inline In-Reply-To: <20230803175916.3174453-21-sunilvl@ventanamicro.com> Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org --yKOyY2Nm+bU0Ajrr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 03, 2023 at 11:29:15PM +0530, Sunil V L wrote: > Since PLIC needs to be a platform device For the unwashed, why does the PLCI need to be a platform device? (And while you're at that, please try to make use of the extra ~20 characters per line that you can use here.) > probe the > MADT and create platform devices for each PLIC in the > system. Use software node framework for the fwnode > which allows to create properties and hence the > actual irqchip driver doesn't need to do anything > different for ACPI vs DT. >=20 > Signed-off-by: Sunil V L > Co-developed-by: Haibo Xu > Signed-off-by: Haibo Xu > +static struct fwnode_handle *acpi_plic_create_fwnode(struct acpi_madt_pl= ic *plic) > +{ > + struct fwnode_handle *fwnode, *parent_fwnode; > + struct riscv_irqchip_list *plic_element; > + struct software_node_ref_args *refs; > + struct property_entry props[8] =3D {}; > + int nr_contexts; > + > + props[0] =3D PROPERTY_ENTRY_U32("riscv,gsi-base", plic->gsi_base); > + props[1] =3D PROPERTY_ENTRY_U32("riscv,ndev", plic->num_irqs); > + props[2] =3D PROPERTY_ENTRY_U32("riscv,max_prio", plic->max_prio); My OCD wants to know why this gets an _ but the others have a -. > + props[3] =3D PROPERTY_ENTRY_U8("riscv,plic-id", plic->id); > + props[4] =3D PROPERTY_ENTRY_U64("riscv,plic-base", plic->base_addr); > + props[5] =3D PROPERTY_ENTRY_U32("riscv,plic-size", plic->size); --yKOyY2Nm+bU0Ajrr Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZNH/yQAKCRB4tDGHoIJi 0o+oAQCMWQ+6bAgMjck+BSFaQF/FjtKfLfwDUTH+w218stePOwD8DiC9qCq9yuol xjAhVIcaeVplSIBN2+Ti/3cDd5sR5AE= =0Z4N -----END PGP SIGNATURE----- --yKOyY2Nm+bU0Ajrr--