[U-Boot] [PATCH] dm: core: Add Kconfig for simple bus driver

Marek Vasut marex at denx.de
Mon Aug 24 12:14:57 CEST 2015


On Monday, August 24, 2015 at 12:02:08 PM, Masahiro Yamada wrote:
> 2015-08-24 11:54 GMT+09:00 Marek Vasut <marex at denx.de>:
> > On Sunday, August 23, 2015 at 11:21:27 PM, Simon Glass wrote:
> >> Hi Marek,
> > 
> > Hi Simon,
> > 
> > [...]
> > 
> >> >> > I think the in drivers/core/Kconfig , the SPL_SIMPLE_BUS should now
> >> >> > depend on SPL_OF_CONTROL, not on OF_CONTROL, right ? :)
> >> >> 
> >> >> Ah yes that sounds right. Would you like to send a new patch against
> >> >> mainline? I think it is best to consider this a rewrite rather than a
> >> >> merge!
> >> > 
> >> > Heh :) I think that's the last missing bit, so feel free to fix it and
> >> > we're good. But if you insist on a new patch, please do let me know :)
> >> 
> >> OK, done. Let me know how it looks.
> > 
> > Looks great, thanks :)
> 
> Nope.
> 
> 
> If CONFIG_OF_CONTROL is enabled and CONFIG_SIMPLE_BUS is disabled,
> I get build error.

Hrm.

>   LD      u-boot
> drivers/built-in.o: In function `dev_get_addr':
> /home/yamada/ref/u-boot-dm/drivers/core/device.c:571: undefined
> reference to `simple_bus_translate'
> collect2: error: ld returned 1 exit status
> make: *** [u-boot] Error 1
> 
> 
> Do you really want to switch OF_CONTROL and SIMPLE_BUS separately?

I don't need it anymore in fact. I just needed to have simple-bus support
enabled in SPL, which I have even without this patch now. This is how it
came to be:

https://www.mail-archive.com/u-boot@lists.denx.de/msg179851.html

> simple-bus.c looks like a part of DM core rather than a driver because
> the address transformation (simple_bus_translate) is mandatory to
> handle reg properties in DTS correctly.
> 
> The reason for disabling SIMPLE_BUS but not OF_CONTROL, if any,
> is to save memory footprint of drivers/core/simple-bus.c
> Do you think it is significant?
> 
> 
> I think this is enough:
> 
> obj-y += device.o lists.o root.o uclass.o util.o
> obj-$(CONFIG_DEVRES) += devres.o
> obj-$(CONFIG_$(SPL_)OF_CONTROL) += simple-bus.o
> obj-$(CONFIG_$(SPL_)DM_DEVICE_REMOVE) += device-remove.o
> obj-$(CONFIG_DM) += dump.o
> obj-$(CONFIG_REGMAP) += regmap.o
> obj-$(CONFIG_SYSCON) += syscon-uclass.o
> 
> (drop "ifndef CONFIG_SPL_BUILD" and "endif")

Feel free to apply the original patch ;-)

https://www.mail-archive.com/u-boot@lists.denx.de/msg178872.html

Best regards,
Marek Vasut


More information about the U-Boot mailing list