stamp.c 16 KB

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