omap_hwmod_2xxx_ipblock_data.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743
  1. /*
  2. * omap_hwmod_2xxx_ipblock_data.c - common IP block data for OMAP2xxx
  3. *
  4. * Copyright (C) 2011 Nokia Corporation
  5. * Paul Walmsley
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. */
  11. #include <linux/types.h>
  12. #include <linux/omap-dma.h>
  13. #include "omap_hwmod.h"
  14. #include "omap_hwmod_common_data.h"
  15. #include "cm-regbits-24xx.h"
  16. #include "prm-regbits-24xx.h"
  17. #include "wd_timer.h"
  18. /*
  19. * 'dispc' class
  20. * display controller
  21. */
  22. static struct omap_hwmod_class_sysconfig omap2_dispc_sysc = {
  23. .rev_offs = 0x0000,
  24. .sysc_offs = 0x0010,
  25. .syss_offs = 0x0014,
  26. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
  27. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  28. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  29. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  30. .sysc_fields = &omap_hwmod_sysc_type1,
  31. };
  32. struct omap_hwmod_class omap2_dispc_hwmod_class = {
  33. .name = "dispc",
  34. .sysc = &omap2_dispc_sysc,
  35. };
  36. /* OMAP2xxx Timer Common */
  37. static struct omap_hwmod_class_sysconfig omap2xxx_timer_sysc = {
  38. .rev_offs = 0x0000,
  39. .sysc_offs = 0x0010,
  40. .syss_offs = 0x0014,
  41. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_CLOCKACTIVITY |
  42. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  43. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  44. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  45. .sysc_fields = &omap_hwmod_sysc_type1,
  46. };
  47. struct omap_hwmod_class omap2xxx_timer_hwmod_class = {
  48. .name = "timer",
  49. .sysc = &omap2xxx_timer_sysc,
  50. };
  51. /*
  52. * 'wd_timer' class
  53. * 32-bit watchdog upward counter that generates a pulse on the reset pin on
  54. * overflow condition
  55. */
  56. static struct omap_hwmod_class_sysconfig omap2xxx_wd_timer_sysc = {
  57. .rev_offs = 0x0000,
  58. .sysc_offs = 0x0010,
  59. .syss_offs = 0x0014,
  60. .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET |
  61. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  62. .sysc_fields = &omap_hwmod_sysc_type1,
  63. };
  64. struct omap_hwmod_class omap2xxx_wd_timer_hwmod_class = {
  65. .name = "wd_timer",
  66. .sysc = &omap2xxx_wd_timer_sysc,
  67. .pre_shutdown = &omap2_wd_timer_disable,
  68. .reset = &omap2_wd_timer_reset,
  69. };
  70. /*
  71. * 'gpio' class
  72. * general purpose io module
  73. */
  74. static struct omap_hwmod_class_sysconfig omap2xxx_gpio_sysc = {
  75. .rev_offs = 0x0000,
  76. .sysc_offs = 0x0010,
  77. .syss_offs = 0x0014,
  78. .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
  79. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  80. SYSS_HAS_RESET_STATUS),
  81. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  82. .sysc_fields = &omap_hwmod_sysc_type1,
  83. };
  84. struct omap_hwmod_class omap2xxx_gpio_hwmod_class = {
  85. .name = "gpio",
  86. .sysc = &omap2xxx_gpio_sysc,
  87. .rev = 0,
  88. };
  89. /* system dma */
  90. static struct omap_hwmod_class_sysconfig omap2xxx_dma_sysc = {
  91. .rev_offs = 0x0000,
  92. .sysc_offs = 0x002c,
  93. .syss_offs = 0x0028,
  94. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_MIDLEMODE |
  95. SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_EMUFREE |
  96. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  97. .idlemodes = (MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  98. .sysc_fields = &omap_hwmod_sysc_type1,
  99. };
  100. struct omap_hwmod_class omap2xxx_dma_hwmod_class = {
  101. .name = "dma",
  102. .sysc = &omap2xxx_dma_sysc,
  103. };
  104. /*
  105. * 'mailbox' class
  106. * mailbox module allowing communication between the on-chip processors
  107. * using a queued mailbox-interrupt mechanism.
  108. */
  109. static struct omap_hwmod_class_sysconfig omap2xxx_mailbox_sysc = {
  110. .rev_offs = 0x000,
  111. .sysc_offs = 0x010,
  112. .syss_offs = 0x014,
  113. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  114. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  115. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  116. .sysc_fields = &omap_hwmod_sysc_type1,
  117. };
  118. struct omap_hwmod_class omap2xxx_mailbox_hwmod_class = {
  119. .name = "mailbox",
  120. .sysc = &omap2xxx_mailbox_sysc,
  121. };
  122. /*
  123. * 'mcspi' class
  124. * multichannel serial port interface (mcspi) / master/slave synchronous serial
  125. * bus
  126. */
  127. static struct omap_hwmod_class_sysconfig omap2xxx_mcspi_sysc = {
  128. .rev_offs = 0x0000,
  129. .sysc_offs = 0x0010,
  130. .syss_offs = 0x0014,
  131. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  132. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  133. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  134. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  135. .sysc_fields = &omap_hwmod_sysc_type1,
  136. };
  137. struct omap_hwmod_class omap2xxx_mcspi_class = {
  138. .name = "mcspi",
  139. .sysc = &omap2xxx_mcspi_sysc,
  140. };
  141. /*
  142. * 'gpmc' class
  143. * general purpose memory controller
  144. */
  145. static struct omap_hwmod_class_sysconfig omap2xxx_gpmc_sysc = {
  146. .rev_offs = 0x0000,
  147. .sysc_offs = 0x0010,
  148. .syss_offs = 0x0014,
  149. .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SIDLEMODE |
  150. SYSC_HAS_SOFTRESET | SYSS_HAS_RESET_STATUS),
  151. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  152. .sysc_fields = &omap_hwmod_sysc_type1,
  153. };
  154. static struct omap_hwmod_class omap2xxx_gpmc_hwmod_class = {
  155. .name = "gpmc",
  156. .sysc = &omap2xxx_gpmc_sysc,
  157. };
  158. /*
  159. * IP blocks
  160. */
  161. /* L3 */
  162. struct omap_hwmod omap2xxx_l3_main_hwmod = {
  163. .name = "l3_main",
  164. .class = &l3_hwmod_class,
  165. .flags = HWMOD_NO_IDLEST,
  166. };
  167. /* L4 CORE */
  168. struct omap_hwmod omap2xxx_l4_core_hwmod = {
  169. .name = "l4_core",
  170. .class = &l4_hwmod_class,
  171. .flags = HWMOD_NO_IDLEST,
  172. };
  173. /* L4 WKUP */
  174. struct omap_hwmod omap2xxx_l4_wkup_hwmod = {
  175. .name = "l4_wkup",
  176. .class = &l4_hwmod_class,
  177. .flags = HWMOD_NO_IDLEST,
  178. };
  179. /* MPU */
  180. struct omap_hwmod omap2xxx_mpu_hwmod = {
  181. .name = "mpu",
  182. .class = &mpu_hwmod_class,
  183. .main_clk = "mpu_ck",
  184. };
  185. /* IVA2 */
  186. struct omap_hwmod omap2xxx_iva_hwmod = {
  187. .name = "iva",
  188. .class = &iva_hwmod_class,
  189. };
  190. /* timer1 */
  191. struct omap_hwmod omap2xxx_timer1_hwmod = {
  192. .name = "timer1",
  193. .main_clk = "gpt1_fck",
  194. .prcm = {
  195. .omap2 = {
  196. .module_offs = WKUP_MOD,
  197. .idlest_reg_id = 1,
  198. .idlest_idle_bit = OMAP24XX_ST_GPT1_SHIFT,
  199. },
  200. },
  201. .class = &omap2xxx_timer_hwmod_class,
  202. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  203. };
  204. /* timer2 */
  205. struct omap_hwmod omap2xxx_timer2_hwmod = {
  206. .name = "timer2",
  207. .main_clk = "gpt2_fck",
  208. .prcm = {
  209. .omap2 = {
  210. .module_offs = CORE_MOD,
  211. .idlest_reg_id = 1,
  212. .idlest_idle_bit = OMAP24XX_ST_GPT2_SHIFT,
  213. },
  214. },
  215. .class = &omap2xxx_timer_hwmod_class,
  216. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  217. };
  218. /* timer3 */
  219. struct omap_hwmod omap2xxx_timer3_hwmod = {
  220. .name = "timer3",
  221. .main_clk = "gpt3_fck",
  222. .prcm = {
  223. .omap2 = {
  224. .module_offs = CORE_MOD,
  225. .idlest_reg_id = 1,
  226. .idlest_idle_bit = OMAP24XX_ST_GPT3_SHIFT,
  227. },
  228. },
  229. .class = &omap2xxx_timer_hwmod_class,
  230. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  231. };
  232. /* timer4 */
  233. struct omap_hwmod omap2xxx_timer4_hwmod = {
  234. .name = "timer4",
  235. .main_clk = "gpt4_fck",
  236. .prcm = {
  237. .omap2 = {
  238. .module_offs = CORE_MOD,
  239. .idlest_reg_id = 1,
  240. .idlest_idle_bit = OMAP24XX_ST_GPT4_SHIFT,
  241. },
  242. },
  243. .class = &omap2xxx_timer_hwmod_class,
  244. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  245. };
  246. /* timer5 */
  247. struct omap_hwmod omap2xxx_timer5_hwmod = {
  248. .name = "timer5",
  249. .main_clk = "gpt5_fck",
  250. .prcm = {
  251. .omap2 = {
  252. .module_offs = CORE_MOD,
  253. .idlest_reg_id = 1,
  254. .idlest_idle_bit = OMAP24XX_ST_GPT5_SHIFT,
  255. },
  256. },
  257. .class = &omap2xxx_timer_hwmod_class,
  258. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  259. };
  260. /* timer6 */
  261. struct omap_hwmod omap2xxx_timer6_hwmod = {
  262. .name = "timer6",
  263. .main_clk = "gpt6_fck",
  264. .prcm = {
  265. .omap2 = {
  266. .module_offs = CORE_MOD,
  267. .idlest_reg_id = 1,
  268. .idlest_idle_bit = OMAP24XX_ST_GPT6_SHIFT,
  269. },
  270. },
  271. .class = &omap2xxx_timer_hwmod_class,
  272. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  273. };
  274. /* timer7 */
  275. struct omap_hwmod omap2xxx_timer7_hwmod = {
  276. .name = "timer7",
  277. .main_clk = "gpt7_fck",
  278. .prcm = {
  279. .omap2 = {
  280. .module_offs = CORE_MOD,
  281. .idlest_reg_id = 1,
  282. .idlest_idle_bit = OMAP24XX_ST_GPT7_SHIFT,
  283. },
  284. },
  285. .class = &omap2xxx_timer_hwmod_class,
  286. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  287. };
  288. /* timer8 */
  289. struct omap_hwmod omap2xxx_timer8_hwmod = {
  290. .name = "timer8",
  291. .main_clk = "gpt8_fck",
  292. .prcm = {
  293. .omap2 = {
  294. .module_offs = CORE_MOD,
  295. .idlest_reg_id = 1,
  296. .idlest_idle_bit = OMAP24XX_ST_GPT8_SHIFT,
  297. },
  298. },
  299. .class = &omap2xxx_timer_hwmod_class,
  300. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  301. };
  302. /* timer9 */
  303. struct omap_hwmod omap2xxx_timer9_hwmod = {
  304. .name = "timer9",
  305. .main_clk = "gpt9_fck",
  306. .prcm = {
  307. .omap2 = {
  308. .module_offs = CORE_MOD,
  309. .idlest_reg_id = 1,
  310. .idlest_idle_bit = OMAP24XX_ST_GPT9_SHIFT,
  311. },
  312. },
  313. .class = &omap2xxx_timer_hwmod_class,
  314. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  315. };
  316. /* timer10 */
  317. struct omap_hwmod omap2xxx_timer10_hwmod = {
  318. .name = "timer10",
  319. .main_clk = "gpt10_fck",
  320. .prcm = {
  321. .omap2 = {
  322. .module_offs = CORE_MOD,
  323. .idlest_reg_id = 1,
  324. .idlest_idle_bit = OMAP24XX_ST_GPT10_SHIFT,
  325. },
  326. },
  327. .class = &omap2xxx_timer_hwmod_class,
  328. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  329. };
  330. /* timer11 */
  331. struct omap_hwmod omap2xxx_timer11_hwmod = {
  332. .name = "timer11",
  333. .main_clk = "gpt11_fck",
  334. .prcm = {
  335. .omap2 = {
  336. .module_offs = CORE_MOD,
  337. .idlest_reg_id = 1,
  338. .idlest_idle_bit = OMAP24XX_ST_GPT11_SHIFT,
  339. },
  340. },
  341. .class = &omap2xxx_timer_hwmod_class,
  342. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  343. };
  344. /* timer12 */
  345. struct omap_hwmod omap2xxx_timer12_hwmod = {
  346. .name = "timer12",
  347. .main_clk = "gpt12_fck",
  348. .prcm = {
  349. .omap2 = {
  350. .module_offs = CORE_MOD,
  351. .idlest_reg_id = 1,
  352. .idlest_idle_bit = OMAP24XX_ST_GPT12_SHIFT,
  353. },
  354. },
  355. .class = &omap2xxx_timer_hwmod_class,
  356. .flags = HWMOD_SET_DEFAULT_CLOCKACT,
  357. };
  358. /* wd_timer2 */
  359. struct omap_hwmod omap2xxx_wd_timer2_hwmod = {
  360. .name = "wd_timer2",
  361. .class = &omap2xxx_wd_timer_hwmod_class,
  362. .main_clk = "mpu_wdt_fck",
  363. .prcm = {
  364. .omap2 = {
  365. .module_offs = WKUP_MOD,
  366. .idlest_reg_id = 1,
  367. .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT,
  368. },
  369. },
  370. };
  371. /* UART1 */
  372. struct omap_hwmod omap2xxx_uart1_hwmod = {
  373. .name = "uart1",
  374. .main_clk = "uart1_fck",
  375. .flags = DEBUG_OMAP2UART1_FLAGS | HWMOD_SWSUP_SIDLE_ACT,
  376. .prcm = {
  377. .omap2 = {
  378. .module_offs = CORE_MOD,
  379. .idlest_reg_id = 1,
  380. .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT,
  381. },
  382. },
  383. .class = &omap2_uart_class,
  384. };
  385. /* UART2 */
  386. struct omap_hwmod omap2xxx_uart2_hwmod = {
  387. .name = "uart2",
  388. .main_clk = "uart2_fck",
  389. .flags = DEBUG_OMAP2UART2_FLAGS | HWMOD_SWSUP_SIDLE_ACT,
  390. .prcm = {
  391. .omap2 = {
  392. .module_offs = CORE_MOD,
  393. .idlest_reg_id = 1,
  394. .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT,
  395. },
  396. },
  397. .class = &omap2_uart_class,
  398. };
  399. /* UART3 */
  400. struct omap_hwmod omap2xxx_uart3_hwmod = {
  401. .name = "uart3",
  402. .main_clk = "uart3_fck",
  403. .flags = DEBUG_OMAP2UART3_FLAGS | HWMOD_SWSUP_SIDLE_ACT,
  404. .prcm = {
  405. .omap2 = {
  406. .module_offs = CORE_MOD,
  407. .idlest_reg_id = 2,
  408. .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT,
  409. },
  410. },
  411. .class = &omap2_uart_class,
  412. };
  413. /* dss */
  414. static struct omap_hwmod_opt_clk dss_opt_clks[] = {
  415. /*
  416. * The DSS HW needs all DSS clocks enabled during reset. The dss_core
  417. * driver does not use these clocks.
  418. */
  419. { .role = "tv_clk", .clk = "dss_54m_fck" },
  420. { .role = "sys_clk", .clk = "dss2_fck" },
  421. };
  422. struct omap_hwmod omap2xxx_dss_core_hwmod = {
  423. .name = "dss_core",
  424. .class = &omap2_dss_hwmod_class,
  425. .main_clk = "dss1_fck", /* instead of dss_fck */
  426. .prcm = {
  427. .omap2 = {
  428. .module_offs = CORE_MOD,
  429. .idlest_reg_id = 1,
  430. },
  431. },
  432. .opt_clks = dss_opt_clks,
  433. .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
  434. .flags = HWMOD_NO_IDLEST | HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  435. };
  436. struct omap_hwmod omap2xxx_dss_dispc_hwmod = {
  437. .name = "dss_dispc",
  438. .class = &omap2_dispc_hwmod_class,
  439. .main_clk = "dss1_fck",
  440. .prcm = {
  441. .omap2 = {
  442. .module_offs = CORE_MOD,
  443. .idlest_reg_id = 1,
  444. },
  445. },
  446. .flags = HWMOD_NO_IDLEST,
  447. .dev_attr = &omap2_3_dss_dispc_dev_attr,
  448. };
  449. static struct omap_hwmod_opt_clk dss_rfbi_opt_clks[] = {
  450. { .role = "ick", .clk = "dss_ick" },
  451. };
  452. struct omap_hwmod omap2xxx_dss_rfbi_hwmod = {
  453. .name = "dss_rfbi",
  454. .class = &omap2_rfbi_hwmod_class,
  455. .main_clk = "dss1_fck",
  456. .prcm = {
  457. .omap2 = {
  458. .module_offs = CORE_MOD,
  459. },
  460. },
  461. .opt_clks = dss_rfbi_opt_clks,
  462. .opt_clks_cnt = ARRAY_SIZE(dss_rfbi_opt_clks),
  463. .flags = HWMOD_NO_IDLEST,
  464. };
  465. struct omap_hwmod omap2xxx_dss_venc_hwmod = {
  466. .name = "dss_venc",
  467. .class = &omap2_venc_hwmod_class,
  468. .main_clk = "dss_54m_fck",
  469. .prcm = {
  470. .omap2 = {
  471. .module_offs = CORE_MOD,
  472. },
  473. },
  474. .flags = HWMOD_NO_IDLEST,
  475. };
  476. /* gpio1 */
  477. struct omap_hwmod omap2xxx_gpio1_hwmod = {
  478. .name = "gpio1",
  479. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  480. .main_clk = "gpios_fck",
  481. .prcm = {
  482. .omap2 = {
  483. .module_offs = WKUP_MOD,
  484. .idlest_reg_id = 1,
  485. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  486. },
  487. },
  488. .class = &omap2xxx_gpio_hwmod_class,
  489. };
  490. /* gpio2 */
  491. struct omap_hwmod omap2xxx_gpio2_hwmod = {
  492. .name = "gpio2",
  493. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  494. .main_clk = "gpios_fck",
  495. .prcm = {
  496. .omap2 = {
  497. .module_offs = WKUP_MOD,
  498. .idlest_reg_id = 1,
  499. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  500. },
  501. },
  502. .class = &omap2xxx_gpio_hwmod_class,
  503. };
  504. /* gpio3 */
  505. struct omap_hwmod omap2xxx_gpio3_hwmod = {
  506. .name = "gpio3",
  507. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  508. .main_clk = "gpios_fck",
  509. .prcm = {
  510. .omap2 = {
  511. .module_offs = WKUP_MOD,
  512. .idlest_reg_id = 1,
  513. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  514. },
  515. },
  516. .class = &omap2xxx_gpio_hwmod_class,
  517. };
  518. /* gpio4 */
  519. struct omap_hwmod omap2xxx_gpio4_hwmod = {
  520. .name = "gpio4",
  521. .flags = HWMOD_CONTROL_OPT_CLKS_IN_RESET,
  522. .main_clk = "gpios_fck",
  523. .prcm = {
  524. .omap2 = {
  525. .module_offs = WKUP_MOD,
  526. .idlest_reg_id = 1,
  527. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  528. },
  529. },
  530. .class = &omap2xxx_gpio_hwmod_class,
  531. };
  532. /* mcspi1 */
  533. struct omap_hwmod omap2xxx_mcspi1_hwmod = {
  534. .name = "mcspi1",
  535. .main_clk = "mcspi1_fck",
  536. .prcm = {
  537. .omap2 = {
  538. .module_offs = CORE_MOD,
  539. .idlest_reg_id = 1,
  540. .idlest_idle_bit = OMAP24XX_ST_MCSPI1_SHIFT,
  541. },
  542. },
  543. .class = &omap2xxx_mcspi_class,
  544. };
  545. /* mcspi2 */
  546. struct omap_hwmod omap2xxx_mcspi2_hwmod = {
  547. .name = "mcspi2",
  548. .main_clk = "mcspi2_fck",
  549. .prcm = {
  550. .omap2 = {
  551. .module_offs = CORE_MOD,
  552. .idlest_reg_id = 1,
  553. .idlest_idle_bit = OMAP24XX_ST_MCSPI2_SHIFT,
  554. },
  555. },
  556. .class = &omap2xxx_mcspi_class,
  557. };
  558. static struct omap_hwmod_class omap2xxx_counter_hwmod_class = {
  559. .name = "counter",
  560. };
  561. struct omap_hwmod omap2xxx_counter_32k_hwmod = {
  562. .name = "counter_32k",
  563. .main_clk = "func_32k_ck",
  564. .prcm = {
  565. .omap2 = {
  566. .module_offs = WKUP_MOD,
  567. .idlest_reg_id = 1,
  568. .idlest_idle_bit = OMAP24XX_ST_32KSYNC_SHIFT,
  569. },
  570. },
  571. .class = &omap2xxx_counter_hwmod_class,
  572. };
  573. /* gpmc */
  574. struct omap_hwmod omap2xxx_gpmc_hwmod = {
  575. .name = "gpmc",
  576. .class = &omap2xxx_gpmc_hwmod_class,
  577. .main_clk = "gpmc_fck",
  578. /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
  579. .flags = HWMOD_NO_IDLEST | DEBUG_OMAP_GPMC_HWMOD_FLAGS,
  580. .prcm = {
  581. .omap2 = {
  582. .module_offs = CORE_MOD,
  583. },
  584. },
  585. };
  586. /* RNG */
  587. static struct omap_hwmod_class_sysconfig omap2_rng_sysc = {
  588. .rev_offs = 0x3c,
  589. .sysc_offs = 0x40,
  590. .syss_offs = 0x44,
  591. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  592. SYSS_HAS_RESET_STATUS),
  593. .sysc_fields = &omap_hwmod_sysc_type1,
  594. };
  595. static struct omap_hwmod_class omap2_rng_hwmod_class = {
  596. .name = "rng",
  597. .sysc = &omap2_rng_sysc,
  598. };
  599. struct omap_hwmod omap2xxx_rng_hwmod = {
  600. .name = "rng",
  601. .main_clk = "l4_ck",
  602. .prcm = {
  603. .omap2 = {
  604. .module_offs = CORE_MOD,
  605. .idlest_reg_id = 4,
  606. .idlest_idle_bit = OMAP24XX_ST_RNG_SHIFT,
  607. },
  608. },
  609. /*
  610. * XXX The first read from the SYSSTATUS register of the RNG
  611. * after the SYSCONFIG SOFTRESET bit is set triggers an
  612. * imprecise external abort. It's unclear why this happens.
  613. * Until this is analyzed, skip the IP block reset.
  614. */
  615. .flags = HWMOD_INIT_NO_RESET,
  616. .class = &omap2_rng_hwmod_class,
  617. };
  618. /* SHAM */
  619. static struct omap_hwmod_class_sysconfig omap2_sham_sysc = {
  620. .rev_offs = 0x5c,
  621. .sysc_offs = 0x60,
  622. .syss_offs = 0x64,
  623. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  624. SYSS_HAS_RESET_STATUS),
  625. .sysc_fields = &omap_hwmod_sysc_type1,
  626. };
  627. static struct omap_hwmod_class omap2xxx_sham_class = {
  628. .name = "sham",
  629. .sysc = &omap2_sham_sysc,
  630. };
  631. struct omap_hwmod omap2xxx_sham_hwmod = {
  632. .name = "sham",
  633. .main_clk = "l4_ck",
  634. .prcm = {
  635. .omap2 = {
  636. .module_offs = CORE_MOD,
  637. .idlest_reg_id = 4,
  638. .idlest_idle_bit = OMAP24XX_ST_SHA_SHIFT,
  639. },
  640. },
  641. .class = &omap2xxx_sham_class,
  642. };
  643. /* AES */
  644. static struct omap_hwmod_class_sysconfig omap2_aes_sysc = {
  645. .rev_offs = 0x44,
  646. .sysc_offs = 0x48,
  647. .syss_offs = 0x4c,
  648. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  649. SYSS_HAS_RESET_STATUS),
  650. .sysc_fields = &omap_hwmod_sysc_type1,
  651. };
  652. static struct omap_hwmod_class omap2xxx_aes_class = {
  653. .name = "aes",
  654. .sysc = &omap2_aes_sysc,
  655. };
  656. struct omap_hwmod omap2xxx_aes_hwmod = {
  657. .name = "aes",
  658. .main_clk = "l4_ck",
  659. .prcm = {
  660. .omap2 = {
  661. .module_offs = CORE_MOD,
  662. .idlest_reg_id = 4,
  663. .idlest_idle_bit = OMAP24XX_ST_AES_SHIFT,
  664. },
  665. },
  666. .class = &omap2xxx_aes_class,
  667. };