Skip to content

Commit 89122aa

Browse files
Sourav PoddarPaul Walmsley
authored andcommitted
ARM: OMAP2: hwmod: AM43XX: Add hwmod support for HDQ-1W
These adds hwmod data for hdq/1w driver on AM43xx. Signed-off-by: Vignesh R <[email protected]> Signed-off-by: Paul Walmsley <[email protected]>
1 parent c517d83 commit 89122aa

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

arch/arm/mach-omap2/omap_hwmod_43xx_data.c

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "omap_hwmod_33xx_43xx_common_data.h"
2121
#include "prcm43xx.h"
2222
#include "omap_hwmod_common_data.h"
23+
#include "hdq1w.h"
2324

2425

2526
/* IP blocks */
@@ -516,6 +517,33 @@ static struct omap_hwmod am43xx_dss_rfbi_hwmod = {
516517
.parent_hwmod = &am43xx_dss_core_hwmod,
517518
};
518519

520+
/* HDQ1W */
521+
static struct omap_hwmod_class_sysconfig am43xx_hdq1w_sysc = {
522+
.rev_offs = 0x0000,
523+
.sysc_offs = 0x0014,
524+
.syss_offs = 0x0018,
525+
.sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE),
526+
.sysc_fields = &omap_hwmod_sysc_type1,
527+
};
528+
529+
static struct omap_hwmod_class am43xx_hdq1w_hwmod_class = {
530+
.name = "hdq1w",
531+
.sysc = &am43xx_hdq1w_sysc,
532+
.reset = &omap_hdq1w_reset,
533+
};
534+
535+
static struct omap_hwmod am43xx_hdq1w_hwmod = {
536+
.name = "hdq1w",
537+
.class = &am43xx_hdq1w_hwmod_class,
538+
.clkdm_name = "l4ls_clkdm",
539+
.prcm = {
540+
.omap4 = {
541+
.clkctrl_offs = AM43XX_CM_PER_HDQ1W_CLKCTRL_OFFSET,
542+
.modulemode = MODULEMODE_SWCTRL,
543+
},
544+
},
545+
};
546+
519547
/* Interfaces */
520548
static struct omap_hwmod_ocp_if am43xx_l3_main__l4_hs = {
521549
.master = &am33xx_l3_main_hwmod,
@@ -790,6 +818,13 @@ static struct omap_hwmod_ocp_if am43xx_l4_ls__dss_rfbi = {
790818
.user = OCP_USER_MPU | OCP_USER_SDMA,
791819
};
792820

821+
static struct omap_hwmod_ocp_if am43xx_l4_ls__hdq1w = {
822+
.master = &am33xx_l4_ls_hwmod,
823+
.slave = &am43xx_hdq1w_hwmod,
824+
.clk = "l4ls_gclk",
825+
.user = OCP_USER_MPU | OCP_USER_SDMA,
826+
};
827+
793828
static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = {
794829
&am33xx_l4_wkup__synctimer,
795830
&am43xx_l4_ls__timer8,
@@ -889,6 +924,7 @@ static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = {
889924
&am43xx_l4_ls__dss,
890925
&am43xx_l4_ls__dss_dispc,
891926
&am43xx_l4_ls__dss_rfbi,
927+
&am43xx_l4_ls__hdq1w,
892928
NULL,
893929
};
894930

arch/arm/mach-omap2/prcm43xx.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,5 +143,6 @@
143143
#define AM43XX_CM_PER_USB_OTG_SS1_CLKCTRL_OFFSET 0x0268
144144
#define AM43XX_CM_PER_USBPHYOCP2SCP1_CLKCTRL_OFFSET 0x05C0
145145
#define AM43XX_CM_PER_DSS_CLKCTRL_OFFSET 0x0a20
146+
#define AM43XX_CM_PER_HDQ1W_CLKCTRL_OFFSET 0x04a0
146147

147148
#endif

0 commit comments

Comments
 (0)