aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/display.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
index 7a050f9c37ff..f492ae147c6a 100644
--- a/arch/arm/mach-omap2/display.c
+++ b/arch/arm/mach-omap2/display.c
@@ -26,6 +26,8 @@
26#include <linux/of.h> 26#include <linux/of.h>
27#include <linux/of_platform.h> 27#include <linux/of_platform.h>
28#include <linux/slab.h> 28#include <linux/slab.h>
29#include <linux/mfd/syscon.h>
30#include <linux/regmap.h>
29 31
30#include <video/omapdss.h> 32#include <video/omapdss.h>
31#include "omap_hwmod.h" 33#include "omap_hwmod.h"
@@ -104,6 +106,10 @@ static const struct omap_dss_hwmod_data omap4_dss_hwmod_data[] __initconst = {
104 { "dss_hdmi", "omapdss_hdmi", -1 }, 106 { "dss_hdmi", "omapdss_hdmi", -1 },
105}; 107};
106 108
109#define OMAP4_DSIPHY_SYSCON_OFFSET 0x78
110
111static struct regmap *omap4_dsi_mux_syscon;
112
107static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes) 113static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes)
108{ 114{
109 u32 enable_mask, enable_shift; 115 u32 enable_mask, enable_shift;
@@ -124,7 +130,7 @@ static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes)
124 return -ENODEV; 130 return -ENODEV;
125 } 131 }
126 132
127 reg = omap4_ctrl_pad_readl(OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_DSIPHY); 133 regmap_read(omap4_dsi_mux_syscon, OMAP4_DSIPHY_SYSCON_OFFSET, &reg);
128 134
129 reg &= ~enable_mask; 135 reg &= ~enable_mask;
130 reg &= ~pipd_mask; 136 reg &= ~pipd_mask;
@@ -132,7 +138,7 @@ static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes)
132 reg |= (lanes << enable_shift) & enable_mask; 138 reg |= (lanes << enable_shift) & enable_mask;
133 reg |= (lanes << pipd_shift) & pipd_mask; 139 reg |= (lanes << pipd_shift) & pipd_mask;
134 140
135 omap4_ctrl_pad_writel(reg, OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_DSIPHY); 141 regmap_write(omap4_dsi_mux_syscon, OMAP4_DSIPHY_SYSCON_OFFSET, reg);
136 142
137 return 0; 143 return 0;
138} 144}
@@ -665,5 +671,10 @@ int __init omapdss_init_of(void)
665 return r; 671 return r;
666 } 672 }
667 673
674 /* add DSI info for omap4 */
675 node = of_find_node_by_name(NULL, "omap4_padconf_global");
676 if (node)
677 omap4_dsi_mux_syscon = syscon_node_to_regmap(node);
678
668 return 0; 679 return 0;
669} 680}