mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-21 14:41:31 +00:00
dm: core: Add Kconfig for simple bus driver
Add Kconfig entries for the simple-bus driver, both for U-Boot and for SPL. The simple-bus is enabled by default in U-Boot and disabled by default in SPL to preserve the original behavior. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org> Modified to fit on top of Masahiro's $(SPL) setup: Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
4e9838c102
commit
628d792c07
3 changed files with 17 additions and 6 deletions
|
@ -105,4 +105,19 @@ config DEBUG_DEVRES
|
||||||
|
|
||||||
If you are unsure about this, Say N here.
|
If you are unsure about this, Say N here.
|
||||||
|
|
||||||
|
config SIMPLE_BUS
|
||||||
|
bool "Support simple-bus driver"
|
||||||
|
depends on DM && OF_CONTROL
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Supports the 'simple-bus' driver, which is used on some systems.
|
||||||
|
|
||||||
|
config SPL_SIMPLE_BUS
|
||||||
|
bool "Support simple-bus driver in SPL"
|
||||||
|
depends on SPL_DM && SPL_OF_CONTROL
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
Supports the 'simple-bus' driver, which is used on some systems
|
||||||
|
in SPL.
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
|
|
@ -6,10 +6,8 @@
|
||||||
|
|
||||||
obj-y += device.o lists.o root.o uclass.o util.o
|
obj-y += device.o lists.o root.o uclass.o util.o
|
||||||
obj-$(CONFIG_DEVRES) += devres.o
|
obj-$(CONFIG_DEVRES) += devres.o
|
||||||
ifndef CONFIG_SPL_BUILD
|
|
||||||
obj-$(CONFIG_$(SPL_)OF_CONTROL) += simple-bus.o
|
|
||||||
endif
|
|
||||||
obj-$(CONFIG_$(SPL_)DM_DEVICE_REMOVE) += device-remove.o
|
obj-$(CONFIG_$(SPL_)DM_DEVICE_REMOVE) += device-remove.o
|
||||||
|
obj-$(CONFIG_$(SPL_)SIMPLE_BUS) += simple-bus.o
|
||||||
obj-$(CONFIG_DM) += dump.o
|
obj-$(CONFIG_DM) += dump.o
|
||||||
obj-$(CONFIG_REGMAP) += regmap.o
|
obj-$(CONFIG_REGMAP) += regmap.o
|
||||||
obj-$(CONFIG_SYSCON) += syscon-uclass.o
|
obj-$(CONFIG_SYSCON) += syscon-uclass.o
|
||||||
|
|
|
@ -574,11 +574,9 @@ fdt_addr_t dev_get_addr(struct udevice *dev)
|
||||||
fdt_addr_t addr;
|
fdt_addr_t addr;
|
||||||
|
|
||||||
addr = fdtdec_get_addr(gd->fdt_blob, dev->of_offset, "reg");
|
addr = fdtdec_get_addr(gd->fdt_blob, dev->of_offset, "reg");
|
||||||
if (addr != FDT_ADDR_T_NONE) {
|
if (CONFIG_IS_ENABLED(SIMPLE_BUS) && addr != FDT_ADDR_T_NONE) {
|
||||||
#ifndef CONFIG_SPL_BUILD
|
|
||||||
if (device_get_uclass_id(dev->parent) == UCLASS_SIMPLE_BUS)
|
if (device_get_uclass_id(dev->parent) == UCLASS_SIMPLE_BUS)
|
||||||
addr = simple_bus_translate(dev->parent, addr);
|
addr = simple_bus_translate(dev->parent, addr);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return addr;
|
return addr;
|
||||||
|
|
Loading…
Add table
Reference in a new issue