Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp504996ybj; Thu, 7 May 2020 00:38:57 -0700 (PDT) X-Google-Smtp-Source: APiQypIMoy5CPI1bYsP2czAxEJnqoiKBtGRY3rW+QnwmUag7gCUH9M3AcHyd78inCMeIVJ811tbY X-Received: by 2002:a17:906:e01:: with SMTP id l1mr10630646eji.76.1588837137012; Thu, 07 May 2020 00:38:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588837137; cv=none; d=google.com; s=arc-20160816; b=v8cVD1/7X9B7Q9G2fSeyEnawI70tBUmdKD0He85TmYU5STuxR0X3HjZmYXDahs0XWn ZCxANTGAPGovwN/RJKMCT7dxpuAZocJsRRAHGxV+V82n0If66o++YYlg1fHJe33GxlLo Nsd9EYfcKz24bKbWKcfUoeMPbI/yM5HuU1IQdlXXQSjG+xo9o0YXHZjKRcA1XsaaUPO9 9QpFPRqTjSE+yg430CdfZPNJEKFEG8n27X1yJHxHewKc5tByNxr1wTpxAKay9+9MS5af h/8Yyd5Bo5zQEjBA+yC6bZU6qggot7bo9Lig9jyTmz0x37vFa8FIUx/eASAunPHVw0X7 1LOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=9Ig37AmRCIBN2EmeznVIrdQszKQ9Gd9kv3VAeiUekI8=; b=fqa/XVYGp10mDtBR0cwY6x+bc+wuinmDSFOuQ98XkOE47PX5kDW1TC3OLYDici1OTu Meg5BePv9MlfsdyxlOuKTd5jElLJpluQgxMoP3pbMP7qWaAKCHu6LzZnvUdpYs7eIIQS TUCEQGqwVBINDHhcxUUxUfphZ590n4utq5b0r1PXwFfnjYpOsbhnu5s2rYZi0RAZJNU3 KwdsJm6H0RKJErujxcEBF8jmbvcyZfbd0jH6J889vi6O2gjSCQA/nQqmV4pqDph7t9kq X3hZU15ueEH5/XXl3ndkrWqtY0kazGKhzFW+wuBMA/NXKKHYBCtZkMvIsNRFLhQYxPLP dSLw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z2si570735eja.516.2020.05.07.00.38.33; Thu, 07 May 2020 00:38:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726807AbgEGHgW (ORCPT + 99 others); Thu, 7 May 2020 03:36:22 -0400 Received: from inva020.nxp.com ([92.121.34.13]:40440 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725927AbgEGHfq (ORCPT ); Thu, 7 May 2020 03:35:46 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id E36FC1A0FD7; Thu, 7 May 2020 09:35:44 +0200 (CEST) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id D70411A0F14; Thu, 7 May 2020 09:35:44 +0200 (CEST) Received: from fsr-ub1864-111.ea.freescale.net (fsr-ub1864-111.ea.freescale.net [10.171.82.141]) by inva024.eu-rdc02.nxp.com (Postfix) with ESMTP id 88E8C203C5; Thu, 7 May 2020 09:35:44 +0200 (CEST) From: Diana Craciun To: linux-kernel@vger.kernel.org Cc: laurentiu.tudor@nxp.com, stuyoder@gmail.com, leoyang.li@nxp.com, linux-arm-kernel@lists.infradead.org, gregkh@linuxfoundation.org, Diana Craciun Subject: [PATCH v2 04/12] bus/fsl-mc: Set the QMAN/BMAN region flags Date: Thu, 7 May 2020 10:34:23 +0300 Message-Id: <20200507073431.2710-5-diana.craciun@oss.nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200507073431.2710-1-diana.craciun@oss.nxp.com> References: <20200507073431.2710-1-diana.craciun@oss.nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Signed-off-by: Diana Craciun --- drivers/bus/fsl-mc/fsl-mc-bus.c | 7 ++----- drivers/bus/fsl-mc/fsl-mc-private.h | 6 ------ 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/bus/fsl-mc/fsl-mc-bus.c b/drivers/bus/fsl-mc/fsl-mc-bus.c index 3a86f5087717..df96f1602361 100644 --- a/drivers/bus/fsl-mc/fsl-mc-bus.c +++ b/drivers/bus/fsl-mc/fsl-mc-bus.c @@ -573,11 +573,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; - if (region_desc.flags & DPRC_REGION_SHAREABLE) - regions[i].flags |= IORESOURCE_MEM; + regions[i].flags = region_desc.flags & IORESOURCE_BITS; + regions[i].flags |= IORESOURCE_MEM; } mc_dev->regions = regions; diff --git a/drivers/bus/fsl-mc/fsl-mc-private.h b/drivers/bus/fsl-mc/fsl-mc-private.h index 21ca8c756ee7..c2a688c07ee2 100644 --- a/drivers/bus/fsl-mc/fsl-mc-private.h +++ b/drivers/bus/fsl-mc/fsl-mc-private.h @@ -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 -- 2.17.1