omap_hwmod_81xx_data.c 38 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496
  1. /*
  2. * DM81xx hwmod data.
  3. *
  4. * Copyright (C) 2010 Texas Instruments, Inc. - http://www.ti.com/
  5. * Copyright (C) 2013 SKTB SKiT, http://www.skitlab.ru/
  6. *
  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. */
  17. #include <linux/platform_data/gpio-omap.h>
  18. #include <linux/platform_data/hsmmc-omap.h>
  19. #include <linux/platform_data/spi-omap2-mcspi.h>
  20. #include <plat/dmtimer.h>
  21. #include "omap_hwmod_common_data.h"
  22. #include "cm81xx.h"
  23. #include "ti81xx.h"
  24. #include "wd_timer.h"
  25. /*
  26. * DM816X hardware modules integration data
  27. *
  28. * Note: This is incomplete and at present, not generated from h/w database.
  29. */
  30. /*
  31. * Common alwon .clkctrl_offs from dm814x TRM "Table 2-278. CM_ALWON REGISTERS"
  32. * also dm816x TRM 18.7.17 CM_ALWON device register values minus 0x1400.
  33. */
  34. #define DM81XX_CM_ALWON_MCASP0_CLKCTRL 0x140
  35. #define DM81XX_CM_ALWON_MCASP1_CLKCTRL 0x144
  36. #define DM81XX_CM_ALWON_MCASP2_CLKCTRL 0x148
  37. #define DM81XX_CM_ALWON_MCBSP_CLKCTRL 0x14c
  38. #define DM81XX_CM_ALWON_UART_0_CLKCTRL 0x150
  39. #define DM81XX_CM_ALWON_UART_1_CLKCTRL 0x154
  40. #define DM81XX_CM_ALWON_UART_2_CLKCTRL 0x158
  41. #define DM81XX_CM_ALWON_GPIO_0_CLKCTRL 0x15c
  42. #define DM81XX_CM_ALWON_GPIO_1_CLKCTRL 0x160
  43. #define DM81XX_CM_ALWON_I2C_0_CLKCTRL 0x164
  44. #define DM81XX_CM_ALWON_I2C_1_CLKCTRL 0x168
  45. #define DM81XX_CM_ALWON_WDTIMER_CLKCTRL 0x18c
  46. #define DM81XX_CM_ALWON_SPI_CLKCTRL 0x190
  47. #define DM81XX_CM_ALWON_MAILBOX_CLKCTRL 0x194
  48. #define DM81XX_CM_ALWON_SPINBOX_CLKCTRL 0x198
  49. #define DM81XX_CM_ALWON_MMUDATA_CLKCTRL 0x19c
  50. #define DM81XX_CM_ALWON_MMUCFG_CLKCTRL 0x1a8
  51. #define DM81XX_CM_ALWON_CONTROL_CLKCTRL 0x1c4
  52. #define DM81XX_CM_ALWON_GPMC_CLKCTRL 0x1d0
  53. #define DM81XX_CM_ALWON_ETHERNET_0_CLKCTRL 0x1d4
  54. #define DM81XX_CM_ALWON_L3_CLKCTRL 0x1e4
  55. #define DM81XX_CM_ALWON_L4HS_CLKCTRL 0x1e8
  56. #define DM81XX_CM_ALWON_L4LS_CLKCTRL 0x1ec
  57. #define DM81XX_CM_ALWON_RTC_CLKCTRL 0x1f0
  58. #define DM81XX_CM_ALWON_TPCC_CLKCTRL 0x1f4
  59. #define DM81XX_CM_ALWON_TPTC0_CLKCTRL 0x1f8
  60. #define DM81XX_CM_ALWON_TPTC1_CLKCTRL 0x1fc
  61. #define DM81XX_CM_ALWON_TPTC2_CLKCTRL 0x200
  62. #define DM81XX_CM_ALWON_TPTC3_CLKCTRL 0x204
  63. /* Registers specific to dm814x */
  64. #define DM814X_CM_ALWON_MCASP_3_4_5_CLKCTRL 0x16c
  65. #define DM814X_CM_ALWON_ATL_CLKCTRL 0x170
  66. #define DM814X_CM_ALWON_MLB_CLKCTRL 0x174
  67. #define DM814X_CM_ALWON_PATA_CLKCTRL 0x178
  68. #define DM814X_CM_ALWON_UART_3_CLKCTRL 0x180
  69. #define DM814X_CM_ALWON_UART_4_CLKCTRL 0x184
  70. #define DM814X_CM_ALWON_UART_5_CLKCTRL 0x188
  71. #define DM814X_CM_ALWON_OCM_0_CLKCTRL 0x1b4
  72. #define DM814X_CM_ALWON_VCP_CLKCTRL 0x1b8
  73. #define DM814X_CM_ALWON_MPU_CLKCTRL 0x1dc
  74. #define DM814X_CM_ALWON_DEBUGSS_CLKCTRL 0x1e0
  75. #define DM814X_CM_ALWON_DCAN_0_1_CLKCTRL 0x218
  76. #define DM814X_CM_ALWON_MMCHS_0_CLKCTRL 0x21c
  77. #define DM814X_CM_ALWON_MMCHS_1_CLKCTRL 0x220
  78. #define DM814X_CM_ALWON_MMCHS_2_CLKCTRL 0x224
  79. #define DM814X_CM_ALWON_CUST_EFUSE_CLKCTRL 0x228
  80. /* Registers specific to dm816x */
  81. #define DM816X_DM_ALWON_BASE 0x1400
  82. #define DM816X_CM_ALWON_TIMER_1_CLKCTRL (0x1570 - DM816X_DM_ALWON_BASE)
  83. #define DM816X_CM_ALWON_TIMER_2_CLKCTRL (0x1574 - DM816X_DM_ALWON_BASE)
  84. #define DM816X_CM_ALWON_TIMER_3_CLKCTRL (0x1578 - DM816X_DM_ALWON_BASE)
  85. #define DM816X_CM_ALWON_TIMER_4_CLKCTRL (0x157c - DM816X_DM_ALWON_BASE)
  86. #define DM816X_CM_ALWON_TIMER_5_CLKCTRL (0x1580 - DM816X_DM_ALWON_BASE)
  87. #define DM816X_CM_ALWON_TIMER_6_CLKCTRL (0x1584 - DM816X_DM_ALWON_BASE)
  88. #define DM816X_CM_ALWON_TIMER_7_CLKCTRL (0x1588 - DM816X_DM_ALWON_BASE)
  89. #define DM816X_CM_ALWON_SDIO_CLKCTRL (0x15b0 - DM816X_DM_ALWON_BASE)
  90. #define DM816X_CM_ALWON_OCMC_0_CLKCTRL (0x15b4 - DM816X_DM_ALWON_BASE)
  91. #define DM816X_CM_ALWON_OCMC_1_CLKCTRL (0x15b8 - DM816X_DM_ALWON_BASE)
  92. #define DM816X_CM_ALWON_ETHERNET_1_CLKCTRL (0x15d8 - DM816X_DM_ALWON_BASE)
  93. #define DM816X_CM_ALWON_MPU_CLKCTRL (0x15dc - DM816X_DM_ALWON_BASE)
  94. #define DM816X_CM_ALWON_SR_0_CLKCTRL (0x1608 - DM816X_DM_ALWON_BASE)
  95. #define DM816X_CM_ALWON_SR_1_CLKCTRL (0x160c - DM816X_DM_ALWON_BASE)
  96. /*
  97. * The default .clkctrl_offs field is offset from CM_DEFAULT, that's
  98. * TRM 18.7.6 CM_DEFAULT device register values minus 0x500
  99. */
  100. #define DM81XX_CM_DEFAULT_OFFSET 0x500
  101. #define DM81XX_CM_DEFAULT_USB_CLKCTRL (0x558 - DM81XX_CM_DEFAULT_OFFSET)
  102. /* L3 Interconnect entries clocked at 125, 250 and 500MHz */
  103. static struct omap_hwmod dm81xx_alwon_l3_slow_hwmod = {
  104. .name = "alwon_l3_slow",
  105. .clkdm_name = "alwon_l3s_clkdm",
  106. .class = &l3_hwmod_class,
  107. .flags = HWMOD_NO_IDLEST,
  108. };
  109. static struct omap_hwmod dm81xx_default_l3_slow_hwmod = {
  110. .name = "default_l3_slow",
  111. .clkdm_name = "default_l3_slow_clkdm",
  112. .class = &l3_hwmod_class,
  113. .flags = HWMOD_NO_IDLEST,
  114. };
  115. static struct omap_hwmod dm81xx_alwon_l3_med_hwmod = {
  116. .name = "l3_med",
  117. .clkdm_name = "alwon_l3_med_clkdm",
  118. .class = &l3_hwmod_class,
  119. .flags = HWMOD_NO_IDLEST,
  120. };
  121. static struct omap_hwmod dm81xx_alwon_l3_fast_hwmod = {
  122. .name = "l3_fast",
  123. .clkdm_name = "alwon_l3_fast_clkdm",
  124. .class = &l3_hwmod_class,
  125. .flags = HWMOD_NO_IDLEST,
  126. };
  127. /*
  128. * L4 standard peripherals, see TRM table 1-12 for devices using this.
  129. * See TRM table 1-73 for devices using the 125MHz SYSCLK6 clock.
  130. */
  131. static struct omap_hwmod dm81xx_l4_ls_hwmod = {
  132. .name = "l4_ls",
  133. .clkdm_name = "alwon_l3s_clkdm",
  134. .class = &l4_hwmod_class,
  135. .flags = HWMOD_NO_IDLEST,
  136. };
  137. /*
  138. * L4 high-speed peripherals. For devices using this, please see the TRM
  139. * table 1-13. On dm816x, only EMAC, MDIO and SATA use this. See also TRM
  140. * table 1-73 for devices using 250MHz SYSCLK5 clock.
  141. */
  142. static struct omap_hwmod dm81xx_l4_hs_hwmod = {
  143. .name = "l4_hs",
  144. .clkdm_name = "alwon_l3_med_clkdm",
  145. .class = &l4_hwmod_class,
  146. .flags = HWMOD_NO_IDLEST,
  147. };
  148. /* L3 slow -> L4 ls peripheral interface running at 125MHz */
  149. static struct omap_hwmod_ocp_if dm81xx_alwon_l3_slow__l4_ls = {
  150. .master = &dm81xx_alwon_l3_slow_hwmod,
  151. .slave = &dm81xx_l4_ls_hwmod,
  152. .user = OCP_USER_MPU,
  153. };
  154. /* L3 med -> L4 fast peripheral interface running at 250MHz */
  155. static struct omap_hwmod_ocp_if dm81xx_alwon_l3_slow__l4_hs = {
  156. .master = &dm81xx_alwon_l3_med_hwmod,
  157. .slave = &dm81xx_l4_hs_hwmod,
  158. .user = OCP_USER_MPU,
  159. };
  160. /* MPU */
  161. static struct omap_hwmod dm814x_mpu_hwmod = {
  162. .name = "mpu",
  163. .clkdm_name = "alwon_l3s_clkdm",
  164. .class = &mpu_hwmod_class,
  165. .flags = HWMOD_INIT_NO_IDLE,
  166. .main_clk = "mpu_ck",
  167. .prcm = {
  168. .omap4 = {
  169. .clkctrl_offs = DM814X_CM_ALWON_MPU_CLKCTRL,
  170. .modulemode = MODULEMODE_SWCTRL,
  171. },
  172. },
  173. };
  174. static struct omap_hwmod_ocp_if dm814x_mpu__alwon_l3_slow = {
  175. .master = &dm814x_mpu_hwmod,
  176. .slave = &dm81xx_alwon_l3_slow_hwmod,
  177. .user = OCP_USER_MPU,
  178. };
  179. /* L3 med peripheral interface running at 200MHz */
  180. static struct omap_hwmod_ocp_if dm814x_mpu__alwon_l3_med = {
  181. .master = &dm814x_mpu_hwmod,
  182. .slave = &dm81xx_alwon_l3_med_hwmod,
  183. .user = OCP_USER_MPU,
  184. };
  185. static struct omap_hwmod dm816x_mpu_hwmod = {
  186. .name = "mpu",
  187. .clkdm_name = "alwon_mpu_clkdm",
  188. .class = &mpu_hwmod_class,
  189. .flags = HWMOD_INIT_NO_IDLE,
  190. .main_clk = "mpu_ck",
  191. .prcm = {
  192. .omap4 = {
  193. .clkctrl_offs = DM816X_CM_ALWON_MPU_CLKCTRL,
  194. .modulemode = MODULEMODE_SWCTRL,
  195. },
  196. },
  197. };
  198. static struct omap_hwmod_ocp_if dm816x_mpu__alwon_l3_slow = {
  199. .master = &dm816x_mpu_hwmod,
  200. .slave = &dm81xx_alwon_l3_slow_hwmod,
  201. .user = OCP_USER_MPU,
  202. };
  203. /* L3 med peripheral interface running at 250MHz */
  204. static struct omap_hwmod_ocp_if dm816x_mpu__alwon_l3_med = {
  205. .master = &dm816x_mpu_hwmod,
  206. .slave = &dm81xx_alwon_l3_med_hwmod,
  207. .user = OCP_USER_MPU,
  208. };
  209. /* RTC */
  210. static struct omap_hwmod_class_sysconfig ti81xx_rtc_sysc = {
  211. .rev_offs = 0x74,
  212. .sysc_offs = 0x78,
  213. .sysc_flags = SYSC_HAS_SIDLEMODE,
  214. .idlemodes = SIDLE_FORCE | SIDLE_NO |
  215. SIDLE_SMART | SIDLE_SMART_WKUP,
  216. .sysc_fields = &omap_hwmod_sysc_type3,
  217. };
  218. static struct omap_hwmod_class ti81xx_rtc_hwmod_class = {
  219. .name = "rtc",
  220. .sysc = &ti81xx_rtc_sysc,
  221. };
  222. static struct omap_hwmod ti81xx_rtc_hwmod = {
  223. .name = "rtc",
  224. .class = &ti81xx_rtc_hwmod_class,
  225. .clkdm_name = "alwon_l3s_clkdm",
  226. .flags = HWMOD_NO_IDLEST,
  227. .main_clk = "sysclk18_ck",
  228. .prcm = {
  229. .omap4 = {
  230. .clkctrl_offs = DM81XX_CM_ALWON_RTC_CLKCTRL,
  231. .modulemode = MODULEMODE_SWCTRL,
  232. },
  233. },
  234. };
  235. static struct omap_hwmod_ocp_if ti81xx_l4_ls__rtc = {
  236. .master = &dm81xx_l4_ls_hwmod,
  237. .slave = &ti81xx_rtc_hwmod,
  238. .clk = "sysclk6_ck",
  239. .user = OCP_USER_MPU,
  240. };
  241. /* UART common */
  242. static struct omap_hwmod_class_sysconfig uart_sysc = {
  243. .rev_offs = 0x50,
  244. .sysc_offs = 0x54,
  245. .syss_offs = 0x58,
  246. .sysc_flags = SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
  247. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
  248. SYSS_HAS_RESET_STATUS,
  249. .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  250. MSTANDBY_SMART_WKUP,
  251. .sysc_fields = &omap_hwmod_sysc_type1,
  252. };
  253. static struct omap_hwmod_class uart_class = {
  254. .name = "uart",
  255. .sysc = &uart_sysc,
  256. };
  257. static struct omap_hwmod dm81xx_uart1_hwmod = {
  258. .name = "uart1",
  259. .clkdm_name = "alwon_l3s_clkdm",
  260. .main_clk = "sysclk10_ck",
  261. .prcm = {
  262. .omap4 = {
  263. .clkctrl_offs = DM81XX_CM_ALWON_UART_0_CLKCTRL,
  264. .modulemode = MODULEMODE_SWCTRL,
  265. },
  266. },
  267. .class = &uart_class,
  268. .flags = DEBUG_TI81XXUART1_FLAGS,
  269. };
  270. static struct omap_hwmod_ocp_if dm81xx_l4_ls__uart1 = {
  271. .master = &dm81xx_l4_ls_hwmod,
  272. .slave = &dm81xx_uart1_hwmod,
  273. .clk = "sysclk6_ck",
  274. .user = OCP_USER_MPU,
  275. };
  276. static struct omap_hwmod dm81xx_uart2_hwmod = {
  277. .name = "uart2",
  278. .clkdm_name = "alwon_l3s_clkdm",
  279. .main_clk = "sysclk10_ck",
  280. .prcm = {
  281. .omap4 = {
  282. .clkctrl_offs = DM81XX_CM_ALWON_UART_1_CLKCTRL,
  283. .modulemode = MODULEMODE_SWCTRL,
  284. },
  285. },
  286. .class = &uart_class,
  287. .flags = DEBUG_TI81XXUART2_FLAGS,
  288. };
  289. static struct omap_hwmod_ocp_if dm81xx_l4_ls__uart2 = {
  290. .master = &dm81xx_l4_ls_hwmod,
  291. .slave = &dm81xx_uart2_hwmod,
  292. .clk = "sysclk6_ck",
  293. .user = OCP_USER_MPU,
  294. };
  295. static struct omap_hwmod dm81xx_uart3_hwmod = {
  296. .name = "uart3",
  297. .clkdm_name = "alwon_l3s_clkdm",
  298. .main_clk = "sysclk10_ck",
  299. .prcm = {
  300. .omap4 = {
  301. .clkctrl_offs = DM81XX_CM_ALWON_UART_2_CLKCTRL,
  302. .modulemode = MODULEMODE_SWCTRL,
  303. },
  304. },
  305. .class = &uart_class,
  306. .flags = DEBUG_TI81XXUART3_FLAGS,
  307. };
  308. static struct omap_hwmod_ocp_if dm81xx_l4_ls__uart3 = {
  309. .master = &dm81xx_l4_ls_hwmod,
  310. .slave = &dm81xx_uart3_hwmod,
  311. .clk = "sysclk6_ck",
  312. .user = OCP_USER_MPU,
  313. };
  314. static struct omap_hwmod_class_sysconfig wd_timer_sysc = {
  315. .rev_offs = 0x0,
  316. .sysc_offs = 0x10,
  317. .syss_offs = 0x14,
  318. .sysc_flags = SYSC_HAS_EMUFREE | SYSC_HAS_SOFTRESET |
  319. SYSS_HAS_RESET_STATUS,
  320. .sysc_fields = &omap_hwmod_sysc_type1,
  321. };
  322. static struct omap_hwmod_class wd_timer_class = {
  323. .name = "wd_timer",
  324. .sysc = &wd_timer_sysc,
  325. .pre_shutdown = &omap2_wd_timer_disable,
  326. .reset = &omap2_wd_timer_reset,
  327. };
  328. static struct omap_hwmod dm81xx_wd_timer_hwmod = {
  329. .name = "wd_timer",
  330. .clkdm_name = "alwon_l3s_clkdm",
  331. .main_clk = "sysclk18_ck",
  332. .flags = HWMOD_NO_IDLEST,
  333. .prcm = {
  334. .omap4 = {
  335. .clkctrl_offs = DM81XX_CM_ALWON_WDTIMER_CLKCTRL,
  336. .modulemode = MODULEMODE_SWCTRL,
  337. },
  338. },
  339. .class = &wd_timer_class,
  340. };
  341. static struct omap_hwmod_ocp_if dm81xx_l4_ls__wd_timer1 = {
  342. .master = &dm81xx_l4_ls_hwmod,
  343. .slave = &dm81xx_wd_timer_hwmod,
  344. .clk = "sysclk6_ck",
  345. .user = OCP_USER_MPU,
  346. };
  347. /* I2C common */
  348. static struct omap_hwmod_class_sysconfig i2c_sysc = {
  349. .rev_offs = 0x0,
  350. .sysc_offs = 0x10,
  351. .syss_offs = 0x90,
  352. .sysc_flags = SYSC_HAS_SIDLEMODE |
  353. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  354. SYSC_HAS_AUTOIDLE,
  355. .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
  356. .sysc_fields = &omap_hwmod_sysc_type1,
  357. };
  358. static struct omap_hwmod_class i2c_class = {
  359. .name = "i2c",
  360. .sysc = &i2c_sysc,
  361. };
  362. static struct omap_hwmod dm81xx_i2c1_hwmod = {
  363. .name = "i2c1",
  364. .clkdm_name = "alwon_l3s_clkdm",
  365. .main_clk = "sysclk10_ck",
  366. .prcm = {
  367. .omap4 = {
  368. .clkctrl_offs = DM81XX_CM_ALWON_I2C_0_CLKCTRL,
  369. .modulemode = MODULEMODE_SWCTRL,
  370. },
  371. },
  372. .class = &i2c_class,
  373. };
  374. static struct omap_hwmod_ocp_if dm81xx_l4_ls__i2c1 = {
  375. .master = &dm81xx_l4_ls_hwmod,
  376. .slave = &dm81xx_i2c1_hwmod,
  377. .clk = "sysclk6_ck",
  378. .user = OCP_USER_MPU,
  379. };
  380. static struct omap_hwmod dm81xx_i2c2_hwmod = {
  381. .name = "i2c2",
  382. .clkdm_name = "alwon_l3s_clkdm",
  383. .main_clk = "sysclk10_ck",
  384. .prcm = {
  385. .omap4 = {
  386. .clkctrl_offs = DM81XX_CM_ALWON_I2C_1_CLKCTRL,
  387. .modulemode = MODULEMODE_SWCTRL,
  388. },
  389. },
  390. .class = &i2c_class,
  391. };
  392. static struct omap_hwmod_class_sysconfig dm81xx_elm_sysc = {
  393. .rev_offs = 0x0000,
  394. .sysc_offs = 0x0010,
  395. .syss_offs = 0x0014,
  396. .sysc_flags = SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  397. SYSC_HAS_SOFTRESET |
  398. SYSS_HAS_RESET_STATUS,
  399. .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
  400. .sysc_fields = &omap_hwmod_sysc_type1,
  401. };
  402. static struct omap_hwmod_ocp_if dm81xx_l4_ls__i2c2 = {
  403. .master = &dm81xx_l4_ls_hwmod,
  404. .slave = &dm81xx_i2c2_hwmod,
  405. .clk = "sysclk6_ck",
  406. .user = OCP_USER_MPU,
  407. };
  408. static struct omap_hwmod_class dm81xx_elm_hwmod_class = {
  409. .name = "elm",
  410. .sysc = &dm81xx_elm_sysc,
  411. };
  412. static struct omap_hwmod dm81xx_elm_hwmod = {
  413. .name = "elm",
  414. .clkdm_name = "alwon_l3s_clkdm",
  415. .class = &dm81xx_elm_hwmod_class,
  416. .main_clk = "sysclk6_ck",
  417. };
  418. static struct omap_hwmod_ocp_if dm81xx_l4_ls__elm = {
  419. .master = &dm81xx_l4_ls_hwmod,
  420. .slave = &dm81xx_elm_hwmod,
  421. .clk = "sysclk6_ck",
  422. .user = OCP_USER_MPU,
  423. };
  424. static struct omap_hwmod_class_sysconfig dm81xx_gpio_sysc = {
  425. .rev_offs = 0x0000,
  426. .sysc_offs = 0x0010,
  427. .syss_offs = 0x0114,
  428. .sysc_flags = SYSC_HAS_AUTOIDLE | SYSC_HAS_ENAWAKEUP |
  429. SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  430. SYSS_HAS_RESET_STATUS,
  431. .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  432. SIDLE_SMART_WKUP,
  433. .sysc_fields = &omap_hwmod_sysc_type1,
  434. };
  435. static struct omap_hwmod_class dm81xx_gpio_hwmod_class = {
  436. .name = "gpio",
  437. .sysc = &dm81xx_gpio_sysc,
  438. .rev = 2,
  439. };
  440. static struct omap_gpio_dev_attr gpio_dev_attr = {
  441. .bank_width = 32,
  442. .dbck_flag = true,
  443. };
  444. static struct omap_hwmod_opt_clk gpio1_opt_clks[] = {
  445. { .role = "dbclk", .clk = "sysclk18_ck" },
  446. };
  447. static struct omap_hwmod dm81xx_gpio1_hwmod = {
  448. .name = "gpio1",
  449. .clkdm_name = "alwon_l3s_clkdm",
  450. .class = &dm81xx_gpio_hwmod_class,
  451. .main_clk = "sysclk6_ck",
  452. .prcm = {
  453. .omap4 = {
  454. .clkctrl_offs = DM81XX_CM_ALWON_GPIO_0_CLKCTRL,
  455. .modulemode = MODULEMODE_SWCTRL,
  456. },
  457. },
  458. .opt_clks = gpio1_opt_clks,
  459. .opt_clks_cnt = ARRAY_SIZE(gpio1_opt_clks),
  460. .dev_attr = &gpio_dev_attr,
  461. };
  462. static struct omap_hwmod_ocp_if dm81xx_l4_ls__gpio1 = {
  463. .master = &dm81xx_l4_ls_hwmod,
  464. .slave = &dm81xx_gpio1_hwmod,
  465. .clk = "sysclk6_ck",
  466. .user = OCP_USER_MPU,
  467. };
  468. static struct omap_hwmod_opt_clk gpio2_opt_clks[] = {
  469. { .role = "dbclk", .clk = "sysclk18_ck" },
  470. };
  471. static struct omap_hwmod dm81xx_gpio2_hwmod = {
  472. .name = "gpio2",
  473. .clkdm_name = "alwon_l3s_clkdm",
  474. .class = &dm81xx_gpio_hwmod_class,
  475. .main_clk = "sysclk6_ck",
  476. .prcm = {
  477. .omap4 = {
  478. .clkctrl_offs = DM81XX_CM_ALWON_GPIO_1_CLKCTRL,
  479. .modulemode = MODULEMODE_SWCTRL,
  480. },
  481. },
  482. .opt_clks = gpio2_opt_clks,
  483. .opt_clks_cnt = ARRAY_SIZE(gpio2_opt_clks),
  484. .dev_attr = &gpio_dev_attr,
  485. };
  486. static struct omap_hwmod_ocp_if dm81xx_l4_ls__gpio2 = {
  487. .master = &dm81xx_l4_ls_hwmod,
  488. .slave = &dm81xx_gpio2_hwmod,
  489. .clk = "sysclk6_ck",
  490. .user = OCP_USER_MPU,
  491. };
  492. static struct omap_hwmod_class_sysconfig dm81xx_gpmc_sysc = {
  493. .rev_offs = 0x0,
  494. .sysc_offs = 0x10,
  495. .syss_offs = 0x14,
  496. .sysc_flags = SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
  497. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS,
  498. .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
  499. .sysc_fields = &omap_hwmod_sysc_type1,
  500. };
  501. static struct omap_hwmod_class dm81xx_gpmc_hwmod_class = {
  502. .name = "gpmc",
  503. .sysc = &dm81xx_gpmc_sysc,
  504. };
  505. static struct omap_hwmod dm81xx_gpmc_hwmod = {
  506. .name = "gpmc",
  507. .clkdm_name = "alwon_l3s_clkdm",
  508. .class = &dm81xx_gpmc_hwmod_class,
  509. .main_clk = "sysclk6_ck",
  510. /* Skip reset for CONFIG_OMAP_GPMC_DEBUG for bootloader timings */
  511. .flags = DEBUG_OMAP_GPMC_HWMOD_FLAGS,
  512. .prcm = {
  513. .omap4 = {
  514. .clkctrl_offs = DM81XX_CM_ALWON_GPMC_CLKCTRL,
  515. .modulemode = MODULEMODE_SWCTRL,
  516. },
  517. },
  518. };
  519. static struct omap_hwmod_ocp_if dm81xx_alwon_l3_slow__gpmc = {
  520. .master = &dm81xx_alwon_l3_slow_hwmod,
  521. .slave = &dm81xx_gpmc_hwmod,
  522. .user = OCP_USER_MPU,
  523. };
  524. /* USB needs udelay 1 after reset at least on hp t410, use 2 for margin */
  525. static struct omap_hwmod_class_sysconfig dm81xx_usbhsotg_sysc = {
  526. .rev_offs = 0x0,
  527. .sysc_offs = 0x10,
  528. .srst_udelay = 2,
  529. .sysc_flags = SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
  530. SYSC_HAS_SOFTRESET,
  531. .idlemodes = SIDLE_SMART | MSTANDBY_FORCE | MSTANDBY_SMART,
  532. .sysc_fields = &omap_hwmod_sysc_type2,
  533. };
  534. static struct omap_hwmod_class dm81xx_usbotg_class = {
  535. .name = "usbotg",
  536. .sysc = &dm81xx_usbhsotg_sysc,
  537. };
  538. static struct omap_hwmod dm814x_usbss_hwmod = {
  539. .name = "usb_otg_hs",
  540. .clkdm_name = "default_l3_slow_clkdm",
  541. .main_clk = "pll260dcoclkldo", /* 481c5260.adpll.dcoclkldo */
  542. .prcm = {
  543. .omap4 = {
  544. .clkctrl_offs = DM81XX_CM_DEFAULT_USB_CLKCTRL,
  545. .modulemode = MODULEMODE_SWCTRL,
  546. },
  547. },
  548. .class = &dm81xx_usbotg_class,
  549. };
  550. static struct omap_hwmod_ocp_if dm814x_default_l3_slow__usbss = {
  551. .master = &dm81xx_default_l3_slow_hwmod,
  552. .slave = &dm814x_usbss_hwmod,
  553. .clk = "sysclk6_ck",
  554. .user = OCP_USER_MPU,
  555. };
  556. static struct omap_hwmod dm816x_usbss_hwmod = {
  557. .name = "usb_otg_hs",
  558. .clkdm_name = "default_l3_slow_clkdm",
  559. .main_clk = "sysclk6_ck",
  560. .prcm = {
  561. .omap4 = {
  562. .clkctrl_offs = DM81XX_CM_DEFAULT_USB_CLKCTRL,
  563. .modulemode = MODULEMODE_SWCTRL,
  564. },
  565. },
  566. .class = &dm81xx_usbotg_class,
  567. };
  568. static struct omap_hwmod_ocp_if dm816x_default_l3_slow__usbss = {
  569. .master = &dm81xx_default_l3_slow_hwmod,
  570. .slave = &dm816x_usbss_hwmod,
  571. .clk = "sysclk6_ck",
  572. .user = OCP_USER_MPU,
  573. };
  574. static struct omap_hwmod_class_sysconfig dm816x_timer_sysc = {
  575. .rev_offs = 0x0000,
  576. .sysc_offs = 0x0010,
  577. .syss_offs = 0x0014,
  578. .sysc_flags = SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET,
  579. .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
  580. SIDLE_SMART_WKUP,
  581. .sysc_fields = &omap_hwmod_sysc_type2,
  582. };
  583. static struct omap_hwmod_class dm816x_timer_hwmod_class = {
  584. .name = "timer",
  585. .sysc = &dm816x_timer_sysc,
  586. };
  587. static struct omap_timer_capability_dev_attr capability_alwon_dev_attr = {
  588. .timer_capability = OMAP_TIMER_ALWON,
  589. };
  590. static struct omap_hwmod dm814x_timer1_hwmod = {
  591. .name = "timer1",
  592. .clkdm_name = "alwon_l3s_clkdm",
  593. .main_clk = "timer1_fck",
  594. .dev_attr = &capability_alwon_dev_attr,
  595. .class = &dm816x_timer_hwmod_class,
  596. .flags = HWMOD_NO_IDLEST,
  597. };
  598. static struct omap_hwmod_ocp_if dm814x_l4_ls__timer1 = {
  599. .master = &dm81xx_l4_ls_hwmod,
  600. .slave = &dm814x_timer1_hwmod,
  601. .clk = "sysclk6_ck",
  602. .user = OCP_USER_MPU,
  603. };
  604. static struct omap_hwmod dm816x_timer1_hwmod = {
  605. .name = "timer1",
  606. .clkdm_name = "alwon_l3s_clkdm",
  607. .main_clk = "timer1_fck",
  608. .prcm = {
  609. .omap4 = {
  610. .clkctrl_offs = DM816X_CM_ALWON_TIMER_1_CLKCTRL,
  611. .modulemode = MODULEMODE_SWCTRL,
  612. },
  613. },
  614. .dev_attr = &capability_alwon_dev_attr,
  615. .class = &dm816x_timer_hwmod_class,
  616. };
  617. static struct omap_hwmod_ocp_if dm816x_l4_ls__timer1 = {
  618. .master = &dm81xx_l4_ls_hwmod,
  619. .slave = &dm816x_timer1_hwmod,
  620. .clk = "sysclk6_ck",
  621. .user = OCP_USER_MPU,
  622. };
  623. static struct omap_hwmod dm814x_timer2_hwmod = {
  624. .name = "timer2",
  625. .clkdm_name = "alwon_l3s_clkdm",
  626. .main_clk = "timer2_fck",
  627. .dev_attr = &capability_alwon_dev_attr,
  628. .class = &dm816x_timer_hwmod_class,
  629. .flags = HWMOD_NO_IDLEST,
  630. };
  631. static struct omap_hwmod_ocp_if dm814x_l4_ls__timer2 = {
  632. .master = &dm81xx_l4_ls_hwmod,
  633. .slave = &dm814x_timer2_hwmod,
  634. .clk = "sysclk6_ck",
  635. .user = OCP_USER_MPU,
  636. };
  637. static struct omap_hwmod dm816x_timer2_hwmod = {
  638. .name = "timer2",
  639. .clkdm_name = "alwon_l3s_clkdm",
  640. .main_clk = "timer2_fck",
  641. .prcm = {
  642. .omap4 = {
  643. .clkctrl_offs = DM816X_CM_ALWON_TIMER_2_CLKCTRL,
  644. .modulemode = MODULEMODE_SWCTRL,
  645. },
  646. },
  647. .dev_attr = &capability_alwon_dev_attr,
  648. .class = &dm816x_timer_hwmod_class,
  649. };
  650. static struct omap_hwmod_ocp_if dm816x_l4_ls__timer2 = {
  651. .master = &dm81xx_l4_ls_hwmod,
  652. .slave = &dm816x_timer2_hwmod,
  653. .clk = "sysclk6_ck",
  654. .user = OCP_USER_MPU,
  655. };
  656. static struct omap_hwmod dm816x_timer3_hwmod = {
  657. .name = "timer3",
  658. .clkdm_name = "alwon_l3s_clkdm",
  659. .main_clk = "timer3_fck",
  660. .prcm = {
  661. .omap4 = {
  662. .clkctrl_offs = DM816X_CM_ALWON_TIMER_3_CLKCTRL,
  663. .modulemode = MODULEMODE_SWCTRL,
  664. },
  665. },
  666. .dev_attr = &capability_alwon_dev_attr,
  667. .class = &dm816x_timer_hwmod_class,
  668. };
  669. static struct omap_hwmod_ocp_if dm816x_l4_ls__timer3 = {
  670. .master = &dm81xx_l4_ls_hwmod,
  671. .slave = &dm816x_timer3_hwmod,
  672. .clk = "sysclk6_ck",
  673. .user = OCP_USER_MPU,
  674. };
  675. static struct omap_hwmod dm816x_timer4_hwmod = {
  676. .name = "timer4",
  677. .clkdm_name = "alwon_l3s_clkdm",
  678. .main_clk = "timer4_fck",
  679. .prcm = {
  680. .omap4 = {
  681. .clkctrl_offs = DM816X_CM_ALWON_TIMER_4_CLKCTRL,
  682. .modulemode = MODULEMODE_SWCTRL,
  683. },
  684. },
  685. .dev_attr = &capability_alwon_dev_attr,
  686. .class = &dm816x_timer_hwmod_class,
  687. };
  688. static struct omap_hwmod_ocp_if dm816x_l4_ls__timer4 = {
  689. .master = &dm81xx_l4_ls_hwmod,
  690. .slave = &dm816x_timer4_hwmod,
  691. .clk = "sysclk6_ck",
  692. .user = OCP_USER_MPU,
  693. };
  694. static struct omap_hwmod dm816x_timer5_hwmod = {
  695. .name = "timer5",
  696. .clkdm_name = "alwon_l3s_clkdm",
  697. .main_clk = "timer5_fck",
  698. .prcm = {
  699. .omap4 = {
  700. .clkctrl_offs = DM816X_CM_ALWON_TIMER_5_CLKCTRL,
  701. .modulemode = MODULEMODE_SWCTRL,
  702. },
  703. },
  704. .dev_attr = &capability_alwon_dev_attr,
  705. .class = &dm816x_timer_hwmod_class,
  706. };
  707. static struct omap_hwmod_ocp_if dm816x_l4_ls__timer5 = {
  708. .master = &dm81xx_l4_ls_hwmod,
  709. .slave = &dm816x_timer5_hwmod,
  710. .clk = "sysclk6_ck",
  711. .user = OCP_USER_MPU,
  712. };
  713. static struct omap_hwmod dm816x_timer6_hwmod = {
  714. .name = "timer6",
  715. .clkdm_name = "alwon_l3s_clkdm",
  716. .main_clk = "timer6_fck",
  717. .prcm = {
  718. .omap4 = {
  719. .clkctrl_offs = DM816X_CM_ALWON_TIMER_6_CLKCTRL,
  720. .modulemode = MODULEMODE_SWCTRL,
  721. },
  722. },
  723. .dev_attr = &capability_alwon_dev_attr,
  724. .class = &dm816x_timer_hwmod_class,
  725. };
  726. static struct omap_hwmod_ocp_if dm816x_l4_ls__timer6 = {
  727. .master = &dm81xx_l4_ls_hwmod,
  728. .slave = &dm816x_timer6_hwmod,
  729. .clk = "sysclk6_ck",
  730. .user = OCP_USER_MPU,
  731. };
  732. static struct omap_hwmod dm816x_timer7_hwmod = {
  733. .name = "timer7",
  734. .clkdm_name = "alwon_l3s_clkdm",
  735. .main_clk = "timer7_fck",
  736. .prcm = {
  737. .omap4 = {
  738. .clkctrl_offs = DM816X_CM_ALWON_TIMER_7_CLKCTRL,
  739. .modulemode = MODULEMODE_SWCTRL,
  740. },
  741. },
  742. .dev_attr = &capability_alwon_dev_attr,
  743. .class = &dm816x_timer_hwmod_class,
  744. };
  745. static struct omap_hwmod_ocp_if dm816x_l4_ls__timer7 = {
  746. .master = &dm81xx_l4_ls_hwmod,
  747. .slave = &dm816x_timer7_hwmod,
  748. .clk = "sysclk6_ck",
  749. .user = OCP_USER_MPU,
  750. };
  751. /* CPSW on dm814x */
  752. static struct omap_hwmod_class_sysconfig dm814x_cpgmac_sysc = {
  753. .rev_offs = 0x0,
  754. .sysc_offs = 0x8,
  755. .syss_offs = 0x4,
  756. .sysc_flags = SYSC_HAS_SIDLEMODE | SYSC_HAS_MIDLEMODE |
  757. SYSS_HAS_RESET_STATUS,
  758. .idlemodes = SIDLE_FORCE | SIDLE_NO | MSTANDBY_FORCE |
  759. MSTANDBY_NO,
  760. .sysc_fields = &omap_hwmod_sysc_type3,
  761. };
  762. static struct omap_hwmod_class dm814x_cpgmac0_hwmod_class = {
  763. .name = "cpgmac0",
  764. .sysc = &dm814x_cpgmac_sysc,
  765. };
  766. static struct omap_hwmod dm814x_cpgmac0_hwmod = {
  767. .name = "cpgmac0",
  768. .class = &dm814x_cpgmac0_hwmod_class,
  769. .clkdm_name = "alwon_ethernet_clkdm",
  770. .flags = HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY,
  771. .main_clk = "cpsw_125mhz_gclk",
  772. .prcm = {
  773. .omap4 = {
  774. .clkctrl_offs = DM81XX_CM_ALWON_ETHERNET_0_CLKCTRL,
  775. .modulemode = MODULEMODE_SWCTRL,
  776. },
  777. },
  778. };
  779. static struct omap_hwmod_class dm814x_mdio_hwmod_class = {
  780. .name = "davinci_mdio",
  781. };
  782. static struct omap_hwmod dm814x_mdio_hwmod = {
  783. .name = "davinci_mdio",
  784. .class = &dm814x_mdio_hwmod_class,
  785. .clkdm_name = "alwon_ethernet_clkdm",
  786. .main_clk = "cpsw_125mhz_gclk",
  787. };
  788. static struct omap_hwmod_ocp_if dm814x_l4_hs__cpgmac0 = {
  789. .master = &dm81xx_l4_hs_hwmod,
  790. .slave = &dm814x_cpgmac0_hwmod,
  791. .clk = "cpsw_125mhz_gclk",
  792. .user = OCP_USER_MPU,
  793. };
  794. static struct omap_hwmod_ocp_if dm814x_cpgmac0__mdio = {
  795. .master = &dm814x_cpgmac0_hwmod,
  796. .slave = &dm814x_mdio_hwmod,
  797. .user = OCP_USER_MPU,
  798. .flags = HWMOD_NO_IDLEST,
  799. };
  800. /* EMAC Ethernet */
  801. static struct omap_hwmod_class_sysconfig dm816x_emac_sysc = {
  802. .rev_offs = 0x0,
  803. .sysc_offs = 0x4,
  804. .sysc_flags = SYSC_HAS_SOFTRESET,
  805. .sysc_fields = &omap_hwmod_sysc_type2,
  806. };
  807. static struct omap_hwmod_class dm816x_emac_hwmod_class = {
  808. .name = "emac",
  809. .sysc = &dm816x_emac_sysc,
  810. };
  811. /*
  812. * On dm816x the MDIO is within EMAC0. As the MDIO driver is a separate
  813. * driver probed before EMAC0, we let MDIO do the clock idling.
  814. */
  815. static struct omap_hwmod dm816x_emac0_hwmod = {
  816. .name = "emac0",
  817. .clkdm_name = "alwon_ethernet_clkdm",
  818. .class = &dm816x_emac_hwmod_class,
  819. .flags = HWMOD_NO_IDLEST,
  820. };
  821. static struct omap_hwmod_ocp_if dm81xx_l4_hs__emac0 = {
  822. .master = &dm81xx_l4_hs_hwmod,
  823. .slave = &dm816x_emac0_hwmod,
  824. .clk = "sysclk5_ck",
  825. .user = OCP_USER_MPU,
  826. };
  827. static struct omap_hwmod_class dm81xx_mdio_hwmod_class = {
  828. .name = "davinci_mdio",
  829. .sysc = &dm816x_emac_sysc,
  830. };
  831. static struct omap_hwmod dm81xx_emac0_mdio_hwmod = {
  832. .name = "davinci_mdio",
  833. .class = &dm81xx_mdio_hwmod_class,
  834. .clkdm_name = "alwon_ethernet_clkdm",
  835. .main_clk = "sysclk24_ck",
  836. .flags = HWMOD_NO_IDLEST,
  837. /*
  838. * REVISIT: This should be moved to the emac0_hwmod
  839. * once we have a better way to handle device slaves.
  840. */
  841. .prcm = {
  842. .omap4 = {
  843. .clkctrl_offs = DM81XX_CM_ALWON_ETHERNET_0_CLKCTRL,
  844. .modulemode = MODULEMODE_SWCTRL,
  845. },
  846. },
  847. };
  848. static struct omap_hwmod_ocp_if dm81xx_emac0__mdio = {
  849. .master = &dm81xx_l4_hs_hwmod,
  850. .slave = &dm81xx_emac0_mdio_hwmod,
  851. .user = OCP_USER_MPU,
  852. };
  853. static struct omap_hwmod dm816x_emac1_hwmod = {
  854. .name = "emac1",
  855. .clkdm_name = "alwon_ethernet_clkdm",
  856. .main_clk = "sysclk24_ck",
  857. .flags = HWMOD_NO_IDLEST,
  858. .prcm = {
  859. .omap4 = {
  860. .clkctrl_offs = DM816X_CM_ALWON_ETHERNET_1_CLKCTRL,
  861. .modulemode = MODULEMODE_SWCTRL,
  862. },
  863. },
  864. .class = &dm816x_emac_hwmod_class,
  865. };
  866. static struct omap_hwmod_ocp_if dm816x_l4_hs__emac1 = {
  867. .master = &dm81xx_l4_hs_hwmod,
  868. .slave = &dm816x_emac1_hwmod,
  869. .clk = "sysclk5_ck",
  870. .user = OCP_USER_MPU,
  871. };
  872. static struct omap_hwmod_class_sysconfig dm81xx_mmc_sysc = {
  873. .rev_offs = 0x0,
  874. .sysc_offs = 0x110,
  875. .syss_offs = 0x114,
  876. .sysc_flags = SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  877. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  878. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS,
  879. .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
  880. .sysc_fields = &omap_hwmod_sysc_type1,
  881. };
  882. static struct omap_hwmod_class dm81xx_mmc_class = {
  883. .name = "mmc",
  884. .sysc = &dm81xx_mmc_sysc,
  885. };
  886. static struct omap_hwmod_opt_clk dm81xx_mmc_opt_clks[] = {
  887. { .role = "dbck", .clk = "sysclk18_ck", },
  888. };
  889. static struct omap_hsmmc_dev_attr mmc_dev_attr = {
  890. };
  891. static struct omap_hwmod dm814x_mmc1_hwmod = {
  892. .name = "mmc1",
  893. .clkdm_name = "alwon_l3s_clkdm",
  894. .opt_clks = dm81xx_mmc_opt_clks,
  895. .opt_clks_cnt = ARRAY_SIZE(dm81xx_mmc_opt_clks),
  896. .main_clk = "sysclk8_ck",
  897. .prcm = {
  898. .omap4 = {
  899. .clkctrl_offs = DM814X_CM_ALWON_MMCHS_0_CLKCTRL,
  900. .modulemode = MODULEMODE_SWCTRL,
  901. },
  902. },
  903. .dev_attr = &mmc_dev_attr,
  904. .class = &dm81xx_mmc_class,
  905. };
  906. static struct omap_hwmod_ocp_if dm814x_l4_ls__mmc1 = {
  907. .master = &dm81xx_l4_ls_hwmod,
  908. .slave = &dm814x_mmc1_hwmod,
  909. .clk = "sysclk6_ck",
  910. .user = OCP_USER_MPU,
  911. .flags = OMAP_FIREWALL_L4
  912. };
  913. static struct omap_hwmod dm814x_mmc2_hwmod = {
  914. .name = "mmc2",
  915. .clkdm_name = "alwon_l3s_clkdm",
  916. .opt_clks = dm81xx_mmc_opt_clks,
  917. .opt_clks_cnt = ARRAY_SIZE(dm81xx_mmc_opt_clks),
  918. .main_clk = "sysclk8_ck",
  919. .prcm = {
  920. .omap4 = {
  921. .clkctrl_offs = DM814X_CM_ALWON_MMCHS_1_CLKCTRL,
  922. .modulemode = MODULEMODE_SWCTRL,
  923. },
  924. },
  925. .dev_attr = &mmc_dev_attr,
  926. .class = &dm81xx_mmc_class,
  927. };
  928. static struct omap_hwmod_ocp_if dm814x_l4_ls__mmc2 = {
  929. .master = &dm81xx_l4_ls_hwmod,
  930. .slave = &dm814x_mmc2_hwmod,
  931. .clk = "sysclk6_ck",
  932. .user = OCP_USER_MPU,
  933. .flags = OMAP_FIREWALL_L4
  934. };
  935. static struct omap_hwmod dm814x_mmc3_hwmod = {
  936. .name = "mmc3",
  937. .clkdm_name = "alwon_l3_med_clkdm",
  938. .opt_clks = dm81xx_mmc_opt_clks,
  939. .opt_clks_cnt = ARRAY_SIZE(dm81xx_mmc_opt_clks),
  940. .main_clk = "sysclk8_ck",
  941. .prcm = {
  942. .omap4 = {
  943. .clkctrl_offs = DM814X_CM_ALWON_MMCHS_2_CLKCTRL,
  944. .modulemode = MODULEMODE_SWCTRL,
  945. },
  946. },
  947. .dev_attr = &mmc_dev_attr,
  948. .class = &dm81xx_mmc_class,
  949. };
  950. static struct omap_hwmod_ocp_if dm814x_alwon_l3_med__mmc3 = {
  951. .master = &dm81xx_alwon_l3_med_hwmod,
  952. .slave = &dm814x_mmc3_hwmod,
  953. .clk = "sysclk4_ck",
  954. .user = OCP_USER_MPU,
  955. };
  956. static struct omap_hwmod dm816x_mmc1_hwmod = {
  957. .name = "mmc1",
  958. .clkdm_name = "alwon_l3s_clkdm",
  959. .opt_clks = dm81xx_mmc_opt_clks,
  960. .opt_clks_cnt = ARRAY_SIZE(dm81xx_mmc_opt_clks),
  961. .main_clk = "sysclk10_ck",
  962. .prcm = {
  963. .omap4 = {
  964. .clkctrl_offs = DM816X_CM_ALWON_SDIO_CLKCTRL,
  965. .modulemode = MODULEMODE_SWCTRL,
  966. },
  967. },
  968. .dev_attr = &mmc_dev_attr,
  969. .class = &dm81xx_mmc_class,
  970. };
  971. static struct omap_hwmod_ocp_if dm816x_l4_ls__mmc1 = {
  972. .master = &dm81xx_l4_ls_hwmod,
  973. .slave = &dm816x_mmc1_hwmod,
  974. .clk = "sysclk6_ck",
  975. .user = OCP_USER_MPU,
  976. .flags = OMAP_FIREWALL_L4
  977. };
  978. static struct omap_hwmod_class_sysconfig dm816x_mcspi_sysc = {
  979. .rev_offs = 0x0,
  980. .sysc_offs = 0x110,
  981. .syss_offs = 0x114,
  982. .sysc_flags = SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  983. SYSC_HAS_ENAWAKEUP | SYSC_HAS_SOFTRESET |
  984. SYSC_HAS_AUTOIDLE | SYSS_HAS_RESET_STATUS,
  985. .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
  986. .sysc_fields = &omap_hwmod_sysc_type1,
  987. };
  988. static struct omap_hwmod_class dm816x_mcspi_class = {
  989. .name = "mcspi",
  990. .sysc = &dm816x_mcspi_sysc,
  991. .rev = OMAP3_MCSPI_REV,
  992. };
  993. static struct omap2_mcspi_dev_attr dm816x_mcspi1_dev_attr = {
  994. .num_chipselect = 4,
  995. };
  996. static struct omap_hwmod dm81xx_mcspi1_hwmod = {
  997. .name = "mcspi1",
  998. .clkdm_name = "alwon_l3s_clkdm",
  999. .main_clk = "sysclk10_ck",
  1000. .prcm = {
  1001. .omap4 = {
  1002. .clkctrl_offs = DM81XX_CM_ALWON_SPI_CLKCTRL,
  1003. .modulemode = MODULEMODE_SWCTRL,
  1004. },
  1005. },
  1006. .class = &dm816x_mcspi_class,
  1007. .dev_attr = &dm816x_mcspi1_dev_attr,
  1008. };
  1009. static struct omap_hwmod_ocp_if dm81xx_l4_ls__mcspi1 = {
  1010. .master = &dm81xx_l4_ls_hwmod,
  1011. .slave = &dm81xx_mcspi1_hwmod,
  1012. .clk = "sysclk6_ck",
  1013. .user = OCP_USER_MPU,
  1014. };
  1015. static struct omap_hwmod_class_sysconfig dm81xx_mailbox_sysc = {
  1016. .rev_offs = 0x000,
  1017. .sysc_offs = 0x010,
  1018. .syss_offs = 0x014,
  1019. .sysc_flags = SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1020. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE,
  1021. .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
  1022. .sysc_fields = &omap_hwmod_sysc_type1,
  1023. };
  1024. static struct omap_hwmod_class dm81xx_mailbox_hwmod_class = {
  1025. .name = "mailbox",
  1026. .sysc = &dm81xx_mailbox_sysc,
  1027. };
  1028. static struct omap_hwmod dm81xx_mailbox_hwmod = {
  1029. .name = "mailbox",
  1030. .clkdm_name = "alwon_l3s_clkdm",
  1031. .class = &dm81xx_mailbox_hwmod_class,
  1032. .main_clk = "sysclk6_ck",
  1033. .prcm = {
  1034. .omap4 = {
  1035. .clkctrl_offs = DM81XX_CM_ALWON_MAILBOX_CLKCTRL,
  1036. .modulemode = MODULEMODE_SWCTRL,
  1037. },
  1038. },
  1039. };
  1040. static struct omap_hwmod_ocp_if dm81xx_l4_ls__mailbox = {
  1041. .master = &dm81xx_l4_ls_hwmod,
  1042. .slave = &dm81xx_mailbox_hwmod,
  1043. .clk = "sysclk6_ck",
  1044. .user = OCP_USER_MPU,
  1045. };
  1046. static struct omap_hwmod_class_sysconfig dm81xx_spinbox_sysc = {
  1047. .rev_offs = 0x000,
  1048. .sysc_offs = 0x010,
  1049. .syss_offs = 0x014,
  1050. .sysc_flags = SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_SIDLEMODE |
  1051. SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE,
  1052. .idlemodes = SIDLE_FORCE | SIDLE_NO | SIDLE_SMART,
  1053. .sysc_fields = &omap_hwmod_sysc_type1,
  1054. };
  1055. static struct omap_hwmod_class dm81xx_spinbox_hwmod_class = {
  1056. .name = "spinbox",
  1057. .sysc = &dm81xx_spinbox_sysc,
  1058. };
  1059. static struct omap_hwmod dm81xx_spinbox_hwmod = {
  1060. .name = "spinbox",
  1061. .clkdm_name = "alwon_l3s_clkdm",
  1062. .class = &dm81xx_spinbox_hwmod_class,
  1063. .main_clk = "sysclk6_ck",
  1064. .prcm = {
  1065. .omap4 = {
  1066. .clkctrl_offs = DM81XX_CM_ALWON_SPINBOX_CLKCTRL,
  1067. .modulemode = MODULEMODE_SWCTRL,
  1068. },
  1069. },
  1070. };
  1071. static struct omap_hwmod_ocp_if dm81xx_l4_ls__spinbox = {
  1072. .master = &dm81xx_l4_ls_hwmod,
  1073. .slave = &dm81xx_spinbox_hwmod,
  1074. .clk = "sysclk6_ck",
  1075. .user = OCP_USER_MPU,
  1076. };
  1077. static struct omap_hwmod_class dm81xx_tpcc_hwmod_class = {
  1078. .name = "tpcc",
  1079. };
  1080. static struct omap_hwmod dm81xx_tpcc_hwmod = {
  1081. .name = "tpcc",
  1082. .class = &dm81xx_tpcc_hwmod_class,
  1083. .clkdm_name = "alwon_l3s_clkdm",
  1084. .main_clk = "sysclk4_ck",
  1085. .prcm = {
  1086. .omap4 = {
  1087. .clkctrl_offs = DM81XX_CM_ALWON_TPCC_CLKCTRL,
  1088. .modulemode = MODULEMODE_SWCTRL,
  1089. },
  1090. },
  1091. };
  1092. static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tpcc = {
  1093. .master = &dm81xx_alwon_l3_fast_hwmod,
  1094. .slave = &dm81xx_tpcc_hwmod,
  1095. .clk = "sysclk4_ck",
  1096. .user = OCP_USER_MPU,
  1097. };
  1098. static struct omap_hwmod_addr_space dm81xx_tptc0_addr_space[] = {
  1099. {
  1100. .pa_start = 0x49800000,
  1101. .pa_end = 0x49800000 + SZ_8K - 1,
  1102. .flags = ADDR_TYPE_RT,
  1103. },
  1104. { },
  1105. };
  1106. static struct omap_hwmod_class dm81xx_tptc0_hwmod_class = {
  1107. .name = "tptc0",
  1108. };
  1109. static struct omap_hwmod dm81xx_tptc0_hwmod = {
  1110. .name = "tptc0",
  1111. .class = &dm81xx_tptc0_hwmod_class,
  1112. .clkdm_name = "alwon_l3s_clkdm",
  1113. .main_clk = "sysclk4_ck",
  1114. .prcm = {
  1115. .omap4 = {
  1116. .clkctrl_offs = DM81XX_CM_ALWON_TPTC0_CLKCTRL,
  1117. .modulemode = MODULEMODE_SWCTRL,
  1118. },
  1119. },
  1120. };
  1121. static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tptc0 = {
  1122. .master = &dm81xx_alwon_l3_fast_hwmod,
  1123. .slave = &dm81xx_tptc0_hwmod,
  1124. .clk = "sysclk4_ck",
  1125. .addr = dm81xx_tptc0_addr_space,
  1126. .user = OCP_USER_MPU,
  1127. };
  1128. static struct omap_hwmod_ocp_if dm81xx_tptc0__alwon_l3_fast = {
  1129. .master = &dm81xx_tptc0_hwmod,
  1130. .slave = &dm81xx_alwon_l3_fast_hwmod,
  1131. .clk = "sysclk4_ck",
  1132. .addr = dm81xx_tptc0_addr_space,
  1133. .user = OCP_USER_MPU,
  1134. };
  1135. static struct omap_hwmod_addr_space dm81xx_tptc1_addr_space[] = {
  1136. {
  1137. .pa_start = 0x49900000,
  1138. .pa_end = 0x49900000 + SZ_8K - 1,
  1139. .flags = ADDR_TYPE_RT,
  1140. },
  1141. { },
  1142. };
  1143. static struct omap_hwmod_class dm81xx_tptc1_hwmod_class = {
  1144. .name = "tptc1",
  1145. };
  1146. static struct omap_hwmod dm81xx_tptc1_hwmod = {
  1147. .name = "tptc1",
  1148. .class = &dm81xx_tptc1_hwmod_class,
  1149. .clkdm_name = "alwon_l3s_clkdm",
  1150. .main_clk = "sysclk4_ck",
  1151. .prcm = {
  1152. .omap4 = {
  1153. .clkctrl_offs = DM81XX_CM_ALWON_TPTC1_CLKCTRL,
  1154. .modulemode = MODULEMODE_SWCTRL,
  1155. },
  1156. },
  1157. };
  1158. static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tptc1 = {
  1159. .master = &dm81xx_alwon_l3_fast_hwmod,
  1160. .slave = &dm81xx_tptc1_hwmod,
  1161. .clk = "sysclk4_ck",
  1162. .addr = dm81xx_tptc1_addr_space,
  1163. .user = OCP_USER_MPU,
  1164. };
  1165. static struct omap_hwmod_ocp_if dm81xx_tptc1__alwon_l3_fast = {
  1166. .master = &dm81xx_tptc1_hwmod,
  1167. .slave = &dm81xx_alwon_l3_fast_hwmod,
  1168. .clk = "sysclk4_ck",
  1169. .addr = dm81xx_tptc1_addr_space,
  1170. .user = OCP_USER_MPU,
  1171. };
  1172. static struct omap_hwmod_addr_space dm81xx_tptc2_addr_space[] = {
  1173. {
  1174. .pa_start = 0x49a00000,
  1175. .pa_end = 0x49a00000 + SZ_8K - 1,
  1176. .flags = ADDR_TYPE_RT,
  1177. },
  1178. { },
  1179. };
  1180. static struct omap_hwmod_class dm81xx_tptc2_hwmod_class = {
  1181. .name = "tptc2",
  1182. };
  1183. static struct omap_hwmod dm81xx_tptc2_hwmod = {
  1184. .name = "tptc2",
  1185. .class = &dm81xx_tptc2_hwmod_class,
  1186. .clkdm_name = "alwon_l3s_clkdm",
  1187. .main_clk = "sysclk4_ck",
  1188. .prcm = {
  1189. .omap4 = {
  1190. .clkctrl_offs = DM81XX_CM_ALWON_TPTC2_CLKCTRL,
  1191. .modulemode = MODULEMODE_SWCTRL,
  1192. },
  1193. },
  1194. };
  1195. static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tptc2 = {
  1196. .master = &dm81xx_alwon_l3_fast_hwmod,
  1197. .slave = &dm81xx_tptc2_hwmod,
  1198. .clk = "sysclk4_ck",
  1199. .addr = dm81xx_tptc2_addr_space,
  1200. .user = OCP_USER_MPU,
  1201. };
  1202. static struct omap_hwmod_ocp_if dm81xx_tptc2__alwon_l3_fast = {
  1203. .master = &dm81xx_tptc2_hwmod,
  1204. .slave = &dm81xx_alwon_l3_fast_hwmod,
  1205. .clk = "sysclk4_ck",
  1206. .addr = dm81xx_tptc2_addr_space,
  1207. .user = OCP_USER_MPU,
  1208. };
  1209. static struct omap_hwmod_addr_space dm81xx_tptc3_addr_space[] = {
  1210. {
  1211. .pa_start = 0x49b00000,
  1212. .pa_end = 0x49b00000 + SZ_8K - 1,
  1213. .flags = ADDR_TYPE_RT,
  1214. },
  1215. { },
  1216. };
  1217. static struct omap_hwmod_class dm81xx_tptc3_hwmod_class = {
  1218. .name = "tptc3",
  1219. };
  1220. static struct omap_hwmod dm81xx_tptc3_hwmod = {
  1221. .name = "tptc3",
  1222. .class = &dm81xx_tptc3_hwmod_class,
  1223. .clkdm_name = "alwon_l3s_clkdm",
  1224. .main_clk = "sysclk4_ck",
  1225. .prcm = {
  1226. .omap4 = {
  1227. .clkctrl_offs = DM81XX_CM_ALWON_TPTC3_CLKCTRL,
  1228. .modulemode = MODULEMODE_SWCTRL,
  1229. },
  1230. },
  1231. };
  1232. static struct omap_hwmod_ocp_if dm81xx_alwon_l3_fast__tptc3 = {
  1233. .master = &dm81xx_alwon_l3_fast_hwmod,
  1234. .slave = &dm81xx_tptc3_hwmod,
  1235. .clk = "sysclk4_ck",
  1236. .addr = dm81xx_tptc3_addr_space,
  1237. .user = OCP_USER_MPU,
  1238. };
  1239. static struct omap_hwmod_ocp_if dm81xx_tptc3__alwon_l3_fast = {
  1240. .master = &dm81xx_tptc3_hwmod,
  1241. .slave = &dm81xx_alwon_l3_fast_hwmod,
  1242. .clk = "sysclk4_ck",
  1243. .addr = dm81xx_tptc3_addr_space,
  1244. .user = OCP_USER_MPU,
  1245. };
  1246. /*
  1247. * REVISIT: Test and enable the following once clocks work:
  1248. * dm81xx_l4_ls__mailbox
  1249. *
  1250. * Also note that some devices share a single clkctrl_offs..
  1251. * For example, i2c1 and 3 share one, and i2c2 and 4 share one.
  1252. */
  1253. static struct omap_hwmod_ocp_if *dm814x_hwmod_ocp_ifs[] __initdata = {
  1254. &dm814x_mpu__alwon_l3_slow,
  1255. &dm814x_mpu__alwon_l3_med,
  1256. &dm81xx_alwon_l3_slow__l4_ls,
  1257. &dm81xx_alwon_l3_slow__l4_hs,
  1258. &dm81xx_l4_ls__uart1,
  1259. &dm81xx_l4_ls__uart2,
  1260. &dm81xx_l4_ls__uart3,
  1261. &dm81xx_l4_ls__wd_timer1,
  1262. &dm81xx_l4_ls__i2c1,
  1263. &dm81xx_l4_ls__i2c2,
  1264. &dm81xx_l4_ls__gpio1,
  1265. &dm81xx_l4_ls__gpio2,
  1266. &dm81xx_l4_ls__elm,
  1267. &dm81xx_l4_ls__mcspi1,
  1268. &dm814x_l4_ls__mmc1,
  1269. &dm814x_l4_ls__mmc2,
  1270. &ti81xx_l4_ls__rtc,
  1271. &dm81xx_alwon_l3_fast__tpcc,
  1272. &dm81xx_alwon_l3_fast__tptc0,
  1273. &dm81xx_alwon_l3_fast__tptc1,
  1274. &dm81xx_alwon_l3_fast__tptc2,
  1275. &dm81xx_alwon_l3_fast__tptc3,
  1276. &dm81xx_tptc0__alwon_l3_fast,
  1277. &dm81xx_tptc1__alwon_l3_fast,
  1278. &dm81xx_tptc2__alwon_l3_fast,
  1279. &dm81xx_tptc3__alwon_l3_fast,
  1280. &dm814x_l4_ls__timer1,
  1281. &dm814x_l4_ls__timer2,
  1282. &dm814x_l4_hs__cpgmac0,
  1283. &dm814x_cpgmac0__mdio,
  1284. &dm81xx_alwon_l3_slow__gpmc,
  1285. &dm814x_default_l3_slow__usbss,
  1286. &dm814x_alwon_l3_med__mmc3,
  1287. NULL,
  1288. };
  1289. int __init dm814x_hwmod_init(void)
  1290. {
  1291. omap_hwmod_init();
  1292. return omap_hwmod_register_links(dm814x_hwmod_ocp_ifs);
  1293. }
  1294. static struct omap_hwmod_ocp_if *dm816x_hwmod_ocp_ifs[] __initdata = {
  1295. &dm816x_mpu__alwon_l3_slow,
  1296. &dm816x_mpu__alwon_l3_med,
  1297. &dm81xx_alwon_l3_slow__l4_ls,
  1298. &dm81xx_alwon_l3_slow__l4_hs,
  1299. &dm81xx_l4_ls__uart1,
  1300. &dm81xx_l4_ls__uart2,
  1301. &dm81xx_l4_ls__uart3,
  1302. &dm81xx_l4_ls__wd_timer1,
  1303. &dm81xx_l4_ls__i2c1,
  1304. &dm81xx_l4_ls__i2c2,
  1305. &dm81xx_l4_ls__gpio1,
  1306. &dm81xx_l4_ls__gpio2,
  1307. &dm81xx_l4_ls__elm,
  1308. &ti81xx_l4_ls__rtc,
  1309. &dm816x_l4_ls__mmc1,
  1310. &dm816x_l4_ls__timer1,
  1311. &dm816x_l4_ls__timer2,
  1312. &dm816x_l4_ls__timer3,
  1313. &dm816x_l4_ls__timer4,
  1314. &dm816x_l4_ls__timer5,
  1315. &dm816x_l4_ls__timer6,
  1316. &dm816x_l4_ls__timer7,
  1317. &dm81xx_l4_ls__mcspi1,
  1318. &dm81xx_l4_ls__mailbox,
  1319. &dm81xx_l4_ls__spinbox,
  1320. &dm81xx_l4_hs__emac0,
  1321. &dm81xx_emac0__mdio,
  1322. &dm816x_l4_hs__emac1,
  1323. &dm81xx_alwon_l3_fast__tpcc,
  1324. &dm81xx_alwon_l3_fast__tptc0,
  1325. &dm81xx_alwon_l3_fast__tptc1,
  1326. &dm81xx_alwon_l3_fast__tptc2,
  1327. &dm81xx_alwon_l3_fast__tptc3,
  1328. &dm81xx_tptc0__alwon_l3_fast,
  1329. &dm81xx_tptc1__alwon_l3_fast,
  1330. &dm81xx_tptc2__alwon_l3_fast,
  1331. &dm81xx_tptc3__alwon_l3_fast,
  1332. &dm81xx_alwon_l3_slow__gpmc,
  1333. &dm816x_default_l3_slow__usbss,
  1334. NULL,
  1335. };
  1336. int __init dm816x_hwmod_init(void)
  1337. {
  1338. omap_hwmod_init();
  1339. return omap_hwmod_register_links(dm816x_hwmod_ocp_ifs);
  1340. }