]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM: AM43xx: hwmod: add DSS hwmod data
authorSathya Prakash M R <sathyap@ti.com>
Sat, 5 Jul 2014 23:44:57 +0000 (17:44 -0600)
committerPaul Walmsley <paul@pwsan.com>
Sat, 5 Jul 2014 23:44:57 +0000 (17:44 -0600)
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>
arch/arm/mach-omap2/Makefile
arch/arm/mach-omap2/omap_hwmod_2xxx_3xxx_ipblock_data.c
arch/arm/mach-omap2/omap_hwmod_43xx_data.c
arch/arm/mach-omap2/omap_hwmod_common_ipblock_data.c [new file with mode: 0644]
arch/arm/mach-omap2/prcm43xx.h

index 8421f38cf445355f2ad84ef5077f4b89523b21fb..75c73f253604a599029dbb234c10735d28aa9d14 100644 (file)
@@ -200,6 +200,7 @@ obj-$(CONFIG_SOC_OMAP2420)          += opp2420_data.o
 obj-$(CONFIG_SOC_OMAP2430)             += opp2430_data.o
 
 # hwmod data
+obj-y                                  += omap_hwmod_common_ipblock_data.o
 obj-$(CONFIG_SOC_OMAP2420)             += omap_hwmod_2xxx_ipblock_data.o
 obj-$(CONFIG_SOC_OMAP2420)             += omap_hwmod_2xxx_3xxx_ipblock_data.o
 obj-$(CONFIG_SOC_OMAP2420)             += omap_hwmod_2xxx_interconnect_data.o
index 5da7a42a6d9085984b79e10c0e46423432f7b0f0..c6c6384de8678f2fb8dd58a996499afdc47fa709 100644 (file)
@@ -36,46 +36,6 @@ struct omap_hwmod_class omap2_uart_class = {
        .sysc   = &omap2_uart_sysc,
 };
 
-/*
- * 'dss' class
- * display sub-system
- */
-
-static struct omap_hwmod_class_sysconfig omap2_dss_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .syss_offs      = 0x0014,
-       .sysc_flags     = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
-                          SYSS_HAS_RESET_STATUS),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-struct omap_hwmod_class omap2_dss_hwmod_class = {
-       .name   = "dss",
-       .sysc   = &omap2_dss_sysc,
-       .reset  = omap_dss_reset,
-};
-
-/*
- * 'rfbi' class
- * remote frame buffer interface
- */
-
-static struct omap_hwmod_class_sysconfig omap2_rfbi_sysc = {
-       .rev_offs       = 0x0000,
-       .sysc_offs      = 0x0010,
-       .syss_offs      = 0x0014,
-       .sysc_flags     = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
-                          SYSC_HAS_AUTOIDLE),
-       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
-       .sysc_fields    = &omap_hwmod_sysc_type1,
-};
-
-struct omap_hwmod_class omap2_rfbi_hwmod_class = {
-       .name   = "rfbi",
-       .sysc   = &omap2_rfbi_sysc,
-};
-
 /*
  * 'venc' class
  * video encoder
index 5c2cc8083fdd9ba22087f1add79f061a4d5d28b2..fea01aa3ef425846a0ae42f6eff5f706ae43a260 100644 (file)
@@ -19,6 +19,8 @@
 #include "omap_hwmod.h"
 #include "omap_hwmod_33xx_43xx_common_data.h"
 #include "prcm43xx.h"
+#include "omap_hwmod_common_data.h"
+
 
 /* IP blocks */
 static struct omap_hwmod am43xx_l4_hs_hwmod = {
@@ -415,6 +417,72 @@ static struct omap_hwmod am43xx_qspi_hwmod = {
        },
 };
 
