Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1053530rwb; Tue, 27 Sep 2022 07:53:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6Xy0UHNlKvrkwCg1pv73BSOGx6DNzUWyg3lO9Hhu0hxWUOMr+cTflBBy9k43L83j7dQmYV X-Received: by 2002:a17:907:2ccb:b0:77b:bdab:674a with SMTP id hg11-20020a1709072ccb00b0077bbdab674amr23257366ejc.241.1664290412475; Tue, 27 Sep 2022 07:53:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664290412; cv=none; d=google.com; s=arc-20160816; b=FfBC1zjl5lM6FuPRm2XokYS0nSP0urFYGPZqUKDVJ+w4GZFzmLZLnCQzVeNbvBpWvA We+yjkJ3SPBeCbHR+z2SkeD8qozG8uGI/UUloqlPXORPqrK+kYmFKj7vtmb73Vfr3FOo ZxE0ukb4QwhMlije0H/vIsFrPjZGK+UtF9e9mqbwliyL8+AXE8dB3BDLMsjkuIBVWz/u mgiXqkPU7Y6HWTycNTvwA+L8+Vi01Ek3x6HmXvi6DYBLMYmEoJ7hswIy2dIygTtSHrTr /a1rcMzUi3YOd/FcOG5Md9XdPhYOURCvV9sAERMXm2YmLpLa8WyAEyHDJtT2Eu2oNutU 7D/A== 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=7P8YZT3yaphJR4nO+RCpzKLfnxm9vhCYa0LPqa3e1og=; b=yXjgduD6DR9AOdaGICgHvOs2IxFUyb4d/w9SBzKF9nIDGI9K80AOYiepFREnfxqrc0 +xDXyq+cgcQc4jDDT0FYNbrXFEPxlT2Ggsrf+8GRg9ZsTqwvi1tXheXhLP2E+RaYDTyc bmlpNm35YVSYiFb24b4vRlB8U07twpjRKh93BntVsf+FBNBRcADoL5MSsv00thZxZydf CyMmNPB4NDxmU8WseaAsjTV7JNps4DiZka5N4t7byNKU1npYu2aGPoEYzgS/839CDCAI FnV0YbuJIQAjRPSmaAHyTZhpMEt0Y1vZiHWxVkb8S/tEbETfutdTPx/vVa1sMxQiL66+ WN+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=oZu3eUNQ; 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 gb27-20020a170907961b00b00730ac298aa9si1672970ejc.783.2022.09.27.07.53.06; Tue, 27 Sep 2022 07:53:32 -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=oZu3eUNQ; 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 S232654AbiI0N6r (ORCPT + 99 others); Tue, 27 Sep 2022 09:58:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232940AbiI0N6M (ORCPT ); Tue, 27 Sep 2022 09:58:12 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92D4715E457; Tue, 27 Sep 2022 06:58:00 -0700 (PDT) Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 28RDcoax015161; Tue, 27 Sep 2022 13:57:49 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=7P8YZT3yaphJR4nO+RCpzKLfnxm9vhCYa0LPqa3e1og=; b=oZu3eUNQG2X7sTW9jSmrzXIAjlee53+szTqYdH9KRBvlwQgjcGg+H6H+qYTHYj4qnWBh tERoJR24+K2fTKO3zRDXMjvt8d0R5bavtKlQ1OKwnKGA1iiC6AsJI/WdeBaD9NW+bFrv +rt2I1IoV0uOJvV9lC7+6FXm/YHqep+SFhupvX82yOhg+ryGJM29IHRyWAPzh85iym0u +MZyndMpPcLHnVQIzE//jFTeFdCK46+cma35c0MVwVk/kChdld0X1LjczlnBJ8lDckX+ dpCckcpB+4HEwKQEmOIwN5PNLYvAOQ50aHXlOUkgjMmzGElhdkuAj0KPnGst4YUFLz8N +A== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3jv28a036h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 27 Sep 2022 13:57:48 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 28RDvmWt000482 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 27 Sep 2022 13:57:48 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; Tue, 27 Sep 2022 06:57:42 -0700 From: Srinivasa Rao Mandadapu To: , , , , , , , , , , , , , , , , , CC: Srinivasa Rao Mandadapu Subject: [PATCH v9 6/7] remoteproc: qcom: Add efuse evb selection control Date: Tue, 27 Sep 2022 19:26:42 +0530 Message-ID: <1664287003-31450-7-git-send-email-quic_srivasam@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1664287003-31450-1-git-send-email-quic_srivasam@quicinc.com> References: <1664287003-31450-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: nasanex01a.na.qualcomm.com (10.52.223.231) 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: xBrENL6GrETYGtLP35CH8WMpJV34QxyM X-Proofpoint-GUID: xBrENL6GrETYGtLP35CH8WMpJV34QxyM 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-27_05,2022-09-27_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 impostorscore=0 suspectscore=0 spamscore=0 mlxscore=0 lowpriorityscore=0 mlxlogscore=996 priorityscore=1501 malwarescore=0 clxscore=1015 adultscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2209270085 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 14c94af..4e70e76 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; @@ -367,6 +369,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); @@ -533,6 +538,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; @@ -542,6 +548,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