Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1107229pxj; Fri, 21 May 2021 06:40:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1Km2FfCoPXzmolXVWVUTZQqU15Gmx6hJh0YxXnPP/A1JEnQMp+Azmx1KQImZ0GK7PBRMQ X-Received: by 2002:a17:906:814d:: with SMTP id z13mr1488915ejw.195.1621604422563; Fri, 21 May 2021 06:40:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621604422; cv=none; d=google.com; s=arc-20160816; b=qlS7LBfzGj/GUcbjf+qJ4iLUX7LehlfKy0ltlcmRxMyxMYan1mO6b0TjslgnGMQRMP SRJw0FQ3HuuBBQKiGDcTf7qcWnae/n7xNGhNjeJ4hGRtLvAqvQtfNy0GlSsjMVAK+qDh fwsh2LKvvvowM8lV0aAbR6synXSpLWdtJNLPh4Pv2WQ7VOoi9W3VuK3U+sRUYzIVvesI NWbcYiQOyfbg7nJ/WEHf+eHcZCh64k8H1XkF4BYZ8MEQdb42hrH/cIIFFbENQPk8/ktq gaSmtS4iMAQ7O6yNqiCZc5OCwPSAlmdYXk0gAriwmD7yK53D6b7jDJGY4xUrit+KxyIE BGJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=p4XAwPcTLZLM93Pe17eQwaDCk7aR8CaSc22Qnnp8gms=; b=Sdws8Kc5amD9NozERZqBoc+JJRW/Kswbis78akK2j1fTgRbxDJZ9pYFcDGLA/usQVk K2pf4RdHMqd31Zdvfflnjl48V9you0GMAUHwIM+Ux8C5VAVmm3OJvNOor+uhWQZdu1aH hBFET6DULHFqWkfcv4cSiE5XvVSefSYu//xZLxKHgOvvvGDaT8Hyo5xnuC1/aC33Ub40 oqwteZnjvWARBAnOzPQCTs5PUfOtIfyAskrntaSpaw+WBsf+T3kpfdxflvyyVZioeWdB OVecNEleWlxiviO2IOrE3xeE4rTB/pHVcpv+w349PikTT6yrEUK1PLpUOSxF16AIjoKK JCAw== ARC-Authentication-Results: i=1; mx.google.com; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rl19si5377418ejb.50.2021.05.21.06.39.59; Fri, 21 May 2021 06:40:22 -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; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236123AbhEUNkA (ORCPT + 99 others); Fri, 21 May 2021 09:40:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:49426 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236157AbhEUNjq (ORCPT ); Fri, 21 May 2021 09:39:46 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 962636109F; Fri, 21 May 2021 13:38:17 +0000 (UTC) Date: Fri, 21 May 2021 19:08:12 +0530 From: Manivannan Sadhasivam To: Bhaumik Bhatt 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 Subject: Re: [PATCH v4 3/6] bus: mhi: Add MMIO region length to controller structure Message-ID: <20210521133812.GK70095@thinkpad> References: <1620330705-40192-1-git-send-email-bbhatt@codeaurora.org> <1620330705-40192-4-git-send-email-bbhatt@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1620330705-40192-4-git-send-email-bbhatt@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Thu, May 06, 2021 at 12:51:42PM -0700, Bhaumik Bhatt wrote: > 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 Reviewed-by: Manivannan Sadhasivam Thanks, Mani > --- > 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 >