[U-Boot] [linux-sunxi] Re: [PATCH 0/3] sunxi: sun8i-emac: Update DT bindings

Maxime Ripard maxime.ripard at free-electrons.com
Mon Jan 29 10:24:15 UTC 2018


On Mon, Jan 29, 2018 at 06:02:45PM +0800, Chen-Yu Tsai wrote:
> On Mon, Jan 29, 2018 at 5:58 PM, Maxime Ripard
> <maxime.ripard at free-electrons.com> wrote:
> > On Mon, Jan 29, 2018 at 09:44:44AM +0000, Andre Przywara wrote:
> >> Hi,
> >>
> >> On 29/01/18 08:51, Maxime Ripard wrote:
> >> > Hi,
> >> >
> >> > On Mon, Jan 29, 2018 at 01:15:19AM +0000, Andre Przywara wrote:
> >> >> The existing sun8i-emac driver in U-Boot uses some preliminary bindings,
> >> >> which matched our own DTs. Now that the Linux kernel got a driver, lets
> >> >> update our probe code to handle those Linux DTs as well.
> >> >> The first patch adds the missing compatible strings for the pinctrl drivers,
> >> >> which is needed for using the sunxi_name_to_gpio() lookup function.
> >> >> Patch 2/3 updates the pinctrl parser used in the sun8i-emac driver, to cope
> >> >> with the new, generic Allwinner pinctrl bindings.
> >> >> The final patch extends the probe routine in the Ethernet driver to deal
> >> >> with both the old and the new bindings.
> >> >
> >> > Thanks for posting this
> >> >
> >> >> This series allows to copy in the DTs from the latest kernel. Unfortunately
> >> >> right now updating the DTs for the H5 and A64 breaks the build, as the
> >> >> resulting binary (which embeds the DT) gets to large and triggers our new
> >> >> image size check.
> >> >
> >> > Sigh...
> >> >
> >> >> As the H5 and H3 share most of the DT, we can't just update the H3
> >> >> DTs either. Hopefully we find some neat trick to work around that.
> >> >
> >> > Is it just because of the DT size, or because there's more code?
> >>
> >> My impression the code itself is always growing a tiny bit over the
> >> weeks, but this time around it's really the DT update.
> >> The current A64 .dtbs in U-Boot are around 8KB, mainline is at 13KB.
> >> Similar for the H5: going from 9.5KB to 14.5KB.
> >>
> >> Since you did a pretty good job already in identifying the code hogs, I
> >> couldn't find *easy* mitigations over the weekend.
> >> One possible fix is to remove the second .dtb in the Pine64 case, for
> >> which I sent a patch Friday night.
> >
> > Since the DT is fed to the C preprocessor, we could also put some
> > #ifdef 0 around the nodes that are never used by U-Boot (like the
> > clocks, timer, psci, dma, GIC, RTC, RSB, etc.)
> >
> > This should give us some room.
> 
> Another possibility is trimming the device tree of unneeded blocks,
> possibly automatically by a tool. I think this was raised before?

Yes, but it turns out that it's actually hard, since you have no idea
with the overlays if the block is still going to be unneeded at
runtime.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180129/67774b2c/attachment.sig>


More information about the U-Boot mailing list