aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorSathya Prakash M R <sathyap@ti.com>2014-07-05 19:44:57 -0400
committerPaul Walmsley <paul@pwsan.com>2014-07-05 19:44:57 -0400
commit509efaf3d1819cf2bed1be1396aa24e56c9db303 (patch)
tree4e4368e68d2454b9c5147503a48df9e5a4a83eed /arch/arm
parenta497c3ba1d97fc69c1e78e7b96435ba8c2cb42ee (diff)
ARM: AM43xx: hwmod: add DSS hwmod data
Add DSS hwmod data for AM43xx. Signed-off-by: Sathya Prakash M R <sathyap@ti.com> [tomi.valkeinen@ti.com: added missing dispc flags] Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Rajendra Nayak <rnayak@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Tested-by: Felipe Balbi <balbi@ti.com> # on linux-next 5f295cdf5c5d [paul@pwsan.com: fixed build break on AM43xx-only config] Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-omap2/Makefile1
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c40
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_43xx_data.c100
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_common_ipblock_data.c55
-rw-r--r--arch/arm/mach-omap2/prcm43xx.h1
5 files changed, 157 insertions, 40 deletions
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 8421f38cf445..75c73f253604 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -200,6 +200,7 @@ obj-$(CONFIG_SOC_OMAP2420) += opp2420_data.o
200obj-$(CONFIG_SOC_OMAP2430) += opp2430_data.o 200obj-$(CONFIG_SOC_OMAP2430) += opp2430_data.o
201 201
202# hwmod data 202# hwmod data
203obj-y += omap_hwmod_common_ipblock_data.o
203obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2xxx_ipblock_data.o 204obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2xxx_ipblock_data.o
204obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2xxx_3xxx_ipblock_data.o 205obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2xxx_3xxx_ipblock_data.o
205obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2xxx_interconnect_data.o 206obj-$(CONFIG_SOC_OMAP2420) += omap_hwmod_2xxx_interconnect_data.o
diff --git a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
index 5da7a42a6d90..c6c6384de867 100644
--- a/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
@@ -37,46 +37,6 @@ struct omap_hwmod_class omap2_uart_class = {
37}; 37};
38 38
39/* 39/*
40 * 'dss' class
41 * display sub-system
42 */
43
44static struct omap_hwmod_class_sysconfig omap2_dss_sysc = {
45 .rev_offs = 0x0000,
46 .sysc_offs = 0x0010,
47 .syss_offs = 0x0014,
48 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
49 SYSS_HAS_RESET_STATUS),
50 .sysc_fields = &omap_hwmod_sysc_type1,
51};
52
53struct omap_hwmod_class omap2_dss_hwmod_class = {
54 .name = "dss",
55 .sysc = &omap2_dss_sysc,
56 .reset = omap_dss_reset,
57};
58
59/*
60 * 'rfbi' class
61 * remote frame buffer interface
62 */
63
64static struct omap_hwmod_class_sysconfig omap2_rfbi_sysc = {
65 .rev_offs = 0x0000,
66 .sysc_offs = 0x0010,
67 .syss_offs = 0x0014,
68 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
69 SYSC_HAS_AUTOIDLE),
70 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
71 .sysc_fields = &omap_hwmod_sysc_type1,
72};
73
74struct omap_hwmod_class omap2_rfbi_hwmod_class = {
75 .name = "rfbi",
76 .sysc = &omap2_rfbi_sysc,
77};
78
79/*
80 * 'venc' class 40 * 'venc' class
81 * video encoder 41 * video encoder
82 */ 42 */
diff --git a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c
index 5c2cc8083fdd..fea01aa3ef42 100644
--- a/arch/arm/mach-omap2/omap_hwmod_43xx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_43xx_data.c
@@ -19,6 +19,8 @@
19#include "omap_hwmod.h" 19#include "omap_hwmod.h"
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"
23
22 24
23/* IP blocks */ 25/* IP blocks */
24static struct omap_hwmod am43xx_l4_hs_hwmod = { 26static struct omap_hwmod am43xx_l4_hs_hwmod = {
@@ -415,6 +417,72 @@ static struct omap_hwmod am43xx_qspi_hwmod = {
415 }, 417 },
416}; 418};
417 419
420/* dss */
421
422static struct omap_hwmod am43xx_dss_core_hwmod = {
423 .name = "dss_core",
424 .class = &omap2_dss_hwmod_class,
425 .clkdm_name = "dss_clkdm",
426 .main_clk = "disp_clk",
427 .prcm = {
428 .omap4 = {
429 .clkctrl_offs = AM43XX_CM_PER_DSS_CLKCTRL_OFFSET,
430 .modulemode = MODULEMODE_SWCTRL,
431 },
432 },
433};
434
435/* dispc */
436
437struct omap_dss_dispc_dev_attr am43xx_dss_dispc_dev_attr = {
438 .manager_count = 1,
439 .has_framedonetv_irq = 0
440};
441
442static struct omap_hwmod_class_sysconfig am43xx_dispc_sysc = {
443 .rev_offs = 0x0000,
444 .sysc_offs = 0x0010,
445 .syss_offs = 0x0014,
446 .sysc_flags = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SOFTRESET |
447 SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
448 SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_MIDLEMODE),
449 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
450 MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
451 .sysc_fields = &omap_hwmod_sysc_type1,
452};
453
454static struct omap_hwmod_class am43xx_dispc_hwmod_class = {
455 .name = "dispc",
456 .sysc = &am43xx_dispc_sysc,
457};
458
459static struct omap_hwmod am43xx_dss_dispc_hwmod = {
460 .name = "dss_dispc",
461 .class = &am43xx_dispc_hwmod_class,
462 .clkdm_name = "dss_clkdm",
463 .main_clk = "disp_clk",
464 .prcm = {
465 .omap4 = {
466 .clkctrl_offs = AM43XX_CM_PER_DSS_CLKCTRL_OFFSET,
467 },
468 },
469 .dev_attr = &am43xx_dss_dispc_dev_attr,
470};
471
472/* rfbi */
473
474static struct omap_hwmod am43xx_dss_rfbi_hwmod = {
475 .name = "dss_rfbi",
476 .class = &omap2_rfbi_hwmod_class,
477 .clkdm_name = "dss_clkdm",
478 .main_clk = "disp_clk",
479 .prcm = {
480 .omap4 = {
481 .clkctrl_offs = AM43XX_CM_PER_DSS_CLKCTRL_OFFSET,
482 },
483 },
484};
485
418/* Interfaces */ 486/* Interfaces */
419static struct omap_hwmod_ocp_if am43xx_l3_main__l4_hs = { 487static struct omap_hwmod_ocp_if am43xx_l3_main__l4_hs = {
420 .master = &am33xx_l3_main_hwmod, 488 .master = &am33xx_l3_main_hwmod,
@@ -654,6 +722,34 @@ static struct omap_hwmod_ocp_if am43xx_l3_s__qspi = {
654 .user = OCP_USER_MPU | OCP_USER_SDMA, 722 .user = OCP_USER_MPU | OCP_USER_SDMA,
655}; 723};
656 724
725static struct omap_hwmod_ocp_if am43xx_dss__l3_main = {
726 .master = &am43xx_dss_core_hwmod,
727 .slave = &am33xx_l3_main_hwmod,
728 .clk = "l3_gclk",
729 .user = OCP_USER_MPU | OCP_USER_SDMA,
730};
731
732static struct omap_hwmod_ocp_if am43xx_l4_ls__dss = {
733 .master = &am33xx_l4_ls_hwmod,
734 .slave = &am43xx_dss_core_hwmod,
735 .clk = "l4ls_gclk",
736 .user = OCP_USER_MPU | OCP_USER_SDMA,
737};
738
739static struct omap_hwmod_ocp_if am43xx_l4_ls__dss_dispc = {
740 .master = &am33xx_l4_ls_hwmod,
741 .slave = &am43xx_dss_dispc_hwmod,
742 .clk = "l4ls_gclk",
743 .user = OCP_USER_MPU | OCP_USER_SDMA,
744};
745
746static struct omap_hwmod_ocp_if am43xx_l4_ls__dss_rfbi = {
747 .master = &am33xx_l4_ls_hwmod,
748 .slave = &am43xx_dss_rfbi_hwmod,
749 .clk = "l4ls_gclk",
750 .user = OCP_USER_MPU | OCP_USER_SDMA,
751};
752
657static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = { 753static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = {
658 &am33xx_l4_wkup__synctimer, 754 &am33xx_l4_wkup__synctimer,
659 &am43xx_l4_ls__timer8, 755 &am43xx_l4_ls__timer8,
@@ -748,6 +844,10 @@ static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = {
748 &am43xx_l4_ls__ocp2scp1, 844 &am43xx_l4_ls__ocp2scp1,
749 &am43xx_l3_s__usbotgss0, 845 &am43xx_l3_s__usbotgss0,
750 &am43xx_l3_s__usbotgss1, 846 &am43xx_l3_s__usbotgss1,
847 &am43xx_dss__l3_main,
848 &am43xx_l4_ls__dss,
849 &am43xx_l4_ls__dss_dispc,
850 &am43xx_l4_ls__dss_rfbi,
751 NULL, 851 NULL,
752}; 852};
753 853
diff --git a/arch/arm/mach-omap2/omap_hwmod_common_ipblock_data.c b/arch/arm/mach-omap2/omap_hwmod_common_ipblock_data.c
new file mode 100644
index 000000000000..f21664da25a2
--- /dev/null
+++ b/arch/arm/mach-omap2/omap_hwmod_common_ipblock_data.c
@@ -0,0 +1,55 @@
1/*
2 * omap_hwmod_common_ipblock_data.c - common IP block data for OMAP2+
3 *
4 * Copyright (C) 2011 Nokia Corporation
5 * Copyright (C) 2012 Texas Instruments, Inc.
6 * Paul Walmsley
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#include "omap_hwmod.h"
14#include "omap_hwmod_common_data.h"
15
16/*
17 * 'dss' class
18 * display sub-system
19 */
20
21static struct omap_hwmod_class_sysconfig omap2_dss_sysc = {
22 .rev_offs = 0x0000,
23 .sysc_offs = 0x0010,
24 .syss_offs = 0x0014,
25 .sysc_flags = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
26 SYSS_HAS_RESET_STATUS),
27 .sysc_fields = &omap_hwmod_sysc_type1,
28};
29
30struct omap_hwmod_class omap2_dss_hwmod_class = {
31 .name = "dss",
32 .sysc = &omap2_dss_sysc,
33 .reset = omap_dss_reset,
34};
35
36/*
37 * 'rfbi' class
38 * remote frame buffer interface
39 */
40
41static struct omap_hwmod_class_sysconfig omap2_rfbi_sysc = {
42 .rev_offs = 0x0000,
43 .sysc_offs = 0x0010,
44 .syss_offs = 0x0014,
45 .sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
46 SYSC_HAS_AUTOIDLE),
47 .idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
48 .sysc_fields = &omap_hwmod_sysc_type1,
49};
50
51struct omap_hwmod_class omap2_rfbi_hwmod_class = {
52 .name = "rfbi",
53 .sysc = &omap2_rfbi_sysc,
54};
55
diff --git a/arch/arm/mach-omap2/prcm43xx.h b/arch/arm/mach-omap2/prcm43xx.h
index 7785be984edd..ad7b3e9977f8 100644
--- a/arch/arm/mach-omap2/prcm43xx.h
+++ b/arch/arm/mach-omap2/prcm43xx.h
@@ -142,5 +142,6 @@
142#define AM43XX_CM_PER_USBPHYOCP2SCP0_CLKCTRL_OFFSET 0x05B8 142#define AM43XX_CM_PER_USBPHYOCP2SCP0_CLKCTRL_OFFSET 0x05B8
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 146
146#endif 147#endif