mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] imx_spi: drop non usefull ifdef enum imx_spi_devtype and arround cpu_is_xx
@ 2011-08-11 15:30 Jean-Christophe PLAGNIOL-VILLARD
  2011-08-11 15:55 ` [PATCH v2] imx_spi: drop non usefull ifdef Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 7+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-08-11 15:30 UTC (permalink / raw)
  To: barebox

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 drivers/spi/imx_spi.c |   18 ++----------------
 1 files changed, 2 insertions(+), 16 deletions(-)

diff --git a/drivers/spi/imx_spi.c b/drivers/spi/imx_spi.c
index 6dc41b9..f54f5b8 100644
--- a/drivers/spi/imx_spi.c
+++ b/drivers/spi/imx_spi.c
@@ -90,24 +90,12 @@
 #define CSPI_2_3_STAT_RR		(1 <<  3)
 
 enum imx_spi_devtype {
-#ifdef CONFIG_DRIVER_SPI_IMX1
 	SPI_IMX_VER_IMX1,
-#endif
-#ifdef CONFIG_DRIVER_SPI_IMX_0_0
 	SPI_IMX_VER_0_0,
-#endif
-#ifdef CONFIG_DRIVER_SPI_IMX_0_4
 	SPI_IMX_VER_0_4,
-#endif
-#ifdef CONFIG_DRIVER_SPI_IMX_0_5
 	SPI_IMX_VER_0_5,
-#endif
-#ifdef CONFIG_DRIVER_SPI_IMX_0_7
 	SPI_IMX_VER_0_7,
-#endif
-#ifdef CONFIG_DRIVER_SPI_IMX_2_3
 	SPI_IMX_VER_2_3,
-#endif
 };
 
 struct imx_spi {
@@ -368,14 +356,12 @@ static int imx_spi_probe(struct device_d *dev)
 	master->num_chipselect = pdata->num_chipselect;
 	imx->cs_array = pdata->chipselect;
 
-#ifdef CONFIG_DRIVER_SPI_IMX_0_0
 	if (cpu_is_mx27())
 		version = SPI_IMX_VER_0_0;
-#endif
-#ifdef CONFIG_DRIVER_SPI_IMX_2_3
+
 	if (cpu_is_mx51() || cpu_is_mx53())
 		version = SPI_IMX_VER_2_3;
-#endif
+
 	imx->chipselect = spi_imx_devtype_data[version].chipselect;
 	imx->xchg_single = spi_imx_devtype_data[version].xchg_single;
 	imx->init = spi_imx_devtype_data[version].init;
-- 
1.7.5.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-08-12 17:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-11 15:30 [PATCH] imx_spi: drop non usefull ifdef enum imx_spi_devtype and arround cpu_is_xx Jean-Christophe PLAGNIOL-VILLARD
2011-08-11 15:55 ` [PATCH v2] imx_spi: drop non usefull ifdef Jean-Christophe PLAGNIOL-VILLARD
2011-08-12  6:42   ` Sascha Hauer
2011-08-12  9:36     ` Jean-Christophe PLAGNIOL-VILLARD
2011-08-12 12:10       ` Sascha Hauer
2011-08-12 12:49         ` Jean-Christophe PLAGNIOL-VILLARD
2011-08-12 17:23           ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox