Commit 5bda2723 authored by Mike Frysinger's avatar Mike Frysinger Committed by Bryan Wu

Blackfin arch: protect only the SPI bus controller with CONFIG_SPI_BFIN

Signed-off-by: default avatarMike Frysinger <vapier.adi@gmail.com>
Signed-off-by: default avatarBryan Wu <cooloney@kernel.org>
parent bd628bd0
...@@ -451,9 +451,6 @@ static struct platform_device net2272_bfin_device = { ...@@ -451,9 +451,6 @@ static struct platform_device net2272_bfin_device = {
}; };
#endif #endif
#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
/* all SPI peripherals info goes here */
#if defined(CONFIG_MTD_M25P80) \ #if defined(CONFIG_MTD_M25P80) \
|| defined(CONFIG_MTD_M25P80_MODULE) || defined(CONFIG_MTD_M25P80_MODULE)
static struct mtd_partition bfin_spi_flash_partitions[] = { static struct mtd_partition bfin_spi_flash_partitions[] = {
...@@ -676,6 +673,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -676,6 +673,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
#endif #endif
}; };
#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
/* SPI controller data */ /* SPI controller data */
static struct bfin5xx_spi_master bfin_spi0_info = { static struct bfin5xx_spi_master bfin_spi0_info = {
.num_chipselect = 8, .num_chipselect = 8,
...@@ -1018,10 +1016,7 @@ static int __init stamp_init(void) ...@@ -1018,10 +1016,7 @@ static int __init stamp_init(void)
#endif #endif
platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
spi_register_board_info(bfin_spi_board_info,
ARRAY_SIZE(bfin_spi_board_info));
#endif
#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;
......
...@@ -87,9 +87,6 @@ static struct platform_device smc91x_device = { ...@@ -87,9 +87,6 @@ static struct platform_device smc91x_device = {
}; };
#endif #endif
#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
/* all SPI peripherals info goes here */
#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)
static struct mtd_partition bfin_spi_flash_partitions[] = { static struct mtd_partition bfin_spi_flash_partitions[] = {
{ {
...@@ -189,6 +186,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -189,6 +186,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
#endif #endif
}; };
#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
/* SPI (0) */ /* SPI (0) */
static struct resource bfin_spi0_resource[] = { static struct resource bfin_spi0_resource[] = {
[0] = { [0] = {
...@@ -425,9 +423,7 @@ static int __init ezkit_init(void) ...@@ -425,9 +423,7 @@ static int __init ezkit_init(void)
{ {
printk(KERN_INFO "%s(): registering device resources\n", __func__); printk(KERN_INFO "%s(): registering device resources\n", __func__);
platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices)); platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices));
#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
#endif
#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;
......
...@@ -161,9 +161,6 @@ static struct platform_device stamp_flash_device = { ...@@ -161,9 +161,6 @@ static struct platform_device stamp_flash_device = {
}; };
#endif #endif
#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
/* all SPI peripherals info goes here */
#if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE)
static struct mtd_partition bfin_spi_flash_partitions[] = { static struct mtd_partition bfin_spi_flash_partitions[] = {
{ {
...@@ -320,6 +317,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -320,6 +317,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
#endif #endif
}; };
#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
/* SPI (0) */ /* SPI (0) */
static struct resource bfin_spi0_resource[] = { static struct resource bfin_spi0_resource[] = {
[0] = { [0] = {
...@@ -626,10 +624,8 @@ static int __init stamp_init(void) ...@@ -626,10 +624,8 @@ static int __init stamp_init(void)
SSYNC(); SSYNC();
#endif #endif
#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
spi_register_board_info(bfin_spi_board_info,
ARRAY_SIZE(bfin_spi_board_info));
#endif
#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;
#endif #endif
......
...@@ -400,9 +400,6 @@ static struct platform_device stamp_flash_device = { ...@@ -400,9 +400,6 @@ static struct platform_device stamp_flash_device = {
}; };
#endif #endif
#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
/* all SPI peripherals info goes here */
#if defined(CONFIG_MTD_M25P80) \ #if defined(CONFIG_MTD_M25P80) \
|| defined(CONFIG_MTD_M25P80_MODULE) || defined(CONFIG_MTD_M25P80_MODULE)
static struct mtd_partition bfin_spi_flash_partitions[] = { static struct mtd_partition bfin_spi_flash_partitions[] = {
...@@ -629,6 +626,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { ...@@ -629,6 +626,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
#endif #endif
}; };
#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
/* SPI controller data */ /* SPI controller data */
static struct bfin5xx_spi_master bfin_spi0_info = { static struct bfin5xx_spi_master bfin_spi0_info = {
.num_chipselect = 8, .num_chipselect = 8,
...@@ -939,10 +937,7 @@ static int __init stamp_init(void) ...@@ -939,10 +937,7 @@ static int __init stamp_init(void)
#endif #endif
platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
spi_register_board_info(bfin_spi_board_info,
ARRAY_SIZE(bfin_spi_board_info));
#endif
#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;
......
...@@ -412,8 +412,6 @@ static struct platform_device ezkit_flash_device = { ...@@ -412,8 +412,6 @@ static struct platform_device ezkit_flash_device = {
}; };
#endif #endif
#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
/* all SPI peripherals info goes here */
#if defined(CONFIG_MTD_M25P80) \ #if defined(CONFIG_MTD_M25P80) \
|| defined(CONFIG_MTD_M25P80_MODULE) || defined(CONFIG_MTD_M25P80_MODULE)
/* SPI flash chip (m25p16) */ /* SPI flash chip (m25p16) */
...@@ -481,7 +479,7 @@ static struct bfin5xx_spi_chip spidev_chip_info = { ...@@ -481,7 +479,7 @@ static struct bfin5xx_spi_chip spidev_chip_info = {
}; };
#endif #endif
static struct spi_board_info bf54x_spi_board_info[] __initdata = { static struct spi_board_info bfin_spi_board_info[] __initdata = {
#if defined(CONFIG_MTD_M25P80) \ #if defined(CONFIG_MTD_M25P80) \
|| defined(CONFIG_MTD_M25P80_MODULE) || defined(CONFIG_MTD_M25P80_MODULE)
{ {
...@@ -527,6 +525,7 @@ static struct spi_board_info bf54x_spi_board_info[] __initdata = { ...@@ -527,6 +525,7 @@ static struct spi_board_info bf54x_spi_board_info[] __initdata = {
#endif #endif
}; };
#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
/* SPI (0) */ /* SPI (0) */
static struct resource bfin_spi0_resource[] = { static struct resource bfin_spi0_resource[] = {
[0] = { [0] = {
...@@ -800,10 +799,7 @@ static int __init ezkit_init(void) ...@@ -800,10 +799,7 @@ static int __init ezkit_init(void)
platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices)); platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices));
#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
spi_register_board_info(bf54x_spi_board_info,
ARRAY_SIZE(bf54x_spi_board_info));
#endif
return 0; return 0;
} }
......
...@@ -280,7 +280,6 @@ static struct platform_device ezkit_flash_device = { ...@@ -280,7 +280,6 @@ static struct platform_device ezkit_flash_device = {
}; };
#endif #endif
#ifdef CONFIG_SPI_BFIN
#if defined(CONFIG_SND_BLACKFIN_AD1836) \ #if defined(CONFIG_SND_BLACKFIN_AD1836) \
|| defined(CONFIG_SND_BLACKFIN_AD1836_MODULE) || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
static struct bfin5xx_spi_chip ad1836_spi_chip_info = { static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
...@@ -295,8 +294,8 @@ static struct bfin5xx_spi_chip spidev_chip_info = { ...@@ -295,8 +294,8 @@ static struct bfin5xx_spi_chip spidev_chip_info = {
.bits_per_word = 8, .bits_per_word = 8,
}; };
#endif #endif
#endif
#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
/* SPI (0) */ /* SPI (0) */
static struct resource bfin_spi0_resource[] = { static struct resource bfin_spi0_resource[] = {
[0] = { [0] = {
...@@ -327,6 +326,7 @@ static struct platform_device bfin_spi0_device = { ...@@ -327,6 +326,7 @@ static struct platform_device bfin_spi0_device = {
.platform_data = &bfin_spi0_info, /* Passed to driver */ .platform_data = &bfin_spi0_info, /* Passed to driver */
}, },
}; };
#endif
static struct spi_board_info bfin_spi_board_info[] __initdata = { static struct spi_board_info bfin_spi_board_info[] __initdata = {
#if defined(CONFIG_SND_BLACKFIN_AD1836) \ #if defined(CONFIG_SND_BLACKFIN_AD1836) \
...@@ -537,10 +537,7 @@ static int __init ezkit_init(void) ...@@ -537,10 +537,7 @@ static int __init ezkit_init(void)
SSYNC(); SSYNC();
#endif #endif
#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
spi_register_board_info(bfin_spi_board_info,
ARRAY_SIZE(bfin_spi_board_info));
#endif
#if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE) #if defined(CONFIG_PATA_PLATFORM) || defined(CONFIG_PATA_PLATFORM_MODULE)
irq_desc[PATA_INT].status |= IRQ_NOAUTOEN; irq_desc[PATA_INT].status |= IRQ_NOAUTOEN;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment