fixed spi compile error
authorkfx <kfx@rock-chips.com>
Wed, 23 Jan 2013 09:27:16 +0000 (17:27 +0800)
committerkfx <kfx@rock-chips.com>
Wed, 23 Jan 2013 09:27:16 +0000 (17:27 +0800)
arch/arm/mach-rk2928/devices.c
arch/arm/mach-rk30/devices.c
arch/arm/plat-rk/iomux.c
drivers/spi/rk29_spim.c

index 5ea94602e3baccaeebbef22bc3dc2f4d2ea9a56d..b445b9da424f9d0fa1145407b4ffcae152c5adb2 100755 (executable)
@@ -483,6 +483,7 @@ static int spi_io_resume_leakage_bug(void)
  */
 #ifdef CONFIG_SPIM0_RK29
 static struct spi_cs_gpio rk29xx_spi0_cs_gpios[SPI_CHIPSELECT_NUM] = {
+#if 0
        {
                .name = "spi0 cs0",
                .cs_gpio = RK2928_PIN1_PB3,
@@ -495,6 +496,7 @@ static struct spi_cs_gpio rk29xx_spi0_cs_gpios[SPI_CHIPSELECT_NUM] = {
                .cs_iomux_name = GPIO1B4_SPI_CSN1_UART1_CTSN_NAME,//if no iomux,set it NULL
                .cs_iomux_mode = GPIO1B_SPI_CSN1,
        },
+#endif
 };
 
 static struct rk29xx_spi_platform_data rk29xx_spi0_platdata = {
index a3b278882629bc5b4c0f08b30758a45716b9489b..f751bb1308354158097ec5429b93cce7603e63a4 100755 (executable)
@@ -677,6 +677,7 @@ static int spi_io_resume_leakage_bug(void)
  */
 #ifdef CONFIG_SPIM0_RK29
 static struct spi_cs_gpio rk29xx_spi0_cs_gpios[SPI_CHIPSELECT_NUM] = {
+#if 0
 #if defined(CONFIG_ARCH_RK3066B)
        {
                .name = "spi0 cs0",
@@ -705,6 +706,7 @@ static struct spi_cs_gpio rk29xx_spi0_cs_gpios[SPI_CHIPSELECT_NUM] = {
                .cs_iomux_mode = GPIO4B_SPI0_CSN1,
        }
 #endif
+#endif
 };
 
 static struct rk29xx_spi_platform_data rk29xx_spi0_platdata = {
@@ -754,6 +756,7 @@ struct platform_device rk29xx_device_spi0m = {
 
 #ifdef CONFIG_SPIM1_RK29
 static struct spi_cs_gpio rk29xx_spi1_cs_gpios[SPI_CHIPSELECT_NUM] = {
+#if 0
 #if defined(CONFIG_ARCH_RK3066B)                       
        {
                .name = "spi1 cs0",
@@ -782,6 +785,7 @@ static struct spi_cs_gpio rk29xx_spi1_cs_gpios[SPI_CHIPSELECT_NUM] = {
                .cs_iomux_mode = GPIO2C_SPI1_CSN1,
        }
 #endif
+#endif
 };
 
 static struct rk29xx_spi_platform_data rk29xx_spi1_platdata = {
index 74df016644f579fd099b8bed8135283349a9d8d8..d2617ea050de48a8ec9ea2fcbf92d27e719dc3bf 100644 (file)
@@ -140,11 +140,11 @@ static unsigned int default_mode[] = {
        #endif
 
        #ifdef CONFIG_SPIM0_RK29
-        SPI0_CLK, SPI0_TXD, SPI0_RXD, SPI0_CSN0,
+        SPI0_CLK, SPI0_TXD, SPI0_RXD, SPI0_CS0,
        #endif
 
        #ifdef CONFIG_SPIM1_RK29
-        SPI1_CLK, SPI1_TXD, SPI1_RXD, SPI1_CSN0,
+        SPI1_CLK, SPI1_TXD, SPI1_RXD, SPI1_CS0,
        #endif
 
        #ifdef CONFIG_I2C0_RK30
index 1810c54f2bc9f6926ed4d213d3f60f02a25c6a35..a314787e71cb53a9ac115e48c98ea4e2aafa469d 100755 (executable)
@@ -69,6 +69,7 @@ struct chip_data {
        u8 cs;                  /* chip select pin */\r
        u8 n_bytes;             /* current is a 1/2/4 byte op */\r
        u8 tmode;               /* TR/TO/RO/EEPROM */\r
+       u8 mode;                /* ??? */\r
        u8 type;                /* SPI/SSP/MicroWire */\r
 \r
        u8 poll_mode;           /* 1 means use poll mode */\r
@@ -141,6 +142,7 @@ static void printk_transfer_data(unsigned char *buf, int len)
 }\r
 #endif\r
 \r
+#if 0\r
 static void spi_dump_regs(struct rk29xx_spi *dws) {\r
        DBG("MRST SPI0 registers:\n");\r
        DBG("=================================\n");\r
@@ -162,6 +164,7 @@ static void spi_dump_regs(struct rk29xx_spi *dws) {
        DBG("=================================\n");\r
 \r
 }\r
+#endif\r
 \r
 #ifdef CONFIG_DEBUG_FS\r
 static int spi_show_regs_open(struct inode *inode, struct file *file)\r
@@ -307,6 +310,8 @@ static void spi_cs_control(struct rk29xx_spi *dws, u32 cs, u8 flag)
                rk29xx_writel(dws, SPIM_SER, 0);\r
        return;\r
        #else\r
+       \r
+       #error "Warning: not support"\r
        struct rk29xx_spi_platform_data *pdata = dws->master->dev.platform_data;\r
        struct spi_cs_gpio *cs_gpios = pdata->chipselect_gpios;\r
 \r