From patchwork Sun Jan 6 22:43:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 13839 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 6BCF123E2D for ; Sun, 6 Jan 2013 22:43:35 +0000 (UTC) Received: from mail-vb0-f44.google.com (mail-vb0-f44.google.com [209.85.212.44]) by fiordland.canonical.com (Postfix) with ESMTP id F069AA18608 for ; Sun, 6 Jan 2013 22:43:34 +0000 (UTC) Received: by mail-vb0-f44.google.com with SMTP id fc26so18553117vbb.17 for ; Sun, 06 Jan 2013 14:43:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:from:to:cc:subject:date:message-id:x-mailer :mime-version:content-type:x-gm-message-state; bh=JSjyImq3cAlB7u2hLul0GGScgkB1CCXF3HO+y4e663k=; b=JmioXYZaWgmk/TS+FET1+meAQbjezxrwD/6nfSDdZuek3Lae8ybMvcvsgnusuc50um p9Zzw+H0R6XIhByhlU/LJuVW1uJFHjJSEfXaODjdL8FhSgZxlR02d22zetepb/VRXAzI AFY2BdJLCjYWrs2Lw9wAdivqRJNRdrs98HAEy3Vqs3G9xg8jWYVr3gATr2jjWOueQ2ye c+SQcy/tlyeGQTJ++FQi2buPvDuj8Ci8/LD5K9dLa9FAnt7hxNbQJ/AvSB95CvI3RpMl 57+kXLFyc6G37Q8B1bYvKc2+EfV/wm2wPSaIpINa5F8abjXaHTdalN/IJBLdDjtyDCyh S1Ug== X-Received: by 10.220.238.139 with SMTP id ks11mr79619296vcb.49.1357512214314; Sun, 06 Jan 2013 14:43:34 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.145.101 with SMTP id st5csp37300veb; Sun, 6 Jan 2013 14:43:33 -0800 (PST) X-Received: by 10.14.0.133 with SMTP id 5mr160540386eeb.29.1357512212871; Sun, 06 Jan 2013 14:43:32 -0800 (PST) Received: from eu1sys200aog111.obsmtp.com (eu1sys200aog111.obsmtp.com [207.126.144.131]) by mx.google.com with SMTP id k48si154091725een.14.2013.01.06.14.43.27 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 06 Jan 2013 14:43:32 -0800 (PST) Received-SPF: neutral (google.com: 207.126.144.131 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.131; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.131 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) smtp.mail=linus.walleij@stericsson.com Received: from beta.dmz-ap.st.com ([138.198.100.35]) (using TLSv1) by eu1sys200aob111.postini.com ([207.126.147.11]) with SMTP ID DSNKUOn+C4VOWTcd/MB8lmlJPirasAKYr81O@postini.com; Sun, 06 Jan 2013 22:43:31 UTC Received: from zeta.dmz-ap.st.com (ns6.st.com [138.198.234.13]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 527CED1; Sun, 6 Jan 2013 22:35:10 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 1F8DEAFB; Sun, 6 Jan 2013 22:43:19 +0000 (GMT) Received: from exdcvycastm004.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm004", Issuer "exdcvycastm004" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id E2399A8072; Sun, 6 Jan 2013 23:43:09 +0100 (CET) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.2) with Microsoft SMTP Server (TLS) id 8.3.83.0; Sun, 6 Jan 2013 23:43:18 +0100 From: Linus Walleij To: Vinod Koul Cc: , Dan Williams , Anmar Oueja , Linus Walleij Subject: [PATCH 1/8] dma: coh901318: create a proper platform data file Date: Sun, 6 Jan 2013 23:43:15 +0100 Message-ID: <1357512195-5602-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: ALoCoQn24Dj/8Cp+m+FXyywubC5TPtHJS8/I8HrToshnlhSwU0F8D5sZ1V1dyg5YLOR9FjhoWLk0 From: Linus Walleij This extracts the platform data that we will keep generic from the U300 platform and associates it with the COH901318 driver in . Signed-off-by: Linus Walleij --- arch/arm/mach-u300/core.c | 2 +- arch/arm/mach-u300/dma_channels.h | 60 ------------------------ arch/arm/mach-u300/include/mach/coh901318.h | 16 ------- arch/arm/mach-u300/spi.c | 2 +- drivers/dma/coh901318.c | 1 + include/linux/platform_data/dma-coh901318.h | 72 +++++++++++++++++++++++++++++ 6 files changed, 75 insertions(+), 78 deletions(-) delete mode 100644 arch/arm/mach-u300/dma_channels.h create mode 100644 include/linux/platform_data/dma-coh901318.h diff --git a/arch/arm/mach-u300/core.c b/arch/arm/mach-u300/core.c index 4ce77cd..0951b51 100644 --- a/arch/arm/mach-u300/core.c +++ b/arch/arm/mach-u300/core.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -49,7 +50,6 @@ #include "spi.h" #include "i2c.h" #include "u300-gpio.h" -#include "dma_channels.h" /* * Static I/O mappings that are needed for booting the U300 platforms. The diff --git a/arch/arm/mach-u300/dma_channels.h b/arch/arm/mach-u300/dma_channels.h deleted file mode 100644 index 4e8a88f..0000000 --- a/arch/arm/mach-u300/dma_channels.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * - * arch/arm/mach-u300/include/mach/dma_channels.h - * - * - * Copyright (C) 2007-2012 ST-Ericsson - * License terms: GNU General Public License (GPL) version 2 - * Map file for the U300 dma driver. - * Author: Per Friden - */ - -#ifndef DMA_CHANNELS_H -#define DMA_CHANNELS_H - -#define U300_DMA_MSL_TX_0 0 -#define U300_DMA_MSL_TX_1 1 -#define U300_DMA_MSL_TX_2 2 -#define U300_DMA_MSL_TX_3 3 -#define U300_DMA_MSL_TX_4 4 -#define U300_DMA_MSL_TX_5 5 -#define U300_DMA_MSL_TX_6 6 -#define U300_DMA_MSL_RX_0 7 -#define U300_DMA_MSL_RX_1 8 -#define U300_DMA_MSL_RX_2 9 -#define U300_DMA_MSL_RX_3 10 -#define U300_DMA_MSL_RX_4 11 -#define U300_DMA_MSL_RX_5 12 -#define U300_DMA_MSL_RX_6 13 -#define U300_DMA_MMCSD_RX_TX 14 -#define U300_DMA_MSPRO_TX 15 -#define U300_DMA_MSPRO_RX 16 -#define U300_DMA_UART0_TX 17 -#define U300_DMA_UART0_RX 18 -#define U300_DMA_APEX_TX 19 -#define U300_DMA_APEX_RX 20 -#define U300_DMA_PCM_I2S0_TX 21 -#define U300_DMA_PCM_I2S0_RX 22 -#define U300_DMA_PCM_I2S1_TX 23 -#define U300_DMA_PCM_I2S1_RX 24 -#define U300_DMA_XGAM_CDI 25 -#define U300_DMA_XGAM_PDI 26 -#define U300_DMA_SPI_TX 27 -#define U300_DMA_SPI_RX 28 -#define U300_DMA_GENERAL_PURPOSE_0 29 -#define U300_DMA_GENERAL_PURPOSE_1 30 -#define U300_DMA_GENERAL_PURPOSE_2 31 -#define U300_DMA_GENERAL_PURPOSE_3 32 -#define U300_DMA_GENERAL_PURPOSE_4 33 -#define U300_DMA_GENERAL_PURPOSE_5 34 -#define U300_DMA_GENERAL_PURPOSE_6 35 -#define U300_DMA_GENERAL_PURPOSE_7 36 -#define U300_DMA_GENERAL_PURPOSE_8 37 -#define U300_DMA_UART1_TX 38 -#define U300_DMA_UART1_RX 39 - -#define U300_DMA_DEVICE_CHANNELS 32 -#define U300_DMA_CHANNELS 40 - - -#endif /* DMA_CHANNELS_H */ diff --git a/arch/arm/mach-u300/include/mach/coh901318.h b/arch/arm/mach-u300/include/mach/coh901318.h index 7c3b2b2..fc47d30 100644 --- a/arch/arm/mach-u300/include/mach/coh901318.h +++ b/arch/arm/mach-u300/include/mach/coh901318.h @@ -102,22 +102,6 @@ struct coh901318_platform { const int max_channels; }; -#ifdef CONFIG_COH901318 -/** - * coh901318_filter_id() - DMA channel filter function - * @chan: dma channel handle - * @chan_id: id of dma channel to be filter out - * - * In dma_request_channel() it specifies what channel id to be requested - */ -bool coh901318_filter_id(struct dma_chan *chan, void *chan_id); -#else -static inline bool coh901318_filter_id(struct dma_chan *chan, void *chan_id) -{ - return false; -} -#endif - /* * DMA Controller - this access the static mappings of the coh901318 dma. * diff --git a/arch/arm/mach-u300/spi.c b/arch/arm/mach-u300/spi.c index 02e6659..b34567f 100644 --- a/arch/arm/mach-u300/spi.c +++ b/arch/arm/mach-u300/spi.c @@ -10,9 +10,9 @@ #include #include #include +#include #include #include -#include "dma_channels.h" /* * The following is for the actual devices on the SSP/SPI bus diff --git a/drivers/dma/coh901318.c b/drivers/dma/coh901318.c index aa384e5..5fdd38b 100644 --- a/drivers/dma/coh901318.c +++ b/drivers/dma/coh901318.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include "coh901318_lli.h" diff --git a/include/linux/platform_data/dma-coh901318.h b/include/linux/platform_data/dma-coh901318.h new file mode 100644 index 0000000..c4cb959 --- /dev/null +++ b/include/linux/platform_data/dma-coh901318.h @@ -0,0 +1,72 @@ +/* + * Platform data for the COH901318 DMA controller + * Copyright (C) 2007-2013 ST-Ericsson + * License terms: GNU General Public License (GPL) version 2 + */ + +#ifndef PLAT_COH901318_H +#define PLAT_COH901318_H + +#ifdef CONFIG_COH901318 + +/* We only support the U300 DMA channels */ +#define U300_DMA_MSL_TX_0 0 +#define U300_DMA_MSL_TX_1 1 +#define U300_DMA_MSL_TX_2 2 +#define U300_DMA_MSL_TX_3 3 +#define U300_DMA_MSL_TX_4 4 +#define U300_DMA_MSL_TX_5 5 +#define U300_DMA_MSL_TX_6 6 +#define U300_DMA_MSL_RX_0 7 +#define U300_DMA_MSL_RX_1 8 +#define U300_DMA_MSL_RX_2 9 +#define U300_DMA_MSL_RX_3 10 +#define U300_DMA_MSL_RX_4 11 +#define U300_DMA_MSL_RX_5 12 +#define U300_DMA_MSL_RX_6 13 +#define U300_DMA_MMCSD_RX_TX 14 +#define U300_DMA_MSPRO_TX 15 +#define U300_DMA_MSPRO_RX 16 +#define U300_DMA_UART0_TX 17 +#define U300_DMA_UART0_RX 18 +#define U300_DMA_APEX_TX 19 +#define U300_DMA_APEX_RX 20 +#define U300_DMA_PCM_I2S0_TX 21 +#define U300_DMA_PCM_I2S0_RX 22 +#define U300_DMA_PCM_I2S1_TX 23 +#define U300_DMA_PCM_I2S1_RX 24 +#define U300_DMA_XGAM_CDI 25 +#define U300_DMA_XGAM_PDI 26 +#define U300_DMA_SPI_TX 27 +#define U300_DMA_SPI_RX 28 +#define U300_DMA_GENERAL_PURPOSE_0 29 +#define U300_DMA_GENERAL_PURPOSE_1 30 +#define U300_DMA_GENERAL_PURPOSE_2 31 +#define U300_DMA_GENERAL_PURPOSE_3 32 +#define U300_DMA_GENERAL_PURPOSE_4 33 +#define U300_DMA_GENERAL_PURPOSE_5 34 +#define U300_DMA_GENERAL_PURPOSE_6 35 +#define U300_DMA_GENERAL_PURPOSE_7 36 +#define U300_DMA_GENERAL_PURPOSE_8 37 +#define U300_DMA_UART1_TX 38 +#define U300_DMA_UART1_RX 39 + +#define U300_DMA_DEVICE_CHANNELS 32 +#define U300_DMA_CHANNELS 40 + +/** + * coh901318_filter_id() - DMA channel filter function + * @chan: dma channel handle + * @chan_id: id of dma channel to be filter out + * + * In dma_request_channel() it specifies what channel id to be requested + */ +bool coh901318_filter_id(struct dma_chan *chan, void *chan_id); +#else +static inline bool coh901318_filter_id(struct dma_chan *chan, void *chan_id) +{ + return false; +} +#endif + +#endif /* PLAT_COH901318_H */