aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
diff options
context:
space:
mode:
authorVignesh R <vigneshr@ti.com>2016-04-10 15:20:09 -0400
committerPaul Walmsley <paul@pwsan.com>2016-04-10 15:20:09 -0400
commitb05ff3c394bc5dbb1bc88073759f01c0ebdf5de1 (patch)
treea06545ba9c99eb64c6199002809ccee89e200399 /arch/arm/mach-omap2/omap_hwmod_7xx_data.c
parent9ad4d9a38a7f62a4891124501cdce4e768dbba16 (diff)
ARM: OMAP2+: DRA7: Add hwmod entries for PWMSS
Add hwmod entries for the PWMSS on DRA7. Set l4_root_clk_div as the main_clk of PWMSS. It is fixed-factored clock equal to L4PER2_L3_GICLK/2(l3_iclk_div/2). Signed-off-by: Vignesh R <vigneshr@ti.com> [fcooper@ti.com: Do not add eQEP, ePWM and eCAP hwmod entries] Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> [paul@pwsan.com: fixed sparse warnings; added missing comments] Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod_7xx_data.c')
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_7xx_data.c89
1 files changed, 89 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
index 7610f3ef28b7..2f15cf13e0d7 100644
--- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
@@ -383,6 +383,68 @@ static struct omap_hwmod dra7xx_dcan2_hwmod = {
383 }, 383 },
384}; 384};
385 385
386/* pwmss */
387static struct omap_hwmod_class_sysconfig dra7xx_epwmss_sysc = {
388 .rev_offs = 0x0,
389 .sysc_offs = 0x4,
390 .sysc_flags = SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET,
391 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
392 .sysc_fields = &omap_hwmod_sysc_type2,
393};
394
395/*
396 * epwmss class
397 */
398static struct omap_hwmod_class dra7xx_epwmss_hwmod_class = {
399 .name = "epwmss",
400 .sysc = &dra7xx_epwmss_sysc,
401};
402
403/* epwmss0 */
404static struct omap_hwmod dra7xx_epwmss0_hwmod = {
405 .name = "epwmss0",
406 .class = &dra7xx_epwmss_hwmod_class,
407 .clkdm_name = "l4per2_clkdm",
408 .main_clk = "l4_root_clk_div",
409 .prcm = {
410 .omap4 = {
411 .modulemode = MODULEMODE_SWCTRL,
412 .clkctrl_offs = DRA7XX_CM_L4PER2_PWMSS1_CLKCTRL_OFFSET,
413 .context_offs = DRA7XX_RM_L4PER2_PWMSS1_CONTEXT_OFFSET,
414 },
415 },
416};
417
418/* epwmss1 */
419static struct omap_hwmod dra7xx_epwmss1_hwmod = {
420 .name = "epwmss1",
421 .class = &dra7xx_epwmss_hwmod_class,
422 .clkdm_name = "l4per2_clkdm",
423 .main_clk = "l4_root_clk_div",
424 .prcm = {
425 .omap4 = {
426 .modulemode = MODULEMODE_SWCTRL,
427 .clkctrl_offs = DRA7XX_CM_L4PER2_PWMSS2_CLKCTRL_OFFSET,
428 .context_offs = DRA7XX_RM_L4PER2_PWMSS2_CONTEXT_OFFSET,
429 },
430 },
431};
432
433/* epwmss2 */
434static struct omap_hwmod dra7xx_epwmss2_hwmod = {
435 .name = "epwmss2",
436 .class = &dra7xx_epwmss_hwmod_class,
437 .clkdm_name = "l4per2_clkdm",
438 .main_clk = "l4_root_clk_div",
439 .prcm = {
440 .omap4 = {
441 .modulemode = MODULEMODE_SWCTRL,
442 .clkctrl_offs = DRA7XX_CM_L4PER2_PWMSS3_CLKCTRL_OFFSET,
443 .context_offs = DRA7XX_RM_L4PER2_PWMSS3_CONTEXT_OFFSET,
444 },
445 },
446};
447
386/* 448/*
387 * 'dma' class 449 * 'dma' class
388 * 450 *
@@ -3693,6 +3755,30 @@ static struct omap_hwmod_ocp_if dra7xx_l4_wkup__wd_timer2 = {
3693 .user = OCP_USER_MPU | OCP_USER_SDMA, 3755 .user = OCP_USER_MPU | OCP_USER_SDMA,
3694}; 3756};
3695 3757
3758/* l4_per2 -> epwmss0 */
3759static struct omap_hwmod_ocp_if dra7xx_l4_per2__epwmss0 = {
3760 .master = &dra7xx_l4_per2_hwmod,
3761 .slave = &dra7xx_epwmss0_hwmod,
3762 .clk = "l4_root_clk_div",
3763 .user = OCP_USER_MPU,
3764};
3765
3766/* l4_per2 -> epwmss1 */
3767static struct omap_hwmod_ocp_if dra7xx_l4_per2__epwmss1 = {
3768 .master = &dra7xx_l4_per2_hwmod,
3769 .slave = &dra7xx_epwmss1_hwmod,
3770 .clk = "l4_root_clk_div",
3771 .user = OCP_USER_MPU,
3772};
3773
3774/* l4_per2 -> epwmss2 */
3775static struct omap_hwmod_ocp_if dra7xx_l4_per2__epwmss2 = {
3776 .master = &dra7xx_l4_per2_hwmod,
3777 .slave = &dra7xx_epwmss2_hwmod,
3778 .clk = "l4_root_clk_div",
3779 .user = OCP_USER_MPU,
3780};
3781
3696static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = { 3782static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
3697 &dra7xx_l3_main_1__dmm, 3783 &dra7xx_l3_main_1__dmm,
3698 &dra7xx_l3_main_2__l3_instr, 3784 &dra7xx_l3_main_2__l3_instr,
@@ -3814,6 +3900,9 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
3814 &dra7xx_l3_main_1__vcp2, 3900 &dra7xx_l3_main_1__vcp2,
3815 &dra7xx_l4_per2__vcp2, 3901 &dra7xx_l4_per2__vcp2,
3816 &dra7xx_l4_wkup__wd_timer2, 3902 &dra7xx_l4_wkup__wd_timer2,
3903 &dra7xx_l4_per2__epwmss0,
3904 &dra7xx_l4_per2__epwmss1,
3905 &dra7xx_l4_per2__epwmss2,
3817 NULL, 3906 NULL,
3818}; 3907};
3819 3908