From patchwork Wed May 1 12:17:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sunil V L X-Patchwork-Id: 13650550 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 E9F21C10F1A for ; Wed, 1 May 2024 12:37:45 +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=wfSgeMfBrh76uoz29lxIPOq1ZORauDwBMDWKwF81A/k=; b=Y8cvFzoW15YfYF YSimpcX5nO/i3FHkbNacmNRInuqCy7NcZV2ku14u0TF7V2FTZa15d54oEeCEnFkDNAgwStkJRhMKZ aTrYGqVoaQcLxXSv2l3WVvsQz0aBA7eTHY0T0nT7pgErtOL4kP0L85hT7py6N1aOOzivTHTVForMA lwAMIvejas+BVeCceY0T01lGBG3KTFGSg8QspoUKSK5fJd3w0r82KgbAjV0v++AvEHrBxae3MbamS dxTzLvxd0q6etKJh0v5RJIZxE8+jan2M+KkePBMFtoLOSUD/3n/5N9pORU11q1sTNxWDqfVB2jZAa JUMmec1wa/nUpDpLGzHg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s29DK-00000009Ue3-01Zj; Wed, 01 May 2024 12:37:34 +0000 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s28ur-00000009MYz-0nux for linux-arm-kernel@lists.infradead.org; Wed, 01 May 2024 12:18:30 +0000 Received: by mail-pg1-x531.google.com with SMTP id 41be03b00d2f7-613a6bb2947so2188880a12.3 for ; Wed, 01 May 2024 05:18:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1714565907; x=1715170707; darn=lists.infradead.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=pcwxR1GQk9U2hRbWPBz3q9MYCED3shcxZKp1VHv0hAo=; b=Gn98wY+ZK6vGcw+1aVAeFU9v/u130x+fRyS8IN5FszQ4u9LYtQ67fxStmcu6VgQvyl SPt1MCnWMF3NiCWGcxecmhiwOVFAhhrOAFXiaY8leyOV0QLlsy/N//3FZAEo9v/9MP4c s4FxUgI7bGWHfH1R2SAT4Ojfflogu983CrZsFrKtqapyKqyFl0il8Kh3IHZFgAPtUjzR sDkB/3FMyveRqoh/XalvHGcGCeWJVteE5qxkU/kvDB1sOpg0SFhlKZaDX1pT2IofHkNA 84bAcAmaOyWaKA3io0mMB8vhYFqvuGWhwCYOk4yukjUyRQFiKCqk30Io3JP7ABVt5a0k Lbwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714565907; x=1715170707; 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=pcwxR1GQk9U2hRbWPBz3q9MYCED3shcxZKp1VHv0hAo=; b=pLxAwowuX/yxrQkJVmgIC08xHExXL38K2MFcp3ZUc+expffzaAnKdzDGTX4/EP2ZFB xWos16qZxuE2Mp5VgC9KYM7adshSl9TpZfrFwdhDPvnKfSFcRSiCD/Ze+vo8/ITQtQon fiUXSWkUnn5CUAssaQgBXhxx+GWd2AxWSOrdIqGeine9okiugIql4i9OOj8n6074iNCM u7V1Ed0lliEz57672Fz29nQ2jnwMEMTjJa0Oh1UVZRQPgLKHjXqn9JkXYzMMfLUZgER3 dE7MzC85/oSOd8QMMFSvDwxmGVdZVitRNR6shNSzw3VvNaCZlMypoKIAwZt3aEa5rfDi 7Xyw== X-Gm-Message-State: AOJu0YzXce1UuMbtBQgruLabDHeHFp6HOLLbw58BfEPv/cRvgx9g2NEp kRdP5vfYR28LIsO8U/AVZRcB5W1wKKOXvtPVGJ/NAKAFOVD9eyRRlHCkbGCdE7haOdLSe5JHoXg a7Zs= X-Google-Smtp-Source: AGHT+IEeK1bdY+NiF6yJem6nH8XOZPBP0PcZb/eHB80G50De8R+NdOj9l68iFqCiSXYmU0FqhQ9LGA== X-Received: by 2002:a17:903:188:b0:1e5:5bd7:87a4 with SMTP id z8-20020a170903018800b001e55bd787a4mr2316455plg.16.1714565907491; Wed, 01 May 2024 05:18:27 -0700 (PDT) Received: from sunil-pc.Dlink ([106.51.188.106]) by smtp.gmail.com with ESMTPSA id im15-20020a170902bb0f00b001ec8888b22esm1336900plb.65.2024.05.01.05.18.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 05:18:26 -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, acpica-devel@lists.linux.dev Cc: Catalin Marinas , Will Deacon , Paul Walmsley , Albert Ou , "Rafael J . Wysocki" , Len Brown , Bjorn Helgaas , Anup Patel , Thomas Gleixner , Samuel Holland , Greg Kroah-Hartman , Jiri Slaby , Robert Moore , Conor Dooley , Andrew Jones , Andy Shevchenko , Marc Zyngier , Atish Kumar Patra , Andrei Warkentin , Haibo1 Xu , =?utf-8?b?QmrDtnJuIFTDtnBlbA==?= , Sunil V L Subject: [PATCH v5 03/17] ACPI: bus: Add acpi_riscv_init function Date: Wed, 1 May 2024 17:47:28 +0530 Message-Id: <20240501121742.1215792-4-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240501121742.1215792-1-sunilvl@ventanamicro.com> References: <20240501121742.1215792-1-sunilvl@ventanamicro.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240501_051829_249947_5AB43AEE X-CRM114-Status: GOOD ( 17.67 ) 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, 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 844c46447914..17ee483c3bf4 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -1446,6 +1446,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 86b0925f612d..877de00d1b50 100644 --- a/drivers/acpi/riscv/Makefile +++ b/drivers/acpi/riscv/Makefile @@ -1,4 +1,4 @@ # SPDX-License-Identifier: GPL-2.0-only -obj-y += rhct.o +obj-y += rhct.o init.o obj-$(CONFIG_ACPI_PROCESSOR_IDLE) += cpuidle.o obj-$(CONFIG_ACPI_CPPC_LIB) += cppc.o diff --git a/drivers/acpi/riscv/init.c b/drivers/acpi/riscv/init.c new file mode 100644 index 000000000000..5f7571143245 --- /dev/null +++ b/drivers/acpi/riscv/init.c @@ -0,0 +1,12 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (C) 2023-2024, 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 1afa289f1f4e..846a4001b5e0 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