[Blackfin] arch: Encourage users to use the spidev character driver: Provide platform...
[platform/kernel/linux-starfive.git] / arch / blackfin / mach-bf548 / boards / ezkit.c
1 /*
2  * File:         arch/blackfin/mach-bf548/boards/ezkit.c
3  * Based on:     arch/blackfin/mach-bf537/boards/ezkit.c
4  * Author:       Aidan Williams <aidan@nicta.com.au>
5  *
6  * Created:
7  * Description:
8  *
9  * Modified:
10  *               Copyright 2005 National ICT Australia (NICTA)
11  *               Copyright 2004-2007 Analog Devices Inc.
12  *
13  * Bugs:         Enter bugs at http://blackfin.uclinux.org/
14  *
15  * This program is free software; you can redistribute it and/or modify
16  * it under the terms of the GNU General Public License as published by
17  * the Free Software Foundation; either version 2 of the License, or
18  * (at your option) any later version.
19  *
20  * This program is distributed in the hope that it will be useful,
21  * but WITHOUT ANY WARRANTY; without even the implied warranty of
22  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23  * GNU General Public License for more details.
24  *
25  * You should have received a copy of the GNU General Public License
26  * along with this program; if not, see the file COPYING, or write
27  * to the Free Software Foundation, Inc.,
28  * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
29  */
30
31 #include <linux/device.h>
32 #include <linux/platform_device.h>
33 #include <linux/mtd/mtd.h>
34 #include <linux/mtd/partitions.h>
35 #include <linux/mtd/physmap.h>
36 #include <linux/spi/spi.h>
37 #include <linux/spi/flash.h>
38 #include <linux/irq.h>
39 #include <linux/interrupt.h>
40 #include <linux/usb/musb.h>
41 #include <asm/bfin5xx_spi.h>
42 #include <asm/cplb.h>
43 #include <asm/dma.h>
44 #include <asm/gpio.h>
45 #include <asm/nand.h>
46 #include <asm/portmux.h>
47 #include <asm/mach/bf54x_keys.h>
48 #include <linux/input.h>
49 #include <linux/spi/ad7877.h>
50
51 /*
52  * Name the Board for the /proc/cpuinfo
53  */
54 const char bfin_board_name[] = "ADSP-BF548-EZKIT";
55
56 /*
57  *  Driver needs to know address, irq and flag pin.
58  */
59
60 #if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE)
61
62 #include <asm/mach/bf54x-lq043.h>
63
64 static struct bfin_bf54xfb_mach_info bf54x_lq043_data = {
65         .width =        480,
66         .height =       272,
67         .xres =         {480, 480, 480},
68         .yres =         {272, 272, 272},
69         .bpp =          {24, 24, 24},
70         .disp =         GPIO_PE3,
71 };
72
73 static struct resource bf54x_lq043_resources[] = {
74         {
75                 .start = IRQ_EPPI0_ERR,
76                 .end = IRQ_EPPI0_ERR,
77                 .flags = IORESOURCE_IRQ,
78         },
79 };
80
81 static struct platform_device bf54x_lq043_device = {
82         .name           = "bf54x-lq043",
83         .id             = -1,
84         .num_resources  = ARRAY_SIZE(bf54x_lq043_resources),
85         .resource       = bf54x_lq043_resources,
86         .dev            = {
87                 .platform_data = &bf54x_lq043_data,
88         },
89 };
90 #endif
91
92 #if defined(CONFIG_KEYBOARD_BFIN) || defined(CONFIG_KEYBOARD_BFIN_MODULE)
93 static const unsigned int bf548_keymap[] = {
94         KEYVAL(0, 0, KEY_ENTER),
95         KEYVAL(0, 1, KEY_HELP),
96         KEYVAL(0, 2, KEY_0),
97         KEYVAL(0, 3, KEY_BACKSPACE),
98         KEYVAL(1, 0, KEY_TAB),
99         KEYVAL(1, 1, KEY_9),
100         KEYVAL(1, 2, KEY_8),
101         KEYVAL(1, 3, KEY_7),
102         KEYVAL(2, 0, KEY_DOWN),
103         KEYVAL(2, 1, KEY_6),
104         KEYVAL(2, 2, KEY_5),
105         KEYVAL(2, 3, KEY_4),
106         KEYVAL(3, 0, KEY_UP),
107         KEYVAL(3, 1, KEY_3),
108         KEYVAL(3, 2, KEY_2),
109         KEYVAL(3, 3, KEY_1),
110 };
111
112 static struct bfin_kpad_platform_data bf54x_kpad_data = {
113         .rows                   = 4,
114         .cols                   = 4,
115         .keymap                 = bf548_keymap,
116         .keymapsize             = ARRAY_SIZE(bf548_keymap),
117         .repeat                 = 0,
118         .debounce_time          = 5000, /* ns (5ms) */
119         .coldrive_time          = 1000, /* ns (1ms) */
120         .keyup_test_interval    = 50, /* ms (50ms) */
121 };
122
123 static struct resource bf54x_kpad_resources[] = {
124         {
125                 .start = IRQ_KEY,
126                 .end = IRQ_KEY,
127                 .flags = IORESOURCE_IRQ,
128         },
129 };
130
131 static struct platform_device bf54x_kpad_device = {
132         .name           = "bf54x-keys",
133         .id             = -1,
134         .num_resources  = ARRAY_SIZE(bf54x_kpad_resources),
135         .resource       = bf54x_kpad_resources,
136         .dev            = {
137                 .platform_data = &bf54x_kpad_data,
138         },
139 };
140 #endif
141
142 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
143 static struct platform_device rtc_device = {
144         .name = "rtc-bfin",
145         .id   = -1,
146 };
147 #endif
148
149 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
150 static struct resource bfin_uart_resources[] = {
151 #ifdef CONFIG_SERIAL_BFIN_UART0
152         {
153                 .start = 0xFFC00400,
154                 .end = 0xFFC004FF,
155                 .flags = IORESOURCE_MEM,
156         },
157 #endif
158 #ifdef CONFIG_SERIAL_BFIN_UART1
159         {
160                 .start = 0xFFC02000,
161                 .end = 0xFFC020FF,
162                 .flags = IORESOURCE_MEM,
163         },
164 #endif
165 #ifdef CONFIG_SERIAL_BFIN_UART2
166         {
167                 .start = 0xFFC02100,
168                 .end = 0xFFC021FF,
169                 .flags = IORESOURCE_MEM,
170         },
171 #endif
172 #ifdef CONFIG_SERIAL_BFIN_UART3
173         {
174                 .start = 0xFFC03100,
175                 .end = 0xFFC031FF,
176         },
177 #endif
178 };
179
180 static struct platform_device bfin_uart_device = {
181         .name = "bfin-uart",
182         .id = 1,
183         .num_resources = ARRAY_SIZE(bfin_uart_resources),
184         .resource = bfin_uart_resources,
185 };
186 #endif
187
188 #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
189 static struct resource smsc911x_resources[] = {
190         {
191                 .name = "smsc911x-memory",
192                 .start = 0x24000000,
193                 .end = 0x24000000 + 0xFF,
194                 .flags = IORESOURCE_MEM,
195         },
196         {
197                 .start = IRQ_PE8,
198                 .end = IRQ_PE8,
199                 .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
200         },
201 };
202 static struct platform_device smsc911x_device = {
203         .name = "smsc911x",
204         .id = 0,
205         .num_resources = ARRAY_SIZE(smsc911x_resources),
206         .resource = smsc911x_resources,
207 };
208 #endif
209
210 #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
211 static struct resource musb_resources[] = {
212         [0] = {
213                 .start  = 0xFFC03C00,
214                 .end    = 0xFFC040FF,
215                 .flags  = IORESOURCE_MEM,
216         },
217         [1] = { /* general IRQ */
218                 .start  = IRQ_USB_INT0,
219                 .end    = IRQ_USB_INT0,
220                 .flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
221         },
222         [2] = { /* DMA IRQ */
223                 .start  = IRQ_USB_DMA,
224                 .end    = IRQ_USB_DMA,
225                 .flags  = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
226         },
227 };
228
229 static struct musb_hdrc_platform_data musb_plat = {
230 #if defined(CONFIG_USB_MUSB_OTG)
231         .mode           = MUSB_OTG,
232 #elif defined(CONFIG_USB_MUSB_HDRC_HCD)
233         .mode           = MUSB_HOST,
234 #elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
235         .mode           = MUSB_PERIPHERAL,
236 #endif
237         .multipoint     = 0,
238 };
239
240 static u64 musb_dmamask = ~(u32)0;
241
242 static struct platform_device musb_device = {
243         .name           = "musb_hdrc",
244         .id             = 0,
245         .dev = {
246                 .dma_mask               = &musb_dmamask,
247                 .coherent_dma_mask      = 0xffffffff,
248                 .platform_data          = &musb_plat,
249         },
250         .num_resources  = ARRAY_SIZE(musb_resources),
251         .resource       = musb_resources,
252 };
253 #endif
254
255 #if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE)
256 static struct resource bfin_atapi_resources[] = {
257         {
258                 .start = 0xFFC03800,
259                 .end = 0xFFC0386F,
260                 .flags = IORESOURCE_MEM,
261         },
262         {
263                 .start = IRQ_ATAPI_ERR,
264                 .end = IRQ_ATAPI_ERR,
265                 .flags = IORESOURCE_IRQ,
266         },
267 };
268
269 static struct platform_device bfin_atapi_device = {
270         .name = "pata-bf54x",
271         .id = -1,
272         .num_resources = ARRAY_SIZE(bfin_atapi_resources),
273         .resource = bfin_atapi_resources,
274 };
275 #endif
276
277 #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
278 static struct mtd_partition partition_info[] = {
279         {
280                 .name = "Linux Kernel",
281                 .offset = 0,
282                 .size = 4 * SIZE_1M,
283         },
284         {
285                 .name = "File System",
286                 .offset = 4 * SIZE_1M,
287                 .size = (256 - 4) * SIZE_1M,
288         },
289 };
290
291 static struct bf5xx_nand_platform bf5xx_nand_platform = {
292         .page_size = NFC_PG_SIZE_256,
293         .data_width = NFC_NWIDTH_8,
294         .partitions = partition_info,
295         .nr_partitions = ARRAY_SIZE(partition_info),
296         .rd_dly = 3,
297         .wr_dly = 3,
298 };
299
300 static struct resource bf5xx_nand_resources[] = {
301         {
302                 .start = 0xFFC03B00,
303                 .end = 0xFFC03B4F,
304                 .flags = IORESOURCE_MEM,
305         },
306         {
307                 .start = CH_NFC,
308                 .end = CH_NFC,
309                 .flags = IORESOURCE_IRQ,
310         },
311 };
312
313 static struct platform_device bf5xx_nand_device = {
314         .name = "bf5xx-nand",
315         .id = 0,
316         .num_resources = ARRAY_SIZE(bf5xx_nand_resources),
317         .resource = bf5xx_nand_resources,
318         .dev = {
319                 .platform_data = &bf5xx_nand_platform,
320         },
321 };
322 #endif
323
324 #if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN)
325 static struct platform_device bf54x_sdh_device = {
326         .name = "bfin-sdh",
327         .id = 0,
328 };
329 #endif
330
331 static struct mtd_partition ezkit_partitions[] = {
332         {
333                 .name       = "Bootloader",
334                 .size       = 0x20000,
335                 .offset     = 0,
336         }, {
337                 .name       = "Kernel",
338                 .size       = 0xE0000,
339                 .offset     = MTDPART_OFS_APPEND,
340         }, {
341                 .name       = "RootFS",
342                 .size       = MTDPART_SIZ_FULL,
343                 .offset     = MTDPART_OFS_APPEND,
344         }
345 };
346
347 static struct physmap_flash_data ezkit_flash_data = {
348         .width      = 2,
349         .parts      = ezkit_partitions,
350         .nr_parts   = ARRAY_SIZE(ezkit_partitions),
351 };
352
353 static struct resource ezkit_flash_resource = {
354         .start = 0x20000000,
355         .end   = 0x20ffffff,
356         .flags = IORESOURCE_MEM,
357 };
358
359 static struct platform_device ezkit_flash_device = {
360         .name          = "physmap-flash",
361         .id            = 0,
362         .dev = {
363                 .platform_data = &ezkit_flash_data,
364         },
365         .num_resources = 1,
366         .resource      = &ezkit_flash_resource,
367 };
368
369 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
370 /* all SPI peripherals info goes here */
371 #if defined(CONFIG_MTD_M25P80) \
372         || defined(CONFIG_MTD_M25P80_MODULE)
373 /* SPI flash chip (m25p16) */
374 static struct mtd_partition bfin_spi_flash_partitions[] = {
375         {
376                 .name = "bootloader",
377                 .size = 0x00040000,
378                 .offset = 0,
379                 .mask_flags = MTD_CAP_ROM
380         }, {
381                 .name = "linux kernel",
382                 .size = 0x1c0000,
383                 .offset = 0x40000
384         }
385 };
386
387 static struct flash_platform_data bfin_spi_flash_data = {
388         .name = "m25p80",
389         .parts = bfin_spi_flash_partitions,
390         .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
391         .type = "m25p16",
392 };
393
394 static struct bfin5xx_spi_chip spi_flash_chip_info = {
395         .enable_dma = 0,         /* use dma transfer with this chip*/
396         .bits_per_word = 8,
397         .cs_change_per_word = 0,
398 };
399 #endif
400
401 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
402 static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
403         .cs_change_per_word = 0,
404         .enable_dma = 0,
405         .bits_per_word = 16,
406 };
407
408 static const struct ad7877_platform_data bfin_ad7877_ts_info = {
409         .model                  = 7877,
410         .vref_delay_usecs       = 50,   /* internal, no capacitor */
411         .x_plate_ohms           = 419,
412         .y_plate_ohms           = 486,
413         .pressure_max           = 1000,
414         .pressure_min           = 0,
415         .stopacq_polarity       = 1,
416         .first_conversion_delay = 3,
417         .acquisition_time       = 1,
418         .averaging              = 1,
419         .pen_down_acc_interval  = 1,
420 };
421 #endif
422
423 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
424 static struct bfin5xx_spi_chip spidev_chip_info = {
425         .enable_dma = 0,
426         .bits_per_word = 8,
427 };
428 #endif
429
430 static struct spi_board_info bf54x_spi_board_info[] __initdata = {
431 #if defined(CONFIG_MTD_M25P80) \
432         || defined(CONFIG_MTD_M25P80_MODULE)
433         {
434                 /* the modalias must be the same as spi device driver name */
435                 .modalias = "m25p80", /* Name of spi_driver for this device */
436                 .max_speed_hz = 25000000,     /* max spi clock (SCK) speed in HZ */
437                 .bus_num = 0, /* Framework bus number */
438                 .chip_select = 1, /* SPI_SSEL1*/
439                 .platform_data = &bfin_spi_flash_data,
440                 .controller_data = &spi_flash_chip_info,
441                 .mode = SPI_MODE_3,
442         },
443 #endif
444 #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
445 {
446         .modalias               = "ad7877",
447         .platform_data          = &bfin_ad7877_ts_info,
448         .irq                    = IRQ_PJ11,
449         .max_speed_hz           = 12500000,     /* max spi clock (SCK) speed in HZ */
450         .bus_num                = 0,
451         .chip_select            = 2,
452         .controller_data = &spi_ad7877_chip_info,
453 },
454 #endif
455 #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
456         {
457                 .modalias = "spidev",
458                 .max_speed_hz = 3125000,     /* max spi clock (SCK) speed in HZ */
459                 .bus_num = 0,
460                 .chip_select = 1,
461                 .controller_data = &spidev_chip_info,
462         },
463 #endif
464 };
465
466 /* SPI (0) */
467 static struct resource bfin_spi0_resource[] = {
468         [0] = {
469                 .start = SPI0_REGBASE,
470                 .end   = SPI0_REGBASE + 0xFF,
471                 .flags = IORESOURCE_MEM,
472         },
473         [1] = {
474                 .start = CH_SPI0,
475                 .end   = CH_SPI0,
476                 .flags = IORESOURCE_IRQ,
477         }
478 };
479
480 /* SPI (1) */
481 static struct resource bfin_spi1_resource[] = {
482         [0] = {
483                 .start = SPI1_REGBASE,
484                 .end   = SPI1_REGBASE + 0xFF,
485                 .flags = IORESOURCE_MEM,
486         },
487         [1] = {
488                 .start = CH_SPI1,
489                 .end   = CH_SPI1,
490                 .flags = IORESOURCE_IRQ,
491         }
492 };
493
494 /* SPI controller data */
495 static struct bfin5xx_spi_master bf54x_spi_master_info0 = {
496         .num_chipselect = 8,
497         .enable_dma = 1,  /* master has the ability to do dma transfer */
498         .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
499 };
500
501 static struct platform_device bf54x_spi_master0 = {
502         .name = "bfin-spi",
503         .id = 0, /* Bus number */
504         .num_resources = ARRAY_SIZE(bfin_spi0_resource),
505         .resource = bfin_spi0_resource,
506         .dev = {
507                 .platform_data = &bf54x_spi_master_info0, /* Passed to driver */
508                 },
509 };
510
511 static struct bfin5xx_spi_master bf54x_spi_master_info1 = {
512         .num_chipselect = 8,
513         .enable_dma = 1,  /* master has the ability to do dma transfer */
514         .pin_req = {P_SPI1_SCK, P_SPI1_MISO, P_SPI1_MOSI, 0},
515 };
516
517 static struct platform_device bf54x_spi_master1 = {
518         .name = "bfin-spi",
519         .id = 1, /* Bus number */
520         .num_resources = ARRAY_SIZE(bfin_spi1_resource),
521         .resource = bfin_spi1_resource,
522         .dev = {
523                 .platform_data = &bf54x_spi_master_info1, /* Passed to driver */
524                 },
525 };
526 #endif  /* spi master and devices */
527
528 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
529 static struct resource bfin_twi0_resource[] = {
530         [0] = {
531                 .start = TWI0_REGBASE,
532                 .end   = TWI0_REGBASE + 0xFF,
533                 .flags = IORESOURCE_MEM,
534         },
535         [1] = {
536                 .start = IRQ_TWI0,
537                 .end   = IRQ_TWI0,
538                 .flags = IORESOURCE_IRQ,
539         },
540 };
541
542 static struct platform_device i2c_bfin_twi0_device = {
543         .name = "i2c-bfin-twi",
544         .id = 0,
545         .num_resources = ARRAY_SIZE(bfin_twi0_resource),
546         .resource = bfin_twi0_resource,
547 };
548
549 #if !defined(CONFIG_BF542)      /* The BF542 only has 1 TWI */
550 static struct resource bfin_twi1_resource[] = {
551         [0] = {
552                 .start = TWI1_REGBASE,
553                 .end   = TWI1_REGBASE + 0xFF,
554                 .flags = IORESOURCE_MEM,
555         },
556         [1] = {
557                 .start = IRQ_TWI1,
558                 .end   = IRQ_TWI1,
559                 .flags = IORESOURCE_IRQ,
560         },
561 };
562
563 static struct platform_device i2c_bfin_twi1_device = {
564         .name = "i2c-bfin-twi",
565         .id = 1,
566         .num_resources = ARRAY_SIZE(bfin_twi1_resource),
567         .resource = bfin_twi1_resource,
568 };
569 #endif
570 #endif
571
572 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
573 #include <linux/gpio_keys.h>
574
575 static struct gpio_keys_button bfin_gpio_keys_table[] = {
576         {BTN_0, GPIO_PB8, 1, "gpio-keys: BTN0"},
577         {BTN_1, GPIO_PB9, 1, "gpio-keys: BTN1"},
578         {BTN_2, GPIO_PB10, 1, "gpio-keys: BTN2"},
579         {BTN_3, GPIO_PB11, 1, "gpio-keys: BTN3"},
580 };
581
582 static struct gpio_keys_platform_data bfin_gpio_keys_data = {
583         .buttons        = bfin_gpio_keys_table,
584         .nbuttons       = ARRAY_SIZE(bfin_gpio_keys_table),
585 };
586
587 static struct platform_device bfin_device_gpiokeys = {
588         .name      = "gpio-keys",
589         .dev = {
590                 .platform_data = &bfin_gpio_keys_data,
591         },
592 };
593 #endif
594
595 static struct platform_device *ezkit_devices[] __initdata = {
596 #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
597         &rtc_device,
598 #endif
599
600 #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
601         &bfin_uart_device,
602 #endif
603
604 #if defined(CONFIG_FB_BF54X_LQ043) || defined(CONFIG_FB_BF54X_LQ043_MODULE)
605         &bf54x_lq043_device,
606 #endif
607
608 #if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
609         &smsc911x_device,
610 #endif
611
612 #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
613         &musb_device,
614 #endif
615
616 #if defined(CONFIG_PATA_BF54X) || defined(CONFIG_PATA_BF54X_MODULE)
617         &bfin_atapi_device,
618 #endif
619
620 #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
621         &bf5xx_nand_device,
622 #endif
623
624 #if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN)
625         &bf54x_sdh_device,
626 #endif
627
628 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
629         &bf54x_spi_master0,
630         &bf54x_spi_master1,
631 #endif
632
633 #if defined(CONFIG_KEYBOARD_BFIN) || defined(CONFIG_KEYBOARD_BFIN_MODULE)
634         &bf54x_kpad_device,
635 #endif
636
637 #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
638         &i2c_bfin_twi0_device,
639 #if !defined(CONFIG_BF542)
640         &i2c_bfin_twi1_device,
641 #endif
642 #endif
643
644 #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
645         &bfin_device_gpiokeys,
646 #endif
647         &ezkit_flash_device,
648 };
649
650 static int __init ezkit_init(void)
651 {
652         printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__);
653         platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices));
654
655 #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
656         spi_register_board_info(bf54x_spi_board_info,
657                         ARRAY_SIZE(bf54x_spi_board_info));
658 #endif
659
660         return 0;
661 }
662
663 arch_initcall(ezkit_init);