From patchwork Sun Mar 15 14:36:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshihiro Kaneko X-Patchwork-Id: 6013151 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7FCEABF90F for ; Sun, 15 Mar 2015 14:36:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A33AA202EC for ; Sun, 15 Mar 2015 14:36:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C148B20268 for ; Sun, 15 Mar 2015 14:36:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752491AbbCOOgq (ORCPT ); Sun, 15 Mar 2015 10:36:46 -0400 Received: from mail-pd0-f176.google.com ([209.85.192.176]:35476 "EHLO mail-pd0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752440AbbCOOgp (ORCPT ); Sun, 15 Mar 2015 10:36:45 -0400 Received: by pdbop1 with SMTP id op1so32684296pdb.2; Sun, 15 Mar 2015 07:36:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=ToaBqXAtvdB00ma0mYwiVonB0ya8MsBLW8uhCNnXRwY=; b=U2pmfP4/n1JULYOjOMHbdgFiySdQLH2mhg6zgpAIvANbsidbTSduw0WZ/vuDtF/xpb GLFw3dce3Y2aF3IMNyxn7Lg32Ksa9T1hyh3s+geVCXuBpjy39rE2ZffvzzyIhRn9Bbb9 gtjyLKjzGRb0vDGc/3kFM7KlBZrS/9xfl5kbw/Dmsj5ZygNXEz5CWJPQc9pY8MVgJdJo /9+NmkEnLQo1EKN21gZc3E5ZnDEIZcoh7w+boR/8YeVc3oqIUCxBte5CIwAHvg2Ktb61 MY1kn1nBqLz3XD17mFTO2UKTXGIadhWtCoxl9FzYzvEymG8ukH6I7SC84+e/I13I8N9e eeCA== X-Received: by 10.70.131.15 with SMTP id oi15mr125690424pdb.161.1426430205159; Sun, 15 Mar 2015 07:36:45 -0700 (PDT) Received: from localhost.localdomain (KD118152108246.ppp-bb.dion.ne.jp. [118.152.108.246]) by mx.google.com with ESMTPSA id nj5sm12697972pdb.24.2015.03.15.07.36.43 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 15 Mar 2015 07:36:44 -0700 (PDT) From: Yoshihiro Kaneko To: linux-spi@vger.kernel.org Cc: Geert Uytterhoeven , Mark Brown , Simon Horman , Magnus Damm , linux-sh@vger.kernel.org Subject: [PATCH/RFC] spi: sh-msiof: Fix MSIOF address for DMAC Date: Sun, 15 Mar 2015 23:36:32 +0900 Message-Id: <1426430192-3271-1-git-send-email-ykaneko0929@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Ryo Kataoka MSIOF Base Address H'E6xx can be accessed by CPU and DMAC. MSIOF Base Address H'E7xx for DMAC was removed from H/W manual. Signed-off-by: Ryo Kataoka Signed-off-by: Yoshihiro Kaneko --- Hi Geert-san, I have also found patches to address this problem in DTS files which seems to be a good way to handle this problem. I plan to send them separately. I'm unsure if this driver change is also appropriate. This patch is based on the for-next branch of Mark Brown's spi tree. drivers/spi/spi-sh-msiof.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c index e57eec0..88ec049 100644 --- a/drivers/spi/spi-sh-msiof.c +++ b/drivers/spi/spi-sh-msiof.c @@ -1,6 +1,7 @@ /* * SuperH MSIOF SPI Master Interface * + * Copyright (C) 2014-2015 Renesas Electronics Corporation * Copyright (c) 2009 Magnus Damm * Copyright (C) 2014 Glider bvba * @@ -1072,10 +1073,7 @@ static int sh_msiof_request_dma(struct sh_msiof_spi_priv *p) return 0; } - /* The DMA engine uses the second register set, if present */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 1); - if (!res) - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); master = p->master; master->dma_tx = sh_msiof_request_dma_chan(dev, DMA_MEM_TO_DEV,