stamp.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615
  1. /*
  2. * File: arch/blackfin/mach-bf537/boards/stamp.c
  3. * Based on: arch/blackfin/mach-bf533/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-2006 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/spi/spi.h>
  35. #include <linux/spi/flash.h>
  36. #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
  37. #include <linux/usb_isp1362.h>
  38. #endif
  39. #include <asm/irq.h>
  40. #include <linux/irq.h>
  41. #include <linux/interrupt.h>
  42. #include <asm/bfin5xx_spi.h>
  43. #include <linux/usb_sl811.h>
  44. #include <linux/spi/ad7877.h>
  45. /*
  46. * Name the Board for the /proc/cpuinfo
  47. */
  48. char *bfin_board_name = "ADDS-BF537-STAMP";
  49. /*
  50. * Driver needs to know address, irq and flag pin.
  51. */
  52. #define ISP1761_BASE 0x203C0000
  53. #define ISP1761_IRQ IRQ_PF7
  54. #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
  55. static struct resource bfin_isp1761_resources[] = {
  56. [0] = {
  57. .name = "isp1761-regs",
  58. .start = ISP1761_BASE + 0x00000000,
  59. .end = ISP1761_BASE + 0x000fffff,
  60. .flags = IORESOURCE_MEM,
  61. },
  62. [1] = {
  63. .start = ISP1761_IRQ,
  64. .end = ISP1761_IRQ,
  65. .flags = IORESOURCE_IRQ,
  66. },
  67. };
  68. static struct platform_device bfin_isp1761_device = {
  69. .name = "isp1761",
  70. .id = 0,
  71. .num_resources = ARRAY_SIZE(bfin_isp1761_resources),
  72. .resource = bfin_isp1761_resources,
  73. };
  74. static struct platform_device *bfin_isp1761_devices[] = {
  75. &bfin_isp1761_device,
  76. };
  77. int __init bfin_isp1761_init(void)
  78. {
  79. unsigned int num_devices=ARRAY_SIZE(bfin_isp1761_devices);
  80. printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__);
  81. set_irq_type(ISP1761_IRQ, IRQF_TRIGGER_FALLING);
  82. return platform_add_devices(bfin_isp1761_devices, num_devices);
  83. }
  84. void __exit bfin_isp1761_exit(void)
  85. {
  86. platform_device_unregister(&bfin_isp1761_device);
  87. }
  88. arch_initcall(bfin_isp1761_init);
  89. #endif
  90. #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
  91. static struct resource bfin_pcmcia_cf_resources[] = {
  92. {
  93. .start = 0x20310000, /* IO PORT */
  94. .end = 0x20312000,
  95. .flags = IORESOURCE_MEM,
  96. },{
  97. .start = 0x20311000, /* Attribute Memeory */
  98. .end = 0x20311FFF,
  99. .flags = IORESOURCE_MEM,
  100. },{
  101. .start = IRQ_PF4,
  102. .end = IRQ_PF4,
  103. .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
  104. },{
  105. .start = 6, /* Card Detect PF6 */
  106. .end = 6,
  107. .flags = IORESOURCE_IRQ,
  108. },
  109. };
  110. static struct platform_device bfin_pcmcia_cf_device = {
  111. .name = "bfin_cf_pcmcia",
  112. .id = -1,
  113. .num_resources = ARRAY_SIZE(bfin_pcmcia_cf_resources),
  114. .resource = bfin_pcmcia_cf_resources,
  115. };
  116. #endif
  117. #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
  118. static struct platform_device rtc_device = {
  119. .name = "rtc-bfin",
  120. .id = -1,
  121. };
  122. #endif
  123. #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
  124. static struct resource smc91x_resources[] = {
  125. {
  126. .name = "smc91x-regs",
  127. .start = 0x20300300,
  128. .end = 0x20300300 + 16,
  129. .flags = IORESOURCE_MEM,
  130. },{
  131. .start = IRQ_PF7,
  132. .end = IRQ_PF7,
  133. .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
  134. },
  135. };
  136. static struct platform_device smc91x_device = {
  137. .name = "smc91x",
  138. .id = 0,
  139. .num_resources = ARRAY_SIZE(smc91x_resources),
  140. .resource = smc91x_resources,
  141. };
  142. #endif
  143. #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
  144. static struct resource sl811_hcd_resources[] = {
  145. {
  146. .start = 0x20340000,
  147. .end = 0x20340000,
  148. .flags = IORESOURCE_MEM,
  149. },{
  150. .start = 0x20340004,
  151. .end = 0x20340004,
  152. .flags = IORESOURCE_MEM,
  153. },{
  154. .start = CONFIG_USB_SL811_BFIN_IRQ,
  155. .end = CONFIG_USB_SL811_BFIN_IRQ,
  156. .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
  157. },
  158. };
  159. #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
  160. void sl811_port_power(struct device *dev, int is_on)
  161. {
  162. unsigned short mask = (1 << CONFIG_USB_SL811_BFIN_GPIO_VBUS);
  163. bfin_write_PORT_FER(bfin_read_PORT_FER() & ~mask);
  164. bfin_write_FIO_DIR(bfin_read_FIO_DIR() | mask);
  165. if (is_on)
  166. bfin_write_FIO_FLAG_S(mask);
  167. else
  168. bfin_write_FIO_FLAG_C(mask);
  169. }
  170. #endif
  171. static struct sl811_platform_data sl811_priv = {
  172. .potpg = 10,
  173. .power = 250, /* == 500mA */
  174. #if defined(CONFIG_USB_SL811_BFIN_USE_VBUS)
  175. .port_power = &sl811_port_power,
  176. #endif
  177. };
  178. static struct platform_device sl811_hcd_device = {
  179. .name = "sl811-hcd",
  180. .id = 0,
  181. .dev = {
  182. .platform_data = &sl811_priv,
  183. },
  184. .num_resources = ARRAY_SIZE(sl811_hcd_resources),
  185. .resource = sl811_hcd_resources,
  186. };
  187. #endif
  188. #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
  189. static struct resource isp1362_hcd_resources[] = {
  190. {
  191. .start = 0x20360000,
  192. .end = 0x20360000,
  193. .flags = IORESOURCE_MEM,
  194. },{
  195. .start = 0x20360004,
  196. .end = 0x20360004,
  197. .flags = IORESOURCE_MEM,
  198. },{
  199. .start = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
  200. .end = CONFIG_USB_ISP1362_BFIN_GPIO_IRQ,
  201. .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
  202. },
  203. };
  204. static struct isp1362_platform_data isp1362_priv = {
  205. .sel15Kres = 1,
  206. .clknotstop = 0,
  207. .oc_enable = 0,
  208. .int_act_high = 0,
  209. .int_edge_triggered = 0,
  210. .remote_wakeup_connected = 0,
  211. .no_power_switching = 1,
  212. .power_switching_mode = 0,
  213. };
  214. static struct platform_device isp1362_hcd_device = {
  215. .name = "isp1362-hcd",
  216. .id = 0,
  217. .dev = {
  218. .platform_data = &isp1362_priv,
  219. },
  220. .num_resources = ARRAY_SIZE(isp1362_hcd_resources),
  221. .resource = isp1362_hcd_resources,
  222. };
  223. #endif
  224. #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
  225. static struct platform_device bfin_mac_device = {
  226. .name = "bfin_mac",
  227. };
  228. #endif
  229. #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
  230. static struct resource net2272_bfin_resources[] = {
  231. {
  232. .start = 0x20300000,
  233. .end = 0x20300000 + 0x100,
  234. .flags = IORESOURCE_MEM,
  235. },{
  236. .start = IRQ_PF7,
  237. .end = IRQ_PF7,
  238. .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
  239. },
  240. };
  241. static struct platform_device net2272_bfin_device = {
  242. .name = "net2272",
  243. .id = -1,
  244. .num_resources = ARRAY_SIZE(net2272_bfin_resources),
  245. .resource = net2272_bfin_resources,
  246. };
  247. #endif
  248. #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
  249. /* all SPI peripherals info goes here */
  250. #if defined(CONFIG_MTD_M25P80) \
  251. || defined(CONFIG_MTD_M25P80_MODULE)
  252. static struct mtd_partition bfin_spi_flash_partitions[] = {
  253. {
  254. .name = "bootloader",
  255. .size = 0x00020000,
  256. .offset = 0,
  257. .mask_flags = MTD_CAP_ROM
  258. },{
  259. .name = "kernel",
  260. .size = 0xe0000,
  261. .offset = 0x20000
  262. },{
  263. .name = "file system",
  264. .size = 0x700000,
  265. .offset = 0x00100000,
  266. }
  267. };
  268. static struct flash_platform_data bfin_spi_flash_data = {
  269. .name = "m25p80",
  270. .parts = bfin_spi_flash_partitions,
  271. .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
  272. .type = "m25p64",
  273. };
  274. /* SPI flash chip (m25p64) */
  275. static struct bfin5xx_spi_chip spi_flash_chip_info = {
  276. .enable_dma = 0, /* use dma transfer with this chip*/
  277. .bits_per_word = 8,
  278. };
  279. #endif
  280. #if defined(CONFIG_SPI_ADC_BF533) \
  281. || defined(CONFIG_SPI_ADC_BF533_MODULE)
  282. /* SPI ADC chip */
  283. static struct bfin5xx_spi_chip spi_adc_chip_info = {
  284. .enable_dma = 1, /* use dma transfer with this chip*/
  285. .bits_per_word = 16,
  286. };
  287. #endif
  288. #if defined(CONFIG_SND_BLACKFIN_AD1836) \
  289. || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
  290. static struct bfin5xx_spi_chip ad1836_spi_chip_info = {
  291. .enable_dma = 0,
  292. .bits_per_word = 16,
  293. };
  294. #endif
  295. #if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
  296. static struct bfin5xx_spi_chip ad9960_spi_chip_info = {
  297. .enable_dma = 0,
  298. .bits_per_word = 16,
  299. };
  300. #endif
  301. #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
  302. static struct bfin5xx_spi_chip spi_mmc_chip_info = {
  303. .enable_dma = 1,
  304. .bits_per_word = 8,
  305. };
  306. #endif
  307. #if defined(CONFIG_PBX)
  308. static struct bfin5xx_spi_chip spi_si3xxx_chip_info = {
  309. .ctl_reg = 0x4, /* send zero */
  310. .enable_dma = 0,
  311. .bits_per_word = 8,
  312. .cs_change_per_word = 1,
  313. };
  314. #endif
  315. #if defined(CONFIG_AD5304) || defined(CONFIG_AD5304_MODULE)
  316. static struct bfin5xx_spi_chip ad5304_chip_info = {
  317. .enable_dma = 0,
  318. .bits_per_word = 16,
  319. };
  320. #endif
  321. #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
  322. static struct bfin5xx_spi_chip spi_ad7877_chip_info = {
  323. // .cs_change_per_word = 1,
  324. .enable_dma = 0,
  325. .bits_per_word = 16,
  326. };
  327. static const struct ad7877_platform_data bfin_ad7877_ts_info = {
  328. .model = 7877,
  329. .vref_delay_usecs = 50, /* internal, no capacitor */
  330. .x_plate_ohms = 419,
  331. .y_plate_ohms = 486,
  332. .pressure_max = 1000,
  333. .pressure_min = 0,
  334. .stopacq_polarity = 1,
  335. .first_conversion_delay = 3,
  336. .acquisition_time = 1,
  337. .averaging = 1,
  338. .pen_down_acc_interval = 1,
  339. };
  340. #endif
  341. static struct spi_board_info bfin_spi_board_info[] __initdata = {
  342. #if defined(CONFIG_MTD_M25P80) \
  343. || defined(CONFIG_MTD_M25P80_MODULE)
  344. {
  345. /* the modalias must be the same as spi device driver name */
  346. .modalias = "m25p80", /* Name of spi_driver for this device */
  347. .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
  348. .bus_num = 1, /* Framework bus number */
  349. .chip_select = 1, /* Framework chip select. On STAMP537 it is SPISSEL1*/
  350. .platform_data = &bfin_spi_flash_data,
  351. .controller_data = &spi_flash_chip_info,
  352. .mode = SPI_MODE_3,
  353. },
  354. #endif
  355. #if defined(CONFIG_SPI_ADC_BF533) \
  356. || defined(CONFIG_SPI_ADC_BF533_MODULE)
  357. {
  358. .modalias = "bfin_spi_adc", /* Name of spi_driver for this device */
  359. .max_speed_hz = 6250000, /* max spi clock (SCK) speed in HZ */
  360. .bus_num = 1, /* Framework bus number */
  361. .chip_select = 1, /* Framework chip select. */
  362. .platform_data = NULL, /* No spi_driver specific config */
  363. .controller_data = &spi_adc_chip_info,
  364. },
  365. #endif
  366. #if defined(CONFIG_SND_BLACKFIN_AD1836) \
  367. || defined(CONFIG_SND_BLACKFIN_AD1836_MODULE)
  368. {
  369. .modalias = "ad1836-spi",
  370. .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
  371. .bus_num = 1,
  372. .chip_select = CONFIG_SND_BLACKFIN_SPI_PFBIT,
  373. .controller_data = &ad1836_spi_chip_info,
  374. },
  375. #endif
  376. #if defined(CONFIG_AD9960) || defined(CONFIG_AD9960_MODULE)
  377. {
  378. .modalias = "ad9960-spi",
  379. .max_speed_hz = 10000000, /* max spi clock (SCK) speed in HZ */
  380. .bus_num = 1,
  381. .chip_select = 1,
  382. .controller_data = &ad9960_spi_chip_info,
  383. },
  384. #endif
  385. #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE)
  386. {
  387. .modalias = "spi_mmc_dummy",
  388. .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
  389. .bus_num = 1,
  390. .chip_select = 0,
  391. .platform_data = NULL,
  392. .controller_data = &spi_mmc_chip_info,
  393. .mode = SPI_MODE_3,
  394. },
  395. {
  396. .modalias = "spi_mmc",
  397. .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
  398. .bus_num = 1,
  399. .chip_select = CONFIG_SPI_MMC_CS_CHAN,
  400. .platform_data = NULL,
  401. .controller_data = &spi_mmc_chip_info,
  402. .mode = SPI_MODE_3,
  403. },
  404. #endif
  405. #if defined(CONFIG_PBX)
  406. {
  407. .modalias = "fxs-spi",
  408. .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
  409. .bus_num = 1,
  410. .chip_select = 3,
  411. .controller_data= &spi_si3xxx_chip_info,
  412. .mode = SPI_MODE_3,
  413. },
  414. {
  415. .modalias = "fxo-spi",
  416. .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
  417. .bus_num = 1,
  418. .chip_select = 2,
  419. .controller_data= &spi_si3xxx_chip_info,
  420. .mode = SPI_MODE_3,
  421. },
  422. #endif
  423. #if defined(CONFIG_AD5304) || defined(CONFIG_AD5304_MODULE)
  424. {
  425. .modalias = "ad5304_spi",
  426. .max_speed_hz = 1250000, /* max spi clock (SCK) speed in HZ */
  427. .bus_num = 1,
  428. .chip_select = 2,
  429. .platform_data = NULL,
  430. .controller_data = &ad5304_chip_info,
  431. .mode = SPI_MODE_2,
  432. },
  433. #endif
  434. #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
  435. {
  436. .modalias = "ad7877",
  437. .platform_data = &bfin_ad7877_ts_info,
  438. .irq = IRQ_PF6,
  439. .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
  440. .bus_num = 1,
  441. .chip_select = 1,
  442. .controller_data = &spi_ad7877_chip_info,
  443. },
  444. #endif
  445. };
  446. /* SPI controller data */
  447. static struct bfin5xx_spi_master spi_bfin_master_info = {
  448. .num_chipselect = 8,
  449. .enable_dma = 1, /* master has the ability to do dma transfer */
  450. };
  451. static struct platform_device spi_bfin_master_device = {
  452. .name = "bfin-spi-master",
  453. .id = 1, /* Bus number */
  454. .dev = {
  455. .platform_data = &spi_bfin_master_info, /* Passed to driver */
  456. },
  457. };
  458. #endif /* spi master and devices */
  459. #if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
  460. static struct platform_device bfin_fb_device = {
  461. .name = "bf537-fb",
  462. };
  463. #endif
  464. #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
  465. static struct resource bfin_uart_resources[] = {
  466. {
  467. .start = 0xFFC00400,
  468. .end = 0xFFC004FF,
  469. .flags = IORESOURCE_MEM,
  470. },{
  471. .start = 0xFFC02000,
  472. .end = 0xFFC020FF,
  473. .flags = IORESOURCE_MEM,
  474. },
  475. };
  476. static struct platform_device bfin_uart_device = {
  477. .name = "bfin-uart",
  478. .id = 1,
  479. .num_resources = ARRAY_SIZE(bfin_uart_resources),
  480. .resource = bfin_uart_resources,
  481. };
  482. #endif
  483. #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
  484. static struct platform_device i2c_bfin_twi_device = {
  485. .name = "i2c-bfin-twi",
  486. .id = 0,
  487. };
  488. #endif
  489. #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
  490. static struct platform_device bfin_sport0_uart_device = {
  491. .name = "bfin-sport-uart",
  492. .id = 0,
  493. };
  494. static struct platform_device bfin_sport1_uart_device = {
  495. .name = "bfin-sport-uart",
  496. .id = 1,
  497. };
  498. #endif
  499. static struct platform_device *stamp_devices[] __initdata = {
  500. #if defined(CONFIG_BFIN_CFPCMCIA) || defined(CONFIG_BFIN_CFPCMCIA_MODULE)
  501. &bfin_pcmcia_cf_device,
  502. #endif
  503. #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
  504. &rtc_device,
  505. #endif
  506. #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE)
  507. &sl811_hcd_device,
  508. #endif
  509. #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE)
  510. &isp1362_hcd_device,
  511. #endif
  512. #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
  513. &smc91x_device,
  514. #endif
  515. #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)
  516. &bfin_mac_device,
  517. #endif
  518. #if defined(CONFIG_USB_NET2272) || defined(CONFIG_USB_NET2272_MODULE)
  519. &net2272_bfin_device,
  520. #endif
  521. #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
  522. &spi_bfin_master_device,
  523. #endif
  524. #if defined(CONFIG_FB_BF537_LQ035) || defined(CONFIG_FB_BF537_LQ035_MODULE)
  525. &bfin_fb_device,
  526. #endif
  527. #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
  528. &bfin_uart_device,
  529. #endif
  530. #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
  531. &i2c_bfin_twi_device,
  532. #endif
  533. #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
  534. &bfin_sport0_uart_device,
  535. &bfin_sport1_uart_device,
  536. #endif
  537. };
  538. static int __init stamp_init(void)
  539. {
  540. printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__);
  541. platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices));
  542. #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
  543. spi_register_board_info(bfin_spi_board_info,
  544. ARRAY_SIZE(bfin_spi_board_info));
  545. #endif
  546. return 0;
  547. }
  548. arch_initcall(stamp_init);