From patchwork Mon Feb 27 12:08:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vignesh Raghavendra X-Patchwork-Id: 9593043 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AACF5601D7 for ; Mon, 27 Feb 2017 12:14:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A0E63283C2 for ; Mon, 27 Feb 2017 12:14:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 95B0828488; Mon, 27 Feb 2017 12:14:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 29FDC283C2 for ; Mon, 27 Feb 2017 12:14:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752012AbdB0MOI (ORCPT ); Mon, 27 Feb 2017 07:14:08 -0500 Received: from fllnx209.ext.ti.com ([198.47.19.16]:45883 "EHLO fllnx209.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751654AbdB0MOH (ORCPT ); Mon, 27 Feb 2017 07:14:07 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id v1RC9HEV002348; Mon, 27 Feb 2017 06:09:17 -0600 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id v1RC9Ck2016864; Mon, 27 Feb 2017 06:09:12 -0600 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.294.0; Mon, 27 Feb 2017 06:09:12 -0600 Received: from a0132425.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v1RC90lM014396; Mon, 27 Feb 2017 06:09:08 -0600 From: Vignesh R To: David Woodhouse , Brian Norris , Boris Brezillon , Marek Vasut , Richard Weinberger , Cyrille Pitchen CC: , , , Vignesh R , Frode Isaksen , Subject: [RFC PATCH 2/2] mtd: devices: m25p80: Enable spi-nor bounce buffer support Date: Mon, 27 Feb 2017 17:38:39 +0530 Message-ID: <20170227120839.16545-3-vigneshr@ti.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170227120839.16545-1-vigneshr@ti.com> References: <20170227120839.16545-1-vigneshr@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Many SPI controller drivers use DMA to read/write from m25p80 compatible flashes. Therefore enable bounce buffers support provided by spi-nor framework to take care of handling vmalloc'd buffers which may not be DMA'able. Signed-off-by: Vignesh R --- drivers/mtd/devices/m25p80.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c index c4df3b1bded0..d05acf22eadf 100644 --- a/drivers/mtd/devices/m25p80.c +++ b/drivers/mtd/devices/m25p80.c @@ -241,6 +241,7 @@ static int m25p_probe(struct spi_device *spi) else flash_name = spi->modalias; + nor->flags |= SNOR_F_USE_BOUNCE_BUFFER; ret = spi_nor_scan(nor, flash_name, mode); if (ret) return ret;