dm: Introduce DMA constraints into the core device model 49/267749/3
authorNicolas Saenz Julienne <nsaenzjulienne@suse.de>
Tue, 12 Jan 2021 12:55:24 +0000 (13:55 +0100)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Mon, 13 Dec 2021 01:43:02 +0000 (01:43 +0000)
commitae2ab7e475bd86104badd357a949f21ee4441ce6
tree3dab3796c4c67c526115a4625d781e0120fe58f6
parent1290427882c1b8ae1bad8f718f19ebac71dedd57
dm: Introduce DMA constraints into the core device model

Calculating the DMA offset between a bus address space and CPU's every
time we call phys_to_bus() and bus_to_phys() isn't ideal performance
wise, as it implies traversing the device tree from the device's node up
to the root. Since this information is static and available before the
device's initialization, parse it before the probe call an provide the
DMA offset in 'struct udevice' for the address translation code to use
it.

Change-Id: Id3792aa7a31cc13a38fa44b79d9df7c8eddccaf0
Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
drivers/core/Kconfig
drivers/core/device.c
include/dm/device.h