ezkit.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643
  1. /*
  2. * Copyright 2004-2009 Analog Devices Inc.
  3. * 2005 National ICT Australia (NICTA)
  4. * Aidan Williams <aidan@nicta.com.au>
  5. *
  6. * Licensed under the GPL-2
  7. */
  8. #include <linux/device.h>
  9. #include <linux/platform_device.h>
  10. #include <linux/mtd/mtd.h>
  11. #include <linux/mtd/physmap.h>
  12. #include <linux/mtd/partitions.h>
  13. #include <linux/spi/spi.h>
  14. #include <linux/spi/flash.h>
  15. #include <linux/irq.h>
  16. #include <linux/interrupt.h>
  17. #include <asm/bfin5xx_spi.h>
  18. #include <asm/dma.h>
  19. #include <asm/gpio.h>
  20. #include <asm/nand.h>
  21. #include <asm/portmux.h>
  22. #include <asm/dpmc.h>
  23. #include <linux/input.h>
  24. /*
  25. * Name the Board for the /proc/cpuinfo
  26. */
  27. const char bfin_board_name[] = "ADI BF538-EZKIT";
  28. /*
  29. * Driver needs to know address, irq and flag pin.
  30. */
  31. #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
  32. static struct platform_device rtc_device = {
  33. .name = "rtc-bfin",
  34. .id = -1,
  35. };
  36. #endif
  37. #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
  38. static struct resource bfin_uart_resources[] = {
  39. #ifdef CONFIG_SERIAL_BFIN_UART0
  40. {
  41. .start = 0xFFC00400,
  42. .end = 0xFFC004FF,
  43. .flags = IORESOURCE_MEM,
  44. },
  45. #endif
  46. #ifdef CONFIG_SERIAL_BFIN_UART1
  47. {
  48. .start = 0xFFC02000,
  49. .end = 0xFFC020FF,
  50. .flags = IORESOURCE_MEM,
  51. },
  52. #endif
  53. #ifdef CONFIG_SERIAL_BFIN_UART2
  54. {
  55. .start = 0xFFC02100,
  56. .end = 0xFFC021FF,
  57. .flags = IORESOURCE_MEM,
  58. },
  59. #endif
  60. };
  61. static struct platform_device bfin_uart_device = {
  62. .name = "bfin-uart",
  63. .id = 1,
  64. .num_resources = ARRAY_SIZE(bfin_uart_resources),
  65. .resource = bfin_uart_resources,
  66. };
  67. #endif
  68. #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
  69. #ifdef CONFIG_BFIN_SIR0
  70. static struct resource bfin_sir0_resources[] = {
  71. {
  72. .start = 0xFFC00400,
  73. .end = 0xFFC004FF,
  74. .flags = IORESOURCE_MEM,
  75. },
  76. {
  77. .start = IRQ_UART0_RX,
  78. .end = IRQ_UART0_RX+1,
  79. .flags = IORESOURCE_IRQ,
  80. },
  81. {
  82. .start = CH_UART0_RX,
  83. .end = CH_UART0_RX+1,
  84. .flags = IORESOURCE_DMA,
  85. },
  86. };
  87. static struct platform_device bfin_sir0_device = {
  88. .name = "bfin_sir",
  89. .id = 0,
  90. .num_resources = ARRAY_SIZE(bfin_sir0_resources),
  91. .resource = bfin_sir0_resources,
  92. };
  93. #endif
  94. #ifdef CONFIG_BFIN_SIR1
  95. static struct resource bfin_sir1_resources[] = {
  96. {
  97. .start = 0xFFC02000,
  98. .end = 0xFFC020FF,
  99. .flags = IORESOURCE_MEM,
  100. },
  101. {
  102. .start = IRQ_UART1_RX,
  103. .end = IRQ_UART1_RX+1,
  104. .flags = IORESOURCE_IRQ,
  105. },
  106. {
  107. .start = CH_UART1_RX,
  108. .end = CH_UART1_RX+1,
  109. .flags = IORESOURCE_DMA,
  110. },
  111. };
  112. static struct platform_device bfin_sir1_device = {
  113. .name = "bfin_sir",
  114. .id = 1,
  115. .num_resources = ARRAY_SIZE(bfin_sir1_resources),
  116. .resource = bfin_sir1_resources,
  117. };
  118. #endif
  119. #ifdef CONFIG_BFIN_SIR2
  120. static struct resource bfin_sir2_resources[] = {
  121. {
  122. .start = 0xFFC02100,
  123. .end = 0xFFC021FF,
  124. .flags = IORESOURCE_MEM,
  125. },
  126. {
  127. .start = IRQ_UART2_RX,
  128. .end = IRQ_UART2_RX+1,
  129. .flags = IORESOURCE_IRQ,
  130. },
  131. {
  132. .start = CH_UART2_RX,
  133. .end = CH_UART2_RX+1,
  134. .flags = IORESOURCE_DMA,
  135. },
  136. };
  137. static struct platform_device bfin_sir2_device = {
  138. .name = "bfin_sir",
  139. .id = 2,
  140. .num_resources = ARRAY_SIZE(bfin_sir2_resources),
  141. .resource = bfin_sir2_resources,
  142. };
  143. #endif
  144. #endif
  145. /*
  146. * USB-LAN EzExtender board
  147. * Driver needs to know address, irq and flag pin.
  148. */
  149. #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
  150. #include <linux/smc91x.h>
  151. static struct smc91x_platdata smc91x_info = {
  152. .flags = SMC91X_USE_16BIT | SMC91X_NOWAIT,
  153. .leda = RPC_LED_100_10,
  154. .ledb = RPC_LED_TX_RX,
  155. };
  156. static struct resource smc91x_resources[] = {
  157. {
  158. .name = "smc91x-regs",
  159. .start = 0x20310300,
  160. .end = 0x20310300 + 16,
  161. .flags = IORESOURCE_MEM,
  162. }, {
  163. .start = IRQ_PF0,
  164. .end = IRQ_PF0,
  165. .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
  166. },
  167. };
  168. static struct platform_device smc91x_device = {
  169. .name = "smc91x",
  170. .id = 0,
  171. .num_resources = ARRAY_SIZE(smc91x_resources),
  172. .resource = smc91x_resources,
  173. .dev = {
  174. .platform_data = &smc91x_info,
  175. },
  176. };
  177. #endif
  178. #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
  179. /* all SPI peripherals info goes here */
  180. #if defined(CONFIG_MTD_M25P80) \
  181. || defined(CONFIG_MTD_M25P80_MODULE)
  182. /* SPI flash chip (m25p16) */
  183. static struct mtd_partition bfin_spi_flash_partitions[] = {
  184. {
  185. .name = "bootloader(spi)",
  186. .size = 0x00040000,
  187. .offset = 0,
  188. .mask_flags = MTD_CAP_ROM
  189. }, {
  190. .name = "linux kernel(spi)",
  191. .size = 0x1c0000,
  192. .offset = 0x40000
  193. }
  194. };
  195. static struct flash_platform_data bfin_spi_flash_data = {
  196. .name = "m25p80",
  197. .parts = bfin_spi_flash_partitions,
  198. .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
  199. .type = "m25p16",
  200. };
  201. static struct bfin5xx_spi_chip spi_flash_chip_info = {
  202. .enable_dma = 0, /* use dma transfer with this chip*/
  203. .bits_per_word = 8,
  204. };
  205. #endif
  206. #if defined(CONFIG_TOUCHSCREEN_AD7879) || defined(CONFIG_TOUCHSCREEN_AD7879_MODULE)
  207. #include <linux/spi/ad7879.h>
  208. static const struct ad7879_platform_data bfin_ad7879_ts_info = {
  209. .model = 7879, /* Model = AD7879 */
  210. .x_plate_ohms = 620, /* 620 Ohm from the touch datasheet */
  211. .pressure_max = 10000,
  212. .pressure_min = 0,
  213. .first_conversion_delay = 3, /* wait 512us before do a first conversion */
  214. .acquisition_time = 1, /* 4us acquisition time per sample */
  215. .median = 2, /* do 8 measurements */
  216. .averaging = 1, /* take the average of 4 middle samples */
  217. .pen_down_acc_interval = 255, /* 9.4 ms */
  218. .gpio_output = 1, /* configure AUX/VBAT/GPIO as GPIO output */
  219. .gpio_default = 1, /* During initialization set GPIO = HIGH */
  220. };
  221. #endif
  222. #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE)
  223. static struct bfin5xx_spi_chip spi_ad7879_chip_info = {
  224. .enable_dma = 0,
  225. .bits_per_word = 16,
  226. };
  227. #endif
  228. #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
  229. #include <asm/bfin-lq035q1.h>
  230. static struct bfin_lq035q1fb_disp_info bfin_lq035q1_data = {
  231. .mode = LQ035_NORM | LQ035_RGB | LQ035_RL | LQ035_TB,
  232. .use_bl = 0, /* let something else control the LCD Blacklight */
  233. .gpio_bl = GPIO_PF7,
  234. };
  235. static struct resource bfin_lq035q1_resources[] = {
  236. {
  237. .start = IRQ_PPI_ERROR,
  238. .end = IRQ_PPI_ERROR,
  239. .flags = IORESOURCE_IRQ,
  240. },
  241. };
  242. static struct platform_device bfin_lq035q1_device = {
  243. .name = "bfin-lq035q1",
  244. .id = -1,
  245. .num_resources = ARRAY_SIZE(bfin_lq035q1_resources),
  246. .resource = bfin_lq035q1_resources,
  247. .dev = {
  248. .platform_data = &bfin_lq035q1_data,
  249. },
  250. };
  251. #endif
  252. #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
  253. static struct bfin5xx_spi_chip spidev_chip_info = {
  254. .enable_dma = 0,
  255. .bits_per_word = 8,
  256. };
  257. #endif
  258. #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
  259. static struct bfin5xx_spi_chip lq035q1_spi_chip_info = {
  260. .enable_dma = 0,
  261. .bits_per_word = 8,
  262. };
  263. #endif
  264. static struct spi_board_info bf538_spi_board_info[] __initdata = {
  265. #if defined(CONFIG_MTD_M25P80) \
  266. || defined(CONFIG_MTD_M25P80_MODULE)
  267. {
  268. /* the modalias must be the same as spi device driver name */
  269. .modalias = "m25p80", /* Name of spi_driver for this device */
  270. .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
  271. .bus_num = 0, /* Framework bus number */
  272. .chip_select = 1, /* SPI_SSEL1*/
  273. .platform_data = &bfin_spi_flash_data,
  274. .controller_data = &spi_flash_chip_info,
  275. .mode = SPI_MODE_3,
  276. },
  277. #endif
  278. #if defined(CONFIG_TOUCHSCREEN_AD7879_SPI) || defined(CONFIG_TOUCHSCREEN_AD7879_SPI_MODULE)
  279. {
  280. .modalias = "ad7879",
  281. .platform_data = &bfin_ad7879_ts_info,
  282. .irq = IRQ_PF3,
  283. .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */
  284. .bus_num = 0,
  285. .chip_select = 1,
  286. .controller_data = &spi_ad7879_chip_info,
  287. .mode = SPI_CPHA | SPI_CPOL,
  288. },
  289. #endif
  290. #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
  291. {
  292. .modalias = "bfin-lq035q1-spi",
  293. .max_speed_hz = 20000000, /* max spi clock (SCK) speed in HZ */
  294. .bus_num = 0,
  295. .chip_select = 2,
  296. .controller_data = &lq035q1_spi_chip_info,
  297. .mode = SPI_CPHA | SPI_CPOL,
  298. },
  299. #endif
  300. #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
  301. {
  302. .modalias = "spidev",
  303. .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
  304. .bus_num = 0,
  305. .chip_select = 1,
  306. .controller_data = &spidev_chip_info,
  307. },
  308. #endif
  309. };
  310. /* SPI (0) */
  311. static struct resource bfin_spi0_resource[] = {
  312. [0] = {
  313. .start = SPI0_REGBASE,
  314. .end = SPI0_REGBASE + 0xFF,
  315. .flags = IORESOURCE_MEM,
  316. },
  317. [1] = {
  318. .start = CH_SPI0,
  319. .end = CH_SPI0,
  320. .flags = IORESOURCE_DMA,
  321. },
  322. [2] = {
  323. .start = IRQ_SPI0,
  324. .end = IRQ_SPI0,
  325. .flags = IORESOURCE_IRQ,
  326. }
  327. };
  328. /* SPI (1) */
  329. static struct resource bfin_spi1_resource[] = {
  330. [0] = {
  331. .start = SPI1_REGBASE,
  332. .end = SPI1_REGBASE + 0xFF,
  333. .flags = IORESOURCE_MEM,
  334. },
  335. [1] = {
  336. .start = CH_SPI1,
  337. .end = CH_SPI1,
  338. .flags = IORESOURCE_DMA,
  339. },
  340. [2] = {
  341. .start = IRQ_SPI1,
  342. .end = IRQ_SPI1,
  343. .flags = IORESOURCE_IRQ,
  344. }
  345. };
  346. /* SPI (2) */
  347. static struct resource bfin_spi2_resource[] = {
  348. [0] = {
  349. .start = SPI2_REGBASE,
  350. .end = SPI2_REGBASE + 0xFF,
  351. .flags = IORESOURCE_MEM,
  352. },
  353. [1] = {
  354. .start = CH_SPI2,
  355. .end = CH_SPI2,
  356. .flags = IORESOURCE_DMA,
  357. },
  358. [2] = {
  359. .start = IRQ_SPI2,
  360. .end = IRQ_SPI2,
  361. .flags = IORESOURCE_IRQ,
  362. }
  363. };
  364. /* SPI controller data */
  365. static struct bfin5xx_spi_master bf538_spi_master_info0 = {
  366. .num_chipselect = 8,
  367. .enable_dma = 1, /* master has the ability to do dma transfer */
  368. .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
  369. };
  370. static struct platform_device bf538_spi_master0 = {
  371. .name = "bfin-spi",
  372. .id = 0, /* Bus number */
  373. .num_resources = ARRAY_SIZE(bfin_spi0_resource),
  374. .resource = bfin_spi0_resource,
  375. .dev = {
  376. .platform_data = &bf538_spi_master_info0, /* Passed to driver */
  377. },
  378. };
  379. static struct bfin5xx_spi_master bf538_spi_master_info1 = {
  380. .num_chipselect = 8,
  381. .enable_dma = 1, /* master has the ability to do dma transfer */
  382. .pin_req = {P_SPI1_SCK, P_SPI1_MISO, P_SPI1_MOSI, 0},
  383. };
  384. static struct platform_device bf538_spi_master1 = {
  385. .name = "bfin-spi",
  386. .id = 1, /* Bus number */
  387. .num_resources = ARRAY_SIZE(bfin_spi1_resource),
  388. .resource = bfin_spi1_resource,
  389. .dev = {
  390. .platform_data = &bf538_spi_master_info1, /* Passed to driver */
  391. },
  392. };
  393. static struct bfin5xx_spi_master bf538_spi_master_info2 = {
  394. .num_chipselect = 8,
  395. .enable_dma = 1, /* master has the ability to do dma transfer */
  396. .pin_req = {P_SPI2_SCK, P_SPI2_MISO, P_SPI2_MOSI, 0},
  397. };
  398. static struct platform_device bf538_spi_master2 = {
  399. .name = "bfin-spi",
  400. .id = 2, /* Bus number */
  401. .num_resources = ARRAY_SIZE(bfin_spi2_resource),
  402. .resource = bfin_spi2_resource,
  403. .dev = {
  404. .platform_data = &bf538_spi_master_info2, /* Passed to driver */
  405. },
  406. };
  407. #endif /* spi master and devices */
  408. #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
  409. static struct resource bfin_twi0_resource[] = {
  410. [0] = {
  411. .start = TWI0_REGBASE,
  412. .end = TWI0_REGBASE + 0xFF,
  413. .flags = IORESOURCE_MEM,
  414. },
  415. [1] = {
  416. .start = IRQ_TWI0,
  417. .end = IRQ_TWI0,
  418. .flags = IORESOURCE_IRQ,
  419. },
  420. };
  421. static struct platform_device i2c_bfin_twi0_device = {
  422. .name = "i2c-bfin-twi",
  423. .id = 0,
  424. .num_resources = ARRAY_SIZE(bfin_twi0_resource),
  425. .resource = bfin_twi0_resource,
  426. };
  427. #if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */
  428. static struct resource bfin_twi1_resource[] = {
  429. [0] = {
  430. .start = TWI1_REGBASE,
  431. .end = TWI1_REGBASE + 0xFF,
  432. .flags = IORESOURCE_MEM,
  433. },
  434. [1] = {
  435. .start = IRQ_TWI1,
  436. .end = IRQ_TWI1,
  437. .flags = IORESOURCE_IRQ,
  438. },
  439. };
  440. static struct platform_device i2c_bfin_twi1_device = {
  441. .name = "i2c-bfin-twi",
  442. .id = 1,
  443. .num_resources = ARRAY_SIZE(bfin_twi1_resource),
  444. .resource = bfin_twi1_resource,
  445. };
  446. #endif
  447. #endif
  448. #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
  449. #include <linux/gpio_keys.h>
  450. static struct gpio_keys_button bfin_gpio_keys_table[] = {
  451. {BTN_0, GPIO_PC7, 1, "gpio-keys: BTN0"},
  452. };
  453. static struct gpio_keys_platform_data bfin_gpio_keys_data = {
  454. .buttons = bfin_gpio_keys_table,
  455. .nbuttons = ARRAY_SIZE(bfin_gpio_keys_table),
  456. };
  457. static struct platform_device bfin_device_gpiokeys = {
  458. .name = "gpio-keys",
  459. .dev = {
  460. .platform_data = &bfin_gpio_keys_data,
  461. },
  462. };
  463. #endif
  464. static const unsigned int cclk_vlev_datasheet[] =
  465. {
  466. /*
  467. * Internal VLEV BF538SBBC1533
  468. ****temporarily using these values until data sheet is updated
  469. */
  470. VRPAIR(VLEV_100, 150000000),
  471. VRPAIR(VLEV_100, 250000000),
  472. VRPAIR(VLEV_110, 276000000),
  473. VRPAIR(VLEV_115, 301000000),
  474. VRPAIR(VLEV_120, 525000000),
  475. VRPAIR(VLEV_125, 550000000),
  476. VRPAIR(VLEV_130, 600000000),
  477. };
  478. static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = {
  479. .tuple_tab = cclk_vlev_datasheet,
  480. .tabsize = ARRAY_SIZE(cclk_vlev_datasheet),
  481. .vr_settling_time = 25 /* us */,
  482. };
  483. static struct platform_device bfin_dpmc = {
  484. .name = "bfin dpmc",
  485. .dev = {
  486. .platform_data = &bfin_dmpc_vreg_data,
  487. },
  488. };
  489. #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
  490. static struct mtd_partition ezkit_partitions[] = {
  491. {
  492. .name = "bootloader(nor)",
  493. .size = 0x40000,
  494. .offset = 0,
  495. }, {
  496. .name = "linux kernel(nor)",
  497. .size = 0x180000,
  498. .offset = MTDPART_OFS_APPEND,
  499. }, {
  500. .name = "file system(nor)",
  501. .size = MTDPART_SIZ_FULL,
  502. .offset = MTDPART_OFS_APPEND,
  503. }
  504. };
  505. static struct physmap_flash_data ezkit_flash_data = {
  506. .width = 2,
  507. .parts = ezkit_partitions,
  508. .nr_parts = ARRAY_SIZE(ezkit_partitions),
  509. };
  510. static struct resource ezkit_flash_resource = {
  511. .start = 0x20000000,
  512. #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
  513. .end = 0x202fffff,
  514. #else
  515. .end = 0x203fffff,
  516. #endif
  517. .flags = IORESOURCE_MEM,
  518. };
  519. static struct platform_device ezkit_flash_device = {
  520. .name = "physmap-flash",
  521. .id = 0,
  522. .dev = {
  523. .platform_data = &ezkit_flash_data,
  524. },
  525. .num_resources = 1,
  526. .resource = &ezkit_flash_resource,
  527. };
  528. #endif
  529. static struct platform_device *cm_bf538_devices[] __initdata = {
  530. &bfin_dpmc,
  531. #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
  532. &rtc_device,
  533. #endif
  534. #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
  535. &bfin_uart_device,
  536. #endif
  537. #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
  538. &bf538_spi_master0,
  539. &bf538_spi_master1,
  540. &bf538_spi_master2,
  541. #endif
  542. #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
  543. &i2c_bfin_twi0_device,
  544. &i2c_bfin_twi1_device,
  545. #endif
  546. #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
  547. #ifdef CONFIG_BFIN_SIR0
  548. &bfin_sir0_device,
  549. #endif
  550. #ifdef CONFIG_BFIN_SIR1
  551. &bfin_sir1_device,
  552. #endif
  553. #ifdef CONFIG_BFIN_SIR2
  554. &bfin_sir2_device,
  555. #endif
  556. #endif
  557. #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
  558. &smc91x_device,
  559. #endif
  560. #if defined(CONFIG_FB_BFIN_LQ035Q1) || defined(CONFIG_FB_BFIN_LQ035Q1_MODULE)
  561. &bfin_lq035q1_device,
  562. #endif
  563. #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
  564. &bfin_device_gpiokeys,
  565. #endif
  566. #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
  567. &ezkit_flash_device,
  568. #endif
  569. };
  570. static int __init ezkit_init(void)
  571. {
  572. printk(KERN_INFO "%s(): registering device resources\n", __func__);
  573. platform_add_devices(cm_bf538_devices, ARRAY_SIZE(cm_bf538_devices));
  574. #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
  575. spi_register_board_info(bf538_spi_board_info,
  576. ARRAY_SIZE(bf538_spi_board_info));
  577. #endif
  578. return 0;
  579. }
  580. arch_initcall(ezkit_init);