Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp272549imm; Tue, 15 May 2018 01:14:17 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqO/hcVKiAG9Ltggxq0Pn0W3h3+8bNyArsdliyS+7vX5JFtFqmH1AlnaZsNXmFsETbcsbHO X-Received: by 2002:a62:f24a:: with SMTP id y10-v6mr14103849pfl.75.1526372057396; Tue, 15 May 2018 01:14:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526372057; cv=none; d=google.com; s=arc-20160816; b=XBa6uJ9+vHc0ffsEec4c6LUzUxlA3nF/7E4dDnBQUt5eDNnKdeFrXwdxDlHk1oL6g4 tO6UMGMCWIHnMtJIT4yCWDwA/LZJwRgoRTriV1ZQON8/PDks1IRyOeKL+s0Rd34PXXQR i2l0yPo5CqPx12A+xCgLGmjC5ZBMSo/MTpZ53Xl6gP1VSKEZvPTgSMnRXtJDI84XQlTB gDNPUUxW2yd/PE8e5TE+nXKTdXX3sVCYekbKTOJIlkKxH5+c0MgDpfCFYIY0K89yUpz2 huhTUitqTfwwzvqLNAzxXqOc+cXMfBUhwyVEwmtC/f92IXhXRLKmd+g/KqI8iRJcsQ/J htKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=zuQ1SjEcsKyg6eckkbc65vVKHJNFHgpP18aBxBMCet0=; b=nw7wZXxzk8QVyV93+sbEv/VFpag+iPUiPHOfMiBZ38Hi3hlLcMeA/wWUpkijnTqoif +FIOuhmx7JIBofTS6P+OdCUCjmqDE+xWh4EmWDr+V6uUkEoZCqlpedG39LzZ41pn0c5P xB4kpaXYk/UsoG7zsk2j97U22izZnPLi/O7FRaa6qDq19hIb9eAL8dpyaO+0gIpybgds 04Br+eizNSxfZuuuCmIPxcEk5yK0HIzlazvb3M6Akat2Ps9NwL4ezpBTkROWRNelpJks YoEfBw5a2I00ISMQcwl5ZGlxX1RjeISCBlLUvBFgiKOTPXH4CcXoKRVNG8h/ltl97ucm Vf8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BUraEchV; 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 r6-v6si11673297pfi.147.2018.05.15.01.14.03; Tue, 15 May 2018 01:14: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=BUraEchV; 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 S1752574AbeEOIMQ (ORCPT + 99 others); Tue, 15 May 2018 04:12:16 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:35031 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752506AbeEOH7g (ORCPT ); Tue, 15 May 2018 03:59:36 -0400 Received: by mail-wm0-f66.google.com with SMTP id o78-v6so19723294wmg.0 for ; Tue, 15 May 2018 00:59:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=zuQ1SjEcsKyg6eckkbc65vVKHJNFHgpP18aBxBMCet0=; b=BUraEchVvckvYps8Tg8xqmU4mz0xhWovqODgLrZdUjz/sddwuF3mEGfIKwRlYK8iXw XueQ33HoSsI3VXM1c4ue9Cb3pQjGiHKJJyR6Pw5ZTlKKeJ1uucZvwxSosmDa+ao0eNOc th4w7B++JW+OzYGxzEQWZFV3Cp7BLvFyQUzK8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=zuQ1SjEcsKyg6eckkbc65vVKHJNFHgpP18aBxBMCet0=; b=p0RiMew+ojzqySZ3yApo7cdspfy0ufTVeTUjolGKyo/Z/7mmbhxpYsZZwijOUvCLnb EcxAY0KeOHsn9ffjrnjV2+hKl+iF7e/tljYsg4ThAPwSAP4UZOHy1RGex+Hmta5WrnUW uKDVWQllUFm2PjNGbmnboa0wi0THmtJ+4tO+O9vGzNFEVYFCHxaA4kvGDZPKuOgy55kf 2WiHq8hAqw4FqH74RF5r0PkhlJXSle/cM2w6xu8YgBcSNpgdAaE7BRflNs3bRCW/YGOc N9AVm7SY0HGDHZSXCkB2SuQq7Q2E8aDbEHIs/t1p6HA+yKZOqn1Bb69gfrePM5xUoby3 8y8w== X-Gm-Message-State: ALKqPwdiPFIBwlynexRsIQJzVbm3ckNGHyjo0O6snmRlhCxLvBYNpQNd +2Fp7SitTzJVRFhhhWsRmjOm8w== X-Received: by 2002:a1c:a750:: with SMTP id q77-v6mr6885237wme.111.1526371174839; Tue, 15 May 2018 00:59:34 -0700 (PDT) Received: from mms-0440.qualcomm.mm-sol.com ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id 4-v6sm10918510wmg.40.2018.05.15.00.59.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 May 2018 00:59:34 -0700 (PDT) From: Stanimir Varbanov To: Mauro Carvalho Chehab , Hans Verkuil Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Vikash Garodia , Stanimir Varbanov Subject: [PATCH v2 07/29] venus: hfi_venus: add halt AXI support for Venus 4xx Date: Tue, 15 May 2018 10:58:37 +0300 Message-Id: <20180515075859.17217-8-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180515075859.17217-1-stanimir.varbanov@linaro.org> References: <20180515075859.17217-1-stanimir.varbanov@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add AXI halt support for version 4xx by using venus wrapper registers. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/hfi_venus.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/media/platform/qcom/venus/hfi_venus.c b/drivers/media/platform/qcom/venus/hfi_venus.c index 734ce11b0ed0..53546174aab8 100644 --- a/drivers/media/platform/qcom/venus/hfi_venus.c +++ b/drivers/media/platform/qcom/venus/hfi_venus.c @@ -532,6 +532,23 @@ static int venus_halt_axi(struct venus_hfi_device *hdev) u32 val; int ret; + if (hdev->core->res->hfi_version == HFI_VERSION_4XX) { + val = venus_readl(hdev, WRAPPER_CPU_AXI_HALT); + val |= BIT(16); + venus_writel(hdev, WRAPPER_CPU_AXI_HALT, val); + + ret = readl_poll_timeout(base + WRAPPER_CPU_AXI_HALT_STATUS, + val, val & BIT(24), + POLL_INTERVAL_US, + VBIF_AXI_HALT_ACK_TIMEOUT_US); + if (ret) { + dev_err(dev, "AXI bus port halt timeout\n"); + return ret; + } + + return 0; + } + /* Halt AXI and AXI IMEM VBIF Access */ val = venus_readl(hdev, VBIF_AXI_HALT_CTRL0); val |= VBIF_AXI_HALT_CTRL0_HALT_REQ; -- 2.14.1