Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp647711pxy; Wed, 5 May 2021 10:16:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwzuaQAJbYJE3en6UkE1acC2tk1swEQPbdfX2ZVgUZp70L/WiWsJm4me+FepDrMykwJwzDs X-Received: by 2002:a50:9e0b:: with SMTP id z11mr100157ede.228.1620234986055; Wed, 05 May 2021 10:16:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620234986; cv=none; d=google.com; s=arc-20160816; b=eY2lGiAr3yVe2dt9UDrOI5BzHzG2ZlCmzdD1R1aUx4d6/A0urhcJSqCv9zLTkWwfVP LaJbS7oRWHxjqbHa8UtQRT11J5X78cfXqjBegCyfNTZxNztTueMfBrZz4kg2/bL0s4Vp I6IDIPMUtix5yAy3YjvaOKyMUyemwBuzZMB4fclmVeTVLf3wuPRaPY12SAdzB1y/uyMq t0row+2srFEUxjs4zqcnw5JNMHlMlV2E7f0Ob3e8fnYsmgKKioAJQWS4qrfmFD10Ijk1 843juACSspoyesSd8eW2J8rkiTejUub+2XhIasVAuK+imRHcWhnnO30JFUMyS4m4c1qW Vj5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from:dmarc-filter :sender:dkim-signature; bh=zJ3n4e38JIW/W6C47Rp2eE60Ip/I/8mMnIajfX9QwqY=; b=HLlcwKO2Cb/1LE5pFf9eHPFbkwt4nRoihcE5YyfT51s8n77SUci6YMWguaRsPVGiPM xwOLd6p4/gFBKhQEyu83FEAfdtObw6VxS49xhdby+efJrR6pM9L8bLTSbLnBiHkRM4k3 9vytI0hPXPcDQ4ajcgW6IAEcLMPkrB3if4amfJ+SGtNKJc+pVXnLKGJJuhAgehuzFJby b3EdlrlNhXPQKrNYsAJMi3KlK8wMy6w4q82eO4Q2q4syAx2XSCih2sOawgzR4V7RcTZu 15Ang7On1bWXrvR3AoiSkXGSF8tayCNkWjeR6ANh5mB4L85/5yXIsrw22py8z9iAJlV/ fDYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=WSDijSyR; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p13si5744792ejb.542.2021.05.05.10.15.45; Wed, 05 May 2021 10:16:26 -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=WSDijSyR; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237434AbhEERNz (ORCPT + 99 others); Wed, 5 May 2021 13:13:55 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:43899 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238858AbhEERKE (ORCPT ); Wed, 5 May 2021 13:10:04 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1620234548; h=Message-Id: Date: Subject: Cc: To: From: Sender; bh=zJ3n4e38JIW/W6C47Rp2eE60Ip/I/8mMnIajfX9QwqY=; b=WSDijSyRFBX3rHjwTFGdQLzEcFSuCvBaDIoR4DEU3HboKUTSEna1eFEso3BDPK155wpQ2ek6 zTQkyQjWHgXb0VSRV2ObK8t5Zb5rjkRS32tZ3S7yIJtv//s9+TZyKNy/7+a/66/l7iS/gq/O BRQ4s9RFy/oXhjcFiGYng/ZZFwg= 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-n06.prod.us-east-1.postgun.com with SMTP id 6092d11ac39407c327c2f917 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Wed, 05 May 2021 17:08:42 GMT Sender: bbhatt=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 8A187C43144; Wed, 5 May 2021 17:08:41 +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_FAIL autolearn=no 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 840C2C433D3; Wed, 5 May 2021 17:08:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 840C2C433D3 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=bbhatt@codeaurora.org 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 v3 0/6] BHI/BHIe improvements for MHI power purposes Date: Wed, 5 May 2021 10:08:15 -0700 Message-Id: <1620234501-30461-1-git-send-email-bbhatt@codeaurora.org> X-Mailer: git-send-email 2.7.4 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org This patch series improves the power up behavior by allowing MHI host driver to set BHI and/or BHIe offsets early on in the preparation phase and fail pre-power up if offsets are not found or not within a limited MMIO region. This also allows MHI host to clean up the offsets in the unprepare after power down phase. Going forward, controllers will be required to specify a reg_len field which will be used to check whether the BHI/BHIe offsets are in range or not. This series has been tested on X86_64 architecture with the PCI generic driver as controller and an SDX55 device. v3: -Added reviewed-by tags -Updated order of reg_len in mhi_controller structure documentation v2: -Added reviewed-by tags -Moved reg_len entry in mhi_controller structure to allow for a packed struct Bhaumik Bhatt (6): bus: mhi: core: Set BHI/BHIe offsets on power up preparation bus: mhi: core: Set BHI and BHIe pointers to NULL in clean-up bus: mhi: Add MMIO region length to controller structure ath11k: set register access length for MHI driver bus: mhi: pci_generic: Set register access length for MHI driver bus: mhi: core: Add range checks for BHI and BHIe drivers/bus/mhi/core/init.c | 58 +++++++++++++++++++++++------------ drivers/bus/mhi/core/pm.c | 28 +++-------------- drivers/bus/mhi/pci_generic.c | 1 + drivers/net/wireless/ath/ath11k/mhi.c | 1 + include/linux/mhi.h | 2 ++ 5 files changed, 47 insertions(+), 43 deletions(-) -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project