Received: by 10.192.165.148 with SMTP id m20csp4733679imm; Tue, 24 Apr 2018 07:35:48 -0700 (PDT) X-Google-Smtp-Source: AIpwx48dskow9sh37W034xEmuE/0sXfANmMeaViQKkGwOj7KpNm/E+W5n3xbue/MxgiD9Wzar5HQ X-Received: by 2002:a17:902:595e:: with SMTP id e30-v6mr25075233plj.233.1524580548148; Tue, 24 Apr 2018 07:35:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524580548; cv=none; d=google.com; s=arc-20160816; b=xrUToZiBYXp5T3mfp++mfvR79D7t9oB/AlP5brMOvjeItYIkOfI4cNHZ1UXthLazW0 WMWQAhXGNM//bAeV/xeDzy0ZbJ2PA9c/7YJUVimDX/oZ7WUb9O45OM8TXOGx77Jn784r fuREwhq4BQIhZnOIZc3qi5FrNh5XR7B02iyXQiMuvzqmG9C84jjHXXte/UimChJ9vx5i RM3prPTCVA8+5MEche9CgxgdXRmSq4uUiF1L+zjT4obvrYt1NJBz+BrAY3nMR3qOVRJN oYtwaCYX3dM4mWHylBtWY+wFkcW1sTDpIyyHcmu7k4CG72y23e4nCcw5hPZerdV0hM9j 4NuA== 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=f7yDqBeSHJEzcRxduEO+5lhuJzJI036MDpdH2NPvmrdgwo3qikdKUnF0E/k0iKcsbf pv7zihEYEStVRoqUYS1PNoaHBtAcGKDpFSsHWqQiCrrk0sytVE5Rpvp+e2uKYcGvYv4Y S7TONwCAgCMhyfxkeZX/opovSuTkAx1IaekeHbmYMTrDzD9gZ5EHjIZLrlnHeBVMwH7n qIh3FrGAD/y9iijmah0ixzqi6MThUfxYNNbtZ6jbPV54bA4b0OVdfUcXVoV+g/R3ubqX /Ezo/xXFgKHtE/JRC/Tjb4ODYrtDy8KqGUkFaDI4OJHD4nNWMV64ev7hpIIW8DJ3y33H ZbXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PR96pTEl; 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 n14si11788243pgc.366.2018.04.24.07.35.33; Tue, 24 Apr 2018 07:35:48 -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=PR96pTEl; 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 S933301AbeDXMym (ORCPT + 99 others); Tue, 24 Apr 2018 08:54:42 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:55517 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757814AbeDXMpP (ORCPT ); Tue, 24 Apr 2018 08:45:15 -0400 Received: by mail-wm0-f67.google.com with SMTP id a8so693267wmg.5 for ; Tue, 24 Apr 2018 05:45:15 -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=PR96pTEltpOFNciZ7IMovpepBv0egzcSmsrT5Lx+yxB9Jhzw23XLv5195utHOLpxAs Mc0QGBXlpvRCPogNmuT5Ga9T5xG4VcjrEjaXWDvhhQelW1b+jl5cGdmUYn1dp/wUPR+K bB5HTcGhD3xEtN3aO5sXx+83I+IufUBLpQ7A0= 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=pfx0MWIj+YMlYFPv/xamcywVzhaW9ObKZmK41TCqVifz5M2K1CuHF3E8biteHosZ/6 ru6LQHmCtXIHW+SHCsPd7o+39pDilsS9tPzTj6XI1WyCDMbMNrOpCkTdLbYOfHfXiQDj r2ODq3mkPbSz2nLYBBz/KXlmayNhxHzJnM2sR8OawH6Cbgf8U1EKAhOu6uFbHhSzl1pO zlbyfDMmMAYkZ6biHjaAIs23VBjw8VkWDgmOrasL/YRYR34OhhR4g9AputFnRGvyfzqw lU7BLHutF6+kL+zy3Z8y9+OvF4keAK+7PFmDBtpK3iVVocXLlt1sbCGQ8+NRsrS/VRtU dIzg== X-Gm-Message-State: ALQs6tCnQ3lAqVu1k5/W7I49Af2XuWrNxfBzyJviG6cbxwVo6VVoTr0U 8+BSDbMxA+wJgsnH5uTwbADS5g== X-Received: by 10.28.91.209 with SMTP id p200mr11518923wmb.11.1524573914620; Tue, 24 Apr 2018 05:45:14 -0700 (PDT) Received: from localhost.localdomain ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id n49-v6sm22666013wrn.50.2018.04.24.05.45.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 05:45:14 -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 07/28] venus: hfi_venus: add halt AXI support for Venus 4xx Date: Tue, 24 Apr 2018 15:44:15 +0300 Message-Id: <20180424124436.26955-8-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180424124436.26955-1-stanimir.varbanov@linaro.org> References: <20180424124436.26955-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