[PATCH v2 3/5] pinctrl: renesas: r8a77965: Add R8A774B1 PFC support
Biju Das
biju.das.jz at bp.renesas.com
Sat Oct 17 15:11:30 CEST 2020
Hi Marek,
> Subject: Re: [PATCH v2 3/5] pinctrl: renesas: r8a77965: Add R8A774B1 PFC
> support
>
> On 10/14/20 1:29 PM, Biju Das wrote:
>
> Hi,
>
> [...]
>
> >>>> 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/202010141
> > 10238.9600-1-biju.das.jz at 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
>
> Have a look at the size of the image of rcar3_salvator-x_defconfig , it is just a
> few kiB short of 1MiB , which is the hard limit. Any size reduction helps.
Yes I agree, we need to look into size reduction for Salvator-XS. But currently there is no issue. See the details below.
Case 1) R Car Salvator-XS u-boot size (u-boot-sh/master):
$ ls -al u-boot.bin
-rw-r--r-- 1 biju biju 1025067 Oct 17 12:47 u-boot.bin --> 0xFA42B (23 Kbytes to reach 1MB)
$ size u-boot
text data bss dec hex filename
942180 36208 71632 1050020 1005a4 u-boot
$ size drivers/pinctrl/renesas/*.o
text data bss dec hex filename
151332 288 1 151621 25045 drivers/pinctrl/renesas/built-in.o
3811 288 1 4100 1004 drivers/pinctrl/renesas/pfc.o
48123 0 0 48123 bbfb drivers/pinctrl/renesas/pfc-r8a7795.o
47939 0 0 47939 bb43 drivers/pinctrl/renesas/pfc-r8a77965.o
47751 0 0 47751 ba87 drivers/pinctrl/renesas/pfc-r8a7796.o
Case 2) R Car Salvator-X u-boot size after adding RZ/G2[HMN] pin control support
$ ls -al u-boot.bin
-rw-r--r-- 1 biju biju 1027107 Oct 17 12:59 u-boot.bin --> 0xFAC23 (21 Kbytes to reach 1 MB)
$ size u-boot
text data bss dec hex filename
944224 36208 71632 1052064 100da0 u-boot
$ size drivers/pinctrl/renesas/*.o
text data bss dec hex filename
151868 288 1 152157 2525d drivers/pinctrl/renesas/built-in.o
3811 288 1 4100 1004 drivers/pinctrl/renesas/pfc.o
48375 0 0 48375 bcf7 drivers/pinctrl/renesas/pfc-r8a7795.o
48191 0 0 48191 bc3f drivers/pinctrl/renesas/pfc-r8a77965.o
47751 0 0 47751 ba87 drivers/pinctrl/renesas/pfc-r8a7796.o
Regards,
Biju
More information about the U-Boot
mailing list