2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-23 04:34:11 +08:00

staging: fsl-mc: set cacheable flag for added devices if applicable

Some DPAA2 devices have mmio regions that should be mapped as
cacheable by drivers.  Set IORESOURCE_CACHEABLE in the region's
flags if applicable.

Signed-off-by: Itai Katz <itai.katz@nxp.com>
[Stuart: update subject and commit message]
Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
Acked-by: German Rivera <german.rivera@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Itai Katz 2016-04-11 11:55:48 -05:00 committed by Greg Kroah-Hartman
parent 0f90f25b8f
commit b3721fc1e0

View File

@ -354,6 +354,8 @@ static int fsl_mc_device_get_mmio_regions(struct fsl_mc_device *mc_dev,
regions[i].end = regions[i].start + region_desc.size - 1;
regions[i].name = "fsl-mc object MMIO region";
regions[i].flags = IORESOURCE_IO;
if (region_desc.flags & DPRC_REGION_CACHEABLE)
regions[i].flags |= IORESOURCE_CACHEABLE;
}
mc_dev->regions = regions;