Message ID | 20220218081949.5322-1-ashok.reddy.soma@xilinx.com |
---|---|
State | Superseded |
Delegated to: | Jagannadha Sutradharudu Teki |
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=ZoGwTZoR; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4K0Pl94lYZz9sFn for <incoming@patchwork.ozlabs.org>; Fri, 18 Feb 2022 19:20:19 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2401383B6E; Fri, 18 Feb 2022 09:20:11 +0100 (CET) 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="ZoGwTZoR"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 89FCC83B71; Fri, 18 Feb 2022 09:20:08 +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=1.3 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on20607.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe5b::607]) (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 8440B83B67 for <u-boot@lists.denx.de>; Fri, 18 Feb 2022 09:20:03 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=bounces+SRS=4OGL7=TB@xilinx.onmicrosoft.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ExHHw/zrXYZ3/W/ArbQimNd8YvL78DVNIkR1y4GB//S0KR3K5Pg8xH0qNc2YUpPhr7usPsuH/1V2XSz1U2hmSksdE/TWPhq1w5/U/6nGvgvV+zUPHJquAs5XC7xt9VwYqyY0+EC8NDJfWi8j9DAckj25vRSJrl8H/OZGmLSMYbMZ4MvFjMwPM51C0aevtA7x/mupN397DMpMuNu4HAjuofn7okRG27P9VqEVN4jvzFokcqEROZVmk9Smjx5hgwYj+5eAOv31OVAR7ghii0h9JGC7lspOjAZpiFsoZepzj9LC/cSz/XYDgYzfUxkZ938ijuX+vaWTcRKYQSHFVOzKaA== 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=oacy1vB3WOfNj0wRDDSbICv4WxS4xJvkSLA1nnRCySk=; b=EudVD6Ebx3xRxAwbHgT05dgBxyxTOJpx6or3nPGvOUaOFAEjwnEzF4Ugq/3LWLH3OmkSMtWvIVCSuySueVd1FCjsvzesjnju7demZHcwJWjBrndVwfYfmk2AjOfR+ODdZ90guAjUjxejXkqtv2m/88MknTDfQUSYqR7PXLw6sy23PYS7+vbMrskzQSxkt3PyZCLRQCd5WNdvTmaGWBlt3strkWlsXVxbw90soiOd4NUhyNhBTD7dNXsOaFau0ltVQSjuzOf8I0Q1rTHSxawQdodK9pr56VWBdJ7YXTgliLJ/GzIoPPa/8Q8GsEiAyB6zsYsDc+RdyRXFvc7J0aaGzg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none (sender ip is 149.199.62.198) smtp.rcpttodomain=amarulasolutions.com smtp.mailfrom=xhdashokred41.localdomain; dmarc=fail (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=oacy1vB3WOfNj0wRDDSbICv4WxS4xJvkSLA1nnRCySk=; b=ZoGwTZoRPUWTa22AwMdBTlp4+qtgFAvW7cB/DV6iv18FQID6to+hl6V387VqYvi05rb/HDC6cZuPOtpPmXra4md5+UXrLMw4h6haegi7FlAJAQybmWTzh92iCv/3VgzvnSU1EIFJ42zZv5mKiUCWVkRkeacL2vI0WeHqqN6vrLM= Received: from SA9PR13CA0132.namprd13.prod.outlook.com (2603:10b6:806:27::17) by PH0PR02MB7799.namprd02.prod.outlook.com (2603:10b6:510:5d::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4995.16; Fri, 18 Feb 2022 08:20:00 +0000 Received: from SN1NAM02FT0045.eop-nam02.prod.protection.outlook.com (2603:10b6:806:27:cafe::71) by SA9PR13CA0132.outlook.office365.com (2603:10b6:806:27::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.7 via Frontend Transport; Fri, 18 Feb 2022 08:20:00 +0000 X-MS-Exchange-Authentication-Results: spf=none (sender IP is 149.199.62.198) smtp.mailfrom=xhdashokred41.localdomain; dkim=none (message not signed) header.d=none;dmarc=fail action=none header.from=xilinx.com; Received-SPF: None (protection.outlook.com: xhdashokred41.localdomain does not designate permitted sender hosts) Received: from xsj-pvapexch02.xlnx.xilinx.com (149.199.62.198) by SN1NAM02FT0045.mail.protection.outlook.com (10.97.5.234) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4995.19 via Frontend Transport; Fri, 18 Feb 2022 08:20:00 +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.2176.14; Fri, 18 Feb 2022 00:19:56 -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.2176.14 via Frontend Transport; Fri, 18 Feb 2022 00:19:56 -0800 Envelope-to: git@xilinx.com, jagan@amarulasolutions.com, somaashokreddy@gmail.com, u-boot@lists.denx.de, vigneshr@ti.com Received: from [10.140.6.65] (port=40124 helo=xhdashokred41.localdomain) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from <ashokred@xhdashokred41.localdomain>) id 1nKyUd-000DDr-Rn; Fri, 18 Feb 2022 00:19:56 -0800 Received: by xhdashokred41.localdomain (Postfix, from userid 2896) id 149E1FFAFC; Fri, 18 Feb 2022 01:19:52 -0700 (MST) From: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com> To: <u-boot@lists.denx.de>, <jagan@amarulasolutions.com>, <vigneshr@ti.com> CC: <michal.simek@xilinx.com>, <git@xilinx.com>, <somaashokreddy@gmail.com>, Ashok Reddy Soma <ashok.reddy.soma@xilinx.com> Subject: [RFC PATCH] mtd: spi-nor-core: Set dummy buswidth equal to data buswidth Date: Fri, 18 Feb 2022 01:19:49 -0700 Message-ID: <20220218081949.5322-1-ashok.reddy.soma@xilinx.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 869bf8c9-9498-4af0-5575-08d9f2b774c2 X-MS-TrafficTypeDiagnostic: PH0PR02MB7799:EE_ X-Microsoft-Antispam-PRVS: <PH0PR02MB7799A5BFC86C03CFE60B4E80C8379@PH0PR02MB7799.namprd02.prod.outlook.com> X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4SWr+IlYlc8tBOOC3o0oOsRh6k/8wHHlG/4CndMKqza/X9U2TBiyLo6u7Ehygq9f0+XA2tifsRvvirpIaOwE9zeAT9ZAqKFpLkJmvieObV3u2hXsZf46WZLCFyP4qmV1Z+707tiLu4J4KfFNEmyGDyiwJuvxmHyEMTK9ZW4zg7wxXRh+bv1nC/mu3iQ4bukxAIYTo4inAxEhuW285YVak5MRYmlxLEPuN+mVHyvTg48Z7ZCqTb33flKea69X4PP/zTuCUIFBr25b/FHt08uNBJVjhMuBZf7iCxEDKTCe8xZrPycFBCga4XOj5iKAwLohX1VqI5TD63Q+V1bJAav4mIBLJPVqEtftNT1/7VdZL+Qy1xy47uPjsrKAJgl7S30Fb5Y/BCRjzKK5onZAcqnBA6GGOy0Xv/LuKHni+G8xm6KRceYDpa9rotnlrJmfYO43u6hWmUXLAqEs3BY9Ewwdu6iXX9ZvRORLAIlnpEvP+400EKXuzFQi7sruhtccPczXqK8zMzyZzIJN8J3Qxs8fXLQUgFjKpmK2GaR+5IEWn/w9CEVBpL5jYMnDUNLYFC4FxTarPUvyCqiMhrkZ3PFPEI/gd5Ip0mv4mgbt5cZ5JgP4a3GU59IlwiNpKssB9qLQzX53FLLpSiMa15XpkCs2e0QaOeMWWdBqIZIdaG3Aku+8FrhsvnirVLGGMILmmGnsodotpZOvVQg7v3Den+1jMfb0N8/csQLtITPQdDYL7HMxm21pGN6aEhnLHVl3FuQw59vUYndANT0p4Cqe0HZpwg== 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:(13230001)(4636009)(40470700004)(46966006)(1076003)(54906003)(35950700001)(47076005)(36756003)(966005)(5660300002)(70586007)(6266002)(336012)(110136005)(6666004)(42882007)(83380400001)(82310400004)(2616005)(26005)(103116003)(107886003)(2906002)(40460700003)(8936002)(7636003)(356005)(4326008)(316002)(83170400001)(42186006)(8676002)(508600001)(70206006); DIR:OUT; SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Feb 2022 08:20:00.0684 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 869bf8c9-9498-4af0-5575-08d9f2b774c2 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: SN1NAM02FT0045.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR02MB7799 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.5 at phobos.denx.de X-Virus-Status: Clean |
Series |
[RFC] mtd: spi-nor-core: Set dummy buswidth equal to data buswidth
|
expand
|
diff --git a/drivers/mtd/spi/spi-nor-core.c b/drivers/mtd/spi/spi-nor-core.c index a70fbda4bb..6849da9113 100644 --- a/drivers/mtd/spi/spi-nor-core.c +++ b/drivers/mtd/spi/spi-nor-core.c @@ -251,7 +251,7 @@ static void spi_nor_setup_op(const struct spi_nor *nor, op->addr.buswidth = spi_nor_get_protocol_addr_nbits(proto); if (op->dummy.nbytes) - op->dummy.buswidth = spi_nor_get_protocol_addr_nbits(proto); + op->dummy.buswidth = spi_nor_get_protocol_data_nbits(proto); if (op->data.nbytes) op->data.buswidth = spi_nor_get_protocol_data_nbits(proto);
In current implementation dummy buswidth is set equal to address buswidth. In case of quad spi (mode 1-1-4), where address width is 1 the dummy bytes will be calculated to 1(8 dummy cycles) and dummy buswidth is set to 1. Due to this, the controller driver will introduce 8 dummy cycles on data line(D0) during read operation. But since we are using 4 data lines in case of qspi, we need to change this dummy bus width to 4. This will make dummy bytes to 4 inplace of 1. This will be taken care in controller driver by dividing with dummy buswidth again as in below code, which makes dummy cycles to 8 as earlier. dummy_cycles = op->dummy.nbytes * 8 / op->dummy.buswidth; https://source.denx.de/u-boot/u-boot/-/blob/master/drivers/spi/zynqmp_gqspi.c#L511 So with this change dummy cycles will be on all data lines(D0-D3) and it is taken care for all the configurations(single, dual, quad and octal). SPI experts, please advice if this change is good. What is the reason we are using dummy bus width as address bus width so far ? I have tested this change on all xilinx platforms with single, quad and octal configurations. It works perfectly fine. I would appreciate if anyone can test on your board and give feedback. Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com> --- drivers/mtd/spi/spi-nor-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)