Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4098010imm; Thu, 17 May 2018 22:30:17 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqPsLAhh1F142H9JWECsX5v7pHHckUsA3ikU8UCyN92hZCyyJL5WdFmN2RNDUaW1bsdb604 X-Received: by 2002:a17:902:a616:: with SMTP id u22-v6mr8272595plq.186.1526621417328; Thu, 17 May 2018 22:30:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526621417; cv=none; d=google.com; s=arc-20160816; b=SX3WMnVKDb5SjvfXX9Ya4V8oXZvu/X8g3GPiHGfvqZON8P/9sH/hlm7aEUEy2Oib8D IN447aRro1WuWtNToecr9Evp/hiMX+ZxlA6a5A9Rny14Ybxa+7mrj5yZTJtCcPVi2lX0 WWa4HpWjXWZXfJx+WG7OA07Mu/uMyEAGgiHsOMevCZN62lf1/ul/vAczarByRqVF6a+t qOnL8VIwzQE8zMEhauPMkT9k2oS4r/U8vgOJMXj0pux7yX3pW8KopMnnyB8NKkocjEZ/ EEEnhqHpy5UpCLDmdGSuQy3RveTvr8xlyGO/xbPh9yCSUmFG9cUh/3Yk7t6b3z4ThFfz LUeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=TpdhlolsGH+oeo7XnmrzNvWZHFzpCTUSeRQwY5zVBzQ=; b=NVDjD2YkTqD3N5mwtfPY2K8WAoColmNbMf72H+mpCP14qQpLCG8cguQCR4wjRZJWxg 5HLAUzVbPdABd53bDQV/NAjLfOoQOvVdVDXj3ZrtLQf6k3ogS8zn4iv1wXjCGyEfI3Oi b+tETCxp5gEsUqLW+Zp4vfq6e+hiQhoODqzX/viAKNqA8vOjX6hNJINraaPL84WhS6PP EKIAxP7+AKokYO9ThKlTS4NpNrbIzawSH5jjz4MRv594qoYSYVZaPDPBvGg+rL+iVLYe xxUyBWpgQRGHrOXCdZWgwrl1ByCroxCoOlUZ001m7Agd0YAn4d+JyFUfAUZQCmEL9uyu 6dHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=E/UxQc4W; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w14-v6si6578899plp.31.2018.05.17.22.30.02; Thu, 17 May 2018 22:30:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=E/UxQc4W; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751661AbeERF2t (ORCPT + 99 others); Fri, 18 May 2018 01:28:49 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:38205 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751049AbeERF2r (ORCPT ); Fri, 18 May 2018 01:28:47 -0400 Received: by mail-pg0-f67.google.com with SMTP id n9-v6so2811970pgq.5 for ; Thu, 17 May 2018 22:28:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=TpdhlolsGH+oeo7XnmrzNvWZHFzpCTUSeRQwY5zVBzQ=; b=E/UxQc4WWuuDaeijLQ3CMtSvPOeFgM9p4YsRBGDVdVfu8zJqXVsKP2P2AhqhbML6iI ucrUxc8d6TTh+on+EPPwlCh7pKLN1hNCacz4p/7LOFnKwM8IZV1oby2+PLI9u5B2Bfj6 vgDlBJ7vimpmmTUh4bEi8AMpjRg8xGLoLwOCg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=TpdhlolsGH+oeo7XnmrzNvWZHFzpCTUSeRQwY5zVBzQ=; b=UH4mpGs2WbA0TPr8TsuiZzeC/gWRFv0rL2TM3R9P+SFdpHHxOVQHrCUz/I+eVOB4G7 Yt3s703WlK1kscUNk3KRmRlczMwkSKKzOI07ksURXeWaSt1C1lr9jiNP9K2/OI7xSlXS L02sOB5REwT2T9SPMKw+NfF+TjTzUP9ixm5sJUiJc0xGyR8hNB9cyeqS1oAZHNLPod9L gBIZ0L2HUIwLea9SFx8acXbjgYmMOAbEUApA8mn9lI0xDlA7uORRrMBuL2X5U5Gp9Tba Hi9BSvLtc0ceYa0U28rni/CBcz3IALuKW7MFkISLZQqmyyk5RSqNTN14XStnbwg5VkEr UihQ== X-Gm-Message-State: ALKqPwfpvoaZQ12sWt3iSUojPSL/Pi00i6gBFtWJYBM4vb5KcaRc13Vm aZgaf/4zJjt6AhoSgdkuzn7MKQ== X-Received: by 2002:a65:66d7:: with SMTP id c23-v6mr1421356pgw.76.1526621327326; Thu, 17 May 2018 22:28:47 -0700 (PDT) Received: from minitux (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id a77-v6sm11086376pfe.70.2018.05.17.22.28.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 17 May 2018 22:28:46 -0700 (PDT) Date: Thu, 17 May 2018 22:28:44 -0700 From: Bjorn Andersson To: Vikash Garodia Cc: hverkuil@xs4all.nl, mchehab@kernel.org, andy.gross@linaro.org, stanimir.varbanov@linaro.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org, acourbot@google.com Subject: Re: [PATCH 1/4] soc: qcom: mdt_loader: Add check to make scm calls Message-ID: <20180518052844.GP14924@minitux> References: <1526556740-25494-1-git-send-email-vgarodia@codeaurora.org> <1526556740-25494-2-git-send-email-vgarodia@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1526556740-25494-2-git-send-email-vgarodia@codeaurora.org> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 17 May 04:32 PDT 2018, Vikash Garodia wrote: > In order to invoke scm calls, ensure that the platform > has the required support to invoke the scm calls in > secure world. > > Signed-off-by: Vikash Garodia > --- > drivers/soc/qcom/mdt_loader.c | 21 +++++++++++++-------- > 1 file changed, 13 insertions(+), 8 deletions(-) > > diff --git a/drivers/soc/qcom/mdt_loader.c b/drivers/soc/qcom/mdt_loader.c > index 17b314d..db55d53 100644 > --- a/drivers/soc/qcom/mdt_loader.c > +++ b/drivers/soc/qcom/mdt_loader.c > @@ -121,10 +121,12 @@ int qcom_mdt_load(struct device *dev, const struct firmware *fw, > if (!fw_name) > return -ENOMEM; > > - ret = qcom_scm_pas_init_image(pas_id, fw->data, fw->size); > - if (ret) { > - dev_err(dev, "invalid firmware metadata\n"); > - goto out; > + if (qcom_scm_is_available()) { qcom_scm_is_available() tells you if the qcom_scm driver has been probed, not if your platform implements PAS. Please add a DT property to tell the driver if it should require PAS or not (the absence of such property should indicate PAS is required, for backwards compatibility purposes). For the MDT loader we need to merge the following patch to make this work: https://patchwork.kernel.org/patch/10397889/ Regards, Bjorn