Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp4047258pxy; Tue, 4 May 2021 16:41:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTSfYZzYLSUXzN3WQniBSr+aQGIZ2q0qdk56gdAUdw0Hm3t2WHvD1p1qHg9/qjv9+XK3Wt X-Received: by 2002:a50:eb47:: with SMTP id z7mr27111817edp.68.1620171709368; Tue, 04 May 2021 16:41:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620171709; cv=none; d=google.com; s=arc-20160816; b=HW1JfjuiZUtGxBYmCb1Vl4nl8tjWk+vnMOBMD+SwwAbUGirObJCx8tae5pQdyYTU4I PvX04+zqeIw3e3/wrXt4IIaQgpmjetjU9n2sXpebmdn0T5+FGg/kO/nSh0ojC+hrTFe1 A2s/a6DqEeHQUtjbbUqOxAehYuuTjsW9FgpFVyIGDxybKVv8kkgsOrNbjNnptTCad8W/ vjpGw29fYkXhnTNgZtx34ko/isLEJpGeEAtKqLXnP4l5QFG6txPNOMmIa8tAq9kRM2Of +lVzzk66EQwnjsjToszqblLSbvmhtxyq19CI/b84FCmjfNHGGNCUILVmpYsD8voVYILc 4JIQ== 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=38TiQyyKps9JXnzJlaf2DPTrGl1O6bLoBL9k01Yhxmk=; b=OxYMh5aSft658egHS9R14yuruIJ+CxX6+NetUorpmG6EqyzxA/l2K8ezl6mytuA9+X kBfyC8y1X0YJ9uKMa+Iq5wHwUALjDyrMtn6sYg9wcX1mlUhwiUobZHvMC3CpwJOP/pk3 cKW0FBYkdVZhhvMdw+BmYv+lNQ0v2VCOWJP4S/A2o4Sv43GOEO448EyBhRdzK4jkQ1/c 2PGGbJsB9sZKwUpqR7FSVNh5GUHnbeCMVtHBQArVtFHoa9kja7bqZt3QN8IWbRQ5LgNk Uz4qqF3+RLSANzJevAT7AHejKuBG8g8ff1CjdSrLKBlMSJ5rzvRiqlwmm9ulwtgv7Gsm OVuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=Qya33n4C; 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 z28si12542684edm.490.2021.05.04.16.41.25; Tue, 04 May 2021 16:41:49 -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=Qya33n4C; 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 S231506AbhEDXjE (ORCPT + 99 others); Tue, 4 May 2021 19:39:04 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:62240 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231486AbhEDXjD (ORCPT ); Tue, 4 May 2021 19:39:03 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1620171487; h=Message-Id: Date: Subject: Cc: To: From: Sender; bh=38TiQyyKps9JXnzJlaf2DPTrGl1O6bLoBL9k01Yhxmk=; b=Qya33n4C0WW9YQJ2MT6KfWqP1V+vNxu9NrW0WE1m6ARY1khMC5S5djPtMHwd8D1JDXIkSkp+ 1VyUEgYcdd7C3Ch4IqL0icjcB1SmRcdRY++6Yz/BisIZbjAIp0BDz8zvwZ5+X8WdYkqXevhb ZnpGBi8MMT6jpMkdhcr2Q/N+1P0= 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-n01.prod.us-west-2.postgun.com with SMTP id 6091dade8807bcde1d9ade20 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 04 May 2021 23:38:06 GMT Sender: bbhatt=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 4ACC8C4360C; Tue, 4 May 2021 23:38:06 +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 2B21BC43460; Tue, 4 May 2021 23:38:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 2B21BC43460 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 v2 0/6] BHI/BHIe improvements for MHI power purposes Date: Tue, 4 May 2021 16:37:52 -0700 Message-Id: <1620171478-35679-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. 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