[PATCH v2 3/5] pinctrl: renesas: r8a77965: Add R8A774B1 PFC support
Biju Das
biju.das.jz at bp.renesas.com
Wed Oct 14 13:29:41 CEST 2020
Hi Marek,
> Subject: Re: [PATCH v2 3/5] pinctrl: renesas: r8a77965: Add R8A774B1 PFC
> support
>
> On 10/13/20 8:30 PM, Biju Das wrote:
>
> Hi,
>
> [...]
>
> >>>> On 10/13/20 10:52 AM, Biju Das wrote:
> >>>>> Renesas RZ/G2N (r8a774b1) is pin compatible with R-Car M3-N
> >>>>> (r8a77965), however it doesn't have several automotive specific
> >>>>> peripherals. Add a r8a77965 specific pin groups/functions along
> >>>>> with common pin groups/functions for supporting both r8a77965 and
> >>>>> r8a774b1
> >>>> SoC.
> >>>>
> >>>> Would it make sense to ifdef out the R8A774B1 extras if
> >>>> CONFIG_PINCTRL_PFC_R8A774B1 is not enabled and in turn also the
> >>>> R8A77965 extras if CONFIG_PINCTRL_PFC_R8A77965 is not enabled, so
> >> the
> >>>> resulting U-Boot binary isn't bloated with the unused tables ?
> >>>
> >>> By default, all IP's in R8A774B1 will be present in R8A77965 SoC.
> >>> So the
> >> extras is only for R8A77965.
> >>>
> >>> Code will be much cleaner, if we maintain same structure like linux
> >>> [1]. Otherwise we need to add #ifdef CONFIG_PINCTRL_PFC_R8A77965
> for
> >> the DRIF IP/.automotive all over the places in this file.
> >>> So please advise.
> >>
> >> Check with the linux maintainers please, surely there should be some
> >> way to separate the extras in a way that's not too hard to maintain,
> >> and thus reduce the resulting binary size. For U-Boot, that is quite
> >> important already, I think the TFA can only load 1 MiB binary in total.
> >
> > I agree for bootloader size is important. So I will add macros as per your
> suggestion (we don't need to look into linux for this).
>
> The PFC tables and clock tables are the same between U-Boot and Linux, so if
> you only change them in U-Boot, it will make it hard to synchronize the tables
> later with Linux again. Please fix this in Linux and synchronize to U-Boot.
I have posted a patch for optimizing pin control size for RZ/G2N in Linux [1]
[1] https://patchwork.kernel.org/project/linux-renesas-soc/patch/20201014110238.9600-1-biju.das.jz@bp.renesas.com/
This approach will save ~ 6KB=(3x 2KB/SoC) of memory on RZ/G2[HMN] u-boot with multi dtb support.
1) By compiling out Automotive parts
$ size drivers/pinctrl/renesas/pfc-r8a77965.o
text data bss dec hex filename
46141 0 0 46141 b43d drivers/pinctrl/renesas/pfc-r8a77965.o
2) without patch
$ size drivers/pinctrl/renesas/pfc-r8a77965.o
text data bss dec hex filename
48191 0 0 48191 bc3f drivers/pinctrl/renesas/pfc-r8a77965.o
Cheers,
Biju
More information about the U-Boot
mailing list