From patchwork Wed Oct 25 20:23:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sunil V L X-Patchwork-Id: 158290 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d641:0:b0:403:3b70:6f57 with SMTP id cy1csp218925vqb; Wed, 25 Oct 2023 13:27:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IENzbyVetR1iHIv/5DmOZXp0wvvbAIJ3ev15kUsybVRDi9bri4pRIBmcM7jGO3xm0gxb8i8 X-Received: by 2002:a05:6830:310f:b0:6ce:40f1:e9f0 with SMTP id b15-20020a056830310f00b006ce40f1e9f0mr16211334ots.11.1698265659893; Wed, 25 Oct 2023 13:27:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698265659; cv=none; d=google.com; s=arc-20160816; b=nRHgvkKmMuv9PyGmP+x1r5JPk4ptyPnbDFuBbPxZx9YPmofDp8h/gU/3WTh7MAkSYe bDIZHNYGbLt+RXyLaFved3Ve+7pFpQayocpd6u3PD/2f7KOV5ZqTvkEnaMIK8yfC1lY6 oJAedeTsaVPW42GsnXxzg7ekSRi48HhyRaoiZCS5YE4yY4VY0BjKoSciZKC0Eb0zbyCH N8qNXo0Kpjgf/rdb9a1ZKHU6bM1Yyosplco/vPAjOveqfibRgF057qKwW00FE09P1k/b CqES9XOqFbU3wx26QvlhMTBFiisS+yqGCrI4fGlgr7HpZMt3eBL5bNgbexuOmTmvObDg N6FQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=6iZbx/IhbkeIBI8+FFzeu8yqPtMDZXtB3E1NSIPmMj8=; fh=/fEAwM0ftwV2z3MN/iSYq1lv8IFPZ2fY8Kg8RoFcxjU=; b=yutUZ/BgKKWsY0xQVYm31oBYKroTLjEKmE1SqL58OrW53phlrFJcCOpM5o3yv+/uE5 8tQ2xw9xscauq6XbfNQmQb43DdWFGHIgAy3L9vmYbGXplMJ3lwzqQzmuGmZVacp9s4ry Ofer5ULZQ6pQ7bxzQy6yF+vO+vUN9UKo0rMRGTm3aqHkvjIWLoE/3ucQWPUTSuV3ge9R 4dmf5hLmoOQ/lfjfgUDeEyV8U+ft9f9Enjjjs8Ky125CmGOSm7CjMC53o66ZTyKiLdOk Q9G1dnjOfXgn90LA3ZJmV4Ta4tYC1venRIcQusN77mpUa8RD1IAPEU227M9d+s8U7k7y jGGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=QEHaA3wc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id m184-20020a0de3c1000000b0058d5af420bbsi11796961ywe.59.2023.10.25.13.27.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 13:27:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=QEHaA3wc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 88AA0809B460; Wed, 25 Oct 2023 13:27:36 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235001AbjJYU12 (ORCPT + 25 others); Wed, 25 Oct 2023 16:27:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234913AbjJYU05 (ORCPT ); Wed, 25 Oct 2023 16:26:57 -0400 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1310110E3 for ; Wed, 25 Oct 2023 13:26:00 -0700 (PDT) Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-6b5af4662b7so121689b3a.3 for ; Wed, 25 Oct 2023 13:26:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1698265559; x=1698870359; darn=vger.kernel.org; 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=6iZbx/IhbkeIBI8+FFzeu8yqPtMDZXtB3E1NSIPmMj8=; b=QEHaA3wcgswZPYvKtFvfe/69k4FY46ERnR8WMgXV1IMqoelcM4rz2XqdzfkYCJXcHA AZeXQv7QoKGxqZ8ztRXRHR9/meSUBV06R56NGZ0Bg4afony776+cS/GP0IMhMqcGOPeR BXmQXbwU0ap+UQ2w4s/WYEtaHQZTbJ+E9qp0/JBGXAVRiliE31C9a2pEb9jGPqDb//5F i7Gi+IZmFLPOhb5//zueDpHn2Gg8GUHChn2TdeHDV+4lyzpfvEf+quAO5gN25dyGVvVN XDNQQ+hvzvrwbpVPDQpk/iwr8m3MuhroNohrJ9lv6idIL4D5Op4XIlq/P3lu0wHBCkvV CU2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698265559; x=1698870359; 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=6iZbx/IhbkeIBI8+FFzeu8yqPtMDZXtB3E1NSIPmMj8=; b=B6PxOIRlnhcYk7q0KGVtSPsjzwcohCKidUougLWrkkCzT82CJpyeWJIt4ODjtIV7iP bsMgsbAAqjeUYWWw9uTd+WMY+7+04xnDVvdCF04bIhv3Nm/6lPRKrj5UtgT1OiNRSy5q oRVJ615CR0FAemXGhdwzMZfdak3hqiFoI3cyvxMcg5hm/SrK/maQZJlcTSgkBZMQsKOp 5c75ifU+b8/Wx5V0MmxSOcOsd5+mGxbNRkLqWE4P5+ATSztDb24SF1govaYC8DCUQBsB K1LVWpjrGA2SDdH1OrV1csle0INii57ZrdIdh/+PKUD287DPM6BdaChCMQFiSOs6mj7D NT2g== X-Gm-Message-State: AOJu0YwKwrnHFTJjKhUGf+QwgKbn2dCOOEXqdLiZ/7hP3263TOm983rK t5UQ3Y8USTe9eXxjS5IKyu6ALg== X-Received: by 2002:a05:6a00:1798:b0:6ad:535e:6ed9 with SMTP id s24-20020a056a00179800b006ad535e6ed9mr16898802pfg.16.1698265559236; Wed, 25 Oct 2023 13:25:59 -0700 (PDT) Received: from sunil-pc.Dlink ([106.51.188.78]) by smtp.gmail.com with ESMTPSA id y3-20020aa79423000000b006b84ed9371esm10079590pfo.177.2023.10.25.13.25.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 13:25:58 -0700 (PDT) From: Sunil V L To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org Cc: Catalin Marinas , Will Deacon , Paul Walmsley , Palmer Dabbelt , Albert Ou , "Rafael J . Wysocki" , Len Brown , Bjorn Helgaas , Anup Patel , Thomas Gleixner , Greg Kroah-Hartman , Jiri Slaby , Conor Dooley , Andrew Jones , Atish Kumar Patra , Haibo Xu , Sunil V L Subject: [RFC PATCH v2 19/21] ACPI: bus: Add acpi_riscv_init function Date: Thu, 26 Oct 2023 01:53:42 +0530 Message-Id: <20231025202344.581132-20-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231025202344.581132-1-sunilvl@ventanamicro.com> References: <20231025202344.581132-1-sunilvl@ventanamicro.com> MIME-Version: 1.0 X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Wed, 25 Oct 2023 13:27:36 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780760612076159442 X-GMAIL-MSGID: 1780760612076159442 Add a new function for RISC-V to do any architecture specific initialization. This function will be used to create platform devices like APLIC, PLIC, RISC-V IOMMU etc. This is similar to acpi_arm_init(). Signed-off-by: Sunil V L --- drivers/acpi/bus.c | 1 + drivers/acpi/riscv/Makefile | 2 +- drivers/acpi/riscv/init.c | 12 ++++++++++++ include/linux/acpi.h | 6 ++++++ 4 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 drivers/acpi/riscv/init.c diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index 9eace6c7042e..f7ac0caf04cf 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -1417,6 +1417,7 @@ static int __init acpi_init(void) acpi_hest_init(); acpi_ghes_init(); acpi_arm_init(); + acpi_riscv_init(); acpi_scan_init(); acpi_ec_init(); acpi_debugfs_init(); diff --git a/drivers/acpi/riscv/Makefile b/drivers/acpi/riscv/Makefile index f80b3da230e9..c4d679b1359e 100644 --- a/drivers/acpi/riscv/Makefile +++ b/drivers/acpi/riscv/Makefile @@ -1,2 +1,2 @@ # SPDX-License-Identifier: GPL-2.0-only -obj-y += rhct.o irq.o +obj-y += rhct.o irq.o init.o diff --git a/drivers/acpi/riscv/init.c b/drivers/acpi/riscv/init.c new file mode 100644 index 000000000000..b5807bbdb171 --- /dev/null +++ b/drivers/acpi/riscv/init.c @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (C) 2023, Ventana Micro Systems Inc + * Author: Sunil V L + * + */ + +#include + +void __init acpi_riscv_init(void) +{ +} diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 19c3dda9c2ed..c408070ac52e 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -1527,6 +1527,12 @@ void acpi_arm_init(void); static inline void acpi_arm_init(void) { } #endif +#ifdef CONFIG_RISCV +void acpi_riscv_init(void); +#else +static inline void acpi_riscv_init(void) { } +#endif + #ifdef CONFIG_ACPI_PCC void acpi_init_pcc(void); #else