ezkit.c 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677
  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 or later.
  7. */
  8. #include <linux/device.h>
  9. #include <linux/platform_device.h>
  10. #include <linux/mtd/mtd.h>
  11. #include <linux/mtd/partitions.h>
  12. #include <linux/mtd/physmap.h>
  13. #include <linux/spi/spi.h>
  14. #include <linux/irq.h>
  15. #include <linux/interrupt.h>
  16. #include <linux/gpio.h>
  17. #include <linux/delay.h>
  18. #include <asm/dma.h>
  19. #include <asm/bfin5xx_spi.h>
  20. #include <asm/portmux.h>
  21. #include <asm/dpmc.h>
  22. /*
  23. * Name the Board for the /proc/cpuinfo
  24. */
  25. const char bfin_board_name[] = "ADI BF561-EZKIT";
  26. #if IS_ENABLED(CONFIG_USB_ISP1760_HCD)
  27. #include <linux/usb/isp1760.h>
  28. static struct resource bfin_isp1760_resources[] = {
  29. [0] = {
  30. .start = 0x2C0F0000,
  31. .end = 0x203C0000 + 0xfffff,
  32. .flags = IORESOURCE_MEM,
  33. },
  34. [1] = {
  35. .start = IRQ_PF10,
  36. .end = IRQ_PF10,
  37. .flags = IORESOURCE_IRQ,
  38. },
  39. };
  40. static struct isp1760_platform_data isp1760_priv = {
  41. .is_isp1761 = 0,
  42. .bus_width_16 = 1,
  43. .port1_otg = 0,
  44. .analog_oc = 0,
  45. .dack_polarity_high = 0,
  46. .dreq_polarity_high = 0,
  47. };
  48. static struct platform_device bfin_isp1760_device = {
  49. .name = "isp1760",
  50. .id = 0,
  51. .dev = {
  52. .platform_data = &isp1760_priv,
  53. },
  54. .num_resources = ARRAY_SIZE(bfin_isp1760_resources),
  55. .resource = bfin_isp1760_resources,
  56. };
  57. #endif
  58. #if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
  59. #include <linux/usb/isp1362.h>
  60. static struct resource isp1362_hcd_resources[] = {
  61. {
  62. .start = 0x2c060000,
  63. .end = 0x2c060000,
  64. .flags = IORESOURCE_MEM,
  65. }, {
  66. .start = 0x2c060004,
  67. .end = 0x2c060004,
  68. .flags = IORESOURCE_MEM,
  69. }, {
  70. .start = IRQ_PF8,
  71. .end = IRQ_PF8,
  72. .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWEDGE,
  73. },
  74. };
  75. static struct isp1362_platform_data isp1362_priv = {
  76. .sel15Kres = 1,
  77. .clknotstop = 0,
  78. .oc_enable = 0,
  79. .int_act_high = 0,
  80. .int_edge_triggered = 0,
  81. .remote_wakeup_connected = 0,
  82. .no_power_switching = 1,
  83. .power_switching_mode = 0,
  84. };
  85. static struct platform_device isp1362_hcd_device = {
  86. .name = "isp1362-hcd",
  87. .id = 0,
  88. .dev = {
  89. .platform_data = &isp1362_priv,
  90. },
  91. .num_resources = ARRAY_SIZE(isp1362_hcd_resources),
  92. .resource = isp1362_hcd_resources,
  93. };
  94. #endif
  95. #if IS_ENABLED(CONFIG_USB_NET2272)
  96. static struct resource net2272_bfin_resources[] = {
  97. {
  98. .start = 0x2C000000,
  99. .end = 0x2C000000 + 0x7F,
  100. .flags = IORESOURCE_MEM,
  101. }, {
  102. .start = 1,
  103. .flags = IORESOURCE_BUS,
  104. }, {
  105. .start = IRQ_PF10,
  106. .end = IRQ_PF10,
  107. .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
  108. },
  109. };
  110. static struct platform_device net2272_bfin_device = {
  111. .name = "net2272",
  112. .id = -1,
  113. .num_resources = ARRAY_SIZE(net2272_bfin_resources),
  114. .resource = net2272_bfin_resources,
  115. };
  116. #endif
  117. /*
  118. * USB-LAN EzExtender board
  119. * Driver needs to know address, irq and flag pin.
  120. */
  121. #if IS_ENABLED(CONFIG_SMC91X)
  122. #include <linux/smc91x.h>
  123. static struct smc91x_platdata smc91x_info = {
  124. .flags = SMC91X_USE_32BIT | SMC91X_NOWAIT,
  125. .leda = RPC_LED_100_10,
  126. .ledb = RPC_LED_TX_RX,
  127. };
  128. static struct resource smc91x_resources[] = {
  129. {
  130. .name = "smc91x-regs",
  131. .start = 0x2C010300,
  132. .end = 0x2C010300 + 16,
  133. .flags = IORESOURCE_MEM,
  134. }, {
  135. .start = IRQ_PF9,
  136. .end = IRQ_PF9,
  137. .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
  138. },
  139. };
  140. static struct platform_device smc91x_device = {
  141. .name = "smc91x",
  142. .id = 0,
  143. .num_resources = ARRAY_SIZE(smc91x_resources),
  144. .resource = smc91x_resources,
  145. .dev = {
  146. .platform_data = &smc91x_info,
  147. },
  148. };
  149. #endif
  150. #if IS_ENABLED(CONFIG_SERIAL_BFIN)
  151. #ifdef CONFIG_SERIAL_BFIN_UART0
  152. static struct resource bfin_uart0_resources[] = {
  153. {
  154. .start = BFIN_UART_THR,
  155. .end = BFIN_UART_GCTL+2,
  156. .flags = IORESOURCE_MEM,
  157. },
  158. {
  159. .start = IRQ_UART_TX,
  160. .end = IRQ_UART_TX,
  161. .flags = IORESOURCE_IRQ,
  162. },
  163. {
  164. .start = IRQ_UART_RX,
  165. .end = IRQ_UART_RX,
  166. .flags = IORESOURCE_IRQ,
  167. },
  168. {
  169. .start = IRQ_UART_ERROR,
  170. .end = IRQ_UART_ERROR,
  171. .flags = IORESOURCE_IRQ,
  172. },
  173. {
  174. .start = CH_UART_TX,
  175. .end = CH_UART_TX,
  176. .flags = IORESOURCE_DMA,
  177. },
  178. {
  179. .start = CH_UART_RX,
  180. .end = CH_UART_RX,
  181. .flags = IORESOURCE_DMA,
  182. },
  183. };
  184. static unsigned short bfin_uart0_peripherals[] = {
  185. P_UART0_TX, P_UART0_RX, 0
  186. };
  187. static struct platform_device bfin_uart0_device = {
  188. .name = "bfin-uart",
  189. .id = 0,
  190. .num_resources = ARRAY_SIZE(bfin_uart0_resources),
  191. .resource = bfin_uart0_resources,
  192. .dev = {
  193. .platform_data = &bfin_uart0_peripherals, /* Passed to driver */
  194. },
  195. };
  196. #endif
  197. #endif
  198. #if IS_ENABLED(CONFIG_BFIN_SIR)
  199. #ifdef CONFIG_BFIN_SIR0
  200. static struct resource bfin_sir0_resources[] = {
  201. {
  202. .start = 0xFFC00400,
  203. .end = 0xFFC004FF,
  204. .flags = IORESOURCE_MEM,
  205. },
  206. {
  207. .start = IRQ_UART0_RX,
  208. .end = IRQ_UART0_RX+1,
  209. .flags = IORESOURCE_IRQ,
  210. },
  211. {
  212. .start = CH_UART0_RX,
  213. .end = CH_UART0_RX+1,
  214. .flags = IORESOURCE_DMA,
  215. },
  216. };
  217. static struct platform_device bfin_sir0_device = {
  218. .name = "bfin_sir",
  219. .id = 0,
  220. .num_resources = ARRAY_SIZE(bfin_sir0_resources),
  221. .resource = bfin_sir0_resources,
  222. };
  223. #endif
  224. #endif
  225. #if IS_ENABLED(CONFIG_MTD_PHYSMAP)
  226. static struct mtd_partition ezkit_partitions[] = {
  227. {
  228. .name = "bootloader(nor)",
  229. .size = 0x40000,
  230. .offset = 0,
  231. }, {
  232. .name = "linux kernel(nor)",
  233. .size = 0x1C0000,
  234. .offset = MTDPART_OFS_APPEND,
  235. }, {
  236. .name = "file system(nor)",
  237. .size = 0x800000 - 0x40000 - 0x1C0000 - 0x2000 * 8,
  238. .offset = MTDPART_OFS_APPEND,
  239. }, {
  240. .name = "config(nor)",
  241. .size = 0x2000 * 7,
  242. .offset = MTDPART_OFS_APPEND,
  243. }, {
  244. .name = "u-boot env(nor)",
  245. .size = 0x2000,
  246. .offset = MTDPART_OFS_APPEND,
  247. }
  248. };
  249. static struct physmap_flash_data ezkit_flash_data = {
  250. .width = 2,
  251. .parts = ezkit_partitions,
  252. .nr_parts = ARRAY_SIZE(ezkit_partitions),
  253. };
  254. static struct resource ezkit_flash_resource = {
  255. .start = 0x20000000,
  256. .end = 0x207fffff,
  257. .flags = IORESOURCE_MEM,
  258. };
  259. static struct platform_device ezkit_flash_device = {
  260. .name = "physmap-flash",
  261. .id = 0,
  262. .dev = {
  263. .platform_data = &ezkit_flash_data,
  264. },
  265. .num_resources = 1,
  266. .resource = &ezkit_flash_resource,
  267. };
  268. #endif
  269. #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
  270. /* SPI (0) */
  271. static struct resource bfin_spi0_resource[] = {
  272. [0] = {
  273. .start = SPI0_REGBASE,
  274. .end = SPI0_REGBASE + 0xFF,
  275. .flags = IORESOURCE_MEM,
  276. },
  277. [1] = {
  278. .start = CH_SPI,
  279. .end = CH_SPI,
  280. .flags = IORESOURCE_DMA,
  281. },
  282. [2] = {
  283. .start = IRQ_SPI,
  284. .end = IRQ_SPI,
  285. .flags = IORESOURCE_IRQ,
  286. }
  287. };
  288. /* SPI controller data */
  289. static struct bfin5xx_spi_master bfin_spi0_info = {
  290. .num_chipselect = 8,
  291. .enable_dma = 1, /* master has the ability to do dma transfer */
  292. .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
  293. };
  294. static struct platform_device bfin_spi0_device = {
  295. .name = "bfin-spi",
  296. .id = 0, /* Bus number */
  297. .num_resources = ARRAY_SIZE(bfin_spi0_resource),
  298. .resource = bfin_spi0_resource,
  299. .dev = {
  300. .platform_data = &bfin_spi0_info, /* Passed to driver */
  301. },
  302. };
  303. #endif
  304. static struct spi_board_info bfin_spi_board_info[] __initdata = {
  305. #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X)
  306. {
  307. .modalias = "ad183x",
  308. .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
  309. .bus_num = 0,
  310. .chip_select = 4,
  311. .platform_data = "ad1836", /* only includes chip name for the moment */
  312. .mode = SPI_MODE_3,
  313. },
  314. #endif
  315. #if IS_ENABLED(CONFIG_SPI_SPIDEV)
  316. {
  317. .modalias = "spidev",
  318. .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
  319. .bus_num = 0,
  320. .chip_select = 1,
  321. },
  322. #endif
  323. };
  324. #if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
  325. #include <linux/input.h>
  326. #include <linux/gpio_keys.h>
  327. static struct gpio_keys_button bfin_gpio_keys_table[] = {
  328. {BTN_0, GPIO_PF5, 1, "gpio-keys: BTN0"},
  329. {BTN_1, GPIO_PF6, 1, "gpio-keys: BTN1"},
  330. {BTN_2, GPIO_PF7, 1, "gpio-keys: BTN2"},
  331. {BTN_3, GPIO_PF8, 1, "gpio-keys: BTN3"},
  332. };
  333. static struct gpio_keys_platform_data bfin_gpio_keys_data = {
  334. .buttons = bfin_gpio_keys_table,
  335. .nbuttons = ARRAY_SIZE(bfin_gpio_keys_table),
  336. };
  337. static struct platform_device bfin_device_gpiokeys = {
  338. .name = "gpio-keys",
  339. .dev = {
  340. .platform_data = &bfin_gpio_keys_data,
  341. },
  342. };
  343. #endif
  344. #if IS_ENABLED(CONFIG_I2C_GPIO)
  345. #include <linux/i2c-gpio.h>
  346. static struct i2c_gpio_platform_data i2c_gpio_data = {
  347. .sda_pin = GPIO_PF1,
  348. .scl_pin = GPIO_PF0,
  349. .sda_is_open_drain = 0,
  350. .scl_is_open_drain = 0,
  351. .udelay = 10,
  352. };
  353. static struct platform_device i2c_gpio_device = {
  354. .name = "i2c-gpio",
  355. .id = 0,
  356. .dev = {
  357. .platform_data = &i2c_gpio_data,
  358. },
  359. };
  360. #endif
  361. static const unsigned int cclk_vlev_datasheet[] =
  362. {
  363. VRPAIR(VLEV_085, 250000000),
  364. VRPAIR(VLEV_090, 300000000),
  365. VRPAIR(VLEV_095, 313000000),
  366. VRPAIR(VLEV_100, 350000000),
  367. VRPAIR(VLEV_105, 400000000),
  368. VRPAIR(VLEV_110, 444000000),
  369. VRPAIR(VLEV_115, 450000000),
  370. VRPAIR(VLEV_120, 475000000),
  371. VRPAIR(VLEV_125, 500000000),
  372. VRPAIR(VLEV_130, 600000000),
  373. };
  374. static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = {
  375. .tuple_tab = cclk_vlev_datasheet,
  376. .tabsize = ARRAY_SIZE(cclk_vlev_datasheet),
  377. .vr_settling_time = 25 /* us */,
  378. };
  379. static struct platform_device bfin_dpmc = {
  380. .name = "bfin dpmc",
  381. .dev = {
  382. .platform_data = &bfin_dmpc_vreg_data,
  383. },
  384. };
  385. #if IS_ENABLED(CONFIG_VIDEO_BLACKFIN_CAPTURE)
  386. #include <linux/videodev2.h>
  387. #include <media/blackfin/bfin_capture.h>
  388. #include <media/blackfin/ppi.h>
  389. static const unsigned short ppi_req[] = {
  390. P_PPI0_D0, P_PPI0_D1, P_PPI0_D2, P_PPI0_D3,
  391. P_PPI0_D4, P_PPI0_D5, P_PPI0_D6, P_PPI0_D7,
  392. P_PPI0_CLK, P_PPI0_FS1, P_PPI0_FS2,
  393. 0,
  394. };
  395. static const struct ppi_info ppi_info = {
  396. .type = PPI_TYPE_PPI,
  397. .dma_ch = CH_PPI0,
  398. .irq_err = IRQ_PPI1_ERROR,
  399. .base = (void __iomem *)PPI0_CONTROL,
  400. .pin_req = ppi_req,
  401. };
  402. #if IS_ENABLED(CONFIG_VIDEO_ADV7183)
  403. #include <media/adv7183.h>
  404. static struct v4l2_input adv7183_inputs[] = {
  405. {
  406. .index = 0,
  407. .name = "Composite",
  408. .type = V4L2_INPUT_TYPE_CAMERA,
  409. .std = V4L2_STD_ALL,
  410. .capabilities = V4L2_IN_CAP_STD,
  411. },
  412. {
  413. .index = 1,
  414. .name = "S-Video",
  415. .type = V4L2_INPUT_TYPE_CAMERA,
  416. .std = V4L2_STD_ALL,
  417. .capabilities = V4L2_IN_CAP_STD,
  418. },
  419. {
  420. .index = 2,
  421. .name = "Component",
  422. .type = V4L2_INPUT_TYPE_CAMERA,
  423. .std = V4L2_STD_ALL,
  424. .capabilities = V4L2_IN_CAP_STD,
  425. },
  426. };
  427. static struct bcap_route adv7183_routes[] = {
  428. {
  429. .input = ADV7183_COMPOSITE4,
  430. .output = ADV7183_8BIT_OUT,
  431. },
  432. {
  433. .input = ADV7183_SVIDEO0,
  434. .output = ADV7183_8BIT_OUT,
  435. },
  436. {
  437. .input = ADV7183_COMPONENT0,
  438. .output = ADV7183_8BIT_OUT,
  439. },
  440. };
  441. static const unsigned adv7183_gpio[] = {
  442. GPIO_PF13, /* reset pin */
  443. GPIO_PF2, /* output enable pin */
  444. };
  445. static struct bfin_capture_config bfin_capture_data = {
  446. .card_name = "BF561",
  447. .inputs = adv7183_inputs,
  448. .num_inputs = ARRAY_SIZE(adv7183_inputs),
  449. .routes = adv7183_routes,
  450. .i2c_adapter_id = 0,
  451. .board_info = {
  452. .type = "adv7183",
  453. .addr = 0x20,
  454. .platform_data = (void *)adv7183_gpio,
  455. },
  456. .ppi_info = &ppi_info,
  457. .ppi_control = (PACK_EN | DLEN_8 | DMA32 | FLD_SEL),
  458. };
  459. #endif
  460. static struct platform_device bfin_capture_device = {
  461. .name = "bfin_capture",
  462. .dev = {
  463. .platform_data = &bfin_capture_data,
  464. },
  465. };
  466. #endif
  467. #if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
  468. static struct platform_device bfin_i2s = {
  469. .name = "bfin-i2s",
  470. .id = CONFIG_SND_BF5XX_SPORT_NUM,
  471. /* TODO: add platform data here */
  472. };
  473. #endif
  474. #if IS_ENABLED(CONFIG_SND_BF5XX_AC97)
  475. static struct platform_device bfin_ac97 = {
  476. .name = "bfin-ac97",
  477. .id = CONFIG_SND_BF5XX_SPORT_NUM,
  478. /* TODO: add platform data here */
  479. };
  480. #endif
  481. #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836)
  482. static const char * const ad1836_link[] = {
  483. "bfin-i2s.0",
  484. "spi0.4",
  485. };
  486. static struct platform_device bfin_ad1836_machine = {
  487. .name = "bfin-snd-ad1836",
  488. .id = -1,
  489. .dev = {
  490. .platform_data = (void *)ad1836_link,
  491. },
  492. };
  493. #endif
  494. static struct platform_device *ezkit_devices[] __initdata = {
  495. &bfin_dpmc,
  496. #if IS_ENABLED(CONFIG_SMC91X)
  497. &smc91x_device,
  498. #endif
  499. #if IS_ENABLED(CONFIG_USB_NET2272)
  500. &net2272_bfin_device,
  501. #endif
  502. #if IS_ENABLED(CONFIG_USB_ISP1760_HCD)
  503. &bfin_isp1760_device,
  504. #endif
  505. #if IS_ENABLED(CONFIG_SPI_BFIN5XX)
  506. &bfin_spi0_device,
  507. #endif
  508. #if IS_ENABLED(CONFIG_SERIAL_BFIN)
  509. #ifdef CONFIG_SERIAL_BFIN_UART0
  510. &bfin_uart0_device,
  511. #endif
  512. #endif
  513. #if IS_ENABLED(CONFIG_BFIN_SIR)
  514. #ifdef CONFIG_BFIN_SIR0
  515. &bfin_sir0_device,
  516. #endif
  517. #endif
  518. #if IS_ENABLED(CONFIG_KEYBOARD_GPIO)
  519. &bfin_device_gpiokeys,
  520. #endif
  521. #if IS_ENABLED(CONFIG_I2C_GPIO)
  522. &i2c_gpio_device,
  523. #endif
  524. #if IS_ENABLED(CONFIG_USB_ISP1362_HCD)
  525. &isp1362_hcd_device,
  526. #endif
  527. #if IS_ENABLED(CONFIG_MTD_PHYSMAP)
  528. &ezkit_flash_device,
  529. #endif
  530. #if IS_ENABLED(CONFIG_VIDEO_BLACKFIN_CAPTURE)
  531. &bfin_capture_device,
  532. #endif
  533. #if IS_ENABLED(CONFIG_SND_BF5XX_I2S)
  534. &bfin_i2s,
  535. #endif
  536. #if IS_ENABLED(CONFIG_SND_BF5XX_AC97)
  537. &bfin_ac97,
  538. #endif
  539. #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD1836)
  540. &bfin_ad1836_machine,
  541. #endif
  542. };
  543. static int __init net2272_init(void)
  544. {
  545. #if IS_ENABLED(CONFIG_USB_NET2272)
  546. int ret;
  547. ret = gpio_request(GPIO_PF11, "net2272");
  548. if (ret)
  549. return ret;
  550. /* Reset the USB chip */
  551. gpio_direction_output(GPIO_PF11, 0);
  552. mdelay(2);
  553. gpio_set_value(GPIO_PF11, 1);
  554. #endif
  555. return 0;
  556. }
  557. static int __init ezkit_init(void)
  558. {
  559. int ret;
  560. printk(KERN_INFO "%s(): registering device resources\n", __func__);
  561. ret = platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices));
  562. if (ret < 0)
  563. return ret;
  564. #if IS_ENABLED(CONFIG_SMC91X)
  565. bfin_write_FIO0_DIR(bfin_read_FIO0_DIR() | (1 << 12));
  566. SSYNC();
  567. #endif
  568. #if IS_ENABLED(CONFIG_SND_BF5XX_SOC_AD183X)
  569. bfin_write_FIO0_DIR(bfin_read_FIO0_DIR() | (1 << 15));
  570. bfin_write_FIO0_FLAG_S(1 << 15);
  571. SSYNC();
  572. /*
  573. * This initialization lasts for approximately 4500 MCLKs.
  574. * MCLK = 12.288MHz
  575. */
  576. udelay(400);
  577. #endif
  578. if (net2272_init())
  579. pr_warning("unable to configure net2272; it probably won't work\n");
  580. spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
  581. return 0;
  582. }
  583. arch_initcall(ezkit_init);
  584. static struct platform_device *ezkit_early_devices[] __initdata = {
  585. #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK)
  586. #ifdef CONFIG_SERIAL_BFIN_UART0
  587. &bfin_uart0_device,
  588. #endif
  589. #endif
  590. };
  591. void __init native_machine_early_platform_add_devices(void)
  592. {
  593. printk(KERN_INFO "register early platform devices\n");
  594. early_platform_add_devices(ezkit_early_devices,
  595. ARRAY_SIZE(ezkit_early_devices));
  596. }