From patchwork Wed Jul 18 08:49:52 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 1209421 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 31941DFFFD for ; Wed, 18 Jul 2012 08:56:05 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1SrPyr-0004g4-BS; Wed, 18 Jul 2012 08:51:37 +0000 Received: from mail-gh0-f177.google.com ([209.85.160.177]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1SrPxY-0004U4-UD for linux-arm-kernel@lists.infradead.org; Wed, 18 Jul 2012 08:50:36 +0000 Received: by ghbf11 with SMTP id f11so1408203ghb.36 for ; Wed, 18 Jul 2012 01:50:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=YWx0l1UeedWM1ioHkRV7aJqJioW8nJpDysvgwR1TaYk=; b=zsmmPi4aHFx0Y720r6BiREGTMxrCfsOA23p/L/ivGBgK0cX+E397/ocYI2QmhQS0rB Rx3aotyL5uHyHBrnL6OV+huYYSczP4PrvKLdXQO+T4QUfZi2fveNPZl/4APTSZ90dwyF 9YRz2oW4rI7jA+fZygIMrb0DAU7VJGHXBzzyzvtG8YRT60E/Ac7Z1GqpWOpY981cpvuU UxhpalPLkEEOEyyp9WT7H4S24/y1tBw47zIL8waGRtRLDncoodw7d9Dvy0QGn0XoW4O/ aRsC1jdVSjEPGKSYZxHhMS/U9U89PqS1F7fIShlh37Mc0/N/F8SVsU9NBXdKb7yeAyau 5L2w== Received: by 10.236.185.165 with SMTP id u25mr31046yhm.67.1342601413153; Wed, 18 Jul 2012 01:50:13 -0700 (PDT) MIME-Version: 1.0 Received: by 10.236.9.101 with HTTP; Wed, 18 Jul 2012 01:49:52 -0700 (PDT) In-Reply-To: References: <1342485005-5178-1-git-send-email-javier@dowhile0.org> <20120718065951.GH6522@atomide.com> <20120718071039.GI6522@atomide.com> From: Javier Martinez Canillas Date: Wed, 18 Jul 2012 10:49:52 +0200 Message-ID: Subject: Re: [PATCH 1/1] mmc: host: enable OMAP DMA engine support for omap hosts by default To: "Shilimkar, Santosh" X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (martinez.javier[at]gmail.com) -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.160.177 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Kevin Hilman , linux-omap@vger.kernel.org, Russell King , Tony Lindgren , linux-mmc@vger.kernel.org, Chris Ball , Javier Martinez Canillas , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org On Wed, Jul 18, 2012 at 10:36 AM, Shilimkar, Santosh wrote: > On Wed, Jul 18, 2012 at 1:14 PM, S, Venkatraman wrote: >> On Wed, Jul 18, 2012 at 12:40 PM, Tony Lindgren wrote: >>> * Shilimkar, Santosh [120718 00:09]: >>>> On Wed, Jul 18, 2012 at 12:29 PM, Tony Lindgren wrote: >>>> > * Javier Martinez Canillas [120716 23:56]: >>>> >> On Tue, Jul 17, 2012 at 8:45 AM, Shilimkar, Santosh >>>> >> wrote: >>>> >> > Hi, >>>> >> > >>>> >> > On Tue, Jul 17, 2012 at 6:00 AM, Javier Martinez Canillas >>>> >> > wrote: >>>> >> >> The OMAP MMC and OMAP High Speed MMC hosts now use entirely the DMA >>>> >> >> engine API instead of the previous private DMA API implementation. >>>> >> >> >>>> >> >> So, if the kernel is built with support for any of these hosts but it >>>> >> >> doesn't support DMA devices nor OMAP DMA support, it fails when trying >>>> >> >> to obtain a DMA channel which leads to the following error on an OMAP3 >>>> >> >> IGEPv2 Rev.C board (and probably on most OMAP boards with MMC support): >>>> >> >> >>>> >> >> [ 2.199981] omap_hsmmc omap_hsmmc.1: unable to obtain RX DMA engine channel 48 >>>> >> >> [ 2.215087] omap_hsmmc omap_hsmmc.0: unable to obtain RX DMA engine channel 62 >>>> >> >> >>>> >> >> selecting automatically CONFIG_DMADEVICES and CONFIG_DMA_OMAP solves it. >>>> >> >> >>>> >> >> Signed-off-by: Javier Martinez Canillas >>>> >> >> --- >>>> >> > Considering, we are updating drivers to select the DMA engine, can you >>>> >> > also include >>>> >> > "drivers/spi/spi-omap2-mcspi.c" which is also updated for DMA engine. >>>> >> > >>>> >> > Regards >>>> >> > Santosh >>>> >> >>>> >> Hi Santosh, >>>> >> >>>> >> Ok, I'll send a v2 now which includes spi-omap2-mcspi then. >>>> > >>>> > I don't think we should do this, the drivers should work with and without >>>> > dma. This just needs to be added to the omap2plus_defconfig. >>>> > >>>> Well this was not decided based on any DMA CONFIG option before for >>>> the subject drivers. It is already by default enabled if the DMA is supported >>>> by the driver IP. There is a possibility to disable it from driver platform/dt >>>> data so that still remains. >>> >>> I think it should rather be that if the driver is broken and does not work >>> without DMA, it should have depends on CONFIG_DMA_OMAP. >>> >> I can confirm that omap MMC can't work without DMA; polled mode is not >> supported / implemented. > > Same case for SPI driver as well. It uses DMA for everything except the cases > where DMA doesn't make sense like 1 byte/2 byte etc. And its not configurable, > > At least considering this, it is better we do this per driver than enabling > it at SOC config. > > Regards > Santosh > -- Hi Santosh, And what about enabling it at the SoC config level but making the drivers dependant on CONFIG_DMADEVICES and CONFIG_DMA_OMAP? If you agree I can send something like this in two different patches (one for the omap2plus_defconfig and another to make the drivers dependant on the config option): Best regards, Javier diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig index b152de7..e58edc3 100644 --- a/arch/arm/configs/omap2plus_defconfig +++ b/arch/arm/configs/omap2plus_defconfig @@ -193,6 +193,8 @@ CONFIG_MMC_OMAP_HS=y CONFIG_RTC_CLASS=y CONFIG_RTC_DRV_TWL92330=y CONFIG_RTC_DRV_TWL4030=y +CONFIG_DMADEVICES=y +CONFIG_DMA_OMAP=y CONFIG_EXT2_FS=y CONFIG_EXT3_FS=y # CONFIG_EXT3_FS_XATTR is not set diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig index aa131b3..314c7bd 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -231,7 +231,7 @@ config MMC_SDHCI_S3C_DMA config MMC_OMAP tristate "TI OMAP Multimedia Card Interface support" - depends on ARCH_OMAP + depends on ARCH_OMAP && DMADEVICES && DMA_OMAP select TPS65010 if MACH_OMAP_H2 help This selects the TI OMAP Multimedia card Interface. @@ -242,7 +242,8 @@ config MMC_OMAP config MMC_OMAP_HS tristate "TI OMAP High Speed Multimedia Card Interface support" - depends on SOC_OMAP2430 || ARCH_OMAP3 || ARCH_OMAP4 + depends on (SOC_OMAP2430 || ARCH_OMAP3 || ARCH_OMAP4) && \ + DMADEVICES && DMA_OMAP help This selects the TI OMAP High Speed Multimedia card Interface. If you have an OMAP2430 or OMAP3 board or OMAP4 board with a diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index cd2fe35..1c23242 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -237,7 +237,7 @@ config SPI_OMAP_UWIRE config SPI_OMAP24XX tristate "McSPI driver for OMAP" - depends on ARCH_OMAP2PLUS + depends on ARCH_OMAP2PLUS && DMADEVICES && DMA_OMAP help SPI master controller for OMAP24XX and later Multichannel SPI (McSPI) modules.