ezkit.c 16 KB

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