From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 406A2C433ED for ; Fri, 21 May 2021 13:38:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 25079610CB for ; Fri, 21 May 2021 13:38:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236329AbhEUNkD (ORCPT ); Fri, 21 May 2021 09:40:03 -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-kernel@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 >