diff options
author | Tom Rini <trini@konsulko.com> | 2021-02-18 08:06:26 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-02-18 08:06:26 -0500 |
commit | 56f1bcc4b7fbca8789cef90c30f201f5b3fff757 (patch) | |
tree | d587eafbc09d7ec51a9b12dca023ddce60507876 /include/dm/device.h | |
parent | 496f49464d90b564da5f1a2f4eecb5553e01edf9 (diff) | |
parent | 0059ef0be903a1f0a9afe5259fb2e0874f78a8ac (diff) |
Merge tag 'rpi-next-2021.04' of https://gitlab.denx.de/u-boot/custodians/u-boot-raspberrypi
- add iProc RNG2000 driver for RPi4
- add support for CM4 and RPi400
Diffstat (limited to 'include/dm/device.h')
-rw-r--r-- | include/dm/device.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/dm/device.h b/include/dm/device.h index 28533ce0b6..bb9faa0ed9 100644 --- a/include/dm/device.h +++ b/include/dm/device.h @@ -159,6 +159,8 @@ enum { * When CONFIG_DEVRES is enabled, devm_kmalloc() and friends will * add to this list. Memory so-allocated will be freed * automatically when the device is removed / unbound + * @dma_offset: Offset between the physical address space (CPU's) and the + * device's bus address space */ struct udevice { const struct driver *driver; @@ -183,6 +185,9 @@ struct udevice { #ifdef CONFIG_DEVRES struct list_head devres_head; #endif +#if CONFIG_IS_ENABLED(DM_DMA) + ulong dma_offset; +#endif }; /* Maximum sequence number supported */ @@ -224,6 +229,14 @@ static inline ofnode dev_ofnode(const struct udevice *dev) /* Returns non-zero if the device is active (probed and not removed) */ #define device_active(dev) (dev_get_flags(dev) & DM_FLAG_ACTIVATED) +#if CONFIG_IS_ENABLED(DM_DMA) +#define dev_set_dma_offset(_dev, _offset) _dev->dma_offset = _offset +#define dev_get_dma_offset(_dev) _dev->dma_offset +#else +#define dev_set_dma_offset(_dev, _offset) +#define dev_get_dma_offset(_dev) 0 +#endif + static inline int dev_of_offset(const struct udevice *dev) { #if !CONFIG_IS_ENABLED(OF_PLATDATA) |