realizationOfDataCalculation.c 35 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474
  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,