Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B4DD3C433EF for ; Tue, 28 Jun 2022 10:01:52 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 553E183A24; Tue, 28 Jun 2022 12:01:50 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.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=ti.com header.i=@ti.com header.b="tFsLcTZh"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 216B383A26; Tue, 28 Jun 2022 12:01:49 +0200 (CEST) Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (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 B0897839CA for ; Tue, 28 Jun 2022 12:01:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=p.yadav@ti.com Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 25SA1iF5076539; Tue, 28 Jun 2022 05:01:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1656410504; bh=UYshhZWoWr/2GjyGwJ9FVmSDfiUbC5/x4BjQIonjc8c=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=tFsLcTZhu/KcEnsf96pif+FGT2xRWpVGfJlWka5qGu68TLN1ROYEtmgLks+ruIAcq WZk15i3nn8Uc94QQDaighM3FaYSLxMrqBT379ewfOM0/vE+D5oVwHL6njm2EFej2TO u8k5vplhht+oFisNf4KLsZdQC7PPdWC+WyDVdm7A= Received: from DLEE115.ent.ti.com (dlee115.ent.ti.com [157.170.170.26]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 25SA1isB054008 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 28 Jun 2022 05:01:44 -0500 Received: from DLEE111.ent.ti.com (157.170.170.22) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Tue, 28 Jun 2022 05:01:44 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14 via Frontend Transport; Tue, 28 Jun 2022 05:01:44 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 25SA1hx8020017; Tue, 28 Jun 2022 05:01:43 -0500 Date: Tue, 28 Jun 2022 15:31:42 +0530 From: Pratyush Yadav To: Vaishnav Achath CC: , , Subject: Re: [PATCH] mtd: spi-nor-core: Implement spi_nor_read_sfdp_dma_unsafe() for sfdp parse Message-ID: <20220628100142.4dxupehxk3iee5xc@ti.com> References: <20220603070132.29734-1-vaishnav.a@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20220603070132.29734-1-vaishnav.a@ti.com> X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.6 at phobos.denx.de X-Virus-Status: Clean On 03/06/22 12:31PM, Vaishnav Achath wrote: > During SFDP header parse and BFPT parse, structures in stack are used > to perform spi_nor_read_sfdp() which expects a dma-safe buffer. > > This commit introduces spi_nor_read_sfdp_dma_unsafe() to wrap > spi_nor_read_sfdp() using a kmalloc'ed bounce buffer which is > the same implementation in Linux (drivers/mtd/spi-nor/sfdp.c). > > Signed-off-by: Vaishnav Achath Reviewed-by: Pratyush Yadav -- Regards, Pratyush Yadav Texas Instruments Inc.