aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/mach-bf537
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-05-26 04:03:10 -0400
committerMike Frysinger <vapier@gentoo.org>2011-07-23 01:10:41 -0400
commit2f7d63f909900c555baf36a4c6a11e9bf8e1af18 (patch)
tree1c15e1a2f04300366cdd1d6e056e1a5f18fd55fc /arch/blackfin/mach-bf537
parent9be8631b8a7d11fa6d206fcf0a7a2005ed39f41b (diff)
Blackfin: boards: clean up redundant/dead spi resources
The default for the Blackfin SPI driver is 8 bits and dma disabled, so many of the bfin5xx_spi_chip resources are redundant. So punt those parts. Further, drivers should themselves be declaring 16 bit transfers, so for those that do, and for the ones which no longer do 16 bit transfers, drop the bfin5xx_spi_chip resources. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/mach-bf537')
-rw-r--r--arch/blackfin/mach-bf537/boards/cm_bf537e.c29
-rw-r--r--arch/blackfin/mach-bf537/boards/cm_bf537u.c29
-rw-r--r--arch/blackfin/mach-bf537/boards/dnp5370.c2
-rw-r--r--arch/blackfin/mach-bf537/boards/minotaur.c2
-rw-r--r--arch/blackfin/mach-bf537/boards/pnav10.c38
-rw-r--r--arch/blackfin/mach-bf537/boards/stamp.c118
-rw-r--r--arch/blackfin/mach-bf537/boards/tcm_bf537.c29
7 files changed, 0 insertions, 247 deletions
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537e.c b/arch/blackfin/mach-bf537/boards/cm_bf537e.c
index f3ff4207b429..44fd8409db10 100644
--- a/arch/blackfin/mach-bf537/boards/cm_bf537e.c
+++ b/arch/blackfin/mach-bf537/boards/cm_bf537e.c
@@ -61,29 +61,12 @@ static struct flash_platform_data bfin_spi_flash_data = {
61/* SPI flash chip (m25p64) */ 61/* SPI flash chip (m25p64) */
62static struct bfin5xx_spi_chip spi_flash_chip_info = { 62static struct bfin5xx_spi_chip spi_flash_chip_info = {
63 .enable_dma = 0, /* use dma transfer with this chip*/ 63 .enable_dma = 0, /* use dma transfer with this chip*/
64 .bits_per_word = 8,
65};
66#endif
67
68#if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE)
69/* SPI ADC chip */
70static struct bfin5xx_spi_chip spi_adc_chip_info = {
71 .enable_dma = 1, /* use dma transfer with this chip*/
72 .bits_per_word = 16,
73};
74#endif
75
76#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
77static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
78 .enable_dma = 0,
79 .bits_per_word = 16,
80}; 64};
81#endif 65#endif
82 66
83#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 67#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
84static struct bfin5xx_spi_chip mmc_spi_chip_info = { 68static struct bfin5xx_spi_chip mmc_spi_chip_info = {
85 .enable_dma = 0, 69 .enable_dma = 0,
86 .bits_per_word = 8,
87}; 70};
88#endif 71#endif
89 72
@@ -101,24 +84,12 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
101 }, 84 },
102#endif 85#endif
103 86
104#if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE)
105 {
106 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
107 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
108 .bus_num = 0, /* Framework bus number */
109 .chip_select = 1, /* Framework chip select. */
110 .platform_data = NULL, /* No spi_driver specific config */
111 .controller_data = &spi_adc_chip_info,
112 },
113#endif
114
115#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 87#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
116 { 88 {
117 .modalias = "ad183x", 89 .modalias = "ad183x",
118 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 90 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
119 .bus_num = 0, 91 .bus_num = 0,
120 .chip_select = 4, 92 .chip_select = 4,
121 .controller_data = &ad1836_spi_chip_info,
122 }, 93 },
123#endif 94#endif
124 95
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537u.c b/arch/blackfin/mach-bf537/boards/cm_bf537u.c
index e1b7287084f8..1b4ac5c64aae 100644
--- a/arch/blackfin/mach-bf537/boards/cm_bf537u.c
+++ b/arch/blackfin/mach-bf537/boards/cm_bf537u.c
@@ -62,29 +62,12 @@ static struct flash_platform_data bfin_spi_flash_data = {
62/* SPI flash chip (m25p64) */ 62/* SPI flash chip (m25p64) */
63static struct bfin5xx_spi_chip spi_flash_chip_info = { 63static struct bfin5xx_spi_chip spi_flash_chip_info = {
64 .enable_dma = 0, /* use dma transfer with this chip*/ 64 .enable_dma = 0, /* use dma transfer with this chip*/
65 .bits_per_word = 8,
66};
67#endif
68
69#if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE)
70/* SPI ADC chip */
71static struct bfin5xx_spi_chip spi_adc_chip_info = {
72 .enable_dma = 1, /* use dma transfer with this chip*/
73 .bits_per_word = 16,
74};
75#endif
76
77#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
78static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
79 .enable_dma = 0,
80 .bits_per_word = 16,
81}; 65};
82#endif 66#endif
83 67
84#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 68#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
85static struct bfin5xx_spi_chip mmc_spi_chip_info = { 69static struct bfin5xx_spi_chip mmc_spi_chip_info = {
86 .enable_dma = 0, 70 .enable_dma = 0,
87 .bits_per_word = 8,
88}; 71};
89#endif 72#endif
90 73
@@ -102,24 +85,12 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
102 }, 85 },
103#endif 86#endif
104 87
105#if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE)
106 {
107 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
108 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
109 .bus_num = 0, /* Framework bus number */
110 .chip_select = 1, /* Framework chip select. */
111 .platform_data = NULL, /* No spi_driver specific config */
112 .controller_data = &spi_adc_chip_info,
113 },
114#endif
115
116#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 88#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
117 { 89 {
118 .modalias = "ad183x", 90 .modalias = "ad183x",
119 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 91 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
120 .bus_num = 0, 92 .bus_num = 0,
121 .chip_select = 4, 93 .chip_select = 4,
122 .controller_data = &ad1836_spi_chip_info,
123 }, 94 },
124#endif 95#endif
125 96
diff --git a/arch/blackfin/mach-bf537/boards/dnp5370.c b/arch/blackfin/mach-bf537/boards/dnp5370.c
index 6b4ff4605bff..8bc951de979d 100644
--- a/arch/blackfin/mach-bf537/boards/dnp5370.c
+++ b/arch/blackfin/mach-bf537/boards/dnp5370.c
@@ -130,7 +130,6 @@ static struct platform_device asmb_flash_device = {
130 130
131static struct bfin5xx_spi_chip mmc_spi_chip_info = { 131static struct bfin5xx_spi_chip mmc_spi_chip_info = {
132 .enable_dma = 0, /* use no dma transfer with this chip*/ 132 .enable_dma = 0, /* use no dma transfer with this chip*/
133 .bits_per_word = 8,
134}; 133};
135 134
136#endif 135#endif
@@ -161,7 +160,6 @@ static struct flash_platform_data bfin_spi_dataflash_data = {
161 160
162static struct bfin5xx_spi_chip spi_dataflash_chip_info = { 161static struct bfin5xx_spi_chip spi_dataflash_chip_info = {
163 .enable_dma = 0, /* use no dma transfer with this chip*/ 162 .enable_dma = 0, /* use no dma transfer with this chip*/
164 .bits_per_word = 8,
165}; 163};
166#endif 164#endif
167 165
diff --git a/arch/blackfin/mach-bf537/boards/minotaur.c b/arch/blackfin/mach-bf537/boards/minotaur.c
index bfb3671a78da..c62f9dccd9f7 100644
--- a/arch/blackfin/mach-bf537/boards/minotaur.c
+++ b/arch/blackfin/mach-bf537/boards/minotaur.c
@@ -159,14 +159,12 @@ static struct flash_platform_data bfin_spi_flash_data = {
159/* SPI flash chip (m25p64) */ 159/* SPI flash chip (m25p64) */
160static struct bfin5xx_spi_chip spi_flash_chip_info = { 160static struct bfin5xx_spi_chip spi_flash_chip_info = {
161 .enable_dma = 0, /* use dma transfer with this chip*/ 161 .enable_dma = 0, /* use dma transfer with this chip*/
162 .bits_per_word = 8,
163}; 162};
164#endif 163#endif
165 164
166#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 165#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
167static struct bfin5xx_spi_chip mmc_spi_chip_info = { 166static struct bfin5xx_spi_chip mmc_spi_chip_info = {
168 .enable_dma = 0, 167 .enable_dma = 0,
169 .bits_per_word = 8,
170}; 168};
171#endif 169#endif
172 170
diff --git a/arch/blackfin/mach-bf537/boards/pnav10.c b/arch/blackfin/mach-bf537/boards/pnav10.c
index 9389f03e3b0a..3b8151d99b9a 100644
--- a/arch/blackfin/mach-bf537/boards/pnav10.c
+++ b/arch/blackfin/mach-bf537/boards/pnav10.c
@@ -184,40 +184,16 @@ static struct flash_platform_data bfin_spi_flash_data = {
184/* SPI flash chip (m25p64) */ 184/* SPI flash chip (m25p64) */
185static struct bfin5xx_spi_chip spi_flash_chip_info = { 185static struct bfin5xx_spi_chip spi_flash_chip_info = {
186 .enable_dma = 0, /* use dma transfer with this chip*/ 186 .enable_dma = 0, /* use dma transfer with this chip*/
187 .bits_per_word = 8,
188};
189#endif
190
191#if defined(CONFIG_BFIN_SPI_ADC) \
192 || defined(CONFIG_BFIN_SPI_ADC_MODULE)
193/* SPI ADC chip */
194static struct bfin5xx_spi_chip spi_adc_chip_info = {
195 .enable_dma = 1, /* use dma transfer with this chip*/
196 .bits_per_word = 16,
197};
198#endif
199
200#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \
201 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
202static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
203 .enable_dma = 0,
204 .bits_per_word = 16,
205}; 187};
206#endif 188#endif
207 189
208#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 190#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
209static struct bfin5xx_spi_chip mmc_spi_chip_info = { 191static struct bfin5xx_spi_chip mmc_spi_chip_info = {
210 .enable_dma = 0, 192 .enable_dma = 0,
211 .bits_per_word = 8,
212}; 193};
213#endif 194#endif
214 195
215#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 196#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
216static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
217 .enable_dma = 0,
218 .bits_per_word = 16,
219};
220
221static const struct ad7877_platform_data bfin_ad7877_ts_info = { 197static const struct ad7877_platform_data bfin_ad7877_ts_info = {
222 .model = 7877, 198 .model = 7877,
223 .vref_delay_usecs = 50, /* internal, no capacitor */ 199 .vref_delay_usecs = 50, /* internal, no capacitor */
@@ -248,18 +224,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
248 }, 224 },
249#endif 225#endif
250 226
251#if defined(CONFIG_BFIN_SPI_ADC) \
252 || defined(CONFIG_BFIN_SPI_ADC_MODULE)
253 {
254 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
255 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
256 .bus_num = 0, /* Framework bus number */
257 .chip_select = 1, /* Framework chip select. */
258 .platform_data = NULL, /* No spi_driver specific config */
259 .controller_data = &spi_adc_chip_info,
260 },
261#endif
262
263#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ 227#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \
264 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 228 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
265 { 229 {
@@ -267,7 +231,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
267 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 231 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
268 .bus_num = 0, 232 .bus_num = 0,
269 .chip_select = 4, 233 .chip_select = 4,
270 .controller_data = &ad1836_spi_chip_info,
271 }, 234 },
272#endif 235#endif
273#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 236#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
@@ -288,7 +251,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
288 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ 251 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
289 .bus_num = 0, 252 .bus_num = 0,
290 .chip_select = 5, 253 .chip_select = 5,
291 .controller_data = &spi_ad7877_chip_info,
292}, 254},
293#endif 255#endif
294 256
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c
index 3d166e362135..664588923dac 100644
--- a/arch/blackfin/mach-bf537/boards/stamp.c
+++ b/arch/blackfin/mach-bf537/boards/stamp.c
@@ -536,49 +536,11 @@ static struct flash_platform_data bfin_spi_flash_data = {
536/* SPI flash chip (m25p64) */ 536/* SPI flash chip (m25p64) */
537static struct bfin5xx_spi_chip spi_flash_chip_info = { 537static struct bfin5xx_spi_chip spi_flash_chip_info = {
538 .enable_dma = 0, /* use dma transfer with this chip*/ 538 .enable_dma = 0, /* use dma transfer with this chip*/
539 .bits_per_word = 8,
540};
541#endif
542
543#if defined(CONFIG_BFIN_SPI_ADC) \
544 || defined(CONFIG_BFIN_SPI_ADC_MODULE)
545/* SPI ADC chip */
546static struct bfin5xx_spi_chip spi_adc_chip_info = {
547 .enable_dma = 1, /* use dma transfer with this chip*/
548 .bits_per_word = 16,
549};
550#endif
551
552#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \
553 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
554static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
555 .enable_dma = 0,
556 .bits_per_word = 16,
557};
558#endif
559
560#if defined(CONFIG_SND_BF5XX_SOC_AD193X) \
561 || defined(CONFIG_SND_BF5XX_SOC_AD193X_MODULE)
562static struct bfin5xx_spi_chip ad1938_spi_chip_info = {
563 .enable_dma = 0,
564 .bits_per_word = 8,
565};
566#endif
567
568#if defined(CONFIG_SND_BF5XX_SOC_ADAV80X) \
569 || defined(CONFIG_SND_BF5XX_SOC_ADAV80X_MODULE)
570static struct bfin5xx_spi_chip adav801_spi_chip_info = {
571 .enable_dma = 0,
572 .bits_per_word = 8,
573}; 539};
574#endif 540#endif
575 541
576#if defined(CONFIG_INPUT_AD714X_SPI) || defined(CONFIG_INPUT_AD714X_SPI_MODULE) 542#if defined(CONFIG_INPUT_AD714X_SPI) || defined(CONFIG_INPUT_AD714X_SPI_MODULE)
577#include <linux/input/ad714x.h> 543#include <linux/input/ad714x.h>
578static struct bfin5xx_spi_chip ad7147_spi_chip_info = {
579 .enable_dma = 0,
580 .bits_per_word = 16,
581};
582 544
583static struct ad714x_slider_plat ad7147_spi_slider_plat[] = { 545static struct ad714x_slider_plat ad7147_spi_slider_plat[] = {
584 { 546 {
@@ -688,7 +650,6 @@ static struct ad714x_platform_data ad7142_i2c_platform_data = {
688#if defined(CONFIG_AD2S90) || defined(CONFIG_AD2S90_MODULE) 650#if defined(CONFIG_AD2S90) || defined(CONFIG_AD2S90_MODULE)
689static struct bfin5xx_spi_chip ad2s90_spi_chip_info = { 651static struct bfin5xx_spi_chip ad2s90_spi_chip_info = {
690 .enable_dma = 0, 652 .enable_dma = 0,
691 .bits_per_word = 16,
692}; 653};
693#endif 654#endif
694 655
@@ -700,7 +661,6 @@ static unsigned short ad2s120x_platform_data[] = {
700 661
701static struct bfin5xx_spi_chip ad2s120x_spi_chip_info = { 662static struct bfin5xx_spi_chip ad2s120x_spi_chip_info = {
702 .enable_dma = 0, 663 .enable_dma = 0,
703 .bits_per_word = 16,
704}; 664};
705#endif 665#endif
706 666
@@ -717,14 +677,12 @@ static unsigned short ad2s1210_platform_data[] = {
717 677
718static struct bfin5xx_spi_chip ad2s1210_spi_chip_info = { 678static struct bfin5xx_spi_chip ad2s1210_spi_chip_info = {
719 .enable_dma = 0, 679 .enable_dma = 0,
720 .bits_per_word = 8,
721}; 680};
722#endif 681#endif
723 682
724#if defined(CONFIG_AD7314) || defined(CONFIG_AD7314_MODULE) 683#if defined(CONFIG_AD7314) || defined(CONFIG_AD7314_MODULE)
725static struct bfin5xx_spi_chip ad7314_spi_chip_info = { 684static struct bfin5xx_spi_chip ad7314_spi_chip_info = {
726 .enable_dma = 0, 685 .enable_dma = 0,
727 .bits_per_word = 16,
728}; 686};
729#endif 687#endif
730 688
@@ -738,7 +696,6 @@ static unsigned short ad7816_platform_data[] = {
738 696
739static struct bfin5xx_spi_chip ad7816_spi_chip_info = { 697static struct bfin5xx_spi_chip ad7816_spi_chip_info = {
740 .enable_dma = 0, 698 .enable_dma = 0,
741 .bits_per_word = 8,
742}; 699};
743#endif 700#endif
744 701
@@ -752,7 +709,6 @@ static unsigned long adt7310_platform_data[3] = {
752 709
753static struct bfin5xx_spi_chip adt7310_spi_chip_info = { 710static struct bfin5xx_spi_chip adt7310_spi_chip_info = {
754 .enable_dma = 0, 711 .enable_dma = 0,
755 .bits_per_word = 8,
756}; 712};
757#endif 713#endif
758 714
@@ -761,11 +717,6 @@ static unsigned short ad7298_platform_data[] = {
761 GPIO_PF7, /* busy_pin */ 717 GPIO_PF7, /* busy_pin */
762 0, 718 0,
763}; 719};
764
765static struct bfin5xx_spi_chip ad7298_spi_chip_info = {
766 .enable_dma = 0,
767 .bits_per_word = 16,
768};
769#endif 720#endif
770 721
771#if defined(CONFIG_ADT7316_SPI) || defined(CONFIG_ADT7316_SPI_MODULE) 722#if defined(CONFIG_ADT7316_SPI) || defined(CONFIG_ADT7316_SPI_MODULE)
@@ -776,7 +727,6 @@ static unsigned long adt7316_spi_data[2] = {
776 727
777static struct bfin5xx_spi_chip adt7316_spi_chip_info = { 728static struct bfin5xx_spi_chip adt7316_spi_chip_info = {
778 .enable_dma = 0, 729 .enable_dma = 0,
779 .bits_per_word = 8,
780}; 730};
781#endif 731#endif
782 732
@@ -803,18 +753,12 @@ static struct mmc_spi_platform_data bfin_mmc_spi_pdata = {
803 753
804static struct bfin5xx_spi_chip mmc_spi_chip_info = { 754static struct bfin5xx_spi_chip mmc_spi_chip_info = {
805 .enable_dma = 0, 755 .enable_dma = 0,
806 .bits_per_word = 8,
807 .pio_interrupt = 0, 756 .pio_interrupt = 0,
808}; 757};
809#endif 758#endif
810 759
811#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) 760#if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
812#include <linux/spi/ad7877.h> 761#include <linux/spi/ad7877.h>
813static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
814 .enable_dma = 0,
815 .bits_per_word = 16,
816};
817
818static const struct ad7877_platform_data bfin_ad7877_ts_info = { 762static const struct ad7877_platform_data bfin_ad7877_ts_info = {
819 .model = 7877, 763 .model = 7877,
820 .vref_delay_usecs = 50, /* internal, no capacitor */ 764 .vref_delay_usecs = 50, /* internal, no capacitor */
@@ -886,39 +830,13 @@ static const struct adxl34x_platform_data adxl34x_info = {
886}; 830};
887#endif 831#endif
888 832
889#if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE)
890static struct bfin5xx_spi_chip spi_ad7879_chip_info = {
891 .enable_dma = 0,
892 .bits_per_word = 16,
893};
894#endif
895
896#if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
897static struct bfin5xx_spi_chip spidev_chip_info = {
898 .enable_dma = 0,
899 .bits_per_word = 8,
900};
901#endif
902
903#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
904static struct bfin5xx_spi_chip lq035q1_spi_chip_info = {
905 .enable_dma = 0,
906 .bits_per_word = 8,
907};
908#endif
909
910#if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE) 833#if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE)
911static struct bfin5xx_spi_chip enc28j60_spi_chip_info = { 834static struct bfin5xx_spi_chip enc28j60_spi_chip_info = {
912 .enable_dma = 1, 835 .enable_dma = 1,
913 .bits_per_word = 8,
914}; 836};
915#endif 837#endif
916 838
917#if defined(CONFIG_ADF702X) || defined(CONFIG_ADF702X_MODULE) 839#if defined(CONFIG_ADF702X) || defined(CONFIG_ADF702X_MODULE)
918static struct bfin5xx_spi_chip adf7021_spi_chip_info = {
919 .bits_per_word = 16,
920};
921
922#include <linux/spi/adf702x.h> 840#include <linux/spi/adf702x.h>
923#define TXREG 0x0160A470 841#define TXREG 0x0160A470
924static const u32 adf7021_regs[] = { 842static const u32 adf7021_regs[] = {
@@ -962,10 +880,6 @@ static inline void adf702x_mac_init(void) {}
962 880
963#if defined(CONFIG_TOUCHSCREEN_ADS7846) || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) 881#if defined(CONFIG_TOUCHSCREEN_ADS7846) || defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
964#include <linux/spi/ads7846.h> 882#include <linux/spi/ads7846.h>
965static struct bfin5xx_spi_chip ad7873_spi_chip_info = {
966 .bits_per_word = 8,
967};
968
969static int ads7873_get_pendown_state(void) 883static int ads7873_get_pendown_state(void)
970{ 884{
971 return gpio_get_value(GPIO_PF6); 885 return gpio_get_value(GPIO_PF6);
@@ -1012,21 +926,12 @@ static struct flash_platform_data bfin_spi_dataflash_data = {
1012/* DataFlash chip */ 926/* DataFlash chip */
1013static struct bfin5xx_spi_chip data_flash_chip_info = { 927static struct bfin5xx_spi_chip data_flash_chip_info = {
1014 .enable_dma = 0, /* use dma transfer with this chip*/ 928 .enable_dma = 0, /* use dma transfer with this chip*/
1015 .bits_per_word = 8,
1016};
1017#endif
1018
1019#if defined(CONFIG_INPUT_ADXL34X_SPI) || defined(CONFIG_INPUT_ADXL34X_SPI_MODULE)
1020static struct bfin5xx_spi_chip spi_adxl34x_chip_info = {
1021 .enable_dma = 0, /* use dma transfer with this chip*/
1022 .bits_per_word = 8,
1023}; 929};
1024#endif 930#endif
1025 931
1026#if defined(CONFIG_AD7476) || defined(CONFIG_AD7476_MODULE) 932#if defined(CONFIG_AD7476) || defined(CONFIG_AD7476_MODULE)
1027static struct bfin5xx_spi_chip spi_ad7476_chip_info = { 933static struct bfin5xx_spi_chip spi_ad7476_chip_info = {
1028 .enable_dma = 0, /* use dma transfer with this chip*/ 934 .enable_dma = 0, /* use dma transfer with this chip*/
1029 .bits_per_word = 8,
1030}; 935};
1031#endif 936#endif
1032 937
@@ -1056,17 +961,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1056 .mode = SPI_MODE_3, 961 .mode = SPI_MODE_3,
1057 }, 962 },
1058#endif 963#endif
1059#if defined(CONFIG_BFIN_SPI_ADC) \
1060 || defined(CONFIG_BFIN_SPI_ADC_MODULE)
1061 {
1062 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
1063 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
1064 .bus_num = 0, /* Framework bus number */
1065 .chip_select = 1, /* Framework chip select. */
1066 .platform_data = NULL, /* No spi_driver specific config */
1067 .controller_data = &spi_adc_chip_info,
1068 },
1069#endif
1070 964
1071#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \ 965#if defined(CONFIG_SND_BF5XX_SOC_AD183X) \
1072 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 966 || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
@@ -1076,7 +970,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1076 .bus_num = 0, 970 .bus_num = 0,
1077 .chip_select = 4, 971 .chip_select = 4,
1078 .platform_data = "ad1836", /* only includes chip name for the moment */ 972 .platform_data = "ad1836", /* only includes chip name for the moment */
1079 .controller_data = &ad1836_spi_chip_info,
1080 .mode = SPI_MODE_3, 973 .mode = SPI_MODE_3,
1081 }, 974 },
1082#endif 975#endif
@@ -1087,7 +980,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1087 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 980 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
1088 .bus_num = 0, 981 .bus_num = 0,
1089 .chip_select = 5, 982 .chip_select = 5,
1090 .controller_data = &ad1938_spi_chip_info,
1091 .mode = SPI_MODE_3, 983 .mode = SPI_MODE_3,
1092 }, 984 },
1093#endif 985#endif
@@ -1098,7 +990,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1098 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 990 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
1099 .bus_num = 0, 991 .bus_num = 0,
1100 .chip_select = 1, 992 .chip_select = 1,
1101 .controller_data = &adav801_spi_chip_info,
1102 .mode = SPI_MODE_3, 993 .mode = SPI_MODE_3,
1103 }, 994 },
1104#endif 995#endif
@@ -1112,7 +1003,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1112 .chip_select = 5, 1003 .chip_select = 5,
1113 .mode = SPI_MODE_3, 1004 .mode = SPI_MODE_3,
1114 .platform_data = &ad7147_spi_platform_data, 1005 .platform_data = &ad7147_spi_platform_data,
1115 .controller_data = &ad7147_spi_chip_info,
1116 }, 1006 },
1117#endif 1007#endif
1118 1008
@@ -1191,7 +1081,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1191 .bus_num = 0, 1081 .bus_num = 0,
1192 .chip_select = 4, /* CS, change it for your board */ 1082 .chip_select = 4, /* CS, change it for your board */
1193 .platform_data = ad7298_platform_data, 1083 .platform_data = ad7298_platform_data,
1194 .controller_data = &ad7298_spi_chip_info,
1195 .mode = SPI_MODE_3, 1084 .mode = SPI_MODE_3,
1196 }, 1085 },
1197#endif 1086#endif
@@ -1228,7 +1117,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1228 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ 1117 .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
1229 .bus_num = 0, 1118 .bus_num = 0,
1230 .chip_select = 1, 1119 .chip_select = 1,
1231 .controller_data = &spi_ad7877_chip_info,
1232 }, 1120 },
1233#endif 1121#endif
1234#if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE) 1122#if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE)
@@ -1239,7 +1127,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1239 .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ 1127 .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */
1240 .bus_num = 0, 1128 .bus_num = 0,
1241 .chip_select = 1, 1129 .chip_select = 1,
1242 .controller_data = &spi_ad7879_chip_info,
1243 .mode = SPI_CPHA | SPI_CPOL, 1130 .mode = SPI_CPHA | SPI_CPOL,
1244 }, 1131 },
1245#endif 1132#endif
@@ -1249,7 +1136,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1249 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 1136 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
1250 .bus_num = 0, 1137 .bus_num = 0,
1251 .chip_select = 1, 1138 .chip_select = 1,
1252 .controller_data = &spidev_chip_info,
1253 }, 1139 },
1254#endif 1140#endif
1255#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE) 1141#if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
@@ -1258,7 +1144,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1258 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */ 1144 .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
1259 .bus_num = 0, 1145 .bus_num = 0,
1260 .chip_select = 2, 1146 .chip_select = 2,
1261 .controller_data = &lq035q1_spi_chip_info,
1262 .mode = SPI_CPHA | SPI_CPOL, 1147 .mode = SPI_CPHA | SPI_CPOL,
1263 }, 1148 },
1264#endif 1149#endif
@@ -1281,7 +1166,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1281 .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */ 1166 .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */
1282 .bus_num = 0, 1167 .bus_num = 0,
1283 .chip_select = 2, 1168 .chip_select = 2,
1284 .controller_data = &spi_adxl34x_chip_info,
1285 .mode = SPI_MODE_3, 1169 .mode = SPI_MODE_3,
1286 }, 1170 },
1287#endif 1171#endif
@@ -1291,7 +1175,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1291 .max_speed_hz = 16000000, /* max spi clock (SCK) speed in HZ */ 1175 .max_speed_hz = 16000000, /* max spi clock (SCK) speed in HZ */
1292 .bus_num = 0, 1176 .bus_num = 0,
1293 .chip_select = GPIO_PF10 + MAX_CTRL_CS, /* GPIO controlled SSEL */ 1177 .chip_select = GPIO_PF10 + MAX_CTRL_CS, /* GPIO controlled SSEL */
1294 .controller_data = &adf7021_spi_chip_info,
1295 .platform_data = &adf7021_platform_data, 1178 .platform_data = &adf7021_platform_data,
1296 .mode = SPI_MODE_0, 1179 .mode = SPI_MODE_0,
1297 }, 1180 },
@@ -1303,7 +1186,6 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
1303 .bus_num = 0, 1186 .bus_num = 0,
1304 .irq = IRQ_PF6, 1187 .irq = IRQ_PF6,
1305 .chip_select = GPIO_PF10 + MAX_CTRL_CS, /* GPIO controlled SSEL */ 1188 .chip_select = GPIO_PF10 + MAX_CTRL_CS, /* GPIO controlled SSEL */
1306 .controller_data = &ad7873_spi_chip_info,
1307 .platform_data = &ad7873_pdata, 1189 .platform_data = &ad7873_pdata,
1308 .mode = SPI_MODE_0, 1190 .mode = SPI_MODE_0,
1309 }, 1191 },
diff --git a/arch/blackfin/mach-bf537/boards/tcm_bf537.c b/arch/blackfin/mach-bf537/boards/tcm_bf537.c
index 6d4c1caaa945..9b7287abdfa1 100644
--- a/arch/blackfin/mach-bf537/boards/tcm_bf537.c
+++ b/arch/blackfin/mach-bf537/boards/tcm_bf537.c
@@ -62,29 +62,12 @@ static struct flash_platform_data bfin_spi_flash_data = {
62/* SPI flash chip (m25p64) */ 62/* SPI flash chip (m25p64) */
63static struct bfin5xx_spi_chip spi_flash_chip_info = { 63static struct bfin5xx_spi_chip spi_flash_chip_info = {
64 .enable_dma = 0, /* use dma transfer with this chip*/ 64 .enable_dma = 0, /* use dma transfer with this chip*/
65 .bits_per_word = 8,
66};
67#endif
68
69#if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE)
70/* SPI ADC chip */
71static struct bfin5xx_spi_chip spi_adc_chip_info = {
72 .enable_dma = 1, /* use dma transfer with this chip*/
73 .bits_per_word = 16,
74};
75#endif
76
77#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
78static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
79 .enable_dma = 0,
80 .bits_per_word = 16,
81}; 65};
82#endif 66#endif
83 67
84#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE) 68#if defined(CONFIG_MMC_SPI) || defined(CONFIG_MMC_SPI_MODULE)
85static struct bfin5xx_spi_chip mmc_spi_chip_info = { 69static struct bfin5xx_spi_chip mmc_spi_chip_info = {
86 .enable_dma = 0, 70 .enable_dma = 0,
87 .bits_per_word = 8,
88}; 71};
89#endif 72#endif
90 73
@@ -102,24 +85,12 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
102 }, 85 },
103#endif 86#endif
104 87
105#if defined(CONFIG_BFIN_SPI_ADC) || defined(CONFIG_BFIN_SPI_ADC_MODULE)
106 {
107 .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
108 .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
109 .bus_num = 0, /* Framework bus number */
110 .chip_select = 1, /* Framework chip select. */
111 .platform_data = NULL, /* No spi_driver specific config */
112 .controller_data = &spi_adc_chip_info,
113 },
114#endif
115
116#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE) 88#if defined(CONFIG_SND_BF5XX_SOC_AD183X) || defined(CONFIG_SND_BF5XX_SOC_AD183X_MODULE)
117 { 89 {
118 .modalias = "ad183x", 90 .modalias = "ad183x",
119 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ 91 .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
120 .bus_num = 0, 92 .bus_num = 0,
121 .chip_select = 4, 93 .chip_select = 4,
122 .controller_data = &ad1836_spi_chip_info,
123 }, 94 },
124#endif 95#endif
125 96