aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2012-05-08 13:34:28 -0400
committerPaul Walmsley <paul@pwsan.com>2012-05-08 19:25:36 -0400
commit45a4bb067c25355b5d362eb09fa97e51a2a519c8 (patch)
treeba8ee2a3e0026cef43eb87508300c9608f95b2fd
parent03d830e8dcbe4e8168a85252fcb639b48342ed3c (diff)
ARM: OMAP3: hwmod data: add HDQ/1-wire hwmod
Add the HDQ1W hwmod for OMAP34xx, OMAP36xx, and AM3505/3517 devices. According to the respective TRMs, it doesn't appear to be available for the 816x/814x or the AM335x. The OCPIF_SWSUP_IDLE flag is added to work around an apparent hardware bug: the hardware is not taking the CM_FCLKEN*_CORE.EN_HDQ bit into account when considering whether to go idle: http://www.spinics.net/lists/linux-omap/msg63576.html This causes HDQ transfers to fail or become corrupt. Thanks to NeilBrown for his help diagnosing and testing fixes for this problem. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: NeilBrown <neilb@suse.de> Tested-by: NeilBrown <neilb@suse.de>
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_3xxx_data.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index 0c65079c2b69..97c65973ae7f 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -1980,6 +1980,22 @@ static struct omap_hwmod omap3xxx_usb_tll_hs_hwmod = {
1980 }, 1980 },
1981}; 1981};
1982 1982
1983static struct omap_hwmod omap3xxx_hdq1w_hwmod = {
1984 .name = "hdq1w",
1985 .mpu_irqs = omap2_hdq1w_mpu_irqs,
1986 .main_clk = "hdq_fck",
1987 .prcm = {
1988 .omap2 = {
1989 .module_offs = CORE_MOD,
1990 .prcm_reg_id = 1,
1991 .module_bit = OMAP3430_EN_HDQ_SHIFT,
1992 .idlest_reg_id = 1,
1993 .idlest_idle_bit = OMAP3430_ST_HDQ_SHIFT,
1994 },
1995 },
1996 .class = &omap2_hdq1w_class,
1997};
1998
1983/* 1999/*
1984 * interfaces 2000 * interfaces
1985 */ 2001 */
@@ -3059,6 +3075,16 @@ static struct omap_hwmod_ocp_if omap3xxx_l4_core__usb_tll_hs = {
3059 .user = OCP_USER_MPU | OCP_USER_SDMA, 3075 .user = OCP_USER_MPU | OCP_USER_SDMA,
3060}; 3076};
3061 3077
3078/* l4_core -> hdq1w interface */
3079static struct omap_hwmod_ocp_if omap3xxx_l4_core__hdq1w = {
3080 .master = &omap3xxx_l4_core_hwmod,
3081 .slave = &omap3xxx_hdq1w_hwmod,
3082 .clk = "hdq_ick",
3083 .addr = omap2_hdq1w_addr_space,
3084 .user = OCP_USER_MPU | OCP_USER_SDMA,
3085 .flags = OMAP_FIREWALL_L4 | OCPIF_SWSUP_IDLE,
3086};
3087
3062static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = { 3088static struct omap_hwmod_ocp_if *omap3xxx_hwmod_ocp_ifs[] __initdata = {
3063 &omap3xxx_l3_main__l4_core, 3089 &omap3xxx_l3_main__l4_core,
3064 &omap3xxx_l3_main__l4_per, 3090 &omap3xxx_l3_main__l4_per,
@@ -3151,6 +3177,7 @@ static struct omap_hwmod_ocp_if *omap34xx_hwmod_ocp_ifs[] __initdata = {
3151 &omap34xx_l4_core__sr1, 3177 &omap34xx_l4_core__sr1,
3152 &omap34xx_l4_core__sr2, 3178 &omap34xx_l4_core__sr2,
3153 &omap3xxx_l4_core__mailbox, 3179 &omap3xxx_l4_core__mailbox,
3180 &omap3xxx_l4_core__hdq1w,
3154 NULL 3181 NULL
3155}; 3182};
3156 3183
@@ -3170,6 +3197,7 @@ static struct omap_hwmod_ocp_if *omap36xx_hwmod_ocp_ifs[] __initdata = {
3170 &omap3xxx_l4_core__usb_tll_hs, 3197 &omap3xxx_l4_core__usb_tll_hs,
3171 &omap3xxx_l4_core__es3plus_mmc1, 3198 &omap3xxx_l4_core__es3plus_mmc1,
3172 &omap3xxx_l4_core__es3plus_mmc2, 3199 &omap3xxx_l4_core__es3plus_mmc2,
3200 &omap3xxx_l4_core__hdq1w,
3173 NULL 3201 NULL
3174}; 3202};
3175 3203