realizationOfDataCalculation.c 40 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646
  1. /*
  2. * omap_hwmod_33xx_data.c: Hardware modules present on the AM33XX chips
  3. *
  4. * Copyright (C) {2012} Texas Instruments Incorporated - http://www.ti.com/
  5. *
  6. * This file is automatically generated from the AM33XX hardware databases.
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation version 2.
  10. *
  11. * This program is distributed "as is" WITHOUT ANY WARRANTY of any
  12. * kind, whether express or implied; without even the implied warranty
  13. * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. */
  16. #include <linux/i2c-omap.h>
  17. #include "omap_hwmod.h"
  18. #include <linux/platform_data/gpio-omap.h>
  19. #include <linux/platform_data/spi-omap2-mcspi.h>
  20. #include "omap_hwmod_common_data.h"
  21. #include "control.h"
  22. #include "cm33xx.h"
  23. #include "prm33xx.h"
  24. #include "prm-regbits-33xx.h"
  25. #include "i2c.h"
  26. #include "mmc.h"
  27. /*
  28. * IP blocks
  29. */
  30. /*
  31. * 'emif_fw' class
  32. * instance(s): emif_fw
  33. */
  34. static struct omap_hwmod_class am33xx_emif_fw_hwmod_class = {
  35. .name = "emif_fw",
  36. };
  37. /* emif_fw */
  38. static struct omap_hwmod am33xx_emif_fw_hwmod = {
  39. .name = "emif_fw",
  40. .class = &am33xx_emif_fw_hwmod_class,
  41. .clkdm_name = "l4fw_clkdm",
  42. .main_clk = "l4fw_gclk",
  43. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  44. .prcm = {
  45. .omap4 = {
  46. .clkctrl_offs = AM33XX_CM_PER_EMIF_FW_CLKCTRL_OFFSET,
  47. .modulemode = MODULEMODE_SWCTRL,
  48. },
  49. },
  50. };
  51. /*
  52. * 'emif' class
  53. * instance(s): emif
  54. */
  55. static struct omap_hwmod_class_sysconfig am33xx_emif_sysc = {
  56. .rev_offs = 0x0000,
  57. };
  58. static struct omap_hwmod_class am33xx_emif_hwmod_class = {
  59. .name = "emif",
  60. .sysc = &am33xx_emif_sysc,
  61. };
  62. static struct omap_hwmod_irq_info am33xx_emif_irqs[] = {
  63. { .name = "ddrerr0", .irq = 101 + OMAP_INTC_START, },
  64. { .irq = -1 },
  65. };
  66. /* emif */
  67. static struct omap_hwmod am33xx_emif_hwmod = {
  68. .name = "emif",
  69. .class = &am33xx_emif_hwmod_class,
  70. .clkdm_name = "l3_clkdm",
  71. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  72. .mpu_irqs = am33xx_emif_irqs,
  73. .main_clk = "dpll_ddr_m2_div2_ck",
  74. .prcm = {
  75. .omap4 = {
  76. .clkctrl_offs = AM33XX_CM_PER_EMIF_CLKCTRL_OFFSET,
  77. .modulemode = MODULEMODE_SWCTRL,
  78. },
  79. },
  80. };
  81. /*
  82. * 'l3' class
  83. * instance(s): l3_main, l3_s, l3_instr
  84. */
  85. static struct omap_hwmod_class am33xx_l3_hwmod_class = {
  86. .name = "l3",
  87. };
  88. /* l3_main (l3_fast) */
  89. static struct omap_hwmod_irq_info am33xx_l3_main_irqs[] = {
  90. { .name = "l3debug", .irq = 9 + OMAP_INTC_START, },
  91. { .name = "l3appint", .irq = 10 + OMAP_INTC_START, },
  92. { .irq = -1 },
  93. };
  94. static struct omap_hwmod am33xx_l3_main_hwmod = {
  95. .name = "l3_main",
  96. .class = &am33xx_l3_hwmod_class,
  97. .clkdm_name = "l3_clkdm",
  98. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  99. .mpu_irqs = am33xx_l3_main_irqs,
  100. .main_clk = "l3_gclk",
  101. .prcm = {
  102. .omap4 = {
  103. .clkctrl_offs = AM33XX_CM_PER_L3_CLKCTRL_OFFSET,
  104. .modulemode = MODULEMODE_SWCTRL,
  105. },
  106. },
  107. };
  108. /* l3_s */
  109. static struct omap_hwmod am33xx_l3_s_hwmod = {
  110. .name = "l3_s",
  111. .class = &am33xx_l3_hwmod_class,
  112. .clkdm_name = "l3s_clkdm",
  113. };
  114. /* l3_instr */
  115. static struct omap_hwmod am33xx_l3_instr_hwmod = {
  116. .name = "l3_instr",
  117. .class = &am33xx_l3_hwmod_class,
  118. .clkdm_name = "l3_clkdm",
  119. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  120. .main_clk = "l3_gclk",
  121. .prcm = {
  122. .omap4 = {
  123. .clkctrl_offs = AM33XX_CM_PER_L3_INSTR_CLKCTRL_OFFSET,
  124. .modulemode = MODULEMODE_SWCTRL,
  125. },
  126. },
  127. };
  128. /*
  129. * 'l4' class
  130. * instance(s): l4_ls, l4_hs, l4_wkup, l4_fw
  131. */
  132. static struct omap_hwmod_class am33xx_l4_hwmod_class = {
  133. .name = "l4",
  134. };
  135. /* l4_ls */
  136. static struct omap_hwmod am33xx_l4_ls_hwmod = {
  137. .name = "l4_ls",
  138. .class = &am33xx_l4_hwmod_class,
  139. .clkdm_name = "l4ls_clkdm",
  140. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  141. .main_clk = "l4ls_gclk",
  142. .prcm = {
  143. .omap4 = {
  144. .clkctrl_offs = AM33XX_CM_PER_L4LS_CLKCTRL_OFFSET,
  145. .modulemode = MODULEMODE_SWCTRL,
  146. },
  147. },
  148. };
  149. /* l4_hs */
  150. static struct omap_hwmod am33xx_l4_hs_hwmod = {
  151. .name = "l4_hs",
  152. .class = &am33xx_l4_hwmod_class,
  153. .clkdm_name = "l4hs_clkdm",
  154. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  155. .main_clk = "l4hs_gclk",
  156. .prcm = {
  157. .omap4 = {
  158. .clkctrl_offs = AM33XX_CM_PER_L4HS_CLKCTRL_OFFSET,
  159. .modulemode = MODULEMODE_SWCTRL,
  160. },
  161. },
  162. };
  163. /* l4_wkup */
  164. static struct omap_hwmod am33xx_l4_wkup_hwmod = {
  165. .name = "l4_wkup",
  166. .class = &am33xx_l4_hwmod_class,
  167. .clkdm_name = "l4_wkup_clkdm",
  168. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  169. .prcm = {
  170. .omap4 = {
  171. .clkctrl_offs = AM33XX_CM_WKUP_L4WKUP_CLKCTRL_OFFSET,
  172. .modulemode = MODULEMODE_SWCTRL,
  173. },
  174. },
  175. };
  176. /* l4_fw */
  177. static struct omap_hwmod am33xx_l4_fw_hwmod = {
  178. .name = "l4_fw",
  179. .class = &am33xx_l4_hwmod_class,
  180. .clkdm_name = "l4fw_clkdm",
  181. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  182. .prcm = {
  183. .omap4 = {
  184. .clkctrl_offs = AM33XX_CM_PER_L4FW_CLKCTRL_OFFSET,
  185. .modulemode = MODULEMODE_SWCTRL,
  186. },
  187. },
  188. };
  189. /*
  190. * 'mpu' class
  191. */
  192. static struct omap_hwmod_class am33xx_mpu_hwmod_class = {
  193. .name = "mpu",
  194. };
  195. /* mpu */
  196. static struct omap_hwmod_irq_info am33xx_mpu_irqs[] = {
  197. { .name = "emuint", .irq = 0 + OMAP_INTC_START, },
  198. { .name = "commtx", .irq = 1 + OMAP_INTC_START, },
  199. { .name = "commrx", .irq = 2 + OMAP_INTC_START, },
  200. { .name = "bench", .irq = 3 + OMAP_INTC_START, },
  201. { .irq = -1 },
  202. };
  203. static struct omap_hwmod am33xx_mpu_hwmod = {
  204. .name = "mpu",
  205. .class = &am33xx_mpu_hwmod_class,
  206. .clkdm_name = "mpu_clkdm",
  207. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  208. .mpu_irqs = am33xx_mpu_irqs,
  209. .main_clk = "dpll_mpu_m2_ck",
  210. .prcm = {
  211. .omap4 = {
  212. .clkctrl_offs = AM33XX_CM_MPU_MPU_CLKCTRL_OFFSET,
  213. .modulemode = MODULEMODE_SWCTRL,
  214. },
  215. },
  216. };
  217. /*
  218. * 'wakeup m3' class
  219. * Wakeup controller sub-system under wakeup domain
  220. */
  221. static struct omap_hwmod_class am33xx_wkup_m3_hwmod_class = {
  222. .name = "wkup_m3",
  223. };
  224. static struct omap_hwmod_rst_info am33xx_wkup_m3_resets[] = {
  225. { .name = "wkup_m3", .rst_shift = 3, .st_shift = 5 },
  226. };
  227. static struct omap_hwmod_irq_info am33xx_wkup_m3_irqs[] = {
  228. { .name = "txev", .irq = 78 + OMAP_INTC_START, },
  229. { .irq = -1 },
  230. };
  231. /* wkup_m3 */
  232. static struct omap_hwmod am33xx_wkup_m3_hwmod = {
  233. .name = "wkup_m3",
  234. .class = &am33xx_wkup_m3_hwmod_class,
  235. .clkdm_name = "l4_wkup_aon_clkdm",
  236. .flags = HWMOD_INIT_NO_RESET, /* Keep hardreset asserted */
  237. .mpu_irqs = am33xx_wkup_m3_irqs,
  238. .main_clk = "dpll_core_m4_div2_ck",
  239. .prcm = {
  240. .omap4 = {
  241. .clkctrl_offs = AM33XX_CM_WKUP_WKUP_M3_CLKCTRL_OFFSET,
  242. .rstctrl_offs = AM33XX_RM_WKUP_RSTCTRL_OFFSET,
  243. .modulemode = MODULEMODE_SWCTRL,
  244. },
  245. },
  246. .rst_lines = am33xx_wkup_m3_resets,
  247. .rst_lines_cnt = ARRAY_SIZE(am33xx_wkup_m3_resets),
  248. };
  249. /*
  250. * 'pru-icss' class
  251. * Programmable Real-Time Unit and Industrial Communication Subsystem
  252. */
  253. static struct omap_hwmod_class am33xx_pruss_hwmod_class = {
  254. .name = "pruss",
  255. };
  256. static struct omap_hwmod_rst_info am33xx_pruss_resets[] = {
  257. { .name = "pruss", .rst_shift = 1 },
  258. };
  259. static struct omap_hwmod_irq_info am33xx_pruss_irqs[] = {
  260. { .name = "evtout0", .irq = 20 + OMAP_INTC_START, },
  261. { .name = "evtout1", .irq = 21 + OMAP_INTC_START, },
  262. { .name = "evtout2", .irq = 22 + OMAP_INTC_START, },
  263. { .name = "evtout3", .irq = 23 + OMAP_INTC_START, },
  264. { .name = "evtout4", .irq = 24 + OMAP_INTC_START, },
  265. { .name = "evtout5", .irq = 25 + OMAP_INTC_START, },
  266. { .name = "evtout6", .irq = 26 + OMAP_INTC_START, },
  267. { .name = "evtout7", .irq = 27 + OMAP_INTC_START, },
  268. { .irq = -1 },
  269. };
  270. /* pru-icss */
  271. /* Pseudo hwmod for reset control purpose only */
  272. static struct omap_hwmod am33xx_pruss_hwmod = {
  273. .name = "pruss",
  274. .class = &am33xx_pruss_hwmod_class,
  275. .clkdm_name = "pruss_ocp_clkdm",
  276. .mpu_irqs = am33xx_pruss_irqs,
  277. .main_clk = "pruss_ocp_gclk",
  278. .prcm = {
  279. .omap4 = {
  280. .clkctrl_offs = AM33XX_CM_PER_PRUSS_CLKCTRL_OFFSET,
  281. .rstctrl_offs = AM33XX_RM_PER_RSTCTRL_OFFSET,
  282. .modulemode = MODULEMODE_SWCTRL,
  283. },
  284. },
  285. .rst_lines = am33xx_pruss_resets,
  286. .rst_lines_cnt = ARRAY_SIZE(am33xx_pruss_resets),
  287. };
  288. /* gfx */
  289. /* Pseudo hwmod for reset control purpose only */
  290. static struct omap_hwmod_class am33xx_gfx_hwmod_class = {
  291. .name = "gfx",
  292. };
  293. static struct omap_hwmod_rst_info am33xx_gfx_resets[] = {
  294. { .name = "gfx", .rst_shift = 0 },
  295. };
  296. static struct omap_hwmod_irq_info am33xx_gfx_irqs[] = {
  297. { .name = "gfxint", .irq = 37 + OMAP_INTC_START, },
  298. { .irq = -1 },
  299. };
  300. static struct omap_hwmod am33xx_gfx_hwmod = {
  301. .name = "gfx",
  302. .class = &am33xx_gfx_hwmod_class,
  303. .clkdm_name = "gfx_l3_clkdm",
  304. .mpu_irqs = am33xx_gfx_irqs,
  305. .main_clk = "gfx_fck_div_ck",
  306. .prcm = {
  307. .omap4 = {
  308. .clkctrl_offs = AM33XX_CM_GFX_GFX_CLKCTRL_OFFSET,
  309. .rstctrl_offs = AM33XX_RM_GFX_RSTCTRL_OFFSET,
  310. .modulemode = MODULEMODE_SWCTRL,
  311. },
  312. },
  313. .rst_lines = am33xx_gfx_resets,
  314. .rst_lines_cnt = ARRAY_SIZE(am33xx_gfx_resets),
  315. };
  316. /*
  317. * 'prcm' class
  318. * power and reset manager (whole prcm infrastructure)
  319. */
  320. static struct omap_hwmod_class am33xx_prcm_hwmod_class = {
  321. .name = "prcm",
  322. };
  323. /* prcm */
  324. static struct omap_hwmod am33xx_prcm_hwmod = {
  325. .name = "prcm",
  326. .class = &am33xx_prcm_hwmod_class,
  327. .clkdm_name = "l4_wkup_clkdm",
  328. };
  329. /*
  330. * 'adc/tsc' class
  331. * TouchScreen Controller (Anolog-To-Digital Converter)
  332. */
  333. static struct omap_hwmod_class_sysconfig am33xx_adc_tsc_sysc = {
  334. .rev_offs = 0x00,
  335. .sysc_offs = 0x10,
  336. .sysc_flags = SYSC_HAS_SIDLEMODE,
  337. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  338. SIDLE_SMART_WKUP),
  339. .sysc_fields = &omap_hwmod_sysc_type2,
  340. };
  341. static struct omap_hwmod_class am33xx_adc_tsc_hwmod_class = {
  342. .name = "adc_tsc",
  343. .sysc = &am33xx_adc_tsc_sysc,
  344. };
  345. static struct omap_hwmod_irq_info am33xx_adc_tsc_irqs[] = {
  346. { .irq = 16 + OMAP_INTC_START, },
  347. { .irq = -1 },
  348. };
  349. static struct omap_hwmod am33xx_adc_tsc_hwmod = {
  350. .name = "adc_tsc",
  351. .class = &am33xx_adc_tsc_hwmod_class,
  352. .clkdm_name = "l4_wkup_clkdm",
  353. .mpu_irqs = am33xx_adc_tsc_irqs,
  354. .main_clk = "adc_tsc_fck",
  355. .prcm = {
  356. .omap4 = {
  357. .clkctrl_offs = AM33XX_CM_WKUP_ADC_TSC_CLKCTRL_OFFSET,
  358. .modulemode = MODULEMODE_SWCTRL,
  359. },
  360. },
  361. };
  362. /*
  363. * Modules omap_hwmod structures
  364. *
  365. * The following IPs are excluded for the moment because:
  366. * - They do not need an explicit SW control using omap_hwmod API.
  367. * - They still need to be validated with the driver
  368. * properly adapted to omap_hwmod / omap_device
  369. *
  370. * - cEFUSE (doesn't fall under any ocp_if)
  371. * - clkdiv32k
  372. * - debugss
  373. * - ocmc ram
  374. * - ocp watch point
  375. * - aes0
  376. * - sha0
  377. */
  378. #if 0
  379. /*
  380. * 'cefuse' class
  381. */
  382. static struct omap_hwmod_class am33xx_cefuse_hwmod_class = {
  383. .name = "cefuse",
  384. };
  385. static struct omap_hwmod am33xx_cefuse_hwmod = {
  386. .name = "cefuse",
  387. .class = &am33xx_cefuse_hwmod_class,
  388. .clkdm_name = "l4_cefuse_clkdm",
  389. .main_clk = "cefuse_fck",
  390. .prcm = {
  391. .omap4 = {
  392. .clkctrl_offs = AM33XX_CM_CEFUSE_CEFUSE_CLKCTRL_OFFSET,
  393. .modulemode = MODULEMODE_SWCTRL,
  394. },
  395. },
  396. };
  397. /*
  398. * 'clkdiv32k' class
  399. */
  400. static struct omap_hwmod_class am33xx_clkdiv32k_hwmod_class = {
  401. .name = "clkdiv32k",
  402. };
  403. static struct omap_hwmod am33xx_clkdiv32k_hwmod = {
  404. .name = "clkdiv32k",
  405. .class = &am33xx_clkdiv32k_hwmod_class,
  406. .clkdm_name = "clk_24mhz_clkdm",
  407. .main_clk = "clkdiv32k_ick",
  408. .prcm = {
  409. .omap4 = {
  410. .clkctrl_offs = AM33XX_CM_PER_CLKDIV32K_CLKCTRL_OFFSET,
  411. .modulemode = MODULEMODE_SWCTRL,
  412. },
  413. },
  414. };
  415. /*
  416. * 'debugss' class
  417. * debug sub system
  418. */
  419. static struct omap_hwmod_class am33xx_debugss_hwmod_class = {
  420. .name = "debugss",
  421. };
  422. static struct omap_hwmod am33xx_debugss_hwmod = {
  423. .name = "debugss",
  424. .class = &am33xx_debugss_hwmod_class,
  425. .clkdm_name = "l3_aon_clkdm",
  426. .main_clk = "debugss_ick",
  427. .prcm = {
  428. .omap4 = {
  429. .clkctrl_offs = AM33XX_CM_WKUP_DEBUGSS_CLKCTRL_OFFSET,
  430. .modulemode = MODULEMODE_SWCTRL,
  431. },
  432. },
  433. };
  434. /* ocmcram */
  435. static struct omap_hwmod_class am33xx_ocmcram_hwmod_class = {
  436. .name = "ocmcram",
  437. };
  438. static struct omap_hwmod am33xx_ocmcram_hwmod = {
  439. .name = "ocmcram",
  440. .class = &am33xx_ocmcram_hwmod_class,
  441. .clkdm_name = "l3_clkdm",
  442. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  443. .main_clk = "l3_gclk",
  444. .prcm = {
  445. .omap4 = {
  446. .clkctrl_offs = AM33XX_CM_PER_OCMCRAM_CLKCTRL_OFFSET,
  447. .modulemode = MODULEMODE_SWCTRL,
  448. },
  449. },
  450. };
  451. /* ocpwp */
  452. static struct omap_hwmod_class am33xx_ocpwp_hwmod_class = {
  453. .name = "ocpwp",
  454. };
  455. static struct omap_hwmod am33xx_ocpwp_hwmod = {
  456. .name = "ocpwp",
  457. .class = &am33xx_ocpwp_hwmod_class,
  458. .clkdm_name = "l4ls_clkdm",
  459. .main_clk = "l4ls_gclk",
  460. .prcm = {
  461. .omap4 = {
  462. .clkctrl_offs = AM33XX_CM_PER_OCPWP_CLKCTRL_OFFSET,
  463. .modulemode = MODULEMODE_SWCTRL,
  464. },
  465. },
  466. };
  467. /*
  468. * 'aes' class
  469. */
  470. static struct omap_hwmod_class am33xx_aes_hwmod_class = {
  471. .name = "aes",
  472. };
  473. static struct omap_hwmod_irq_info am33xx_aes0_irqs[] = {
  474. { .irq = 102 + OMAP_INTC_START, },
  475. { .irq = -1 },
  476. };
  477. static struct omap_hwmod am33xx_aes0_hwmod = {
  478. .name = "aes0",
  479. .class = &am33xx_aes_hwmod_class,
  480. .clkdm_name = "l3_clkdm",
  481. .mpu_irqs = am33xx_aes0_irqs,
  482. .main_clk = "l3_gclk",
  483. .prcm = {
  484. .omap4 = {
  485. .clkctrl_offs = AM33XX_CM_PER_AES0_CLKCTRL_OFFSET,
  486. .modulemode = MODULEMODE_SWCTRL,
  487. },
  488. },
  489. };
  490. /* sha0 */
  491. static struct omap_hwmod_class am33xx_sha0_hwmod_class = {
  492. .name = "sha0",
  493. };
  494. static struct omap_hwmod_irq_info am33xx_sha0_irqs[] = {
  495. { .irq = 108 + OMAP_INTC_START, },
  496. { .irq = -1 },
  497. };
  498. static struct omap_hwmod am33xx_sha0_hwmod = {
  499. .name = "sha0",
  500. .class = &am33xx_sha0_hwmod_class,
  501. .clkdm_name = "l3_clkdm",
  502. .mpu_irqs = am33xx_sha0_irqs,
  503. .main_clk = "l3_gclk",
  504. .prcm = {
  505. .omap4 = {
  506. .clkctrl_offs = AM33XX_CM_PER_SHA0_CLKCTRL_OFFSET,
  507. .modulemode = MODULEMODE_SWCTRL,
  508. },
  509. },
  510. };
  511. #endif
  512. /* 'smartreflex' class */
  513. static struct omap_hwmod_class am33xx_smartreflex_hwmod_class = {
  514. .name = "smartreflex",
  515. };
  516. /* smartreflex0 */
  517. static struct omap_hwmod_irq_info am33xx_smartreflex0_irqs[] = {
  518. { .irq = 120 + OMAP_INTC_START, },
  519. { .irq = -1 },
  520. };
  521. static struct omap_hwmod am33xx_smartreflex0_hwmod = {
  522. .name = "smartreflex0",
  523. .class = &am33xx_smartreflex_hwmod_class,
  524. .clkdm_name = "l4_wkup_clkdm",
  525. .mpu_irqs = am33xx_smartreflex0_irqs,
  526. .main_clk = "smartreflex0_fck",
  527. .prcm = {
  528. .omap4 = {
  529. .clkctrl_offs = AM33XX_CM_WKUP_SMARTREFLEX0_CLKCTRL_OFFSET,
  530. .modulemode = MODULEMODE_SWCTRL,
  531. },
  532. },
  533. };
  534. /* smartreflex1 */
  535. static struct omap_hwmod_irq_info am33xx_smartreflex1_irqs[] = {
  536. { .irq = 121 + OMAP_INTC_START, },
  537. { .irq = -1 },
  538. };
  539. static struct omap_hwmod am33xx_smartreflex1_hwmod = {
  540. .name = "smartreflex1",
  541. .class = &am33xx_smartreflex_hwmod_class,
  542. .clkdm_name = "l4_wkup_clkdm",
  543. .mpu_irqs = am33xx_smartreflex1_irqs,
  544. .main_clk = "smartreflex1_fck",
  545. .prcm = {
  546. .omap4 = {
  547. .clkctrl_offs = AM33XX_CM_WKUP_SMARTREFLEX1_CLKCTRL_OFFSET,
  548. .modulemode = MODULEMODE_SWCTRL,
  549. },
  550. },
  551. };
  552. /*
  553. * 'control' module class
  554. */
  555. static struct omap_hwmod_class am33xx_control_hwmod_class = {
  556. .name = "control",
  557. };
  558. static struct omap_hwmod_irq_info am33xx_control_irqs[] = {
  559. { .irq = 8 + OMAP_INTC_START, },
  560. { .irq = -1 },
  561. };
  562. static struct omap_hwmod am33xx_control_hwmod = {
  563. .name = "control",
  564. .class = &am33xx_control_hwmod_class,
  565. .clkdm_name = "l4_wkup_clkdm",
  566. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  567. .mpu_irqs = am33xx_control_irqs,
  568. .main_clk = "dpll_core_m4_div2_ck",
  569. .prcm = {
  570. .omap4 = {
  571. .clkctrl_offs = AM33XX_CM_WKUP_CONTROL_CLKCTRL_OFFSET,
  572. .modulemode = MODULEMODE_SWCTRL,
  573. },
  574. },
  575. };
  576. /*
  577. * 'cpgmac' class
  578. * cpsw/cpgmac sub system
  579. */
  580. static struct omap_hwmod_class_sysconfig am33xx_cpgmac_sysc = {
  581. .rev_offs = 0x0,
  582. .sysc_offs = 0x8,
  583. .syss_offs = 0x4,
  584. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
  585. SYSS_HAS_RESET_STATUS),
  586. .idlemodes = (SIDLE_FORCE | SIDLE_NO | MSTANDBY_FORCE |
  587. MSTANDBY_NO),
  588. .sysc_fields = &omap_hwmod_sysc_type3,
  589. };
  590. static struct omap_hwmod_class am33xx_cpgmac0_hwmod_class = {
  591. .name = "cpgmac0",
  592. .sysc = &am33xx_cpgmac_sysc,
  593. };
  594. static struct omap_hwmod_irq_info am33xx_cpgmac0_irqs[] = {
  595. { .name = "c0_rx_thresh_pend", .irq = 40 + OMAP_INTC_START, },
  596. { .name = "c0_rx_pend", .irq = 41 + OMAP_INTC_START, },
  597. { .name = "c0_tx_pend", .irq = 42 + OMAP_INTC_START, },
  598. { .name = "c0_misc_pend", .irq = 43 + OMAP_INTC_START, },
  599. { .irq = -1 },
  600. };
  601. static struct omap_hwmod am33xx_cpgmac0_hwmod = {
  602. .name = "cpgmac0",
  603. .class = &am33xx_cpgmac0_hwmod_class,
  604. .clkdm_name = "cpsw_125mhz_clkdm",
  605. .flags = (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY),
  606. .mpu_irqs = am33xx_cpgmac0_irqs,
  607. .main_clk = "cpsw_125mhz_gclk",
  608. .prcm = {
  609. .omap4 = {
  610. .clkctrl_offs = AM33XX_CM_PER_CPGMAC0_CLKCTRL_OFFSET,
  611. .modulemode = MODULEMODE_SWCTRL,
  612. },
  613. },
  614. };
  615. /*
  616. * mdio class
  617. */
  618. static struct omap_hwmod_class am33xx_mdio_hwmod_class = {
  619. .name = "davinci_mdio",
  620. };
  621. static struct omap_hwmod am33xx_mdio_hwmod = {
  622. .name = "davinci_mdio",
  623. .class = &am33xx_mdio_hwmod_class,
  624. .clkdm_name = "cpsw_125mhz_clkdm",
  625. .main_clk = "cpsw_125mhz_gclk",
  626. };
  627. /*
  628. * dcan class
  629. */
  630. static struct omap_hwmod_class am33xx_dcan_hwmod_class = {
  631. .name = "d_can",
  632. };
  633. /* dcan0 */
  634. static struct omap_hwmod_irq_info am33xx_dcan0_irqs[] = {
  635. { .name = "d_can_ms", .irq = 52 + OMAP_INTC_START, },
  636. { .name = "d_can_mo", .irq = 53 + OMAP_INTC_START, },
  637. { .irq = -1 },
  638. };
  639. static struct omap_hwmod am33xx_dcan0_hwmod = {
  640. .name = "d_can0",
  641. .class = &am33xx_dcan_hwmod_class,
  642. .clkdm_name = "l4ls_clkdm",
  643. .mpu_irqs = am33xx_dcan0_irqs,
  644. .main_clk = "dcan0_fck",
  645. .prcm = {
  646. .omap4 = {
  647. .clkctrl_offs = AM33XX_CM_PER_DCAN0_CLKCTRL_OFFSET,
  648. .modulemode = MODULEMODE_SWCTRL,
  649. },
  650. },
  651. };
  652. /* dcan1 */
  653. static struct omap_hwmod_irq_info am33xx_dcan1_irqs[] = {
  654. { .name = "d_can_ms", .irq = 55 + OMAP_INTC_START, },
  655. { .name = "d_can_mo", .irq = 56 + OMAP_INTC_START, },
  656. { .irq = -1 },
  657. };
  658. static struct omap_hwmod am33xx_dcan1_hwmod = {
  659. .name = "d_can1",
  660. .class = &am33xx_dcan_hwmod_class,
  661. .clkdm_name = "l4ls_clkdm",
  662. .mpu_irqs = am33xx_dcan1_irqs,
  663. .main_clk = "dcan1_fck",
  664. .prcm = {
  665. .omap4 = {
  666. .clkctrl_offs = AM33XX_CM_PER_DCAN1_CLKCTRL_OFFSET,
  667. .modulemode = MODULEMODE_SWCTRL,
  668. },
  669. },
  670. };
  671. /* elm */
  672. static struct omap_hwmod_class_sysconfig am33xx_elm_sysc = {
  673. .rev_offs = 0x0000,
  674. .sysc_offs = 0x0010,
  675. .syss_offs = 0x0014,
  676. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  677. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  678. SYSS_HAS_RESET_STATUS),
  679. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  680. .sysc_fields = &omap_hwmod_sysc_type1,
  681. };
  682. static struct omap_hwmod_class am33xx_elm_hwmod_class = {
  683. .name = "elm",
  684. .sysc = &am33xx_elm_sysc,
  685. };
  686. static struct omap_hwmod_irq_info am33xx_elm_irqs[] = {
  687. { .irq = 4 + OMAP_INTC_START, },
  688. { .irq = -1 },
  689. };
  690. static struct omap_hwmod am33xx_elm_hwmod = {
  691. .name = "elm",
  692. .class = &am33xx_elm_hwmod_class,
  693. .clkdm_name = "l4ls_clkdm",
  694. .mpu_irqs = am33xx_elm_irqs,
  695. .main_clk = "l4ls_gclk",
  696. .prcm = {
  697. .omap4 = {
  698. .clkctrl_offs = AM33XX_CM_PER_ELM_CLKCTRL_OFFSET,
  699. .modulemode = MODULEMODE_SWCTRL,
  700. },
  701. },
  702. };
  703. /*
  704. * 'epwmss' class: ecap0,1,2, ehrpwm0,1,2
  705. */
  706. static struct omap_hwmod_class_sysconfig am33xx_epwmss_sysc = {
  707. .rev_offs = 0x0,
  708. .sysc_offs = 0x4,
  709. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE),
  710. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  711. SIDLE_SMART_WKUP | MSTANDBY_FORCE | MSTANDBY_NO |
  712. MSTANDBY_SMART | MSTANDBY_SMART_WKUP),
  713. .sysc_fields = &omap_hwmod_sysc_type2,
  714. };
  715. static struct omap_hwmod_class am33xx_epwmss_hwmod_class = {
  716. .name = "epwmss",
  717. .sysc = &am33xx_epwmss_sysc,
  718. };
  719. /* ehrpwm0 */
  720. static struct omap_hwmod_irq_info am33xx_ehrpwm0_irqs[] = {
  721. { .name = "int", .irq = 86 + OMAP_INTC_START, },
  722. { .name = "tzint", .irq = 58 + OMAP_INTC_START, },
  723. { .irq = -1 },
  724. };
  725. static struct omap_hwmod am33xx_ehrpwm0_hwmod = {
  726. .name = "ehrpwm0",
  727. .class = &am33xx_epwmss_hwmod_class,
  728. .clkdm_name = "l4ls_clkdm",
  729. .mpu_irqs = am33xx_ehrpwm0_irqs,
  730. .main_clk = "l4ls_gclk",
  731. .prcm = {
  732. .omap4 = {
  733. .clkctrl_offs = AM33XX_CM_PER_EPWMSS0_CLKCTRL_OFFSET,
  734. .modulemode = MODULEMODE_SWCTRL,
  735. },
  736. },
  737. };
  738. /* ehrpwm1 */
  739. static struct omap_hwmod_irq_info am33xx_ehrpwm1_irqs[] = {
  740. { .name = "int", .irq = 87 + OMAP_INTC_START, },
  741. { .name = "tzint", .irq = 59 + OMAP_INTC_START, },
  742. { .irq = -1 },
  743. };
  744. static struct omap_hwmod am33xx_ehrpwm1_hwmod = {
  745. .name = "ehrpwm1",
  746. .class = &am33xx_epwmss_hwmod_class,
  747. .clkdm_name = "l4ls_clkdm",
  748. .mpu_irqs = am33xx_ehrpwm1_irqs,
  749. .main_clk = "l4ls_gclk",
  750. .prcm = {
  751. .omap4 = {
  752. .clkctrl_offs = AM33XX_CM_PER_EPWMSS1_CLKCTRL_OFFSET,
  753. .modulemode = MODULEMODE_SWCTRL,
  754. },
  755. },
  756. };
  757. /* ehrpwm2 */
  758. static struct omap_hwmod_irq_info am33xx_ehrpwm2_irqs[] = {
  759. { .name = "int", .irq = 39 + OMAP_INTC_START, },
  760. { .name = "tzint", .irq = 60 + OMAP_INTC_START, },
  761. { .irq = -1 },
  762. };
  763. static struct omap_hwmod am33xx_ehrpwm2_hwmod = {
  764. .name = "ehrpwm2",
  765. .class = &am33xx_epwmss_hwmod_class,
  766. .clkdm_name = "l4ls_clkdm",
  767. .mpu_irqs = am33xx_ehrpwm2_irqs,
  768. .main_clk = "l4ls_gclk",
  769. .prcm = {
  770. .omap4 = {
  771. .clkctrl_offs = AM33XX_CM_PER_EPWMSS2_CLKCTRL_OFFSET,
  772. .modulemode = MODULEMODE_SWCTRL,
  773. },
  774. },
  775. };
  776. /* ecap0 */
  777. static struct omap_hwmod_irq_info am33xx_ecap0_irqs[] = {
  778. { .irq = 31 + OMAP_INTC_START, },
  779. { .irq = -1 },
  780. };
  781. static struct omap_hwmod am33xx_ecap0_hwmod = {
  782. .name = "ecap0",
  783. .class = &am33xx_epwmss_hwmod_class,
  784. .clkdm_name = "l4ls_clkdm",
  785. .mpu_irqs = am33xx_ecap0_irqs,
  786. .main_clk = "l4ls_gclk",
  787. .prcm = {
  788. .omap4 = {
  789. .clkctrl_offs = AM33XX_CM_PER_EPWMSS0_CLKCTRL_OFFSET,
  790. .modulemode = MODULEMODE_SWCTRL,
  791. },
  792. },
  793. };
  794. /* ecap1 */
  795. static struct omap_hwmod_irq_info am33xx_ecap1_irqs[] = {
  796. { .irq = 47 + OMAP_INTC_START, },
  797. { .irq = -1 },
  798. };
  799. static struct omap_hwmod am33xx_ecap1_hwmod = {
  800. .name = "ecap1",
  801. .class = &am33xx_epwmss_hwmod_class,
  802. .clkdm_name = "l4ls_clkdm",
  803. .mpu_irqs = am33xx_ecap1_irqs,
  804. .main_clk = "l4ls_gclk",
  805. .prcm = {
  806. .omap4 = {
  807. .clkctrl_offs = AM33XX_CM_PER_EPWMSS1_CLKCTRL_OFFSET,
  808. .modulemode = MODULEMODE_SWCTRL,
  809. },
  810. },
  811. };
  812. /* ecap2 */
  813. static struct omap_hwmod_irq_info am33xx_ecap2_irqs[] = {
  814. { .irq = 61 + OMAP_INTC_START, },
  815. { .irq = -1 },
  816. };
  817. static struct omap_hwmod am33xx_ecap2_hwmod = {
  818. .name = "ecap2",
  819. .mpu_irqs = am33xx_ecap2_irqs,
  820. .class = &am33xx_epwmss_hwmod_class,
  821. .clkdm_name = "l4ls_clkdm",
  822. .main_clk = "l4ls_gclk",
  823. .prcm = {
  824. .omap4 = {
  825. .clkctrl_offs = AM33XX_CM_PER_EPWMSS2_CLKCTRL_OFFSET,
  826. .modulemode = MODULEMODE_SWCTRL,
  827. },
  828. },
  829. };
  830. /*
  831. * 'gpio' class: for gpio 0,1,2,3
  832. */
  833. static struct omap_hwmod_class_sysconfig am33xx_gpio_sysc = {
  834. .rev_offs = 0x0000,
  835. .sysc_offs = 0x0010,
  836. .syss_offs = 0x0114,
  837. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
  838. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  839. SYSS_HAS_RESET_STATUS),
  840. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  841. SIDLE_SMART_WKUP),
  842. .sysc_fields = &omap_hwmod_sysc_type1,
  843. };
  844. static struct omap_hwmod_class am33xx_gpio_hwmod_class = {
  845. .name = "gpio",
  846. .sysc = &am33xx_gpio_sysc,
  847. .rev = 2,
  848. };
  849. static struct omap_gpio_dev_attr gpio_dev_attr = {
  850. .bank_width = 32,
  851. .dbck_flag = true,
  852. };
  853. /* gpio0 */
  854. static struct omap_hwmod_opt_clk gpio0_opt_clks[] = {
  855. { .role = "dbclk", .clk = "gpio0_dbclk" },
  856. };
  857. static struct omap_hwmod_irq_info am33xx_gpio0_irqs[] = {
  858. { .irq = 96 + OMAP_INTC_START, },
  859. { .irq = -1 },
  860. };
  861. static struct omap_hwmod am33xx_gpio0_hwmod = {
  862. .name = "gpio1",
  863. .class = &am33xx_gpio_hwmod_class,
  864. .clkdm_name = "l4_wkup_clkdm",
  865. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  866. .mpu_irqs = am33xx_gpio0_irqs,
  867. .main_clk = "dpll_core_m4_div2_ck",
  868. .prcm = {
  869. .omap4 = {
  870. .clkctrl_offs = AM33XX_CM_WKUP_GPIO0_CLKCTRL_OFFSET,
  871. .modulemode = MODULEMODE_SWCTRL,
  872. },
  873. },
  874. .opt_clks = gpio0_opt_clks,
  875. .opt_clks_cnt = ARRAY_SIZE(gpio0_opt_clks),
  876. .dev_attr = &gpio_dev_attr,
  877. };
  878. /* gpio1 */
  879. static struct omap_hwmod_irq_info am33xx_gpio1_irqs[] = {
  880. { .irq = 98 + OMAP_INTC_START, },
  881. { .irq = -1 },
  882. };
  883. static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
  884. { .role = "dbclk", .clk = "gpio1_dbclk" },
  885. };
  886. static struct omap_hwmod am33xx_gpio1_hwmod = {
  887. .name = "gpio2",
  888. .class = &am33xx_gpio_hwmod_class,
  889. .clkdm_name = "l4ls_clkdm",
  890. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  891. .mpu_irqs = am33xx_gpio1_irqs,
  892. .main_clk = "l4ls_gclk",
  893. .prcm = {
  894. .omap4 = {
  895. .clkctrl_offs = AM33XX_CM_PER_GPIO1_CLKCTRL_OFFSET,
  896. .modulemode = MODULEMODE_SWCTRL,
  897. },
  898. },
  899. .opt_clks = gpio1_opt_clks,
  900. .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
  901. .dev_attr = &gpio_dev_attr,
  902. };
  903. /* gpio2 */
  904. static struct omap_hwmod_irq_info am33xx_gpio2_irqs[] = {
  905. { .irq = 32 + OMAP_INTC_START, },
  906. { .irq = -1 },
  907. };
  908. static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
  909. { .role = "dbclk", .clk = "gpio2_dbclk" },
  910. };
  911. static struct omap_hwmod am33xx_gpio2_hwmod = {
  912. .name = "gpio3",
  913. .class = &am33xx_gpio_hwmod_class,
  914. .clkdm_name = "l4ls_clkdm",
  915. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  916. .mpu_irqs = am33xx_gpio2_irqs,
  917. .main_clk = "l4ls_gclk",
  918. .prcm = {
  919. .omap4 = {
  920. .clkctrl_offs = AM33XX_CM_PER_GPIO2_CLKCTRL_OFFSET,
  921. .modulemode = MODULEMODE_SWCTRL,
  922. },
  923. },
  924. .opt_clks = gpio2_opt_clks,
  925. .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
  926. .dev_attr = &gpio_dev_attr,
  927. };
  928. /* gpio3 */
  929. static struct omap_hwmod_irq_info am33xx_gpio3_irqs[] = {
  930. { .irq = 62 + OMAP_INTC_START, },
  931. { .irq = -1 },
  932. };
  933. static struct omap_hwmod_opt_clk gpio3_opt_clks[] = {
  934. { .role = "dbclk", .clk = "gpio3_dbclk" },
  935. };
  936. static struct omap_hwmod am33xx_gpio3_hwmod = {
  937. .name = "gpio4",
  938. .class = &am33xx_gpio_hwmod_class,
  939. .clkdm_name = "l4ls_clkdm",
  940. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  941. .mpu_irqs = am33xx_gpio3_irqs,
  942. .main_clk = "l4ls_gclk",
  943. .prcm = {
  944. .omap4 = {
  945. .clkctrl_offs = AM33XX_CM_PER_GPIO3_CLKCTRL_OFFSET,
  946. .modulemode = MODULEMODE_SWCTRL,
  947. },
  948. },
  949. .opt_clks = gpio3_opt_clks,
  950. .opt_clks_cnt = ARRAY_SIZE(gpio3_opt_clks),
  951. .dev_attr = &gpio_dev_attr,
  952. };
  953. /* gpmc */
  954. static struct omap_hwmod_class_sysconfig gpmc_sysc = {
  955. .rev_offs = 0x0,
  956. .sysc_offs = 0x10,
  957. .syss_offs = 0x14,
  958. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
  959. SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  960. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  961. .sysc_fields = &omap_hwmod_sysc_type1,
  962. };
  963. static struct omap_hwmod_class am33xx_gpmc_hwmod_class = {
  964. .name = "gpmc",
  965. .sysc = &gpmc_sysc,
  966. };
  967. static struct omap_hwmod_irq_info am33xx_gpmc_irqs[] = {
  968. { .irq = 100 + OMAP_INTC_START, },
  969. { .irq = -1 },
  970. };
  971. static struct omap_hwmod am33xx_gpmc_hwmod = {
  972. .name = "gpmc",
  973. .class = &am33xx_gpmc_hwmod_class,
  974. .clkdm_name = "l3s_clkdm",
  975. .flags = (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET),
  976. .mpu_irqs = am33xx_gpmc_irqs,
  977. .main_clk = "l3s_gclk",
  978. .prcm = {
  979. .omap4 = {
  980. .clkctrl_offs = AM33XX_CM_PER_GPMC_CLKCTRL_OFFSET,
  981. .modulemode = MODULEMODE_SWCTRL,
  982. },
  983. },
  984. };
  985. /* 'i2c' class */
  986. static struct omap_hwmod_class_sysconfig am33xx_i2c_sysc = {
  987. .sysc_offs = 0x0010,
  988. .syss_offs = 0x0090,
  989. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_CLOCKACTIVITY |
  990. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
  991. SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  992. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  993. SIDLE_SMART_WKUP),
  994. .sysc_fields = &omap_hwmod_sysc_type1,
  995. };
  996. static struct omap_hwmod_class i2c_class = {
  997. .name = "i2c",
  998. .sysc = &am33xx_i2c_sysc,
  999. .rev = OMAP_I2C_IP_VERSION_2,
  1000. .reset = &omap_i2c_reset,
  1001. };
  1002. static struct omap_i2c_dev_attr i2c_dev_attr = {
  1003. .flags = OMAP_I2C_FLAG_BUS_SHIFT_NONE,
  1004. };
  1005. /* i2c1 */
  1006. static struct omap_hwmod_irq_info i2c1_mpu_irqs[] = {
  1007. { .irq = 70 + OMAP_INTC_START, },
  1008. { .irq = -1 },
  1009. };
  1010. static struct omap_hwmod_dma_info i2c1_edma_reqs[] = {
  1011. { .name = "tx", .dma_req = 0, },
  1012. { .name = "rx", .dma_req = 0, },
  1013. { .dma_req = -1 }
  1014. };
  1015. static struct omap_hwmod am33xx_i2c1_hwmod = {
  1016. .name = "i2c1",
  1017. .class = &i2c_class,
  1018. .clkdm_name = "l4_wkup_clkdm",
  1019. .mpu_irqs = i2c1_mpu_irqs,
  1020. .sdma_reqs = i2c1_edma_reqs,
  1021. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  1022. .main_clk = "dpll_per_m2_div4_wkupdm_ck",
  1023. .prcm = {
  1024. .omap4 = {
  1025. .clkctrl_offs = AM33XX_CM_WKUP_I2C0_CLKCTRL_OFFSET,
  1026. .modulemode = MODULEMODE_SWCTRL,
  1027. },
  1028. },
  1029. .dev_attr = &i2c_dev_attr,
  1030. };
  1031. /* i2c1 */
  1032. static struct omap_hwmod_irq_info i2c2_mpu_irqs[] = {
  1033. { .irq = 71 + OMAP_INTC_START, },
  1034. { .irq = -1 },
  1035. };
  1036. static struct omap_hwmod_dma_info i2c2_edma_reqs[] = {
  1037. { .name = "tx", .dma_req = 0, },
  1038. { .name = "rx", .dma_req = 0, },
  1039. { .dma_req = -1 }
  1040. };
  1041. static struct omap_hwmod am33xx_i2c2_hwmod = {
  1042. .name = "i2c2",
  1043. .class = &i2c_class,
  1044. .clkdm_name = "l4ls_clkdm",
  1045. .mpu_irqs = i2c2_mpu_irqs,
  1046. .sdma_reqs = i2c2_edma_reqs,
  1047. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  1048. .main_clk = "dpll_per_m2_div4_ck",
  1049. .prcm = {
  1050. .omap4 = {
  1051. .clkctrl_offs = AM33XX_CM_PER_I2C1_CLKCTRL_OFFSET,
  1052. .modulemode = MODULEMODE_SWCTRL,
  1053. },
  1054. },
  1055. .dev_attr = &i2c_dev_attr,
  1056. };
  1057. /* i2c3 */
  1058. static struct omap_hwmod_dma_info i2c3_edma_reqs[] = {
  1059. { .name = "tx", .dma_req = 0, },
  1060. { .name = "rx", .dma_req = 0, },
  1061. { .dma_req = -1 }
  1062. };
  1063. static struct omap_hwmod_irq_info i2c3_mpu_irqs[] = {
  1064. { .irq = 30 + OMAP_INTC_START, },
  1065. { .irq = -1 },
  1066. };
  1067. static struct omap_hwmod am33xx_i2c3_hwmod = {
  1068. .name = "i2c3",
  1069. .class = &i2c_class,
  1070. .clkdm_name = "l4ls_clkdm",
  1071. .mpu_irqs = i2c3_mpu_irqs,
  1072. .sdma_reqs = i2c3_edma_reqs,
  1073. .flags = HWMOD_16BIT_REG | HWMOD_SET_DEFAULT_CLOCKACT,
  1074. .main_clk = "dpll_per_m2_div4_ck",
  1075. .prcm = {
  1076. .omap4 = {
  1077. .clkctrl_offs = AM33XX_CM_PER_I2C2_CLKCTRL_OFFSET,
  1078. .modulemode = MODULEMODE_SWCTRL,
  1079. },
  1080. },
  1081. .dev_attr = &i2c_dev_attr,
  1082. };
  1083. /* lcdc */
  1084. static struct omap_hwmod_class_sysconfig lcdc_sysc = {
  1085. .rev_offs = 0x0,
  1086. .sysc_offs = 0x54,
  1087. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE),
  1088. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1089. .sysc_fields = &omap_hwmod_sysc_type2,
  1090. };
  1091. static struct omap_hwmod_class am33xx_lcdc_hwmod_class = {
  1092. .name = "lcdc",
  1093. .sysc = &lcdc_sysc,
  1094. };
  1095. static struct omap_hwmod_irq_info am33xx_lcdc_irqs[] = {
  1096. { .irq = 36 + OMAP_INTC_START, },
  1097. { .irq = -1 },
  1098. };
  1099. static struct omap_hwmod am33xx_lcdc_hwmod = {
  1100. .name = "lcdc",
  1101. .class = &am33xx_lcdc_hwmod_class,
  1102. .clkdm_name = "lcdc_clkdm",
  1103. .mpu_irqs = am33xx_lcdc_irqs,
  1104. .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
  1105. .main_clk = "lcd_gclk",
  1106. .prcm = {
  1107. .omap4 = {
  1108. .clkctrl_offs = AM33XX_CM_PER_LCDC_CLKCTRL_OFFSET,
  1109. .modulemode = MODULEMODE_SWCTRL,
  1110. },
  1111. },
  1112. };
  1113. /*
  1114. * 'mailbox' class
  1115. * mailbox module allowing communication between the on-chip processors using a
  1116. * queued mailbox-interrupt mechanism.
  1117. */
  1118. static struct omap_hwmod_class_sysconfig am33xx_mailbox_sysc = {
  1119. .rev_offs = 0x0000,
  1120. .sysc_offs = 0x0010,
  1121. .sysc_flags = (SYSC_HAS_RESET_STATUS | SYSC_HAS_SIDLEMODE |
  1122. SYSC_HAS_SOFTRESET),
  1123. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1124. .sysc_fields = &omap_hwmod_sysc_type2,
  1125. };
  1126. static struct omap_hwmod_class am33xx_mailbox_hwmod_class = {
  1127. .name = "mailbox",
  1128. .sysc = &am33xx_mailbox_sysc,
  1129. };
  1130. static struct omap_hwmod_irq_info am33xx_mailbox_irqs[] = {
  1131. { .irq = 77 + OMAP_INTC_START, },
  1132. { .irq = -1 },
  1133. };
  1134. static struct omap_hwmod am33xx_mailbox_hwmod = {
  1135. .name = "mailbox",
  1136. .class = &am33xx_mailbox_hwmod_class,
  1137. .clkdm_name = "l4ls_clkdm",
  1138. .mpu_irqs = am33xx_mailbox_irqs,
  1139. .main_clk = "l4ls_gclk",
  1140. .prcm = {
  1141. .omap4 = {
  1142. .clkctrl_offs = AM33XX_CM_PER_MAILBOX0_CLKCTRL_OFFSET,
  1143. .modulemode = MODULEMODE_SWCTRL,
  1144. },
  1145. },
  1146. };
  1147. /*
  1148. * 'mcasp' class
  1149. */
  1150. static struct omap_hwmod_class_sysconfig am33xx_mcasp_sysc = {
  1151. .rev_offs = 0x0,
  1152. .sysc_offs = 0x4,
  1153. .sysc_flags = SYSC_HAS_SIDLEMODE,
  1154. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1155. .sysc_fields = &omap_hwmod_sysc_type3,
  1156. };
  1157. static struct omap_hwmod_class am33xx_mcasp_hwmod_class = {
  1158. .name = "mcasp",
  1159. .sysc = &am33xx_mcasp_sysc,
  1160. };
  1161. /* mcasp0 */
  1162. static struct omap_hwmod_irq_info am33xx_mcasp0_irqs[] = {
  1163. { .name = "ax", .irq = 80 + OMAP_INTC_START, },
  1164. { .name = "ar", .irq = 81 + OMAP_INTC_START, },
  1165. { .irq = -1 },
  1166. };
  1167. static struct omap_hwmod_dma_info am33xx_mcasp0_edma_reqs[] = {
  1168. { .name = "tx", .dma_req = 8, },
  1169. { .name = "rx", .dma_req = 9, },
  1170. { .dma_req = -1 }
  1171. };
  1172. static struct omap_hwmod am33xx_mcasp0_hwmod = {
  1173. .name = "mcasp0",
  1174. .class = &am33xx_mcasp_hwmod_class,
  1175. .clkdm_name = "l3s_clkdm",
  1176. .mpu_irqs = am33xx_mcasp0_irqs,
  1177. .sdma_reqs = am33xx_mcasp0_edma_reqs,
  1178. .main_clk = "mcasp0_fck",
  1179. .prcm = {
  1180. .omap4 = {
  1181. .clkctrl_offs = AM33XX_CM_PER_MCASP0_CLKCTRL_OFFSET,
  1182. .modulemode = MODULEMODE_SWCTRL,
  1183. },
  1184. },
  1185. };
  1186. /* mcasp1 */
  1187. static struct omap_hwmod_irq_info am33xx_mcasp1_irqs[] = {
  1188. { .name = "ax", .irq = 82 + OMAP_INTC_START, },
  1189. { .name = "ar", .irq = 83 + OMAP_INTC_START, },
  1190. { .irq = -1 },
  1191. };
  1192. static struct omap_hwmod_dma_info am33xx_mcasp1_edma_reqs[] = {
  1193. { .name = "tx", .dma_req = 10, },
  1194. { .name = "rx", .dma_req = 11, },
  1195. { .dma_req = -1 }
  1196. };
  1197. static struct omap_hwmod am33xx_mcasp1_hwmod = {
  1198. .name = "mcasp1",
  1199. .class = &am33xx_mcasp_hwmod_class,
  1200. .clkdm_name = "l3s_clkdm",
  1201. .mpu_irqs = am33xx_mcasp1_irqs,
  1202. .sdma_reqs = am33xx_mcasp1_edma_reqs,
  1203. .main_clk = "mcasp1_fck",
  1204. .prcm = {
  1205. .omap4 = {
  1206. .clkctrl_offs = AM33XX_CM_PER_MCASP1_CLKCTRL_OFFSET,
  1207. .modulemode = MODULEMODE_SWCTRL,
  1208. },
  1209. },
  1210. };
  1211. /* 'mmc' class */
  1212. static struct omap_hwmod_class_sysconfig am33xx_mmc_sysc = {
  1213. .rev_offs = 0x1fc,
  1214. .sysc_offs = 0x10,
  1215. .syss_offs = 0x14,
  1216. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1217. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1218. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  1219. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1220. .sysc_fields = &omap_hwmod_sysc_type1,
  1221. };
  1222. static struct omap_hwmod_class am33xx_mmc_hwmod_class = {
  1223. .name = "mmc",
  1224. .sysc = &am33xx_mmc_sysc,
  1225. };
  1226. /* mmc0 */
  1227. static struct omap_hwmod_irq_info am33xx_mmc0_irqs[] = {
  1228. { .irq = 64 + OMAP_INTC_START, },
  1229. { .irq = -1 },
  1230. };
  1231. static struct omap_hwmod_dma_info am33xx_mmc0_edma_reqs[] = {
  1232. { .name = "tx", .dma_req = 24, },
  1233. { .name = "rx", .dma_req = 25, },
  1234. { .dma_req = -1 }
  1235. };
  1236. static struct omap_mmc_dev_attr am33xx_mmc0_dev_attr = {
  1237. .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
  1238. };
  1239. static struct omap_hwmod am33xx_mmc0_hwmod = {
  1240. .name = "mmc1",
  1241. .class = &am33xx_mmc_hwmod_class,
  1242. .clkdm_name = "l4ls_clkdm",
  1243. .mpu_irqs = am33xx_mmc0_irqs,
  1244. .sdma_reqs = am33xx_mmc0_edma_reqs,
  1245. .main_clk = "mmc_clk",
  1246. .prcm = {
  1247. .omap4 = {
  1248. .clkctrl_offs = AM33XX_CM_PER_MMC0_CLKCTRL_OFFSET,
  1249. .modulemode = MODULEMODE_SWCTRL,
  1250. },
  1251. },
  1252. .dev_attr = &am33xx_mmc0_dev_attr,
  1253. };
  1254. /* mmc1 */
  1255. static struct omap_hwmod_irq_info am33xx_mmc1_irqs[] = {
  1256. { .irq = 28 + OMAP_INTC_START, },
  1257. { .irq = -1 },
  1258. };
  1259. static struct omap_hwmod_dma_info am33xx_mmc1_edma_reqs[] = {
  1260. { .name = "tx", .dma_req = 2, },
  1261. { .name = "rx", .dma_req = 3, },
  1262. { .dma_req = -1 }
  1263. };
  1264. static struct omap_mmc_dev_attr am33xx_mmc1_dev_attr = {
  1265. .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
  1266. };
  1267. static struct omap_hwmod am33xx_mmc1_hwmod = {
  1268. .name = "mmc2",
  1269. .class = &am33xx_mmc_hwmod_class,
  1270. .clkdm_name = "l4ls_clkdm",
  1271. .mpu_irqs = am33xx_mmc1_irqs,
  1272. .sdma_reqs = am33xx_mmc1_edma_reqs,
  1273. .main_clk = "mmc_clk",
  1274. .prcm = {
  1275. .omap4 = {
  1276. .clkctrl_offs = AM33XX_CM_PER_MMC1_CLKCTRL_OFFSET,
  1277. .modulemode = MODULEMODE_SWCTRL,
  1278. },
  1279. },
  1280. .dev_attr = &am33xx_mmc1_dev_attr,
  1281. };
  1282. /* mmc2 */
  1283. static struct omap_hwmod_irq_info am33xx_mmc2_irqs[] = {
  1284. { .irq = 29 + OMAP_INTC_START, },
  1285. { .irq = -1 },
  1286. };
  1287. static struct omap_hwmod_dma_info am33xx_mmc2_edma_reqs[] = {
  1288. { .name = "tx", .dma_req = 64, },
  1289. { .name = "rx", .dma_req = 65, },
  1290. { .dma_req = -1 }
  1291. };
  1292. static struct omap_mmc_dev_attr am33xx_mmc2_dev_attr = {
  1293. .flags = OMAP_HSMMC_SUPPORTS_DUAL_VOLT,
  1294. };
  1295. static struct omap_hwmod am33xx_mmc2_hwmod = {
  1296. .name = "mmc3",
  1297. .class = &am33xx_mmc_hwmod_class,
  1298. .clkdm_name = "l3s_clkdm",
  1299. .mpu_irqs = am33xx_mmc2_irqs,
  1300. .sdma_reqs = am33xx_mmc2_edma_reqs,
  1301. .main_clk = "mmc_clk",
  1302. .prcm = {
  1303. .omap4 = {
  1304. .clkctrl_offs = AM33XX_CM_PER_MMC2_CLKCTRL_OFFSET,
  1305. .modulemode = MODULEMODE_SWCTRL,
  1306. },
  1307. },
  1308. .dev_attr = &am33xx_mmc2_dev_attr,
  1309. };
  1310. /*
  1311. * 'rtc' class
  1312. * rtc subsystem
  1313. */
  1314. static struct omap_hwmod_class_sysconfig am33xx_rtc_sysc = {
  1315. .rev_offs = 0x0074,
  1316. .sysc_offs = 0x0078,
  1317. .sysc_flags = SYSC_HAS_SIDLEMODE,
  1318. .idlemodes = (SIDLE_FORCE | SIDLE_NO |
  1319. SIDLE_SMART | SIDLE_SMART_WKUP),
  1320. .sysc_fields = &omap_hwmod_sysc_type3,
  1321. };
  1322. static struct omap_hwmod_class am33xx_rtc_hwmod_class = {
  1323. .name = "rtc",
  1324. .sysc = &am33xx_rtc_sysc,
  1325. };
  1326. static struct omap_hwmod_irq_info am33xx_rtc_irqs[] = {
  1327. { .name = "rtcint", .irq = 75 + OMAP_INTC_START, },
  1328. { .name = "rtcalarmint", .irq = 76 + OMAP_INTC_START, },
  1329. { .irq = -1 },
  1330. };
  1331. static struct omap_hwmod am33xx_rtc_hwmod = {
  1332. .name = "rtc",
  1333. .class = &am33xx_rtc_hwmod_class,
  1334. .clkdm_name = "l4_rtc_clkdm",
  1335. .mpu_irqs = am33xx_rtc_irqs,
  1336. .main_clk = "clk_32768_ck",
  1337. .prcm = {
  1338. .omap4 = {
  1339. .clkctrl_offs = AM33XX_CM_RTC_RTC_CLKCTRL_OFFSET,
  1340. .modulemode = MODULEMODE_SWCTRL,
  1341. },
  1342. },
  1343. };
  1344. /* 'spi' class */
  1345. static struct omap_hwmod_class_sysconfig am33xx_mcspi_sysc = {
  1346. .rev_offs = 0x0000,
  1347. .sysc_offs = 0x0110,
  1348. .syss_offs = 0x0114,
  1349. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1350. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  1351. SYSS_HAS_RESET_STATUS),
  1352. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1353. .sysc_fields = &omap_hwmod_sysc_type1,
  1354. };
  1355. static struct omap_hwmod_class am33xx_spi_hwmod_class = {
  1356. .name = "mcspi",
  1357. .sysc = &am33xx_mcspi_sysc,
  1358. .rev = OMAP4_MCSPI_REV,
  1359. };
  1360. /* spi0 */
  1361. static struct omap_hwmod_irq_info am33xx_spi0_irqs[] = {
  1362. { .irq = 65 + OMAP_INTC_START, },
  1363. { .irq = -1 },
  1364. };
  1365. static struct omap_hwmod_dma_info am33xx_mcspi0_edma_reqs[] = {
  1366. { .name = "rx0", .dma_req = 17 },
  1367. { .name = "tx0", .dma_req = 16 },
  1368. { .name = "rx1", .dma_req = 19 },
  1369. { .name = "tx1", .dma_req = 18 },
  1370. { .dma_req = -1 }
  1371. };
  1372. static struct omap2_mcspi_dev_attr mcspi_attrib = {
  1373. .num_chipselect = 2,
  1374. };
  1375. static struct omap_hwmod am33xx_spi0_hwmod = {
  1376. .name = "spi0",
  1377. .class = &am33xx_spi_hwmod_class,
  1378. .clkdm_name = "l4ls_clkdm",
  1379. .mpu_irqs = am33xx_spi0_irqs,
  1380. .sdma_reqs = am33xx_mcspi0_edma_reqs,
  1381. .main_clk = "dpll_per_m2_div4_ck",
  1382. .prcm = {
  1383. .omap4 = {
  1384. .clkctrl_offs = AM33XX_CM_PER_SPI0_CLKCTRL_OFFSET,
  1385. .modulemode = MODULEMODE_SWCTRL,
  1386. },
  1387. },
  1388. .dev_attr = &mcspi_attrib,
  1389. };
  1390. /* spi1 */
  1391. static struct omap_hwmod_irq_info am33xx_spi1_irqs[] = {
  1392. { .irq = 125 + OMAP_INTC_START, },
  1393. { .irq = -1 },
  1394. };
  1395. static struct omap_hwmod_dma_info am33xx_mcspi1_edma_reqs[] = {
  1396. { .name = "rx0", .dma_req = 43 },
  1397. { .name = "tx0", .dma_req = 42 },
  1398. { .name = "rx1", .dma_req = 45 },
  1399. { .name = "tx1", .dma_req = 44 },
  1400. { .dma_req = -1 }
  1401. };
  1402. static struct omap_hwmod am33xx_spi1_hwmod = {
  1403. .name = "spi1",
  1404. .class = &am33xx_spi_hwmod_class,
  1405. .clkdm_name = "l4ls_clkdm",
  1406. .mpu_irqs = am33xx_spi1_irqs,
  1407. .sdma_reqs = am33xx_mcspi1_edma_reqs,
  1408. .main_clk = "dpll_per_m2_div4_ck",
  1409. .prcm = {
  1410. .omap4 = {
  1411. .clkctrl_offs = AM33XX_CM_PER_SPI1_CLKCTRL_OFFSET,
  1412. .modulemode = MODULEMODE_SWCTRL,
  1413. },
  1414. },
  1415. .dev_attr = &mcspi_attrib,
  1416. };
  1417. /*
  1418. * 'spinlock' class
  1419. * spinlock provides hardware assistance for synchronizing the
  1420. * processes running on multiple processors
  1421. */
  1422. static struct omap_hwmod_class am33xx_spinlock_hwmod_class = {
  1423. .name = "spinlock",
  1424. };
  1425. static struct omap_hwmod am33xx_spinlock_hwmod = {
  1426. .name = "spinlock",
  1427. .class = &am33xx_spinlock_hwmod_class,
  1428. .clkdm_name = "l4ls_clkdm",
  1429. .main_clk = "l4ls_gclk",
  1430. .prcm = {
  1431. .omap4 = {
  1432. .clkctrl_offs = AM33XX_CM_PER_SPINLOCK_CLKCTRL_OFFSET,
  1433. .modulemode = MODULEMODE_SWCTRL,
  1434. },
  1435. },
  1436. };
  1437. /* 'timer 2-7' class */
  1438. static struct omap_hwmod_class_sysconfig am33xx_timer_sysc = {
  1439. .rev_offs = 0x0000,
  1440. .sysc_offs = 0x0010,
  1441. .syss_offs = 0x0014,
  1442. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
  1443. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1444. SIDLE_SMART_WKUP),
  1445. .sysc_fields = &omap_hwmod_sysc_type2,
  1446. };
  1447. static struct omap_hwmod_class am33xx_timer_hwmod_class = {
  1448. .name = "timer",
  1449. .sysc = &am33xx_timer_sysc,
  1450. };
  1451. /* timer1 1ms */
  1452. static struct omap_hwmod_class_sysconfig am33xx_timer1ms_sysc = {
  1453. .rev_offs = 0x0000,
  1454. .sysc_offs = 0x0010,
  1455. .syss_offs = 0x0014,
  1456. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1457. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  1458. SYSS_HAS_RESET_STATUS),
  1459. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1460. .sysc_fields = &omap_hwmod_sysc_type1,
  1461. };
  1462. static struct omap_hwmod_class am33xx_timer1ms_hwmod_class = {
  1463. .name = "timer",
  1464. .sysc = &am33xx_timer1ms_sysc,
  1465. };
  1466. static struct omap_hwmod_irq_info am33xx_timer1_irqs[] = {
  1467. { .irq = 67 + OMAP_INTC_START, },
  1468. { .irq = -1 },
  1469. };