Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp3515112pxa; Wed, 26 Aug 2020 02:28:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyuUS8zEx+18DoIEV+Q0DxD2N0XY6N6xa2trJNL+Z1Gu1Td/J19kiHa2UmkAvYfpa5BTIc+ X-Received: by 2002:a17:906:d8b1:: with SMTP id qc17mr1977115ejb.362.1598434081431; Wed, 26 Aug 2020 02:28:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598434081; cv=none; d=google.com; s=arc-20160816; b=y/4LiEMEW0HNmCXlnL0LjfHBFLsabhYqfJjxM1acx3ZMrITJqxOJIL3jmrCfShS+7G +lM9fP7bTVKjXYINhSFCicU8cnKS3x9/0835HqF7N5ShSHI2RFFzXEa9HdWxmSIsUZ5W vCD0pVqXmzkVScc+/yQhNjfMwQWx1f4Gpxa40SV/kIE+yzDM47p5j04MDsAdzYw9tDxr 5tXgvdsxMOLg/EmsSDsgTuZh64wmmV84iqL81VGQfB9f4a++ypaoe7PTqf1qJB81CD5O s+8d2D889Cva50h/HoML1ARfRYjvOsLHlIoTVMX1eDZYCnb3uFiMLDluyZ8J6r+nBOQy XWhQ== 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=lZWskptWpFnzgikCn6qsNs+Z48L0/tf3eWEWPj5O0Hk=; b=iAZNqRY0Muy2YZmJUUyeoEbxPvd8KXnCNLfni/PJGn3s5ebaYFdT/CU3d3QumaaTeS OO8Jaao/icHNdrvEV5xQkYCMPKrAZl9KMInXe4C+snas5eq5GIUqOECC+fSi4xEM0QXv DvKQ1WNYpe0xg5iLagzAti7wO9Smr4cD8N8vSPkmSa9fFNt3fi/MSHZ6ozNozZmBtbQv TOmR5y1EVCdPsUEMXugxgfz329ELx9GaZhHF2u92Ec8IprtwIyhC7q8TZkuteEp4qGco 6pTpxZ7OOjhIyKliTv6PNFw1y2l2yCqDUw4PbxmWea3rZzZA+1k1DYJo0OtmTzlIR29N u/Yw== 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 n6si1115770ejg.175.2020.08.26.02.27.38; Wed, 26 Aug 2020 02:28:01 -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 S1728103AbgHZJ0Y (ORCPT + 99 others); Wed, 26 Aug 2020 05:26:24 -0400 Received: from inva020.nxp.com ([92.121.34.13]:56602 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728022AbgHZJ0K (ORCPT ); Wed, 26 Aug 2020 05:26:10 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 420621A16BC; Wed, 26 Aug 2020 11:26:07 +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 342841A16B9; Wed, 26 Aug 2020 11:26:07 +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 CAFE72030A; Wed, 26 Aug 2020 11:26:06 +0200 (CEST) From: Diana Craciun To: linux-kernel@vger.kernel.org, laurentiu.tudor@nxp.com Cc: stuyoder@gmail.com, leoyang.li@nxp.com, gregkh@linuxfoundation.org, linux-arm-kernel@lists.infradead.org, bharatb.linux@gmail.com, Bharat Bhushan , Diana Craciun Subject: [PATCH v4 12/13] bus/fsl-mc: Extend ICID size from 16bit to 32bit Date: Wed, 26 Aug 2020 12:25:26 +0300 Message-Id: <20200826092527.4992-13-diana.craciun@oss.nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200826092527.4992-1-diana.craciun@oss.nxp.com> References: <20200826092527.4992-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 From: Bharat Bhushan In virtual machines the device-id range is defined between 0x10000-0x20000. The reason for using such a large range is to avoid overlapping with the PCI range. Signed-off-by: Bharat Bhushan Signed-off-by: Laurentiu Tudor Signed-off-by: Diana Craciun --- drivers/bus/fsl-mc/dprc.c | 2 +- drivers/bus/fsl-mc/fsl-mc-bus.c | 2 +- drivers/bus/fsl-mc/fsl-mc-private.h | 5 ++--- include/linux/fsl/mc.h | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/bus/fsl-mc/dprc.c b/drivers/bus/fsl-mc/dprc.c index 2448a723eb28..650808799a29 100644 --- a/drivers/bus/fsl-mc/dprc.c +++ b/drivers/bus/fsl-mc/dprc.c @@ -360,7 +360,7 @@ int dprc_get_attributes(struct fsl_mc_io *mc_io, /* retrieve response parameters */ rsp_params = (struct dprc_rsp_get_attributes *)cmd.params; attr->container_id = le32_to_cpu(rsp_params->container_id); - attr->icid = le16_to_cpu(rsp_params->icid); + attr->icid = le32_to_cpu(rsp_params->icid); attr->options = le32_to_cpu(rsp_params->options); attr->portal_id = le32_to_cpu(rsp_params->portal_id); diff --git a/drivers/bus/fsl-mc/fsl-mc-bus.c b/drivers/bus/fsl-mc/fsl-mc-bus.c index 32f194814b08..d375bb585749 100644 --- a/drivers/bus/fsl-mc/fsl-mc-bus.c +++ b/drivers/bus/fsl-mc/fsl-mc-bus.c @@ -503,7 +503,7 @@ static int get_dprc_attr(struct fsl_mc_io *mc_io, } static int get_dprc_icid(struct fsl_mc_io *mc_io, - int container_id, u16 *icid) + int container_id, u32 *icid) { struct dprc_attributes attr; int error; diff --git a/drivers/bus/fsl-mc/fsl-mc-private.h b/drivers/bus/fsl-mc/fsl-mc-private.h index ffe709a3f0f8..3e9f9c778631 100644 --- a/drivers/bus/fsl-mc/fsl-mc-private.h +++ b/drivers/bus/fsl-mc/fsl-mc-private.h @@ -159,8 +159,7 @@ struct dprc_cmd_clear_irq_status { struct dprc_rsp_get_attributes { /* response word 0 */ __le32 container_id; - __le16 icid; - __le16 pad; + __le32 icid; /* response word 1 */ __le32 options; __le32 portal_id; @@ -337,7 +336,7 @@ int dprc_clear_irq_status(struct fsl_mc_io *mc_io, */ struct dprc_attributes { int container_id; - u16 icid; + u32 icid; int portal_id; u64 options; }; diff --git a/include/linux/fsl/mc.h b/include/linux/fsl/mc.h index f791fe38c251..db244874e834 100644 --- a/include/linux/fsl/mc.h +++ b/include/linux/fsl/mc.h @@ -195,7 +195,7 @@ struct fsl_mc_device { struct device dev; u64 dma_mask; u16 flags; - u16 icid; + u32 icid; u16 mc_handle; struct fsl_mc_io *mc_io; struct fsl_mc_obj_desc obj_desc; -- 2.17.1