+/* dss */
+
+static struct omap_hwmod am43xx_dss_core_hwmod = {
+       .name           = "dss_core",
+       .class          = &omap2_dss_hwmod_class,
+       .clkdm_name     = "dss_clkdm",
+       .main_clk       = "disp_clk",
+       .prcm = {
+               .omap4 = {
+                       .clkctrl_offs = AM43XX_CM_PER_DSS_CLKCTRL_OFFSET,
+                       .modulemode   = MODULEMODE_SWCTRL,
+               },
+       },
+};
+
+/* dispc */
+
+struct omap_dss_dispc_dev_attr am43xx_dss_dispc_dev_attr = {
+       .manager_count          = 1,
+       .has_framedonetv_irq    = 0
+};
+
+static struct omap_hwmod_class_sysconfig am43xx_dispc_sysc = {
+       .rev_offs       = 0x0000,
+       .sysc_offs      = 0x0010,
+       .syss_offs      = 0x0014,
+       .sysc_flags     = (SYSC_HAS_AUTOIDLE | SYSC_HAS_SOFTRESET |
+                          SYSC_HAS_ENAWAKEUP | SYSC_HAS_SIDLEMODE |
+                          SYSC_HAS_CLOCKACTIVITY | SYSC_HAS_MIDLEMODE),
+       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
+                          MSTANDBY_FORCE | MSTANDBY_NO | MSTANDBY_SMART),
+       .sysc_fields    = &omap_hwmod_sysc_type1,
+};
+
+static struct omap_hwmod_class am43xx_dispc_hwmod_class = {
+       .name   = "dispc",
+       .sysc   = &am43xx_dispc_sysc,
+};
+
+static struct omap_hwmod am43xx_dss_dispc_hwmod = {
+       .name           = "dss_dispc",
+       .class          = &am43xx_dispc_hwmod_class,
+       .clkdm_name     = "dss_clkdm",
+       .main_clk       = "disp_clk",
+       .prcm = {
+               .omap4 = {
+                       .clkctrl_offs = AM43XX_CM_PER_DSS_CLKCTRL_OFFSET,
+               },
+       },
+       .dev_attr       = &am43xx_dss_dispc_dev_attr,
+};
+
+/* rfbi */
+
+static struct omap_hwmod am43xx_dss_rfbi_hwmod = {
+       .name           = "dss_rfbi",
+       .class          = &omap2_rfbi_hwmod_class,
+       .clkdm_name     = "dss_clkdm",
+       .main_clk       = "disp_clk",
+       .prcm = {
+               .omap4 = {
+                       .clkctrl_offs = AM43XX_CM_PER_DSS_CLKCTRL_OFFSET,
+               },
+       },
+};
+
 /* Interfaces */
 static struct omap_hwmod_ocp_if am43xx_l3_main__l4_hs = {
        .master         = &am33xx_l3_main_hwmod,
@@ -654,6 +722,34 @@ static struct omap_hwmod_ocp_if am43xx_l3_s__qspi = {
        .user           = OCP_USER_MPU | OCP_USER_SDMA,
 };
 
+static struct omap_hwmod_ocp_if am43xx_dss__l3_main = {
+       .master         = &am43xx_dss_core_hwmod,
+       .slave          = &am33xx_l3_main_hwmod,
+       .clk            = "l3_gclk",
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+static struct omap_hwmod_ocp_if am43xx_l4_ls__dss = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am43xx_dss_core_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+static struct omap_hwmod_ocp_if am43xx_l4_ls__dss_dispc = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am43xx_dss_dispc_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
+static struct omap_hwmod_ocp_if am43xx_l4_ls__dss_rfbi = {
+       .master         = &am33xx_l4_ls_hwmod,
+       .slave          = &am43xx_dss_rfbi_hwmod,
+       .clk            = "l4ls_gclk",
+       .user           = OCP_USER_MPU | OCP_USER_SDMA,
+};
+
 static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = {
        &am33xx_l4_wkup__synctimer,
        &am43xx_l4_ls__timer8,
@@ -748,6 +844,10 @@ static struct omap_hwmod_ocp_if *am43xx_hwmod_ocp_ifs[] __initdata = {
        &am43xx_l4_ls__ocp2scp1,
        &am43xx_l3_s__usbotgss0,
        &am43xx_l3_s__usbotgss1,
+       &am43xx_dss__l3_main,
+       &am43xx_l4_ls__dss,
+       &am43xx_l4_ls__dss_dispc,
+       &am43xx_l4_ls__dss_rfbi,
        NULL,
 };
 
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 (file)
index 0000000..f21664d
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * omap_hwmod_common_ipblock_data.c - common IP block data for OMAP2+
+ *
+ * Copyright (C) 2011 Nokia Corporation
+ * Copyright (C) 2012 Texas Instruments, Inc.
+ * Paul Walmsley
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include "omap_hwmod.h"
+#include "omap_hwmod_common_data.h"
+
+/*
+ * 'dss' class
+ * display sub-system
+ */
+
+static struct omap_hwmod_class_sysconfig omap2_dss_sysc = {
+       .rev_offs       = 0x0000,
+       .sysc_offs      = 0x0010,
+       .syss_offs      = 0x0014,
+       .sysc_flags     = (SYSC_HAS_SOFTRESET | SYSC_HAS_AUTOIDLE |
+                          SYSS_HAS_RESET_STATUS),
+       .sysc_fields    = &omap_hwmod_sysc_type1,
+};
+
+struct omap_hwmod_class omap2_dss_hwmod_class = {
+       .name   = "dss",
+       .sysc   = &omap2_dss_sysc,
+       .reset  = omap_dss_reset,
+};
+
+/*
+ * 'rfbi' class
+ * remote frame buffer interface
+ */
+
+static struct omap_hwmod_class_sysconfig omap2_rfbi_sysc = {
+       .rev_offs       = 0x0000,
+       .sysc_offs      = 0x0010,
+       .syss_offs      = 0x0014,
+       .sysc_flags     = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
+                          SYSC_HAS_AUTOIDLE),
+       .idlemodes      = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART),
+       .sysc_fields    = &omap_hwmod_sysc_type1,
+};
+
+struct omap_hwmod_class omap2_rfbi_hwmod_class = {
+       .name   = "rfbi",
+       .sysc   = &omap2_rfbi_sysc,
+};
+
index 7785be984edd2dd5fd3f9208c73bc0e177b4d3a6..ad7b3e9977f8fa520b0281e3e9b876e98f7e98b3 100644 (file)
 #define AM43XX_CM_PER_USBPHYOCP2SCP0_CLKCTRL_OFFSET    0x05B8
 #define AM43XX_CM_PER_USB_OTG_SS1_CLKCTRL_OFFSET        0x0268
 #define AM43XX_CM_PER_USBPHYOCP2SCP1_CLKCTRL_OFFSET    0x05C0
+#define AM43XX_CM_PER_DSS_CLKCTRL_OFFSET               0x0a20
 
 #endif