ezkit.c 15 KB

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