ezkit.c 14 KB

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