From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Damien Le Moal <damien.lemoal@wdc.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>,
linux-riscv <linux-riscv@lists.infradead.org>,
Rob Herring <robh+dt@kernel.org>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>, Stephen Boyd <sboyd@kernel.org>,
linux-clk <linux-clk@vger.kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
Philipp Zabel <p.zabel@pengutronix.de>,
Sean Anderson <seanga2@gmail.com>
Subject: Re: [PATCH v4 04/21] riscv: Fix builtin DTB handling
Date: Fri, 4 Dec 2020 16:11:11 +0100 [thread overview]
Message-ID: <CAMuHMdUyA3gobmcUjPr6JM8KLpcM0WKhd6Gfk5=tCfneBYJWMA@mail.gmail.com> (raw)
In-Reply-To: <20201202032500.206346-5-damien.lemoal@wdc.com>
Hi Damien,
On Wed, Dec 2, 2020 at 4:26 AM Damien Le Moal <damien.lemoal@wdc.com> wrote:
> All SiPeed K210 MAIX boards have the exact same vendor, arch and
> implementation IDs, preventing differentiation to select the correct
> device tree to use through the SOC_BUILTIN_DTB_DECLARE() macro. This
> result in this macro to be useless and mandates changing the code of
> the sysctl driver to change the builtin device tree suitable for the
> target board.
>
> Fix this problem by removing the SOC_BUILTIN_DTB_DECLARE() macro since
> it is used only for the K210 support. The code searching the builtin
> DTBs using the vendor, arch an implementation IDs is also removed.
> Support for builtin DTB falls back to the simpler and more traditional
> handling of builtin DTB using the CONFIG_BUILTIN_DTB option, similarly
> to other architectures.
>
> Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
> --- a/arch/riscv/boot/dts/kendryte/Makefile
> +++ b/arch/riscv/boot/dts/kendryte/Makefile
> @@ -1,4 +1,5 @@
> # SPDX-License-Identifier: GPL-2.0
> -dtb-$(CONFIG_SOC_KENDRYTE_K210_DTB) += k210.dtb
> -
> +ifneq ($(CONFIG_SOC_KENDRYTE_K210_DTB_SOURCE),"")
> +dtb-y += $(strip $(shell echo $(CONFIG_SOC_KENDRYTE_K210_DTB_SOURCE))).dtb
> obj-$(CONFIG_SOC_KENDRYTE_K210_DTB_BUILTIN) += $(addsuffix .o, $(dtb-y))
> +endif
This break compiling a kernel for non-K210 systems (e.g. defconfig),
as reported before in
https://lore.kernel.org/linux-clk/202011151230.QP1ISPQo-lkp@intel.com/
I think this can be fixed using:
--- a/arch/riscv/boot/dts/Makefile
+++ b/arch/riscv/boot/dts/Makefile
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
subdir-y += sifive
-subdir-y += canaan
+subdir-$(CONFIG_SOC_CANAAN) += canaan
obj-$(CONFIG_BUILTIN_DTB) := $(addsuffix /, $(subdir-y))
(yes, I've already renamed kendryte to canaan ;-)
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
next prev parent reply other threads:[~2020-12-04 15:12 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-02 3:24 [PATCH v4 00/21] RISC-V Kendryte K210 support improvements Damien Le Moal
2020-12-02 3:24 ` [PATCH v4 01/21] riscv: Fix kernel time_init() Damien Le Moal
2020-12-05 5:41 ` Stephen Boyd
2020-12-02 3:24 ` [PATCH v4 02/21] riscv: Fix sifive serial driver Damien Le Moal
2020-12-02 3:24 ` [PATCH v4 03/21] riscv: Enable interrupts during syscalls with M-Mode Damien Le Moal
2020-12-02 3:24 ` [PATCH v4 04/21] riscv: Fix builtin DTB handling Damien Le Moal
2020-12-04 15:11 ` Geert Uytterhoeven [this message]
2020-12-02 3:24 ` [PATCH v4 05/21] riscv: Use vendor name for K210 SoC support Damien Le Moal
2020-12-02 3:24 ` [PATCH v4 06/21] dt-bindings: Add Canaan vendor prefix Damien Le Moal
2020-12-02 3:24 ` [PATCH v4 07/21] dt-binding: clock: Document canaan,k210-clk bindings Damien Le Moal
2020-12-05 5:46 ` Stephen Boyd
2020-12-02 3:24 ` [PATCH v4 08/21] dt-bindings: reset: Document canaan,k210-rst bindings Damien Le Moal
2020-12-02 3:24 ` [PATCH v4 09/21] dt-bindings: pinctrl: Document canaan,k210-fpioa bindings Damien Le Moal
2020-12-02 3:24 ` [PATCH v4 10/21] dt-binding: mfd: Document canaan,k210-sysctl bindings Damien Le Moal
2020-12-02 3:24 ` [PATCH v4 11/21] riscv: Add Canaan Kendryte K210 clock driver Damien Le Moal
2020-12-05 6:19 ` Stephen Boyd
2020-12-05 7:43 ` Damien Le Moal
2020-12-05 13:43 ` Sean Anderson
2020-12-05 14:13 ` Damien Le Moal
[not found] ` <160736612827.1580929.7802371235304556600@swboyd.mtv.corp.google.com>
2020-12-08 7:48 ` Damien Le Moal
2020-12-07 3:50 ` Damien Le Moal
2020-12-07 8:43 ` Geert Uytterhoeven
2020-12-07 9:55 ` Damien Le Moal
2020-12-07 10:06 ` Geert Uytterhoeven
2020-12-07 10:14 ` Damien Le Moal
2020-12-07 22:58 ` Sean Anderson
2020-12-07 11:34 ` Damien Le Moal
2020-12-02 3:24 ` [PATCH v4 12/21] riscv: Add Canaan Kendryte K210 FPIOA driver Damien Le Moal
2020-12-02 3:24 ` [PATCH v4 13/21] riscv: Add Canaan Kendryte K210 reset controller Damien Le Moal
2020-12-04 10:49 ` Philipp Zabel
2020-12-04 11:16 ` Damien Le Moal
2020-12-02 3:24 ` [PATCH v4 14/21] riscv: Update Canaan Kendryte K210 device tree Damien Le Moal
2020-12-02 3:24 ` [PATCH v4 15/21] riscv: Add SiPeed MAIX BiT board " Damien Le Moal
2020-12-02 3:24 ` [PATCH v4 16/21] riscv: Add SiPeed MAIX DOCK " Damien Le Moal
2020-12-02 3:24 ` [PATCH v4 17/21] riscv: Add SiPeed MAIX GO " Damien Le Moal
2020-12-02 3:24 ` [PATCH v4 18/21] riscv: Add SiPeed MAIXDUINO " Damien Le Moal
2020-12-02 3:24 ` [PATCH v4 19/21] riscv: Add Kendryte KD233 " Damien Le Moal
2020-12-02 3:24 ` [PATCH v4 20/21] riscv: Update Canaan Kendryte K210 defconfig Damien Le Moal
2020-12-02 3:25 ` [PATCH v4 21/21] riscv: Add Canaan Kendryte K210 SD card defconfig Damien Le Moal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAMuHMdUyA3gobmcUjPr6JM8KLpcM0WKhd6Gfk5=tCfneBYJWMA@mail.gmail.com' \
--to=geert@linux-m68k.org \
--cc=damien.lemoal@wdc.com \
--cc=devicetree@vger.kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=p.zabel@pengutronix.de \
--cc=palmer@dabbelt.com \
--cc=robh+dt@kernel.org \
--cc=sboyd@kernel.org \
--cc=seanga2@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).