From patchwork Thu May 23 18:54:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 17178 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f69.google.com (mail-qa0-f69.google.com [209.85.216.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 719B92395B for ; Thu, 23 May 2013 18:55:47 +0000 (UTC) Received: by mail-qa0-f69.google.com with SMTP id j11sf4365982qag.4 for ; Thu, 23 May 2013 11:54:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-beenthere:x-forwarded-to:x-forwarded-for:delivered-to:from:to:cc :subject:date:message-id:x-mailer:mime-version:x-gm-message-state :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-google-group-id:list-post:list-help :list-archive:list-unsubscribe:content-type; bh=+zmxs0ILK5opOkbQhU6oHy5sewuWgw8iMsXLNie6gAc=; b=XoB0IYbv+3tbj1a9RjwScpsRTxBcFOcJJCnBtISUWtMFRMAsB/Wp1qMxTYXsuwOZHD RiqROROAThwQrYRun60gA8+liY9fX/BZgQqKgY9TYUq9l9DdYsPvr0IsNvDuGyLCei5b r6dhCm5GjAU+NqbP6G8z/iv0uG1ByhuA8uul/2BkiVcHh4dk+uo1VkPPFCJ3ieXPtZDU E2obqNY7p20d+kdU21ahSg2fFQ3pcf5NXhf/sW7mC3u/bLISe7xf+cLUmc7Dj0+orA4R gZsSVkPqHTUmewF1a/GIehySYTeE7K//3jad1hNGAevY4XGdp+Mr20EjtpEiezmlR2gS wxcA== X-Received: by 10.236.63.7 with SMTP id z7mr6311773yhc.4.1369335291771; Thu, 23 May 2013 11:54:51 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.42.69 with SMTP id m5ls1595913qel.51.gmail; Thu, 23 May 2013 11:54:51 -0700 (PDT) X-Received: by 10.52.240.211 with SMTP id wc19mr5380321vdc.12.1369335291548; Thu, 23 May 2013 11:54:51 -0700 (PDT) Received: from mail-vb0-x231.google.com (mail-vb0-x231.google.com [2607:f8b0:400c:c02::231]) by mx.google.com with ESMTPS id w7si7146954vci.3.2013.05.23.11.54.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 23 May 2013 11:54:51 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::231 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::231; Received: by mail-vb0-f49.google.com with SMTP id q13so222499vbe.22 for ; Thu, 23 May 2013 11:54:51 -0700 (PDT) X-Received: by 10.52.34.114 with SMTP id y18mr5319167vdi.56.1369335291204; Thu, 23 May 2013 11:54:51 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.126.138 with SMTP id c10csp65637vcs; Thu, 23 May 2013 11:54:50 -0700 (PDT) X-Received: by 10.14.87.9 with SMTP id x9mr34727660eee.3.1369335290059; Thu, 23 May 2013 11:54:50 -0700 (PDT) Received: from eu1sys200aog119.obsmtp.com (eu1sys200aog119.obsmtp.com [207.126.144.147]) by mx.google.com with SMTP id u46si9697597eeg.66.2013.05.23.11.54.44 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 23 May 2013 11:54:49 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.147 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.147; Received: from beta.dmz-eu.st.com ([164.129.1.35]) (using TLSv1) by eu1sys200aob119.postini.com ([207.126.147.11]) with SMTP ID DSNKUZ5l8whDZy/8vIjIslzDg7wQ3qEn6I2n@postini.com; Thu, 23 May 2013 18:54:49 UTC Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id DE5511DC; Thu, 23 May 2013 18:54:41 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id BCFAB54B9; Thu, 23 May 2013 18:54:26 +0000 (GMT) Received: from exdcvycastm022.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm022", Issuer "exdcvycastm022" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id ED87FA8074; Thu, 23 May 2013 20:54:33 +0200 (CEST) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.30) with Microsoft SMTP Server (TLS) id 8.3.279.5; Thu, 23 May 2013 20:54:41 +0200 From: Linus Walleij To: Grant Likely , Mark Brown , Cc: Arnd Bergmann , Linus Walleij Subject: [PATCH] spi: pl022: use DMA by default when probing from DT Date: Thu, 23 May 2013 20:54:37 +0200 Message-ID: <1369335277-9254-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.11.3 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQlvy4Hr5VGO9KAUo0UP5rO1wmtoLnQEvq3G7dCpA+p3EHosBCNaETeRgrPCGGqUiDy3zHj+ X-Original-Sender: linus.walleij@stericsson.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::231 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Linus Walleij In the past we controlled the selection of DMA for a certain host by a boolean switch in the platform data. Currently there is no way to enable DMA on a PL022 probed from the device tree. Let's default to trying to obtain DMA channels in the DT case, and then we can always fail (and thus fall back to PIO mode). Signed-off-by: Linus Walleij --- drivers/spi/spi-pl022.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c index 371cc66f..3b24654 100644 --- a/drivers/spi/spi-pl022.c +++ b/drivers/spi/spi-pl022.c @@ -2083,6 +2083,7 @@ pl022_platform_data_dt_get(struct device *dev) } pd->bus_id = -1; + pd->enable_dma = 1; of_property_read_u32(np, "num-cs", &tmp); pd->num_chipselect = tmp; of_property_read_u32(np, "pl022,autosuspend-delay",