Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp126779ybt; Mon, 6 Jul 2020 05:44:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmV5bPoMETVKndolxxNGfWLQgJyRfIIHzd409XOeuRIYBKnyxkoYxzqjMEt/YJEmzB4nL3 X-Received: by 2002:a17:906:e210:: with SMTP id gf16mr33658077ejb.386.1594039486759; Mon, 06 Jul 2020 05:44:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594039486; cv=none; d=google.com; s=arc-20160816; b=eQXnSZDve4+xpAYFQb0NvSwBTRVZdL4jcUKyihjlccH+B5vxjVLZpUbGVemWmg0dP6 jMSmt5A+YXUyxj3+qROX1wC7xweoOQWC9e/w42KXJuc9Yzks9iLOWGXhNU8H0Xh5K5ZS FRrAk0icxdV3ak5Evzs6quW84SD6MAXBl4Xm6GVmIxnapgTf83oXDLtSLfMRFkK0JwgT wGc5BI6fQtFJZBU0yvfVxisbT3Mz+jrP+swOyLVB6Mvh5wWplQDAt/MvBasngRX9Lrzu XREyQuOszcycIF6SoGM1HxdzfdIXun+iuPx5wkR6Fsn6ef3pzyrYsb9ksWgTaz+jFUuT x2rw== 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=Pj95tV8vY8lsVhRam822TEs9Mb6NqL++8Z1Av6EC/Nc=; b=B7WA1+5+7G+7JnbvNRTQy5EmzpKGcVrwzf8OKrqCC5PbQw8NqsCSEYB+oKTcWOnypq 6HUwBEmYXswEfh4e6MoOFDVHyC6QKJVKANd69JF6IOMidsjmoNrnaaH+JQUWGgNizkr0 ubb88AzT/KUUgQI4matfypglxSb8VEP0FS7LTTkxpfGZUXgPJu5gjbeHzXky0L4440vw dbxhp/UHfwxKFq7BKbdYzvDxwt5zUax8/UHcX9Q08DZjn8qjK5larE3M7YGNHLYQkKZW 25cKFENwzkdIv2dRZlgPr1WelTTYWj3Df0jnEvOQ83yG6iguQQ8p9hhgxij/lJIkiM6p k0xw== 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 qk1si12708336ejb.15.2020.07.06.05.44.23; Mon, 06 Jul 2020 05:44:46 -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 S1729238AbgGFMnb (ORCPT + 99 others); Mon, 6 Jul 2020 08:43:31 -0400 Received: from inva020.nxp.com ([92.121.34.13]:42844 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729183AbgGFMnM (ORCPT ); Mon, 6 Jul 2020 08:43:12 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id F1A101A16BD; Mon, 6 Jul 2020 14:43:09 +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 E51D31A1635; Mon, 6 Jul 2020 14:43:09 +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 873AB203C3; Mon, 6 Jul 2020 14:43:09 +0200 (CEST) From: Diana Craciun To: linux-kernel@vger.kernel.org, laurentiu.tudor@nxp.com, gregkh@linuxfoundation.org Cc: stuyoder@gmail.com, leoyang.li@nxp.com, linux-arm-kernel@lists.infradead.org, bharatb.linux@gmail.com, Bharat Bhushan , Diana Craciun Subject: [PATCH v3 12/13] bus/fsl-mc: Extend ICID size from 16bit to 32bit Date: Mon, 6 Jul 2020 15:42:42 +0300 Message-Id: <20200706124243.10697-13-diana.craciun@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200706124243.10697-1-diana.craciun@nxp.com> References: <20200706124243.10697-1-diana.craciun@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 44bde72bdea7..3f08752c2c19 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 bf4f01ddf846..f44a5e9d0c4a 100644 --- a/drivers/bus/fsl-mc/fsl-mc-bus.c +++ b/drivers/bus/fsl-mc/fsl-mc-bus.c @@ -461,7 +461,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 48255e8944bd..e6fcff12c68d 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 8ee4e919e860..96e8d7e33858 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