From nobody Tue Dec 23 10:50:53 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 351F2184E; Sun, 22 Dec 2024 00:31:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734827466; cv=none; b=mYSJ/ls4EPlTfpC4IPiFsj37lCkzLe3xU+LD+OQo92RZar5rLA0y8vQDND3M/sQZQHOWUNdVMAKnMEHZhO3WPohzww+TqisS83t1y4KJeVJOUQOiqaDpSwvtC1qE+seCHl5rRalCXYsrCOVTxWR6MZ8lPypBSE7pumOprFPeTEI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734827466; c=relaxed/simple; bh=EVAktHYhtLKSTU+Wdfy5N7PINcpDHrzUp+zxt9FYpko=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ohwwWn6KVhnpgj41mY8MFkuu9j4fRekSQdq01DTRMg9fcoCeB2mALeeNKSWdhNw06iLSJKZYRXXJW976RQK7VWcZwzL21KjroEVyLav1IQmXMdVld1eZDEtbPAigwHwQ33wLPlQ4Npk493VQsUljru/3n9LQUGB3lVjR0rx2nwY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=q0L2dUwX; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="q0L2dUwX" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AF751C4CECE; Sun, 22 Dec 2024 00:31:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1734827465; bh=EVAktHYhtLKSTU+Wdfy5N7PINcpDHrzUp+zxt9FYpko=; h=From:To:Cc:Subject:Date:From; b=q0L2dUwXzOq7/OaSpRh5V9XxRMK6kCmT65HmF14GXzM6JNKC0TMMkSkjiSfeAzqKl aHeH4q1ZgWcpzZJ5bvE3Rg5xfjgifgNDsNHnXgm6FmC2Zix8a965KwizSiw6+ixQTq AgDPtJZZXrYz9gXW+uHGBNlT+bwP1MBPBwsUfIyHKKjnUypMfTeEEgEtNnBpt9rnCt P9vnJz/vC3Wy8oj3Nt8FgwuXLjfSuLUKrrKcNlQ+keGSWZUMZor0efNcZca6Q6IWNn 5Gsx+OeAcql6kyO6M8QBjQoRm8H/hvJUXX3l6+wFpX4Oo+/XgMlzYsXbpUZp8VnqVv Nun0U83ts3TdQ== From: Masahiro Yamada To: Dinh Nguyen Cc: linux-kernel@vger.kernel.org, Masahiro Yamada , Conor Dooley , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org Subject: [PATCH] nios2: migrate to the generic rule for built-in DTB Date: Sun, 22 Dec 2024 09:30:53 +0900 Message-ID: <20241222003057.2582425-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Commit 654102df2ac2 ("kbuild: add generic support for built-in boot DTBs") introduced generic support for built-in DTBs. Select GENERIC_BUILTIN_DTB when built-in DTB support is enabled. To keep consistency across architectures, this commit also renames CONFIG_NIOS2_DTB_SOURCE_BOOL to CONFIG_BUILTIN_DTB, and CONFIG_NIOS2_DTB_SOURCE to CONFIG_BUILTIN_DTB_NAME. Signed-off-by: Masahiro Yamada --- arch/nios2/Kbuild | 2 +- arch/nios2/boot/dts/Makefile | 4 ++-- arch/nios2/kernel/prom.c | 2 +- arch/nios2/platform/Kconfig.platform | 11 ++++++----- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/arch/nios2/Kbuild b/arch/nios2/Kbuild index fc2952edd2de..fa64c5954b20 100644 --- a/arch/nios2/Kbuild +++ b/arch/nios2/Kbuild @@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-only =20 -obj-y +=3D kernel/ mm/ platform/ boot/dts/ +obj-y +=3D kernel/ mm/ platform/ =20 # for cleaning subdir- +=3D boot diff --git a/arch/nios2/boot/dts/Makefile b/arch/nios2/boot/dts/Makefile index 1a2e8996bec7..1b8f41c4154f 100644 --- a/arch/nios2/boot/dts/Makefile +++ b/arch/nios2/boot/dts/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 =20 -obj-y :=3D $(patsubst %.dts,%.dtb.o,$(CONFIG_NIOS2_DTB_SOURCE)) +dtb-y :=3D $(addsuffix .dtb, $(CONFIG_BUILTIN_DTB_NAME)) =20 -dtb-$(CONFIG_OF_ALL_DTBS) :=3D $(patsubst $(src)/%.dts,%.dtb, $(wildcard $= (src)/*.dts)) +dtb-$(CONFIG_OF_ALL_DTBS) +=3D $(patsubst $(src)/%.dts,%.dtb, $(wildcard $= (src)/*.dts)) diff --git a/arch/nios2/kernel/prom.c b/arch/nios2/kernel/prom.c index db049249766f..4f8c14da6490 100644 --- a/arch/nios2/kernel/prom.c +++ b/arch/nios2/kernel/prom.c @@ -32,7 +32,7 @@ void __init early_init_devtree(void *params) } #endif =20 -#ifdef CONFIG_NIOS2_DTB_SOURCE_BOOL +#ifdef CONFIG_BUILTIN_DTB if (be32_to_cpu((__be32) *dtb) =3D=3D OF_DT_HEADER) params =3D (void *)__dtb_start; #endif diff --git a/arch/nios2/platform/Kconfig.platform b/arch/nios2/platform/Kco= nfig.platform index e849daff6fd1..c75cadd92388 100644 --- a/arch/nios2/platform/Kconfig.platform +++ b/arch/nios2/platform/Kconfig.platform @@ -35,19 +35,20 @@ config NIOS2_DTB_PHYS_ADDR help Physical address of a dtb blob. =20 -config NIOS2_DTB_SOURCE_BOOL +config BUILTIN_DTB bool "Compile and link device tree into kernel image" depends on !COMPILE_TEST + select GENERIC_BUILTIN_DTB help This allows you to specify a dts (device tree source) file which will be compiled and linked into the kernel image. =20 -config NIOS2_DTB_SOURCE - string "Device tree source file" - depends on NIOS2_DTB_SOURCE_BOOL +config BUILTIN_DTB_NAME + string "Built-in device tree name" + depends on BUILTIN_DTB default "" help - Absolute path to the device tree source (dts) file describing your + Relative path to the device tree without suffix describing your system. =20 comment "Nios II instructions" --=20 2.43.0