From patchwork Tue Nov 17 02:58:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhaumik Bhatt X-Patchwork-Id: 11911371 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B3D4F139F for ; Tue, 17 Nov 2020 02:59:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8D7A024694 for ; Tue, 17 Nov 2020 02:59:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mg.codeaurora.org header.i=@mg.codeaurora.org header.b="kLZsrWKo" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728039AbgKQC6h (ORCPT ); Mon, 16 Nov 2020 21:58:37 -0500 Received: from z5.mailgun.us ([104.130.96.5]:49622 "EHLO z5.mailgun.us" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728025AbgKQC6g (ORCPT ); Mon, 16 Nov 2020 21:58:36 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1605581915; h=Message-Id: Date: Subject: Cc: To: From: Sender; bh=PasZo35wv2lzlVgDMf8xo6luIQOrH87IVunXMHfnqIU=; b=kLZsrWKox9cIm/EvWXkHrH/c5RSvqBTTCgJcR0tRlQGBa0Uizl6At8Nuf0Rr3l9IUXxrk6o/ aNkFqfW+BwXl8yPglLT9tfWEO0XdsZi5fBxMJs4FMEU2PdZ5+5rlxov53v5yvIOARfAB9a3B RSSYmAkf7XHr2Ieps9THJQ13fdY= X-Mailgun-Sending-Ip: 104.130.96.5 X-Mailgun-Sid: WyI1MzIzYiIsICJsaW51eC1hcm0tbXNtQHZnZXIua2VybmVsLm9yZyIsICJiZTllNGEiXQ== 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 5fb33c55135ce186e9db7162 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Tue, 17 Nov 2020 02:58:29 GMT Sender: bbhatt=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 72AD9C4347F; Tue, 17 Nov 2020 02:58:28 +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 DE1FFC4346E; Tue, 17 Nov 2020 02:58:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org DE1FFC4346E 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: carl.yin@quectel.com, linux-arm-msm@vger.kernel.org, hemantk@codeaurora.org, jhugo@codeaurora.org, linux-kernel@vger.kernel.org, Bhaumik Bhatt Subject: [PATCH v1 0/2] Serialize execution environment changes for MHI Date: Mon, 16 Nov 2020 18:58:16 -0800 Message-Id: <1605581898-4181-1-git-send-email-bbhatt@codeaurora.org> X-Mailer: git-send-email 2.7.4 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org During full boot chain firmware download, the PM state worker downloads the AMSS image after waiting for the SBL execution environment change in PBL mode itself. Since getting rid of the firmware load worker thread, this design needs to change and MHI host must download the AMSS image from the SBL mode of PM state worker thread instead. Also ensure that EE changes are handled only from appropriate places and occur one after another and handle only PBL or RDDM EE changes as critical events directly from the interrupt handler and the status callback is given to the controller drivers promptly. Bhaumik Bhatt (2): bus: mhi: core: Download AMSS image from appropriate function bus: mhi: core: Process execution environment changes serially drivers/bus/mhi/core/boot.c | 44 ++++++++++++++++++++--------------------- drivers/bus/mhi/core/internal.h | 1 + drivers/bus/mhi/core/main.c | 14 +++++++------ drivers/bus/mhi/core/pm.c | 14 +++++++++---- 4 files changed, 40 insertions(+), 33 deletions(-)