From patchwork Thu Aug 3 17:59:09 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: 13340417 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1CC1BC001DF for ; Thu, 3 Aug 2023 18:01:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=g2zE6AR45imlALvXHJnRaMnpTTRn13Kp+i0HZAok2O4=; b=G1QylilzTl8zo4 fcAzd3I+NirrIzPvo4szXBaOSg5LTaA29McYL0FB2sgnShREcnG1hlFAyqk0YTYgsS1aKQEuljOyr lztXRE3rSrZvOtY+AoUkrbYelJyNbKHVHzQ1Aj3CxKAQD16Nj7R2TSn/mhYMv3og5ryrmemymNT62 bkmm6dBTRFSFOuUNvZUE8X8CNyUc6s8RvcPoxMKn565ooYs4msj7SLuHL290WqazQx81GGuxzdvSm SwSbfyLXEhPGgiR0DjSL4QHUejSCQAJzRnuf+m0B4hWAhx7z4e86TF7Dt+1A1vOaWI2FCZIbpu6Yi E0UVlLfbgILt9oB6Matw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qRcda-00AVcV-2i; Thu, 03 Aug 2023 18:01:26 +0000 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qRcdT-00AVWJ-21 for linux-arm-kernel@lists.infradead.org; Thu, 03 Aug 2023 18:01:25 +0000 Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-68706b39c4cso873873b3a.2 for ; Thu, 03 Aug 2023 11:01:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1691085679; x=1691690479; 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=/SWdbLlCMTnsfDgjj0hJXL2JTXfe1aLJEQPkrac/1+s=; b=D2G3HiLpmiaQgiit5Uw5A+KyEHMgDrbX4OUobJfTY5xZLp+QrgoNkT2MrhFFEyepif NGS8bIEgxHx46b2qZaLXX0Y0SmZd7FsXd1pRwMLzsoEhtQ8pcPTRJawrVIj/nWamed2p c8Ow5XHa5oDci6OFZ2uyC29mSIkYFExo2ugvnfWshx5bUl5bbLWflApdPwz7r/8MPdiM lWTXRBs2gyD03CeRJIWHuRF1YcIOZcbbXk5w4VPmjVHxhOze/aVypsDeH0+qQb104tHd EPWaTU8ZA96yj8ruCaOH+vJ45kbEIP06MY4/8eq+kYWiPKbchSKHc0XwVBcVevJ8/Xa6 Exvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691085679; x=1691690479; 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=/SWdbLlCMTnsfDgjj0hJXL2JTXfe1aLJEQPkrac/1+s=; b=H0pSoB74Xt7MsepuHHkpYdZybut7Fu0qxDsgL2+zHDD7vbj3CZsVxygwCK0CPJiYm4 pQVffTfXyRv9qItFB9EWXK/PJZKdMBg0WzYb152oscsA0LpSfz9PlsSbOMEHVh8Sk3iR PpWRZQzqxho+LMNC/qK6lygzIy1lI/y6WhajlvYzgSDrEfUqIZIA52bt+DzPH7Xs0qZY J90iNBskkR+G7jAcU/FpS3IbPO7R5Lxm4WjN1wneSCLDmphmebkcDyJD29lGYNKZZbic e8TskL6jArlhw5PFCzxURXfkUSm/OGjQiC3nHmajK2WipfJk8Vn1e+pg/ja4Zcovqp50 gRIg== X-Gm-Message-State: AOJu0YzhSzhyv4mqheoVGUtWipkVVe2e3nDcCvZ/mzahWDLrGQ0qQGtS uy7DHjCT//CTo5J3Hv/gTia/BA== X-Google-Smtp-Source: AGHT+IFGyUpuHPIut+tVQuZEcz6NanuBhvrn3iSa68PTIe5J1FDlay1VOOe28UUCGaj1xOLlQOJYFA== X-Received: by 2002:a05:6a20:72a0:b0:13f:8a5f:ad8e with SMTP id o32-20020a056a2072a000b0013f8a5fad8emr1930770pzk.58.1691085678868; Thu, 03 Aug 2023 11:01:18 -0700 (PDT) Received: from sunil-pc.Dlink ([106.51.190.143]) by smtp.gmail.com with ESMTPSA id s8-20020aa78d48000000b0065a1b05193asm134952pfe.185.2023.08.03.11.01.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Aug 2023 11:01:18 -0700 (PDT) From: Sunil V L To: 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 Cc: Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Catalin Marinas , Will Deacon , "Rafael J . Wysocki" , Len Brown , Andy Shevchenko , Daniel Scally , Heikki Krogerus , Sakari Ailus , Greg Kroah-Hartman , Daniel Lezcano , Thomas Gleixner , Anup Patel , Marc Zyngier , Bjorn Helgaas , Robert Moore , Haibo Xu , Andrew Jones , Conor Dooley , Atish Kumar Patra , Sunil V L Subject: [RFC PATCH v1 14/21] ACPI: bus: Add acpi_riscv_init function Date: Thu, 3 Aug 2023 23:29:09 +0530 Message-Id: <20230803175916.3174453-15-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230803175916.3174453-1-sunilvl@ventanamicro.com> References: <20230803175916.3174453-1-sunilvl@ventanamicro.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230803_110119_713005_D95CE3FF X-CRM114-Status: GOOD ( 17.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add a new function for RISC-V to do any architecture specific initialization. This function will be used to create platform devices like APLIC, IMSIC MSI controller, RISC-V IOMMU etc. 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 2fc2b43a4ed3..9a8c16170a4b 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -1388,6 +1388,7 @@ static int __init acpi_init(void) pci_mmcfg_late_init(); acpi_arm_init(); + acpi_riscv_init(); acpi_viot_early_init(); acpi_hest_init(); acpi_ghes_init(); diff --git a/drivers/acpi/riscv/Makefile b/drivers/acpi/riscv/Makefile index 8b664190d172..3433a19c421d 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 irqchip.o +obj-y += rhct.o irqchip.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 641dc4843987..d16739928888 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -1511,6 +1511,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