summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/imote2.c
diff options
context:
space:
mode:
authorMike Rapoport2009-04-14 07:33:49 +0200
committerEric Miao2009-06-05 04:32:06 +0200
commit46580c03062da8c047238a6b3d2b2b13af1700b5 (patch)
tree5e047813eb34ca78c7287262c0fb9917a79f5691 /arch/arm/mach-pxa/imote2.c
parent[ARM] pxa: add PWM devices support for pxa168/910 (diff)
downloadkernel-qcow2-linux-46580c03062da8c047238a6b3d2b2b13af1700b5.tar.gz
kernel-qcow2-linux-46580c03062da8c047238a6b3d2b2b13af1700b5.tar.xz
kernel-qcow2-linux-46580c03062da8c047238a6b3d2b2b13af1700b5.zip
[ARM] pxa: update pxa2xx_spi_chip initialization to use .gpio_cs field
Signed-off-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Eric Miao <eric.miao@marvell.com>
Diffstat (limited to 'arch/arm/mach-pxa/imote2.c')
-rw-r--r--arch/arm/mach-pxa/imote2.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/arch/arm/mach-pxa/imote2.c b/arch/arm/mach-pxa/imote2.c
index 821e65a4097e..3ef98d43d303 100644
--- a/arch/arm/mach-pxa/imote2.c
+++ b/arch/arm/mach-pxa/imote2.c
@@ -456,25 +456,12 @@ static struct pxa2xx_spi_master pxa_ssp_master_2_info = {
.num_chipselect = 1,
};
-/* Patch posted by Eric Miao <eric.miao@marvell.com> will remove
- * the need for these functions.
- */
-static void spi1control(u32 command)
-{
- gpio_set_value(24, command & PXA2XX_CS_ASSERT ? 0 : 1);
-};
-
-static void spi3control(u32 command)
-{
- gpio_set_value(39, command & PXA2XX_CS_ASSERT ? 0 : 1);
-};
-
static struct pxa2xx_spi_chip staccel_chip_info = {
.tx_threshold = 8,
.rx_threshold = 8,
.dma_burst_size = 8,
.timeout = 235,
- .cs_control = spi1control,
+ .gpio_cs = 24,
};
static struct pxa2xx_spi_chip cc2420_info = {
@@ -482,7 +469,7 @@ static struct pxa2xx_spi_chip cc2420_info = {
.rx_threshold = 8,
.dma_burst_size = 8,
.timeout = 235,
- .cs_control = spi3control,
+ .gpio_cs = 39,
};
static struct spi_board_info spi_board_info[] __initdata = {
@@ -538,8 +525,6 @@ static void __init imote2_init(void)
/* SPI chip select directions - all other directions should
* be handled by drivers.*/
gpio_direction_output(37, 0);
- gpio_direction_output(24, 0);
- gpio_direction_output(39, 0);
platform_add_devices(imote2_devices, ARRAY_SIZE(imote2_devices));