omap_hwmod_2430_data.c 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626
  1. /*
  2. * omap_hwmod_2430_data.c - hardware modules present on the OMAP2430 chips
  3. *
  4. * Copyright (C) 2009-2010 Nokia Corporation
  5. * Paul Walmsley
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. *
  11. * XXX handle crossbar/shared link difference for L3?
  12. * XXX these should be marked initdata for multi-OMAP kernels
  13. */
  14. #include <plat/omap_hwmod.h>
  15. #include <mach/irqs.h>
  16. #include <plat/cpu.h>
  17. #include <plat/dma.h>
  18. #include <plat/serial.h>
  19. #include <plat/i2c.h>
  20. #include <plat/gpio.h>
  21. #include <plat/mcspi.h>
  22. #include <plat/l3_2xxx.h>
  23. #include "omap_hwmod_common_data.h"
  24. #include "prm-regbits-24xx.h"
  25. #include "cm-regbits-24xx.h"
  26. #include "wd_timer.h"
  27. /*
  28. * OMAP2430 hardware module integration data
  29. *
  30. * ALl of the data in this section should be autogeneratable from the
  31. * TI hardware database or other technical documentation. Data that
  32. * is driver-specific or driver-kernel integration-specific belongs
  33. * elsewhere.
  34. */
  35. static struct omap_hwmod omap2430_mpu_hwmod;
  36. static struct omap_hwmod omap2430_iva_hwmod;
  37. static struct omap_hwmod omap2430_l3_main_hwmod;
  38. static struct omap_hwmod omap2430_l4_core_hwmod;
  39. static struct omap_hwmod omap2430_dss_core_hwmod;
  40. static struct omap_hwmod omap2430_dss_dispc_hwmod;
  41. static struct omap_hwmod omap2430_dss_rfbi_hwmod;
  42. static struct omap_hwmod omap2430_dss_venc_hwmod;
  43. static struct omap_hwmod omap2430_wd_timer2_hwmod;
  44. static struct omap_hwmod omap2430_gpio1_hwmod;
  45. static struct omap_hwmod omap2430_gpio2_hwmod;
  46. static struct omap_hwmod omap2430_gpio3_hwmod;
  47. static struct omap_hwmod omap2430_gpio4_hwmod;
  48. static struct omap_hwmod omap2430_gpio5_hwmod;
  49. static struct omap_hwmod omap2430_dma_system_hwmod;
  50. static struct omap_hwmod omap2430_mcspi1_hwmod;
  51. static struct omap_hwmod omap2430_mcspi2_hwmod;
  52. static struct omap_hwmod omap2430_mcspi3_hwmod;
  53. /* L3 -> L4_CORE interface */
  54. static struct omap_hwmod_ocp_if omap2430_l3_main__l4_core = {
  55. .master = &omap2430_l3_main_hwmod,
  56. .slave = &omap2430_l4_core_hwmod,
  57. .user = OCP_USER_MPU | OCP_USER_SDMA,
  58. };
  59. /* MPU -> L3 interface */
  60. static struct omap_hwmod_ocp_if omap2430_mpu__l3_main = {
  61. .master = &omap2430_mpu_hwmod,
  62. .slave = &omap2430_l3_main_hwmod,
  63. .user = OCP_USER_MPU,
  64. };
  65. /* Slave interfaces on the L3 interconnect */
  66. static struct omap_hwmod_ocp_if *omap2430_l3_main_slaves[] = {
  67. &omap2430_mpu__l3_main,
  68. };
  69. /* DSS -> l3 */
  70. static struct omap_hwmod_ocp_if omap2430_dss__l3 = {
  71. .master = &omap2430_dss_core_hwmod,
  72. .slave = &omap2430_l3_main_hwmod,
  73. .fw = {
  74. .omap2 = {
  75. .l3_perm_bit = OMAP2_L3_CORE_FW_CONNID_DSS,
  76. .flags = OMAP_FIREWALL_L3,
  77. }
  78. },
  79. .user = OCP_USER_MPU | OCP_USER_SDMA,
  80. };
  81. /* Master interfaces on the L3 interconnect */
  82. static struct omap_hwmod_ocp_if *omap2430_l3_main_masters[] = {
  83. &omap2430_l3_main__l4_core,
  84. };
  85. /* L3 */
  86. static struct omap_hwmod omap2430_l3_main_hwmod = {
  87. .name = "l3_main",
  88. .class = &l3_hwmod_class,
  89. .masters = omap2430_l3_main_masters,
  90. .masters_cnt = ARRAY_SIZE(omap2430_l3_main_masters),
  91. .slaves = omap2430_l3_main_slaves,
  92. .slaves_cnt = ARRAY_SIZE(omap2430_l3_main_slaves),
  93. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  94. .flags = HWMOD_NO_IDLEST,
  95. };
  96. static struct omap_hwmod omap2430_l4_wkup_hwmod;
  97. static struct omap_hwmod omap2430_uart1_hwmod;
  98. static struct omap_hwmod omap2430_uart2_hwmod;
  99. static struct omap_hwmod omap2430_uart3_hwmod;
  100. static struct omap_hwmod omap2430_i2c1_hwmod;
  101. static struct omap_hwmod omap2430_i2c2_hwmod;
  102. static struct omap_hwmod omap2430_usbhsotg_hwmod;
  103. /* l3_core -> usbhsotg interface */
  104. static struct omap_hwmod_ocp_if omap2430_usbhsotg__l3 = {
  105. .master = &omap2430_usbhsotg_hwmod,
  106. .slave = &omap2430_l3_main_hwmod,
  107. .clk = "core_l3_ck",
  108. .user = OCP_USER_MPU,
  109. };
  110. /* I2C IP block address space length (in bytes) */
  111. #define OMAP2_I2C_AS_LEN 128
  112. /* L4 CORE -> I2C1 interface */
  113. static struct omap_hwmod_addr_space omap2430_i2c1_addr_space[] = {
  114. {
  115. .pa_start = 0x48070000,
  116. .pa_end = 0x48070000 + OMAP2_I2C_AS_LEN - 1,
  117. .flags = ADDR_TYPE_RT,
  118. },
  119. };
  120. static struct omap_hwmod_ocp_if omap2430_l4_core__i2c1 = {
  121. .master = &omap2430_l4_core_hwmod,
  122. .slave = &omap2430_i2c1_hwmod,
  123. .clk = "i2c1_ick",
  124. .addr = omap2430_i2c1_addr_space,
  125. .addr_cnt = ARRAY_SIZE(omap2430_i2c1_addr_space),
  126. .user = OCP_USER_MPU | OCP_USER_SDMA,
  127. };
  128. /* L4 CORE -> I2C2 interface */
  129. static struct omap_hwmod_addr_space omap2430_i2c2_addr_space[] = {
  130. {
  131. .pa_start = 0x48072000,
  132. .pa_end = 0x48072000 + OMAP2_I2C_AS_LEN - 1,
  133. .flags = ADDR_TYPE_RT,
  134. },
  135. };
  136. static struct omap_hwmod_ocp_if omap2430_l4_core__i2c2 = {
  137. .master = &omap2430_l4_core_hwmod,
  138. .slave = &omap2430_i2c2_hwmod,
  139. .clk = "i2c2_ick",
  140. .addr = omap2430_i2c2_addr_space,
  141. .addr_cnt = ARRAY_SIZE(omap2430_i2c2_addr_space),
  142. .user = OCP_USER_MPU | OCP_USER_SDMA,
  143. };
  144. /* L4_CORE -> L4_WKUP interface */
  145. static struct omap_hwmod_ocp_if omap2430_l4_core__l4_wkup = {
  146. .master = &omap2430_l4_core_hwmod,
  147. .slave = &omap2430_l4_wkup_hwmod,
  148. .user = OCP_USER_MPU | OCP_USER_SDMA,
  149. };
  150. /* L4 CORE -> UART1 interface */
  151. static struct omap_hwmod_addr_space omap2430_uart1_addr_space[] = {
  152. {
  153. .pa_start = OMAP2_UART1_BASE,
  154. .pa_end = OMAP2_UART1_BASE + SZ_8K - 1,
  155. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  156. },
  157. };
  158. static struct omap_hwmod_ocp_if omap2_l4_core__uart1 = {
  159. .master = &omap2430_l4_core_hwmod,
  160. .slave = &omap2430_uart1_hwmod,
  161. .clk = "uart1_ick",
  162. .addr = omap2430_uart1_addr_space,
  163. .addr_cnt = ARRAY_SIZE(omap2430_uart1_addr_space),
  164. .user = OCP_USER_MPU | OCP_USER_SDMA,
  165. };
  166. /* L4 CORE -> UART2 interface */
  167. static struct omap_hwmod_addr_space omap2430_uart2_addr_space[] = {
  168. {
  169. .pa_start = OMAP2_UART2_BASE,
  170. .pa_end = OMAP2_UART2_BASE + SZ_1K - 1,
  171. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  172. },
  173. };
  174. static struct omap_hwmod_ocp_if omap2_l4_core__uart2 = {
  175. .master = &omap2430_l4_core_hwmod,
  176. .slave = &omap2430_uart2_hwmod,
  177. .clk = "uart2_ick",
  178. .addr = omap2430_uart2_addr_space,
  179. .addr_cnt = ARRAY_SIZE(omap2430_uart2_addr_space),
  180. .user = OCP_USER_MPU | OCP_USER_SDMA,
  181. };
  182. /* L4 PER -> UART3 interface */
  183. static struct omap_hwmod_addr_space omap2430_uart3_addr_space[] = {
  184. {
  185. .pa_start = OMAP2_UART3_BASE,
  186. .pa_end = OMAP2_UART3_BASE + SZ_1K - 1,
  187. .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
  188. },
  189. };
  190. static struct omap_hwmod_ocp_if omap2_l4_core__uart3 = {
  191. .master = &omap2430_l4_core_hwmod,
  192. .slave = &omap2430_uart3_hwmod,
  193. .clk = "uart3_ick",
  194. .addr = omap2430_uart3_addr_space,
  195. .addr_cnt = ARRAY_SIZE(omap2430_uart3_addr_space),
  196. .user = OCP_USER_MPU | OCP_USER_SDMA,
  197. };
  198. /*
  199. * usbhsotg interface data
  200. */
  201. static struct omap_hwmod_addr_space omap2430_usbhsotg_addrs[] = {
  202. {
  203. .pa_start = OMAP243X_HS_BASE,
  204. .pa_end = OMAP243X_HS_BASE + SZ_4K - 1,
  205. .flags = ADDR_TYPE_RT
  206. },
  207. };
  208. /* l4_core ->usbhsotg interface */
  209. static struct omap_hwmod_ocp_if omap2430_l4_core__usbhsotg = {
  210. .master = &omap2430_l4_core_hwmod,
  211. .slave = &omap2430_usbhsotg_hwmod,
  212. .clk = "usb_l4_ick",
  213. .addr = omap2430_usbhsotg_addrs,
  214. .addr_cnt = ARRAY_SIZE(omap2430_usbhsotg_addrs),
  215. .user = OCP_USER_MPU,
  216. };
  217. static struct omap_hwmod_ocp_if *omap2430_usbhsotg_masters[] = {
  218. &omap2430_usbhsotg__l3,
  219. };
  220. static struct omap_hwmod_ocp_if *omap2430_usbhsotg_slaves[] = {
  221. &omap2430_l4_core__usbhsotg,
  222. };
  223. /* Slave interfaces on the L4_CORE interconnect */
  224. static struct omap_hwmod_ocp_if *omap2430_l4_core_slaves[] = {
  225. &omap2430_l3_main__l4_core,
  226. };
  227. /* Master interfaces on the L4_CORE interconnect */
  228. static struct omap_hwmod_ocp_if *omap2430_l4_core_masters[] = {
  229. &omap2430_l4_core__l4_wkup,
  230. };
  231. /* L4 CORE */
  232. static struct omap_hwmod omap2430_l4_core_hwmod = {
  233. .name = "l4_core",
  234. .class = &l4_hwmod_class,
  235. .masters = omap2430_l4_core_masters,
  236. .masters_cnt = ARRAY_SIZE(omap2430_l4_core_masters),
  237. .slaves = omap2430_l4_core_slaves,
  238. .slaves_cnt = ARRAY_SIZE(omap2430_l4_core_slaves),
  239. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  240. .flags = HWMOD_NO_IDLEST,
  241. };
  242. /* Slave interfaces on the L4_WKUP interconnect */
  243. static struct omap_hwmod_ocp_if *omap2430_l4_wkup_slaves[] = {
  244. &omap2430_l4_core__l4_wkup,
  245. &omap2_l4_core__uart1,
  246. &omap2_l4_core__uart2,
  247. &omap2_l4_core__uart3,
  248. };
  249. /* Master interfaces on the L4_WKUP interconnect */
  250. static struct omap_hwmod_ocp_if *omap2430_l4_wkup_masters[] = {
  251. };
  252. /* l4 core -> mcspi1 interface */
  253. static struct omap_hwmod_addr_space omap2430_mcspi1_addr_space[] = {
  254. {
  255. .pa_start = 0x48098000,
  256. .pa_end = 0x480980ff,
  257. .flags = ADDR_TYPE_RT,
  258. },
  259. };
  260. static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi1 = {
  261. .master = &omap2430_l4_core_hwmod,
  262. .slave = &omap2430_mcspi1_hwmod,
  263. .clk = "mcspi1_ick",
  264. .addr = omap2430_mcspi1_addr_space,
  265. .addr_cnt = ARRAY_SIZE(omap2430_mcspi1_addr_space),
  266. .user = OCP_USER_MPU | OCP_USER_SDMA,
  267. };
  268. /* l4 core -> mcspi2 interface */
  269. static struct omap_hwmod_addr_space omap2430_mcspi2_addr_space[] = {
  270. {
  271. .pa_start = 0x4809a000,
  272. .pa_end = 0x4809a0ff,
  273. .flags = ADDR_TYPE_RT,
  274. },
  275. };
  276. static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi2 = {
  277. .master = &omap2430_l4_core_hwmod,
  278. .slave = &omap2430_mcspi2_hwmod,
  279. .clk = "mcspi2_ick",
  280. .addr = omap2430_mcspi2_addr_space,
  281. .addr_cnt = ARRAY_SIZE(omap2430_mcspi2_addr_space),
  282. .user = OCP_USER_MPU | OCP_USER_SDMA,
  283. };
  284. /* l4 core -> mcspi3 interface */
  285. static struct omap_hwmod_addr_space omap2430_mcspi3_addr_space[] = {
  286. {
  287. .pa_start = 0x480b8000,
  288. .pa_end = 0x480b80ff,
  289. .flags = ADDR_TYPE_RT,
  290. },
  291. };
  292. static struct omap_hwmod_ocp_if omap2430_l4_core__mcspi3 = {
  293. .master = &omap2430_l4_core_hwmod,
  294. .slave = &omap2430_mcspi3_hwmod,
  295. .clk = "mcspi3_ick",
  296. .addr = omap2430_mcspi3_addr_space,
  297. .addr_cnt = ARRAY_SIZE(omap2430_mcspi3_addr_space),
  298. .user = OCP_USER_MPU | OCP_USER_SDMA,
  299. };
  300. /* L4 WKUP */
  301. static struct omap_hwmod omap2430_l4_wkup_hwmod = {
  302. .name = "l4_wkup",
  303. .class = &l4_hwmod_class,
  304. .masters = omap2430_l4_wkup_masters,
  305. .masters_cnt = ARRAY_SIZE(omap2430_l4_wkup_masters),
  306. .slaves = omap2430_l4_wkup_slaves,
  307. .slaves_cnt = ARRAY_SIZE(omap2430_l4_wkup_slaves),
  308. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  309. .flags = HWMOD_NO_IDLEST,
  310. };
  311. /* Master interfaces on the MPU device */
  312. static struct omap_hwmod_ocp_if *omap2430_mpu_masters[] = {
  313. &omap2430_mpu__l3_main,
  314. };
  315. /* MPU */
  316. static struct omap_hwmod omap2430_mpu_hwmod = {
  317. .name = "mpu",
  318. .class = &mpu_hwmod_class,
  319. .main_clk = "mpu_ck",
  320. .masters = omap2430_mpu_masters,
  321. .masters_cnt = ARRAY_SIZE(omap2430_mpu_masters),
  322. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  323. };
  324. /*
  325. * IVA2_1 interface data
  326. */
  327. /* IVA2 <- L3 interface */
  328. static struct omap_hwmod_ocp_if omap2430_l3__iva = {
  329. .master = &omap2430_l3_main_hwmod,
  330. .slave = &omap2430_iva_hwmod,
  331. .clk = "dsp_fck",
  332. .user = OCP_USER_MPU | OCP_USER_SDMA,
  333. };
  334. static struct omap_hwmod_ocp_if *omap2430_iva_masters[] = {
  335. &omap2430_l3__iva,
  336. };
  337. /*
  338. * IVA2 (IVA2)
  339. */
  340. static struct omap_hwmod omap2430_iva_hwmod = {
  341. .name = "iva",
  342. .class = &iva_hwmod_class,
  343. .masters = omap2430_iva_masters,
  344. .masters_cnt = ARRAY_SIZE(omap2430_iva_masters),
  345. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  346. };
  347. /* l4_wkup -> wd_timer2 */
  348. static struct omap_hwmod_addr_space omap2430_wd_timer2_addrs[] = {
  349. {
  350. .pa_start = 0x49016000,
  351. .pa_end = 0x4901607f,
  352. .flags = ADDR_TYPE_RT
  353. },
  354. };
  355. static struct omap_hwmod_ocp_if omap2430_l4_wkup__wd_timer2 = {
  356. .master = &omap2430_l4_wkup_hwmod,
  357. .slave = &omap2430_wd_timer2_hwmod,
  358. .clk = "mpu_wdt_ick",
  359. .addr = omap2430_wd_timer2_addrs,
  360. .addr_cnt = ARRAY_SIZE(omap2430_wd_timer2_addrs),
  361. .user = OCP_USER_MPU | OCP_USER_SDMA,
  362. };
  363. /*
  364. * 'wd_timer' class
  365. * 32-bit watchdog upward counter that generates a pulse on the reset pin on
  366. * overflow condition
  367. */
  368. static struct omap_hwmod_class_sysconfig omap2430_wd_timer_sysc = {
  369. .rev_offs = 0x0,
  370. .sysc_offs = 0x0010,
  371. .syss_offs = 0x0014,
  372. .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET |
  373. SYSC_HAS_AUTOIDLE),
  374. .sysc_fields = &omap_hwmod_sysc_type1,
  375. };
  376. static struct omap_hwmod_class omap2430_wd_timer_hwmod_class = {
  377. .name = "wd_timer",
  378. .sysc = &omap2430_wd_timer_sysc,
  379. .pre_shutdown = &omap2_wd_timer_disable
  380. };
  381. /* wd_timer2 */
  382. static struct omap_hwmod_ocp_if *omap2430_wd_timer2_slaves[] = {
  383. &omap2430_l4_wkup__wd_timer2,
  384. };
  385. static struct omap_hwmod omap2430_wd_timer2_hwmod = {
  386. .name = "wd_timer2",
  387. .class = &omap2430_wd_timer_hwmod_class,
  388. .main_clk = "mpu_wdt_fck",
  389. .prcm = {
  390. .omap2 = {
  391. .prcm_reg_id = 1,
  392. .module_bit = OMAP24XX_EN_MPU_WDT_SHIFT,
  393. .module_offs = WKUP_MOD,
  394. .idlest_reg_id = 1,
  395. .idlest_idle_bit = OMAP24XX_ST_MPU_WDT_SHIFT,
  396. },
  397. },
  398. .slaves = omap2430_wd_timer2_slaves,
  399. .slaves_cnt = ARRAY_SIZE(omap2430_wd_timer2_slaves),
  400. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  401. };
  402. /* UART */
  403. static struct omap_hwmod_class_sysconfig uart_sysc = {
  404. .rev_offs = 0x50,
  405. .sysc_offs = 0x54,
  406. .syss_offs = 0x58,
  407. .sysc_flags = (SYSC_HAS_SIDLEMODE |
  408. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  409. SYSC_HAS_AUTOIDLE),
  410. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  411. .sysc_fields = &omap_hwmod_sysc_type1,
  412. };
  413. static struct omap_hwmod_class uart_class = {
  414. .name = "uart",
  415. .sysc = &uart_sysc,
  416. };
  417. /* UART1 */
  418. static struct omap_hwmod_irq_info uart1_mpu_irqs[] = {
  419. { .irq = INT_24XX_UART1_IRQ, },
  420. };
  421. static struct omap_hwmod_dma_info uart1_sdma_reqs[] = {
  422. { .name = "rx", .dma_req = OMAP24XX_DMA_UART1_RX, },
  423. { .name = "tx", .dma_req = OMAP24XX_DMA_UART1_TX, },
  424. };
  425. static struct omap_hwmod_ocp_if *omap2430_uart1_slaves[] = {
  426. &omap2_l4_core__uart1,
  427. };
  428. static struct omap_hwmod omap2430_uart1_hwmod = {
  429. .name = "uart1",
  430. .mpu_irqs = uart1_mpu_irqs,
  431. .mpu_irqs_cnt = ARRAY_SIZE(uart1_mpu_irqs),
  432. .sdma_reqs = uart1_sdma_reqs,
  433. .sdma_reqs_cnt = ARRAY_SIZE(uart1_sdma_reqs),
  434. .main_clk = "uart1_fck",
  435. .prcm = {
  436. .omap2 = {
  437. .module_offs = CORE_MOD,
  438. .prcm_reg_id = 1,
  439. .module_bit = OMAP24XX_EN_UART1_SHIFT,
  440. .idlest_reg_id = 1,
  441. .idlest_idle_bit = OMAP24XX_EN_UART1_SHIFT,
  442. },
  443. },
  444. .slaves = omap2430_uart1_slaves,
  445. .slaves_cnt = ARRAY_SIZE(omap2430_uart1_slaves),
  446. .class = &uart_class,
  447. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  448. };
  449. /* UART2 */
  450. static struct omap_hwmod_irq_info uart2_mpu_irqs[] = {
  451. { .irq = INT_24XX_UART2_IRQ, },
  452. };
  453. static struct omap_hwmod_dma_info uart2_sdma_reqs[] = {
  454. { .name = "rx", .dma_req = OMAP24XX_DMA_UART2_RX, },
  455. { .name = "tx", .dma_req = OMAP24XX_DMA_UART2_TX, },
  456. };
  457. static struct omap_hwmod_ocp_if *omap2430_uart2_slaves[] = {
  458. &omap2_l4_core__uart2,
  459. };
  460. static struct omap_hwmod omap2430_uart2_hwmod = {
  461. .name = "uart2",
  462. .mpu_irqs = uart2_mpu_irqs,
  463. .mpu_irqs_cnt = ARRAY_SIZE(uart2_mpu_irqs),
  464. .sdma_reqs = uart2_sdma_reqs,
  465. .sdma_reqs_cnt = ARRAY_SIZE(uart2_sdma_reqs),
  466. .main_clk = "uart2_fck",
  467. .prcm = {
  468. .omap2 = {
  469. .module_offs = CORE_MOD,
  470. .prcm_reg_id = 1,
  471. .module_bit = OMAP24XX_EN_UART2_SHIFT,
  472. .idlest_reg_id = 1,
  473. .idlest_idle_bit = OMAP24XX_EN_UART2_SHIFT,
  474. },
  475. },
  476. .slaves = omap2430_uart2_slaves,
  477. .slaves_cnt = ARRAY_SIZE(omap2430_uart2_slaves),
  478. .class = &uart_class,
  479. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  480. };
  481. /* UART3 */
  482. static struct omap_hwmod_irq_info uart3_mpu_irqs[] = {
  483. { .irq = INT_24XX_UART3_IRQ, },
  484. };
  485. static struct omap_hwmod_dma_info uart3_sdma_reqs[] = {
  486. { .name = "rx", .dma_req = OMAP24XX_DMA_UART3_RX, },
  487. { .name = "tx", .dma_req = OMAP24XX_DMA_UART3_TX, },
  488. };
  489. static struct omap_hwmod_ocp_if *omap2430_uart3_slaves[] = {
  490. &omap2_l4_core__uart3,
  491. };
  492. static struct omap_hwmod omap2430_uart3_hwmod = {
  493. .name = "uart3",
  494. .mpu_irqs = uart3_mpu_irqs,
  495. .mpu_irqs_cnt = ARRAY_SIZE(uart3_mpu_irqs),
  496. .sdma_reqs = uart3_sdma_reqs,
  497. .sdma_reqs_cnt = ARRAY_SIZE(uart3_sdma_reqs),
  498. .main_clk = "uart3_fck",
  499. .prcm = {
  500. .omap2 = {
  501. .module_offs = CORE_MOD,
  502. .prcm_reg_id = 2,
  503. .module_bit = OMAP24XX_EN_UART3_SHIFT,
  504. .idlest_reg_id = 2,
  505. .idlest_idle_bit = OMAP24XX_EN_UART3_SHIFT,
  506. },
  507. },
  508. .slaves = omap2430_uart3_slaves,
  509. .slaves_cnt = ARRAY_SIZE(omap2430_uart3_slaves),
  510. .class = &uart_class,
  511. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  512. };
  513. /*
  514. * 'dss' class
  515. * display sub-system
  516. */
  517. static struct omap_hwmod_class_sysconfig omap2430_dss_sysc = {
  518. .rev_offs = 0x0000,
  519. .sysc_offs = 0x0010,
  520. .syss_offs = 0x0014,
  521. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  522. .sysc_fields = &omap_hwmod_sysc_type1,
  523. };
  524. static struct omap_hwmod_class omap2430_dss_hwmod_class = {
  525. .name = "dss",
  526. .sysc = &omap2430_dss_sysc,
  527. };
  528. /* dss */
  529. static struct omap_hwmod_irq_info omap2430_dss_irqs[] = {
  530. { .irq = 25 },
  531. };
  532. static struct omap_hwmod_dma_info omap2430_dss_sdma_chs[] = {
  533. { .name = "dispc", .dma_req = 5 },
  534. };
  535. /* dss */
  536. /* dss master ports */
  537. static struct omap_hwmod_ocp_if *omap2430_dss_masters[] = {
  538. &omap2430_dss__l3,
  539. };
  540. static struct omap_hwmod_addr_space omap2430_dss_addrs[] = {
  541. {
  542. .pa_start = 0x48050000,
  543. .pa_end = 0x480503FF,
  544. .flags = ADDR_TYPE_RT
  545. },
  546. };
  547. /* l4_core -> dss */
  548. static struct omap_hwmod_ocp_if omap2430_l4_core__dss = {
  549. .master = &omap2430_l4_core_hwmod,
  550. .slave = &omap2430_dss_core_hwmod,
  551. .clk = "dss_ick",
  552. .addr = omap2430_dss_addrs,
  553. .addr_cnt = ARRAY_SIZE(omap2430_dss_addrs),
  554. .user = OCP_USER_MPU | OCP_USER_SDMA,
  555. };
  556. /* dss slave ports */
  557. static struct omap_hwmod_ocp_if *omap2430_dss_slaves[] = {
  558. &omap2430_l4_core__dss,
  559. };
  560. static struct omap_hwmod_opt_clk dss_opt_clks[] = {
  561. { .role = "tv_clk", .clk = "dss_54m_fck" },
  562. { .role = "sys_clk", .clk = "dss2_fck" },
  563. };
  564. static struct omap_hwmod omap2430_dss_core_hwmod = {
  565. .name = "dss_core",
  566. .class = &omap2430_dss_hwmod_class,
  567. .main_clk = "dss1_fck", /* instead of dss_fck */
  568. .mpu_irqs = omap2430_dss_irqs,
  569. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_dss_irqs),
  570. .sdma_reqs = omap2430_dss_sdma_chs,
  571. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_dss_sdma_chs),
  572. .prcm = {
  573. .omap2 = {
  574. .prcm_reg_id = 1,
  575. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  576. .module_offs = CORE_MOD,
  577. .idlest_reg_id = 1,
  578. .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
  579. },
  580. },
  581. .opt_clks = dss_opt_clks,
  582. .opt_clks_cnt = ARRAY_SIZE(dss_opt_clks),
  583. .slaves = omap2430_dss_slaves,
  584. .slaves_cnt = ARRAY_SIZE(omap2430_dss_slaves),
  585. .masters = omap2430_dss_masters,
  586. .masters_cnt = ARRAY_SIZE(omap2430_dss_masters),
  587. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  588. .flags = HWMOD_NO_IDLEST,
  589. };
  590. /*
  591. * 'dispc' class
  592. * display controller
  593. */
  594. static struct omap_hwmod_class_sysconfig omap2430_dispc_sysc = {
  595. .rev_offs = 0x0000,
  596. .sysc_offs = 0x0010,
  597. .syss_offs = 0x0014,
  598. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
  599. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  600. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  601. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  602. .sysc_fields = &omap_hwmod_sysc_type1,
  603. };
  604. static struct omap_hwmod_class omap2430_dispc_hwmod_class = {
  605. .name = "dispc",
  606. .sysc = &omap2430_dispc_sysc,
  607. };
  608. static struct omap_hwmod_addr_space omap2430_dss_dispc_addrs[] = {
  609. {
  610. .pa_start = 0x48050400,
  611. .pa_end = 0x480507FF,
  612. .flags = ADDR_TYPE_RT
  613. },
  614. };
  615. /* l4_core -> dss_dispc */
  616. static struct omap_hwmod_ocp_if omap2430_l4_core__dss_dispc = {
  617. .master = &omap2430_l4_core_hwmod,
  618. .slave = &omap2430_dss_dispc_hwmod,
  619. .clk = "dss_ick",
  620. .addr = omap2430_dss_dispc_addrs,
  621. .addr_cnt = ARRAY_SIZE(omap2430_dss_dispc_addrs),
  622. .user = OCP_USER_MPU | OCP_USER_SDMA,
  623. };
  624. /* dss_dispc slave ports */
  625. static struct omap_hwmod_ocp_if *omap2430_dss_dispc_slaves[] = {
  626. &omap2430_l4_core__dss_dispc,
  627. };
  628. static struct omap_hwmod omap2430_dss_dispc_hwmod = {
  629. .name = "dss_dispc",
  630. .class = &omap2430_dispc_hwmod_class,
  631. .main_clk = "dss1_fck",
  632. .prcm = {
  633. .omap2 = {
  634. .prcm_reg_id = 1,
  635. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  636. .module_offs = CORE_MOD,
  637. .idlest_reg_id = 1,
  638. .idlest_stdby_bit = OMAP24XX_ST_DSS_SHIFT,
  639. },
  640. },
  641. .slaves = omap2430_dss_dispc_slaves,
  642. .slaves_cnt = ARRAY_SIZE(omap2430_dss_dispc_slaves),
  643. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  644. .flags = HWMOD_NO_IDLEST,
  645. };
  646. /*
  647. * 'rfbi' class
  648. * remote frame buffer interface
  649. */
  650. static struct omap_hwmod_class_sysconfig omap2430_rfbi_sysc = {
  651. .rev_offs = 0x0000,
  652. .sysc_offs = 0x0010,
  653. .syss_offs = 0x0014,
  654. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  655. SYSC_HAS_AUTOIDLE),
  656. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  657. .sysc_fields = &omap_hwmod_sysc_type1,
  658. };
  659. static struct omap_hwmod_class omap2430_rfbi_hwmod_class = {
  660. .name = "rfbi",
  661. .sysc = &omap2430_rfbi_sysc,
  662. };
  663. static struct omap_hwmod_addr_space omap2430_dss_rfbi_addrs[] = {
  664. {
  665. .pa_start = 0x48050800,
  666. .pa_end = 0x48050BFF,
  667. .flags = ADDR_TYPE_RT
  668. },
  669. };
  670. /* l4_core -> dss_rfbi */
  671. static struct omap_hwmod_ocp_if omap2430_l4_core__dss_rfbi = {
  672. .master = &omap2430_l4_core_hwmod,
  673. .slave = &omap2430_dss_rfbi_hwmod,
  674. .clk = "dss_ick",
  675. .addr = omap2430_dss_rfbi_addrs,
  676. .addr_cnt = ARRAY_SIZE(omap2430_dss_rfbi_addrs),
  677. .user = OCP_USER_MPU | OCP_USER_SDMA,
  678. };
  679. /* dss_rfbi slave ports */
  680. static struct omap_hwmod_ocp_if *omap2430_dss_rfbi_slaves[] = {
  681. &omap2430_l4_core__dss_rfbi,
  682. };
  683. static struct omap_hwmod omap2430_dss_rfbi_hwmod = {
  684. .name = "dss_rfbi",
  685. .class = &omap2430_rfbi_hwmod_class,
  686. .main_clk = "dss1_fck",
  687. .prcm = {
  688. .omap2 = {
  689. .prcm_reg_id = 1,
  690. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  691. .module_offs = CORE_MOD,
  692. },
  693. },
  694. .slaves = omap2430_dss_rfbi_slaves,
  695. .slaves_cnt = ARRAY_SIZE(omap2430_dss_rfbi_slaves),
  696. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  697. .flags = HWMOD_NO_IDLEST,
  698. };
  699. /*
  700. * 'venc' class
  701. * video encoder
  702. */
  703. static struct omap_hwmod_class omap2430_venc_hwmod_class = {
  704. .name = "venc",
  705. };
  706. /* dss_venc */
  707. static struct omap_hwmod_addr_space omap2430_dss_venc_addrs[] = {
  708. {
  709. .pa_start = 0x48050C00,
  710. .pa_end = 0x48050FFF,
  711. .flags = ADDR_TYPE_RT
  712. },
  713. };
  714. /* l4_core -> dss_venc */
  715. static struct omap_hwmod_ocp_if omap2430_l4_core__dss_venc = {
  716. .master = &omap2430_l4_core_hwmod,
  717. .slave = &omap2430_dss_venc_hwmod,
  718. .clk = "dss_54m_fck",
  719. .addr = omap2430_dss_venc_addrs,
  720. .addr_cnt = ARRAY_SIZE(omap2430_dss_venc_addrs),
  721. .user = OCP_USER_MPU | OCP_USER_SDMA,
  722. };
  723. /* dss_venc slave ports */
  724. static struct omap_hwmod_ocp_if *omap2430_dss_venc_slaves[] = {
  725. &omap2430_l4_core__dss_venc,
  726. };
  727. static struct omap_hwmod omap2430_dss_venc_hwmod = {
  728. .name = "dss_venc",
  729. .class = &omap2430_venc_hwmod_class,
  730. .main_clk = "dss1_fck",
  731. .prcm = {
  732. .omap2 = {
  733. .prcm_reg_id = 1,
  734. .module_bit = OMAP24XX_EN_DSS1_SHIFT,
  735. .module_offs = CORE_MOD,
  736. },
  737. },
  738. .slaves = omap2430_dss_venc_slaves,
  739. .slaves_cnt = ARRAY_SIZE(omap2430_dss_venc_slaves),
  740. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  741. .flags = HWMOD_NO_IDLEST,
  742. };
  743. /* I2C common */
  744. static struct omap_hwmod_class_sysconfig i2c_sysc = {
  745. .rev_offs = 0x00,
  746. .sysc_offs = 0x20,
  747. .syss_offs = 0x10,
  748. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  749. .sysc_fields = &omap_hwmod_sysc_type1,
  750. };
  751. static struct omap_hwmod_class i2c_class = {
  752. .name = "i2c",
  753. .sysc = &i2c_sysc,
  754. };
  755. static struct omap_i2c_dev_attr i2c_dev_attr = {
  756. .fifo_depth = 8, /* bytes */
  757. };
  758. /* I2C1 */
  759. static struct omap_hwmod_irq_info i2c1_mpu_irqs[] = {
  760. { .irq = INT_24XX_I2C1_IRQ, },
  761. };
  762. static struct omap_hwmod_dma_info i2c1_sdma_reqs[] = {
  763. { .name = "tx", .dma_req = OMAP24XX_DMA_I2C1_TX },
  764. { .name = "rx", .dma_req = OMAP24XX_DMA_I2C1_RX },
  765. };
  766. static struct omap_hwmod_ocp_if *omap2430_i2c1_slaves[] = {
  767. &omap2430_l4_core__i2c1,
  768. };
  769. static struct omap_hwmod omap2430_i2c1_hwmod = {
  770. .name = "i2c1",
  771. .mpu_irqs = i2c1_mpu_irqs,
  772. .mpu_irqs_cnt = ARRAY_SIZE(i2c1_mpu_irqs),
  773. .sdma_reqs = i2c1_sdma_reqs,
  774. .sdma_reqs_cnt = ARRAY_SIZE(i2c1_sdma_reqs),
  775. .main_clk = "i2chs1_fck",
  776. .prcm = {
  777. .omap2 = {
  778. /*
  779. * NOTE: The CM_FCLKEN* and CM_ICLKEN* for
  780. * I2CHS IP's do not follow the usual pattern.
  781. * prcm_reg_id alone cannot be used to program
  782. * the iclk and fclk. Needs to be handled using
  783. * additonal flags when clk handling is moved
  784. * to hwmod framework.
  785. */
  786. .module_offs = CORE_MOD,
  787. .prcm_reg_id = 1,
  788. .module_bit = OMAP2430_EN_I2CHS1_SHIFT,
  789. .idlest_reg_id = 1,
  790. .idlest_idle_bit = OMAP2430_ST_I2CHS1_SHIFT,
  791. },
  792. },
  793. .slaves = omap2430_i2c1_slaves,
  794. .slaves_cnt = ARRAY_SIZE(omap2430_i2c1_slaves),
  795. .class = &i2c_class,
  796. .dev_attr = &i2c_dev_attr,
  797. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  798. };
  799. /* I2C2 */
  800. static struct omap_hwmod_irq_info i2c2_mpu_irqs[] = {
  801. { .irq = INT_24XX_I2C2_IRQ, },
  802. };
  803. static struct omap_hwmod_dma_info i2c2_sdma_reqs[] = {
  804. { .name = "tx", .dma_req = OMAP24XX_DMA_I2C2_TX },
  805. { .name = "rx", .dma_req = OMAP24XX_DMA_I2C2_RX },
  806. };
  807. static struct omap_hwmod_ocp_if *omap2430_i2c2_slaves[] = {
  808. &omap2430_l4_core__i2c2,
  809. };
  810. static struct omap_hwmod omap2430_i2c2_hwmod = {
  811. .name = "i2c2",
  812. .mpu_irqs = i2c2_mpu_irqs,
  813. .mpu_irqs_cnt = ARRAY_SIZE(i2c2_mpu_irqs),
  814. .sdma_reqs = i2c2_sdma_reqs,
  815. .sdma_reqs_cnt = ARRAY_SIZE(i2c2_sdma_reqs),
  816. .main_clk = "i2chs2_fck",
  817. .prcm = {
  818. .omap2 = {
  819. .module_offs = CORE_MOD,
  820. .prcm_reg_id = 1,
  821. .module_bit = OMAP2430_EN_I2CHS2_SHIFT,
  822. .idlest_reg_id = 1,
  823. .idlest_idle_bit = OMAP2430_ST_I2CHS2_SHIFT,
  824. },
  825. },
  826. .slaves = omap2430_i2c2_slaves,
  827. .slaves_cnt = ARRAY_SIZE(omap2430_i2c2_slaves),
  828. .class = &i2c_class,
  829. .dev_attr = &i2c_dev_attr,
  830. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  831. };
  832. /* l4_wkup -> gpio1 */
  833. static struct omap_hwmod_addr_space omap2430_gpio1_addr_space[] = {
  834. {
  835. .pa_start = 0x4900C000,
  836. .pa_end = 0x4900C1ff,
  837. .flags = ADDR_TYPE_RT
  838. },
  839. };
  840. static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio1 = {
  841. .master = &omap2430_l4_wkup_hwmod,
  842. .slave = &omap2430_gpio1_hwmod,
  843. .clk = "gpios_ick",
  844. .addr = omap2430_gpio1_addr_space,
  845. .addr_cnt = ARRAY_SIZE(omap2430_gpio1_addr_space),
  846. .user = OCP_USER_MPU | OCP_USER_SDMA,
  847. };
  848. /* l4_wkup -> gpio2 */
  849. static struct omap_hwmod_addr_space omap2430_gpio2_addr_space[] = {
  850. {
  851. .pa_start = 0x4900E000,
  852. .pa_end = 0x4900E1ff,
  853. .flags = ADDR_TYPE_RT
  854. },
  855. };
  856. static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio2 = {
  857. .master = &omap2430_l4_wkup_hwmod,
  858. .slave = &omap2430_gpio2_hwmod,
  859. .clk = "gpios_ick",
  860. .addr = omap2430_gpio2_addr_space,
  861. .addr_cnt = ARRAY_SIZE(omap2430_gpio2_addr_space),
  862. .user = OCP_USER_MPU | OCP_USER_SDMA,
  863. };
  864. /* l4_wkup -> gpio3 */
  865. static struct omap_hwmod_addr_space omap2430_gpio3_addr_space[] = {
  866. {
  867. .pa_start = 0x49010000,
  868. .pa_end = 0x490101ff,
  869. .flags = ADDR_TYPE_RT
  870. },
  871. };
  872. static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio3 = {
  873. .master = &omap2430_l4_wkup_hwmod,
  874. .slave = &omap2430_gpio3_hwmod,
  875. .clk = "gpios_ick",
  876. .addr = omap2430_gpio3_addr_space,
  877. .addr_cnt = ARRAY_SIZE(omap2430_gpio3_addr_space),
  878. .user = OCP_USER_MPU | OCP_USER_SDMA,
  879. };
  880. /* l4_wkup -> gpio4 */
  881. static struct omap_hwmod_addr_space omap2430_gpio4_addr_space[] = {
  882. {
  883. .pa_start = 0x49012000,
  884. .pa_end = 0x490121ff,
  885. .flags = ADDR_TYPE_RT
  886. },
  887. };
  888. static struct omap_hwmod_ocp_if omap2430_l4_wkup__gpio4 = {
  889. .master = &omap2430_l4_wkup_hwmod,
  890. .slave = &omap2430_gpio4_hwmod,
  891. .clk = "gpios_ick",
  892. .addr = omap2430_gpio4_addr_space,
  893. .addr_cnt = ARRAY_SIZE(omap2430_gpio4_addr_space),
  894. .user = OCP_USER_MPU | OCP_USER_SDMA,
  895. };
  896. /* l4_core -> gpio5 */
  897. static struct omap_hwmod_addr_space omap2430_gpio5_addr_space[] = {
  898. {
  899. .pa_start = 0x480B6000,
  900. .pa_end = 0x480B61ff,
  901. .flags = ADDR_TYPE_RT
  902. },
  903. };
  904. static struct omap_hwmod_ocp_if omap2430_l4_core__gpio5 = {
  905. .master = &omap2430_l4_core_hwmod,
  906. .slave = &omap2430_gpio5_hwmod,
  907. .clk = "gpio5_ick",
  908. .addr = omap2430_gpio5_addr_space,
  909. .addr_cnt = ARRAY_SIZE(omap2430_gpio5_addr_space),
  910. .user = OCP_USER_MPU | OCP_USER_SDMA,
  911. };
  912. /* gpio dev_attr */
  913. static struct omap_gpio_dev_attr gpio_dev_attr = {
  914. .bank_width = 32,
  915. .dbck_flag = false,
  916. };
  917. static struct omap_hwmod_class_sysconfig omap243x_gpio_sysc = {
  918. .rev_offs = 0x0000,
  919. .sysc_offs = 0x0010,
  920. .syss_offs = 0x0014,
  921. .sysc_flags = (SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
  922. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  923. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  924. .sysc_fields = &omap_hwmod_sysc_type1,
  925. };
  926. /*
  927. * 'gpio' class
  928. * general purpose io module
  929. */
  930. static struct omap_hwmod_class omap243x_gpio_hwmod_class = {
  931. .name = "gpio",
  932. .sysc = &omap243x_gpio_sysc,
  933. .rev = 0,
  934. };
  935. /* gpio1 */
  936. static struct omap_hwmod_irq_info omap243x_gpio1_irqs[] = {
  937. { .irq = 29 }, /* INT_24XX_GPIO_BANK1 */
  938. };
  939. static struct omap_hwmod_ocp_if *omap2430_gpio1_slaves[] = {
  940. &omap2430_l4_wkup__gpio1,
  941. };
  942. static struct omap_hwmod omap2430_gpio1_hwmod = {
  943. .name = "gpio1",
  944. .mpu_irqs = omap243x_gpio1_irqs,
  945. .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio1_irqs),
  946. .main_clk = "gpios_fck",
  947. .prcm = {
  948. .omap2 = {
  949. .prcm_reg_id = 1,
  950. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  951. .module_offs = WKUP_MOD,
  952. .idlest_reg_id = 1,
  953. .idlest_idle_bit = OMAP24XX_EN_GPIOS_SHIFT,
  954. },
  955. },
  956. .slaves = omap2430_gpio1_slaves,
  957. .slaves_cnt = ARRAY_SIZE(omap2430_gpio1_slaves),
  958. .class = &omap243x_gpio_hwmod_class,
  959. .dev_attr = &gpio_dev_attr,
  960. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  961. };
  962. /* gpio2 */
  963. static struct omap_hwmod_irq_info omap243x_gpio2_irqs[] = {
  964. { .irq = 30 }, /* INT_24XX_GPIO_BANK2 */
  965. };
  966. static struct omap_hwmod_ocp_if *omap2430_gpio2_slaves[] = {
  967. &omap2430_l4_wkup__gpio2,
  968. };
  969. static struct omap_hwmod omap2430_gpio2_hwmod = {
  970. .name = "gpio2",
  971. .mpu_irqs = omap243x_gpio2_irqs,
  972. .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio2_irqs),
  973. .main_clk = "gpios_fck",
  974. .prcm = {
  975. .omap2 = {
  976. .prcm_reg_id = 1,
  977. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  978. .module_offs = WKUP_MOD,
  979. .idlest_reg_id = 1,
  980. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  981. },
  982. },
  983. .slaves = omap2430_gpio2_slaves,
  984. .slaves_cnt = ARRAY_SIZE(omap2430_gpio2_slaves),
  985. .class = &omap243x_gpio_hwmod_class,
  986. .dev_attr = &gpio_dev_attr,
  987. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  988. };
  989. /* gpio3 */
  990. static struct omap_hwmod_irq_info omap243x_gpio3_irqs[] = {
  991. { .irq = 31 }, /* INT_24XX_GPIO_BANK3 */
  992. };
  993. static struct omap_hwmod_ocp_if *omap2430_gpio3_slaves[] = {
  994. &omap2430_l4_wkup__gpio3,
  995. };
  996. static struct omap_hwmod omap2430_gpio3_hwmod = {
  997. .name = "gpio3",
  998. .mpu_irqs = omap243x_gpio3_irqs,
  999. .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio3_irqs),
  1000. .main_clk = "gpios_fck",
  1001. .prcm = {
  1002. .omap2 = {
  1003. .prcm_reg_id = 1,
  1004. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1005. .module_offs = WKUP_MOD,
  1006. .idlest_reg_id = 1,
  1007. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  1008. },
  1009. },
  1010. .slaves = omap2430_gpio3_slaves,
  1011. .slaves_cnt = ARRAY_SIZE(omap2430_gpio3_slaves),
  1012. .class = &omap243x_gpio_hwmod_class,
  1013. .dev_attr = &gpio_dev_attr,
  1014. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1015. };
  1016. /* gpio4 */
  1017. static struct omap_hwmod_irq_info omap243x_gpio4_irqs[] = {
  1018. { .irq = 32 }, /* INT_24XX_GPIO_BANK4 */
  1019. };
  1020. static struct omap_hwmod_ocp_if *omap2430_gpio4_slaves[] = {
  1021. &omap2430_l4_wkup__gpio4,
  1022. };
  1023. static struct omap_hwmod omap2430_gpio4_hwmod = {
  1024. .name = "gpio4",
  1025. .mpu_irqs = omap243x_gpio4_irqs,
  1026. .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio4_irqs),
  1027. .main_clk = "gpios_fck",
  1028. .prcm = {
  1029. .omap2 = {
  1030. .prcm_reg_id = 1,
  1031. .module_bit = OMAP24XX_EN_GPIOS_SHIFT,
  1032. .module_offs = WKUP_MOD,
  1033. .idlest_reg_id = 1,
  1034. .idlest_idle_bit = OMAP24XX_ST_GPIOS_SHIFT,
  1035. },
  1036. },
  1037. .slaves = omap2430_gpio4_slaves,
  1038. .slaves_cnt = ARRAY_SIZE(omap2430_gpio4_slaves),
  1039. .class = &omap243x_gpio_hwmod_class,
  1040. .dev_attr = &gpio_dev_attr,
  1041. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1042. };
  1043. /* gpio5 */
  1044. static struct omap_hwmod_irq_info omap243x_gpio5_irqs[] = {
  1045. { .irq = 33 }, /* INT_24XX_GPIO_BANK5 */
  1046. };
  1047. static struct omap_hwmod_ocp_if *omap2430_gpio5_slaves[] = {
  1048. &omap2430_l4_core__gpio5,
  1049. };
  1050. static struct omap_hwmod omap2430_gpio5_hwmod = {
  1051. .name = "gpio5",
  1052. .mpu_irqs = omap243x_gpio5_irqs,
  1053. .mpu_irqs_cnt = ARRAY_SIZE(omap243x_gpio5_irqs),
  1054. .main_clk = "gpio5_fck",
  1055. .prcm = {
  1056. .omap2 = {
  1057. .prcm_reg_id = 2,
  1058. .module_bit = OMAP2430_EN_GPIO5_SHIFT,
  1059. .module_offs = CORE_MOD,
  1060. .idlest_reg_id = 2,
  1061. .idlest_idle_bit = OMAP2430_ST_GPIO5_SHIFT,
  1062. },
  1063. },
  1064. .slaves = omap2430_gpio5_slaves,
  1065. .slaves_cnt = ARRAY_SIZE(omap2430_gpio5_slaves),
  1066. .class = &omap243x_gpio_hwmod_class,
  1067. .dev_attr = &gpio_dev_attr,
  1068. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1069. };
  1070. /* dma_system */
  1071. static struct omap_hwmod_class_sysconfig omap2430_dma_sysc = {
  1072. .rev_offs = 0x0000,
  1073. .sysc_offs = 0x002c,
  1074. .syss_offs = 0x0028,
  1075. .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_MIDLEMODE |
  1076. SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_EMUFREE |
  1077. SYSC_HAS_AUTOIDLE),
  1078. .idlemodes = (MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1079. .sysc_fields = &omap_hwmod_sysc_type1,
  1080. };
  1081. static struct omap_hwmod_class omap2430_dma_hwmod_class = {
  1082. .name = "dma",
  1083. .sysc = &omap2430_dma_sysc,
  1084. };
  1085. /* dma attributes */
  1086. static struct omap_dma_dev_attr dma_dev_attr = {
  1087. .dev_caps = RESERVE_CHANNEL | DMA_LINKED_LCH | GLOBAL_PRIORITY |
  1088. IS_CSSA_32 | IS_CDSA_32 | IS_RW_PRIORITY,
  1089. .lch_count = 32,
  1090. };
  1091. static struct omap_hwmod_irq_info omap2430_dma_system_irqs[] = {
  1092. { .name = "0", .irq = 12 }, /* INT_24XX_SDMA_IRQ0 */
  1093. { .name = "1", .irq = 13 }, /* INT_24XX_SDMA_IRQ1 */
  1094. { .name = "2", .irq = 14 }, /* INT_24XX_SDMA_IRQ2 */
  1095. { .name = "3", .irq = 15 }, /* INT_24XX_SDMA_IRQ3 */
  1096. };
  1097. static struct omap_hwmod_addr_space omap2430_dma_system_addrs[] = {
  1098. {
  1099. .pa_start = 0x48056000,
  1100. .pa_end = 0x4a0560ff,
  1101. .flags = ADDR_TYPE_RT
  1102. },
  1103. };
  1104. /* dma_system -> L3 */
  1105. static struct omap_hwmod_ocp_if omap2430_dma_system__l3 = {
  1106. .master = &omap2430_dma_system_hwmod,
  1107. .slave = &omap2430_l3_main_hwmod,
  1108. .clk = "core_l3_ck",
  1109. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1110. };
  1111. /* dma_system master ports */
  1112. static struct omap_hwmod_ocp_if *omap2430_dma_system_masters[] = {
  1113. &omap2430_dma_system__l3,
  1114. };
  1115. /* l4_core -> dma_system */
  1116. static struct omap_hwmod_ocp_if omap2430_l4_core__dma_system = {
  1117. .master = &omap2430_l4_core_hwmod,
  1118. .slave = &omap2430_dma_system_hwmod,
  1119. .clk = "sdma_ick",
  1120. .addr = omap2430_dma_system_addrs,
  1121. .addr_cnt = ARRAY_SIZE(omap2430_dma_system_addrs),
  1122. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1123. };
  1124. /* dma_system slave ports */
  1125. static struct omap_hwmod_ocp_if *omap2430_dma_system_slaves[] = {
  1126. &omap2430_l4_core__dma_system,
  1127. };
  1128. static struct omap_hwmod omap2430_dma_system_hwmod = {
  1129. .name = "dma",
  1130. .class = &omap2430_dma_hwmod_class,
  1131. .mpu_irqs = omap2430_dma_system_irqs,
  1132. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_dma_system_irqs),
  1133. .main_clk = "core_l3_ck",
  1134. .slaves = omap2430_dma_system_slaves,
  1135. .slaves_cnt = ARRAY_SIZE(omap2430_dma_system_slaves),
  1136. .masters = omap2430_dma_system_masters,
  1137. .masters_cnt = ARRAY_SIZE(omap2430_dma_system_masters),
  1138. .dev_attr = &dma_dev_attr,
  1139. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1140. .flags = HWMOD_NO_IDLEST,
  1141. };
  1142. /*
  1143. * 'mailbox' class
  1144. * mailbox module allowing communication between the on-chip processors
  1145. * using a queued mailbox-interrupt mechanism.
  1146. */
  1147. static struct omap_hwmod_class_sysconfig omap2430_mailbox_sysc = {
  1148. .rev_offs = 0x000,
  1149. .sysc_offs = 0x010,
  1150. .syss_offs = 0x014,
  1151. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1152. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
  1153. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1154. .sysc_fields = &omap_hwmod_sysc_type1,
  1155. };
  1156. static struct omap_hwmod_class omap2430_mailbox_hwmod_class = {
  1157. .name = "mailbox",
  1158. .sysc = &omap2430_mailbox_sysc,
  1159. };
  1160. /* mailbox */
  1161. static struct omap_hwmod omap2430_mailbox_hwmod;
  1162. static struct omap_hwmod_irq_info omap2430_mailbox_irqs[] = {
  1163. { .irq = 26 },
  1164. };
  1165. static struct omap_hwmod_addr_space omap2430_mailbox_addrs[] = {
  1166. {
  1167. .pa_start = 0x48094000,
  1168. .pa_end = 0x480941ff,
  1169. .flags = ADDR_TYPE_RT,
  1170. },
  1171. };
  1172. /* l4_core -> mailbox */
  1173. static struct omap_hwmod_ocp_if omap2430_l4_core__mailbox = {
  1174. .master = &omap2430_l4_core_hwmod,
  1175. .slave = &omap2430_mailbox_hwmod,
  1176. .addr = omap2430_mailbox_addrs,
  1177. .addr_cnt = ARRAY_SIZE(omap2430_mailbox_addrs),
  1178. .user = OCP_USER_MPU | OCP_USER_SDMA,
  1179. };
  1180. /* mailbox slave ports */
  1181. static struct omap_hwmod_ocp_if *omap2430_mailbox_slaves[] = {
  1182. &omap2430_l4_core__mailbox,
  1183. };
  1184. static struct omap_hwmod omap2430_mailbox_hwmod = {
  1185. .name = "mailbox",
  1186. .class = &omap2430_mailbox_hwmod_class,
  1187. .mpu_irqs = omap2430_mailbox_irqs,
  1188. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mailbox_irqs),
  1189. .main_clk = "mailboxes_ick",
  1190. .prcm = {
  1191. .omap2 = {
  1192. .prcm_reg_id = 1,
  1193. .module_bit = OMAP24XX_EN_MAILBOXES_SHIFT,
  1194. .module_offs = CORE_MOD,
  1195. .idlest_reg_id = 1,
  1196. .idlest_idle_bit = OMAP24XX_ST_MAILBOXES_SHIFT,
  1197. },
  1198. },
  1199. .slaves = omap2430_mailbox_slaves,
  1200. .slaves_cnt = ARRAY_SIZE(omap2430_mailbox_slaves),
  1201. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1202. };
  1203. /*
  1204. * 'mcspi' class
  1205. * multichannel serial port interface (mcspi) / master/slave synchronous serial
  1206. * bus
  1207. */
  1208. static struct omap_hwmod_class_sysconfig omap2430_mcspi_sysc = {
  1209. .rev_offs = 0x0000,
  1210. .sysc_offs = 0x0010,
  1211. .syss_offs = 0x0014,
  1212. .sysc_flags = (SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1213. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1214. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS),
  1215. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
  1216. .sysc_fields = &omap_hwmod_sysc_type1,
  1217. };
  1218. static struct omap_hwmod_class omap2430_mcspi_class = {
  1219. .name = "mcspi",
  1220. .sysc = &omap2430_mcspi_sysc,
  1221. .rev = OMAP2_MCSPI_REV,
  1222. };
  1223. /* mcspi1 */
  1224. static struct omap_hwmod_irq_info omap2430_mcspi1_mpu_irqs[] = {
  1225. { .irq = 65 },
  1226. };
  1227. static struct omap_hwmod_dma_info omap2430_mcspi1_sdma_reqs[] = {
  1228. { .name = "tx0", .dma_req = 35 }, /* DMA_SPI1_TX0 */
  1229. { .name = "rx0", .dma_req = 36 }, /* DMA_SPI1_RX0 */
  1230. { .name = "tx1", .dma_req = 37 }, /* DMA_SPI1_TX1 */
  1231. { .name = "rx1", .dma_req = 38 }, /* DMA_SPI1_RX1 */
  1232. { .name = "tx2", .dma_req = 39 }, /* DMA_SPI1_TX2 */
  1233. { .name = "rx2", .dma_req = 40 }, /* DMA_SPI1_RX2 */
  1234. { .name = "tx3", .dma_req = 41 }, /* DMA_SPI1_TX3 */
  1235. { .name = "rx3", .dma_req = 42 }, /* DMA_SPI1_RX3 */
  1236. };
  1237. static struct omap_hwmod_ocp_if *omap2430_mcspi1_slaves[] = {
  1238. &omap2430_l4_core__mcspi1,
  1239. };
  1240. static struct omap2_mcspi_dev_attr omap_mcspi1_dev_attr = {
  1241. .num_chipselect = 4,
  1242. };
  1243. static struct omap_hwmod omap2430_mcspi1_hwmod = {
  1244. .name = "mcspi1_hwmod",
  1245. .mpu_irqs = omap2430_mcspi1_mpu_irqs,
  1246. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcspi1_mpu_irqs),
  1247. .sdma_reqs = omap2430_mcspi1_sdma_reqs,
  1248. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcspi1_sdma_reqs),
  1249. .main_clk = "mcspi1_fck",
  1250. .prcm = {
  1251. .omap2 = {
  1252. .module_offs = CORE_MOD,
  1253. .prcm_reg_id = 1,
  1254. .module_bit = OMAP24XX_EN_MCSPI1_SHIFT,
  1255. .idlest_reg_id = 1,
  1256. .idlest_idle_bit = OMAP24XX_ST_MCSPI1_SHIFT,
  1257. },
  1258. },
  1259. .slaves = omap2430_mcspi1_slaves,
  1260. .slaves_cnt = ARRAY_SIZE(omap2430_mcspi1_slaves),
  1261. .class = &omap2430_mcspi_class,
  1262. .dev_attr = &omap_mcspi1_dev_attr,
  1263. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1264. };
  1265. /* mcspi2 */
  1266. static struct omap_hwmod_irq_info omap2430_mcspi2_mpu_irqs[] = {
  1267. { .irq = 66 },
  1268. };
  1269. static struct omap_hwmod_dma_info omap2430_mcspi2_sdma_reqs[] = {
  1270. { .name = "tx0", .dma_req = 43 }, /* DMA_SPI2_TX0 */
  1271. { .name = "rx0", .dma_req = 44 }, /* DMA_SPI2_RX0 */
  1272. { .name = "tx1", .dma_req = 45 }, /* DMA_SPI2_TX1 */
  1273. { .name = "rx1", .dma_req = 46 }, /* DMA_SPI2_RX1 */
  1274. };
  1275. static struct omap_hwmod_ocp_if *omap2430_mcspi2_slaves[] = {
  1276. &omap2430_l4_core__mcspi2,
  1277. };
  1278. static struct omap2_mcspi_dev_attr omap_mcspi2_dev_attr = {
  1279. .num_chipselect = 2,
  1280. };
  1281. static struct omap_hwmod omap2430_mcspi2_hwmod = {
  1282. .name = "mcspi2_hwmod",
  1283. .mpu_irqs = omap2430_mcspi2_mpu_irqs,
  1284. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcspi2_mpu_irqs),
  1285. .sdma_reqs = omap2430_mcspi2_sdma_reqs,
  1286. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcspi2_sdma_reqs),
  1287. .main_clk = "mcspi2_fck",
  1288. .prcm = {
  1289. .omap2 = {
  1290. .module_offs = CORE_MOD,
  1291. .prcm_reg_id = 1,
  1292. .module_bit = OMAP24XX_EN_MCSPI2_SHIFT,
  1293. .idlest_reg_id = 1,
  1294. .idlest_idle_bit = OMAP24XX_ST_MCSPI2_SHIFT,
  1295. },
  1296. },
  1297. .slaves = omap2430_mcspi2_slaves,
  1298. .slaves_cnt = ARRAY_SIZE(omap2430_mcspi2_slaves),
  1299. .class = &omap2430_mcspi_class,
  1300. .dev_attr = &omap_mcspi2_dev_attr,
  1301. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1302. };
  1303. /* mcspi3 */
  1304. static struct omap_hwmod_irq_info omap2430_mcspi3_mpu_irqs[] = {
  1305. { .irq = 91 },
  1306. };
  1307. static struct omap_hwmod_dma_info omap2430_mcspi3_sdma_reqs[] = {
  1308. { .name = "tx0", .dma_req = 15 }, /* DMA_SPI3_TX0 */
  1309. { .name = "rx0", .dma_req = 16 }, /* DMA_SPI3_RX0 */
  1310. { .name = "tx1", .dma_req = 23 }, /* DMA_SPI3_TX1 */
  1311. { .name = "rx1", .dma_req = 24 }, /* DMA_SPI3_RX1 */
  1312. };
  1313. static struct omap_hwmod_ocp_if *omap2430_mcspi3_slaves[] = {
  1314. &omap2430_l4_core__mcspi3,
  1315. };
  1316. static struct omap2_mcspi_dev_attr omap_mcspi3_dev_attr = {
  1317. .num_chipselect = 2,
  1318. };
  1319. static struct omap_hwmod omap2430_mcspi3_hwmod = {
  1320. .name = "mcspi3_hwmod",
  1321. .mpu_irqs = omap2430_mcspi3_mpu_irqs,
  1322. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_mcspi3_mpu_irqs),
  1323. .sdma_reqs = omap2430_mcspi3_sdma_reqs,
  1324. .sdma_reqs_cnt = ARRAY_SIZE(omap2430_mcspi3_sdma_reqs),
  1325. .main_clk = "mcspi3_fck",
  1326. .prcm = {
  1327. .omap2 = {
  1328. .module_offs = CORE_MOD,
  1329. .prcm_reg_id = 2,
  1330. .module_bit = OMAP2430_EN_MCSPI3_SHIFT,
  1331. .idlest_reg_id = 2,
  1332. .idlest_idle_bit = OMAP2430_ST_MCSPI3_SHIFT,
  1333. },
  1334. },
  1335. .slaves = omap2430_mcspi3_slaves,
  1336. .slaves_cnt = ARRAY_SIZE(omap2430_mcspi3_slaves),
  1337. .class = &omap2430_mcspi_class,
  1338. .dev_attr = &omap_mcspi3_dev_attr,
  1339. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430),
  1340. };
  1341. /*
  1342. * usbhsotg
  1343. */
  1344. static struct omap_hwmod_class_sysconfig omap2430_usbhsotg_sysc = {
  1345. .rev_offs = 0x0400,
  1346. .sysc_offs = 0x0404,
  1347. .syss_offs = 0x0408,
  1348. .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE|
  1349. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  1350. SYSC_HAS_AUTOIDLE),
  1351. .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  1352. MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
  1353. .sysc_fields = &omap_hwmod_sysc_type1,
  1354. };
  1355. static struct omap_hwmod_class usbotg_class = {
  1356. .name = "usbotg",
  1357. .sysc = &omap2430_usbhsotg_sysc,
  1358. };
  1359. /* usb_otg_hs */
  1360. static struct omap_hwmod_irq_info omap2430_usbhsotg_mpu_irqs[] = {
  1361. { .name = "mc", .irq = 92 },
  1362. { .name = "dma", .irq = 93 },
  1363. };
  1364. static struct omap_hwmod omap2430_usbhsotg_hwmod = {
  1365. .name = "usb_otg_hs",
  1366. .mpu_irqs = omap2430_usbhsotg_mpu_irqs,
  1367. .mpu_irqs_cnt = ARRAY_SIZE(omap2430_usbhsotg_mpu_irqs),
  1368. .main_clk = "usbhs_ick",
  1369. .prcm = {
  1370. .omap2 = {
  1371. .prcm_reg_id = 1,
  1372. .module_bit = OMAP2430_EN_USBHS_MASK,
  1373. .module_offs = CORE_MOD,
  1374. .idlest_reg_id = 1,
  1375. .idlest_idle_bit = OMAP2430_ST_USBHS_SHIFT,
  1376. },
  1377. },
  1378. .masters = omap2430_usbhsotg_masters,
  1379. .masters_cnt = ARRAY_SIZE(omap2430_usbhsotg_masters),
  1380. .slaves = omap2430_usbhsotg_slaves,
  1381. .slaves_cnt = ARRAY_SIZE(omap2430_usbhsotg_slaves),
  1382. .class = &usbotg_class,
  1383. /*
  1384. * Erratum ID: i479 idle_req / idle_ack mechanism potentially
  1385. * broken when autoidle is enabled
  1386. * workaround is to disable the autoidle bit at module level.
  1387. */
  1388. .flags = HWMOD_NO_OCP_AUTOIDLE | HWMOD_SWSUP_SIDLE
  1389. | HWMOD_SWSUP_MSTANDBY,
  1390. .omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP2430)
  1391. };
  1392. static __initdata struct omap_hwmod *omap2430_hwmods[] = {
  1393. &omap2430_l3_main_hwmod,
  1394. &omap2430_l4_core_hwmod,
  1395. &omap2430_l4_wkup_hwmod,
  1396. &omap2430_mpu_hwmod,
  1397. &omap2430_iva_hwmod,
  1398. &omap2430_wd_timer2_hwmod,
  1399. &omap2430_uart1_hwmod,
  1400. &omap2430_uart2_hwmod,
  1401. &omap2430_uart3_hwmod,
  1402. /* dss class */
  1403. &omap2430_dss_core_hwmod,
  1404. &omap2430_dss_dispc_hwmod,
  1405. &omap2430_dss_rfbi_hwmod,
  1406. &omap2430_dss_venc_hwmod,
  1407. /* i2c class */
  1408. &omap2430_i2c1_hwmod,
  1409. &omap2430_i2c2_hwmod,
  1410. /* gpio class */
  1411. &omap2430_gpio1_hwmod,
  1412. &omap2430_gpio2_hwmod,
  1413. &omap2430_gpio3_hwmod,
  1414. &omap2430_gpio4_hwmod,
  1415. &omap2430_gpio5_hwmod,
  1416. /* dma_system class*/
  1417. &omap2430_dma_system_hwmod,
  1418. /* mailbox class */
  1419. &omap2430_mailbox_hwmod,
  1420. /* mcspi class */
  1421. &omap2430_mcspi1_hwmod,
  1422. &omap2430_mcspi2_hwmod,
  1423. &omap2430_mcspi3_hwmod,
  1424. /* usbotg class*/
  1425. &omap2430_usbhsotg_hwmod,
  1426. NULL,
  1427. };
  1428. int __init omap2430_hwmod_init(void)
  1429. {
  1430. return omap_hwmod_init(omap2430_hwmods);
  1431. }