Message ID | 1657893679-20039-5-git-send-email-ashok.reddy.soma@xilinx.com |
---|---|
State | Accepted |
Commit | 2a75bc1303b34e88745fcecfeacbe94f2a4bd1e2 |
Delegated to: | Michal Simek |
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: bilbo.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=Qic9lDlO; dkim-atps=neutral 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>) 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 (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LktNh1ZW1z9s07 for <incoming@patchwork.ozlabs.org>; Sat, 16 Jul 2022 00:03:00 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D49F680755; Fri, 15 Jul 2022 16:02:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (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="Qic9lDlO"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 35D2C80741; Fri, 15 Jul 2022 16:02:55 +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,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2084.outbound.protection.outlook.com [40.107.100.84]) (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 7B35980741 for <u-boot@lists.denx.de>; Fri, 15 Jul 2022 16:02:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (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=JD9WgJMeWKZcLI7wVNm7dkyud0uUKHrWOeyZ83rWQrKFIYEnZIMuPqSC6LJb20/vq8owB/h9RZnbJc1ubUMEAwwUDrkNBIEshkg/RDWUYYwsthO3rZ5qkio7RUYWkXuZEtzwr6mGz631Bfxq1VuoMFRMzkU2AZfVd2Gjyy/PZxLUxjjH6QfHQURXJ+fqj/pqB7syve176/ZcLS0pE4odt4SJwpjT5JwaSwAy9hVmUSYZsTYI4KYIRI/YBiKsn8yt+UCL/EWGGl0G1vnOUEpJCi7f8ylWtd1oVgogS6ZznPm7NnjcEp0Zn8WTg5GCeJy1Cf73YvVTTRiqedp3a/GitA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=DqMxkWoqeuMN+SF30DwpCKc/zYhv+ZE/aU3SryNIlpU=; b=Y2fp01TXzjxi8dhFSK9TosaT0bweUoT2zr3toAi16q2HdIDgP5M/UvWR1VoFJ7pa/pD3X/Nex3uFr5v9Hrj4GaGil0lUA4a4zylcDlCWhsJDM0/3fFRerpM4JALW9b2WngPMyk6l7uGZHNRlifb7o/oVDqVq1ZqkrzHuoTlpVlMqAKfY7Om7ll1BtyJviuDQWN31itqsGIjmQbUS+DxTDo8VpN8bKC6/JXLO3qJuZt0x+LP8uR4/UdAk6z7RA/wsICXz8x87m1wx56GaR4e/ymCGb+Mz30BMj0lVGhsEtW86OUOmUZFbwjLQiS1zYK8UBR1Gy7zCEn/i/R9Qc0nPKg== 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=pass (p=none sp=none pct=100) 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=DqMxkWoqeuMN+SF30DwpCKc/zYhv+ZE/aU3SryNIlpU=; b=Qic9lDlOgXyva2Tz0kwjO0NtqRIEOVNQR+0Bl2lJKfN8+JZeJSbZ2JMkgQHMOISc5KvajhNvpZzan4Iq+Srlvapo0H30+oW//XrzqtgkS2LoILPTebaPNAMCOhvLmn3+Jntj85tVZBwJPugn2ia/+51Fv5fySXvzhMuf80MHJQ0= Received: from BN9PR03CA0319.namprd03.prod.outlook.com (2603:10b6:408:112::24) by MN2PR02MB5773.namprd02.prod.outlook.com (2603:10b6:208:11a::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.23; Fri, 15 Jul 2022 14:02:48 +0000 Received: from BN1NAM02FT048.eop-nam02.prod.protection.outlook.com (2603:10b6:408:112:cafe::d8) by BN9PR03CA0319.outlook.office365.com (2603:10b6:408:112::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5438.17 via Frontend Transport; Fri, 15 Jul 2022 14:02:48 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.62.198) smtp.mailfrom=xilinx.com; dkim=none (message not signed) header.d=none;dmarc=pass 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-pvapexch01.xlnx.xilinx.com; pr=C Received: from xsj-pvapexch01.xlnx.xilinx.com (149.199.62.198) by BN1NAM02FT048.mail.protection.outlook.com (10.13.2.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5438.12 via Frontend Transport; Fri, 15 Jul 2022 14:02:48 +0000 Received: from xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) by xsj-pvapexch01.xlnx.xilinx.com (172.19.86.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Fri, 15 Jul 2022 07:02:21 -0700 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.2176.14 via Frontend Transport; Fri, 15 Jul 2022 07:02:21 -0700 Envelope-to: git@xilinx.com, jagan@amarulasolutions.com, git@amd.com, michal.simek@amd.com, u-boot@lists.denx.de Received: from [172.23.64.5] (port=34847 helo=xhdvnc105.xilinx.com) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from <ashok.reddy.soma@xilinx.com>) id 1oCLtc-0008uY-V7; Fri, 15 Jul 2022 07:02:21 -0700 Received: by xhdvnc105.xilinx.com (Postfix, from userid 2896) id F1DC761041; Fri, 15 Jul 2022 19:31:21 +0530 (IST) From: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com> To: <u-boot@lists.denx.de> CC: <jagan@amarulasolutions.com>, <michal.simek@amd.com>, <git@xilinx.com>, <git@amd.com>, Ashok Reddy Soma <ashok.reddy.soma@xilinx.com> Subject: [PATCH 4/4] spi: zynq_qspi: Fix programming qspi speed Date: Fri, 15 Jul 2022 19:31:19 +0530 Message-ID: <1657893679-20039-5-git-send-email-ashok.reddy.soma@xilinx.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1657893679-20039-1-git-send-email-ashok.reddy.soma@xilinx.com> References: <1657893679-20039-1-git-send-email-ashok.reddy.soma@xilinx.com> MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8e79a91f-5170-4be7-e8fe-08da666ab2fc X-MS-TrafficTypeDiagnostic: MN2PR02MB5773:EE_ X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Gpt5GX2rIa/4HWW/zfAajKtGcNpoQLtofb7LLM8O9bmqmgE5yoZwOxeJLEEq6W+mTVcndcsaNoMn1c0yPl8qBjwb84SHq74zAQbwnZI/VAt94hboJXOIlu7HB9vCbYU52zTtcdOfdvSc4bQyYFIbGmmLEEbhgqYX/ZqnYBku+NICl11Ir3dV55s9vJpfWMmLmaXao07Jxr31t17vXuF3iJsmDpUVGnIgjwr7BNWAv3VZ9yq+GChkaJqFM+xDVic/LB8rrjdJx01rGdYG+ha7nQwglgFY+bSkr1kGQxpWxMHzDReUuM/psBZQseSLRM4rq26odyLyUxUZaMefgdMkqEWz45ZQI3ByVrMATP9xJpRLYTyadv24XRhsEKeBK2jo6J+e8SCSYAcIjdy5OpwXmmXpqENo5ey4aTsK77NPJ9ls8uetB960sjXSbrJIPkw9ZBSWJFBln04Nr9PLX30ri9NqdY6Jkr242Qcj0obc2cIOxhvn3HcFYaMzE99+/ZfpmKRPtHtH1Q+oV4TpkKjkEE9OkjJX2RN2hyYgVb+IIhU14Laeg8lhb/QHPGEcektUNFUH0nn4PiWJiG96KXsTDHliugEzmlkIlqNnK2IXaKvdkBXSa2GIo39WJOnLVilyO+hJ46BcWTrLbhqkL2brjyt5+08s7XID+vmmya6RlbcHgJkYu63VppEpPfDsXe6/egtuHHctF8F9adBop3C+hT0zw3MEQhOXxjdfr9KOShJ2FyVVGlcGaIw4lW/ENco/BG18ZUUWhDtX9gZ7vZqa7X0NosffE8JzRhX7Cu9S2qXt6s7cgTKfw6BmEHfmfpuiItwcoqMC9MT4uR85f5Sp3VPyVm6va08tsPkv6/nrjPQ= X-Forefront-Antispam-Report: CIP:149.199.62.198; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:xsj-pvapexch01.xlnx.xilinx.com; PTR:unknown-62-198.xilinx.com; CAT:NONE; SFS:(13230016)(4636009)(376002)(346002)(136003)(396003)(39860400002)(40470700004)(36840700001)(46966006)(82740400003)(356005)(6266002)(5660300002)(36860700001)(2616005)(83380400001)(426003)(47076005)(36756003)(7636003)(336012)(186003)(107886003)(6916009)(54906003)(70206006)(478600001)(41300700001)(42186006)(26005)(316002)(8676002)(4326008)(2906002)(8936002)(70586007)(40460700003)(40480700001)(82310400005)(102446001); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jul 2022 14:02:48.0426 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8e79a91f-5170-4be7-e8fe-08da666ab2fc 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-pvapexch01.xlnx.xilinx.com] X-MS-Exchange-CrossTenant-AuthSource: BN1NAM02FT048.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR02MB5773 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.6 at phobos.denx.de X-Virus-Status: Clean |
Series |
Xilinx zynq_qspi updates
|
expand
|
diff --git a/drivers/spi/zynq_qspi.c b/drivers/spi/zynq_qspi.c index 52db7b3f21..00e3ffcd1d 100644 --- a/drivers/spi/zynq_qspi.c +++ b/drivers/spi/zynq_qspi.c @@ -622,15 +622,12 @@ static int zynq_qspi_set_speed(struct udevice *bus, uint speed) uint32_t confr; u8 baud_rate_val = 0; - if (speed > plat->frequency) - speed = plat->frequency; + if (!speed || speed > priv->max_hz) + speed = priv->max_hz; /* Set the clock frequency */ confr = readl(®s->cr); - if (speed == 0) { - /* Set baudrate x8, if the freq is 0 */ - baud_rate_val = 0x2; - } else if (plat->speed_hz != speed) { + if (plat->speed_hz != speed) { while ((baud_rate_val < ZYNQ_QSPI_CR_BAUD_MAX) && ((plat->frequency / (2 << baud_rate_val)) > speed))
When programming qspi flash speed we need to check the requested flash speed not to exceed the spi max frequency. In the current implementation we are checking qspi ref clk instead. This commit fixes the issue by checking the requested speed and programs the specified max frequency. Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com> --- drivers/spi/zynq_qspi.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)