| Message ID | 1610973148-22465-6-git-send-email-ashok.reddy.soma@xilinx.com |
|---|---|
| State | Deferred |
| Delegated to: | Tom Rini |
| Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> 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=<UNKNOWN>) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=xilinx.onmicrosoft.com header.i=@xilinx.onmicrosoft.com header.a=rsa-sha256 header.s=selector2-xilinx-onmicrosoft-com header.b=ZnNOPz7w; 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 4DKB903k5zz9sRR for <incoming@patchwork.ozlabs.org>; Mon, 18 Jan 2021 23:36:03 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3A92D82809; Mon, 18 Jan 2021 13:35:21 +0100 (CET) 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=pass (1024-bit key; unprotected) header.d=xilinx.onmicrosoft.com header.i=@xilinx.onmicrosoft.com header.b="ZnNOPz7w"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 4457682789; Mon, 18 Jan 2021 13:33:53 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FORGED_SPF_HELO,SPF_HELO_PASS autolearn=no autolearn_force=no version=3.4.2 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on20618.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe5b::618]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 422B58276B for <u-boot@lists.denx.de>; Mon, 18 Jan 2021 13:33:50 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ashokred@xilinx.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gHNTxRTayKNSoZUqbg1olr3pRFmb6XzAdtzoxUUmHQgkCH4hsyTKsFqdJmP493SPOlujCg9sI//xMpncQJSbZtpNNSMoJRm9c3ZSaFV1yov5DOvxvFFCAFg2in1ATSb1ayZIS6uTd5jZgR6zdC2zUPGCcUPD9poOGhYVHqkWcfDgrkDFit4cGcTzwd7nl1vcFAlS2jgX2pBkluAz/fIWy9dSO1coLr5iiYz09BUT7QcK9f0wBGeJR0gmoDQ8DP9dRcVEqTdTrA9wXX7PmxuZMDSy4T2xqPlw/cfN/X9kwU4svKnhZ/ZMoNMUZWyfg0ALPmyEaBL6HbmPBnxPtx/N/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+he2F/Y46adRyeJ3GrwAfDfVGhSrFkmzNtcUuo3yIk4=; b=YVEnidV+QixWeDtFSn0D/kIJKrwvxEZJq9/H0P1cegItaGTxjKVbN3Qah4CITWwohbqj8LanKEo4sh0kgfRsYGjyjbPLr+QitGs0ROfDGxVU2fe0kxBQN1txCXgYPCYAPhwxJaLbH+gRW6MzxodPe+uEtehuBNmSopijflHNHGLofESGSSF8/QGYMrXfDKXpqG0qpLO6FwQSYka+lqFBrcVJZ+2iTCaM31//jZCIIkfp0DAZV95Kqh6thMnGtgNvzVyawFncQl7NLzPuSaNd1SGj2HlYV7QoMVRrXAVQY5tupP3sYF+ezFYDDJ0liOmBnhwvpI5luf+3G5kpRBru3A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.62.198) smtp.rcpttodomain=amarulasolutions.com smtp.mailfrom=xilinx.com; dmarc=bestguesspass action=none header.from=xilinx.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+he2F/Y46adRyeJ3GrwAfDfVGhSrFkmzNtcUuo3yIk4=; b=ZnNOPz7wAAWmgWlapuwwQ5cyq4XTzlJ5QRGLpQOPB7fW1cZ45+uzfQbar3K+Wzi1sTLFxx8XuyW0RYwSYDf5CTrAopnvkqnpdFA4RmPQj7dEThzLFKnkkkYagHyykovUiGfjzxt8/VX115QUfmv8cJLKj3vxXUEWCIXcCT/Mv2w= Received: from CY4PR20CA0008.namprd20.prod.outlook.com (2603:10b6:903:98::18) by BY5PR02MB6657.namprd02.prod.outlook.com (2603:10b6:a03:211::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3742.6; Mon, 18 Jan 2021 12:33:48 +0000 Received: from CY1NAM02FT027.eop-nam02.prod.protection.outlook.com (2603:10b6:903:98:cafe::12) by CY4PR20CA0008.outlook.office365.com (2603:10b6:903:98::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3763.9 via Frontend Transport; Mon, 18 Jan 2021 12:33:48 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.62.198) smtp.mailfrom=xilinx.com; amarulasolutions.com; dkim=none (message not signed) header.d=none;amarulasolutions.com; dmarc=bestguesspass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 149.199.62.198 as permitted sender) receiver=protection.outlook.com; client-ip=149.199.62.198; helo=xsj-pvapexch02.xlnx.xilinx.com; Received: from xsj-pvapexch02.xlnx.xilinx.com (149.199.62.198) by CY1NAM02FT027.mail.protection.outlook.com (10.152.75.159) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3763.12 via Frontend Transport; Mon, 18 Jan 2021 12:33:47 +0000 Received: from xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1913.5; Mon, 18 Jan 2021 04:33:39 -0800 Received: from smtp.xilinx.com (172.19.127.95) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server id 15.1.1913.5 via Frontend Transport; Mon, 18 Jan 2021 04:33:39 -0800 Envelope-to: git@xilinx.com, jagan@amarulasolutions.com, ashok.409@gmail.com, u-boot@lists.denx.de, monstr@monstr.eu Received: from [172.23.64.106] (port=48331 helo=xhdvnc125.xilinx.com) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from <ashok.reddy.soma@xilinx.com>) id 1l1Tj0-0004tw-V4; Mon, 18 Jan 2021 04:33:39 -0800 Received: by xhdvnc125.xilinx.com (Postfix, from userid 2896) id 62E8C1222D6; Mon, 18 Jan 2021 18:02:31 +0530 (IST) From: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com> To: <u-boot@lists.denx.de> CC: <jagan@amarulasolutions.com>, <monstr@monstr.eu>, <git@xilinx.com>, <ashok.409@gmail.com>, Ashok Reddy Soma <ashok.reddy.soma@xilinx.com> Subject: [PATCH 5/7] spi: zynqmp_gqspi: Fix write issues in single mode Date: Mon, 18 Jan 2021 18:02:26 +0530 Message-ID: <1610973148-22465-6-git-send-email-ashok.reddy.soma@xilinx.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1610973148-22465-1-git-send-email-ashok.reddy.soma@xilinx.com> References: <1610973148-22465-1-git-send-email-ashok.reddy.soma@xilinx.com> MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 95245c22-6d1b-4dbf-2397-08d8bbad4dae X-MS-TrafficTypeDiagnostic: BY5PR02MB6657: X-LD-Processed: 657af505-d5df-48d0-8300-c31994686c5c,ExtAddr X-Microsoft-Antispam-PRVS: <BY5PR02MB66575588EB8C73BEF289A603BAA40@BY5PR02MB6657.namprd02.prod.outlook.com> Content-Transfer-Encoding: quoted-printable X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9rwqHGYrNUJU33mdAtC7VWzcS9b6tOnQ8h3L+9y/jRaJOMCVlKXummPaLGrUoCuDno/0wA5ZmCJILYQwDzfXNmxgrZBR/cQ8XfZoOvQyQ4ykSvHMI9FsSFuUFHoukhjfE5e8NXmgsOjE9LpuBilt0W1607buM8/xtOpcwjUy63D7Rqpz2CWdiaWjP8U4Ql+RrVdHESBI5o26bq/qOxgsmMvPpmsyK622NLT8tNX6dT14+pqV6M9D+dRD9N86+K6+BGV7wGi/QZ1fSflOF+PzbFyQQ8AZNLwjxOCHY+N28WkEdTu+7TtZN4bpi3glBUGblTxrSoUDTQK+a9BqnP3IJJeMt24jQ2wmuiR2wayVMQ6pgtj/KoWIpKNbM1mA/3GpY8F4vG4dkJP2cBF4Pfw3+TQbPUbAagWAbTHdJZ6X7e/rb0Mgd45xgjsMMNGLccFM+FA6gQAdP067XnoiGxItxBFCpQ6/dIyxlWpu0idKc1hKA1qNpx70SHvgB5tkuJSf X-Forefront-Antispam-Report: CIP:149.199.62.198; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:xsj-pvapexch02.xlnx.xilinx.com; PTR:unknown-62-198.xilinx.com; CAT:NONE; SFS:(4636009)(39860400002)(346002)(136003)(396003)(376002)(46966006)(8676002)(478600001)(356005)(8936002)(6916009)(2616005)(7636003)(186003)(2906002)(70206006)(426003)(26005)(82310400003)(107886003)(70586007)(5660300002)(4326008)(47076005)(316002)(36906005)(83380400001)(336012)(42186006)(54906003)(6666004)(6266002)(36756003)(82740400003)(102446001); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2021 12:33:47.9289 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 95245c22-6d1b-4dbf-2397-08d8bbad4dae X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c; Ip=[149.199.62.198]; Helo=[xsj-pvapexch02.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: CY1NAM02FT027.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR02MB6657 X-Mailman-Approved-At: Mon, 18 Jan 2021 13:34:57 +0100 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean |
| Series |
zynqmp_gqspi driver updates
|
expand
|
diff --git a/drivers/spi/zynqmp_gqspi.c b/drivers/spi/zynqmp_gqspi.c index 136c20f09e..f50a7304ea 100644 --- a/drivers/spi/zynqmp_gqspi.c +++ b/drivers/spi/zynqmp_gqspi.c @@ -239,10 +239,21 @@ static void zynqmp_qspi_fill_gen_fifo(struct zynqmp_qspi_priv *priv, u32 gqspi_fifo_reg) { struct zynqmp_qspi_regs *regs = priv->regs; + u32 config_reg, ier; int ret = 0; + config_reg = readl(®s->confr); + /* Manual start if needed */ + config_reg |= GQSPI_STRT_GEN_FIFO; + writel(config_reg, ®s->confr); + + /* Enable interrupts */ + ier = readl(®s->ier); + ier |= GQSPI_IXR_GFNFULL_MASK; + writel(ier, ®s->ier); + /* Wait until the fifo is not full to write the new command */ - ret = wait_for_bit_le32(®s->isr, GQSPI_IXR_GFEMTY_MASK, 1, + ret = wait_for_bit_le32(®s->isr, GQSPI_IXR_GFNFULL_MASK, 1, GQSPI_TIMEOUT, 1); if (ret) printf("%s Timeout\n", __func__); @@ -265,6 +276,9 @@ static void zynqmp_qspi_chipselect(struct zynqmp_qspi_priv *priv, int is_on) debug("GFIFO_CMD_CS: 0x%x\n", gqspi_fifo_reg); + /* Dummy generic FIFO entry */ + zynqmp_qspi_fill_gen_fifo(priv, 0); + zynqmp_qspi_fill_gen_fifo(priv, gqspi_fifo_reg); }
Add dummy write to genfifo register in chipselect. Enable manual start in zynqmp_qspi_fill_gen_fifo(). Also enable GQSPI_IXR_GFNFULL_MASK and check for it instead of GQSPI_IXR_GFEMTY_MASK. Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com> --- drivers/spi/zynqmp_gqspi.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) -- 2.17.1 This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.