Skip to contentSkip to conversation

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

PATCH In review Stuart Yoder 1 participant 1 message Apr 11, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 8/14 staging: fsl-mc: set cacheable flag for added devices if applicable

From: Itai Katz <[email protected]>

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

[Stuart: update subject and commit message]
---
 drivers/staging/fsl-mc/bus/mc-bus.c |    2 ++
 1 file changed, 2 insertions(+)
drivers/staging/fsl-mc/bus/mc-bus.c +2 -0
index 8bf76d7..2075597 100644
@@ -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;
Signature · 1 line
1.7.9.5