From patchwork Wed May 29 06:42:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Shiyan X-Patchwork-Id: 2627981 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork1.kernel.org (Postfix) with ESMTP id 99B263FC23 for ; Wed, 29 May 2013 06:43:12 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Uha6E-0001rW-Hl; Wed, 29 May 2013 06:43:06 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Uha6C-0005wT-1Q; Wed, 29 May 2013 06:43:04 +0000 Received: from smtp29.i.mail.ru ([94.100.177.89]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Uha67-0005vw-Ob for linux-arm-kernel@lists.infradead.org; Wed, 29 May 2013 06:43:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail2; h=Message-Id:Date:Subject:Cc:To:From; bh=heGQYQMLhhzpIaZxVXZrfitpHlsUWgExZPHECCL0QAg=; b=QtzTjPkg1Nq6IfQCKbSdwfAnjryDVVFqxkBbmp/XJsRG0qPyZ6WA6t50zlhUiZKfzXvpYhzgGQUkG1TKcKblpGJpm+eI0JBKBTaDDoSPgMtqecjMfSNERdV4I705gzCRrUECGzv2rtR19ENzO8/HMqOi2yZltGYPf4cvoCLxyuE=; Received: from [217.119.30.118] (port=47583 helo=shc.milas.spb.ru) by smtp29.i.mail.ru with esmtpa (envelope-from ) id 1Uha5k-0002kz-8f; Wed, 29 May 2013 10:42:36 +0400 From: Alexander Shiyan To: linux-spi@vger.kernel.org Subject: [PATCH] SPI: Unify simple platform data for some controllers Date: Wed, 29 May 2013 10:42:22 +0400 Message-Id: <1369809742-4220-1-git-send-email-shc_work@mail.ru> X-Mailer: git-send-email 1.8.1.5 X-Spam: Not detected X-Mras: Ok X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130529_024300_537868_720502F9 X-CRM114-Status: GOOD ( 17.06 ) X-Spam-Score: -1.2 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (shc_work[at]mail.ru) 0.8 RCVD_IN_SORBS_WEB RBL: SORBS: sender is an abusable web server [217.119.30.118 listed in dnsbl.sorbs.net] -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: Alexander Shiyan , Arnd Bergmann , Olof Johansson , Mark Brown , Sascha Hauer , Grant Likely , Shawn Guo , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org This patch unifies simple pdata for some SPI controllers where only array of GPIOs is used for define chipselects. Signed-off-by: Alexander Shiyan Acked-by: Shawn Guo --- arch/arm/mach-imx/devices/devices-common.h | 4 ++-- arch/arm/mach-imx/devices/platform-spi_imx.c | 2 +- arch/arm/mach-imx/eukrea_mbimx27-baseboard.c | 2 +- arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c | 2 +- arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c | 2 +- arch/arm/mach-imx/hardware.h | 11 ++++++++++ arch/arm/mach-imx/mach-cpuimx51sd.c | 2 +- arch/arm/mach-imx/mach-mx27_3ds.c | 4 ++-- arch/arm/mach-imx/mach-mx31_3ds.c | 4 ++-- arch/arm/mach-imx/mach-mx31lilly.c | 4 ++-- arch/arm/mach-imx/mach-mx31lite.c | 2 +- arch/arm/mach-imx/mach-mx31moboard.c | 4 ++-- arch/arm/mach-imx/mach-mx51_babbage.c | 2 +- arch/arm/mach-imx/mach-pca100.c | 2 +- arch/arm/mach-imx/mach-pcm037_eet.c | 2 +- arch/arm/mach-imx/mach-pcm038.c | 2 +- arch/arm/mach-imx/mx31lite-db.c | 2 +- drivers/spi/spi-clps711x.c | 4 ++-- drivers/spi/spi-imx.c | 4 ++-- include/linux/platform_data/spi-clps711x.h | 21 ------------------- include/linux/platform_data/spi-generic-pdata.h | 14 +++++++++++++ include/linux/platform_data/spi-imx.h | 27 ------------------------- 22 files changed, 50 insertions(+), 73 deletions(-) delete mode 100644 include/linux/platform_data/spi-clps711x.h create mode 100644 include/linux/platform_data/spi-generic-pdata.h delete mode 100644 include/linux/platform_data/spi-imx.h diff --git a/arch/arm/mach-imx/devices/devices-common.h b/arch/arm/mach-imx/devices/devices-common.h index 453e20b..2f32b79 100644 --- a/arch/arm/mach-imx/devices/devices-common.h +++ b/arch/arm/mach-imx/devices/devices-common.h @@ -328,7 +328,7 @@ struct platform_device *__init imx_add_sdhci_esdhc_imx( const struct imx_sdhci_esdhc_imx_data *data, const struct esdhc_platform_data *pdata); -#include +#include struct imx_spi_imx_data { const char *devid; int id; @@ -338,7 +338,7 @@ struct imx_spi_imx_data { }; struct platform_device *__init imx_add_spi_imx( const struct imx_spi_imx_data *data, - const struct spi_imx_master *pdata); + const struct spi_generic_pdata *pdata); struct platform_device *imx_add_imx_dma(char *name, resource_size_t iobase, int irq, int irq_err); diff --git a/arch/arm/mach-imx/devices/platform-spi_imx.c b/arch/arm/mach-imx/devices/platform-spi_imx.c index 8880bcb..f33a49f 100644 --- a/arch/arm/mach-imx/devices/platform-spi_imx.c +++ b/arch/arm/mach-imx/devices/platform-spi_imx.c @@ -108,7 +108,7 @@ const struct imx_spi_imx_data imx53_ecspi_data[] __initconst = { struct platform_device *__init imx_add_spi_imx( const struct imx_spi_imx_data *data, - const struct spi_imx_master *pdata) + const struct spi_generic_pdata *pdata) { struct resource res[] = { { diff --git a/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c b/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c index b2f08bf..40d7c7c 100644 --- a/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c +++ b/arch/arm/mach-imx/eukrea_mbimx27-baseboard.c @@ -273,7 +273,7 @@ static struct spi_board_info __maybe_unused static int eukrea_mbimx27_spi_cs[] = {GPIO_PORTD | 28}; -static const struct spi_imx_master eukrea_mbimx27_spi0_data __initconst = { +static const struct spi_generic_pdata eukrea_mbimx27_spi0_data __initconst = { .chipselect = eukrea_mbimx27_spi_cs, .num_chipselect = ARRAY_SIZE(eukrea_mbimx27_spi_cs), }; diff --git a/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c b/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c index e2b70f4c..ab65190 100644 --- a/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c +++ b/arch/arm/mach-imx/eukrea_mbimxsd25-baseboard.c @@ -258,7 +258,7 @@ static struct spi_board_info eukrea_mbimxsd25_spi_board_info[] __initdata = { static int eukrea_mbimxsd25_spi_cs[] = {GPIO_SPI1_SS0, GPIO_SPI1_SS1}; -static const struct spi_imx_master eukrea_mbimxsd25_spi0_data __initconst = { +static const struct spi_generic_pdata eukrea_mbimxsd25_spi0_data __initconst = { .chipselect = eukrea_mbimxsd25_spi_cs, .num_chipselect = ARRAY_SIZE(eukrea_mbimxsd25_spi_cs), }; diff --git a/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c b/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c index 5a2d5ef..e6ffb7d 100644 --- a/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c +++ b/arch/arm/mach-imx/eukrea_mbimxsd35-baseboard.c @@ -264,7 +264,7 @@ static struct spi_board_info eukrea_mbimxsd35_spi_board_info[] __initdata = { static int eukrea_mbimxsd35_spi_cs[] = {GPIO_SPI1_SS0, GPIO_SPI1_SS1}; -static const struct spi_imx_master eukrea_mbimxsd35_spi0_data __initconst = { +static const struct spi_generic_pdata eukrea_mbimxsd35_spi0_data __initconst = { .chipselect = eukrea_mbimxsd35_spi_cs, .num_chipselect = ARRAY_SIZE(eukrea_mbimxsd35_spi_cs), }; diff --git a/arch/arm/mach-imx/hardware.h b/arch/arm/mach-imx/hardware.h index a3b0b04..d3b5a59 100644 --- a/arch/arm/mach-imx/hardware.h +++ b/arch/arm/mach-imx/hardware.h @@ -125,4 +125,15 @@ /* range e.g. GPIO_1_5 is gpio 5 under linux */ #define IMX_GPIO_NR(bank, nr) (((bank) - 1) * 32 + (nr)) +/* Macro for using internal CSPI chipselects. Normally you */ +/* want to use gpio based chip selects as the CSPI module tries to be */ +/* intelligent about when to assert the chipselect: The CSPI module */ +/* deasserts the chipselect once it runs out of input data. The other */ +/* problem that it is not possible to mix between high active and low */ +/* active chipselects on one single bus using the internal chipselects. */ +/* Unfortunately Freescale decided to put some chipselects on dedicated */ +/* pins which are not usable as gpios, so we have to support the internal */ +/* chipselects. */ +#define MXC_SPI_CS(no) ((no) - 32) + #endif /* __ASM_ARCH_MXC_HARDWARE_H__ */ diff --git a/arch/arm/mach-imx/mach-cpuimx51sd.c b/arch/arm/mach-imx/mach-cpuimx51sd.c index 9b5ddf5..7950151 100644 --- a/arch/arm/mach-imx/mach-cpuimx51sd.c +++ b/arch/arm/mach-imx/mach-cpuimx51sd.c @@ -264,7 +264,7 @@ static int cpuimx51sd_spi1_cs[] = { CAN_NCS, }; -static const struct spi_imx_master cpuimx51sd_ecspi1_pdata __initconst = { +static const struct spi_generic_pdata cpuimx51sd_ecspi1_pdata __initconst = { .chipselect = cpuimx51sd_spi1_cs, .num_chipselect = ARRAY_SIZE(cpuimx51sd_spi1_cs), }; diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c index 25b3e4c..2e7cf1c 100644 --- a/arch/arm/mach-imx/mach-mx27_3ds.c +++ b/arch/arm/mach-imx/mach-mx27_3ds.c @@ -357,14 +357,14 @@ static struct imx_ssi_platform_data mx27_3ds_ssi_pdata = { /* SPI */ static int spi1_chipselect[] = {SPI1_SS0}; -static const struct spi_imx_master spi1_pdata __initconst = { +static const struct spi_generic_pdata spi1_pdata __initconst = { .chipselect = spi1_chipselect, .num_chipselect = ARRAY_SIZE(spi1_chipselect), }; static int spi2_chipselect[] = {SPI2_SS0}; -static const struct spi_imx_master spi2_pdata __initconst = { +static const struct spi_generic_pdata spi2_pdata __initconst = { .chipselect = spi2_chipselect, .num_chipselect = ARRAY_SIZE(spi2_chipselect), }; diff --git a/arch/arm/mach-imx/mach-mx31_3ds.c b/arch/arm/mach-imx/mach-mx31_3ds.c index 1ed9161..2ac1974 100644 --- a/arch/arm/mach-imx/mach-mx31_3ds.c +++ b/arch/arm/mach-imx/mach-mx31_3ds.c @@ -510,7 +510,7 @@ static int spi0_internal_chipselect[] = { MXC_SPI_CS(2), }; -static const struct spi_imx_master spi0_pdata __initconst = { +static const struct spi_generic_pdata spi0_pdata __initconst = { .chipselect = spi0_internal_chipselect, .num_chipselect = ARRAY_SIZE(spi0_internal_chipselect), }; @@ -520,7 +520,7 @@ static int spi1_internal_chipselect[] = { MXC_SPI_CS(2), }; -static const struct spi_imx_master spi1_pdata __initconst = { +static const struct spi_generic_pdata spi1_pdata __initconst = { .chipselect = spi1_internal_chipselect, .num_chipselect = ARRAY_SIZE(spi1_internal_chipselect), }; diff --git a/arch/arm/mach-imx/mach-mx31lilly.c b/arch/arm/mach-imx/mach-mx31lilly.c index 832b1e2..426f14a 100644 --- a/arch/arm/mach-imx/mach-mx31lilly.c +++ b/arch/arm/mach-imx/mach-mx31lilly.c @@ -211,12 +211,12 @@ static int spi_internal_chipselect[] = { MXC_SPI_CS(2), }; -static const struct spi_imx_master spi0_pdata __initconst = { +static const struct spi_generic_pdata spi0_pdata __initconst = { .chipselect = spi_internal_chipselect, .num_chipselect = ARRAY_SIZE(spi_internal_chipselect), }; -static const struct spi_imx_master spi1_pdata __initconst = { +static const struct spi_generic_pdata spi1_pdata __initconst = { .chipselect = spi_internal_chipselect, .num_chipselect = ARRAY_SIZE(spi_internal_chipselect), }; diff --git a/arch/arm/mach-imx/mach-mx31lite.c b/arch/arm/mach-imx/mach-mx31lite.c index bea0729..12f1479 100644 --- a/arch/arm/mach-imx/mach-mx31lite.c +++ b/arch/arm/mach-imx/mach-mx31lite.c @@ -106,7 +106,7 @@ static int spi_internal_chipselect[] = { MXC_SPI_CS(0), }; -static const struct spi_imx_master spi1_pdata __initconst = { +static const struct spi_generic_pdata spi1_pdata __initconst = { .chipselect = spi_internal_chipselect, .num_chipselect = ARRAY_SIZE(spi_internal_chipselect), }; diff --git a/arch/arm/mach-imx/mach-mx31moboard.c b/arch/arm/mach-imx/mach-mx31moboard.c index dae4cd7..cf03cc6 100644 --- a/arch/arm/mach-imx/mach-mx31moboard.c +++ b/arch/arm/mach-imx/mach-mx31moboard.c @@ -168,7 +168,7 @@ static int moboard_spi1_cs[] = { MXC_SPI_CS(2), }; -static const struct spi_imx_master moboard_spi1_pdata __initconst = { +static const struct spi_generic_pdata moboard_spi1_pdata __initconst = { .chipselect = moboard_spi1_cs, .num_chipselect = ARRAY_SIZE(moboard_spi1_cs), }; @@ -316,7 +316,7 @@ static int moboard_spi2_cs[] = { MXC_SPI_CS(1), }; -static const struct spi_imx_master moboard_spi2_pdata __initconst = { +static const struct spi_generic_pdata moboard_spi2_pdata __initconst = { .chipselect = moboard_spi2_cs, .num_chipselect = ARRAY_SIZE(moboard_spi2_cs), }; diff --git a/arch/arm/mach-imx/mach-mx51_babbage.c b/arch/arm/mach-imx/mach-mx51_babbage.c index f3d264a..a01c76a 100644 --- a/arch/arm/mach-imx/mach-mx51_babbage.c +++ b/arch/arm/mach-imx/mach-mx51_babbage.c @@ -336,7 +336,7 @@ static int mx51_babbage_spi_cs[] = { BABBAGE_ECSPI1_CS1, }; -static const struct spi_imx_master mx51_babbage_spi_pdata __initconst = { +static const struct spi_generic_pdata mx51_babbage_spi_pdata __initconst = { .chipselect = mx51_babbage_spi_cs, .num_chipselect = ARRAY_SIZE(mx51_babbage_spi_cs), }; diff --git a/arch/arm/mach-imx/mach-pca100.c b/arch/arm/mach-imx/mach-pca100.c index b8b15bb..47580c4 100644 --- a/arch/arm/mach-imx/mach-pca100.c +++ b/arch/arm/mach-imx/mach-pca100.c @@ -203,7 +203,7 @@ static struct spi_board_info pca100_spi_board_info[] __initdata = { static int pca100_spi_cs[] = {SPI1_SS0, SPI1_SS1}; -static const struct spi_imx_master pca100_spi0_data __initconst = { +static const struct spi_generic_pdata pca100_spi0_data __initconst = { .chipselect = pca100_spi_cs, .num_chipselect = ARRAY_SIZE(pca100_spi_cs), }; diff --git a/arch/arm/mach-imx/mach-pcm037_eet.c b/arch/arm/mach-imx/mach-pcm037_eet.c index 8fd8255..3a6cbcd 100644 --- a/arch/arm/mach-imx/mach-pcm037_eet.c +++ b/arch/arm/mach-imx/mach-pcm037_eet.c @@ -58,7 +58,7 @@ static struct spi_board_info pcm037_spi_dev[] = { /* Platform Data for MXC CSPI */ static int pcm037_spi1_cs[] = {MXC_SPI_CS(1), IOMUX_TO_GPIO(MX31_PIN_KEY_COL7)}; -static const struct spi_imx_master pcm037_spi1_pdata __initconst = { +static const struct spi_generic_pdata pcm037_spi1_pdata __initconst = { .chipselect = pcm037_spi1_cs, .num_chipselect = ARRAY_SIZE(pcm037_spi1_cs), }; diff --git a/arch/arm/mach-imx/mach-pcm038.c b/arch/arm/mach-imx/mach-pcm038.c index e805ac2..8c034d8 100644 --- a/arch/arm/mach-imx/mach-pcm038.c +++ b/arch/arm/mach-imx/mach-pcm038.c @@ -204,7 +204,7 @@ static struct i2c_board_info pcm038_i2c_devices[] = { static int pcm038_spi_cs[] = {GPIO_PORTD + 28}; -static const struct spi_imx_master pcm038_spi0_data __initconst = { +static const struct spi_generic_pdata pcm038_spi0_data __initconst = { .chipselect = pcm038_spi_cs, .num_chipselect = ARRAY_SIZE(pcm038_spi_cs), }; diff --git a/arch/arm/mach-imx/mx31lite-db.c b/arch/arm/mach-imx/mx31lite-db.c index 5a160b7..4b5f3b1 100644 --- a/arch/arm/mach-imx/mx31lite-db.c +++ b/arch/arm/mach-imx/mx31lite-db.c @@ -154,7 +154,7 @@ static int spi_internal_chipselect[] = { MXC_SPI_CS(2), }; -static const struct spi_imx_master spi0_pdata __initconst = { +static const struct spi_generic_pdata spi0_pdata __initconst = { .chipselect = spi_internal_chipselect, .num_chipselect = ARRAY_SIZE(spi_internal_chipselect), }; diff --git a/drivers/spi/spi-clps711x.c b/drivers/spi/spi-clps711x.c index 6859a02..0cd0f00 100644 --- a/drivers/spi/spi-clps711x.c +++ b/drivers/spi/spi-clps711x.c @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include @@ -168,7 +168,7 @@ static int spi_clps711x_probe(struct platform_device *pdev) int i, ret; struct spi_master *master; struct spi_clps711x_data *hw; - struct spi_clps711x_pdata *pdata = dev_get_platdata(&pdev->dev); + struct spi_generic_pdata *pdata = dev_get_platdata(&pdev->dev); if (!pdata) { dev_err(&pdev->dev, "No platform data supplied\n"); diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c index 1e99b57..ad93086 100644 --- a/drivers/spi/spi-imx.c +++ b/drivers/spi/spi-imx.c @@ -38,7 +38,7 @@ #include #include -#include +#include #define DRIVER_NAME "spi_imx" @@ -754,7 +754,7 @@ static int spi_imx_probe(struct platform_device *pdev) struct device_node *np = pdev->dev.of_node; const struct of_device_id *of_id = of_match_device(spi_imx_dt_ids, &pdev->dev); - struct spi_imx_master *mxc_platform_info = + struct spi_generic_pdata *mxc_platform_info = dev_get_platdata(&pdev->dev); struct spi_master *master; struct spi_imx_data *spi_imx; diff --git a/include/linux/platform_data/spi-clps711x.h b/include/linux/platform_data/spi-clps711x.h deleted file mode 100644 index 301956e..0000000 --- a/include/linux/platform_data/spi-clps711x.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * CLPS711X SPI bus driver definitions - * - * Copyright (C) 2012 Alexander Shiyan - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - */ - -#ifndef ____LINUX_PLATFORM_DATA_SPI_CLPS711X_H -#define ____LINUX_PLATFORM_DATA_SPI_CLPS711X_H - -/* Board specific platform_data */ -struct spi_clps711x_pdata { - int *chipselect; /* Array of GPIO-numbers */ - int num_chipselect; /* Total count of GPIOs */ -}; - -#endif diff --git a/include/linux/platform_data/spi-generic-pdata.h b/include/linux/platform_data/spi-generic-pdata.h new file mode 100644 index 0000000..6c45a55 --- /dev/null +++ b/include/linux/platform_data/spi-generic-pdata.h @@ -0,0 +1,14 @@ +#ifndef _LINUX_PLATFORM_DATA_SPI_GENERIC_PDATA_H +#define _LINUX_PLATFORM_DATA_SPI_GENERIC_PDATA_H + +/* + * struct spi_generic_pdata - device.platform_data for SPI controller devices. + * @chipselect: Array of chipselects for this master. + * @num_chipselect: ARRAY_SIZE(chipselect) + */ +struct spi_generic_pdata { + int *chipselect; + int num_chipselect; +}; + +#endif diff --git a/include/linux/platform_data/spi-imx.h b/include/linux/platform_data/spi-imx.h deleted file mode 100644 index 08be445..0000000 --- a/include/linux/platform_data/spi-imx.h +++ /dev/null @@ -1,27 +0,0 @@ - -#ifndef __MACH_SPI_H_ -#define __MACH_SPI_H_ - -/* - * struct spi_imx_master - device.platform_data for SPI controller devices. - * @chipselect: Array of chipselects for this master. Numbers >= 0 mean gpio - * pins, numbers < 0 mean internal CSPI chipselects according - * to MXC_SPI_CS(). Normally you want to use gpio based chip - * selects as the CSPI module tries to be intelligent about - * when to assert the chipselect: The CSPI module deasserts the - * chipselect once it runs out of input data. The other problem - * is that it is not possible to mix between high active and low - * active chipselects on one single bus using the internal - * chipselects. Unfortunately Freescale decided to put some - * chipselects on dedicated pins which are not usable as gpios, - * so we have to support the internal chipselects. - * @num_chipselect: ARRAY_SIZE(chipselect) - */ -struct spi_imx_master { - int *chipselect; - int num_chipselect; -}; - -#define MXC_SPI_CS(no) ((no) - 32) - -#endif /* __MACH_SPI_H_*/