Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3505671rwb; Tue, 20 Sep 2022 00:06:06 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6Bhs/8WeaUxYM6Yo+UZTcXyunW0W0j+jTPkL/imQ773XYaJl+32Qj/0qWMvl81FGpOUOXT X-Received: by 2002:a17:902:e889:b0:178:2d4f:171f with SMTP id w9-20020a170902e88900b001782d4f171fmr3561364plg.51.1663657566609; Tue, 20 Sep 2022 00:06:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663657566; cv=none; d=google.com; s=arc-20160816; b=PuIuZG+4R/sBvmXLG2p8jFF1+00B5rQXv71kedR5C4Vc4DKEFcAPrsF4Sqj1yNwemk gDR51+ZEBuxQO1WltpFFOz37qvQOvcSuqHYSHa3kmTFeJWjkibUj28GOTh5QSgQLhi5f vW8gqs+OxjwgScrAZ8GoPgM3o9uKJSG52+UWqXwDpYsccp5Y4zi9nKbXzehGfopkv/yG C56inoahW0e2IV4pAnAy6xi7o634f4bwe9b/NcH8f8EnZLn/vmrMWT8r4LWHRLh7JvL9 02XDC3Hs/p0lu5gp5FRNLFFiX53ZUiHaQ04FaIFkc0clpE3I/aaBN0ZkBmQbfZybW32F xQ7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=P3ipnGQPJBSwIuatx0lgGwk2Nb3vQGzmYftoKwSjTkA=; b=vXnKh/nsuTBcMmRyhkYU/sFhTs89hrJVf+VCaVt5fPEW3KBGQ4azFKH6WDMTMO6La9 pByfvSXTi2gSSHve2t/tKM5CsS/8stcLse+FqY2W7trIobfEebnzTDe9RfnpfHgs5Brq 45KaklkfsFAZPKG1BPaX1oa0lNQ8wDDXWjs7SyXWv3K6BlVSfqTljVWKCWgv4YfYrMIc 9e28y2eXUBeHmXCRRt6Js/ks8CfGcYkrkeiBsk+SdD9Rv++1sq3wekWrxgv08bHinPPS 0IaRPsEBRWdu3PPEh07LThhB9nghkQ+4Rj7k9xDM2OrblgdQpx0JcOSBVpaCucsmz2fg ym/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=lwoyDdiV; 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=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x6-20020a17090a8a8600b00200bbb9027asi13327046pjn.77.2022.09.20.00.05.55; Tue, 20 Sep 2022 00:06:06 -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=@quicinc.com header.s=qcppdkim1 header.b=lwoyDdiV; 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=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231127AbiITGcS (ORCPT + 99 others); Tue, 20 Sep 2022 02:32:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230464AbiITGbP (ORCPT ); Tue, 20 Sep 2022 02:31:15 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE7335E54D; Mon, 19 Sep 2022 23:30:59 -0700 (PDT) Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 28K6DYP4025283; Tue, 20 Sep 2022 06:30:16 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=qcppdkim1; bh=P3ipnGQPJBSwIuatx0lgGwk2Nb3vQGzmYftoKwSjTkA=; b=lwoyDdiVNFGFNBGRdH/KTiFtD6t5SUfaixgjWiuhGOCwwtWIspmYpSKe+w0Wdy+6bt+v 3DdQBhB9+dAcmxlX9HnHFnr1S3GwpA+qHTL2+PtZ/oaBVNynjmBqeHNlxyzhHjob5IH5 lcmcJ7kIPIo5dFi5Ak3x3leux+sGKvCIyF3D2iZh/iYgYAXSEKfLOGH9BhEdrbKHxu+v 0m2tndO+7FVtlta9508DvPhJWPAFEcQKj0lpIb6uCwCyfsXbTs/ZWG/Y6gA2G4Pek/7R BWKvrrkQIscu2BlZfsiInYRZUK741qmWrvpFBN9FYxzqHqm/eA78sVBOs+V/IXCOwZGe cQ== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3jq04y18ux-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 20 Sep 2022 06:30:16 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 28K6UFPP000674 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 20 Sep 2022 06:30:15 GMT Received: from hu-srivasam-hyd.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Mon, 19 Sep 2022 23:30:10 -0700 From: Srinivasa Rao Mandadapu To: , , , , , , , , , , , , , , , , CC: Srinivasa Rao Mandadapu Subject: [PATCH v7 6/8] remoteproc: qcom: Add efuse evb selection control Date: Tue, 20 Sep 2022 11:59:17 +0530 Message-ID: <1663655359-1402-7-git-send-email-quic_srivasam@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1663655359-1402-1-git-send-email-quic_srivasam@quicinc.com> References: <1663655359-1402-1-git-send-email-quic_srivasam@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: ow3yE30F1gOBAadU4cUAzaXewi2Siarn X-Proofpoint-GUID: ow3yE30F1gOBAadU4cUAzaXewi2Siarn X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-20_02,2022-09-16_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 priorityscore=1501 spamscore=0 clxscore=1015 mlxscore=0 malwarescore=0 bulkscore=0 phishscore=0 impostorscore=0 mlxlogscore=995 adultscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2209200039 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS autolearn=ham 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 Add efuse evb selection control and enable it for starting ADSP. Signed-off-by: Srinivasa Rao Mandadapu Reviewed-by: Stephen Boyd Reviewed-by: Sibi Sankar --- Changes since V5: -- Split devm_platform_ioremap_resource_byname function. drivers/remoteproc/qcom_q6v5_adsp.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/remoteproc/qcom_q6v5_adsp.c b/drivers/remoteproc/qcom_q6v5_adsp.c index 80c8169..e463fbc 100644 --- a/drivers/remoteproc/qcom_q6v5_adsp.c +++ b/drivers/remoteproc/qcom_q6v5_adsp.c @@ -56,6 +56,7 @@ #define LPASS_BOOT_CORE_START BIT(0) #define LPASS_BOOT_CMD_START BIT(0) +#define LPASS_EFUSE_Q6SS_EVB_SEL 0x0 struct adsp_pil_data { int crash_reason_smem; @@ -86,6 +87,7 @@ struct qcom_adsp { struct clk_bulk_data *clks; void __iomem *qdsp6ss_base; + void __iomem *lpass_efuse; struct reset_control *pdc_sync_reset; struct reset_control *restart; @@ -368,6 +370,9 @@ static int adsp_start(struct rproc *rproc) /* Program boot address */ writel(adsp->mem_phys >> 4, adsp->qdsp6ss_base + RST_EVB_REG); + if (adsp->lpass_efuse) + writel(LPASS_EFUSE_Q6SS_EVB_SEL, adsp->lpass_efuse); + /* De-assert QDSP6 stop core. QDSP6 will execute after out of reset */ writel(LPASS_BOOT_CORE_START, adsp->qdsp6ss_base + CORE_START_REG); @@ -534,6 +539,7 @@ static int adsp_init_reset(struct qcom_adsp *adsp) static int adsp_init_mmio(struct qcom_adsp *adsp, struct platform_device *pdev) { + struct resource *efuse_region; struct device_node *syscon; int ret; @@ -543,6 +549,17 @@ static int adsp_init_mmio(struct qcom_adsp *adsp, return PTR_ERR(adsp->qdsp6ss_base); } + efuse_region = platform_get_resource(pdev, IORESOURCE_MEM, 1); + if (!efuse_region) { + adsp->lpass_efuse = NULL; + dev_dbg(adsp->dev, "failed to get efuse memory region\n"); + } else { + adsp->lpass_efuse = devm_ioremap_resource(&pdev->dev, efuse_region); + if (IS_ERR(adsp->lpass_efuse)) { + dev_err(adsp->dev, "failed to map efuse registers\n"); + return PTR_ERR(adsp->lpass_efuse); + } + } syscon = of_parse_phandle(pdev->dev.of_node, "qcom,halt-regs", 0); if (!syscon) { dev_err(&pdev->dev, "failed to parse qcom,halt-regs\n"); -- 2.7.4