From: kfx Date: Wed, 23 Jan 2013 09:27:16 +0000 (+0800) Subject: fixed spi compile error X-Git-Tag: firefly_0821_release~7837 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a03b81c357ffa1d081a560cf39c8c12f5ab404d7;p=firefly-linux-kernel-4.4.55.git fixed spi compile error --- diff --git a/arch/arm/mach-rk2928/devices.c b/arch/arm/mach-rk2928/devices.c index 5ea94602e3ba..b445b9da424f 100755 --- a/arch/arm/mach-rk2928/devices.c +++ b/arch/arm/mach-rk2928/devices.c @@ -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 = { diff --git a/arch/arm/mach-rk30/devices.c b/arch/arm/mach-rk30/devices.c index a3b278882629..f751bb130835 100755 --- a/arch/arm/mach-rk30/devices.c +++ b/arch/arm/mach-rk30/devices.c @@ -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 = { diff --git a/arch/arm/plat-rk/iomux.c b/arch/arm/plat-rk/iomux.c index 74df016644f5..d2617ea050de 100644 --- a/arch/arm/plat-rk/iomux.c +++ b/arch/arm/plat-rk/iomux.c @@ -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 diff --git a/drivers/spi/rk29_spim.c b/drivers/spi/rk29_spim.c index 1810c54f2bc9..a314787e71cb 100755 --- a/drivers/spi/rk29_spim.c +++ b/drivers/spi/rk29_spim.c @@ -69,6 +69,7 @@ struct chip_data { u8 cs; /* chip select pin */ u8 n_bytes; /* current is a 1/2/4 byte op */ u8 tmode; /* TR/TO/RO/EEPROM */ + u8 mode; /* ??? */ u8 type; /* SPI/SSP/MicroWire */ u8 poll_mode; /* 1 means use poll mode */ @@ -141,6 +142,7 @@ static void printk_transfer_data(unsigned char *buf, int len) } #endif +#if 0 static void spi_dump_regs(struct rk29xx_spi *dws) { DBG("MRST SPI0 registers:\n"); DBG("=================================\n"); @@ -162,6 +164,7 @@ static void spi_dump_regs(struct rk29xx_spi *dws) { DBG("=================================\n"); } +#endif #ifdef CONFIG_DEBUG_FS static int spi_show_regs_open(struct inode *inode, struct file *file) @@ -307,6 +310,8 @@ static void spi_cs_control(struct rk29xx_spi *dws, u32 cs, u8 flag) rk29xx_writel(dws, SPIM_SER, 0); return; #else + + #error "Warning: not support" struct rk29xx_spi_platform_data *pdata = dws->master->dev.platform_data; struct spi_cs_gpio *cs_gpios = pdata->chipselect_gpios;