mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-25 06:00:43 +00:00
dm: core: Alloc uclass-private data to be cache-aligned
There is no reason why this feature should not be supported for uclass- private data. Update the code accordingly. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
4af3e9ad8a
commit
c7a3accc3f
2 changed files with 5 additions and 1 deletions
|
@ -331,7 +331,8 @@ int device_probe(struct udevice *dev)
|
|||
/* Allocate private data if requested and not reentered */
|
||||
size = dev->uclass->uc_drv->per_device_auto_alloc_size;
|
||||
if (size && !dev->uclass_priv) {
|
||||
dev->uclass_priv = calloc(1, size);
|
||||
dev->uclass_priv = alloc_priv(size,
|
||||
dev->uclass->uc_drv->flags);
|
||||
if (!dev->uclass_priv) {
|
||||
ret = -ENOMEM;
|
||||
goto fail;
|
||||
|
|
|
@ -44,6 +44,9 @@ struct udevice;
|
|||
/* Members of this uclass sequence themselves with aliases */
|
||||
#define DM_UC_FLAG_SEQ_ALIAS (1 << 0)
|
||||
|
||||
/* Same as DM_FLAG_ALLOC_PRIV_DMA */
|
||||
#define DM_UC_FLAG_ALLOC_PRIV_DMA (1 << 5)
|
||||
|
||||
/**
|
||||
* struct uclass_driver - Driver for the uclass
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue