Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp1675101pxy; Thu, 6 May 2021 13:00:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0ojYtkV3lxLE3aA/vzeMHSZt6wsJWeH29OdAkTBN0p5k5Ep2no46gKR6cE/Jza917BuBu X-Received: by 2002:a63:490a:: with SMTP id w10mr5984407pga.286.1620331218500; Thu, 06 May 2021 13:00:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620331218; cv=none; d=google.com; s=arc-20160816; b=eMIpdUz9owEopNkHz4uHSxCvt4SWtHTcPY5uRPlJ7X8bTEw/cHjfrRMirioYoWTcbe 8xBicqlzb0tp3BQB1yA5Bou09pkxalZQhejWqh0fWxZz7x/Gig/FryukeJ3YtlgtqpdA lPN3eZ5iXGdC1hKQHqZQvTKEeym861Hgjhpi3pR20BWadt3MZVqBr+pWc5yn3RJAb/9o prkkq+iGBWjw8xc7OBEfEQpV3j6d751rHsPFogCh0Cb5SuvGRGv3QaxudJkAOO3RWtY3 qoOU8aCicORFt2SzSVauRsBulnj2zfu5nTpCkm48ESltOm4ndEIq85YHmT1+/9fd0RNv 7tjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dmarc-filter:sender:dkim-signature; bh=Q3g/jWIddxs6pYbp2dd0legUkJacIL9kKHwbctWLKUc=; b=fdjdafgrkpAqQOgwo+P9pLqxP335W1h7ifYfBsrRpOR8xdByO0qm8Al6lrgcMuZ2/A EmoF9oSwvQ5F2iRcDtooLBi0EfFMzD4LT+sXjkNgk8e7MWGg273rsdWCIRwfYjMXA0Pr HDTPeSNe9dbKDAYLjM++cHm4M2ZSU81SMXYyq3IIq05RIsLauzAojSPT3bZQlGrsGw8E 00LscZE5z09MCc3m2qsWYSSB57uk40BhZvmzz4XV2ZHyAEoZ/m8n+UXOJYTSwvGhacZL zrhbvOIuJ7rWHkIulk5qLL5O7sbW0/GVqDiBh3TgGybKxyc2Ngixq2XZQ/YNmjfkwZDg Q1Sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=XBRv1Al6; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=qti.qualcomm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 92si4474520plc.268.2021.05.06.13.00.05; Thu, 06 May 2021 13:00:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=XBRv1Al6; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=qti.qualcomm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235243AbhEFTed (ORCPT + 99 others); Thu, 6 May 2021 15:34:33 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:63499 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235386AbhEFTe0 (ORCPT ); Thu, 6 May 2021 15:34:26 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1620329607; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=Q3g/jWIddxs6pYbp2dd0legUkJacIL9kKHwbctWLKUc=; b=XBRv1Al6JnULpZpyM432VfNG8GfpmVG8TQ1ULTmccY4PuvyQC3KdpbmSZTxRQi/BrAD5GfV7 dbXu/P0s0A4KCd7MrXDk3h1M5TCC9yXjsaHQK+hJvbVIBA02rS8wEnHSZfvQx4cpRQL4i1Ho bsX8x9OV/4Qn16Zabrc1S/CZCD8= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n03.prod.us-east-1.postgun.com with SMTP id 60944478853c0a2c461d2dc3 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Thu, 06 May 2021 19:33:12 GMT Sender: bbhatt=qti.qualcomm.com@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 761E2C4338A; Thu, 6 May 2021 19:33:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from malabar-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: bbhatt) by smtp.codeaurora.org (Postfix) with ESMTPSA id B9719C4338A; Thu, 6 May 2021 19:32:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org B9719C4338A Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=pass (p=none dis=none) header.from=qti.qualcomm.com Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=pass smtp.mailfrom=bbhatt@qti.qualcomm.com From: Bhaumik Bhatt To: manivannan.sadhasivam@linaro.org Cc: linux-arm-msm@vger.kernel.org, hemantk@codeaurora.org, jhugo@codeaurora.org, linux-kernel@vger.kernel.org, loic.poulain@linaro.org, linux-wireless@vger.kernel.org, kvalo@codeaurora.org, ath11k@lists.infradead.org, Bhaumik Bhatt Subject: [PATCH v4 3/6] bus: mhi: Add MMIO region length to controller structure Date: Thu, 6 May 2021 12:32:22 -0700 Message-Id: <1620329545-32328-4-git-send-email-bbhatt@qti.qualcomm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1620329545-32328-1-git-send-email-bbhatt@qti.qualcomm.com> References: <1620329545-32328-1-git-send-email-bbhatt@qti.qualcomm.com> Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Bhaumik Bhatt Make controller driver specify the MMIO register region length for range checking of BHI or BHIe space. This can help validate that offsets are in acceptable memory region or not and avoid any boot-up issues due to BHI or BHIe memory accesses. Signed-off-by: Bhaumik Bhatt Reviewed-by: Jeffrey Hugo Reviewed-by: Hemant Kumar --- include/linux/mhi.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/mhi.h b/include/linux/mhi.h index 944aa3a..9c347f5 100644 --- a/include/linux/mhi.h +++ b/include/linux/mhi.h @@ -303,6 +303,7 @@ struct mhi_controller_config { * @rddm_size: RAM dump size that host should allocate for debugging purpose * @sbl_size: SBL image size downloaded through BHIe (optional) * @seg_len: BHIe vector size (optional) + * @reg_len: Length of the MHI MMIO region (required) * @fbc_image: Points to firmware image buffer * @rddm_image: Points to RAM dump buffer * @mhi_chan: Points to the channel configuration table @@ -386,6 +387,7 @@ struct mhi_controller { size_t rddm_size; size_t sbl_size; size_t seg_len; + size_t reg_len; struct image_info *fbc_image; struct image_info *rddm_image; struct mhi_chan *mhi_chan; -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project