From patchwork Thu May 18 13:59:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Marko X-Patchwork-Id: 95921 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp543595vqo; Thu, 18 May 2023 07:40:25 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ58Pequ40cE+R2poBAEqz73tddqzfaoHjKIXULKzcEF45v+IyhHCmKtQNOB8MX/zSVC1O87 X-Received: by 2002:a05:6a21:3a86:b0:ff:b564:c532 with SMTP id zv6-20020a056a213a8600b000ffb564c532mr2524129pzb.43.1684420825558; Thu, 18 May 2023 07:40:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684420825; cv=none; d=google.com; s=arc-20160816; b=Z2ePxdThlrNXzX/v2OjuSvumAkrMHoalWazmJVYIk02uY5NerXoAjjlxw2Yr9r4iQT gB2lHpKey+ertXTMEyjlWJj6AL0Dra1lYTNgIU8Zdz09LujU20q2wBawdLpbU40OwgEY mXrRD47tur7uXT1SbamsbyX6wgOw9cm071hz1hYgp1dh3x4+FyWNMCvPD0laSFT99G3x +tcR726w/UnPyw1E6freEk8lUBAaNTZwugdqM9ATfaowjOU63DupXh3couiLxNErPwEB g4XG1dwUxyisLO4usE3z8PiL8jiacz7lROfrUbgD3S9/r6qKQ/2aP737e/fCR7FG4brF tm8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Y2Hw87l7Ts/Jxr3HsiObApCTHPM3x3z16x4yMMIWg7U=; b=IUNF9x6fahqMcnGzahDYoHmbaKzNzzK1RdWuPOLAK0qdloi9icRGhb0HIeWqnuYjaL zVMQbbWSoCcyFGI4sYQA9u7mXHijNMPwj36aJwhdclDm252k5wjickxI7245mqC6lm0p HDgDMRUj1AK/WIAPixgmFa4E6LPLPxdMF6/x7c0mwh1ygfYqNAo0xfbdtTZTfzdUEtpt AqoQf0mVJsM7xFrAMyhzCUdIg3NwT8hv7J6SLCw1klEvQbGFy636DK0nkRReYGWZQZ3A 5QaTP97W1IP4bPqIBVak9haNYBMk1AS6rbawou7XeGtvo+Y0yv+IVMOmfBMhdeBfswde Rm6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=ha+I138R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y2-20020aa793c2000000b0063d289b8d47si1748883pff.126.2023.05.18.07.40.12; Thu, 18 May 2023 07:40:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=ha+I138R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231483AbjERN77 (ORCPT + 99 others); Thu, 18 May 2023 09:59:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231183AbjERN7y (ORCPT ); Thu, 18 May 2023 09:59:54 -0400 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E5D0E5C; Thu, 18 May 2023 06:59:53 -0700 (PDT) Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-965ab8ed1fcso370060166b.2; Thu, 18 May 2023 06:59:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684418392; x=1687010392; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Y2Hw87l7Ts/Jxr3HsiObApCTHPM3x3z16x4yMMIWg7U=; b=ha+I138R37UHZdgIlxPcdThYdbs6YEMmtrfjUKYO4mEEWUIkxEbBvhIlitda1qGTR8 DFPeF3QECr8G62AP0XOTaasC52PsLKCsNqCJpzibJZMUk+BwHQkVabqxN/3/w9gFvEzu A+bxxU25eSDFaFCDyTUmcLi5ZZ+YE5DcKw41oNAF0+SiB/e+7HNQE2JY6fmrrfFag+s8 xJeaNkVsabjcepOGAa+X2y2W2eB4X+rhqDL4Yp94CzGB4rFYWhDyuK5E5mWOJdDOyXjp 6EToNJtjkC7rVOX2l1rdFMGCwhwg0gtko5RXiwb3lEPcIw8E/mmZJnKQft8CYzQ4+6kR 8kdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684418392; x=1687010392; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Y2Hw87l7Ts/Jxr3HsiObApCTHPM3x3z16x4yMMIWg7U=; b=fJPr/19hvuCvC1vP/a2pa1wNeBiqMisMbvx81GSGa0v4NYvZ6CCI6KWnYbu9NFmpam 1gfxNmYtOBVXj209rJ14g4FoIRM3VAie7P+fWruELjpNMCHMkAt6+yFIZ9/V6LbGFejJ TLowF+g/xnyepEoh/H5Ukuk/qEmbsESyHTpANOqoXLOzoSu5d9p7hmVNGhAmPfH37TgG LTFCzUchjiUu0hRUrraq9xYPeRR+kOFhzw5hztbrFo/Ae6uLNildzvfh7tPkqBVL4f8i qaOFvC6UFeTczSBAd6MfgcL9dzw9n/fsyCcID0ocoGGOGthIgUPMFJMik3RY0pAEOlD3 b8Rg== X-Gm-Message-State: AC+VfDxwT8EipsX15qQEqvskHYV1XzhOKCaVwlzfGF7jgbnz8V60mIBQ V6SbmGN9xmzHXhYCDJwp+2k= X-Received: by 2002:a17:907:8a14:b0:8ae:11ca:81de with SMTP id sc20-20020a1709078a1400b008ae11ca81demr38023635ejc.34.1684418391309; Thu, 18 May 2023 06:59:51 -0700 (PDT) Received: from fedora.. (cpezg-94-253-130-143-cbl.xnet.hr. [94.253.130.143]) by smtp.googlemail.com with ESMTPSA id t28-20020a50d71c000000b0050d89daaa70sm669003edi.2.2023.05.18.06.59.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 06:59:50 -0700 (PDT) From: Robert Marko To: agross@kernel.org, andersson@kernel.orgm, konrad.dybcio@linaro.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, quic_srichara@quicinc.com Cc: Robert Marko Subject: [PATCH 2/2] firmware: qcom: scm: disable SDI on IPQ5018 Date: Thu, 18 May 2023 15:59:45 +0200 Message-Id: <20230518135945.2248451-2-robimarko@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230518135945.2248451-1-robimarko@gmail.com> References: <20230518135945.2248451-1-robimarko@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SORTED_RECIPS,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766243251108068903?= X-GMAIL-MSGID: =?utf-8?q?1766243251108068903?= IPQ5018 seems to have SDI (Secure Debug Image) enabled by default which prevents normal reboot from working causing the board to just hang after reboot is called. So, let disable SDI during SCM probe for IPQ5018. Signed-off-by: Robert Marko --- drivers/firmware/qcom_scm.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/firmware/qcom_scm.c b/drivers/firmware/qcom_scm.c index bdc9324d4e62..c6a38ce49fb0 100644 --- a/drivers/firmware/qcom_scm.c +++ b/drivers/firmware/qcom_scm.c @@ -1525,6 +1525,14 @@ static int qcom_scm_probe(struct platform_device *pdev) if (download_mode) qcom_scm_set_download_mode(true); + /* IPQ5018 seems to have SDI (Secure Debug Image) enabled by default + * which will prevent normal reboot causing the board to hang after + * making the reboot call. + * So, make a call to SCM to disable SDI. + */ + if (of_machine_is_compatible("qcom,ipq5018")) + qcom_scm_disable_sdi(); + return 0; }