Commit e0c171d5 authored by Diana Craciun's avatar Diana Craciun Committed by Greg Kroah-Hartman
Browse files

bus/fsl-mc: Set the QMAN/BMAN region flags



The QMAN region is memory mapped, so it should be of type
IORESOURCE_MEM. The region flags bits were wrongly used to
pass additional information. Use the bus specific bits for
this purpose.

Reviewed-by: default avatarLaurentiu Tudor <laurentiu.tudor@nxp.com>
Acked-by: default avatarLaurentiu Tudor <laurentiu.tudor@nxp.com>
Signed-off-by: default avatarDiana Craciun <diana.craciun@oss.nxp.com>
Link: https://lore.kernel.org/r/20200929085441.17448-5-diana.craciun@oss.nxp.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1f86a00c
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -615,10 +615,7 @@ 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;
		if (region_desc.flags & DPRC_REGION_SHAREABLE)
		regions[i].flags = region_desc.flags & IORESOURCE_BITS;
		regions[i].flags |= IORESOURCE_MEM;
	}

+0 −6
Original line number Diff line number Diff line
@@ -358,12 +358,6 @@ int dprc_set_obj_irq(struct fsl_mc_io *mc_io,
		     int obj_id,
		     u8 irq_index,
		     struct dprc_irq_cfg *irq_cfg);

/* Region flags */
/* Cacheable - Indicates that region should be mapped as cacheable */
#define DPRC_REGION_CACHEABLE	0x00000001
#define DPRC_REGION_SHAREABLE	0x00000002

/**
 * enum dprc_region_type - Region type
 * @DPRC_REGION_TYPE_MC_PORTAL: MC portal region
+8 −0
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
 * Freescale Management Complex (MC) bus public interface
 *
 * Copyright (C) 2014-2016 Freescale Semiconductor, Inc.
 * Copyright 2019-2020 NXP
 * Author: German Rivera <German.Rivera@freescale.com>
 *
 */
@@ -148,6 +149,13 @@ struct fsl_mc_obj_desc {
 */
#define FSL_MC_IS_DPRC	0x0001

/* Region flags */
/* Indicates that region can be mapped as cacheable */
#define FSL_MC_REGION_CACHEABLE	0x00000001

/* Indicates that region can be mapped as shareable */
#define FSL_MC_REGION_SHAREABLE	0x00000002

/**
 * struct fsl_mc_device - MC object device object
 * @dev: Linux driver model device object