From patchwork Thu Apr 2 13:47:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Edgar E. Iglesias" X-Patchwork-Id: 11470801 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 79E7515AB for ; Thu, 2 Apr 2020 13:49:14 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4FD3B2072E for ; Thu, 2 Apr 2020 13:49:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Qm+SzTwP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4FD3B2072E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:40310 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jK0DZ-0002ZN-H6 for patchwork-qemu-devel@patchwork.kernel.org; Thu, 02 Apr 2020 09:49:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50685) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jK0Ai-0006OY-FR for qemu-devel@nongnu.org; Thu, 02 Apr 2020 09:46:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jK0Ah-0001sD-Bx for qemu-devel@nongnu.org; Thu, 02 Apr 2020 09:46:16 -0400 Received: from mail-lf1-x142.google.com ([2a00:1450:4864:20::142]:39278) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jK0Ah-0001oj-4e; Thu, 02 Apr 2020 09:46:15 -0400 Received: by mail-lf1-x142.google.com with SMTP id h6so2765409lfp.6; Thu, 02 Apr 2020 06:46:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=h4Q7MSpHXVMJ49cK44wbGbgCP5J9MGmDVmW1uuYRWUs=; b=Qm+SzTwPSelbgQGrPXZ0eRecqfbd6cMSBxsf+s198QHT+gl8uK1hQQlDnIfTa/OyOY yOx6T2K49fZbybzn1i0iDKyxwfaEq4J6/n93gtIO+PerrYZrhvRQaNP4D/Q/tD9MchZ3 +UO6r94GyrcM0AXr8PHLdeuSldt9NI2bUZ8Y6IBC/EIrSDhRYaKar8EHbAON4zkvQKIB VfRpqkMsW11mpwxJ8dZU5B7i6TkbSCPn4CqZ71QGSBO5n4z0Atd/Po2j4XuSeEy8Ixl0 6NxV3SrMtzoXJaAVahYnp8zTpMyOKnIYkJugOPZJRnmwGRmt+i5kuGHcKvnuJftVd4ma ou7w== 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:mime-version:content-transfer-encoding; bh=h4Q7MSpHXVMJ49cK44wbGbgCP5J9MGmDVmW1uuYRWUs=; b=gSEkghOm7G+wwSl6GEA+8Fs0JOBo3WzB0zLrGhwNUmCMif+1JemLKGWTNNLiNSaJKM U86B/4sYqJ3fLt/L5c1a7Z9vwcUdBCPwUs+Z7uLAnRYx8XL4zGZZB4YAIixiXUzCpic6 2EjG2AnzVO2+h62t7YhuYO708loqI0z3IKGkKko4WWLrKS443wlpB9EmtRNFPRXVuhNY Pdltd/FYH9yhlXTvtLuvLvWPFuwVNQkZXDeh35WASDAMZHq7JLY1dz1VPqFRr1ZE3ua1 qnLHDkBDz1K7k6GVzV2t9UnkvXhGTqUGcxRiVLv0ohBZ+2cQVG03ImEaTdG1B0W1BJFA R7wg== X-Gm-Message-State: AGi0PubE3J/cBo8mGPI9kbS0KrPGw2ouqOB1FD3m5A0wDDwS1K9utacT Fh7MW0GmeatOF1ZZfP8M8LdyYoJPHhMuSw== X-Google-Smtp-Source: APiQypJkOFn70kEGDneFetAwp5e+JQMjtiQRNcEuBF0dQhYCga23iQI1oVdZBOdNOyBcWjzAhck2Dg== X-Received: by 2002:a19:5519:: with SMTP id n25mr2280129lfe.198.1585835173457; Thu, 02 Apr 2020 06:46:13 -0700 (PDT) Received: from localhost (81-231-232-130-no39.tbcn.telia.com. [81.231.232.130]) by smtp.gmail.com with ESMTPSA id e1sm3202774ljo.16.2020.04.02.06.46.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2020 06:46:12 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org Subject: [PATCH v1 1/5] dma/xlnx-zdma: Remove comment Date: Thu, 2 Apr 2020 15:47:17 +0200 Message-Id: <20200402134721.27863-2-edgar.iglesias@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200402134721.27863-1-edgar.iglesias@gmail.com> References: <20200402134721.27863-1-edgar.iglesias@gmail.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::142 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: figlesia@xilinx.com, peter.maydell@linaro.org, sstabellini@kernel.org, edgar.iglesias@xilinx.com, sai.pavan.boddu@xilinx.com, frasse.iglesias@gmail.com, alistair@alistair23.me, richard.henderson@linaro.org, frederic.konrad@adacore.com, qemu-arm@nongnu.org, philmd@redhat.com, luc.michel@greensocs.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: "Edgar E. Iglesias" Remove comment. Signed-off-by: Edgar E. Iglesias Reviewed-by: Alistair Francis Reviewed-by: Francisco Iglesias --- hw/dma/xlnx-zdma.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/dma/xlnx-zdma.c b/hw/dma/xlnx-zdma.c index 2d9c0a0d5e..a6c5b2304a 100644 --- a/hw/dma/xlnx-zdma.c +++ b/hw/dma/xlnx-zdma.c @@ -511,7 +511,6 @@ static void zdma_process_descr(XlnxZDMA *s) zdma_src_done(s); } - /* Load next descriptor. */ if (ptype == PT_REG || src_cmd == CMD_STOP) { ARRAY_FIELD_DP32(s->regs, ZDMA_CH_CTRL2, EN, 0); zdma_set_state(s, DISABLED); From patchwork Thu Apr 2 13:47:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Edgar E. Iglesias" X-Patchwork-Id: 11470797 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BBC18159A for ; Thu, 2 Apr 2020 13:47:43 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 91AB32072E for ; Thu, 2 Apr 2020 13:47:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WjCme009" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 91AB32072E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:40284 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jK0C6-00088v-Ka for patchwork-qemu-devel@patchwork.kernel.org; Thu, 02 Apr 2020 09:47:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50711) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jK0Aj-0006Pq-IY for qemu-devel@nongnu.org; Thu, 02 Apr 2020 09:46:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jK0Ai-0001w1-GH for qemu-devel@nongnu.org; Thu, 02 Apr 2020 09:46:17 -0400 Received: from mail-lj1-x244.google.com ([2a00:1450:4864:20::244]:43517) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jK0Ai-0001sT-8t; Thu, 02 Apr 2020 09:46:16 -0400 Received: by mail-lj1-x244.google.com with SMTP id g27so3245295ljn.10; Thu, 02 Apr 2020 06:46:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Mv581YRzXI92+CyIbMqqG1wv/ClfMBsDNk55giNrpKw=; b=WjCme0091l9eipzU1azBJUlULpVLxN0T8Wwtf/gbFRx29p7sqLQDK8s9lh4m7YLeYA ElwBUaxaAinUDhd2OaKxmvhLqXygTd4Ky6mTdBx7sw5nX5NKXrvrI9KuuM7vDeZG88uH 3cUIFm1AWeX0ssqOGN4Ftl7cAKikWYyZYXwXGpghcPe+dZZm1Cfj3z8maHf8VDCtUeKn hqcjLRHlfoz9YkHvxHrHa6S/wCNBBFDanVkCWKSMKfhFRP2zSCSY4tQ6iBb1bbsSXv1J efRbjSL0ruloKiBfqkIzStHk2uJOR/EdNlDkdkTNaIHX9QrigIuctJQUHUMnoAuoDM0d w0zA== 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:mime-version:content-transfer-encoding; bh=Mv581YRzXI92+CyIbMqqG1wv/ClfMBsDNk55giNrpKw=; b=IuDbB3DHtaBaea6w2IOC0ybRzbai5lqSJ6/hQAiPLR5c/K2QvVJlOQOPmForQFfSDS 30Lsg6wmVZ/GockO9kzoWDSBf5QIIg651Tx5jDvq/XRWPeWQ4TyfWm7tMjRzTxt9/vAJ Gkh6a5+ngS4aFnDcFGDyR01BTvSJthqnYGQxGNde1uwVBRRhd8bvRtKqGedOGAQP03G1 WwXsAslLuG02FEYFH5mooIhL5xCqtC3DwvqXaPDhSUnC4SZkJ9l6IPhSaTT444ENL29a 259XSjQadNnUDvnKugbCWAjO+5P7/dM4JBhhANWr6ZSK7fRqLd8xnvP8wCwZq9+qHcS7 RK/g== X-Gm-Message-State: AGi0PuY5jiIXsveOYJTxksvOvph6TPL+FUzP+gv6qIHrp5ak5cU9392c ozij/Z5wgryjTImIhbdgh08AOEIVJ6vkAQ== X-Google-Smtp-Source: APiQypJfcXUQUmntVUMz9u11hXHyIIRzlXMGPjmHRCHfNZVYTw2Lj6cLu/BkV5UQFPWhEx4prGCBuA== X-Received: by 2002:a2e:6e0f:: with SMTP id j15mr1932963ljc.230.1585835174651; Thu, 02 Apr 2020 06:46:14 -0700 (PDT) Received: from localhost (81-231-232-130-no39.tbcn.telia.com. [81.231.232.130]) by smtp.gmail.com with ESMTPSA id g12sm3612416lfb.66.2020.04.02.06.46.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2020 06:46:14 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org Subject: [PATCH v1 2/5] dma/xlnx-zdma: Populate DBG0.CMN_BUF_FREE Date: Thu, 2 Apr 2020 15:47:18 +0200 Message-Id: <20200402134721.27863-3-edgar.iglesias@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200402134721.27863-1-edgar.iglesias@gmail.com> References: <20200402134721.27863-1-edgar.iglesias@gmail.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::244 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: figlesia@xilinx.com, peter.maydell@linaro.org, sstabellini@kernel.org, edgar.iglesias@xilinx.com, sai.pavan.boddu@xilinx.com, frasse.iglesias@gmail.com, alistair@alistair23.me, richard.henderson@linaro.org, frederic.konrad@adacore.com, qemu-arm@nongnu.org, philmd@redhat.com, luc.michel@greensocs.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: "Edgar E. Iglesias" Populate DBG0.CMN_BUF_FREE so that SW can see some free space. Signed-off-by: Edgar E. Iglesias Reviewed-by: Alistair Francis Reviewed-by: Francisco Iglesias --- hw/dma/xlnx-zdma.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hw/dma/xlnx-zdma.c b/hw/dma/xlnx-zdma.c index a6c5b2304a..6a4699757a 100644 --- a/hw/dma/xlnx-zdma.c +++ b/hw/dma/xlnx-zdma.c @@ -680,6 +680,12 @@ static RegisterAccessInfo zdma_regs_info[] = { },{ .name = "ZDMA_CH_DBG0", .addr = A_ZDMA_CH_DBG0, .rsvd = 0xfffffe00, .ro = 0x1ff, + + /* + * There's SW out there that will check the debug regs for free space. + * Claim that we always have 0x100 free. + */ + .reset = 0x100 },{ .name = "ZDMA_CH_DBG1", .addr = A_ZDMA_CH_DBG1, .rsvd = 0xfffffe00, .ro = 0x1ff, From patchwork Thu Apr 2 13:47:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Edgar E. Iglesias" X-Patchwork-Id: 11470803 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3919C159A for ; Thu, 2 Apr 2020 13:50:12 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0B68F2073B for ; Thu, 2 Apr 2020 13:50:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="IOmR3ADU" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0B68F2073B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:40320 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jK0EV-0003Tp-09 for patchwork-qemu-devel@patchwork.kernel.org; Thu, 02 Apr 2020 09:50:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50737) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jK0Ak-0006Rj-Mz for qemu-devel@nongnu.org; Thu, 02 Apr 2020 09:46:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jK0Aj-0001yh-Px for qemu-devel@nongnu.org; Thu, 02 Apr 2020 09:46:18 -0400 Received: from mail-lj1-x242.google.com ([2a00:1450:4864:20::242]:40080) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jK0Aj-0001wd-It; Thu, 02 Apr 2020 09:46:17 -0400 Received: by mail-lj1-x242.google.com with SMTP id 19so3265684ljj.7; Thu, 02 Apr 2020 06:46:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aG0858uXhmYhe8n44TDMUkVLiuz53/ZFtxLaB/tbPg4=; b=IOmR3ADUmr+8jzCAe+DYZi9aEQv6+t+KFVnhymtLxnC4mLXagSxddBaq/6EC/nY7l3 KhHifSstFQQLQfLcsCJaQH3eXQf/yvnGa3fHb0UkzPb84QEt+2+QrRasE2fRphgmN63r QDDUHKbP77/j85MWog0GY0WDxTv5yNXlct3z7sNsjW2TfcPc3a0VOXYTWF9WfJxmEbnm u20QPmjOHDtswvaMX0hDuKksuk8md0P3Fmoxi2f2qJaIODMscwPn1SqX8ECd7VWQWWrc s50H5/ZL76tLt/jNTBWtnOgUabPfPKn7UeiZs1MMmXakCjePgKJ6hrahfx6M+L11neAK srmw== 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:mime-version:content-transfer-encoding; bh=aG0858uXhmYhe8n44TDMUkVLiuz53/ZFtxLaB/tbPg4=; b=V3H5lHzCp/+l58cORYVIXudbPY74G1kqiA0kR4+duj+ZI6LSDx6JnIrUig9/7nFCc9 CClVsS1aEO7ouMFd//BD0IShWF42UwMaDJo6kwFeyVqNxkJoFBPxTMlVxL3HYKEWtMDA wMs7bxXa1fZOLYHuTOS9t869sHPd+a09Ql+JwUuz5ZkgALfhRFl381ADRhkfEs1ZEs7N Tpiy+xykpiC3llKzmqjnSnBP3DXQwIyaEyoOr2rufQISZnLN+EOD4KJRLS07ELaqAIBC dFNO3VynGTFc8cD5JHUjC1+Ll8fliU/aQ8tIOXCGG9IoWzeem9GnpXMHtqx3tOXGpEqG sZCw== X-Gm-Message-State: AGi0PuahXqYe7Y1g86KrsFQE6zDaai5qjLBroPJ+niljAjzpB8ST39gB tPvaa/nIBUL0vOalsmpbTqHeUr7rWqDy5A== X-Google-Smtp-Source: APiQypIql4k96jW+Hnwpu7NGBalRh784Q/LWaGXy+aU7KwRDQubChWnid0/H59X9cY48lPsU+wSFVw== X-Received: by 2002:a2e:8693:: with SMTP id l19mr2226293lji.132.1585835176058; Thu, 02 Apr 2020 06:46:16 -0700 (PDT) Received: from localhost (81-231-232-130-no39.tbcn.telia.com. [81.231.232.130]) by smtp.gmail.com with ESMTPSA id q10sm3858710lfa.29.2020.04.02.06.46.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2020 06:46:15 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org Subject: [PATCH v1 3/5] dma/xlnx-zdma: Clear DMA_DONE when halting Date: Thu, 2 Apr 2020 15:47:19 +0200 Message-Id: <20200402134721.27863-4-edgar.iglesias@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200402134721.27863-1-edgar.iglesias@gmail.com> References: <20200402134721.27863-1-edgar.iglesias@gmail.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::242 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: figlesia@xilinx.com, peter.maydell@linaro.org, sstabellini@kernel.org, edgar.iglesias@xilinx.com, sai.pavan.boddu@xilinx.com, frasse.iglesias@gmail.com, alistair@alistair23.me, richard.henderson@linaro.org, frederic.konrad@adacore.com, qemu-arm@nongnu.org, philmd@redhat.com, luc.michel@greensocs.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: "Edgar E. Iglesias" Clear DMA_DONE when halting the DMA channel. Signed-off-by: Edgar E. Iglesias Acked-by: Alistair Francis Reviewed-by: Francisco Iglesias --- hw/dma/xlnx-zdma.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/dma/xlnx-zdma.c b/hw/dma/xlnx-zdma.c index 6a4699757a..dd893bc420 100644 --- a/hw/dma/xlnx-zdma.c +++ b/hw/dma/xlnx-zdma.c @@ -520,6 +520,7 @@ static void zdma_process_descr(XlnxZDMA *s) if (src_cmd == CMD_HALT) { zdma_set_state(s, PAUSED); ARRAY_FIELD_DP32(s->regs, ZDMA_CH_ISR, DMA_PAUSE, 1); + ARRAY_FIELD_DP32(s->regs, ZDMA_CH_ISR, DMA_DONE, false); zdma_ch_imr_update_irq(s); return; } From patchwork Thu Apr 2 13:47:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Edgar E. Iglesias" X-Patchwork-Id: 11470799 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 21E23159A for ; Thu, 2 Apr 2020 13:48:03 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EC2E62072E for ; Thu, 2 Apr 2020 13:48:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YpkEbU6m" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EC2E62072E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:40286 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jK0CQ-0000IB-3D for patchwork-qemu-devel@patchwork.kernel.org; Thu, 02 Apr 2020 09:48:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50771) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jK0Am-0006Xm-TT for qemu-devel@nongnu.org; Thu, 02 Apr 2020 09:46:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jK0Am-00023C-1Q for qemu-devel@nongnu.org; Thu, 02 Apr 2020 09:46:20 -0400 Received: from mail-lj1-x243.google.com ([2a00:1450:4864:20::243]:35582) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jK0Al-00020w-Q7; Thu, 02 Apr 2020 09:46:19 -0400 Received: by mail-lj1-x243.google.com with SMTP id k21so3325356ljh.2; Thu, 02 Apr 2020 06:46:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+8YyPg1A/CL32UVNeLjMOcghy1faoRoeDPxjhkZR1lM=; b=YpkEbU6mz/HHVLXjiZh/5b9VswChu+B4iNYIXIOaXzzB+LXAZBFeoVc2OaB9Bv3Dx8 7RC8P0USB6f73+ZLWRQK3UQ2zypqXwbNMIovEhJFPMXCibepwPf+sM6PAodyUPgKwYVe AGEkUtrVKuKELHpOO9+GrU46HS0US1WeEidy7172nn0ZrR8kfuyFHr+6Ygyh3EFN96q2 bNqVIUIZngZ0lyOE9Ev/1Z+AQE6Z8D62L+nLK224RXQBLUzclL35BKmUhb76uXE1yBjk z4YOCd9UWJ5h+nu1Leq4L2+i9uW/LsRFEC3ufEzixN4TIJIvgANpfCZqO2mh79frfydf dbDg== 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:mime-version:content-transfer-encoding; bh=+8YyPg1A/CL32UVNeLjMOcghy1faoRoeDPxjhkZR1lM=; b=HSICFy3uW3gvEbWDp4w4pX2LpHlDEOfPB1KpujapJhAHb2lhzgOzwqluf2Rkp+eL8/ xqG/iRoTJKP68CA0emx0ROlT3CaLj+CytIbA90/c34IWaYUNQztRENH88POcra/YsvvE FVcWvrWIA7tfq4xzVr0PnA726c/TTOVG6cACh3+6FKnjc2FHudX0repbLtU2rdeqh3rq RJkPQE3Z2vfwodM+xiEF3yQB9oQS3mHCS5AtdD7qq1f3Ri9Vlxds3vXVwwlFJWRWv4qD VTEAQGOuAEeBiztFyro7v63/pFrY/0t1XQ62TF9s4mYD61407j1i429Z+RhekDAebVej 8zJw== X-Gm-Message-State: AGi0PuZ05C1tHCLJUE9ixbKlAqW25MhDS5YRwUdFUpAaZWP0W18l1PMs 3LkCNzOMQbgjLc9hizAmX0E9AmjI2pMtVg== X-Google-Smtp-Source: APiQypKzVOauBGw1Pch4tcjOsIPAZIrTpCnDyhjftzE4gj1XecMlChisHJNVkio+lPWIGTgv6RMvng== X-Received: by 2002:a2e:4942:: with SMTP id b2mr2145000ljd.135.1585835177363; Thu, 02 Apr 2020 06:46:17 -0700 (PDT) Received: from localhost (81-231-232-130-no39.tbcn.telia.com. [81.231.232.130]) by smtp.gmail.com with ESMTPSA id t13sm3846647lfc.68.2020.04.02.06.46.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2020 06:46:16 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org Subject: [PATCH v1 4/5] dma/xlnx-zdma: Advance the descriptor address when stopping Date: Thu, 2 Apr 2020 15:47:20 +0200 Message-Id: <20200402134721.27863-5-edgar.iglesias@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200402134721.27863-1-edgar.iglesias@gmail.com> References: <20200402134721.27863-1-edgar.iglesias@gmail.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::243 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: figlesia@xilinx.com, peter.maydell@linaro.org, sstabellini@kernel.org, edgar.iglesias@xilinx.com, sai.pavan.boddu@xilinx.com, frasse.iglesias@gmail.com, alistair@alistair23.me, richard.henderson@linaro.org, frederic.konrad@adacore.com, qemu-arm@nongnu.org, philmd@redhat.com, luc.michel@greensocs.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: "Edgar E. Iglesias" Advance the descriptor address when stopping the channel. Signed-off-by: Edgar E. Iglesias Acked-by: Alistair Francis Reviewed-by: Francisco Iglesias --- hw/dma/xlnx-zdma.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/dma/xlnx-zdma.c b/hw/dma/xlnx-zdma.c index dd893bc420..e856d233f2 100644 --- a/hw/dma/xlnx-zdma.c +++ b/hw/dma/xlnx-zdma.c @@ -514,7 +514,6 @@ static void zdma_process_descr(XlnxZDMA *s) if (ptype == PT_REG || src_cmd == CMD_STOP) { ARRAY_FIELD_DP32(s->regs, ZDMA_CH_CTRL2, EN, 0); zdma_set_state(s, DISABLED); - return; } if (src_cmd == CMD_HALT) { From patchwork Thu Apr 2 13:47:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Edgar E. Iglesias" X-Patchwork-Id: 11470805 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C1AAC15AB for ; Thu, 2 Apr 2020 13:51:18 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 974382073B for ; Thu, 2 Apr 2020 13:51:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="cWf4kD0t" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 974382073B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:40350 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jK0FZ-0004js-Pe for patchwork-qemu-devel@patchwork.kernel.org; Thu, 02 Apr 2020 09:51:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50794) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jK0Ao-0006Zx-Fv for qemu-devel@nongnu.org; Thu, 02 Apr 2020 09:46:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jK0Am-00023r-BW for qemu-devel@nongnu.org; Thu, 02 Apr 2020 09:46:22 -0400 Received: from mail-lj1-x242.google.com ([2a00:1450:4864:20::242]:40081) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jK0Am-00021z-3i; Thu, 02 Apr 2020 09:46:20 -0400 Received: by mail-lj1-x242.google.com with SMTP id 19so3265853ljj.7; Thu, 02 Apr 2020 06:46:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TLzE2qyREnbaDqlCoLajdWkY9S6FLWSn1nRwtU02lS4=; b=cWf4kD0tqff1FpoKtDsdz4F13D6TjBFJCPrBpb9VYbAme1/R22JtubShlbYm1T1E90 VcOr61DgvfL1dUNH8Zer0wFTvazpz2Bd3Ga2YpENcjDtiuPXmR9qesMiWBB/DaAY4251 UsbMQLb1v/ARH0fmmDjiLpWwf1AAdILrwaJUphF8vZQeEhlfIBsYsuWt5BEOiQcd9+s9 o7M10bVknTttz2fT8kxztLG3kG+GOPQ+NCAW9LFVxGOnYldYdzuqRUgjVm27dRze7noU vgH/kndj1+J88hyW1n27o3r8tD+y1quAiK9UppG0pGk4jTBtMfL8gVpqrIRJpFTfM78o S+Mg== 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:mime-version:content-transfer-encoding; bh=TLzE2qyREnbaDqlCoLajdWkY9S6FLWSn1nRwtU02lS4=; b=s3JhNkFMpp3W4ROoXWHHIKPGC16NT/7x9N0UcEOXlQmXIVIbZVRKMxjAfTzOvAJxuV mYpsOdY4SoV/0Z2tTYji+i4zOYJvtCSnSWYD0ZaNBYJmb3UJzouJfH0mkasZ47lsWeZj KwJw8m+LqSZWt88V1217VSu6HGs1zrlyLiezVWOCRVyPqP9e8d/aoXFNJfown23TuuzL F4yJcPPSKu0JGPX9RSpLN+BYxEpHgdtf3BbebXr0K/FrRnH9a5w+pCl9ci64W6g85/nu myab3sR3RuCu0OmReJNZGTVjTe0B5XyjF5avbjVf2g7YVytdcTgfEltj5VviVvJ/Pcvm K+aA== X-Gm-Message-State: AGi0PuZzBrT6mtlyqYT+P7cvCL5Z6rtPqh55eKHrZsuLT2EQUiy2UreQ Pka6YR2wkuuvcNHdTMwmdf7jnC4oMrP6LA== X-Google-Smtp-Source: APiQypIy6V97Eet4AkjNxuBYYWtbQ3d1Ukzl4J6cEj9tOz8gz3eeL2gaQ6Vk8RnFvnqj4itThdjQAA== X-Received: by 2002:a05:651c:22e:: with SMTP id z14mr2017486ljn.64.1585835178613; Thu, 02 Apr 2020 06:46:18 -0700 (PDT) Received: from localhost (81-231-232-130-no39.tbcn.telia.com. [81.231.232.130]) by smtp.gmail.com with ESMTPSA id b16sm3939517lfq.34.2020.04.02.06.46.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2020 06:46:18 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org Subject: [PATCH v1 5/5] dma/xlnx-zdma: Reorg to fix CUR_DSCR Date: Thu, 2 Apr 2020 15:47:21 +0200 Message-Id: <20200402134721.27863-6-edgar.iglesias@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200402134721.27863-1-edgar.iglesias@gmail.com> References: <20200402134721.27863-1-edgar.iglesias@gmail.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::242 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: figlesia@xilinx.com, peter.maydell@linaro.org, sstabellini@kernel.org, edgar.iglesias@xilinx.com, sai.pavan.boddu@xilinx.com, frasse.iglesias@gmail.com, alistair@alistair23.me, richard.henderson@linaro.org, frederic.konrad@adacore.com, qemu-arm@nongnu.org, philmd@redhat.com, luc.michel@greensocs.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From: "Edgar E. Iglesias" Reorganize the descriptor handling so that CUR_DSCR always points to the next descriptor to be processed. Signed-off-by: Edgar E. Iglesias Reviewed-by: Alistair Francis Reviewed-by: Francisco Iglesias --- hw/dma/xlnx-zdma.c | 47 ++++++++++++++++++++++------------------------ 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/hw/dma/xlnx-zdma.c b/hw/dma/xlnx-zdma.c index e856d233f2..1c45367f3c 100644 --- a/hw/dma/xlnx-zdma.c +++ b/hw/dma/xlnx-zdma.c @@ -333,10 +333,28 @@ static void zdma_load_src_descriptor(XlnxZDMA *s) } } +static void zdma_update_descr_addr(XlnxZDMA *s, bool type, + unsigned int basereg) +{ + uint64_t addr, next; + + if (type == DTYPE_LINEAR) { + addr = zdma_get_regaddr64(s, basereg); + next = addr + sizeof(s->dsc_dst); + } else { + addr = zdma_get_regaddr64(s, basereg); + addr += sizeof(s->dsc_dst); + address_space_read(s->dma_as, addr, s->attr, (void *) &next, 8); + } + + zdma_put_regaddr64(s, basereg, next); +} + static void zdma_load_dst_descriptor(XlnxZDMA *s) { uint64_t dst_addr; unsigned int ptype = ARRAY_FIELD_EX32(s->regs, ZDMA_CH_CTRL0, POINT_TYPE); + bool dst_type; if (ptype == PT_REG) { memcpy(&s->dsc_dst, &s->regs[R_ZDMA_CH_DST_DSCR_WORD0], @@ -349,24 +367,10 @@ static void zdma_load_dst_descriptor(XlnxZDMA *s) if (!zdma_load_descriptor(s, dst_addr, &s->dsc_dst)) { ARRAY_FIELD_DP32(s->regs, ZDMA_CH_ISR, AXI_RD_DST_DSCR, true); } -} - -static uint64_t zdma_update_descr_addr(XlnxZDMA *s, bool type, - unsigned int basereg) -{ - uint64_t addr, next; - if (type == DTYPE_LINEAR) { - next = zdma_get_regaddr64(s, basereg); - next += sizeof(s->dsc_dst); - zdma_put_regaddr64(s, basereg, next); - } else { - addr = zdma_get_regaddr64(s, basereg); - addr += sizeof(s->dsc_dst); - address_space_read(s->dma_as, addr, s->attr, &next, 8); - zdma_put_regaddr64(s, basereg, next); - } - return next; + /* Advance the descriptor pointer. */ + dst_type = FIELD_EX32(s->dsc_dst.words[3], ZDMA_CH_DST_DSCR_WORD3, TYPE); + zdma_update_descr_addr(s, dst_type, R_ZDMA_CH_DST_CUR_DSCR_LSB); } static void zdma_write_dst(XlnxZDMA *s, uint8_t *buf, uint32_t len) @@ -387,14 +391,7 @@ static void zdma_write_dst(XlnxZDMA *s, uint8_t *buf, uint32_t len) dst_size = FIELD_EX32(s->dsc_dst.words[2], ZDMA_CH_DST_DSCR_WORD2, SIZE); if (dst_size == 0 && ptype == PT_MEM) { - uint64_t next; - bool dst_type = FIELD_EX32(s->dsc_dst.words[3], - ZDMA_CH_DST_DSCR_WORD3, - TYPE); - - next = zdma_update_descr_addr(s, dst_type, - R_ZDMA_CH_DST_CUR_DSCR_LSB); - zdma_load_descriptor(s, next, &s->dsc_dst); + zdma_load_dst_descriptor(s); dst_size = FIELD_EX32(s->dsc_dst.words[2], ZDMA_CH_DST_DSCR_WORD2, SIZE); }