omap_hwmod_2430_data.c 42 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712
  1. /*
  2. * omap_hwmod_2430_data.c - hardware modules present on the OMAP2430 chips
  3. *
  4. * Copyright (C) 2009-2011 Nokia Corporation
  5. * Copyright (C) 2012 Texas Instruments, Inc.
  6. * Paul Walmsley
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License version 2 as
  10. * published by the Free Software Foundation.
  11. *
  12. * XXX handle crossbar/shared link difference for L3?
  13. * XXX these should be marked initdata for multi-OMAP kernels
  14. */
  15. #include <plat/omap_hwmod.h>
  16. #include <mach/irqs.h>
  17. #include <plat/cpu.h>
  18. #include <plat/dma.h>
  19. #include <plat/serial.h>
  20. #include <plat/i2c.h>
  21. #include <plat/gpio.h>
  22. #include <plat/mcbsp.h>
  23. #include <plat/mcspi.h>
  24. #include <plat/dmtimer.h>
  25. #include <plat/mmc.h>
  26. #include <plat/l3_2xxx.h>
  27. #include "omap_hwmod_common_data.h"
  28. #include "prm-regbits-24xx.h"
  29. #include "cm-regbits-24xx.h"
  30. #include "wd_timer.h"
  31. /*
  32. * OMAP2430 hardware module integration data
  33. *
  34. * ALl of the data in this section should be autogeneratable from the
  35. * TI hardware database or other technical documentation. Data that
  36. * is driver-specific or driver-kernel integration-specific belongs
  37. * elsewhere.
  38. */
  39. static struct omap_hwmod omap2430_mpu_hwmod;
  40. static struct omap_hwmod omap2430_iva_hwmod;
  41. static struct omap_hwmod omap2430_l3_main_hwmod;
  42. static struct omap_hwmod omap2430_l4_core_hwmod;
  43. static struct omap_hwmod omap2430_dss_core_hwmod;
  44. static struct omap_hwmod omap2430_dss_dispc_hwmod;
  45. static struct omap_hwmod omap2430_dss_rfbi_hwmod;
  46. static struct omap_hwmod omap2430_dss_venc_hwmod;
  47. static struct omap_hwmod omap2430_wd_timer2_hwmod;
  48. static struct omap_hwmod omap2430_gpio1_hwmod;
  49. static struct omap_hwmod omap2430_gpio2_hwmod;
  50. static struct omap_hwmod omap2430_gpio3_hwmod;
  51. static struct omap_hwmod omap2430_gpio4_hwmod;
  52. static struct omap_hwmod omap2430_gpio5_hwmod;
  53. static struct omap_hwmod omap2430_dma_system_hwmod;
  54. static struct omap_hwmod omap2430_mcbsp1_hwmod;
  55. static struct omap_hwmod omap2430_mcbsp2_hwmod;
  56. static struct omap_hwmod omap2430_mcbsp3_hwmod;
  57. static struct omap_hwmod omap2430_mcbsp4_hwmod;
  58. static struct omap_hwmod omap2430_mcbsp5_hwmod;
  59. static struct omap_hwmod omap2430_mcspi1_hwmod;
  60. static struct omap_hwmod omap2430_mcspi2_hwmod;
  61. static struct omap_hwmod omap2430_mcspi3_hwmod;
  62. static struct omap_hwmod omap2430_mmc1_hwmod;
  63. static struct omap_hwmod omap2430_mmc2_hwmod;
  64. /* L3 -> L4_CORE interface */
  65. static struct omap_hwmod_ocp_if omap2430_l3_main__l4_core = {
  66. .master = &omap2430_l3_main_hwmod,
  67. .slave = &omap2430_l4_core_hwmod,
  68. .user = OCP_USER_MPU | OCP_USER_SDMA,
  69. };
  70. /* MPU -> L3 interface */
  71. static struct omap_hwmod_ocp_if omap2430_mpu__l3_main = {
  72. .master = &omap2430_mpu_hwmod,
  73. .slave = &omap2430_l3_main_hwmod,
  74. .user = OCP_USER_MPU,
  75. };
  76. /* DSS -> l3 */
  77. static struct omap_hwmod_ocp_if omap2430_dss__l3 = {
  78. .master = &omap2430_dss_core_hwmod,
  79. .slave = &omap2430_l3_main_hwmod,
  80. .fw = {
  81. .omap2 = {
  82. .l3_perm_bit = OMAP2_L3_CORE_FW_CONNID_DSS,
  83. .flags = OMAP_FIREWALL_L3,
  84. }
  85. },
  86. .user = OCP_USER_MPU | OCP_USER_SDMA,
  87. };
  88. /* L3 */
  89. static struct omap_hwmod omap2430_l3_main_hwmod = {
  90. .name = "l3_main",
  91. .class = &l3_hwmod_class,
  92. .flags = HWMOD_NO_IDLEST,
  93. };
  94. static struct omap_hwmod omap2430_l4_wkup_hwmod;
  95. static struct omap_hwmod omap2430_uart1_hwmod;
  96. static struct omap_hwmod omap2430_uart2_hwmod;
  97. static struct omap_hwmod omap2430_uart3_hwmod;
  98. static struct omap_hwmod omap2430_i2c1_hwmod;
  99. static struct omap_hwmod omap2430_i2c2_hwmod;
  100. static struct omap_hwmod omap2430_usbhsotg_hwmod;
  101. /* l3_core -> usbhsotg interface */
  102. static struct omap_hwmod_ocp_if omap2430_usbhsotg__l3 = {
  103. .master = &omap2430_usbhsotg_hwmod,
  104. .slave = &omap2430_l3_main_hwmod,
  105. .clk = "core_l3_ck",
  106. .user = OCP_USER_MPU,
  107. };
  108. /* L4 CORE -> I2C1 interface */
  109. static struct omap_hwmod_ocp_if omap2430_l4_core__i2c1 = {
  110. .master = &omap2430_l4_core_hwmod,
  111. .slave = &omap2430_i2c1_hwmod,
  112. .clk = "i2c1_ick",
  113. .addr = omap2_i2c1_addr_space,
  114. .user = OCP_USER_MPU | OCP_USER_SDMA,
  115. };
  116. /* L4 CORE -> I2C2 interface */
  117. static struct omap_hwmod_ocp_if omap2430_l4_core__i2c2 = {
  118. .master = &omap2430_l4_core_hwmod,
  119. .slave = &omap2430_i2c2_hwmod,
  120. .clk = "i2c2_ick",
  121. .addr = omap2_i2c2_addr_space,
  122. .user = OCP_USER_MPU | OCP_USER_SDMA,
  123. };
  124. /* L4_CORE -> L4_WKUP interface */
  125. static struct omap_hwmod_ocp_if omap2430_l4_core__l4_wkup = {
  126. .master = &omap2430_l4_core_hwmod,
  127. .slave = &omap2430_l4_wkup_hwmod,
  128. .user = OCP_USER_MPU | OCP_USER_SDMA,
  129. };
  130. /* L4 CORE -> UART1 interface */
  131. static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = {
  132. .master = &omap2430_l4_core_hwmod,
  133. .slave = &omap2430_uart1_hwmod,
  134. .clk = "uart1_ick",
  135. .addr = omap2xxx_uart1_addr_space,
  136. .user = OCP_USER_MPU | OCP_USER_SDMA,
  137. };
  138. /* L4 CORE -> UART2 interface */
  139. static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = {
  140. .master = &omap2430_l4_core_hwmod,
  141. .slave = &omap2430_uart2_hwmod,
  142. .clk = "uart2_ick",
  143. .addr = omap2xxx_uart2_addr_space,
  144. .user = OCP_USER_MPU | OCP_USER_SDMA,
  145. };
  146. /* L4 PER -> UART3 interface */
  147. static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = {
  148. .master = &omap2430_l4_core_hwmod,
  149. .slave = &omap2430_uart3_hwmod,
  150. .clk = "uart3_ick",
  151. .addr = omap2xxx_uart3_addr_space,
  152. .user = OCP_USER_MPU | OCP_USER_SDMA,
  153. };
  154. /*
  155. * usbhsotg interface data
  156. */
  157. static struct omap_hwmod_addr_space omap2430_usbhsotg_addrs[] = {
  158. {
  159. .pa_start = OMAP243X_HS_BASE,
  160. .pa_end = OMAP243X_HS_BASE + SZ_4K - 1,
  161. .flags = ADDR_TYPE_RT
  162. },
  163. { }
  164. };
  165. /* l4_core ->usbhsotg interface */
  166. static struct omap_hwmod_ocp_if omap2430_l4_core__usbhsotg = {
  167. .master = &omap2430_l4_core_hwmod,
  168. .slave = &omap2430_usbhsotg_hwmod,
  169. .clk = "usb_l4_ick",
  170. .addr = omap2430_usbhsotg_addrs,
  171. .user = OCP_USER_MPU,
  172. };
  173. /* L4 CORE -> MMC1 interface */
  174. static struct omap_hwmod_ocp_if omap2430_l4_core__mmc1 = {
  175. .master = &omap2430_l4_core_hwmod,
  176. .slave = &omap2430_mmc1_hwmod,
  177. .clk = "mmchs1_ick",
  178. .addr = omap2430_mmc1_addr_space,
  179. .user = OCP_USER_MPU | OCP_USER_SDMA,
  180. };
  181. /* L4 CORE -> MMC2 interface */
  182. static struct omap_hwmod_ocp_if omap2430_l4_core__mmc2 = {
  183. .master = &omap2430_l4_core_hwmod,
  184. .slave = &omap2430_mmc2_hwmod,
  185. .clk = "mmchs2_ick",
  186. .addr = omap2430_mmc2_addr_space,
  187. .user = OCP_USER_MPU | OCP_USER_SDMA,
  188. };
  189. /* L4 CORE */
  190. static struct omap_hwmod omap2430_l4_core_hwmod = {
  191. .name = "l4_core",
  192. .class = &l4_hwmod_class,
  193. .flags = HWMOD_NO_IDLEST,
  194. };
  195. /* l4 core -> mcspi1 interface */
  196. static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi1 = {
  197. .master = &omap2430_l4_core_hwmod,
  198. .slave = &omap2430_mcspi1_hwmod,
  199. .clk = "mcspi1_ick",
  200. .addr = omap2_mcspi1_addr_space,
  201. .user = OCP_USER_MPU | OCP_USER_SDMA,
  202. };
  203. /* l4 core -> mcspi2 interface */
  204. static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi2 = {
  205. .master = &omap2430_l4_core_hwmod,
  206. .slave = &omap2430_mcspi2_hwmod,
  207. .clk = "mcspi2_ick",
  208. .addr = omap2_mcspi2_addr_space,
  209. .user = OCP_USER_MPU | OCP_USER_SDMA,
  210. };
  211. /* l4 core -> mcspi3 interface */
  212. static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi3 = {
  213. .master = &omap2430_l4_core_hwmod,
  214. .slave = &omap2430_mcspi3_hwmod,
  215. .clk = "mcspi3_ick",
  216. .addr = omap2430_mcspi3_addr_space,
  217. .user = OCP_USER_MPU | OCP_USER_SDMA,
  218. };
  219. /* L4 WKUP */
  220. static struct omap_hwmod omap2430_l4_wkup_hwmod = {
  221. .name = "l4_wkup",
  222. .class = &l4_hwmod_class,
  223. .flags = HWMOD_NO_IDLEST,
  224. };
  225. /* MPU */
  226. static struct omap_hwmod omap2430_mpu_hwmod = {
  227. .name = "mpu",
  228. .class = &mpu_hwmod_class,
  229. .main_clk = "mpu_ck",
  230. };
  231. /*
  232. * IVA2_1 interface data
  233. */
  234. /* IVA2 <- L3 interface */
  235. static struct omap_hwmod_ocp_if omap2430_l3__iva = {
  236. .master = &omap2430_l3_main_hwmod,
  237. .slave = &omap2430_iva_hwmod,
  238. .clk = "dsp_fck",
  239. .user = OCP_USER_MPU | OCP_USER_SDMA,
  240. };
  241. /*
  242. * IVA2 (IVA2)
  243. */
  244. static struct omap_hwmod omap2430_iva_hwmod = {
  245. .name = "iva",
  246. .class = &iva_hwmod_class,
  247. };
  248. /* always-on timers dev attribute */
  249. static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
  250. .timer_capability = OMAP_TIMER_ALWON,
  251. };
  252. /* pwm timers dev attribute */
  253. static struct omap_timer_capability_dev_attr capability_pwm_dev_attr = {
  254. .timer_capability = OMAP_TIMER_HAS_PWM,
  255. };
  256. /* timer1 */
  257. static struct omap_hwmod omap2430_timer1_hwmod;
  258. static struct omap_hwmod_addr_space omap2430_timer1_addrs[] = {
  259. {
  260. .pa_start = 0x49018000,
  261. .pa_end = 0x49018000 + SZ_1K - 1,
  262. .flags = ADDR_TYPE_RT
  263. },
  264. { }
  265. };
  266. /* l4_wkup -> timer1 */
  267. static struct omap_hwmod_ocp_if omap2430_l4_wkup__timer1 = {
  268. .master = &omap2430_l4_wkup_hwmod,
  269. .slave = &omap2430_timer1_hwmod,
  270. .clk = "gpt1_ick",
  271. .addr = omap2430_timer1_addrs,
  272. .user = OCP_USER_MPU | OCP_USER_SDMA,
  273. };
  274. /* timer1 hwmod */
  275. static struct omap_hwmod omap2430_timer1_hwmod = {
  276. .name = "timer1",
  277. .mpu_irqs = omap2_timer1_mpu_irqs,
  278. .main_clk = "gpt1_fck",
  279. .prcm = {
  280. .omap2 = {
  281. .prcm_reg_id = 1,
  282. .module_bit = OMAP24XX_EN_GPT1_SHIFT,
  283. .module_offs = WKUP_MOD,
  284. .idlest_reg_id = 1,
  285. .idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT,
  286. },
  287. },
  288. .dev_attr = &capability_alwon_dev_attr,
  289. .class = &omap2xxx_timer_hwmod_class,
  290. };
  291. /* timer2 */
  292. static struct omap_hwmod omap2430_timer2_hwmod;
  293. /* l4_core -> timer2 */
  294. static struct omap_hwmod_ocp_if omap2430_l4_core__timer2 = {
  295. .master = &omap2430_l4_core_hwmod,
  296. .slave = &omap2430_timer2_hwmod,
  297. .clk = "gpt2_ick",
  298. .addr = omap2xxx_timer2_addrs,
  299. .user = OCP_USER_MPU | OCP_USER_SDMA,
  300. };
  301. /* timer2 hwmod */
  302. static struct omap_hwmod omap2430_timer2_hwmod = {
  303. .name = "timer2",
  304. .mpu_irqs = omap2_timer2_mpu_irqs,
  305. .main_clk = "gpt2_fck",
  306. .prcm = {
  307. .omap2 = {
  308. .prcm_reg_id = 1,
  309. .module_bit = OMAP24XX_EN_GPT2_SHIFT,
  310. .module_offs = CORE_MOD,
  311. .idlest_reg_id = 1,
  312. .idlest_idle_bit = OMAP24XX_ST_GPT2_SHIFT,
  313. },
  314. },
  315. .dev_attr = &capability_alwon_dev_attr,
  316. .class = &omap2xxx_timer_hwmod_class,
  317. };
  318. /* timer3 */
  319. static struct omap_hwmod omap2430_timer3_hwmod;
  320. /* l4_core -> timer3 */
  321. static struct omap_hwmod_ocp_if omap2430_l4_core__timer3 = {
  322. .master = &omap2430_l4_core_hwmod,
  323. .slave = &omap2430_timer3_hwmod,
  324. .clk = "gpt3_ick",
  325. .addr = omap2xxx_timer3_addrs,
  326. .user = OCP_USER_MPU | OCP_USER_SDMA,
  327. };
  328. /* timer3 hwmod */
  329. static struct omap_hwmod omap2430_timer3_hwmod = {
  330. .name = "timer3",
  331. .mpu_irqs = omap2_timer3_mpu_irqs,
  332. .main_clk = "gpt3_fck",
  333. .prcm = {
  334. .omap2 = {
  335. .prcm_reg_id = 1,
  336. .module_bit = OMAP24XX_EN_GPT3_SHIFT,
  337. .module_offs = CORE_MOD,
  338. .idlest_reg_id = 1,
  339. .idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT,
  340. },
  341. },
  342. .dev_attr = &capability_alwon_dev_attr,
  343. .class = &omap2xxx_timer_hwmod_class,
  344. };
  345. /* timer4 */
  346. static struct omap_hwmod omap2430_timer4_hwmod;
  347. /* l4_core -> timer4 */
  348. static struct omap_hwmod_ocp_if omap2430_l4_core__timer4 = {
  349. .master = &omap2430_l4_core_hwmod,
  350. .slave = &omap2430_timer4_hwmod,
  351. .clk = "gpt4_ick",
  352. .addr = omap2xxx_timer4_addrs,
  353. .user = OCP_USER_MPU | OCP_USER_SDMA,
  354. };
  355. /* timer4 hwmod */
  356. static struct omap_hwmod omap2430_timer4_hwmod = {
  357. .name = "timer4",
  358. .mpu_irqs = omap2_timer4_mpu_irqs,
  359. .main_clk = "gpt4_fck",
  360. .prcm = {
  361. .omap2 = {
  362. .prcm_reg_id = 1,
  363. .module_bit = OMAP24XX_EN_GPT4_SHIFT,
  364. .module_offs = CORE_MOD,
  365. .idlest_reg_id = 1,
  366. .idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT,
  367. },
  368. },
  369. .dev_attr = &capability_alwon_dev_attr,
  370. .class = &omap2xxx_timer_hwmod_class,
  371. };
  372. /* timer5 */
  373. static struct omap_hwmod omap2430_timer5_hwmod;
  374. /* l4_core -> timer5 */
  375. static struct omap_hwmod_ocp_if omap2430_l4_core__timer5 = {
  376. .master = &omap2430_l4_core_hwmod,
  377. .slave = &omap2430_timer5_hwmod,
  378. .clk = "gpt5_ick",
  379. .addr = omap2xxx_timer5_addrs,
  380. .user = OCP_USER_MPU | OCP_USER_SDMA,
  381. };
  382. /* timer5 hwmod */
  383. static struct omap_hwmod omap2430_timer5_hwmod = {
  384. .name = "timer5",
  385. .mpu_irqs = omap2_timer5_mpu_irqs,
  386. .main_clk = "gpt5_fck",
  387. .prcm = {
  388. .omap2 = {
  389. .prcm_reg_id = 1,
  390. .module_bit = OMAP24XX_EN_GPT5_SHIFT,
  391. .module_offs = CORE_MOD,
  392. .idlest_reg_id = 1,
  393. .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT,
  394. },
  395. },
  396. .dev_attr = &capability_alwon_dev_attr,
  397. .class = &omap2xxx_timer_hwmod_class,
  398. };
  399. /* timer6 */
  400. static struct omap_hwmod omap2430_timer6_hwmod;
  401. /* l4_core -> timer6 */
  402. static struct omap_hwmod_ocp_if omap2430_l4_core__timer6 = {
  403. .master = &omap2430_l4_core_hwmod,
  404. .slave = &omap2430_timer6_hwmod,
  405. .clk = "gpt6_ick",
  406. .addr = omap2xxx_timer6_addrs,
  407. .user = OCP_USER_MPU | OCP_USER_SDMA,
  408. };
  409. /* timer6 hwmod */
  410. static struct omap_hwmod omap2430_timer6_hwmod = {
  411. .name = "timer6",
  412. .mpu_irqs = omap2_timer6_mpu_irqs,
  413. .main_clk = "gpt6_fck",
  414. .prcm = {
  415. .omap2 = {
  416. .prcm_reg_id = 1,
  417. .module_bit = OMAP24XX_EN_GPT6_SHIFT,
  418. .module_offs = CORE_MOD,
  419. .idlest_reg_id = 1,
  420. .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT,
  421. },
  422. },
  423. .dev_attr = &capability_alwon_dev_attr,
  424. .class = &omap2xxx_timer_hwmod_class,
  425. };
  426. /* timer7 */
  427. static struct omap_hwmod omap2430_timer7_hwmod;
  428. /* l4_core -> timer7 */
  429. static struct omap_hwmod_ocp_if omap2430_l4_core__timer7 = {
  430. .master = &omap2430_l4_core_hwmod,
  431. .slave = &omap2430_timer7_hwmod,
  432. .clk = "gpt7_ick",
  433. .addr = omap2xxx_timer7_addrs,
  434. .user = OCP_USER_MPU | OCP_USER_SDMA,
  435. };
  436. /* timer7 hwmod */
  437. static struct omap_hwmod omap2430_timer7_hwmod = {
  438. .name = "timer7",
  439. .mpu_irqs = omap2_timer7_mpu_irqs,
  440. .main_clk = "gpt7_fck",
  441. .prcm = {
  442. .omap2 = {
  443. .prcm_reg_id = 1,
  444. .module_bit = OMAP24XX_EN_GPT7_SHIFT,
  445. .module_offs = CORE_MOD,
  446. .idlest_reg_id = 1,
  447. .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT,
  448. },
  449. },
  450. .dev_attr = &capability_alwon_dev_attr,
  451. .class = &omap2xxx_timer_hwmod_class,
  452. };
  453. /* timer8 */
  454. static struct omap_hwmod omap2430_timer8_hwmod;
  455. /* l4_core -> timer8 */
  456. static struct omap_hwmod_ocp_if omap2430_l4_core__timer8 = {
  457. .master = &omap2430_l4_core_hwmod,
  458. .slave = &omap2430_timer8_hwmod,
  459. .clk = "gpt8_ick",
  460. .addr = omap2xxx_timer8_addrs,
  461. .user = OCP_USER_MPU | OCP_USER_SDMA,
  462. };
  463. /* timer8 hwmod */
  464. static struct omap_hwmod omap2430_timer8_hwmod = {
  465. .name = "timer8",
  466. .mpu_irqs = omap2_timer8_mpu_irqs,
  467. .main_clk = "gpt8_fck",
  468. .prcm = {
  469. .omap2 = {
  470. .prcm_reg_id = 1,
  471. .module_bit = OMAP24XX_EN_GPT8_SHIFT,
  472. .module_offs = CORE_MOD,
  473. .idlest_reg_id = 1,
  474. .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT,
  475. },
  476. },
  477. .dev_attr = &capability_alwon_dev_attr,
  478. .class = &omap2xxx_timer_hwmod_class,
  479. };
  480. /* timer9 */
  481. static struct omap_hwmod omap2430_timer9_hwmod;
  482. /* l4_core -> timer9 */
  483. static struct omap_hwmod_ocp_if omap2430_l4_core__timer9 = {
  484. .master = &omap2430_l4_core_hwmod,
  485. .slave = &omap2430_timer9_hwmod,
  486. .clk = "gpt9_ick",
  487. .addr = omap2xxx_timer9_addrs,
  488. .user = OCP_USER_MPU | OCP_USER_SDMA,
  489. };
  490. /* timer9 hwmod */
  491. static struct omap_hwmod omap2430_timer9_hwmod = {
  492. .name = "timer9",
  493. .mpu_irqs = omap2_timer9_mpu_irqs,
  494. .main_clk = "gpt9_fck",
  495. .prcm = {
  496. .omap2 = {
  497. .prcm_reg_id = 1,
  498. .module_bit = OMAP24XX_EN_GPT9_SHIFT,
  499. .module_offs = CORE_MOD,
  500. .idlest_reg_id = 1,
  501. .idlest_idle_bit = OMAP24XX_ST_GPT9_SHIFT,
  502. },
  503. },
  504. .dev_attr = &capability_pwm_dev_attr,
  505. .class = &omap2xxx_timer_hwmod_class,
  506. };
  507. /* timer10 */
  508. static struct omap_hwmod omap2430_timer10_hwmod;
  509. /* l4_core -> timer10 */
  510. static struct omap_hwmod_ocp_if omap2430_l4_core__timer10 = {
  511. .master = &omap2430_l4_core_hwmod,
  512. .slave = &omap2430_timer10_hwmod,
  513. .clk = "gpt10_ick",
  514. .addr = omap2_timer10_addrs,
  515. .user = OCP_USER_MPU | OCP_USER_SDMA,
  516. };
  517. /* timer10 hwmod */
  518. static struct omap_hwmod omap2430_timer10_hwmod = {
  519. .name = "timer10",
  520. .mpu_irqs = omap2_timer10_mpu_irqs,
  521. .main_clk = "gpt10_fck",
  522. .prcm = {
  523. .omap2 = {
  524. .prcm_reg_id = 1,
  525. .module_bit = OMAP24XX_EN_GPT10_SHIFT,
  526. .module_offs = CORE_MOD,
  527. .idlest_reg_id = 1,
  528. .idlest_idle_bit = OMAP24XX_ST_GPT10_SHIFT,
  529. },
  530. },
  531. .dev_attr = &capability_pwm_dev_attr,
  532. .class = &omap2xxx_timer_hwmod_class,
  533. };
  534. /* timer11 */
  535. static struct omap_hwmod omap2430_timer11_hwmod;
  536. /* l4_core -> timer11 */
  537. static struct omap_hwmod_ocp_if omap2430_l4_core__timer11 = {
  538. .master = &omap2430_l4_core_hwmod,
  539. .slave = &omap2430_timer11_hwmod,
  540. .clk = "gpt11_ick",
  541. .addr = omap2_timer11_addrs,
  542. .user = OCP_USER_MPU | OCP_USER_SDMA,
  543. };
  544. /* timer11 hwmod */
  545. static struct omap_hwmod omap2430_timer11_hwmod = {
  546. .name = "timer11",
  547. .mpu_irqs = omap2_timer11_mpu_irqs,
  548. .main_clk = "gpt11_fck",
  549. .prcm = {
  550. .omap2 = {
  551. .prcm_reg_id = 1,
  552. .module_bit = OMAP24XX_EN_GPT11_SHIFT,
  553. .module_offs = CORE_MOD,
  554. .idlest_reg_id = 1,
  555. .idlest_idle_bit = OMAP24XX_ST_GPT11_SHIFT,
  556. },
  557. },
  558. .dev_attr = &capability_pwm_dev_attr,
  559. .class = &omap2xxx_timer_hwmod_class,
  560. };
  561. /* timer12 */
  562. static struct omap_hwmod omap2430_timer12_hwmod;
  563. /* l4_core -> timer12 */
  564. static struct omap_hwmod_ocp_if omap2430_l4_core__timer12 = {
  565. .master = &omap2430_l4_core_hwmod,
  566. .slave = &omap2430_timer12_hwmod,
  567. .clk = "gpt12_ick",
  568. .addr = omap2xxx_timer12_addrs,
  569. .user = OCP_USER_MPU | OCP_USER_SDMA,
  570. };
  571. /* timer12 hwmod */
  572. static struct omap_hwmod omap2430_timer12_hwmod = {
  573. .name = "timer12",
  574. .mpu_irqs = omap2xxx_timer12_mpu_irqs,
  575. .main_clk = "gpt12_fck",
  576. .prcm = {
  577. .omap2 = {
  578. .prcm_reg_id = 1,
  579. .module_bit = OMAP24XX_EN_GPT12_SHIFT,
  580. .module_offs = CORE_MOD,
  581. .idlest_reg_id = 1,
  582. .idlest_idle_bit = OMAP24XX_ST_GPT12_SHIFT,
  583. },
  584. },
  585. .dev_attr = &capability_pwm_dev_attr,
  586. .class = &omap2xxx_timer_hwmod_class,
  587. };
  588. /* l4_wkup -> wd_timer2 */
  589. static struct omap_hwmod_addr_space omap2430_wd_timer2_addrs[] = {
  590. {
  591. .pa_start = 0x49016000,
  592. .pa_end = 0x4901607f,
  593. .flags = ADDR_TYPE_RT
  594. },
  595. { }
  596. };
  597. static struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2 = {
  598. .master = &omap2430_l4_wkup_hwmod,
  599. .slave = &omap2430_wd_timer2_hwmod,
  600. .clk = "mpu_wdt_ick",
  601. .addr = omap2430_wd_timer2_addrs,
  602. .user = OCP_USER_MPU | OCP_USER_SDMA,
  603. };
  604. static struct omap_hwmod omap2430_wd_timer2_hwmod = {
  605. .name = "wd_timer2",
  606. .class = &omap2xxx_wd_timer_hwmod_class,
  607. .main_clk = "mpu_wdt_fck",
  608. .prcm = {
  609. .omap2 = {
  610. .prcm_reg_id = 1,
  611. .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
  612. .module_offs = WKUP_MOD,
  613. .idlest_reg_id = 1,
  614. .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT,
  615. },
  616. },
  617. };
  618. /* UART1 */
  619. static struct omap_hwmod omap2430_uart1_hwmod = {
  620. .name = "uart1",
  621. .mpu_irqs = omap2_uart1_mpu_irqs,
  622. .sdma_reqs = omap2_uart1_sdma_reqs,
  623. .main_clk = "uart1_fck",
  624. .prcm = {
  625. .omap2 = {
  626. .module_offs = CORE_MOD,
  627. .prcm_reg_id = 1,
  628. .module_bit = OMAP24XX_EN_UART1_SHIFT,
  629. .idlest_reg_id = 1,
  630. .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT,
  631. },
  632. },
  633. .class = &omap2_uart_class,
  634. };
  635. /* UART2 */
  636. static struct omap_hwmod omap2430_uart2_hwmod = {
  637. .name = "uart2",
  638. .mpu_irqs = omap2_uart2_mpu_irqs,
  639. .sdma_reqs = omap2_uart2_sdma_reqs,
  640. .main_clk = "uart2_fck",
  641. .prcm = {
  642. .omap2 = {
  643. .module_offs = CORE_MOD,
  644. .prcm_reg_id = 1,
  645. .module_bit = OMAP24XX_EN_UART2_SHIFT,
  646. .idlest_reg_id = 1,
  647. .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT,
  648. },
  649. },
  650. .class = &omap2_uart_class,
  651. };
  652. /* UART3 */
  653. static struct omap_hwmod omap2430_uart3_hwmod = {
  654. .name = "uart3",
  655. .mpu_irqs = omap2_uart3_mpu_irqs,
  656. .sdma_reqs = omap2_uart3_sdma_reqs,
  657. .main_clk = "uart3_fck",
  658. .prcm = {
  659. .omap2 = {
  660. .module_offs = CORE_MOD,
  661. .prcm_reg_id = 2,
  662. .module_bit = OMAP24XX_EN_UART3_SHIFT,
  663. .idlest_reg_id = 2,
  664. .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT,
  665. },
  666. },
  667. .class = &omap2_uart_class,
  668. };
  669. /* dss */
  670. /* l4_core -> dss */
  671. static struct omap_hwmod_ocp_if omap2430_l4_core__dss = {
  672. .master = &omap2430_l4_core_hwmod,
  673. .slave = &omap2430_dss_core_hwmod,
  674. .clk = "dss_ick",
  675. .addr = omap2_dss_addrs,
  676. .user = OCP_USER_MPU | OCP_USER_SDMA,
  677. };
  678. static struct omap_hwmod_opt_clk dss_opt_clks[] = {
  679. /*
  680. * The DSS HW needs all DSS clocks enabled during reset. The dss_core
  681. * driver does not use these clocks.
  682. */
  683. { .role = "tv_clk", .clk = "dss_54m_fck" },
  684. { .role = "sys_clk", .clk = "dss2_fck" },
  685. };
  686. static struct omap_hwmod omap2430_dss_core_hwmod = {
  687. .name = "dss_core",
  688. .class = &omap2_dss_hwmod_class,
  689. .main_clk = "dss1_fck", /* instead of dss_fck */
  690. .sdma_reqs = omap2xxx_dss_sdma_chs,
  691. .prcm = {
  692. .omap2 = {
  693. .prcm_reg_id = 1,
  694. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  695. .module_offs = CORE_MOD,
  696. .idlest_reg_id = 1,
  697. .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
  698. },
  699. },
  700. .opt_clks = dss_opt_clks,
  701. .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
  702. .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  703. };
  704. /* l4_core -> dss_dispc */
  705. static struct omap_hwmod_ocp_if omap2430_l4_core__dss_dispc = {
  706. .master = &omap2430_l4_core_hwmod,
  707. .slave = &omap2430_dss_dispc_hwmod,
  708. .clk = "dss_ick",
  709. .addr = omap2_dss_dispc_addrs,
  710. .user = OCP_USER_MPU | OCP_USER_SDMA,
  711. };
  712. static struct omap_hwmod omap2430_dss_dispc_hwmod = {
  713. .name = "dss_dispc",
  714. .class = &omap2_dispc_hwmod_class,
  715. .mpu_irqs = omap2_dispc_irqs,
  716. .main_clk = "dss1_fck",
  717. .prcm = {
  718. .omap2 = {
  719. .prcm_reg_id = 1,
  720. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  721. .module_offs = CORE_MOD,
  722. .idlest_reg_id = 1,
  723. .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
  724. },
  725. },
  726. .flags = HWMOD_NO_IDLEST,
  727. .dev_attr = &omap2_3_dss_dispc_dev_attr
  728. };
  729. /* l4_core -> dss_rfbi */
  730. static struct omap_hwmod_ocp_if omap2430_l4_core__dss_rfbi = {
  731. .master = &omap2430_l4_core_hwmod,
  732. .slave = &omap2430_dss_rfbi_hwmod,
  733. .clk = "dss_ick",
  734. .addr = omap2_dss_rfbi_addrs,
  735. .user = OCP_USER_MPU | OCP_USER_SDMA,
  736. };
  737. static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
  738. { .role = "ick", .clk = "dss_ick" },
  739. };
  740. static struct omap_hwmod omap2430_dss_rfbi_hwmod = {
  741. .name = "dss_rfbi",
  742. .class = &omap2_rfbi_hwmod_class,
  743. .main_clk = "dss1_fck",
  744. .prcm = {
  745. .omap2 = {
  746. .prcm_reg_id = 1,
  747. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  748. .module_offs = CORE_MOD,
  749. },
  750. },
  751. .opt_clks = dss_rfbi_opt_clks,
  752. .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
  753. .flags = HWMOD_NO_IDLEST,
  754. };
  755. /* l4_core -> dss_venc */
  756. static struct omap_hwmod_ocp_if omap2430_l4_core__dss_venc = {
  757. .master = &omap2430_l4_core_hwmod,
  758. .slave = &omap2430_dss_venc_hwmod,
  759. .clk = "dss_ick",
  760. .addr = omap2_dss_venc_addrs,
  761. .user = OCP_USER_MPU | OCP_USER_SDMA,
  762. };
  763. static struct omap_hwmod omap2430_dss_venc_hwmod = {
  764. .name = "dss_venc",
  765. .class = &omap2_venc_hwmod_class,
  766. .main_clk = "dss_54m_fck",
  767. .prcm = {
  768. .omap2 = {
  769. .prcm_reg_id = 1,
  770. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  771. .module_offs = CORE_MOD,
  772. },
  773. },
  774. .flags = HWMOD_NO_IDLEST,
  775. };
  776. /* I2C common */
  777. static struct omap_hwmod_class_sysconfig i2c_sysc = {
  778. .rev_offs = 0x00,
  779. .sysc_offs = 0x20,
  780. .syss_offs = 0x10,
  781. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  782. SYSS_HAS_RESET_STATUS),
  783. .sysc_fields = &omap_hwmod_sysc_type1,
  784. };
  785. static struct omap_hwmod_class i2c_class = {
  786. .name = "i2c",
  787. .sysc = &i2c_sysc,
  788. .rev = OMAP_I2C_IP_VERSION_1,
  789. .reset = &omap_i2c_reset,
  790. };
  791. static struct omap_i2c_dev_attr i2c_dev_attr = {
  792. .fifo_depth = 8, /* bytes */
  793. .flags = OMAP_I2C_FLAG_APPLY_ERRATA_I207 |
  794. OMAP_I2C_FLAG_BUS_SHIFT_2 |
  795. OMAP_I2C_FLAG_FORCE_19200_INT_CLK,
  796. };
  797. /* I2C1 */
  798. static struct omap_hwmod omap2430_i2c1_hwmod = {
  799. .name = "i2c1",
  800. .flags = HWMOD_16BIT_REG,
  801. .mpu_irqs = omap2_i2c1_mpu_irqs,
  802. .sdma_reqs = omap2_i2c1_sdma_reqs,
  803. .main_clk = "i2chs1_fck",
  804. .prcm = {
  805. .omap2 = {
  806. /*
  807. * NOTE: The CM_FCLKEN* and CM_ICLKEN* for
  808. * I2CHS IP's do not follow the usual pattern.
  809. * prcm_reg_id alone cannot be used to program
  810. * the iclk and fclk. Needs to be handled using
  811. * additional flags when clk handling is moved
  812. * to hwmod framework.
  813. */
  814. .module_offs = CORE_MOD,
  815. .prcm_reg_id = 1,
  816. .module_bit = OMAP2430_EN_I2CHS1_SHIFT,
  817. .idlest_reg_id = 1,
  818. .idlest_idle_bit = OMAP2430_ST_I2CHS1_SHIFT,
  819. },
  820. },
  821. .class = &i2c_class,
  822. .dev_attr = &i2c_dev_attr,
  823. };
  824. /* I2C2 */
  825. static struct omap_hwmod omap2430_i2c2_hwmod = {
  826. .name = "i2c2",
  827. .flags = HWMOD_16BIT_REG,
  828. .mpu_irqs = omap2_i2c2_mpu_irqs,
  829. .sdma_reqs = omap2_i2c2_sdma_reqs,
  830. .main_clk = "i2chs2_fck",
  831. .prcm = {
  832. .omap2 = {
  833. .module_offs = CORE_MOD,
  834. .prcm_reg_id = 1,
  835. .module_bit = OMAP2430_EN_I2CHS2_SHIFT,
  836. .idlest_reg_id = 1,
  837. .idlest_idle_bit = OMAP2430_ST_I2CHS2_SHIFT,
  838. },
  839. },
  840. .class = &i2c_class,
  841. .dev_attr = &i2c_dev_attr,
  842. };
  843. /* l4_wkup -> gpio1 */
  844. static struct omap_hwmod_addr_space omap2430_gpio1_addr_space[] = {
  845. {
  846. .pa_start = 0x4900C000,
  847. .pa_end = 0x4900C1ff,
  848. .flags = ADDR_TYPE_RT
  849. },
  850. { }
  851. };
  852. static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio1 = {
  853. .master = &omap2430_l4_wkup_hwmod,
  854. .slave = &omap2430_gpio1_hwmod,
  855. .clk = "gpios_ick",
  856. .addr = omap2430_gpio1_addr_space,
  857. .user = OCP_USER_MPU | OCP_USER_SDMA,
  858. };
  859. /* l4_wkup -> gpio2 */
  860. static struct omap_hwmod_addr_space omap2430_gpio2_addr_space[] = {
  861. {
  862. .pa_start = 0x4900E000,
  863. .pa_end = 0x4900E1ff,
  864. .flags = ADDR_TYPE_RT
  865. },
  866. { }
  867. };
  868. static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio2 = {
  869. .master = &omap2430_l4_wkup_hwmod,
  870. .slave = &omap2430_gpio2_hwmod,
  871. .clk = "gpios_ick",
  872. .addr = omap2430_gpio2_addr_space,
  873. .user = OCP_USER_MPU | OCP_USER_SDMA,
  874. };
  875. /* l4_wkup -> gpio3 */
  876. static struct omap_hwmod_addr_space omap2430_gpio3_addr_space[] = {
  877. {
  878. .pa_start = 0x49010000,
  879. .pa_end = 0x490101ff,
  880. .flags = ADDR_TYPE_RT
  881. },
  882. { }
  883. };
  884. static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio3 = {
  885. .master = &omap2430_l4_wkup_hwmod,
  886. .slave = &omap2430_gpio3_hwmod,
  887. .clk = "gpios_ick",
  888. .addr = omap2430_gpio3_addr_space,
  889. .user = OCP_USER_MPU | OCP_USER_SDMA,
  890. };
  891. /* l4_wkup -> gpio4 */
  892. static struct omap_hwmod_addr_space omap2430_gpio4_addr_space[] = {
  893. {
  894. .pa_start = 0x49012000,
  895. .pa_end = 0x490121ff,
  896. .flags = ADDR_TYPE_RT
  897. },
  898. { }
  899. };
  900. static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio4 = {
  901. .master = &omap2430_l4_wkup_hwmod,
  902. .slave = &omap2430_gpio4_hwmod,
  903. .clk = "gpios_ick",
  904. .addr = omap2430_gpio4_addr_space,
  905. .user = OCP_USER_MPU | OCP_USER_SDMA,
  906. };
  907. /* l4_core -> gpio5 */
  908. static struct omap_hwmod_addr_space omap2430_gpio5_addr_space[] = {
  909. {
  910. .pa_start = 0x480B6000,
  911. .pa_end = 0x480B61ff,
  912. .flags = ADDR_TYPE_RT
  913. },
  914. { }
  915. };
  916. static struct omap_hwmod_ocp_if omap2430_l4_core__gpio5 = {
  917. .master = &omap2430_l4_core_hwmod,
  918. .slave = &omap2430_gpio5_hwmod,
  919. .clk = "gpio5_ick",
  920. .addr = omap2430_gpio5_addr_space,
  921. .user = OCP_USER_MPU | OCP_USER_SDMA,
  922. };
  923. /* gpio dev_attr */
  924. static struct omap_gpio_dev_attr gpio_dev_attr = {
  925. .bank_width = 32,
  926. .dbck_flag = false,
  927. };
  928. /* gpio1 */
  929. static struct omap_hwmod omap2430_gpio1_hwmod = {
  930. .name = "gpio1",
  931. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  932. .mpu_irqs = omap2_gpio1_irqs,
  933. .main_clk = "gpios_fck",
  934. .prcm = {
  935. .omap2 = {
  936. .prcm_reg_id = 1,
  937. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  938. .module_offs = WKUP_MOD,
  939. .idlest_reg_id = 1,
  940. .idlest_idle_bit = OMAP24XX_EN_GPIOS_SHIFT,
  941. },
  942. },
  943. .class = &omap2xxx_gpio_hwmod_class,
  944. .dev_attr = &gpio_dev_attr,
  945. };
  946. /* gpio2 */
  947. static struct omap_hwmod omap2430_gpio2_hwmod = {
  948. .name = "gpio2",
  949. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  950. .mpu_irqs = omap2_gpio2_irqs,
  951. .main_clk = "gpios_fck",
  952. .prcm = {
  953. .omap2 = {
  954. .prcm_reg_id = 1,
  955. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  956. .module_offs = WKUP_MOD,
  957. .idlest_reg_id = 1,
  958. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  959. },
  960. },
  961. .class = &omap2xxx_gpio_hwmod_class,
  962. .dev_attr = &gpio_dev_attr,
  963. };
  964. /* gpio3 */
  965. static struct omap_hwmod omap2430_gpio3_hwmod = {
  966. .name = "gpio3",
  967. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  968. .mpu_irqs = omap2_gpio3_irqs,
  969. .main_clk = "gpios_fck",
  970. .prcm = {
  971. .omap2 = {
  972. .prcm_reg_id = 1,
  973. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  974. .module_offs = WKUP_MOD,
  975. .idlest_reg_id = 1,
  976. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  977. },
  978. },
  979. .class = &omap2xxx_gpio_hwmod_class,
  980. .dev_attr = &gpio_dev_attr,
  981. };
  982. /* gpio4 */
  983. static struct omap_hwmod omap2430_gpio4_hwmod = {
  984. .name = "gpio4",
  985. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  986. .mpu_irqs = omap2_gpio4_irqs,
  987. .main_clk = "gpios_fck",
  988. .prcm = {
  989. .omap2 = {
  990. .prcm_reg_id = 1,
  991. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  992. .module_offs = WKUP_MOD,
  993. .idlest_reg_id = 1,
  994. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  995. },
  996. },
  997. .class = &omap2xxx_gpio_hwmod_class,
  998. .dev_attr = &gpio_dev_attr,
  999. };
  1000. /* gpio5 */
  1001. static struct omap_hwmod_irq_info omap243x_gpio5_irqs[] = {
  1002. { .irq = 33 }, /* INT_24XX_GPIO_BANK5 */
  1003. { .irq = -1 }
  1004. };
  1005. static struct omap_hwmod omap2430_gpio5_hwmod = {
  1006. .name = "gpio5",
  1007. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1008. .mpu_irqs = omap243x_gpio5_irqs,
  1009. .main_clk = "gpio5_fck",
  1010. .prcm = {
  1011. .omap2 = {
  1012. .prcm_reg_id = 2,
  1013. .module_bit = OMAP2430_EN_GPIO5_SHIFT,
  1014. .module_offs = CORE_MOD,
  1015. .idlest_reg_id = 2,
  1016. .idlest_idle_bit = OMAP2430_ST_GPIO5_SHIFT,
  1017. },
  1018. },
  1019. .class = &omap2xxx_gpio_hwmod_class,
  1020. .dev_attr = &gpio_dev_attr,
  1021. };
  1022. /* dma attributes */
  1023. static struct omap_dma_dev_attr dma_dev_attr = {
  1024. .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
  1025. IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
  1026. .lch_count = 32,
  1027. };
  1028. /* dma_system -> L3 */
  1029. static struct omap_hwmod_ocp_if omap2430_dma_system__l3 = {
  1030. .master = &omap2430_dma_system_hwmod,
  1031. .slave = &omap2430_l3_main_hwmod,
  1032. .clk = "core_l3_ck",
  1033. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1034. };
  1035. /* l4_core -> dma_system */
  1036. static struct omap_hwmod_ocp_if omap2430_l4_core__dma_system = {
  1037. .master = &omap2430_l4_core_hwmod,
  1038. .slave = &omap2430_dma_system_hwmod,
  1039. .clk = "sdma_ick",
  1040. .addr = omap2_dma_system_addrs,
  1041. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1042. };
  1043. static struct omap_hwmod omap2430_dma_system_hwmod = {
  1044. .name = "dma",
  1045. .class = &omap2xxx_dma_hwmod_class,
  1046. .mpu_irqs = omap2_dma_system_irqs,
  1047. .main_clk = "core_l3_ck",
  1048. .dev_attr = &dma_dev_attr,
  1049. .flags = HWMOD_NO_IDLEST,
  1050. };
  1051. /* mailbox */
  1052. static struct omap_hwmod omap2430_mailbox_hwmod;
  1053. static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = {
  1054. { .irq = 26 },
  1055. { .irq = -1 }
  1056. };
  1057. /* l4_core -> mailbox */
  1058. static struct omap_hwmod_ocp_if omap2430_l4_core__mailbox = {
  1059. .master = &omap2430_l4_core_hwmod,
  1060. .slave = &omap2430_mailbox_hwmod,
  1061. .addr = omap2_mailbox_addrs,
  1062. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1063. };
  1064. static struct omap_hwmod omap2430_mailbox_hwmod = {
  1065. .name = "mailbox",
  1066. .class = &omap2xxx_mailbox_hwmod_class,
  1067. .mpu_irqs = omap2430_mailbox_irqs,
  1068. .main_clk = "mailboxes_ick",
  1069. .prcm = {
  1070. .omap2 = {
  1071. .prcm_reg_id = 1,
  1072. .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT,
  1073. .module_offs = CORE_MOD,
  1074. .idlest_reg_id = 1,
  1075. .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
  1076. },
  1077. },
  1078. };
  1079. /* mcspi1 */
  1080. static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
  1081. .num_chipselect = 4,
  1082. };
  1083. static struct omap_hwmod omap2430_mcspi1_hwmod = {
  1084. .name = "mcspi1",
  1085. .mpu_irqs = omap2_mcspi1_mpu_irqs,
  1086. .sdma_reqs = omap2_mcspi1_sdma_reqs,
  1087. .main_clk = "mcspi1_fck",
  1088. .prcm = {
  1089. .omap2 = {
  1090. .module_offs = CORE_MOD,
  1091. .prcm_reg_id = 1,
  1092. .module_bit = OMAP24XX_EN_MCSPI1_SHIFT,
  1093. .idlest_reg_id = 1,
  1094. .idlest_idle_bit = OMAP24XX_ST_MCSPI1_SHIFT,
  1095. },
  1096. },
  1097. .class = &omap2xxx_mcspi_class,
  1098. .dev_attr = &omap_mcspi1_dev_attr,
  1099. };
  1100. /* mcspi2 */
  1101. static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
  1102. .num_chipselect = 2,
  1103. };
  1104. static struct omap_hwmod omap2430_mcspi2_hwmod = {
  1105. .name = "mcspi2",
  1106. .mpu_irqs = omap2_mcspi2_mpu_irqs,
  1107. .sdma_reqs = omap2_mcspi2_sdma_reqs,
  1108. .main_clk = "mcspi2_fck",
  1109. .prcm = {
  1110. .omap2 = {
  1111. .module_offs = CORE_MOD,
  1112. .prcm_reg_id = 1,
  1113. .module_bit = OMAP24XX_EN_MCSPI2_SHIFT,
  1114. .idlest_reg_id = 1,
  1115. .idlest_idle_bit = OMAP24XX_ST_MCSPI2_SHIFT,
  1116. },
  1117. },
  1118. .class = &omap2xxx_mcspi_class,
  1119. .dev_attr = &omap_mcspi2_dev_attr,
  1120. };
  1121. /* mcspi3 */
  1122. static struct omap_hwmod_irq_info omap2430_mcspi3_mpu_irqs[] = {
  1123. { .irq = 91 },
  1124. { .irq = -1 }
  1125. };
  1126. static struct omap_hwmod_dma_info omap2430_mcspi3_sdma_reqs[] = {
  1127. { .name = "tx0", .dma_req = 15 }, /* DMA_SPI3_TX0 */
  1128. { .name = "rx0", .dma_req = 16 }, /* DMA_SPI3_RX0 */
  1129. { .name = "tx1", .dma_req = 23 }, /* DMA_SPI3_TX1 */
  1130. { .name = "rx1", .dma_req = 24 }, /* DMA_SPI3_RX1 */
  1131. { .dma_req = -1 }
  1132. };
  1133. static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
  1134. .num_chipselect = 2,
  1135. };
  1136. static struct omap_hwmod omap2430_mcspi3_hwmod = {
  1137. .name = "mcspi3",
  1138. .mpu_irqs = omap2430_mcspi3_mpu_irqs,
  1139. .sdma_reqs = omap2430_mcspi3_sdma_reqs,
  1140. .main_clk = "mcspi3_fck",
  1141. .prcm = {
  1142. .omap2 = {
  1143. .module_offs = CORE_MOD,
  1144. .prcm_reg_id = 2,
  1145. .module_bit = OMAP2430_EN_MCSPI3_SHIFT,
  1146. .idlest_reg_id = 2,
  1147. .idlest_idle_bit = OMAP2430_ST_MCSPI3_SHIFT,
  1148. },
  1149. },
  1150. .class = &omap2xxx_mcspi_class,
  1151. .dev_attr = &omap_mcspi3_dev_attr,
  1152. };
  1153. /*
  1154. * usbhsotg
  1155. */
  1156. static struct omap_hwmod_class_sysconfig omap2430_usbhsotg_sysc = {
  1157. .rev_offs = 0x0400,
  1158. .sysc_offs = 0x0404,
  1159. .syss_offs = 0x0408,
  1160. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
  1161. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1162. SYSC_HAS_AUTOIDLE),
  1163. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1164. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1165. .sysc_fields = &omap_hwmod_sysc_type1,
  1166. };
  1167. static struct omap_hwmod_class usbotg_class = {
  1168. .name = "usbotg",
  1169. .sysc = &omap2430_usbhsotg_sysc,
  1170. };
  1171. /* usb_otg_hs */
  1172. static struct omap_hwmod_irq_info omap2430_usbhsotg_mpu_irqs[] = {
  1173. { .name = "mc", .irq = 92 },
  1174. { .name = "dma", .irq = 93 },
  1175. { .irq = -1 }
  1176. };
  1177. static struct omap_hwmod omap2430_usbhsotg_hwmod = {
  1178. .name = "usb_otg_hs",
  1179. .mpu_irqs = omap2430_usbhsotg_mpu_irqs,
  1180. .main_clk = "usbhs_ick",
  1181. .prcm = {
  1182. .omap2 = {
  1183. .prcm_reg_id = 1,
  1184. .module_bit = OMAP2430_EN_USBHS_MASK,
  1185. .module_offs = CORE_MOD,
  1186. .idlest_reg_id = 1,
  1187. .idlest_idle_bit = OMAP2430_ST_USBHS_SHIFT,
  1188. },
  1189. },
  1190. .class = &usbotg_class,
  1191. /*
  1192. * Erratum ID: i479 idle_req / idle_ack mechanism potentially
  1193. * broken when autoidle is enabled
  1194. * workaround is to disable the autoidle bit at module level.
  1195. */
  1196. .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
  1197. | HWMOD_SWSUP_MSTANDBY,
  1198. };
  1199. /*
  1200. * 'mcbsp' class
  1201. * multi channel buffered serial port controller
  1202. */
  1203. static struct omap_hwmod_class_sysconfig omap2430_mcbsp_sysc = {
  1204. .rev_offs = 0x007C,
  1205. .sysc_offs = 0x008C,
  1206. .sysc_flags = (SYSC_HAS_SOFTRESET),
  1207. .sysc_fields = &omap_hwmod_sysc_type1,
  1208. };
  1209. static struct omap_hwmod_class omap2430_mcbsp_hwmod_class = {
  1210. .name = "mcbsp",
  1211. .sysc = &omap2430_mcbsp_sysc,
  1212. .rev = MCBSP_CONFIG_TYPE2,
  1213. };
  1214. /* mcbsp1 */
  1215. static struct omap_hwmod_irq_info omap2430_mcbsp1_irqs[] = {
  1216. { .name = "tx", .irq = 59 },
  1217. { .name = "rx", .irq = 60 },
  1218. { .name = "ovr", .irq = 61 },
  1219. { .name = "common", .irq = 64 },
  1220. { .irq = -1 }
  1221. };
  1222. /* l4_core -> mcbsp1 */
  1223. static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp1 = {
  1224. .master = &omap2430_l4_core_hwmod,
  1225. .slave = &omap2430_mcbsp1_hwmod,
  1226. .clk = "mcbsp1_ick",
  1227. .addr = omap2_mcbsp1_addrs,
  1228. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1229. };
  1230. static struct omap_hwmod omap2430_mcbsp1_hwmod = {
  1231. .name = "mcbsp1",
  1232. .class = &omap2430_mcbsp_hwmod_class,
  1233. .mpu_irqs = omap2430_mcbsp1_irqs,
  1234. .sdma_reqs = omap2_mcbsp1_sdma_reqs,
  1235. .main_clk = "mcbsp1_fck",
  1236. .prcm = {
  1237. .omap2 = {
  1238. .prcm_reg_id = 1,
  1239. .module_bit = OMAP24XX_EN_MCBSP1_SHIFT,
  1240. .module_offs = CORE_MOD,
  1241. .idlest_reg_id = 1,
  1242. .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
  1243. },
  1244. },
  1245. };
  1246. /* mcbsp2 */
  1247. static struct omap_hwmod_irq_info omap2430_mcbsp2_irqs[] = {
  1248. { .name = "tx", .irq = 62 },
  1249. { .name = "rx", .irq = 63 },
  1250. { .name = "common", .irq = 16 },
  1251. { .irq = -1 }
  1252. };
  1253. /* l4_core -> mcbsp2 */
  1254. static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp2 = {
  1255. .master = &omap2430_l4_core_hwmod,
  1256. .slave = &omap2430_mcbsp2_hwmod,
  1257. .clk = "mcbsp2_ick",
  1258. .addr = omap2xxx_mcbsp2_addrs,
  1259. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1260. };
  1261. static struct omap_hwmod omap2430_mcbsp2_hwmod = {
  1262. .name = "mcbsp2",
  1263. .class = &omap2430_mcbsp_hwmod_class,
  1264. .mpu_irqs = omap2430_mcbsp2_irqs,
  1265. .sdma_reqs = omap2_mcbsp2_sdma_reqs,
  1266. .main_clk = "mcbsp2_fck",
  1267. .prcm = {
  1268. .omap2 = {
  1269. .prcm_reg_id = 1,
  1270. .module_bit = OMAP24XX_EN_MCBSP2_SHIFT,
  1271. .module_offs = CORE_MOD,
  1272. .idlest_reg_id = 1,
  1273. .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
  1274. },
  1275. },
  1276. };
  1277. /* mcbsp3 */
  1278. static struct omap_hwmod_irq_info omap2430_mcbsp3_irqs[] = {
  1279. { .name = "tx", .irq = 89 },
  1280. { .name = "rx", .irq = 90 },
  1281. { .name = "common", .irq = 17 },
  1282. { .irq = -1 }
  1283. };
  1284. static struct omap_hwmod_addr_space omap2430_mcbsp3_addrs[] = {
  1285. {
  1286. .name = "mpu",
  1287. .pa_start = 0x4808C000,
  1288. .pa_end = 0x4808C0ff,
  1289. .flags = ADDR_TYPE_RT
  1290. },
  1291. { }
  1292. };
  1293. /* l4_core -> mcbsp3 */
  1294. static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp3 = {
  1295. .master = &omap2430_l4_core_hwmod,
  1296. .slave = &omap2430_mcbsp3_hwmod,
  1297. .clk = "mcbsp3_ick",
  1298. .addr = omap2430_mcbsp3_addrs,
  1299. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1300. };
  1301. static struct omap_hwmod omap2430_mcbsp3_hwmod = {
  1302. .name = "mcbsp3",
  1303. .class = &omap2430_mcbsp_hwmod_class,
  1304. .mpu_irqs = omap2430_mcbsp3_irqs,
  1305. .sdma_reqs = omap2_mcbsp3_sdma_reqs,
  1306. .main_clk = "mcbsp3_fck",
  1307. .prcm = {
  1308. .omap2 = {
  1309. .prcm_reg_id = 1,
  1310. .module_bit = OMAP2430_EN_MCBSP3_SHIFT,
  1311. .module_offs = CORE_MOD,
  1312. .idlest_reg_id = 2,
  1313. .idlest_idle_bit = OMAP2430_ST_MCBSP3_SHIFT,
  1314. },
  1315. },
  1316. };
  1317. /* mcbsp4 */
  1318. static struct omap_hwmod_irq_info omap2430_mcbsp4_irqs[] = {
  1319. { .name = "tx", .irq = 54 },
  1320. { .name = "rx", .irq = 55 },
  1321. { .name = "common", .irq = 18 },
  1322. { .irq = -1 }
  1323. };
  1324. static struct omap_hwmod_dma_info omap2430_mcbsp4_sdma_chs[] = {
  1325. { .name = "rx", .dma_req = 20 },
  1326. { .name = "tx", .dma_req = 19 },
  1327. { .dma_req = -1 }
  1328. };
  1329. static struct omap_hwmod_addr_space omap2430_mcbsp4_addrs[] = {
  1330. {
  1331. .name = "mpu",
  1332. .pa_start = 0x4808E000,
  1333. .pa_end = 0x4808E0ff,
  1334. .flags = ADDR_TYPE_RT
  1335. },
  1336. { }
  1337. };
  1338. /* l4_core -> mcbsp4 */
  1339. static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp4 = {
  1340. .master = &omap2430_l4_core_hwmod,
  1341. .slave = &omap2430_mcbsp4_hwmod,
  1342. .clk = "mcbsp4_ick",
  1343. .addr = omap2430_mcbsp4_addrs,
  1344. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1345. };
  1346. static struct omap_hwmod omap2430_mcbsp4_hwmod = {
  1347. .name = "mcbsp4",
  1348. .class = &omap2430_mcbsp_hwmod_class,
  1349. .mpu_irqs = omap2430_mcbsp4_irqs,
  1350. .sdma_reqs = omap2430_mcbsp4_sdma_chs,
  1351. .main_clk = "mcbsp4_fck",
  1352. .prcm = {
  1353. .omap2 = {
  1354. .prcm_reg_id = 1,
  1355. .module_bit = OMAP2430_EN_MCBSP4_SHIFT,
  1356. .module_offs = CORE_MOD,
  1357. .idlest_reg_id = 2,
  1358. .idlest_idle_bit = OMAP2430_ST_MCBSP4_SHIFT,
  1359. },
  1360. },
  1361. };
  1362. /* mcbsp5 */
  1363. static struct omap_hwmod_irq_info omap2430_mcbsp5_irqs[] = {
  1364. { .name = "tx", .irq = 81 },
  1365. { .name = "rx", .irq = 82 },
  1366. { .name = "common", .irq = 19 },
  1367. { .irq = -1 }
  1368. };
  1369. static struct omap_hwmod_dma_info omap2430_mcbsp5_sdma_chs[] = {
  1370. { .name = "rx", .dma_req = 22 },
  1371. { .name = "tx", .dma_req = 21 },
  1372. { .dma_req = -1 }
  1373. };
  1374. static struct omap_hwmod_addr_space omap2430_mcbsp5_addrs[] = {
  1375. {
  1376. .name = "mpu",
  1377. .pa_start = 0x48096000,
  1378. .pa_end = 0x480960ff,
  1379. .flags = ADDR_TYPE_RT
  1380. },
  1381. { }
  1382. };
  1383. /* l4_core -> mcbsp5 */
  1384. static struct omap_hwmod_ocp_if omap2430_l4_core__mcbsp5 = {
  1385. .master = &omap2430_l4_core_hwmod,
  1386. .slave = &omap2430_mcbsp5_hwmod,
  1387. .clk = "mcbsp5_ick",
  1388. .addr = omap2430_mcbsp5_addrs,
  1389. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1390. };
  1391. static struct omap_hwmod omap2430_mcbsp5_hwmod = {
  1392. .name = "mcbsp5",
  1393. .class = &omap2430_mcbsp_hwmod_class,
  1394. .mpu_irqs = omap2430_mcbsp5_irqs,
  1395. .sdma_reqs = omap2430_mcbsp5_sdma_chs,
  1396. .main_clk = "mcbsp5_fck",
  1397. .prcm = {
  1398. .omap2 = {
  1399. .prcm_reg_id = 1,
  1400. .module_bit = OMAP2430_EN_MCBSP5_SHIFT,
  1401. .module_offs = CORE_MOD,
  1402. .idlest_reg_id = 2,
  1403. .idlest_idle_bit = OMAP2430_ST_MCBSP5_SHIFT,
  1404. },
  1405. },
  1406. };
  1407. /* MMC/SD/SDIO common */
  1408. static struct omap_hwmod_class_sysconfig omap2430_mmc_sysc = {
  1409. .rev_offs = 0x1fc,
  1410. .sysc_offs = 0x10,
  1411. .syss_offs = 0x14,
  1412. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1413. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1414. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  1415. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1416. .sysc_fields = &omap_hwmod_sysc_type1,
  1417. };
  1418. static struct omap_hwmod_class omap2430_mmc_class = {
  1419. .name = "mmc",
  1420. .sysc = &omap2430_mmc_sysc,
  1421. };
  1422. /* MMC/SD/SDIO1 */
  1423. static struct omap_hwmod_irq_info omap2430_mmc1_mpu_irqs[] = {
  1424. { .irq = 83 },
  1425. { .irq = -1 }
  1426. };
  1427. static struct omap_hwmod_dma_info omap2430_mmc1_sdma_reqs[] = {
  1428. { .name = "tx", .dma_req = 61 }, /* DMA_MMC1_TX */
  1429. { .name = "rx", .dma_req = 62 }, /* DMA_MMC1_RX */
  1430. { .dma_req = -1 }
  1431. };
  1432. static struct omap_hwmod_opt_clk omap2430_mmc1_opt_clks[] = {
  1433. { .role = "dbck", .clk = "mmchsdb1_fck" },
  1434. };
  1435. static struct omap_mmc_dev_attr mmc1_dev_attr = {
  1436. .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
  1437. };
  1438. static struct omap_hwmod omap2430_mmc1_hwmod = {
  1439. .name = "mmc1",
  1440. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1441. .mpu_irqs = omap2430_mmc1_mpu_irqs,
  1442. .sdma_reqs = omap2430_mmc1_sdma_reqs,
  1443. .opt_clks = omap2430_mmc1_opt_clks,
  1444. .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc1_opt_clks),
  1445. .main_clk = "mmchs1_fck",
  1446. .prcm = {
  1447. .omap2 = {
  1448. .module_offs = CORE_MOD,
  1449. .prcm_reg_id = 2,
  1450. .module_bit = OMAP2430_EN_MMCHS1_SHIFT,
  1451. .idlest_reg_id = 2,
  1452. .idlest_idle_bit = OMAP2430_ST_MMCHS1_SHIFT,
  1453. },
  1454. },
  1455. .dev_attr = &mmc1_dev_attr,
  1456. .class = &omap2430_mmc_class,
  1457. };
  1458. /* MMC/SD/SDIO2 */
  1459. static struct omap_hwmod_irq_info omap2430_mmc2_mpu_irqs[] = {
  1460. { .irq = 86 },
  1461. { .irq = -1 }
  1462. };
  1463. static struct omap_hwmod_dma_info omap2430_mmc2_sdma_reqs[] = {
  1464. { .name = "tx", .dma_req = 47 }, /* DMA_MMC2_TX */
  1465. { .name = "rx", .dma_req = 48 }, /* DMA_MMC2_RX */
  1466. { .dma_req = -1 }
  1467. };
  1468. static struct omap_hwmod_opt_clk omap2430_mmc2_opt_clks[] = {
  1469. { .role = "dbck", .clk = "mmchsdb2_fck" },
  1470. };
  1471. static struct omap_hwmod omap2430_mmc2_hwmod = {
  1472. .name = "mmc2",
  1473. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1474. .mpu_irqs = omap2430_mmc2_mpu_irqs,
  1475. .sdma_reqs = omap2430_mmc2_sdma_reqs,
  1476. .opt_clks = omap2430_mmc2_opt_clks,
  1477. .opt_clks_cnt = ARRAY_SIZE(omap2430_mmc2_opt_clks),
  1478. .main_clk = "mmchs2_fck",
  1479. .prcm = {
  1480. .omap2 = {
  1481. .module_offs = CORE_MOD,
  1482. .prcm_reg_id = 2,
  1483. .module_bit = OMAP2430_EN_MMCHS2_SHIFT,
  1484. .idlest_reg_id = 2,
  1485. .idlest_idle_bit = OMAP2430_ST_MMCHS2_SHIFT,
  1486. },
  1487. },
  1488. .class = &omap2430_mmc_class,
  1489. };
  1490. static struct omap_hwmod_ocp_if *omap2430_hwmod_ocp_ifs[] __initdata = {
  1491. &omap2430_l3_main__l4_core,
  1492. &omap2430_mpu__l3_main,
  1493. &omap2430_dss__l3,
  1494. &omap2430_usbhsotg__l3,
  1495. &omap2430_l4_core__i2c1,
  1496. &omap2430_l4_core__i2c2,
  1497. &omap2430_l4_core__l4_wkup,
  1498. &omap2_l4_core__uart1,
  1499. &omap2_l4_core__uart2,
  1500. &omap2_l4_core__uart3,
  1501. &omap2430_l4_core__usbhsotg,
  1502. &omap2430_l4_core__mmc1,
  1503. &omap2430_l4_core__mmc2,
  1504. &omap2430_l4_core__mcspi1,
  1505. &omap2430_l4_core__mcspi2,
  1506. &omap2430_l4_core__mcspi3,
  1507. &omap2430_l3__iva,
  1508. &omap2430_l4_wkup__timer1,
  1509. &omap2430_l4_core__timer2,
  1510. &omap2430_l4_core__timer3,
  1511. &omap2430_l4_core__timer4,
  1512. &omap2430_l4_core__timer5,
  1513. &omap2430_l4_core__timer6,
  1514. &omap2430_l4_core__timer7,
  1515. &omap2430_l4_core__timer8,
  1516. &omap2430_l4_core__timer9,
  1517. &omap2430_l4_core__timer10,
  1518. &omap2430_l4_core__timer11,
  1519. &omap2430_l4_core__timer12,
  1520. &omap2430_l4_wkup__wd_timer2,
  1521. &omap2430_l4_core__dss,
  1522. &omap2430_l4_core__dss_dispc,
  1523. &omap2430_l4_core__dss_rfbi,
  1524. &omap2430_l4_core__dss_venc,
  1525. &omap2430_l4_wkup__gpio1,
  1526. &omap2430_l4_wkup__gpio2,
  1527. &omap2430_l4_wkup__gpio3,
  1528. &omap2430_l4_wkup__gpio4,
  1529. &omap2430_l4_core__gpio5,
  1530. &omap2430_dma_system__l3,
  1531. &omap2430_l4_core__dma_system,
  1532. &omap2430_l4_core__mailbox,
  1533. &omap2430_l4_core__mcbsp1,
  1534. &omap2430_l4_core__mcbsp2,
  1535. &omap2430_l4_core__mcbsp3,
  1536. &omap2430_l4_core__mcbsp4,
  1537. &omap2430_l4_core__mcbsp5,
  1538. NULL,
  1539. };
  1540. int __init omap2430_hwmod_init(void)
  1541. {
  1542. return omap_hwmod_register_links(omap2430_hwmod_ocp_ifs);
  1543. }