remove gpio setup for spi

This commit is contained in:
cmc
2010-11-29 16:28:09 +08:00
parent 2fcd8b788c
commit d73979924e
2 changed files with 11 additions and 2 deletions

9
arch/arm/mach-rk29/board-rk29sdk.c Normal file → Executable file
View File

@@ -942,6 +942,7 @@ struct spi_cs_gpio rk29xx_spi1_cs_gpios[SPI_CHIPSELECT_NUM] = {
static int spi_io_init(struct spi_cs_gpio *cs_gpios, int cs_num)
{
#if 0
int i,j,ret;
//cs
@@ -960,11 +961,13 @@ static int spi_io_init(struct spi_cs_gpio *cs_gpios, int cs_num)
gpio_direction_output(cs_gpios[i].cs_gpio, GPIO_HIGH);
}
}
#endif
return 0;
}
static int spi_io_deinit(struct spi_cs_gpio *cs_gpios, int cs_num)
{
#if 0
int i;
if (cs_gpios) {
@@ -973,19 +976,23 @@ static int spi_io_deinit(struct spi_cs_gpio *cs_gpios, int cs_num)
//rk29_mux_api_mode_resume(cs_gpios[i].cs_iomux_name);
}
}
#endif
return 0;
}
static int spi_io_fix_leakage_bug(void)
{
#if 0
gpio_direction_output(RK29_PIN2_PC1, GPIO_LOW);
#endif
return 0;
}
static int spi_io_resume_leakage_bug(void)
{
#if 0
gpio_direction_output(RK29_PIN2_PC1, GPIO_HIGH);
#endif
return 0;
}

View File

@@ -220,6 +220,7 @@ static void flush(struct rk29xx_spi *dws)
wait_till_not_busy(dws);
}
#if 0
static void spi_cs_control(struct rk29xx_spi *dws, u32 cs, u8 flag)
{
struct rk29xx_spi_platform_data *pdata = dws->master->dev.platform_data;
@@ -230,6 +231,7 @@ static void spi_cs_control(struct rk29xx_spi *dws, u32 cs, u8 flag)
else
gpio_direction_output(cs_gpios[cs].cs_gpio, GPIO_LOW);
}
#endif
static int null_writer(struct rk29xx_spi *dws)
{
@@ -1509,7 +1511,7 @@ static int rk29xx_spi_setup(struct spi_device *spi)
if (!chip)
return -ENOMEM;
chip->cs_control = spi_cs_control;
chip->cs_control = NULL;
chip->enable_dma = 1; //0;
}