ezkit.c 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735
  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/spi/flash.h>
  15. #include <linux/irq.h>
  16. #include <linux/i2c.h>
  17. #include <linux/interrupt.h>
  18. #include <linux/usb/musb.h>
  19. #include <asm/bfin_spi3.h>
  20. #include <asm/dma.h>
  21. #include <asm/gpio.h>
  22. #include <asm/nand.h>
  23. #include <asm/dpmc.h>
  24. #include <asm/portmux.h>
  25. #include <asm/bfin_sdh.h>
  26. #include <linux/input.h>
  27. #include <linux/spi/ad7877.h>
  28. /*
  29. * Name the Board for the /proc/cpuinfo
  30. */
  31. const char bfin_board_name[] = "ADI BF609-EZKIT";
  32. /*
  33. * Driver needs to know address, irq and flag pin.
  34. */
  35. #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
  36. #include <linux/usb/isp1760.h>
  37. static struct resource bfin_isp1760_resources[] = {
  38. [0] = {
  39. .start = 0x2C0C0000,
  40. .end = 0x2C0C0000 + 0xfffff,
  41. .flags = IORESOURCE_MEM,
  42. },
  43. [1] = {
  44. .start = IRQ_PG7,
  45. .end = IRQ_PG7,
  46. .flags = IORESOURCE_IRQ,
  47. },
  48. };
  49. static struct isp1760_platform_data isp1760_priv = {
  50. .is_isp1761 = 0,
  51. .bus_width_16 = 1,
  52. .port1_otg = 0,
  53. .analog_oc = 0,
  54. .dack_polarity_high = 0,
  55. .dreq_polarity_high = 0,
  56. };
  57. static struct platform_device bfin_isp1760_device = {
  58. .name = "isp1760",
  59. .id = 0,
  60. .dev = {
  61. .platform_data = &isp1760_priv,
  62. },
  63. .num_resources = ARRAY_SIZE(bfin_isp1760_resources),
  64. .resource = bfin_isp1760_resources,
  65. };
  66. #endif
  67. #if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE)
  68. #include <asm/bfin_rotary.h>
  69. static struct bfin_rotary_platform_data bfin_rotary_data = {
  70. /*.rotary_up_key = KEY_UP,*/
  71. /*.rotary_down_key = KEY_DOWN,*/
  72. .rotary_rel_code = REL_WHEEL,
  73. .rotary_button_key = KEY_ENTER,
  74. .debounce = 10, /* 0..17 */
  75. .mode = ROT_QUAD_ENC | ROT_DEBE,
  76. };
  77. static struct resource bfin_rotary_resources[] = {
  78. {
  79. .start = IRQ_CNT,
  80. .end = IRQ_CNT,
  81. .flags = IORESOURCE_IRQ,
  82. },
  83. };
  84. static struct platform_device bfin_rotary_device = {
  85. .name = "bfin-rotary",
  86. .id = -1,
  87. .num_resources = ARRAY_SIZE(bfin_rotary_resources),
  88. .resource = bfin_rotary_resources,
  89. .dev = {
  90. .platform_data = &bfin_rotary_data,
  91. },
  92. };
  93. #endif
  94. #if defined(CONFIG_STMMAC_ETH) || defined(CONFIG_STMMAC_ETH_MODULE)
  95. #include <linux/stmmac.h>
  96. #include <linux/phy.h>
  97. static unsigned short pins[] = P_RMII0;
  98. static struct stmmac_mdio_bus_data phy_private_data = {
  99. .phy_mask = 1,
  100. };
  101. static struct stmmac_dma_cfg eth_dma_cfg = {
  102. .pbl = 2,
  103. };
  104. int stmmac_ptp_clk_init(struct platform_device *pdev)
  105. {
  106. bfin_write32(PADS0_EMAC_PTP_CLKSEL, 0);
  107. return 0;
  108. }
  109. static struct plat_stmmacenet_data eth_private_data = {
  110. .has_gmac = 1,
  111. .bus_id = 0,
  112. .enh_desc = 1,
  113. .phy_addr = 1,
  114. .mdio_bus_data = &phy_private_data,
  115. .dma_cfg = &eth_dma_cfg,
  116. .force_thresh_dma_mode = 1,
  117. .interface = PHY_INTERFACE_MODE_RMII,
  118. .init = stmmac_ptp_clk_init,
  119. };
  120. static struct platform_device bfin_eth_device = {
  121. .name = "stmmaceth",
  122. .id = 0,
  123. .num_resources = 2,
  124. .resource = (struct resource[]) {
  125. {
  126. .start = EMAC0_MACCFG,
  127. .end = EMAC0_MACCFG + 0x1274,
  128. .flags = IORESOURCE_MEM,
  129. },
  130. {
  131. .name = "macirq",
  132. .start = IRQ_EMAC0_STAT,
  133. .end = IRQ_EMAC0_STAT,
  134. .flags = IORESOURCE_IRQ,
  135. },
  136. },
  137. .dev = {
  138. .power.can_wakeup = 1,
  139. .platform_data = &eth_private_data,
  140. }
  141. };
  142. #endif
  143. #if defined(CONFIG_INPUT_ADXL34X) || defined(CONFIG_INPUT_ADXL34X_MODULE)
  144. #include <linux/input/adxl34x.h>
  145. static const struct adxl34x_platform_data adxl34x_info = {
  146. .x_axis_offset = 0,
  147. .y_axis_offset = 0,
  148. .z_axis_offset = 0,
  149. .tap_threshold = 0x31,
  150. .tap_duration = 0x10,
  151. .tap_latency = 0x60,
  152. .tap_window = 0xF0,
  153. .tap_axis_control = ADXL_TAP_X_EN | ADXL_TAP_Y_EN | ADXL_TAP_Z_EN,
  154. .act_axis_control = 0xFF,
  155. .activity_threshold = 5,
  156. .inactivity_threshold = 3,
  157. .inactivity_time = 4,
  158. .free_fall_threshold = 0x7,
  159. .free_fall_time = 0x20,
  160. .data_rate = 0x8,
  161. .data_range = ADXL_FULL_RES,
  162. .ev_type = EV_ABS,
  163. .ev_code_x = ABS_X, /* EV_REL */
  164. .ev_code_y = ABS_Y, /* EV_REL */
  165. .ev_code_z = ABS_Z, /* EV_REL */
  166. .ev_code_tap = {BTN_TOUCH, BTN_TOUCH, BTN_TOUCH}, /* EV_KEY x,y,z */
  167. /* .ev_code_ff = KEY_F,*/ /* EV_KEY */
  168. /* .ev_code_act_inactivity = KEY_A,*/ /* EV_KEY */
  169. .power_mode = ADXL_AUTO_SLEEP | ADXL_LINK,
  170. .fifo_mode = ADXL_FIFO_STREAM,
  171. .orientation_enable = ADXL_EN_ORIENTATION_3D,
  172. .deadzone_angle = ADXL_DEADZONE_ANGLE_10p8,
  173. .divisor_length = ADXL_LP_FILTER_DIVISOR_16,
  174. /* EV_KEY {+Z, +Y, +X, -X, -Y, -Z} */
  175. .ev_codes_orient_3d = {BTN_Z, BTN_Y, BTN_X, BTN_A, BTN_B, BTN_C},
  176. };
  177. #endif
  178. #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
  179. static struct platform_device rtc_device = {
  180. .name = "rtc-bfin",
  181. .id = -1,
  182. };
  183. #endif
  184. #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
  185. #ifdef CONFIG_SERIAL_BFIN_UART0
  186. static struct resource bfin_uart0_resources[] = {
  187. {
  188. .start = UART0_REVID,
  189. .end = UART0_RXDIV+4,
  190. .flags = IORESOURCE_MEM,
  191. },
  192. {
  193. .start = IRQ_UART0_TX,
  194. .end = IRQ_UART0_TX,
  195. .flags = IORESOURCE_IRQ,
  196. },
  197. {
  198. .start = IRQ_UART0_RX,
  199. .end = IRQ_UART0_RX,
  200. .flags = IORESOURCE_IRQ,
  201. },
  202. {
  203. .start = IRQ_UART0_STAT,
  204. .end = IRQ_UART0_STAT,
  205. .flags = IORESOURCE_IRQ,
  206. },
  207. {
  208. .start = CH_UART0_TX,
  209. .end = CH_UART0_TX,
  210. .flags = IORESOURCE_DMA,
  211. },
  212. {
  213. .start = CH_UART0_RX,
  214. .end = CH_UART0_RX,
  215. .flags = IORESOURCE_DMA,
  216. },
  217. #ifdef CONFIG_BFIN_UART0_CTSRTS
  218. { /* CTS pin -- 0 means not supported */
  219. .start = GPIO_PD10,
  220. .end = GPIO_PD10,
  221. .flags = IORESOURCE_IO,
  222. },
  223. { /* RTS pin -- 0 means not supported */
  224. .start = GPIO_PD9,
  225. .end = GPIO_PD9,
  226. .flags = IORESOURCE_IO,
  227. },
  228. #endif
  229. };
  230. static unsigned short bfin_uart0_peripherals[] = {
  231. P_UART0_TX, P_UART0_RX,
  232. #ifdef CONFIG_BFIN_UART0_CTSRTS
  233. P_UART0_RTS, P_UART0_CTS,
  234. #endif
  235. 0
  236. };
  237. static struct platform_device bfin_uart0_device = {
  238. .name = "bfin-uart",
  239. .id = 0,
  240. .num_resources = ARRAY_SIZE(bfin_uart0_resources),
  241. .resource = bfin_uart0_resources,
  242. .dev = {
  243. .platform_data = &bfin_uart0_peripherals, /* Passed to driver */
  244. },
  245. };
  246. #endif
  247. #ifdef CONFIG_SERIAL_BFIN_UART1
  248. static struct resource bfin_uart1_resources[] = {
  249. {
  250. .start = UART1_REVID,
  251. .end = UART1_RXDIV+4,
  252. .flags = IORESOURCE_MEM,
  253. },
  254. {
  255. .start = IRQ_UART1_TX,
  256. .end = IRQ_UART1_TX,
  257. .flags = IORESOURCE_IRQ,
  258. },
  259. {
  260. .start = IRQ_UART1_RX,
  261. .end = IRQ_UART1_RX,
  262. .flags = IORESOURCE_IRQ,
  263. },
  264. {
  265. .start = IRQ_UART1_STAT,
  266. .end = IRQ_UART1_STAT,
  267. .flags = IORESOURCE_IRQ,
  268. },
  269. {
  270. .start = CH_UART1_TX,
  271. .end = CH_UART1_TX,
  272. .flags = IORESOURCE_DMA,
  273. },
  274. {
  275. .start = CH_UART1_RX,
  276. .end = CH_UART1_RX,
  277. .flags = IORESOURCE_DMA,
  278. },
  279. #ifdef CONFIG_BFIN_UART1_CTSRTS
  280. { /* CTS pin -- 0 means not supported */
  281. .start = GPIO_PG13,
  282. .end = GPIO_PG13,
  283. .flags = IORESOURCE_IO,
  284. },
  285. { /* RTS pin -- 0 means not supported */
  286. .start = GPIO_PG10,
  287. .end = GPIO_PG10,
  288. .flags = IORESOURCE_IO,
  289. },
  290. #endif
  291. };
  292. static unsigned short bfin_uart1_peripherals[] = {
  293. P_UART1_TX, P_UART1_RX,
  294. #ifdef CONFIG_BFIN_UART1_CTSRTS
  295. P_UART1_RTS, P_UART1_CTS,
  296. #endif
  297. 0
  298. };
  299. static struct platform_device bfin_uart1_device = {
  300. .name = "bfin-uart",
  301. .id = 1,
  302. .num_resources = ARRAY_SIZE(bfin_uart1_resources),
  303. .resource = bfin_uart1_resources,
  304. .dev = {
  305. .platform_data = &bfin_uart1_peripherals, /* Passed to driver */
  306. },
  307. };
  308. #endif
  309. #endif
  310. #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
  311. #ifdef CONFIG_BFIN_SIR0
  312. static struct resource bfin_sir0_resources[] = {
  313. {
  314. .start = 0xFFC00400,
  315. .end = 0xFFC004FF,
  316. .flags = IORESOURCE_MEM,
  317. },
  318. {
  319. .start = IRQ_UART0_TX,
  320. .end = IRQ_UART0_TX+1,
  321. .flags = IORESOURCE_IRQ,
  322. },
  323. {
  324. .start = CH_UART0_TX,
  325. .end = CH_UART0_TX+1,
  326. .flags = IORESOURCE_DMA,
  327. },
  328. };
  329. static struct platform_device bfin_sir0_device = {
  330. .name = "bfin_sir",
  331. .id = 0,
  332. .num_resources = ARRAY_SIZE(bfin_sir0_resources),
  333. .resource = bfin_sir0_resources,
  334. };
  335. #endif
  336. #ifdef CONFIG_BFIN_SIR1
  337. static struct resource bfin_sir1_resources[] = {
  338. {
  339. .start = 0xFFC02000,
  340. .end = 0xFFC020FF,
  341. .flags = IORESOURCE_MEM,
  342. },
  343. {
  344. .start = IRQ_UART1_TX,
  345. .end = IRQ_UART1_TX+1,
  346. .flags = IORESOURCE_IRQ,
  347. },
  348. {
  349. .start = CH_UART1_TX,
  350. .end = CH_UART1_TX+1,
  351. .flags = IORESOURCE_DMA,
  352. },
  353. };
  354. static struct platform_device bfin_sir1_device = {
  355. .name = "bfin_sir",
  356. .id = 1,
  357. .num_resources = ARRAY_SIZE(bfin_sir1_resources),
  358. .resource = bfin_sir1_resources,
  359. };
  360. #endif
  361. #endif
  362. #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
  363. static struct resource musb_resources[] = {
  364. [0] = {
  365. .start = 0xFFCC1000,
  366. .end = 0xFFCC1398,
  367. .flags = IORESOURCE_MEM,
  368. },
  369. [1] = { /* general IRQ */
  370. .start = IRQ_USB_STAT,
  371. .end = IRQ_USB_STAT,
  372. .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
  373. .name = "mc"
  374. },
  375. [2] = { /* DMA IRQ */
  376. .start = IRQ_USB_DMA,
  377. .end = IRQ_USB_DMA,
  378. .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
  379. .name = "dma"
  380. },
  381. };
  382. static struct musb_hdrc_config musb_config = {
  383. .multipoint = 1,
  384. .dyn_fifo = 0,
  385. .dma = 1,
  386. .num_eps = 16,
  387. .dma_channels = 8,
  388. .clkin = 48, /* musb CLKIN in MHZ */
  389. };
  390. static struct musb_hdrc_platform_data musb_plat = {
  391. #if defined(CONFIG_USB_MUSB_HDRC) && defined(CONFIG_USB_GADGET_MUSB_HDRC)
  392. .mode = MUSB_OTG,
  393. #elif defined(CONFIG_USB_MUSB_HDRC)
  394. .mode = MUSB_HOST,
  395. #elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
  396. .mode = MUSB_PERIPHERAL,
  397. #endif
  398. .config = &musb_config,
  399. };
  400. static u64 musb_dmamask = ~(u32)0;
  401. static struct platform_device musb_device = {
  402. .name = "musb-blackfin",
  403. .id = 0,
  404. .dev = {
  405. .dma_mask = &musb_dmamask,
  406. .coherent_dma_mask = 0xffffffff,
  407. .platform_data = &musb_plat,
  408. },
  409. .num_resources = ARRAY_SIZE(musb_resources),
  410. .resource = musb_resources,
  411. };
  412. #endif
  413. #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
  414. #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
  415. static struct resource bfin_sport0_uart_resources[] = {
  416. {
  417. .start = SPORT0_TCR1,
  418. .end = SPORT0_MRCS3+4,
  419. .flags = IORESOURCE_MEM,
  420. },
  421. {
  422. .start = IRQ_SPORT0_RX,
  423. .end = IRQ_SPORT0_RX+1,
  424. .flags = IORESOURCE_IRQ,
  425. },
  426. {
  427. .start = IRQ_SPORT0_ERROR,
  428. .end = IRQ_SPORT0_ERROR,
  429. .flags = IORESOURCE_IRQ,
  430. },
  431. };
  432. static unsigned short bfin_sport0_peripherals[] = {
  433. P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS,
  434. P_SPORT0_DRPRI, P_SPORT0_RSCLK, 0
  435. };
  436. static struct platform_device bfin_sport0_uart_device = {
  437. .name = "bfin-sport-uart",
  438. .id = 0,
  439. .num_resources = ARRAY_SIZE(bfin_sport0_uart_resources),
  440. .resource = bfin_sport0_uart_resources,
  441. .dev = {
  442. .platform_data = &bfin_sport0_peripherals, /* Passed to driver */
  443. },
  444. };
  445. #endif
  446. #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
  447. static struct resource bfin_sport1_uart_resources[] = {
  448. {
  449. .start = SPORT1_TCR1,
  450. .end = SPORT1_MRCS3+4,
  451. .flags = IORESOURCE_MEM,
  452. },
  453. {
  454. .start = IRQ_SPORT1_RX,
  455. .end = IRQ_SPORT1_RX+1,
  456. .flags = IORESOURCE_IRQ,
  457. },
  458. {
  459. .start = IRQ_SPORT1_ERROR,
  460. .end = IRQ_SPORT1_ERROR,
  461. .flags = IORESOURCE_IRQ,
  462. },
  463. };
  464. static unsigned short bfin_sport1_peripherals[] = {
  465. P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS,
  466. P_SPORT1_DRPRI, P_SPORT1_RSCLK, 0
  467. };
  468. static struct platform_device bfin_sport1_uart_device = {
  469. .name = "bfin-sport-uart",
  470. .id = 1,
  471. .num_resources = ARRAY_SIZE(bfin_sport1_uart_resources),
  472. .resource = bfin_sport1_uart_resources,
  473. .dev = {
  474. .platform_data = &bfin_sport1_peripherals, /* Passed to driver */
  475. },
  476. };
  477. #endif
  478. #ifdef CONFIG_SERIAL_BFIN_SPORT2_UART
  479. static struct resource bfin_sport2_uart_resources[] = {
  480. {
  481. .start = SPORT2_TCR1,
  482. .end = SPORT2_MRCS3+4,
  483. .flags = IORESOURCE_MEM,
  484. },
  485. {
  486. .start = IRQ_SPORT2_RX,
  487. .end = IRQ_SPORT2_RX+1,
  488. .flags = IORESOURCE_IRQ,
  489. },
  490. {
  491. .start = IRQ_SPORT2_ERROR,
  492. .end = IRQ_SPORT2_ERROR,
  493. .flags = IORESOURCE_IRQ,
  494. },
  495. };
  496. static unsigned short bfin_sport2_peripherals[] = {
  497. P_SPORT2_TFS, P_SPORT2_DTPRI, P_SPORT2_TSCLK, P_SPORT2_RFS,
  498. P_SPORT2_DRPRI, P_SPORT2_RSCLK, P_SPORT2_DRSEC, P_SPORT2_DTSEC, 0
  499. };
  500. static struct platform_device bfin_sport2_uart_device = {
  501. .name = "bfin-sport-uart",
  502. .id = 2,
  503. .num_resources = ARRAY_SIZE(bfin_sport2_uart_resources),
  504. .resource = bfin_sport2_uart_resources,
  505. .dev = {
  506. .platform_data = &bfin_sport2_peripherals, /* Passed to driver */
  507. },
  508. };
  509. #endif
  510. #endif
  511. #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE)
  512. static unsigned short bfin_can0_peripherals[] = {
  513. P_CAN0_RX, P_CAN0_TX, 0
  514. };
  515. static struct resource bfin_can0_resources[] = {
  516. {
  517. .start = 0xFFC00A00,
  518. .end = 0xFFC00FFF,
  519. .flags = IORESOURCE_MEM,
  520. },
  521. {
  522. .start = IRQ_CAN0_RX,
  523. .end = IRQ_CAN0_RX,
  524. .flags = IORESOURCE_IRQ,
  525. },
  526. {
  527. .start = IRQ_CAN0_TX,
  528. .end = IRQ_CAN0_TX,
  529. .flags = IORESOURCE_IRQ,
  530. },
  531. {
  532. .start = IRQ_CAN0_STAT,
  533. .end = IRQ_CAN0_STAT,
  534. .flags = IORESOURCE_IRQ,
  535. },
  536. };
  537. static struct platform_device bfin_can0_device = {
  538. .name = "bfin_can",
  539. .id = 0,
  540. .num_resources = ARRAY_SIZE(bfin_can0_resources),
  541. .resource = bfin_can0_resources,
  542. .dev = {
  543. .platform_data = &bfin_can0_peripherals, /* Passed to driver */
  544. },
  545. };
  546. #endif
  547. #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
  548. static struct mtd_partition partition_info[] = {
  549. {
  550. .name = "bootloader(nand)",
  551. .offset = 0,
  552. .size = 0x80000,
  553. }, {
  554. .name = "linux kernel(nand)",
  555. .offset = MTDPART_OFS_APPEND,
  556. .size = 4 * 1024 * 1024,
  557. },
  558. {
  559. .name = "file system(nand)",
  560. .offset = MTDPART_OFS_APPEND,
  561. .size = MTDPART_SIZ_FULL,
  562. },
  563. };
  564. static struct bf5xx_nand_platform bfin_nand_platform = {
  565. .data_width = NFC_NWIDTH_8,
  566. .partitions = partition_info,
  567. .nr_partitions = ARRAY_SIZE(partition_info),
  568. .rd_dly = 3,
  569. .wr_dly = 3,
  570. };
  571. static struct resource bfin_nand_resources[] = {
  572. {
  573. .start = 0xFFC03B00,
  574. .end = 0xFFC03B4F,
  575. .flags = IORESOURCE_MEM,
  576. },
  577. {
  578. .start = CH_NFC,
  579. .end = CH_NFC,
  580. .flags = IORESOURCE_IRQ,
  581. },
  582. };
  583. static struct platform_device bfin_nand_device = {
  584. .name = "bfin-nand",
  585. .id = 0,
  586. .num_resources = ARRAY_SIZE(bfin_nand_resources),
  587. .resource = bfin_nand_resources,
  588. .dev = {
  589. .platform_data = &bfin_nand_platform,
  590. },
  591. };
  592. #endif
  593. #if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE)
  594. static struct bfin_sd_host bfin_sdh_data = {
  595. .dma_chan = CH_RSI,
  596. .irq_int0 = IRQ_RSI_INT0,
  597. .pin_req = {P_RSI_DATA0, P_RSI_DATA1, P_RSI_DATA2, P_RSI_DATA3, P_RSI_CMD, P_RSI_CLK, 0},
  598. };
  599. static struct platform_device bfin_sdh_device = {
  600. .name = "bfin-sdh",
  601. .id = 0,
  602. .dev = {
  603. .platform_data = &bfin_sdh_data,
  604. },
  605. };
  606. #endif
  607. #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
  608. static struct mtd_partition ezkit_partitions[] = {
  609. {
  610. .name = "bootloader(nor)",
  611. .size = 0x80000,
  612. .offset = 0,
  613. }, {
  614. .name = "linux kernel(nor)",
  615. .size = 0x400000,
  616. .offset = MTDPART_OFS_APPEND,
  617. }, {
  618. .name = "file system(nor)",
  619. .size = 0x1000000 - 0x80000 - 0x400000,
  620. .offset = MTDPART_OFS_APPEND,
  621. },
  622. };
  623. int bf609_nor_flash_init(struct platform_device *dev)
  624. {
  625. #define CONFIG_SMC_GCTL_VAL 0x00000010
  626. const unsigned short pins[] = {
  627. P_A3, P_A4, P_A5, P_A6, P_A7, P_A8, P_A9, P_A10, P_A11, P_A12,
  628. P_A13, P_A14, P_A15, P_A16, P_A17, P_A18, P_A19, P_A20, P_A21,
  629. P_A22, P_A23, P_A24, P_A25, P_NORCK, 0,
  630. };
  631. peripheral_request_list(pins, "smc0");
  632. bfin_write32(SMC_GCTL, CONFIG_SMC_GCTL_VAL);
  633. bfin_write32(SMC_B0CTL, 0x01002011);
  634. bfin_write32(SMC_B0TIM, 0x08170977);
  635. bfin_write32(SMC_B0ETIM, 0x00092231);
  636. return 0;
  637. }
  638. void bf609_nor_flash_exit(struct platform_device *dev)
  639. {
  640. const unsigned short pins[] = {
  641. P_A3, P_A4, P_A5, P_A6, P_A7, P_A8, P_A9, P_A10, P_A11, P_A12,
  642. P_A13, P_A14, P_A15, P_A16, P_A17, P_A18, P_A19, P_A20, P_A21,
  643. P_A22, P_A23, P_A24, P_A25, P_NORCK, 0,
  644. };
  645. peripheral_free_list(pins);
  646. bfin_write32(SMC_GCTL, 0);
  647. }
  648. static struct physmap_flash_data ezkit_flash_data = {
  649. .width = 2,
  650. .parts = ezkit_partitions,
  651. .init = bf609_nor_flash_init,
  652. .exit = bf609_nor_flash_exit,
  653. .nr_parts = ARRAY_SIZE(ezkit_partitions),
  654. #ifdef CONFIG_ROMKERNEL
  655. .probe_type = "map_rom",
  656. #endif
  657. };
  658. static struct resource ezkit_flash_resource = {
  659. .start = 0xb0000000,
  660. .end = 0xb0ffffff,
  661. .flags = IORESOURCE_MEM,
  662. };
  663. static struct platform_device ezkit_flash_device = {
  664. .name = "physmap-flash",
  665. .id = 0,
  666. .dev = {
  667. .platform_data = &ezkit_flash_data,
  668. },
  669. .num_resources = 1,
  670. .resource = &ezkit_flash_resource,
  671. };
  672. #endif
  673. #if defined(CONFIG_MTD_M25P80) \
  674. || defined(CONFIG_MTD_M25P80_MODULE)
  675. /* SPI flash chip (w25q32) */
  676. static struct mtd_partition bfin_spi_flash_partitions[] = {
  677. {
  678. .name = "bootloader(spi)",
  679. .size = 0x00080000,
  680. .offset = 0,
  681. .mask_flags = MTD_CAP_ROM
  682. }, {
  683. .name = "linux kernel(spi)",
  684. .size = 0x00180000,
  685. .offset = MTDPART_OFS_APPEND,
  686. }, {
  687. .name = "file system(spi)",
  688. .size = MTDPART_SIZ_FULL,
  689. .offset = MTDPART_OFS_APPEND,
  690. }
  691. };
  692. static struct flash_platform_data bfin_spi_flash_data = {
  693. .name = "m25p80",
  694. .parts = bfin_spi_flash_partitions,
  695. .nr_parts = ARRAY_SIZE(bfin_spi_flash_partitions),
  696. .type = "w25q32",
  697. };
  698. static struct bfin_spi3_chip spi_flash_chip_info = {
  699. .enable_dma = true, /* use dma transfer with this chip*/
  700. };
  701. #endif
  702. #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
  703. static struct bfin_spi3_chip spidev_chip_info = {
  704. .enable_dma = true,
  705. };
  706. #endif
  707. #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
  708. static struct platform_device bfin_i2s_pcm = {
  709. .name = "bfin-i2s-pcm-audio",
  710. .id = -1,
  711. };
  712. #endif
  713. #if defined(CONFIG_SND_BF6XX_SOC_I2S) || \
  714. defined(CONFIG_SND_BF6XX_SOC_I2S_MODULE)
  715. #include <asm/bfin_sport3.h>
  716. static struct resource bfin_snd_resources[] = {
  717. {
  718. .start = SPORT0_CTL_A,
  719. .end = SPORT0_CTL_A,
  720. .flags = IORESOURCE_MEM,
  721. },
  722. {
  723. .start = SPORT0_CTL_B,
  724. .end = SPORT0_CTL_B,
  725. .flags = IORESOURCE_MEM,
  726. },
  727. {
  728. .start = CH_SPORT0_TX,
  729. .end = CH_SPORT0_TX,
  730. .flags = IORESOURCE_DMA,
  731. },
  732. {
  733. .start = CH_SPORT0_RX,
  734. .end = CH_SPORT0_RX,
  735. .flags = IORESOURCE_DMA,
  736. },
  737. {
  738. .start = IRQ_SPORT0_TX_STAT,
  739. .end = IRQ_SPORT0_TX_STAT,
  740. .flags = IORESOURCE_IRQ,
  741. },
  742. {
  743. .start = IRQ_SPORT0_RX_STAT,
  744. .end = IRQ_SPORT0_RX_STAT,
  745. .flags = IORESOURCE_IRQ,
  746. },
  747. };
  748. static const unsigned short bfin_snd_pin[] = {
  749. P_SPORT0_ACLK, P_SPORT0_AFS, P_SPORT0_AD0, P_SPORT0_BCLK,
  750. P_SPORT0_BFS, P_SPORT0_BD0, 0,
  751. };
  752. static struct bfin_snd_platform_data bfin_snd_data = {
  753. .pin_req = bfin_snd_pin,
  754. };
  755. static struct platform_device bfin_i2s = {
  756. .name = "bfin-i2s",
  757. .num_resources = ARRAY_SIZE(bfin_snd_resources),
  758. .resource = bfin_snd_resources,
  759. .dev = {
  760. .platform_data = &bfin_snd_data,
  761. },
  762. };
  763. #endif
  764. #if defined(CONFIG_SND_BF5XX_SOC_AD1836) \
  765. || defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
  766. static const char * const ad1836_link[] = {
  767. "bfin-i2s.0",
  768. "spi0.76",
  769. };
  770. static struct platform_device bfin_ad1836_machine = {
  771. .name = "bfin-snd-ad1836",
  772. .id = -1,
  773. .dev = {
  774. .platform_data = (void *)ad1836_link,
  775. },
  776. };
  777. #endif
  778. #if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61) || \
  779. defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61_MODULE)
  780. static struct platform_device adau1761_device = {
  781. .name = "bfin-eval-adau1x61",
  782. };
  783. #endif
  784. #if defined(CONFIG_SND_SOC_ADAU1761) || defined(CONFIG_SND_SOC_ADAU1761_MODULE)
  785. #include <sound/adau17x1.h>
  786. static struct adau1761_platform_data adau1761_info = {
  787. .lineout_mode = ADAU1761_OUTPUT_MODE_LINE,
  788. .headphone_mode = ADAU1761_OUTPUT_MODE_HEADPHONE_CAPLESS,
  789. };
  790. #endif
  791. #if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \
  792. || defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE)
  793. #include <linux/videodev2.h>
  794. #include <media/blackfin/bfin_capture.h>
  795. #include <media/blackfin/ppi.h>
  796. static const unsigned short ppi_req[] = {
  797. P_PPI0_D0, P_PPI0_D1, P_PPI0_D2, P_PPI0_D3,
  798. P_PPI0_D4, P_PPI0_D5, P_PPI0_D6, P_PPI0_D7,
  799. P_PPI0_D8, P_PPI0_D9, P_PPI0_D10, P_PPI0_D11,
  800. P_PPI0_D12, P_PPI0_D13, P_PPI0_D14, P_PPI0_D15,
  801. #if !defined(CONFIG_VIDEO_VS6624) && !defined(CONFIG_VIDEO_VS6624_MODULE)
  802. P_PPI0_D16, P_PPI0_D17, P_PPI0_D18, P_PPI0_D19,
  803. P_PPI0_D20, P_PPI0_D21, P_PPI0_D22, P_PPI0_D23,
  804. #endif
  805. P_PPI0_CLK, P_PPI0_FS1, P_PPI0_FS2,
  806. 0,
  807. };
  808. static const struct ppi_info ppi_info = {
  809. .type = PPI_TYPE_EPPI3,
  810. .dma_ch = CH_EPPI0_CH0,
  811. .irq_err = IRQ_EPPI0_STAT,
  812. .base = (void __iomem *)EPPI0_STAT,
  813. .pin_req = ppi_req,
  814. };
  815. #if defined(CONFIG_VIDEO_VS6624) \
  816. || defined(CONFIG_VIDEO_VS6624_MODULE)
  817. static struct v4l2_input vs6624_inputs[] = {
  818. {
  819. .index = 0,
  820. .name = "Camera",
  821. .type = V4L2_INPUT_TYPE_CAMERA,
  822. .std = V4L2_STD_UNKNOWN,
  823. },
  824. };
  825. static struct bcap_route vs6624_routes[] = {
  826. {
  827. .input = 0,
  828. .output = 0,
  829. },
  830. };
  831. static const unsigned vs6624_ce_pin = GPIO_PE4;
  832. static struct bfin_capture_config bfin_capture_data = {
  833. .card_name = "BF609",
  834. .inputs = vs6624_inputs,
  835. .num_inputs = ARRAY_SIZE(vs6624_inputs),
  836. .routes = vs6624_routes,
  837. .i2c_adapter_id = 0,
  838. .board_info = {
  839. .type = "vs6624",
  840. .addr = 0x10,
  841. .platform_data = (void *)&vs6624_ce_pin,
  842. },
  843. .ppi_info = &ppi_info,
  844. .ppi_control = (PACK_EN | DLEN_8 | EPPI_CTL_FS1HI_FS2HI
  845. | EPPI_CTL_POLC3 | EPPI_CTL_SYNC2 | EPPI_CTL_NON656),
  846. .blank_pixels = 4,
  847. };
  848. #endif
  849. #if defined(CONFIG_VIDEO_ADV7842) \
  850. || defined(CONFIG_VIDEO_ADV7842_MODULE)
  851. #include <media/adv7842.h>
  852. static struct v4l2_input adv7842_inputs[] = {
  853. {
  854. .index = 0,
  855. .name = "Composite",
  856. .type = V4L2_INPUT_TYPE_CAMERA,
  857. .std = V4L2_STD_ALL,
  858. .capabilities = V4L2_IN_CAP_STD,
  859. },
  860. {
  861. .index = 1,
  862. .name = "S-Video",
  863. .type = V4L2_INPUT_TYPE_CAMERA,
  864. .std = V4L2_STD_ALL,
  865. .capabilities = V4L2_IN_CAP_STD,
  866. },
  867. {
  868. .index = 2,
  869. .name = "Component",
  870. .type = V4L2_INPUT_TYPE_CAMERA,
  871. .capabilities = V4L2_IN_CAP_DV_TIMINGS,
  872. },
  873. {
  874. .index = 3,
  875. .name = "VGA",
  876. .type = V4L2_INPUT_TYPE_CAMERA,
  877. .capabilities = V4L2_IN_CAP_DV_TIMINGS,
  878. },
  879. {
  880. .index = 4,
  881. .name = "HDMI",
  882. .type = V4L2_INPUT_TYPE_CAMERA,
  883. .capabilities = V4L2_IN_CAP_DV_TIMINGS,
  884. },
  885. };
  886. static struct bcap_route adv7842_routes[] = {
  887. {
  888. .input = 3,
  889. .output = 0,
  890. .ppi_control = (PACK_EN | DLEN_8 | EPPI_CTL_FLDSEL
  891. | EPPI_CTL_ACTIVE656),
  892. },
  893. {
  894. .input = 4,
  895. .output = 0,
  896. },
  897. {
  898. .input = 2,
  899. .output = 0,
  900. },
  901. {
  902. .input = 1,
  903. .output = 0,
  904. },
  905. {
  906. .input = 0,
  907. .output = 1,
  908. .ppi_control = (EPPI_CTL_SPLTWRD | PACK_EN | DLEN_16
  909. | EPPI_CTL_FS1LO_FS2LO | EPPI_CTL_POLC2
  910. | EPPI_CTL_SYNC2 | EPPI_CTL_NON656),
  911. },
  912. };
  913. static struct adv7842_output_format adv7842_opf[] = {
  914. {
  915. .op_ch_sel = ADV7842_OP_CH_SEL_BRG,
  916. .op_format_sel = ADV7842_OP_FORMAT_SEL_SDR_ITU656_8,
  917. .op_656_range = 1,
  918. .blank_data = 1,
  919. .insert_av_codes = 1,
  920. },
  921. {
  922. .op_ch_sel = ADV7842_OP_CH_SEL_RGB,
  923. .op_format_sel = ADV7842_OP_FORMAT_SEL_SDR_ITU656_16,
  924. .op_656_range = 1,
  925. .blank_data = 1,
  926. },
  927. };
  928. static struct adv7842_platform_data adv7842_data = {
  929. .opf = adv7842_opf,
  930. .num_opf = ARRAY_SIZE(adv7842_opf),
  931. .ain_sel = ADV7842_AIN10_11_12_NC_SYNC_4_1,
  932. .prim_mode = ADV7842_PRIM_MODE_SDP,
  933. .vid_std_select = ADV7842_SDP_VID_STD_CVBS_SD_4x1,
  934. .inp_color_space = ADV7842_INP_COLOR_SPACE_AUTO,
  935. .i2c_sdp_io = 0x40,
  936. .i2c_sdp = 0x41,
  937. .i2c_cp = 0x42,
  938. .i2c_vdp = 0x43,
  939. .i2c_afe = 0x44,
  940. .i2c_hdmi = 0x45,
  941. .i2c_repeater = 0x46,
  942. .i2c_edid = 0x47,
  943. .i2c_infoframe = 0x48,
  944. .i2c_cec = 0x49,
  945. .i2c_avlink = 0x4a,
  946. .i2c_ex = 0x26,
  947. };
  948. static struct bfin_capture_config bfin_capture_data = {
  949. .card_name = "BF609",
  950. .inputs = adv7842_inputs,
  951. .num_inputs = ARRAY_SIZE(adv7842_inputs),
  952. .routes = adv7842_routes,
  953. .i2c_adapter_id = 0,
  954. .board_info = {
  955. .type = "adv7842",
  956. .addr = 0x20,
  957. .platform_data = (void *)&adv7842_data,
  958. },
  959. .ppi_info = &ppi_info,
  960. .ppi_control = (PACK_EN | DLEN_8 | EPPI_CTL_FLDSEL
  961. | EPPI_CTL_ACTIVE656),
  962. };
  963. #endif
  964. static struct platform_device bfin_capture_device = {
  965. .name = "bfin_capture",
  966. .dev = {
  967. .platform_data = &bfin_capture_data,
  968. },
  969. };
  970. #endif
  971. #if defined(CONFIG_VIDEO_BLACKFIN_DISPLAY) \
  972. || defined(CONFIG_VIDEO_BLACKFIN_DISPLAY_MODULE)
  973. #include <linux/videodev2.h>
  974. #include <media/blackfin/bfin_display.h>
  975. #include <media/blackfin/ppi.h>
  976. static const unsigned short ppi_req_disp[] = {
  977. P_PPI0_D0, P_PPI0_D1, P_PPI0_D2, P_PPI0_D3,
  978. P_PPI0_D4, P_PPI0_D5, P_PPI0_D6, P_PPI0_D7,
  979. P_PPI0_D8, P_PPI0_D9, P_PPI0_D10, P_PPI0_D11,
  980. P_PPI0_D12, P_PPI0_D13, P_PPI0_D14, P_PPI0_D15,
  981. P_PPI0_CLK, P_PPI0_FS1, P_PPI0_FS2,
  982. 0,
  983. };
  984. static const struct ppi_info ppi_info = {
  985. .type = PPI_TYPE_EPPI3,
  986. .dma_ch = CH_EPPI0_CH0,
  987. .irq_err = IRQ_EPPI0_STAT,
  988. .base = (void __iomem *)EPPI0_STAT,
  989. .pin_req = ppi_req_disp,
  990. };
  991. #if defined(CONFIG_VIDEO_ADV7511) \
  992. || defined(CONFIG_VIDEO_ADV7511_MODULE)
  993. #include <media/adv7511.h>
  994. static struct v4l2_output adv7511_outputs[] = {
  995. {
  996. .index = 0,
  997. .name = "HDMI",
  998. .type = V4L2_INPUT_TYPE_CAMERA,
  999. .capabilities = V4L2_OUT_CAP_DV_TIMINGS,
  1000. },
  1001. };
  1002. static struct disp_route adv7511_routes[] = {
  1003. {
  1004. .output = 0,
  1005. },
  1006. };
  1007. static struct adv7511_platform_data adv7511_data = {
  1008. .edid_addr = 0x7e,
  1009. .i2c_ex = 0x25,
  1010. };
  1011. static struct bfin_display_config bfin_display_data = {
  1012. .card_name = "BF609",
  1013. .outputs = adv7511_outputs,
  1014. .num_outputs = ARRAY_SIZE(adv7511_outputs),
  1015. .routes = adv7511_routes,
  1016. .i2c_adapter_id = 0,
  1017. .board_info = {
  1018. .type = "adv7511",
  1019. .addr = 0x39,
  1020. .platform_data = (void *)&adv7511_data,
  1021. },
  1022. .ppi_info = &ppi_info,
  1023. .ppi_control = (EPPI_CTL_SPLTWRD | PACK_EN | DLEN_16
  1024. | EPPI_CTL_FS1LO_FS2LO | EPPI_CTL_POLC3
  1025. | EPPI_CTL_IFSGEN | EPPI_CTL_SYNC2
  1026. | EPPI_CTL_NON656 | EPPI_CTL_DIR),
  1027. };
  1028. #endif
  1029. #if IS_ENABLED(CONFIG_VIDEO_ADV7343)
  1030. #include <media/adv7343.h>
  1031. static struct v4l2_output adv7343_outputs[] = {
  1032. {
  1033. .index = 0,
  1034. .name = "Composite",
  1035. .type = V4L2_OUTPUT_TYPE_ANALOG,
  1036. .std = V4L2_STD_ALL,
  1037. .capabilities = V4L2_OUT_CAP_STD,
  1038. },
  1039. {
  1040. .index = 1,
  1041. .name = "S-Video",
  1042. .type = V4L2_OUTPUT_TYPE_ANALOG,
  1043. .std = V4L2_STD_ALL,
  1044. .capabilities = V4L2_OUT_CAP_STD,
  1045. },
  1046. {
  1047. .index = 2,
  1048. .name = "Component",
  1049. .type = V4L2_OUTPUT_TYPE_ANALOG,
  1050. .std = V4L2_STD_ALL,
  1051. .capabilities = V4L2_OUT_CAP_STD,
  1052. },
  1053. };
  1054. static struct disp_route adv7343_routes[] = {
  1055. {
  1056. .output = ADV7343_COMPOSITE_ID,
  1057. },
  1058. {
  1059. .output = ADV7343_SVIDEO_ID,
  1060. },
  1061. {
  1062. .output = ADV7343_COMPONENT_ID,
  1063. },
  1064. };
  1065. static struct adv7343_platform_data adv7343_data = {
  1066. .mode_config = {
  1067. .sleep_mode = false,
  1068. .pll_control = false,
  1069. .dac_1 = true,
  1070. .dac_2 = true,
  1071. .dac_3 = true,
  1072. .dac_4 = true,
  1073. .dac_5 = true,
  1074. .dac_6 = true,
  1075. },
  1076. .sd_config = {
  1077. .sd_dac_out1 = false,
  1078. .sd_dac_out2 = false,
  1079. },
  1080. };
  1081. static struct bfin_display_config bfin_display_data = {
  1082. .card_name = "BF609",
  1083. .outputs = adv7343_outputs,
  1084. .num_outputs = ARRAY_SIZE(adv7343_outputs),
  1085. .routes = adv7343_routes,
  1086. .i2c_adapter_id = 0,
  1087. .board_info = {
  1088. .type = "adv7343",
  1089. .addr = 0x2b,
  1090. .platform_data = (void *)&adv7343_data,
  1091. },
  1092. .ppi_info = &ppi_info_disp,
  1093. .ppi_control = (PACK_EN | DLEN_8 | EPPI_CTL_FS1LO_FS2LO
  1094. | EPPI_CTL_POLC3 | EPPI_CTL_BLANKGEN | EPPI_CTL_SYNC2
  1095. | EPPI_CTL_NON656 | EPPI_CTL_DIR),
  1096. };
  1097. #endif
  1098. static struct platform_device bfin_display_device = {
  1099. .name = "bfin_display",
  1100. .dev = {
  1101. .platform_data = &bfin_display_data,
  1102. },
  1103. };
  1104. #endif
  1105. #if defined(CONFIG_BFIN_CRC)
  1106. #define BFIN_CRC_NAME "bfin-crc"
  1107. static struct resource bfin_crc0_resources[] = {
  1108. {
  1109. .start = REG_CRC0_CTL,
  1110. .end = REG_CRC0_REVID+4,
  1111. .flags = IORESOURCE_MEM,
  1112. },
  1113. {
  1114. .start = IRQ_CRC0_DCNTEXP,
  1115. .end = IRQ_CRC0_DCNTEXP,
  1116. .flags = IORESOURCE_IRQ,
  1117. },
  1118. {
  1119. .start = CH_MEM_STREAM0_SRC_CRC0,
  1120. .end = CH_MEM_STREAM0_SRC_CRC0,
  1121. .flags = IORESOURCE_DMA,
  1122. },
  1123. {
  1124. .start = CH_MEM_STREAM0_DEST_CRC0,
  1125. .end = CH_MEM_STREAM0_DEST_CRC0,
  1126. .flags = IORESOURCE_DMA,
  1127. },
  1128. };
  1129. static struct platform_device bfin_crc0_device = {
  1130. .name = BFIN_CRC_NAME,
  1131. .id = 0,
  1132. .num_resources = ARRAY_SIZE(bfin_crc0_resources),
  1133. .resource = bfin_crc0_resources,
  1134. };
  1135. static struct resource bfin_crc1_resources[] = {
  1136. {
  1137. .start = REG_CRC1_CTL,
  1138. .end = REG_CRC1_REVID+4,
  1139. .flags = IORESOURCE_MEM,
  1140. },
  1141. {
  1142. .start = IRQ_CRC1_DCNTEXP,
  1143. .end = IRQ_CRC1_DCNTEXP,
  1144. .flags = IORESOURCE_IRQ,
  1145. },
  1146. {
  1147. .start = CH_MEM_STREAM1_SRC_CRC1,
  1148. .end = CH_MEM_STREAM1_SRC_CRC1,
  1149. .flags = IORESOURCE_DMA,
  1150. },
  1151. {
  1152. .start = CH_MEM_STREAM1_DEST_CRC1,
  1153. .end = CH_MEM_STREAM1_DEST_CRC1,
  1154. .flags = IORESOURCE_DMA,
  1155. },
  1156. };
  1157. static struct platform_device bfin_crc1_device = {
  1158. .name = BFIN_CRC_NAME,
  1159. .id = 1,
  1160. .num_resources = ARRAY_SIZE(bfin_crc1_resources),
  1161. .resource = bfin_crc1_resources,
  1162. };
  1163. #endif
  1164. #if defined(CONFIG_CRYPTO_DEV_BFIN_CRC)
  1165. #define BFIN_CRYPTO_CRC_NAME "bfin-hmac-crc"
  1166. #define BFIN_CRYPTO_CRC_POLY_DATA 0x5c5c5c5c
  1167. static struct resource bfin_crypto_crc_resources[] = {
  1168. {
  1169. .start = REG_CRC0_CTL,
  1170. .end = REG_CRC0_REVID+4,
  1171. .flags = IORESOURCE_MEM,
  1172. },
  1173. {
  1174. .start = IRQ_CRC0_DCNTEXP,
  1175. .end = IRQ_CRC0_DCNTEXP,
  1176. .flags = IORESOURCE_IRQ,
  1177. },
  1178. {
  1179. .start = CH_MEM_STREAM0_SRC_CRC0,
  1180. .end = CH_MEM_STREAM0_SRC_CRC0,
  1181. .flags = IORESOURCE_DMA,
  1182. },
  1183. };
  1184. static struct platform_device bfin_crypto_crc_device = {
  1185. .name = BFIN_CRYPTO_CRC_NAME,
  1186. .id = 0,
  1187. .num_resources = ARRAY_SIZE(bfin_crypto_crc_resources),
  1188. .resource = bfin_crypto_crc_resources,
  1189. .dev = {
  1190. .platform_data = (void *)BFIN_CRYPTO_CRC_POLY_DATA,
  1191. },
  1192. };
  1193. #endif
  1194. #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
  1195. static const struct ad7877_platform_data bfin_ad7877_ts_info = {
  1196. .model = 7877,
  1197. .vref_delay_usecs = 50, /* internal, no capacitor */
  1198. .x_plate_ohms = 419,
  1199. .y_plate_ohms = 486,
  1200. .pressure_max = 1000,
  1201. .pressure_min = 0,
  1202. .stopacq_polarity = 1,
  1203. .first_conversion_delay = 3,
  1204. .acquisition_time = 1,
  1205. .averaging = 1,
  1206. .pen_down_acc_interval = 1,
  1207. };
  1208. #endif
  1209. #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
  1210. #include <linux/input.h>
  1211. #include <linux/gpio_keys.h>
  1212. static struct gpio_keys_button bfin_gpio_keys_table[] = {
  1213. {BTN_0, GPIO_PB10, 1, "gpio-keys: BTN0"},
  1214. {BTN_1, GPIO_PE1, 1, "gpio-keys: BTN1"},
  1215. };
  1216. static struct gpio_keys_platform_data bfin_gpio_keys_data = {
  1217. .buttons = bfin_gpio_keys_table,
  1218. .nbuttons = ARRAY_SIZE(bfin_gpio_keys_table),
  1219. };
  1220. static struct platform_device bfin_device_gpiokeys = {
  1221. .name = "gpio-keys",
  1222. .dev = {
  1223. .platform_data = &bfin_gpio_keys_data,
  1224. },
  1225. };
  1226. #endif
  1227. static struct spi_board_info bfin_spi_board_info[] __initdata = {
  1228. #if defined(CONFIG_MTD_M25P80) \
  1229. || defined(CONFIG_MTD_M25P80_MODULE)
  1230. {
  1231. /* the modalias must be the same as spi device driver name */
  1232. .modalias = "m25p80", /* Name of spi_driver for this device */
  1233. .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
  1234. .bus_num = 0, /* Framework bus number */
  1235. .chip_select = 1, /* SPI_SSEL1*/
  1236. .platform_data = &bfin_spi_flash_data,
  1237. .controller_data = &spi_flash_chip_info,
  1238. .mode = SPI_MODE_3,
  1239. },
  1240. #endif
  1241. #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE)
  1242. {
  1243. .modalias = "ad7877",
  1244. .platform_data = &bfin_ad7877_ts_info,
  1245. .irq = IRQ_PD9,
  1246. .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
  1247. .bus_num = 0,
  1248. .chip_select = 4,
  1249. },
  1250. #endif
  1251. #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE)
  1252. {
  1253. .modalias = "spidev",
  1254. .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */
  1255. .bus_num = 0,
  1256. .chip_select = 1,
  1257. .controller_data = &spidev_chip_info,
  1258. },
  1259. #endif
  1260. #if defined(CONFIG_INPUT_ADXL34X_SPI) || defined(CONFIG_INPUT_ADXL34X_SPI_MODULE)
  1261. {
  1262. .modalias = "adxl34x",
  1263. .platform_data = &adxl34x_info,
  1264. .irq = IRQ_PC5,
  1265. .max_speed_hz = 5000000, /* max spi clock (SCK) speed in HZ */
  1266. .bus_num = 1,
  1267. .chip_select = 2,
  1268. .mode = SPI_MODE_3,
  1269. },
  1270. #endif
  1271. };
  1272. #if IS_ENABLED(CONFIG_SPI_BFIN_V3)
  1273. /* SPI (0) */
  1274. static struct resource bfin_spi0_resource[] = {
  1275. {
  1276. .start = SPI0_REGBASE,
  1277. .end = SPI0_REGBASE + 0xFF,
  1278. .flags = IORESOURCE_MEM,
  1279. },
  1280. {
  1281. .start = CH_SPI0_TX,
  1282. .end = CH_SPI0_TX,
  1283. .flags = IORESOURCE_DMA,
  1284. },
  1285. {
  1286. .start = CH_SPI0_RX,
  1287. .end = CH_SPI0_RX,
  1288. .flags = IORESOURCE_DMA,
  1289. },
  1290. };
  1291. /* SPI (1) */
  1292. static struct resource bfin_spi1_resource[] = {
  1293. {
  1294. .start = SPI1_REGBASE,
  1295. .end = SPI1_REGBASE + 0xFF,
  1296. .flags = IORESOURCE_MEM,
  1297. },
  1298. {
  1299. .start = CH_SPI1_TX,
  1300. .end = CH_SPI1_TX,
  1301. .flags = IORESOURCE_DMA,
  1302. },
  1303. {
  1304. .start = CH_SPI1_RX,
  1305. .end = CH_SPI1_RX,
  1306. .flags = IORESOURCE_DMA,
  1307. },
  1308. };
  1309. /* SPI controller data */
  1310. static struct bfin_spi3_master bf60x_spi_master_info0 = {
  1311. .num_chipselect = MAX_CTRL_CS + MAX_BLACKFIN_GPIOS,
  1312. .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0},
  1313. };
  1314. static struct platform_device bf60x_spi_master0 = {
  1315. .name = "bfin-spi3",
  1316. .id = 0, /* Bus number */
  1317. .num_resources = ARRAY_SIZE(bfin_spi0_resource),
  1318. .resource = bfin_spi0_resource,
  1319. .dev = {
  1320. .platform_data = &bf60x_spi_master_info0, /* Passed to driver */
  1321. },
  1322. };
  1323. static struct bfin_spi3_master bf60x_spi_master_info1 = {
  1324. .num_chipselect = MAX_CTRL_CS + MAX_BLACKFIN_GPIOS,
  1325. .pin_req = {P_SPI1_SCK, P_SPI1_MISO, P_SPI1_MOSI, 0},
  1326. };
  1327. static struct platform_device bf60x_spi_master1 = {
  1328. .name = "bfin-spi3",
  1329. .id = 1, /* Bus number */
  1330. .num_resources = ARRAY_SIZE(bfin_spi1_resource),
  1331. .resource = bfin_spi1_resource,
  1332. .dev = {
  1333. .platform_data = &bf60x_spi_master_info1, /* Passed to driver */
  1334. },
  1335. };
  1336. #endif /* spi master and devices */
  1337. #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
  1338. static const u16 bfin_twi0_pins[] = {P_TWI0_SCL, P_TWI0_SDA, 0};
  1339. static struct resource bfin_twi0_resource[] = {
  1340. [0] = {
  1341. .start = TWI0_CLKDIV,
  1342. .end = TWI0_CLKDIV + 0xFF,
  1343. .flags = IORESOURCE_MEM,
  1344. },
  1345. [1] = {
  1346. .start = IRQ_TWI0,
  1347. .end = IRQ_TWI0,
  1348. .flags = IORESOURCE_IRQ,
  1349. },
  1350. };
  1351. static struct platform_device i2c_bfin_twi0_device = {
  1352. .name = "i2c-bfin-twi",
  1353. .id = 0,
  1354. .num_resources = ARRAY_SIZE(bfin_twi0_resource),
  1355. .resource = bfin_twi0_resource,
  1356. .dev = {
  1357. .platform_data = &bfin_twi0_pins,
  1358. },
  1359. };
  1360. static const u16 bfin_twi1_pins[] = {P_TWI1_SCL, P_TWI1_SDA, 0};
  1361. static struct resource bfin_twi1_resource[] = {
  1362. [0] = {
  1363. .start = TWI1_CLKDIV,
  1364. .end = TWI1_CLKDIV + 0xFF,
  1365. .flags = IORESOURCE_MEM,
  1366. },
  1367. [1] = {
  1368. .start = IRQ_TWI1,
  1369. .end = IRQ_TWI1,
  1370. .flags = IORESOURCE_IRQ,
  1371. },
  1372. };
  1373. static struct platform_device i2c_bfin_twi1_device = {
  1374. .name = "i2c-bfin-twi",
  1375. .id = 1,
  1376. .num_resources = ARRAY_SIZE(bfin_twi1_resource),
  1377. .resource = bfin_twi1_resource,
  1378. .dev = {
  1379. .platform_data = &bfin_twi1_pins,
  1380. },
  1381. };
  1382. #endif
  1383. static struct i2c_board_info __initdata bfin_i2c_board_info0[] = {
  1384. #if defined(CONFIG_INPUT_ADXL34X_I2C) || defined(CONFIG_INPUT_ADXL34X_I2C_MODULE)
  1385. {
  1386. I2C_BOARD_INFO("adxl34x", 0x53),
  1387. .irq = IRQ_PC5,
  1388. .platform_data = (void *)&adxl34x_info,
  1389. },
  1390. #endif
  1391. #if defined(CONFIG_SND_SOC_ADAU1761) || defined(CONFIG_SND_SOC_ADAU1761_MODULE)
  1392. {
  1393. I2C_BOARD_INFO("adau1761", 0x38),
  1394. .platform_data = (void *)&adau1761_info
  1395. },
  1396. #endif
  1397. #if defined(CONFIG_SND_SOC_SSM2602) || defined(CONFIG_SND_SOC_SSM2602_MODULE)
  1398. {
  1399. I2C_BOARD_INFO("ssm2602", 0x1b),
  1400. },
  1401. #endif
  1402. };
  1403. static struct i2c_board_info __initdata bfin_i2c_board_info1[] = {
  1404. };
  1405. static const unsigned int cclk_vlev_datasheet[] =
  1406. {
  1407. /*
  1408. * Internal VLEV BF54XSBBC1533
  1409. ****temporarily using these values until data sheet is updated
  1410. */
  1411. VRPAIR(VLEV_085, 150000000),
  1412. VRPAIR(VLEV_090, 250000000),
  1413. VRPAIR(VLEV_110, 276000000),
  1414. VRPAIR(VLEV_115, 301000000),
  1415. VRPAIR(VLEV_120, 525000000),
  1416. VRPAIR(VLEV_125, 550000000),
  1417. VRPAIR(VLEV_130, 600000000),
  1418. };
  1419. static struct bfin_dpmc_platform_data bfin_dmpc_vreg_data = {
  1420. .tuple_tab = cclk_vlev_datasheet,
  1421. .tabsize = ARRAY_SIZE(cclk_vlev_datasheet),
  1422. .vr_settling_time = 25 /* us */,
  1423. };
  1424. static struct platform_device bfin_dpmc = {
  1425. .name = "bfin dpmc",
  1426. .dev = {
  1427. .platform_data = &bfin_dmpc_vreg_data,
  1428. },
  1429. };
  1430. static struct platform_device *ezkit_devices[] __initdata = {
  1431. &bfin_dpmc,
  1432. #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE)
  1433. &rtc_device,
  1434. #endif
  1435. #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE)
  1436. #ifdef CONFIG_SERIAL_BFIN_UART0
  1437. &bfin_uart0_device,
  1438. #endif
  1439. #ifdef CONFIG_SERIAL_BFIN_UART1
  1440. &bfin_uart1_device,
  1441. #endif
  1442. #endif
  1443. #if defined(CONFIG_BFIN_SIR) || defined(CONFIG_BFIN_SIR_MODULE)
  1444. #ifdef CONFIG_BFIN_SIR0
  1445. &bfin_sir0_device,
  1446. #endif
  1447. #ifdef CONFIG_BFIN_SIR1
  1448. &bfin_sir1_device,
  1449. #endif
  1450. #endif
  1451. #if defined(CONFIG_STMMAC_ETH) || defined(CONFIG_STMMAC_ETH_MODULE)
  1452. &bfin_eth_device,
  1453. #endif
  1454. #if defined(CONFIG_USB_MUSB_HDRC) || defined(CONFIG_USB_MUSB_HDRC_MODULE)
  1455. &musb_device,
  1456. #endif
  1457. #if defined(CONFIG_USB_ISP1760_HCD) || defined(CONFIG_USB_ISP1760_HCD_MODULE)
  1458. &bfin_isp1760_device,
  1459. #endif
  1460. #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE)
  1461. #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
  1462. &bfin_sport0_uart_device,
  1463. #endif
  1464. #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
  1465. &bfin_sport1_uart_device,
  1466. #endif
  1467. #ifdef CONFIG_SERIAL_BFIN_SPORT2_UART
  1468. &bfin_sport2_uart_device,
  1469. #endif
  1470. #endif
  1471. #if defined(CONFIG_CAN_BFIN) || defined(CONFIG_CAN_BFIN_MODULE)
  1472. &bfin_can0_device,
  1473. #endif
  1474. #if defined(CONFIG_MTD_NAND_BF5XX) || defined(CONFIG_MTD_NAND_BF5XX_MODULE)
  1475. &bfin_nand_device,
  1476. #endif
  1477. #if defined(CONFIG_SDH_BFIN) || defined(CONFIG_SDH_BFIN_MODULE)
  1478. &bfin_sdh_device,
  1479. #endif
  1480. #if IS_ENABLED(CONFIG_SPI_BFIN_V3)
  1481. &bf60x_spi_master0,
  1482. &bf60x_spi_master1,
  1483. #endif
  1484. #if defined(CONFIG_INPUT_BFIN_ROTARY) || defined(CONFIG_INPUT_BFIN_ROTARY_MODULE)
  1485. &bfin_rotary_device,
  1486. #endif
  1487. #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE)
  1488. &i2c_bfin_twi0_device,
  1489. #if !defined(CONFIG_BF542)
  1490. &i2c_bfin_twi1_device,
  1491. #endif
  1492. #endif
  1493. #if defined(CONFIG_BFIN_CRC)
  1494. &bfin_crc0_device,
  1495. &bfin_crc1_device,
  1496. #endif
  1497. #if defined(CONFIG_CRYPTO_DEV_BFIN_CRC)
  1498. &bfin_crypto_crc_device,
  1499. #endif
  1500. #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE)
  1501. &bfin_device_gpiokeys,
  1502. #endif
  1503. #if defined(CONFIG_MTD_PHYSMAP) || defined(CONFIG_MTD_PHYSMAP_MODULE)
  1504. &ezkit_flash_device,
  1505. #endif
  1506. #if defined(CONFIG_SND_BF5XX_I2S) || defined(CONFIG_SND_BF5XX_I2S_MODULE)
  1507. &bfin_i2s_pcm,
  1508. #endif
  1509. #if defined(CONFIG_SND_BF6XX_SOC_I2S) || \
  1510. defined(CONFIG_SND_BF6XX_SOC_I2S_MODULE)
  1511. &bfin_i2s,
  1512. #endif
  1513. #if defined(CONFIG_SND_BF5XX_SOC_AD1836) || \
  1514. defined(CONFIG_SND_BF5XX_SOC_AD1836_MODULE)
  1515. &bfin_ad1836_machine,
  1516. #endif
  1517. #if defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61) || \
  1518. defined(CONFIG_SND_SOC_BFIN_EVAL_ADAU1X61_MODULE)
  1519. &adau1761_device,
  1520. #endif
  1521. #if defined(CONFIG_VIDEO_BLACKFIN_CAPTURE) \
  1522. || defined(CONFIG_VIDEO_BLACKFIN_CAPTURE_MODULE)
  1523. &bfin_capture_device,
  1524. #endif
  1525. #if defined(CONFIG_VIDEO_BLACKFIN_DISPLAY) \
  1526. || defined(CONFIG_VIDEO_BLACKFIN_DISPLAY_MODULE)
  1527. &bfin_display_device,
  1528. #endif
  1529. };
  1530. static int __init ezkit_init(void)
  1531. {
  1532. printk(KERN_INFO "%s(): registering device resources\n", __func__);
  1533. i2c_register_board_info(0, bfin_i2c_board_info0,
  1534. ARRAY_SIZE(bfin_i2c_board_info0));
  1535. i2c_register_board_info(1, bfin_i2c_board_info1,
  1536. ARRAY_SIZE(bfin_i2c_board_info1));
  1537. #if defined(CONFIG_STMMAC_ETH) || defined(CONFIG_STMMAC_ETH_MODULE)
  1538. if (!peripheral_request_list(pins, "emac0"))
  1539. printk(KERN_ERR "%s(): request emac pins failed\n", __func__);
  1540. #endif
  1541. platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices));
  1542. spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info));
  1543. return 0;
  1544. }
  1545. arch_initcall(ezkit_init);
  1546. static struct platform_device *ezkit_early_devices[] __initdata = {
  1547. #if defined(CONFIG_SERIAL_BFIN_CONSOLE) || defined(CONFIG_EARLY_PRINTK)
  1548. #ifdef CONFIG_SERIAL_BFIN_UART0
  1549. &bfin_uart0_device,
  1550. #endif
  1551. #ifdef CONFIG_SERIAL_BFIN_UART1
  1552. &bfin_uart1_device,
  1553. #endif
  1554. #endif
  1555. #if defined(CONFIG_SERIAL_BFIN_SPORT_CONSOLE)
  1556. #ifdef CONFIG_SERIAL_BFIN_SPORT0_UART
  1557. &bfin_sport0_uart_device,
  1558. #endif
  1559. #ifdef CONFIG_SERIAL_BFIN_SPORT1_UART
  1560. &bfin_sport1_uart_device,
  1561. #endif
  1562. #ifdef CONFIG_SERIAL_BFIN_SPORT2_UART
  1563. &bfin_sport2_uart_device,
  1564. #endif
  1565. #endif
  1566. };
  1567. void __init native_machine_early_platform_add_devices(void)
  1568. {
  1569. printk(KERN_INFO "register early platform devices\n");
  1570. early_platform_add_devices(ezkit_early_devices,
  1571. ARRAY_SIZE(ezkit_early_devices));
  1572. }