aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2015-03-27 13:42:16 -0400
committerTony Lindgren <tony@atomide.com>2015-03-27 13:42:16 -0400
commita6b188e50a6ad6fa4d2da163a44f21280cea01c2 (patch)
treee2ad87718dd1e04b39d8eb385abe30d399286016 /arch/arm/mach-omap2
parent6248015d6867449b0a850dfe0810e9c5a8bffe41 (diff)
parentedec17863362e0106b9e6b2f83237c7bd535e346 (diff)
Merge tag 'for-v4.1/omap-hwmod-a' of git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending into omap-for-v4.1/soc
OMAP hwmod data changes for AM43xx and DRA7xx for v4.1 Add support for the AM43xx HDQ/1-wire driver and fix the GPTIMER data for DRA7xx. Note that I do not have AM43xx nor DRA7xx boards, and cannot test these patches on those platforms. Basic build, boot, and PM test logs are available at: http://www.pwsan.com/omap/testlogs/omap-hwmod-a-for-v4.1/20150324185246/
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_43xx_data.c36
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_7xx_data.c113
-rw-r--r--arch/arm/mach-omap2/prcm43xx.h1
3 files changed, 134 insertions, 16 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c
index 8eb85925e444..e2223148ba4d 100644
--- a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c
@@ -20,6 +20,7 @@
20#include "omap_hwmod_33xx_43xx_common_data.h" 20#include "omap_hwmod_33xx_43xx_common_data.h"
21#include "prcm43xx.h" 21#include "prcm43xx.h"
22#include "omap_hwmod_common_data.h" 22#include "omap_hwmod_common_data.h"
23#include "hdq1w.h"
23 24
24 25
25/* IP blocks */ 26/* IP blocks */
@@ -516,6 +517,33 @@ static struct omap_hwmod am43xx_dss_rfbi_hwmod = {
516 .parent_hwmod = &am43xx_dss_core_hwmod, 517 .parent_hwmod = &am43xx_dss_core_hwmod,
517}; 518};
518 519
520/* HDQ1W */
521static 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
529static struct omap_hwmod_class am43xx_hdq1w_hwmod_class = {
530 .name = "hdq1w",
531 .sysc = &am43xx_hdq1w_sysc,
532 .reset = &omap_hdq1w_reset,
533};
534
535static 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
519/* Interfaces */ 547/* Interfaces */
520static struct omap_hwmod_ocp_if am43xx_l3_main__l4_hs = { 548static struct omap_hwmod_ocp_if am43xx_l3_main__l4_hs = {
521 .master = &am33xx_l3_main_hwmod, 549 .master = &am33xx_l3_main_hwmod,
@@ -790,6 +818,13 @@ static struct omap_hwmod_ocp_if am43xx_l4_ls__dss_rfbi = {
790 .user = OCP_USER_MPU | OCP_USER_SDMA, 818 .user = OCP_USER_MPU | OCP_USER_SDMA,
791}; 819};
792 820
821static 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
793static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = { 828static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = {
794 &am33xx_l4_wkup__synctimer, 829 &am33xx_l4_wkup__synctimer,
795 &am43xx_l4_ls__timer8, 830 &am43xx_l4_ls__timer8,
@@ -889,6 +924,7 @@ static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = {
889 &am43xx_l4_ls__dss, 924 &am43xx_l4_ls__dss,
890 &am43xx_l4_ls__dss_dispc, 925 &am43xx_l4_ls__dss_dispc,
891 &am43xx_l4_ls__dss_rfbi, 926 &am43xx_l4_ls__dss_rfbi,
927 &am43xx_l4_ls__hdq1w,
892 NULL, 928 NULL,
893}; 929};
894 930
diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
index e8692e7675b8..701234d8db1b 100644
--- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c
@@ -1763,21 +1763,6 @@ static struct omap_hwmod_class dra7xx_timer_1ms_hwmod_class = {
1763 .sysc = &dra7xx_timer_1ms_sysc, 1763 .sysc = &dra7xx_timer_1ms_sysc,
1764}; 1764};
1765 1765
1766static struct omap_hwmod_class_sysconfig dra7xx_timer_secure_sysc = {
1767 .rev_offs = 0x0000,
1768 .sysc_offs = 0x0010,
1769 .sysc_flags = (SYSC_HAS_EMUFREE | SYSC_HAS_RESET_STATUS |
1770 SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
1771 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
1772 SIDLE_SMART_WKUP),
1773 .sysc_fields = &omap_hwmod_sysc_type2,
1774};
1775
1776static struct omap_hwmod_class dra7xx_timer_secure_hwmod_class = {
1777 .name = "timer",
1778 .sysc = &dra7xx_timer_secure_sysc,
1779};
1780
1781static struct omap_hwmod_class_sysconfig dra7xx_timer_sysc = { 1766static struct omap_hwmod_class_sysconfig dra7xx_timer_sysc = {
1782 .rev_offs = 0x0000, 1767 .rev_offs = 0x0000,
1783 .sysc_offs = 0x0010, 1768 .sysc_offs = 0x0010,
@@ -1841,7 +1826,7 @@ static struct omap_hwmod dra7xx_timer3_hwmod = {
1841/* timer4 */ 1826/* timer4 */
1842static struct omap_hwmod dra7xx_timer4_hwmod = { 1827static struct omap_hwmod dra7xx_timer4_hwmod = {
1843 .name = "timer4", 1828 .name = "timer4",
1844 .class = &dra7xx_timer_secure_hwmod_class, 1829 .class = &dra7xx_timer_hwmod_class,
1845 .clkdm_name = "l4per_clkdm", 1830 .clkdm_name = "l4per_clkdm",
1846 .main_clk = "timer4_gfclk_mux", 1831 .main_clk = "timer4_gfclk_mux",
1847 .prcm = { 1832 .prcm = {
@@ -1958,6 +1943,66 @@ static struct omap_hwmod dra7xx_timer11_hwmod = {
1958 }, 1943 },
1959}; 1944};
1960 1945
1946/* timer13 */
1947static struct omap_hwmod dra7xx_timer13_hwmod = {
1948 .name = "timer13",
1949 .class = &dra7xx_timer_hwmod_class,
1950 .clkdm_name = "l4per3_clkdm",
1951 .main_clk = "timer13_gfclk_mux",
1952 .prcm = {
1953 .omap4 = {
1954 .clkctrl_offs = DRA7XX_CM_L4PER3_TIMER13_CLKCTRL_OFFSET,
1955 .context_offs = DRA7XX_RM_L4PER3_TIMER13_CONTEXT_OFFSET,
1956 .modulemode = MODULEMODE_SWCTRL,
1957 },
1958 },
1959};
1960
1961/* timer14 */
1962static struct omap_hwmod dra7xx_timer14_hwmod = {
1963 .name = "timer14",
1964 .class = &dra7xx_timer_hwmod_class,
1965 .clkdm_name = "l4per3_clkdm",
1966 .main_clk = "timer14_gfclk_mux",
1967 .prcm = {
1968 .omap4 = {
1969 .clkctrl_offs = DRA7XX_CM_L4PER3_TIMER14_CLKCTRL_OFFSET,
1970 .context_offs = DRA7XX_RM_L4PER3_TIMER14_CONTEXT_OFFSET,
1971 .modulemode = MODULEMODE_SWCTRL,
1972 },
1973 },
1974};
1975
1976/* timer15 */
1977static struct omap_hwmod dra7xx_timer15_hwmod = {
1978 .name = "timer15",
1979 .class = &dra7xx_timer_hwmod_class,
1980 .clkdm_name = "l4per3_clkdm",
1981 .main_clk = "timer15_gfclk_mux",
1982 .prcm = {
1983 .omap4 = {
1984 .clkctrl_offs = DRA7XX_CM_L4PER3_TIMER15_CLKCTRL_OFFSET,
1985 .context_offs = DRA7XX_RM_L4PER3_TIMER15_CONTEXT_OFFSET,
1986 .modulemode = MODULEMODE_SWCTRL,
1987 },
1988 },
1989};
1990
1991/* timer16 */
1992static struct omap_hwmod dra7xx_timer16_hwmod = {
1993 .name = "timer16",
1994 .class = &dra7xx_timer_hwmod_class,
1995 .clkdm_name = "l4per3_clkdm",
1996 .main_clk = "timer16_gfclk_mux",
1997 .prcm = {
1998 .omap4 = {
1999 .clkctrl_offs = DRA7XX_CM_L4PER3_TIMER16_CLKCTRL_OFFSET,
2000 .context_offs = DRA7XX_RM_L4PER3_TIMER16_CONTEXT_OFFSET,
2001 .modulemode = MODULEMODE_SWCTRL,
2002 },
2003 },
2004};
2005
1961/* 2006/*
1962 * 'uart' class 2007 * 'uart' class
1963 * 2008 *
@@ -3112,6 +3157,38 @@ static struct omap_hwmod_ocp_if dra7xx_l4_per1__timer11 = {
3112 .user = OCP_USER_MPU | OCP_USER_SDMA, 3157 .user = OCP_USER_MPU | OCP_USER_SDMA,
3113}; 3158};
3114 3159
3160/* l4_per3 -> timer13 */
3161static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer13 = {
3162 .master = &dra7xx_l4_per3_hwmod,
3163 .slave = &dra7xx_timer13_hwmod,
3164 .clk = "l3_iclk_div",
3165 .user = OCP_USER_MPU | OCP_USER_SDMA,
3166};
3167
3168/* l4_per3 -> timer14 */
3169static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer14 = {
3170 .master = &dra7xx_l4_per3_hwmod,
3171 .slave = &dra7xx_timer14_hwmod,
3172 .clk = "l3_iclk_div",
3173 .user = OCP_USER_MPU | OCP_USER_SDMA,
3174};
3175
3176/* l4_per3 -> timer15 */
3177static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer15 = {
3178 .master = &dra7xx_l4_per3_hwmod,
3179 .slave = &dra7xx_timer15_hwmod,
3180 .clk = "l3_iclk_div",
3181 .user = OCP_USER_MPU | OCP_USER_SDMA,
3182};
3183
3184/* l4_per3 -> timer16 */
3185static struct omap_hwmod_ocp_if dra7xx_l4_per3__timer16 = {
3186 .master = &dra7xx_l4_per3_hwmod,
3187 .slave = &dra7xx_timer16_hwmod,
3188 .clk = "l3_iclk_div",
3189 .user = OCP_USER_MPU | OCP_USER_SDMA,
3190};
3191
3115/* l4_per1 -> uart1 */ 3192/* l4_per1 -> uart1 */
3116static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart1 = { 3193static struct omap_hwmod_ocp_if dra7xx_l4_per1__uart1 = {
3117 .master = &dra7xx_l4_per1_hwmod, 3194 .master = &dra7xx_l4_per1_hwmod,
@@ -3350,6 +3427,10 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = {
3350 &dra7xx_l4_per1__timer9, 3427 &dra7xx_l4_per1__timer9,
3351 &dra7xx_l4_per1__timer10, 3428 &dra7xx_l4_per1__timer10,
3352 &dra7xx_l4_per1__timer11, 3429 &dra7xx_l4_per1__timer11,
3430 &dra7xx_l4_per3__timer13,
3431 &dra7xx_l4_per3__timer14,
3432 &dra7xx_l4_per3__timer15,
3433 &dra7xx_l4_per3__timer16,
3353 &dra7xx_l4_per1__uart1, 3434 &dra7xx_l4_per1__uart1,
3354 &dra7xx_l4_per1__uart2, 3435 &dra7xx_l4_per1__uart2,
3355 &dra7xx_l4_per1__uart3, 3436 &dra7xx_l4_per1__uart3,
diff --git a/arch/arm/mach-omap2/prcm43xx.h b/arch/arm/mach-omap2/prcm43xx.h
index ad7b3e9977f8..48df3b55057e 100644
--- a/arch/arm/mach-omap2/prcm43xx.h
+++ b/arch/arm/mach-omap2/prcm43xx.h
@@ -143,5 +143,6 @@
143#define AM43XX_CM_PER_USB_OTG_SS1_CLKCTRL_OFFSET 0x0268 143#define AM43XX_CM_PER_USB_OTG_SS1_CLKCTRL_OFFSET 0x0268
144#define AM43XX_CM_PER_USBPHYOCP2SCP1_CLKCTRL_OFFSET 0x05C0 144#define AM43XX_CM_PER_USBPHYOCP2SCP1_CLKCTRL_OFFSET 0x05C0
145#define AM43XX_CM_PER_DSS_CLKCTRL_OFFSET 0x0a20 145#define AM43XX_CM_PER_DSS_CLKCTRL_OFFSET 0x0a20
146#define AM43XX_CM_PER_HDQ1W_CLKCTRL_OFFSET 0x04a0
146 147
147#endif 148#endif