From e1fd39597ec53ae7e6a27d176928b332d105f12b Mon Sep 17 00:00:00 2001 From: root Date: Mon, 26 Jul 2010 22:00:25 +0800 Subject: [PATCH] =?utf8?q?=E6=81=A2=E5=A4=8D=E6=8E=A7=E5=88=B6=E5=99=A8?= =?utf8?q?=E7=9A=84cs=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- drivers/spi/rk2818_spim.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/drivers/spi/rk2818_spim.c b/drivers/spi/rk2818_spim.c index 5013c30aa603..638ec7dc99b5 100644 --- a/drivers/spi/rk2818_spim.c +++ b/drivers/spi/rk2818_spim.c @@ -185,14 +185,15 @@ static void flush(struct rk2818_spi *dws) static void null_cs_control(u32 command) { - if(command == 2) - gpio_direction_output(RK2818_PIN_PB0,GPIO_LOW); - else if(command == 1) - gpio_direction_output(RK2818_PIN_PB4,GPIO_LOW); - else{ - gpio_direction_output(RK2818_PIN_PB0,GPIO_HIGH); - gpio_direction_output(RK2818_PIN_PB4,GPIO_HIGH); - } + //printk("null_cs_control [%d]\n", command); + if(command == 2) + gpio_direction_output(RK2818_PIN_PB0,GPIO_LOW); + else if(command == 1) + gpio_direction_output(RK2818_PIN_PB4,GPIO_LOW); + else{ + gpio_direction_output(RK2818_PIN_PB0,GPIO_HIGH); + gpio_direction_output(RK2818_PIN_PB4,GPIO_HIGH); + } } static int null_writer(struct rk2818_spi *dws) @@ -436,7 +437,7 @@ static void spi_chip_sel(struct rk2818_spi *dws, u16 cs) if (dws->cs_control){ dws->cs_control(cs+1); } - //rk2818_writel(dws, SPIM_SER, 1 << cs); + rk2818_writel(dws, SPIM_SER, 1 << cs); } static void pump_transfers(unsigned long data) @@ -655,7 +656,7 @@ static void pump_messages(struct work_struct *work) struct spi_transfer, transfer_list); dws->cur_chip = spi_get_ctldata(dws->cur_msg->spi); - dws->prev_chip = NULL; //ÿ¸öpump messageÊ±Ç¿ÖÆ¸üÐÂcs dxj + //dws->prev_chip = NULL; //ÿ¸öpump messageÊ±Ç¿ÖÆ¸üÐÂcs dxj /* Mark as busy and launch transfers */ tasklet_schedule(&dws->pump_transfers); -- 2.34.1