From: root Date: Mon, 26 Jul 2010 14:00:25 +0000 (+0800) Subject: 恢复控制器的cs控制 X-Git-Tag: firefly_0821_release~11338 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e1fd39597ec53ae7e6a27d176928b332d105f12b;p=firefly-linux-kernel-4.4.55.git 恢复控制器的cs控制 --- 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);