Re: [RESEND RFC PATCH 01/12] sh: Add OF target boards.

Geert Uytterhoeven <[email protected]>
Newsgroups gmane.linux.ports.sh.devel
Message-ID <CAMuHMdUS0YHgFXfhJah5yKMbeAtWV33G-N-GVaB62jY4qObNLg@mail.gmail.com>
Hi Sato-san,

On Thu, Aug 31, 2023 at 5:19 AM Yoshinori Sato
<[email protected]> wrote:
> Signed-off-by: Yoshinori Sato <[email protected]>

Thanks for your patch!

> --- a/arch/sh/Kconfig
> +++ b/arch/sh/Kconfig

> @@ -363,14 +363,17 @@ config CPU_SUBTYPE_SH7091
>  config CPU_SUBTYPE_SH7750R
>         bool "Support SH7750R processor"
>         select CPU_SH4
> +       select COMMON_CLK_SH7750 if COMMMON_CLK
>
>  config CPU_SUBTYPE_SH7750S
>         bool "Support SH7750S processor"
>         select CPU_SH4
> +       select COMMON_CLK_SH7750 if COMMMON_CLK
>
>  config CPU_SUBTYPE_SH7751
>         bool "Support SH7751 processor"
>         select CPU_SH4
> +       select COMMON_CLK_SH7750 if COMMMON_CLK

Might be easier to handle this in the clock Kconfig, cfr. the various
conditional selects at the top of drivers/clk/renesas/Kconfig

>         help
>           Select SH7751 if you have a 166 Mhz SH-4 HD6417751 CPU,
>           or if you have a HD6417751R CPU.
> @@ -378,6 +381,8 @@ config CPU_SUBTYPE_SH7751
>  config CPU_SUBTYPE_SH7751R
>         bool "Support SH7751R processor"
>         select CPU_SH4
> +       select COMMON_CLK_SH7750 if COMMMON_CLK
> +       select PCI_SH7751 if SH_DEVICE_TREE
>
>  config CPU_SUBTYPE_SH7760
>         bool "Support SH7760 processor"

> @@ -744,6 +749,7 @@ config ROMIMAGE_MMCIF
>  choice
>         prompt "Kernel command line"
>         optional
> +       depends on !SH_DEVICE_TREE

Why? On other architectures, overriding the kernel command line
is supported.  This is also useful in case of a builtin DTB.

>         default CMDLINE_OVERWRITE
>         help
>           Setting this option allows the kernel command line arguments
> diff --git a/arch/sh/boards/Kconfig b/arch/sh/boards/Kconfig
> index fafe15d3ba1d..ffdada2a128d 100644
> --- a/arch/sh/boards/Kconfig
> +++ b/arch/sh/boards/Kconfig
> @@ -16,9 +16,14 @@ config SH_DEVICE_TREE
>         bool
>         select OF
>         select OF_EARLY_FLATTREE
> +       select OF_ADDRESS

Not needed, as it is already enabled:

    config OF_ADDRESS
            def_bool y
            depends on !SPARC && (HAS_IOMEM || UML)

>         select TIMER_OF
>         select COMMON_CLK
>         select GENERIC_CALIBRATE_DELAY
> +       select GENERIC_IOMAP
> +       select GENERIC_IRQ_CHIP
> +       select SYS_SUPPORTS_PCI
> +       select GENERIC_PCI_IOMAP if PCI
>
>  config SH_JCORE_SOC
>         bool "J-Core SoC"
> @@ -161,6 +166,17 @@ config SH_RTS7751R2D
>           Select RTS7751R2D if configuring for a Renesas Technology
>           Sales SH-Graphics board.
>
> +config SH_RTS7751R2D_OF
> +       bool "RTS7751R2D (DeviceTree)"
> +       depends on CPU_SUBTYPE_SH7751R
> +       select HAVE_PCI
> +       select IO_TRAPPED if MMU
> +       select SH_DEVICE_TREE
> +       select COMMON_CLK

SH_DEVICE_TREE already selects COMMON_CLK.
(same for landisk)

> +       help
> +         Select RTS7751R2D if configuring for a Renesas Technology
> +         Sales SH-Graphics board. (Use DeviceTree)
> +
>  config SH_RSK
>         bool "Renesas Starter Kit"
>         depends on CPU_SUBTYPE_SH7201 || CPU_SUBTYPE_SH7203 || \

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.