From patchwork Wed Aug 5 11:23:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1341204 X-Patchwork-Delegate: monstr@monstr.eu Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=EoDPn41a; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BM8S35RZZz9sRK for ; Wed, 5 Aug 2020 21:25:23 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 068C282192; Wed, 5 Aug 2020 13:24:22 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20150623.gappssmtp.com header.i=@monstr-eu.20150623.gappssmtp.com header.b="EoDPn41a"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AF7C482185; Wed, 5 Aug 2020 13:24:14 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x644.google.com (mail-ej1-x644.google.com [IPv6:2a00:1450:4864:20::644]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id EF23882130 for ; Wed, 5 Aug 2020 13:24:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=monstr@monstr.eu Received: by mail-ej1-x644.google.com with SMTP id c16so25602098ejx.12 for ; Wed, 05 Aug 2020 04:24:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6PYk5ALT8a+2wA/dIFzYG4GpcQqqR5kAn7hH9TrzIEg=; b=EoDPn41aQXvsu/T+Q4xivl+TNlpS2VzqqZUEZ19bsP+ByiAdfhIAQmGL4QqsZcF+OJ +OpSwWOY187AEzuvWRnpws0+XhOpUg7yUp/RzdSfT5hP5LYfNUSB06BK7FTGbZvdBnVu O+gz7Spiyc69RpsYAPp9jHgXXvCPQei0MQK3lAUy+ljCJsxRdI11lB2xUtomsFRwp880 vDqsEYfHsw7bd5Rv6n+OllHMLkcXUSn/fE1Zm7DsI7/IByaEhFJAW1g2vDXEZToyh1UE mO+BsUMisMUbQlM1lWyanaKGO6TCUQRhFymO79O7ue/LhDZVwkkN0I/3DEl/ic+CS8iM w/zA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=6PYk5ALT8a+2wA/dIFzYG4GpcQqqR5kAn7hH9TrzIEg=; b=kuvBcf6pKhzN6Gyfsx3mTgF48lSqsZxef+0OnD5qxdl3qVmztrJQ2oe3lMHh42nkyt HPTMotZAM5GF4BT62KjQ/prk0NUdLpaJJ+LQz166nlAp3RsOAvegDsLMpSmiYSYxBDTZ +8cqtUsRUsU46s4d6oLoQ5XD2oAJNF3Pl8NdA7eC6QYdngOZ7bjj0iOO7DTmo0vIo2CJ h+UNjzoVoks7/lvIXC6rCzLXqAGuH8v+r+BVcv2TOwLm7s0FurhTjN/EGtw1E685dQJb m1rvwt9whR8jM3G1A4ZQoROu7QPJc1Z0OOJXoXNwY3xz7fxNWngYDb2DrcigRnR2u1F4 6VkQ== X-Gm-Message-State: AOAM532jbFEXSK7SdWV3YLx/piRqqsumBmDY3uM/M8n82/dg+/IMsl9Y GKwba58OobM6rhKAaF3qX7DTJyP9uFgV7Q== X-Google-Smtp-Source: ABdhPJzFyFVC0U7rNZLvqg/htx7GDuTkQX6B3AsPlXOpIpNXJJRWryluLDbaj2PWt6DsvJ51WE+3Og== X-Received: by 2002:a17:907:41dc:: with SMTP id og20mr2783387ejb.183.1596626651391; Wed, 05 Aug 2020 04:24:11 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id v14sm1370442ejb.63.2020.08.05.04.24.10 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Aug 2020 04:24:10 -0700 (PDT) From: Michal Simek To: u-boot@lists.denx.de, git@xilinx.com Cc: Ibai Erkiaga Subject: [PATCH 7/8] xilinx: zynqmp: fix incorrect map not align with IPI HW Date: Wed, 5 Aug 2020 13:23:54 +0200 Message-Id: X-Mailer: git-send-email 2.27.0 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean From: Ibai Erkiaga Current IPI module register description is not align with IPI HW. The registers with the wrong offset are not used so it does not cause real issues. This patch aligns the register description. Additionally comments added to explain why recv function does not check any flag prior copying rx data. Fixes: 660b0c77d816 ("mailbox: zynqmp: ipi mailbox driver") Signed-off-by: Ibai Erkiaga Signed-off-by: Michal Simek --- drivers/mailbox/zynqmp-ipi.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/mailbox/zynqmp-ipi.c b/drivers/mailbox/zynqmp-ipi.c index f206a27a79e4..746377e557cb 100644 --- a/drivers/mailbox/zynqmp-ipi.c +++ b/drivers/mailbox/zynqmp-ipi.c @@ -24,10 +24,12 @@ struct ipi_int_regs { u32 trig; /* 0x0 */ u32 obs; /* 0x4 */ - u32 ist; /* 0x8 */ - u32 imr; /* 0xC */ - u32 ier; /* 0x10 */ - u32 idr; /* 0x14 */ + u32 dummy0; + u32 dummy1; + u32 isr; /* 0x10 */ + u32 imr; /* 0x14 */ + u32 ier; /* 0x18 */ + u32 idr; /* 0x1C */ }; #define ipi_int_apu ((struct ipi_int_regs *)IPI_INT_REG_BASE_APU) @@ -66,6 +68,10 @@ static int zynqmp_ipi_recv(struct mbox_chan *chan, void *data) struct zynqmp_ipi *zynqmp = dev_get_priv(chan->dev); u32 *mbx = (u32 *)zynqmp->local_res_regs; + /* + * PMU Firmware does not trigger IPI interrupt for API call responses so + * there is no need to check ISR flags + */ for (size_t i = 0; i < msg->len; i++) msg->buf[i] = readl(&mbx[i]);