Aw: crash with CONFIG_OF_LIVE
Frank Wunderlich
frank-w at public-files.de
Thu Aug 6 13:01:43 CEST 2020
Hi,
debugged it further, but currently i don't know why CONFIG_OF_LIVE causes this behaviour
devfdt_get_addr_index return with FDT_ADDR_T_NONE adress-cells: -4
./scripts/dtc/libfdt/fdt_addresses.c:
fdt_address_cells => fdt_cells => fdt_getprop (returns c=0,len=-4)
as far as i see in arch/arm/dts/mt7622.dtsi eth-node has #address-cells = <1>; so i wonder why fdt_address_cells failes with OF_LIVE
maybe adress-cells is needed also in ethsys/sgmiisys??
so currently i try to avoid including the CONFIG_OF_LIVE for my driver-porting (using fdt_get_property instead of of_find_property), but this should be fixed anyway.
regards Frank
> Gesendet: Mittwoch, 05. August 2020 um 19:42 Uhr
> Von: "Frank Wunderlich" <frank-w at public-files.de>
> An: "Frank Wunderlich" <frank-w at public-files.de>
> Cc: "U-Boot-Denx" <u-boot at lists.denx.de>, "Landen Chao (趙皎宏)" <Landen.Chao at mediatek.com>, "Ryder Lee" <ryder.lee at mediatek.com>, "Mark Lee" <Mark-MC.Lee at mediatek.com>, "GSS_MTK_Uboot_upstream" <GSS_MTK_Uboot_upstream at mediatek.com>
> Betreff: Aw: crash with CONFIG_OF_LIVE
>
> Hi
>
> i traced it as far as i can
>
> crash happens in
>
> drivers/net/mtk_eth.c in function mtk_gmac_write (priv->gmac_base = 0xffff)
>
> but root cause is iobase in probe
>
> static int mtk_eth_probe(struct udevice *dev)
> {
> struct eth_pdata *pdata = dev_get_platdata(dev);
> struct mtk_eth_priv *priv = dev_get_priv(dev);
> ulong iobase = pdata->iobase; //<<<<<<<<<<<<< 0xffffffff
> printf("DEBUG: %s:%d iobase: 0x%0x gmac_base: 0x%0x\n",__FUNCTION__,__LINE__,(u32)iobase, GMAC_BASE);
>
> this crash also happens in 64bit-mode (mt7622_rfb_defconfig + CONFIG_OF_LIVE)
>
> any idea why iobase is wrong here?
>
> regards Frank
>
>
> > Gesendet: Dienstag, 04. August 2020 um 16:58 Uhr
> > Von: "Frank Wunderlich" <frank-w at public-files.de>
> > An: "U-Boot-Denx" <u-boot at lists.denx.de>
> > Betreff: crash with CONFIG_OF_LIVE
> >
> > Hi,
> >
> > i need of_find_property function so i added CONFIG_OF_LIVE.
> >
> > with this my uboot crash on bpi-r64 (own 32bit-config) before calling anything in my driver (is an ahci-driver which is triggered by "scsi scan"). so only the inclusion of CONFIG_OF_LIVE. do i miss anything or have anyone else this issue?
> >
> > Just for reference my current tree
> > https://github.com/frank-w/u-boot/commits/2020-07-bpi-r64-pciev2
> >
> > regards Frank
> >
> >
>
More information about the U-Boot
mailing list