remove gpio setup for spi
authorcmc <cmc@rock-chips.com>
Mon, 29 Nov 2010 08:28:09 +0000 (16:28 +0800)
committercmc <cmc@rock-chips.com>
Mon, 29 Nov 2010 08:28:09 +0000 (16:28 +0800)
arch/arm/mach-rk29/board-rk29sdk.c [changed mode: 0644->0755]
drivers/spi/rk29xx_spim.c

old mode 100644 (file)
new mode 100755 (executable)
index 925c0e4..ff3b11f
@@ -942,6 +942,7 @@ struct spi_cs_gpio rk29xx_spi1_cs_gpios[SPI_CHIPSELECT_NUM] = {
 \r
 static int spi_io_init(struct spi_cs_gpio *cs_gpios, int cs_num)\r
 {      \r
+#if 0\r
        int i,j,ret;\r
        \r
        //cs\r
@@ -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);\r
                }\r
        }\r
+#endif\r
        return 0;\r
 }\r
 \r
 static int spi_io_deinit(struct spi_cs_gpio *cs_gpios, int cs_num)\r
 {\r
+#if 0\r
        int i;\r
        \r
        if (cs_gpios) {\r
@@ -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);\r
                }\r
        }\r
-       \r
+#endif\r
        return 0;\r
 }\r
 \r
 static int spi_io_fix_leakage_bug(void)\r
 {\r
+#if 0\r
        gpio_direction_output(RK29_PIN2_PC1, GPIO_LOW); \r
+#endif\r
        return 0;\r
 }\r
 \r
 static int spi_io_resume_leakage_bug(void)\r
 {\r
+#if 0\r
        gpio_direction_output(RK29_PIN2_PC1, GPIO_HIGH);\r
+#endif\r
        return 0;\r
 }\r
 \r
index 17654f349b6a871dbcc271974bb22395251ffd09..9d15abc10d5998b3e5194c360589603cb3045598 100755 (executable)
@@ -220,6 +220,7 @@ static void flush(struct rk29xx_spi *dws)
        wait_till_not_busy(dws);\r
 }\r
 \r
+#if 0\r
 static void spi_cs_control(struct rk29xx_spi *dws, u32 cs, u8 flag)\r
 {\r
        struct rk29xx_spi_platform_data *pdata = dws->master->dev.platform_data;\r
@@ -230,6 +231,7 @@ static void spi_cs_control(struct rk29xx_spi *dws, u32 cs, u8 flag)
        else\r
                gpio_direction_output(cs_gpios[cs].cs_gpio, GPIO_LOW);\r
 }\r
+#endif\r
 \r
 static int null_writer(struct rk29xx_spi *dws)\r
 {\r
@@ -1509,7 +1511,7 @@ static int rk29xx_spi_setup(struct spi_device *spi)
                if (!chip)\r
                        return -ENOMEM;\r
 \r
-               chip->cs_control = spi_cs_control;\r
+               chip->cs_control = NULL;\r
                chip->enable_dma = 1;  //0;\r
        }\r
 \r