omap_hwmod_2420_data.c 45 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778
  1. /*
  2. * omap_hwmod_2420_data.c - hardware modules present on the OMAP2420 chips
  3. *
  4. * Copyright (C) 2009-2011 Nokia Corporation
  5. * Paul Walmsley
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. *
  11. * XXX handle crossbar/shared link difference for L3?
  12. * XXX these should be marked initdata for multi-OMAP kernels
  13. */
  14. #include <plat/omap_hwmod.h>
  15. #include <mach/irqs.h>
  16. #include <plat/cpu.h>
  17. #include <plat/dma.h>
  18. #include <plat/serial.h>
  19. #include <plat/i2c.h>
  20. #include <plat/gpio.h>
  21. #include <plat/mcspi.h>
  22. #include <plat/dmtimer.h>
  23. #include <plat/l3_2xxx.h>
  24. #include <plat/l4_2xxx.h>
  25. #include "omap_hwmod_common_data.h"
  26. #include "cm-regbits-24xx.h"
  27. #include "prm-regbits-24xx.h"
  28. #include "wd_timer.h"
  29. /*
  30. * OMAP2420 hardware module integration data
  31. *
  32. * ALl of the data in this section should be autogeneratable from the
  33. * TI hardware database or other technical documentation. Data that
  34. * is driver-specific or driver-kernel integration-specific belongs
  35. * elsewhere.
  36. */
  37. static struct omap_hwmod omap2420_mpu_hwmod;
  38. static struct omap_hwmod omap2420_iva_hwmod;
  39. static struct omap_hwmod omap2420_l3_main_hwmod;
  40. static struct omap_hwmod omap2420_l4_core_hwmod;
  41. static struct omap_hwmod omap2420_dss_core_hwmod;
  42. static struct omap_hwmod omap2420_dss_dispc_hwmod;
  43. static struct omap_hwmod omap2420_dss_rfbi_hwmod;
  44. static struct omap_hwmod omap2420_dss_venc_hwmod;
  45. static struct omap_hwmod omap2420_wd_timer2_hwmod;
  46. static struct omap_hwmod omap2420_gpio1_hwmod;
  47. static struct omap_hwmod omap2420_gpio2_hwmod;
  48. static struct omap_hwmod omap2420_gpio3_hwmod;
  49. static struct omap_hwmod omap2420_gpio4_hwmod;
  50. static struct omap_hwmod omap2420_dma_system_hwmod;
  51. static struct omap_hwmod omap2420_mcspi1_hwmod;
  52. static struct omap_hwmod omap2420_mcspi2_hwmod;
  53. /* L3 -> L4_CORE interface */
  54. static struct omap_hwmod_ocp_if omap2420_l3_main__l4_core = {
  55. .master = &omap2420_l3_main_hwmod,
  56. .slave = &omap2420_l4_core_hwmod,
  57. .user = OCP_USER_MPU | OCP_USER_SDMA,
  58. };
  59. /* MPU -> L3 interface */
  60. static struct omap_hwmod_ocp_if omap2420_mpu__l3_main = {
  61. .master = &omap2420_mpu_hwmod,
  62. .slave = &omap2420_l3_main_hwmod,
  63. .user = OCP_USER_MPU,
  64. };
  65. /* Slave interfaces on the L3 interconnect */
  66. static struct omap_hwmod_ocp_if *omap2420_l3_main_slaves[] = {
  67. &omap2420_mpu__l3_main,
  68. };
  69. /* DSS -> l3 */
  70. static struct omap_hwmod_ocp_if omap2420_dss__l3 = {
  71. .master = &omap2420_dss_core_hwmod,
  72. .slave = &omap2420_l3_main_hwmod,
  73. .fw = {
  74. .omap2 = {
  75. .l3_perm_bit = OMAP2_L3_CORE_FW_CONNID_DSS,
  76. .flags = OMAP_FIREWALL_L3,
  77. }
  78. },
  79. .user = OCP_USER_MPU | OCP_USER_SDMA,
  80. };
  81. /* Master interfaces on the L3 interconnect */
  82. static struct omap_hwmod_ocp_if *omap2420_l3_main_masters[] = {
  83. &omap2420_l3_main__l4_core,
  84. };
  85. /* L3 */
  86. static struct omap_hwmod omap2420_l3_main_hwmod = {
  87. .name = "l3_main",
  88. .class = &l3_hwmod_class,
  89. .masters = omap2420_l3_main_masters,
  90. .masters_cnt = ARRAY_SIZE(omap2420_l3_main_masters),
  91. .slaves = omap2420_l3_main_slaves,
  92. .slaves_cnt = ARRAY_SIZE(omap2420_l3_main_slaves),
  93. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  94. .flags = HWMOD_NO_IDLEST,
  95. };
  96. static struct omap_hwmod omap2420_l4_wkup_hwmod;
  97. static struct omap_hwmod omap2420_uart1_hwmod;
  98. static struct omap_hwmod omap2420_uart2_hwmod;
  99. static struct omap_hwmod omap2420_uart3_hwmod;
  100. static struct omap_hwmod omap2420_i2c1_hwmod;
  101. static struct omap_hwmod omap2420_i2c2_hwmod;
  102. static struct omap_hwmod omap2420_mcbsp1_hwmod;
  103. static struct omap_hwmod omap2420_mcbsp2_hwmod;
  104. /* l4 core -> mcspi1 interface */
  105. static struct omap_hwmod_ocp_if omap2420_l4_core__mcspi1 = {
  106. .master = &omap2420_l4_core_hwmod,
  107. .slave = &omap2420_mcspi1_hwmod,
  108. .clk = "mcspi1_ick",
  109. .addr = omap2_mcspi1_addr_space,
  110. .user = OCP_USER_MPU | OCP_USER_SDMA,
  111. };
  112. /* l4 core -> mcspi2 interface */
  113. static struct omap_hwmod_ocp_if omap2420_l4_core__mcspi2 = {
  114. .master = &omap2420_l4_core_hwmod,
  115. .slave = &omap2420_mcspi2_hwmod,
  116. .clk = "mcspi2_ick",
  117. .addr = omap2_mcspi2_addr_space,
  118. .user = OCP_USER_MPU | OCP_USER_SDMA,
  119. };
  120. /* L4_CORE -> L4_WKUP interface */
  121. static struct omap_hwmod_ocp_if omap2420_l4_core__l4_wkup = {
  122. .master = &omap2420_l4_core_hwmod,
  123. .slave = &omap2420_l4_wkup_hwmod,
  124. .user = OCP_USER_MPU | OCP_USER_SDMA,
  125. };
  126. /* L4 CORE -> UART1 interface */
  127. static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = {
  128. .master = &omap2420_l4_core_hwmod,
  129. .slave = &omap2420_uart1_hwmod,
  130. .clk = "uart1_ick",
  131. .addr = omap2xxx_uart1_addr_space,
  132. .user = OCP_USER_MPU | OCP_USER_SDMA,
  133. };
  134. /* L4 CORE -> UART2 interface */
  135. static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = {
  136. .master = &omap2420_l4_core_hwmod,
  137. .slave = &omap2420_uart2_hwmod,
  138. .clk = "uart2_ick",
  139. .addr = omap2xxx_uart2_addr_space,
  140. .user = OCP_USER_MPU | OCP_USER_SDMA,
  141. };
  142. /* L4 PER -> UART3 interface */
  143. static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = {
  144. .master = &omap2420_l4_core_hwmod,
  145. .slave = &omap2420_uart3_hwmod,
  146. .clk = "uart3_ick",
  147. .addr = omap2xxx_uart3_addr_space,
  148. .user = OCP_USER_MPU | OCP_USER_SDMA,
  149. };
  150. /* L4 CORE -> I2C1 interface */
  151. static struct omap_hwmod_ocp_if omap2420_l4_core__i2c1 = {
  152. .master = &omap2420_l4_core_hwmod,
  153. .slave = &omap2420_i2c1_hwmod,
  154. .clk = "i2c1_ick",
  155. .addr = omap2_i2c1_addr_space,
  156. .user = OCP_USER_MPU | OCP_USER_SDMA,
  157. };
  158. /* L4 CORE -> I2C2 interface */
  159. static struct omap_hwmod_ocp_if omap2420_l4_core__i2c2 = {
  160. .master = &omap2420_l4_core_hwmod,
  161. .slave = &omap2420_i2c2_hwmod,
  162. .clk = "i2c2_ick",
  163. .addr = omap2_i2c2_addr_space,
  164. .user = OCP_USER_MPU | OCP_USER_SDMA,
  165. };
  166. /* Slave interfaces on the L4_CORE interconnect */
  167. static struct omap_hwmod_ocp_if *omap2420_l4_core_slaves[] = {
  168. &omap2420_l3_main__l4_core,
  169. };
  170. /* Master interfaces on the L4_CORE interconnect */
  171. static struct omap_hwmod_ocp_if *omap2420_l4_core_masters[] = {
  172. &omap2420_l4_core__l4_wkup,
  173. &omap2_l4_core__uart1,
  174. &omap2_l4_core__uart2,
  175. &omap2_l4_core__uart3,
  176. &omap2420_l4_core__i2c1,
  177. &omap2420_l4_core__i2c2
  178. };
  179. /* L4 CORE */
  180. static struct omap_hwmod omap2420_l4_core_hwmod = {
  181. .name = "l4_core",
  182. .class = &l4_hwmod_class,
  183. .masters = omap2420_l4_core_masters,
  184. .masters_cnt = ARRAY_SIZE(omap2420_l4_core_masters),
  185. .slaves = omap2420_l4_core_slaves,
  186. .slaves_cnt = ARRAY_SIZE(omap2420_l4_core_slaves),
  187. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  188. .flags = HWMOD_NO_IDLEST,
  189. };
  190. /* Slave interfaces on the L4_WKUP interconnect */
  191. static struct omap_hwmod_ocp_if *omap2420_l4_wkup_slaves[] = {
  192. &omap2420_l4_core__l4_wkup,
  193. };
  194. /* Master interfaces on the L4_WKUP interconnect */
  195. static struct omap_hwmod_ocp_if *omap2420_l4_wkup_masters[] = {
  196. };
  197. /* L4 WKUP */
  198. static struct omap_hwmod omap2420_l4_wkup_hwmod = {
  199. .name = "l4_wkup",
  200. .class = &l4_hwmod_class,
  201. .masters = omap2420_l4_wkup_masters,
  202. .masters_cnt = ARRAY_SIZE(omap2420_l4_wkup_masters),
  203. .slaves = omap2420_l4_wkup_slaves,
  204. .slaves_cnt = ARRAY_SIZE(omap2420_l4_wkup_slaves),
  205. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  206. .flags = HWMOD_NO_IDLEST,
  207. };
  208. /* Master interfaces on the MPU device */
  209. static struct omap_hwmod_ocp_if *omap2420_mpu_masters[] = {
  210. &omap2420_mpu__l3_main,
  211. };
  212. /* MPU */
  213. static struct omap_hwmod omap2420_mpu_hwmod = {
  214. .name = "mpu",
  215. .class = &mpu_hwmod_class,
  216. .main_clk = "mpu_ck",
  217. .masters = omap2420_mpu_masters,
  218. .masters_cnt = ARRAY_SIZE(omap2420_mpu_masters),
  219. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  220. };
  221. /*
  222. * IVA1 interface data
  223. */
  224. /* IVA <- L3 interface */
  225. static struct omap_hwmod_ocp_if omap2420_l3__iva = {
  226. .master = &omap2420_l3_main_hwmod,
  227. .slave = &omap2420_iva_hwmod,
  228. .clk = "iva1_ifck",
  229. .user = OCP_USER_MPU | OCP_USER_SDMA,
  230. };
  231. static struct omap_hwmod_ocp_if *omap2420_iva_masters[] = {
  232. &omap2420_l3__iva,
  233. };
  234. /*
  235. * IVA2 (IVA2)
  236. */
  237. static struct omap_hwmod omap2420_iva_hwmod = {
  238. .name = "iva",
  239. .class = &iva_hwmod_class,
  240. .masters = omap2420_iva_masters,
  241. .masters_cnt = ARRAY_SIZE(omap2420_iva_masters),
  242. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
  243. };
  244. /* Timer Common */
  245. static struct omap_hwmod_class_sysconfig omap2420_timer_sysc = {
  246. .rev_offs = 0x0000,
  247. .sysc_offs = 0x0010,
  248. .syss_offs = 0x0014,
  249. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
  250. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  251. SYSC_HAS_AUTOIDLE),
  252. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  253. .sysc_fields = &omap_hwmod_sysc_type1,
  254. };
  255. static struct omap_hwmod_class omap2420_timer_hwmod_class = {
  256. .name = "timer",
  257. .sysc = &omap2420_timer_sysc,
  258. .rev = OMAP_TIMER_IP_VERSION_1,
  259. };
  260. /* timer1 */
  261. static struct omap_hwmod omap2420_timer1_hwmod;
  262. static struct omap_hwmod_addr_space omap2420_timer1_addrs[] = {
  263. {
  264. .pa_start = 0x48028000,
  265. .pa_end = 0x48028000 + SZ_1K - 1,
  266. .flags = ADDR_TYPE_RT
  267. },
  268. { }
  269. };
  270. /* l4_wkup -> timer1 */
  271. static struct omap_hwmod_ocp_if omap2420_l4_wkup__timer1 = {
  272. .master = &omap2420_l4_wkup_hwmod,
  273. .slave = &omap2420_timer1_hwmod,
  274. .clk = "gpt1_ick",
  275. .addr = omap2420_timer1_addrs,
  276. .user = OCP_USER_MPU | OCP_USER_SDMA,
  277. };
  278. /* timer1 slave port */
  279. static struct omap_hwmod_ocp_if *omap2420_timer1_slaves[] = {
  280. &omap2420_l4_wkup__timer1,
  281. };
  282. /* timer1 hwmod */
  283. static struct omap_hwmod omap2420_timer1_hwmod = {
  284. .name = "timer1",
  285. .mpu_irqs = omap2_timer1_mpu_irqs,
  286. .main_clk = "gpt1_fck",
  287. .prcm = {
  288. .omap2 = {
  289. .prcm_reg_id = 1,
  290. .module_bit = OMAP24XX_EN_GPT1_SHIFT,
  291. .module_offs = WKUP_MOD,
  292. .idlest_reg_id = 1,
  293. .idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT,
  294. },
  295. },
  296. .slaves = omap2420_timer1_slaves,
  297. .slaves_cnt = ARRAY_SIZE(omap2420_timer1_slaves),
  298. .class = &omap2420_timer_hwmod_class,
  299. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
  300. };
  301. /* timer2 */
  302. static struct omap_hwmod omap2420_timer2_hwmod;
  303. /* l4_core -> timer2 */
  304. static struct omap_hwmod_ocp_if omap2420_l4_core__timer2 = {
  305. .master = &omap2420_l4_core_hwmod,
  306. .slave = &omap2420_timer2_hwmod,
  307. .clk = "gpt2_ick",
  308. .addr = omap2xxx_timer2_addrs,
  309. .user = OCP_USER_MPU | OCP_USER_SDMA,
  310. };
  311. /* timer2 slave port */
  312. static struct omap_hwmod_ocp_if *omap2420_timer2_slaves[] = {
  313. &omap2420_l4_core__timer2,
  314. };
  315. /* timer2 hwmod */
  316. static struct omap_hwmod omap2420_timer2_hwmod = {
  317. .name = "timer2",
  318. .mpu_irqs = omap2_timer2_mpu_irqs,
  319. .main_clk = "gpt2_fck",
  320. .prcm = {
  321. .omap2 = {
  322. .prcm_reg_id = 1,
  323. .module_bit = OMAP24XX_EN_GPT2_SHIFT,
  324. .module_offs = CORE_MOD,
  325. .idlest_reg_id = 1,
  326. .idlest_idle_bit = OMAP24XX_ST_GPT2_SHIFT,
  327. },
  328. },
  329. .slaves = omap2420_timer2_slaves,
  330. .slaves_cnt = ARRAY_SIZE(omap2420_timer2_slaves),
  331. .class = &omap2420_timer_hwmod_class,
  332. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
  333. };
  334. /* timer3 */
  335. static struct omap_hwmod omap2420_timer3_hwmod;
  336. /* l4_core -> timer3 */
  337. static struct omap_hwmod_ocp_if omap2420_l4_core__timer3 = {
  338. .master = &omap2420_l4_core_hwmod,
  339. .slave = &omap2420_timer3_hwmod,
  340. .clk = "gpt3_ick",
  341. .addr = omap2xxx_timer3_addrs,
  342. .user = OCP_USER_MPU | OCP_USER_SDMA,
  343. };
  344. /* timer3 slave port */
  345. static struct omap_hwmod_ocp_if *omap2420_timer3_slaves[] = {
  346. &omap2420_l4_core__timer3,
  347. };
  348. /* timer3 hwmod */
  349. static struct omap_hwmod omap2420_timer3_hwmod = {
  350. .name = "timer3",
  351. .mpu_irqs = omap2_timer3_mpu_irqs,
  352. .main_clk = "gpt3_fck",
  353. .prcm = {
  354. .omap2 = {
  355. .prcm_reg_id = 1,
  356. .module_bit = OMAP24XX_EN_GPT3_SHIFT,
  357. .module_offs = CORE_MOD,
  358. .idlest_reg_id = 1,
  359. .idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT,
  360. },
  361. },
  362. .slaves = omap2420_timer3_slaves,
  363. .slaves_cnt = ARRAY_SIZE(omap2420_timer3_slaves),
  364. .class = &omap2420_timer_hwmod_class,
  365. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
  366. };
  367. /* timer4 */
  368. static struct omap_hwmod omap2420_timer4_hwmod;
  369. /* l4_core -> timer4 */
  370. static struct omap_hwmod_ocp_if omap2420_l4_core__timer4 = {
  371. .master = &omap2420_l4_core_hwmod,
  372. .slave = &omap2420_timer4_hwmod,
  373. .clk = "gpt4_ick",
  374. .addr = omap2xxx_timer4_addrs,
  375. .user = OCP_USER_MPU | OCP_USER_SDMA,
  376. };
  377. /* timer4 slave port */
  378. static struct omap_hwmod_ocp_if *omap2420_timer4_slaves[] = {
  379. &omap2420_l4_core__timer4,
  380. };
  381. /* timer4 hwmod */
  382. static struct omap_hwmod omap2420_timer4_hwmod = {
  383. .name = "timer4",
  384. .mpu_irqs = omap2_timer4_mpu_irqs,
  385. .main_clk = "gpt4_fck",
  386. .prcm = {
  387. .omap2 = {
  388. .prcm_reg_id = 1,
  389. .module_bit = OMAP24XX_EN_GPT4_SHIFT,
  390. .module_offs = CORE_MOD,
  391. .idlest_reg_id = 1,
  392. .idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT,
  393. },
  394. },
  395. .slaves = omap2420_timer4_slaves,
  396. .slaves_cnt = ARRAY_SIZE(omap2420_timer4_slaves),
  397. .class = &omap2420_timer_hwmod_class,
  398. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
  399. };
  400. /* timer5 */
  401. static struct omap_hwmod omap2420_timer5_hwmod;
  402. /* l4_core -> timer5 */
  403. static struct omap_hwmod_ocp_if omap2420_l4_core__timer5 = {
  404. .master = &omap2420_l4_core_hwmod,
  405. .slave = &omap2420_timer5_hwmod,
  406. .clk = "gpt5_ick",
  407. .addr = omap2xxx_timer5_addrs,
  408. .user = OCP_USER_MPU | OCP_USER_SDMA,
  409. };
  410. /* timer5 slave port */
  411. static struct omap_hwmod_ocp_if *omap2420_timer5_slaves[] = {
  412. &omap2420_l4_core__timer5,
  413. };
  414. /* timer5 hwmod */
  415. static struct omap_hwmod omap2420_timer5_hwmod = {
  416. .name = "timer5",
  417. .mpu_irqs = omap2_timer5_mpu_irqs,
  418. .main_clk = "gpt5_fck",
  419. .prcm = {
  420. .omap2 = {
  421. .prcm_reg_id = 1,
  422. .module_bit = OMAP24XX_EN_GPT5_SHIFT,
  423. .module_offs = CORE_MOD,
  424. .idlest_reg_id = 1,
  425. .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT,
  426. },
  427. },
  428. .slaves = omap2420_timer5_slaves,
  429. .slaves_cnt = ARRAY_SIZE(omap2420_timer5_slaves),
  430. .class = &omap2420_timer_hwmod_class,
  431. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
  432. };
  433. /* timer6 */
  434. static struct omap_hwmod omap2420_timer6_hwmod;
  435. /* l4_core -> timer6 */
  436. static struct omap_hwmod_ocp_if omap2420_l4_core__timer6 = {
  437. .master = &omap2420_l4_core_hwmod,
  438. .slave = &omap2420_timer6_hwmod,
  439. .clk = "gpt6_ick",
  440. .addr = omap2xxx_timer6_addrs,
  441. .user = OCP_USER_MPU | OCP_USER_SDMA,
  442. };
  443. /* timer6 slave port */
  444. static struct omap_hwmod_ocp_if *omap2420_timer6_slaves[] = {
  445. &omap2420_l4_core__timer6,
  446. };
  447. /* timer6 hwmod */
  448. static struct omap_hwmod omap2420_timer6_hwmod = {
  449. .name = "timer6",
  450. .mpu_irqs = omap2_timer6_mpu_irqs,
  451. .main_clk = "gpt6_fck",
  452. .prcm = {
  453. .omap2 = {
  454. .prcm_reg_id = 1,
  455. .module_bit = OMAP24XX_EN_GPT6_SHIFT,
  456. .module_offs = CORE_MOD,
  457. .idlest_reg_id = 1,
  458. .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT,
  459. },
  460. },
  461. .slaves = omap2420_timer6_slaves,
  462. .slaves_cnt = ARRAY_SIZE(omap2420_timer6_slaves),
  463. .class = &omap2420_timer_hwmod_class,
  464. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
  465. };
  466. /* timer7 */
  467. static struct omap_hwmod omap2420_timer7_hwmod;
  468. /* l4_core -> timer7 */
  469. static struct omap_hwmod_ocp_if omap2420_l4_core__timer7 = {
  470. .master = &omap2420_l4_core_hwmod,
  471. .slave = &omap2420_timer7_hwmod,
  472. .clk = "gpt7_ick",
  473. .addr = omap2xxx_timer7_addrs,
  474. .user = OCP_USER_MPU | OCP_USER_SDMA,
  475. };
  476. /* timer7 slave port */
  477. static struct omap_hwmod_ocp_if *omap2420_timer7_slaves[] = {
  478. &omap2420_l4_core__timer7,
  479. };
  480. /* timer7 hwmod */
  481. static struct omap_hwmod omap2420_timer7_hwmod = {
  482. .name = "timer7",
  483. .mpu_irqs = omap2_timer7_mpu_irqs,
  484. .main_clk = "gpt7_fck",
  485. .prcm = {
  486. .omap2 = {
  487. .prcm_reg_id = 1,
  488. .module_bit = OMAP24XX_EN_GPT7_SHIFT,
  489. .module_offs = CORE_MOD,
  490. .idlest_reg_id = 1,
  491. .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT,
  492. },
  493. },
  494. .slaves = omap2420_timer7_slaves,
  495. .slaves_cnt = ARRAY_SIZE(omap2420_timer7_slaves),
  496. .class = &omap2420_timer_hwmod_class,
  497. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
  498. };
  499. /* timer8 */
  500. static struct omap_hwmod omap2420_timer8_hwmod;
  501. /* l4_core -> timer8 */
  502. static struct omap_hwmod_ocp_if omap2420_l4_core__timer8 = {
  503. .master = &omap2420_l4_core_hwmod,
  504. .slave = &omap2420_timer8_hwmod,
  505. .clk = "gpt8_ick",
  506. .addr = omap2xxx_timer8_addrs,
  507. .user = OCP_USER_MPU | OCP_USER_SDMA,
  508. };
  509. /* timer8 slave port */
  510. static struct omap_hwmod_ocp_if *omap2420_timer8_slaves[] = {
  511. &omap2420_l4_core__timer8,
  512. };
  513. /* timer8 hwmod */
  514. static struct omap_hwmod omap2420_timer8_hwmod = {
  515. .name = "timer8",
  516. .mpu_irqs = omap2_timer8_mpu_irqs,
  517. .main_clk = "gpt8_fck",
  518. .prcm = {
  519. .omap2 = {
  520. .prcm_reg_id = 1,
  521. .module_bit = OMAP24XX_EN_GPT8_SHIFT,
  522. .module_offs = CORE_MOD,
  523. .idlest_reg_id = 1,
  524. .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT,
  525. },
  526. },
  527. .slaves = omap2420_timer8_slaves,
  528. .slaves_cnt = ARRAY_SIZE(omap2420_timer8_slaves),
  529. .class = &omap2420_timer_hwmod_class,
  530. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
  531. };
  532. /* timer9 */
  533. static struct omap_hwmod omap2420_timer9_hwmod;
  534. /* l4_core -> timer9 */
  535. static struct omap_hwmod_ocp_if omap2420_l4_core__timer9 = {
  536. .master = &omap2420_l4_core_hwmod,
  537. .slave = &omap2420_timer9_hwmod,
  538. .clk = "gpt9_ick",
  539. .addr = omap2xxx_timer9_addrs,
  540. .user = OCP_USER_MPU | OCP_USER_SDMA,
  541. };
  542. /* timer9 slave port */
  543. static struct omap_hwmod_ocp_if *omap2420_timer9_slaves[] = {
  544. &omap2420_l4_core__timer9,
  545. };
  546. /* timer9 hwmod */
  547. static struct omap_hwmod omap2420_timer9_hwmod = {
  548. .name = "timer9",
  549. .mpu_irqs = omap2_timer9_mpu_irqs,
  550. .main_clk = "gpt9_fck",
  551. .prcm = {
  552. .omap2 = {
  553. .prcm_reg_id = 1,
  554. .module_bit = OMAP24XX_EN_GPT9_SHIFT,
  555. .module_offs = CORE_MOD,
  556. .idlest_reg_id = 1,
  557. .idlest_idle_bit = OMAP24XX_ST_GPT9_SHIFT,
  558. },
  559. },
  560. .slaves = omap2420_timer9_slaves,
  561. .slaves_cnt = ARRAY_SIZE(omap2420_timer9_slaves),
  562. .class = &omap2420_timer_hwmod_class,
  563. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
  564. };
  565. /* timer10 */
  566. static struct omap_hwmod omap2420_timer10_hwmod;
  567. /* l4_core -> timer10 */
  568. static struct omap_hwmod_ocp_if omap2420_l4_core__timer10 = {
  569. .master = &omap2420_l4_core_hwmod,
  570. .slave = &omap2420_timer10_hwmod,
  571. .clk = "gpt10_ick",
  572. .addr = omap2_timer10_addrs,
  573. .user = OCP_USER_MPU | OCP_USER_SDMA,
  574. };
  575. /* timer10 slave port */
  576. static struct omap_hwmod_ocp_if *omap2420_timer10_slaves[] = {
  577. &omap2420_l4_core__timer10,
  578. };
  579. /* timer10 hwmod */
  580. static struct omap_hwmod omap2420_timer10_hwmod = {
  581. .name = "timer10",
  582. .mpu_irqs = omap2_timer10_mpu_irqs,
  583. .main_clk = "gpt10_fck",
  584. .prcm = {
  585. .omap2 = {
  586. .prcm_reg_id = 1,
  587. .module_bit = OMAP24XX_EN_GPT10_SHIFT,
  588. .module_offs = CORE_MOD,
  589. .idlest_reg_id = 1,
  590. .idlest_idle_bit = OMAP24XX_ST_GPT10_SHIFT,
  591. },
  592. },
  593. .slaves = omap2420_timer10_slaves,
  594. .slaves_cnt = ARRAY_SIZE(omap2420_timer10_slaves),
  595. .class = &omap2420_timer_hwmod_class,
  596. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
  597. };
  598. /* timer11 */
  599. static struct omap_hwmod omap2420_timer11_hwmod;
  600. /* l4_core -> timer11 */
  601. static struct omap_hwmod_ocp_if omap2420_l4_core__timer11 = {
  602. .master = &omap2420_l4_core_hwmod,
  603. .slave = &omap2420_timer11_hwmod,
  604. .clk = "gpt11_ick",
  605. .addr = omap2_timer11_addrs,
  606. .user = OCP_USER_MPU | OCP_USER_SDMA,
  607. };
  608. /* timer11 slave port */
  609. static struct omap_hwmod_ocp_if *omap2420_timer11_slaves[] = {
  610. &omap2420_l4_core__timer11,
  611. };
  612. /* timer11 hwmod */
  613. static struct omap_hwmod omap2420_timer11_hwmod = {
  614. .name = "timer11",
  615. .mpu_irqs = omap2_timer11_mpu_irqs,
  616. .main_clk = "gpt11_fck",
  617. .prcm = {
  618. .omap2 = {
  619. .prcm_reg_id = 1,
  620. .module_bit = OMAP24XX_EN_GPT11_SHIFT,
  621. .module_offs = CORE_MOD,
  622. .idlest_reg_id = 1,
  623. .idlest_idle_bit = OMAP24XX_ST_GPT11_SHIFT,
  624. },
  625. },
  626. .slaves = omap2420_timer11_slaves,
  627. .slaves_cnt = ARRAY_SIZE(omap2420_timer11_slaves),
  628. .class = &omap2420_timer_hwmod_class,
  629. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
  630. };
  631. /* timer12 */
  632. static struct omap_hwmod omap2420_timer12_hwmod;
  633. /* l4_core -> timer12 */
  634. static struct omap_hwmod_ocp_if omap2420_l4_core__timer12 = {
  635. .master = &omap2420_l4_core_hwmod,
  636. .slave = &omap2420_timer12_hwmod,
  637. .clk = "gpt12_ick",
  638. .addr = omap2xxx_timer12_addrs,
  639. .user = OCP_USER_MPU | OCP_USER_SDMA,
  640. };
  641. /* timer12 slave port */
  642. static struct omap_hwmod_ocp_if *omap2420_timer12_slaves[] = {
  643. &omap2420_l4_core__timer12,
  644. };
  645. /* timer12 hwmod */
  646. static struct omap_hwmod omap2420_timer12_hwmod = {
  647. .name = "timer12",
  648. .mpu_irqs = omap2xxx_timer12_mpu_irqs,
  649. .main_clk = "gpt12_fck",
  650. .prcm = {
  651. .omap2 = {
  652. .prcm_reg_id = 1,
  653. .module_bit = OMAP24XX_EN_GPT12_SHIFT,
  654. .module_offs = CORE_MOD,
  655. .idlest_reg_id = 1,
  656. .idlest_idle_bit = OMAP24XX_ST_GPT12_SHIFT,
  657. },
  658. },
  659. .slaves = omap2420_timer12_slaves,
  660. .slaves_cnt = ARRAY_SIZE(omap2420_timer12_slaves),
  661. .class = &omap2420_timer_hwmod_class,
  662. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420)
  663. };
  664. /* l4_wkup -> wd_timer2 */
  665. static struct omap_hwmod_addr_space omap2420_wd_timer2_addrs[] = {
  666. {
  667. .pa_start = 0x48022000,
  668. .pa_end = 0x4802207f,
  669. .flags = ADDR_TYPE_RT
  670. },
  671. { }
  672. };
  673. static struct omap_hwmod_ocp_if omap2420_l4_wkup__wd_timer2 = {
  674. .master = &omap2420_l4_wkup_hwmod,
  675. .slave = &omap2420_wd_timer2_hwmod,
  676. .clk = "mpu_wdt_ick",
  677. .addr = omap2420_wd_timer2_addrs,
  678. .user = OCP_USER_MPU | OCP_USER_SDMA,
  679. };
  680. /*
  681. * 'wd_timer' class
  682. * 32-bit watchdog upward counter that generates a pulse on the reset pin on
  683. * overflow condition
  684. */
  685. static struct omap_hwmod_class_sysconfig omap2420_wd_timer_sysc = {
  686. .rev_offs = 0x0000,
  687. .sysc_offs = 0x0010,
  688. .syss_offs = 0x0014,
  689. .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET |
  690. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  691. .sysc_fields = &omap_hwmod_sysc_type1,
  692. };
  693. static struct omap_hwmod_class omap2420_wd_timer_hwmod_class = {
  694. .name = "wd_timer",
  695. .sysc = &omap2420_wd_timer_sysc,
  696. .pre_shutdown = &omap2_wd_timer_disable
  697. };
  698. /* wd_timer2 */
  699. static struct omap_hwmod_ocp_if *omap2420_wd_timer2_slaves[] = {
  700. &omap2420_l4_wkup__wd_timer2,
  701. };
  702. static struct omap_hwmod omap2420_wd_timer2_hwmod = {
  703. .name = "wd_timer2",
  704. .class = &omap2420_wd_timer_hwmod_class,
  705. .main_clk = "mpu_wdt_fck",
  706. .prcm = {
  707. .omap2 = {
  708. .prcm_reg_id = 1,
  709. .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
  710. .module_offs = WKUP_MOD,
  711. .idlest_reg_id = 1,
  712. .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT,
  713. },
  714. },
  715. .slaves = omap2420_wd_timer2_slaves,
  716. .slaves_cnt = ARRAY_SIZE(omap2420_wd_timer2_slaves),
  717. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  718. };
  719. /* UART */
  720. static struct omap_hwmod_class_sysconfig uart_sysc = {
  721. .rev_offs = 0x50,
  722. .sysc_offs = 0x54,
  723. .syss_offs = 0x58,
  724. .sysc_flags = (SYSC_HAS_SIDLEMODE |
  725. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  726. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  727. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  728. .sysc_fields = &omap_hwmod_sysc_type1,
  729. };
  730. static struct omap_hwmod_class uart_class = {
  731. .name = "uart",
  732. .sysc = &uart_sysc,
  733. };
  734. /* UART1 */
  735. static struct omap_hwmod_ocp_if *omap2420_uart1_slaves[] = {
  736. &omap2_l4_core__uart1,
  737. };
  738. static struct omap_hwmod omap2420_uart1_hwmod = {
  739. .name = "uart1",
  740. .mpu_irqs = omap2_uart1_mpu_irqs,
  741. .sdma_reqs = omap2_uart1_sdma_reqs,
  742. .main_clk = "uart1_fck",
  743. .prcm = {
  744. .omap2 = {
  745. .module_offs = CORE_MOD,
  746. .prcm_reg_id = 1,
  747. .module_bit = OMAP24XX_EN_UART1_SHIFT,
  748. .idlest_reg_id = 1,
  749. .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT,
  750. },
  751. },
  752. .slaves = omap2420_uart1_slaves,
  753. .slaves_cnt = ARRAY_SIZE(omap2420_uart1_slaves),
  754. .class = &uart_class,
  755. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  756. };
  757. /* UART2 */
  758. static struct omap_hwmod_ocp_if *omap2420_uart2_slaves[] = {
  759. &omap2_l4_core__uart2,
  760. };
  761. static struct omap_hwmod omap2420_uart2_hwmod = {
  762. .name = "uart2",
  763. .mpu_irqs = omap2_uart2_mpu_irqs,
  764. .sdma_reqs = omap2_uart2_sdma_reqs,
  765. .main_clk = "uart2_fck",
  766. .prcm = {
  767. .omap2 = {
  768. .module_offs = CORE_MOD,
  769. .prcm_reg_id = 1,
  770. .module_bit = OMAP24XX_EN_UART2_SHIFT,
  771. .idlest_reg_id = 1,
  772. .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT,
  773. },
  774. },
  775. .slaves = omap2420_uart2_slaves,
  776. .slaves_cnt = ARRAY_SIZE(omap2420_uart2_slaves),
  777. .class = &uart_class,
  778. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  779. };
  780. /* UART3 */
  781. static struct omap_hwmod_ocp_if *omap2420_uart3_slaves[] = {
  782. &omap2_l4_core__uart3,
  783. };
  784. static struct omap_hwmod omap2420_uart3_hwmod = {
  785. .name = "uart3",
  786. .mpu_irqs = omap2_uart3_mpu_irqs,
  787. .sdma_reqs = omap2_uart3_sdma_reqs,
  788. .main_clk = "uart3_fck",
  789. .prcm = {
  790. .omap2 = {
  791. .module_offs = CORE_MOD,
  792. .prcm_reg_id = 2,
  793. .module_bit = OMAP24XX_EN_UART3_SHIFT,
  794. .idlest_reg_id = 2,
  795. .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT,
  796. },
  797. },
  798. .slaves = omap2420_uart3_slaves,
  799. .slaves_cnt = ARRAY_SIZE(omap2420_uart3_slaves),
  800. .class = &uart_class,
  801. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  802. };
  803. /*
  804. * 'dss' class
  805. * display sub-system
  806. */
  807. static struct omap_hwmod_class_sysconfig omap2420_dss_sysc = {
  808. .rev_offs = 0x0000,
  809. .sysc_offs = 0x0010,
  810. .syss_offs = 0x0014,
  811. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  812. .sysc_fields = &omap_hwmod_sysc_type1,
  813. };
  814. static struct omap_hwmod_class omap2420_dss_hwmod_class = {
  815. .name = "dss",
  816. .sysc = &omap2420_dss_sysc,
  817. };
  818. /* dss */
  819. /* dss master ports */
  820. static struct omap_hwmod_ocp_if *omap2420_dss_masters[] = {
  821. &omap2420_dss__l3,
  822. };
  823. /* l4_core -> dss */
  824. static struct omap_hwmod_ocp_if omap2420_l4_core__dss = {
  825. .master = &omap2420_l4_core_hwmod,
  826. .slave = &omap2420_dss_core_hwmod,
  827. .clk = "dss_ick",
  828. .addr = omap2_dss_addrs,
  829. .fw = {
  830. .omap2 = {
  831. .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION,
  832. .flags = OMAP_FIREWALL_L4,
  833. }
  834. },
  835. .user = OCP_USER_MPU | OCP_USER_SDMA,
  836. };
  837. /* dss slave ports */
  838. static struct omap_hwmod_ocp_if *omap2420_dss_slaves[] = {
  839. &omap2420_l4_core__dss,
  840. };
  841. static struct omap_hwmod_opt_clk dss_opt_clks[] = {
  842. { .role = "tv_clk", .clk = "dss_54m_fck" },
  843. { .role = "sys_clk", .clk = "dss2_fck" },
  844. };
  845. static struct omap_hwmod omap2420_dss_core_hwmod = {
  846. .name = "dss_core",
  847. .class = &omap2420_dss_hwmod_class,
  848. .main_clk = "dss1_fck", /* instead of dss_fck */
  849. .sdma_reqs = omap2xxx_dss_sdma_chs,
  850. .prcm = {
  851. .omap2 = {
  852. .prcm_reg_id = 1,
  853. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  854. .module_offs = CORE_MOD,
  855. .idlest_reg_id = 1,
  856. .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
  857. },
  858. },
  859. .opt_clks = dss_opt_clks,
  860. .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
  861. .slaves = omap2420_dss_slaves,
  862. .slaves_cnt = ARRAY_SIZE(omap2420_dss_slaves),
  863. .masters = omap2420_dss_masters,
  864. .masters_cnt = ARRAY_SIZE(omap2420_dss_masters),
  865. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  866. .flags = HWMOD_NO_IDLEST,
  867. };
  868. /*
  869. * 'dispc' class
  870. * display controller
  871. */
  872. static struct omap_hwmod_class_sysconfig omap2420_dispc_sysc = {
  873. .rev_offs = 0x0000,
  874. .sysc_offs = 0x0010,
  875. .syss_offs = 0x0014,
  876. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
  877. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  878. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  879. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  880. .sysc_fields = &omap_hwmod_sysc_type1,
  881. };
  882. static struct omap_hwmod_class omap2420_dispc_hwmod_class = {
  883. .name = "dispc",
  884. .sysc = &omap2420_dispc_sysc,
  885. };
  886. /* l4_core -> dss_dispc */
  887. static struct omap_hwmod_ocp_if omap2420_l4_core__dss_dispc = {
  888. .master = &omap2420_l4_core_hwmod,
  889. .slave = &omap2420_dss_dispc_hwmod,
  890. .clk = "dss_ick",
  891. .addr = omap2_dss_dispc_addrs,
  892. .fw = {
  893. .omap2 = {
  894. .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_DISPC_REGION,
  895. .flags = OMAP_FIREWALL_L4,
  896. }
  897. },
  898. .user = OCP_USER_MPU | OCP_USER_SDMA,
  899. };
  900. /* dss_dispc slave ports */
  901. static struct omap_hwmod_ocp_if *omap2420_dss_dispc_slaves[] = {
  902. &omap2420_l4_core__dss_dispc,
  903. };
  904. static struct omap_hwmod omap2420_dss_dispc_hwmod = {
  905. .name = "dss_dispc",
  906. .class = &omap2420_dispc_hwmod_class,
  907. .mpu_irqs = omap2_dispc_irqs,
  908. .main_clk = "dss1_fck",
  909. .prcm = {
  910. .omap2 = {
  911. .prcm_reg_id = 1,
  912. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  913. .module_offs = CORE_MOD,
  914. .idlest_reg_id = 1,
  915. .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
  916. },
  917. },
  918. .slaves = omap2420_dss_dispc_slaves,
  919. .slaves_cnt = ARRAY_SIZE(omap2420_dss_dispc_slaves),
  920. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  921. .flags = HWMOD_NO_IDLEST,
  922. };
  923. /*
  924. * 'rfbi' class
  925. * remote frame buffer interface
  926. */
  927. static struct omap_hwmod_class_sysconfig omap2420_rfbi_sysc = {
  928. .rev_offs = 0x0000,
  929. .sysc_offs = 0x0010,
  930. .syss_offs = 0x0014,
  931. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  932. SYSC_HAS_AUTOIDLE),
  933. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  934. .sysc_fields = &omap_hwmod_sysc_type1,
  935. };
  936. static struct omap_hwmod_class omap2420_rfbi_hwmod_class = {
  937. .name = "rfbi",
  938. .sysc = &omap2420_rfbi_sysc,
  939. };
  940. /* l4_core -> dss_rfbi */
  941. static struct omap_hwmod_ocp_if omap2420_l4_core__dss_rfbi = {
  942. .master = &omap2420_l4_core_hwmod,
  943. .slave = &omap2420_dss_rfbi_hwmod,
  944. .clk = "dss_ick",
  945. .addr = omap2_dss_rfbi_addrs,
  946. .fw = {
  947. .omap2 = {
  948. .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_CORE_REGION,
  949. .flags = OMAP_FIREWALL_L4,
  950. }
  951. },
  952. .user = OCP_USER_MPU | OCP_USER_SDMA,
  953. };
  954. /* dss_rfbi slave ports */
  955. static struct omap_hwmod_ocp_if *omap2420_dss_rfbi_slaves[] = {
  956. &omap2420_l4_core__dss_rfbi,
  957. };
  958. static struct omap_hwmod omap2420_dss_rfbi_hwmod = {
  959. .name = "dss_rfbi",
  960. .class = &omap2420_rfbi_hwmod_class,
  961. .main_clk = "dss1_fck",
  962. .prcm = {
  963. .omap2 = {
  964. .prcm_reg_id = 1,
  965. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  966. .module_offs = CORE_MOD,
  967. },
  968. },
  969. .slaves = omap2420_dss_rfbi_slaves,
  970. .slaves_cnt = ARRAY_SIZE(omap2420_dss_rfbi_slaves),
  971. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  972. .flags = HWMOD_NO_IDLEST,
  973. };
  974. /*
  975. * 'venc' class
  976. * video encoder
  977. */
  978. static struct omap_hwmod_class omap2420_venc_hwmod_class = {
  979. .name = "venc",
  980. };
  981. /* l4_core -> dss_venc */
  982. static struct omap_hwmod_ocp_if omap2420_l4_core__dss_venc = {
  983. .master = &omap2420_l4_core_hwmod,
  984. .slave = &omap2420_dss_venc_hwmod,
  985. .clk = "dss_54m_fck",
  986. .addr = omap2_dss_venc_addrs,
  987. .fw = {
  988. .omap2 = {
  989. .l4_fw_region = OMAP2420_L4_CORE_FW_DSS_VENC_REGION,
  990. .flags = OMAP_FIREWALL_L4,
  991. }
  992. },
  993. .flags = OCPIF_SWSUP_IDLE,
  994. .user = OCP_USER_MPU | OCP_USER_SDMA,
  995. };
  996. /* dss_venc slave ports */
  997. static struct omap_hwmod_ocp_if *omap2420_dss_venc_slaves[] = {
  998. &omap2420_l4_core__dss_venc,
  999. };
  1000. static struct omap_hwmod omap2420_dss_venc_hwmod = {
  1001. .name = "dss_venc",
  1002. .class = &omap2420_venc_hwmod_class,
  1003. .main_clk = "dss1_fck",
  1004. .prcm = {
  1005. .omap2 = {
  1006. .prcm_reg_id = 1,
  1007. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  1008. .module_offs = CORE_MOD,
  1009. },
  1010. },
  1011. .slaves = omap2420_dss_venc_slaves,
  1012. .slaves_cnt = ARRAY_SIZE(omap2420_dss_venc_slaves),
  1013. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  1014. .flags = HWMOD_NO_IDLEST,
  1015. };
  1016. /* I2C common */
  1017. static struct omap_hwmod_class_sysconfig i2c_sysc = {
  1018. .rev_offs = 0x00,
  1019. .sysc_offs = 0x20,
  1020. .syss_offs = 0x10,
  1021. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  1022. .sysc_fields = &omap_hwmod_sysc_type1,
  1023. };
  1024. static struct omap_hwmod_class i2c_class = {
  1025. .name = "i2c",
  1026. .sysc = &i2c_sysc,
  1027. };
  1028. static struct omap_i2c_dev_attr i2c_dev_attr;
  1029. /* I2C1 */
  1030. static struct omap_hwmod_ocp_if *omap2420_i2c1_slaves[] = {
  1031. &omap2420_l4_core__i2c1,
  1032. };
  1033. static struct omap_hwmod omap2420_i2c1_hwmod = {
  1034. .name = "i2c1",
  1035. .mpu_irqs = omap2_i2c1_mpu_irqs,
  1036. .sdma_reqs = omap2_i2c1_sdma_reqs,
  1037. .main_clk = "i2c1_fck",
  1038. .prcm = {
  1039. .omap2 = {
  1040. .module_offs = CORE_MOD,
  1041. .prcm_reg_id = 1,
  1042. .module_bit = OMAP2420_EN_I2C1_SHIFT,
  1043. .idlest_reg_id = 1,
  1044. .idlest_idle_bit = OMAP2420_ST_I2C1_SHIFT,
  1045. },
  1046. },
  1047. .slaves = omap2420_i2c1_slaves,
  1048. .slaves_cnt = ARRAY_SIZE(omap2420_i2c1_slaves),
  1049. .class = &i2c_class,
  1050. .dev_attr = &i2c_dev_attr,
  1051. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  1052. .flags = HWMOD_16BIT_REG,
  1053. };
  1054. /* I2C2 */
  1055. static struct omap_hwmod_ocp_if *omap2420_i2c2_slaves[] = {
  1056. &omap2420_l4_core__i2c2,
  1057. };
  1058. static struct omap_hwmod omap2420_i2c2_hwmod = {
  1059. .name = "i2c2",
  1060. .mpu_irqs = omap2_i2c2_mpu_irqs,
  1061. .sdma_reqs = omap2_i2c2_sdma_reqs,
  1062. .main_clk = "i2c2_fck",
  1063. .prcm = {
  1064. .omap2 = {
  1065. .module_offs = CORE_MOD,
  1066. .prcm_reg_id = 1,
  1067. .module_bit = OMAP2420_EN_I2C2_SHIFT,
  1068. .idlest_reg_id = 1,
  1069. .idlest_idle_bit = OMAP2420_ST_I2C2_SHIFT,
  1070. },
  1071. },
  1072. .slaves = omap2420_i2c2_slaves,
  1073. .slaves_cnt = ARRAY_SIZE(omap2420_i2c2_slaves),
  1074. .class = &i2c_class,
  1075. .dev_attr = &i2c_dev_attr,
  1076. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  1077. .flags = HWMOD_16BIT_REG,
  1078. };
  1079. /* l4_wkup -> gpio1 */
  1080. static struct omap_hwmod_addr_space omap2420_gpio1_addr_space[] = {
  1081. {
  1082. .pa_start = 0x48018000,
  1083. .pa_end = 0x480181ff,
  1084. .flags = ADDR_TYPE_RT
  1085. },
  1086. { }
  1087. };
  1088. static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio1 = {
  1089. .master = &omap2420_l4_wkup_hwmod,
  1090. .slave = &omap2420_gpio1_hwmod,
  1091. .clk = "gpios_ick",
  1092. .addr = omap2420_gpio1_addr_space,
  1093. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1094. };
  1095. /* l4_wkup -> gpio2 */
  1096. static struct omap_hwmod_addr_space omap2420_gpio2_addr_space[] = {
  1097. {
  1098. .pa_start = 0x4801a000,
  1099. .pa_end = 0x4801a1ff,
  1100. .flags = ADDR_TYPE_RT
  1101. },
  1102. { }
  1103. };
  1104. static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio2 = {
  1105. .master = &omap2420_l4_wkup_hwmod,
  1106. .slave = &omap2420_gpio2_hwmod,
  1107. .clk = "gpios_ick",
  1108. .addr = omap2420_gpio2_addr_space,
  1109. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1110. };
  1111. /* l4_wkup -> gpio3 */
  1112. static struct omap_hwmod_addr_space omap2420_gpio3_addr_space[] = {
  1113. {
  1114. .pa_start = 0x4801c000,
  1115. .pa_end = 0x4801c1ff,
  1116. .flags = ADDR_TYPE_RT
  1117. },
  1118. { }
  1119. };
  1120. static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio3 = {
  1121. .master = &omap2420_l4_wkup_hwmod,
  1122. .slave = &omap2420_gpio3_hwmod,
  1123. .clk = "gpios_ick",
  1124. .addr = omap2420_gpio3_addr_space,
  1125. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1126. };
  1127. /* l4_wkup -> gpio4 */
  1128. static struct omap_hwmod_addr_space omap2420_gpio4_addr_space[] = {
  1129. {
  1130. .pa_start = 0x4801e000,
  1131. .pa_end = 0x4801e1ff,
  1132. .flags = ADDR_TYPE_RT
  1133. },
  1134. { }
  1135. };
  1136. static struct omap_hwmod_ocp_if omap2420_l4_wkup__gpio4 = {
  1137. .master = &omap2420_l4_wkup_hwmod,
  1138. .slave = &omap2420_gpio4_hwmod,
  1139. .clk = "gpios_ick",
  1140. .addr = omap2420_gpio4_addr_space,
  1141. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1142. };
  1143. /* gpio dev_attr */
  1144. static struct omap_gpio_dev_attr gpio_dev_attr = {
  1145. .bank_width = 32,
  1146. .dbck_flag = false,
  1147. };
  1148. static struct omap_hwmod_class_sysconfig omap242x_gpio_sysc = {
  1149. .rev_offs = 0x0000,
  1150. .sysc_offs = 0x0010,
  1151. .syss_offs = 0x0014,
  1152. .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
  1153. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  1154. SYSS_HAS_RESET_STATUS),
  1155. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1156. .sysc_fields = &omap_hwmod_sysc_type1,
  1157. };
  1158. /*
  1159. * 'gpio' class
  1160. * general purpose io module
  1161. */
  1162. static struct omap_hwmod_class omap242x_gpio_hwmod_class = {
  1163. .name = "gpio",
  1164. .sysc = &omap242x_gpio_sysc,
  1165. .rev = 0,
  1166. };
  1167. /* gpio1 */
  1168. static struct omap_hwmod_ocp_if *omap2420_gpio1_slaves[] = {
  1169. &omap2420_l4_wkup__gpio1,
  1170. };
  1171. static struct omap_hwmod omap2420_gpio1_hwmod = {
  1172. .name = "gpio1",
  1173. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1174. .mpu_irqs = omap2_gpio1_irqs,
  1175. .main_clk = "gpios_fck",
  1176. .prcm = {
  1177. .omap2 = {
  1178. .prcm_reg_id = 1,
  1179. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1180. .module_offs = WKUP_MOD,
  1181. .idlest_reg_id = 1,
  1182. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  1183. },
  1184. },
  1185. .slaves = omap2420_gpio1_slaves,
  1186. .slaves_cnt = ARRAY_SIZE(omap2420_gpio1_slaves),
  1187. .class = &omap242x_gpio_hwmod_class,
  1188. .dev_attr = &gpio_dev_attr,
  1189. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  1190. };
  1191. /* gpio2 */
  1192. static struct omap_hwmod_ocp_if *omap2420_gpio2_slaves[] = {
  1193. &omap2420_l4_wkup__gpio2,
  1194. };
  1195. static struct omap_hwmod omap2420_gpio2_hwmod = {
  1196. .name = "gpio2",
  1197. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1198. .mpu_irqs = omap2_gpio2_irqs,
  1199. .main_clk = "gpios_fck",
  1200. .prcm = {
  1201. .omap2 = {
  1202. .prcm_reg_id = 1,
  1203. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1204. .module_offs = WKUP_MOD,
  1205. .idlest_reg_id = 1,
  1206. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  1207. },
  1208. },
  1209. .slaves = omap2420_gpio2_slaves,
  1210. .slaves_cnt = ARRAY_SIZE(omap2420_gpio2_slaves),
  1211. .class = &omap242x_gpio_hwmod_class,
  1212. .dev_attr = &gpio_dev_attr,
  1213. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  1214. };
  1215. /* gpio3 */
  1216. static struct omap_hwmod_ocp_if *omap2420_gpio3_slaves[] = {
  1217. &omap2420_l4_wkup__gpio3,
  1218. };
  1219. static struct omap_hwmod omap2420_gpio3_hwmod = {
  1220. .name = "gpio3",
  1221. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1222. .mpu_irqs = omap2_gpio3_irqs,
  1223. .main_clk = "gpios_fck",
  1224. .prcm = {
  1225. .omap2 = {
  1226. .prcm_reg_id = 1,
  1227. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1228. .module_offs = WKUP_MOD,
  1229. .idlest_reg_id = 1,
  1230. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  1231. },
  1232. },
  1233. .slaves = omap2420_gpio3_slaves,
  1234. .slaves_cnt = ARRAY_SIZE(omap2420_gpio3_slaves),
  1235. .class = &omap242x_gpio_hwmod_class,
  1236. .dev_attr = &gpio_dev_attr,
  1237. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  1238. };
  1239. /* gpio4 */
  1240. static struct omap_hwmod_ocp_if *omap2420_gpio4_slaves[] = {
  1241. &omap2420_l4_wkup__gpio4,
  1242. };
  1243. static struct omap_hwmod omap2420_gpio4_hwmod = {
  1244. .name = "gpio4",
  1245. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  1246. .mpu_irqs = omap2_gpio4_irqs,
  1247. .main_clk = "gpios_fck",
  1248. .prcm = {
  1249. .omap2 = {
  1250. .prcm_reg_id = 1,
  1251. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1252. .module_offs = WKUP_MOD,
  1253. .idlest_reg_id = 1,
  1254. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  1255. },
  1256. },
  1257. .slaves = omap2420_gpio4_slaves,
  1258. .slaves_cnt = ARRAY_SIZE(omap2420_gpio4_slaves),
  1259. .class = &omap242x_gpio_hwmod_class,
  1260. .dev_attr = &gpio_dev_attr,
  1261. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  1262. };
  1263. /* system dma */
  1264. static struct omap_hwmod_class_sysconfig omap2420_dma_sysc = {
  1265. .rev_offs = 0x0000,
  1266. .sysc_offs = 0x002c,
  1267. .syss_offs = 0x0028,
  1268. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_MIDLEMODE |
  1269. SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_EMUFREE |
  1270. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  1271. .idlemodes = (MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1272. .sysc_fields = &omap_hwmod_sysc_type1,
  1273. };
  1274. static struct omap_hwmod_class omap2420_dma_hwmod_class = {
  1275. .name = "dma",
  1276. .sysc = &omap2420_dma_sysc,
  1277. };
  1278. /* dma attributes */
  1279. static struct omap_dma_dev_attr dma_dev_attr = {
  1280. .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
  1281. IS_CSSA_32 | IS_CDSA_32,
  1282. .lch_count = 32,
  1283. };
  1284. /* dma_system -> L3 */
  1285. static struct omap_hwmod_ocp_if omap2420_dma_system__l3 = {
  1286. .master = &omap2420_dma_system_hwmod,
  1287. .slave = &omap2420_l3_main_hwmod,
  1288. .clk = "core_l3_ck",
  1289. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1290. };
  1291. /* dma_system master ports */
  1292. static struct omap_hwmod_ocp_if *omap2420_dma_system_masters[] = {
  1293. &omap2420_dma_system__l3,
  1294. };
  1295. /* l4_core -> dma_system */
  1296. static struct omap_hwmod_ocp_if omap2420_l4_core__dma_system = {
  1297. .master = &omap2420_l4_core_hwmod,
  1298. .slave = &omap2420_dma_system_hwmod,
  1299. .clk = "sdma_ick",
  1300. .addr = omap2_dma_system_addrs,
  1301. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1302. };
  1303. /* dma_system slave ports */
  1304. static struct omap_hwmod_ocp_if *omap2420_dma_system_slaves[] = {
  1305. &omap2420_l4_core__dma_system,
  1306. };
  1307. static struct omap_hwmod omap2420_dma_system_hwmod = {
  1308. .name = "dma",
  1309. .class = &omap2420_dma_hwmod_class,
  1310. .mpu_irqs = omap2_dma_system_irqs,
  1311. .main_clk = "core_l3_ck",
  1312. .slaves = omap2420_dma_system_slaves,
  1313. .slaves_cnt = ARRAY_SIZE(omap2420_dma_system_slaves),
  1314. .masters = omap2420_dma_system_masters,
  1315. .masters_cnt = ARRAY_SIZE(omap2420_dma_system_masters),
  1316. .dev_attr = &dma_dev_attr,
  1317. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  1318. .flags = HWMOD_NO_IDLEST,
  1319. };
  1320. /*
  1321. * 'mailbox' class
  1322. * mailbox module allowing communication between the on-chip processors
  1323. * using a queued mailbox-interrupt mechanism.
  1324. */
  1325. static struct omap_hwmod_class_sysconfig omap2420_mailbox_sysc = {
  1326. .rev_offs = 0x000,
  1327. .sysc_offs = 0x010,
  1328. .syss_offs = 0x014,
  1329. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1330. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  1331. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1332. .sysc_fields = &omap_hwmod_sysc_type1,
  1333. };
  1334. static struct omap_hwmod_class omap2420_mailbox_hwmod_class = {
  1335. .name = "mailbox",
  1336. .sysc = &omap2420_mailbox_sysc,
  1337. };
  1338. /* mailbox */
  1339. static struct omap_hwmod omap2420_mailbox_hwmod;
  1340. static struct omap_hwmod_irq_info omap2420_mailbox_irqs[] = {
  1341. { .name = "dsp", .irq = 26 },
  1342. { .name = "iva", .irq = 34 },
  1343. { .irq = -1 }
  1344. };
  1345. /* l4_core -> mailbox */
  1346. static struct omap_hwmod_ocp_if omap2420_l4_core__mailbox = {
  1347. .master = &omap2420_l4_core_hwmod,
  1348. .slave = &omap2420_mailbox_hwmod,
  1349. .addr = omap2_mailbox_addrs,
  1350. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1351. };
  1352. /* mailbox slave ports */
  1353. static struct omap_hwmod_ocp_if *omap2420_mailbox_slaves[] = {
  1354. &omap2420_l4_core__mailbox,
  1355. };
  1356. static struct omap_hwmod omap2420_mailbox_hwmod = {
  1357. .name = "mailbox",
  1358. .class = &omap2420_mailbox_hwmod_class,
  1359. .mpu_irqs = omap2420_mailbox_irqs,
  1360. .main_clk = "mailboxes_ick",
  1361. .prcm = {
  1362. .omap2 = {
  1363. .prcm_reg_id = 1,
  1364. .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT,
  1365. .module_offs = CORE_MOD,
  1366. .idlest_reg_id = 1,
  1367. .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
  1368. },
  1369. },
  1370. .slaves = omap2420_mailbox_slaves,
  1371. .slaves_cnt = ARRAY_SIZE(omap2420_mailbox_slaves),
  1372. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  1373. };
  1374. /*
  1375. * 'mcspi' class
  1376. * multichannel serial port interface (mcspi) / master/slave synchronous serial
  1377. * bus
  1378. */
  1379. static struct omap_hwmod_class_sysconfig omap2420_mcspi_sysc = {
  1380. .rev_offs = 0x0000,
  1381. .sysc_offs = 0x0010,
  1382. .syss_offs = 0x0014,
  1383. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1384. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1385. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  1386. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1387. .sysc_fields = &omap_hwmod_sysc_type1,
  1388. };
  1389. static struct omap_hwmod_class omap2420_mcspi_class = {
  1390. .name = "mcspi",
  1391. .sysc = &omap2420_mcspi_sysc,
  1392. .rev = OMAP2_MCSPI_REV,
  1393. };
  1394. /* mcspi1 */
  1395. static struct omap_hwmod_ocp_if *omap2420_mcspi1_slaves[] = {
  1396. &omap2420_l4_core__mcspi1,
  1397. };
  1398. static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
  1399. .num_chipselect = 4,
  1400. };
  1401. static struct omap_hwmod omap2420_mcspi1_hwmod = {
  1402. .name = "mcspi1_hwmod",
  1403. .mpu_irqs = omap2_mcspi1_mpu_irqs,
  1404. .sdma_reqs = omap2_mcspi1_sdma_reqs,
  1405. .main_clk = "mcspi1_fck",
  1406. .prcm = {
  1407. .omap2 = {
  1408. .module_offs = CORE_MOD,
  1409. .prcm_reg_id = 1,
  1410. .module_bit = OMAP24XX_EN_MCSPI1_SHIFT,
  1411. .idlest_reg_id = 1,
  1412. .idlest_idle_bit = OMAP24XX_ST_MCSPI1_SHIFT,
  1413. },
  1414. },
  1415. .slaves = omap2420_mcspi1_slaves,
  1416. .slaves_cnt = ARRAY_SIZE(omap2420_mcspi1_slaves),
  1417. .class = &omap2420_mcspi_class,
  1418. .dev_attr = &omap_mcspi1_dev_attr,
  1419. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  1420. };
  1421. /* mcspi2 */
  1422. static struct omap_hwmod_ocp_if *omap2420_mcspi2_slaves[] = {
  1423. &omap2420_l4_core__mcspi2,
  1424. };
  1425. static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
  1426. .num_chipselect = 2,
  1427. };
  1428. static struct omap_hwmod omap2420_mcspi2_hwmod = {
  1429. .name = "mcspi2_hwmod",
  1430. .mpu_irqs = omap2_mcspi2_mpu_irqs,
  1431. .sdma_reqs = omap2_mcspi2_sdma_reqs,
  1432. .main_clk = "mcspi2_fck",
  1433. .prcm = {
  1434. .omap2 = {
  1435. .module_offs = CORE_MOD,
  1436. .prcm_reg_id = 1,
  1437. .module_bit = OMAP24XX_EN_MCSPI2_SHIFT,
  1438. .idlest_reg_id = 1,
  1439. .idlest_idle_bit = OMAP24XX_ST_MCSPI2_SHIFT,
  1440. },
  1441. },
  1442. .slaves = omap2420_mcspi2_slaves,
  1443. .slaves_cnt = ARRAY_SIZE(omap2420_mcspi2_slaves),
  1444. .class = &omap2420_mcspi_class,
  1445. .dev_attr = &omap_mcspi2_dev_attr,
  1446. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  1447. };
  1448. /*
  1449. * 'mcbsp' class
  1450. * multi channel buffered serial port controller
  1451. */
  1452. static struct omap_hwmod_class omap2420_mcbsp_hwmod_class = {
  1453. .name = "mcbsp",
  1454. };
  1455. /* mcbsp1 */
  1456. static struct omap_hwmod_irq_info omap2420_mcbsp1_irqs[] = {
  1457. { .name = "tx", .irq = 59 },
  1458. { .name = "rx", .irq = 60 },
  1459. { .irq = -1 }
  1460. };
  1461. /* l4_core -> mcbsp1 */
  1462. static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp1 = {
  1463. .master = &omap2420_l4_core_hwmod,
  1464. .slave = &omap2420_mcbsp1_hwmod,
  1465. .clk = "mcbsp1_ick",
  1466. .addr = omap2_mcbsp1_addrs,
  1467. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1468. };
  1469. /* mcbsp1 slave ports */
  1470. static struct omap_hwmod_ocp_if *omap2420_mcbsp1_slaves[] = {
  1471. &omap2420_l4_core__mcbsp1,
  1472. };
  1473. static struct omap_hwmod omap2420_mcbsp1_hwmod = {
  1474. .name = "mcbsp1",
  1475. .class = &omap2420_mcbsp_hwmod_class,
  1476. .mpu_irqs = omap2420_mcbsp1_irqs,
  1477. .sdma_reqs = omap2_mcbsp1_sdma_reqs,
  1478. .main_clk = "mcbsp1_fck",
  1479. .prcm = {
  1480. .omap2 = {
  1481. .prcm_reg_id = 1,
  1482. .module_bit = OMAP24XX_EN_MCBSP1_SHIFT,
  1483. .module_offs = CORE_MOD,
  1484. .idlest_reg_id = 1,
  1485. .idlest_idle_bit = OMAP24XX_ST_MCBSP1_SHIFT,
  1486. },
  1487. },
  1488. .slaves = omap2420_mcbsp1_slaves,
  1489. .slaves_cnt = ARRAY_SIZE(omap2420_mcbsp1_slaves),
  1490. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  1491. };
  1492. /* mcbsp2 */
  1493. static struct omap_hwmod_irq_info omap2420_mcbsp2_irqs[] = {
  1494. { .name = "tx", .irq = 62 },
  1495. { .name = "rx", .irq = 63 },
  1496. { .irq = -1 }
  1497. };
  1498. /* l4_core -> mcbsp2 */
  1499. static struct omap_hwmod_ocp_if omap2420_l4_core__mcbsp2 = {
  1500. .master = &omap2420_l4_core_hwmod,
  1501. .slave = &omap2420_mcbsp2_hwmod,
  1502. .clk = "mcbsp2_ick",
  1503. .addr = omap2xxx_mcbsp2_addrs,
  1504. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1505. };
  1506. /* mcbsp2 slave ports */
  1507. static struct omap_hwmod_ocp_if *omap2420_mcbsp2_slaves[] = {
  1508. &omap2420_l4_core__mcbsp2,
  1509. };
  1510. static struct omap_hwmod omap2420_mcbsp2_hwmod = {
  1511. .name = "mcbsp2",
  1512. .class = &omap2420_mcbsp_hwmod_class,
  1513. .mpu_irqs = omap2420_mcbsp2_irqs,
  1514. .sdma_reqs = omap2_mcbsp2_sdma_reqs,
  1515. .main_clk = "mcbsp2_fck",
  1516. .prcm = {
  1517. .omap2 = {
  1518. .prcm_reg_id = 1,
  1519. .module_bit = OMAP24XX_EN_MCBSP2_SHIFT,
  1520. .module_offs = CORE_MOD,
  1521. .idlest_reg_id = 1,
  1522. .idlest_idle_bit = OMAP24XX_ST_MCBSP2_SHIFT,
  1523. },
  1524. },
  1525. .slaves = omap2420_mcbsp2_slaves,
  1526. .slaves_cnt = ARRAY_SIZE(omap2420_mcbsp2_slaves),
  1527. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2420),
  1528. };
  1529. static __initdata struct omap_hwmod *omap2420_hwmods[] = {
  1530. &omap2420_l3_main_hwmod,
  1531. &omap2420_l4_core_hwmod,
  1532. &omap2420_l4_wkup_hwmod,
  1533. &omap2420_mpu_hwmod,
  1534. &omap2420_iva_hwmod,
  1535. &omap2420_timer1_hwmod,
  1536. &omap2420_timer2_hwmod,
  1537. &omap2420_timer3_hwmod,
  1538. &omap2420_timer4_hwmod,
  1539. &omap2420_timer5_hwmod,
  1540. &omap2420_timer6_hwmod,
  1541. &omap2420_timer7_hwmod,
  1542. &omap2420_timer8_hwmod,
  1543. &omap2420_timer9_hwmod,
  1544. &omap2420_timer10_hwmod,
  1545. &omap2420_timer11_hwmod,
  1546. &omap2420_timer12_hwmod,
  1547. &omap2420_wd_timer2_hwmod,
  1548. &omap2420_uart1_hwmod,
  1549. &omap2420_uart2_hwmod,
  1550. &omap2420_uart3_hwmod,
  1551. /* dss class */
  1552. &omap2420_dss_core_hwmod,
  1553. &omap2420_dss_dispc_hwmod,
  1554. &omap2420_dss_rfbi_hwmod,
  1555. &omap2420_dss_venc_hwmod,
  1556. /* i2c class */
  1557. &omap2420_i2c1_hwmod,
  1558. &omap2420_i2c2_hwmod,
  1559. /* gpio class */
  1560. &omap2420_gpio1_hwmod,
  1561. &omap2420_gpio2_hwmod,
  1562. &omap2420_gpio3_hwmod,
  1563. &omap2420_gpio4_hwmod,
  1564. /* dma_system class*/
  1565. &omap2420_dma_system_hwmod,
  1566. /* mailbox class */
  1567. &omap2420_mailbox_hwmod,
  1568. /* mcbsp class */
  1569. &omap2420_mcbsp1_hwmod,
  1570. &omap2420_mcbsp2_hwmod,
  1571. /* mcspi class */
  1572. &omap2420_mcspi1_hwmod,
  1573. &omap2420_mcspi2_hwmod,
  1574. NULL,
  1575. };
  1576. int __init omap2420_hwmod_init(void)
  1577. {
  1578. return omap_hwmod_register(omap2420_hwmods);
  1579. }