aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2013-12-16 02:14:48 -0500
committerTony Lindgren <tony@atomide.com>2013-12-17 19:28:34 -0500
commit130f769e81fc472beb2211320777e26050e3fa15 (patch)
tree4ede696ab2c3f6a0c49a04aee48bb676b2d89003 /arch
parent319e2e3f63c348a9b66db4667efa73178e18b17d (diff)
Revert "ARM: OMAP2+: Remove legacy mux code for display.c"
Commit e30b06f4d5f000c31a7747a7e7ada78a5fd419a1 (ARM: OMAP2+: Remove legacy mux code for display.c) removed non-DT DSI and HDMI pinmuxing. However, DSI pinmuxing is still needed, and removing that caused DSI displays not to work. This reverts the DSI parts of the commit. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap2/display.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c
index 58347bb874a0..4cf165502b35 100644
--- a/arch/arm/mach-omap2/display.c
+++ b/arch/arm/mach-omap2/display.c
@@ -101,13 +101,51 @@ static const struct omap_dss_hwmod_data omap4_dss_hwmod_data[] __initconst = {
101 { "dss_hdmi", "omapdss_hdmi", -1 }, 101 { "dss_hdmi", "omapdss_hdmi", -1 },
102}; 102};
103 103
104static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes)
105{
106 u32 enable_mask, enable_shift;
107 u32 pipd_mask, pipd_shift;
108 u32 reg;
109
110 if (dsi_id == 0) {
111 enable_mask = OMAP4_DSI1_LANEENABLE_MASK;
112 enable_shift = OMAP4_DSI1_LANEENABLE_SHIFT;
113 pipd_mask = OMAP4_DSI1_PIPD_MASK;
114 pipd_shift = OMAP4_DSI1_PIPD_SHIFT;
115 } else if (dsi_id == 1) {
116 enable_mask = OMAP4_DSI2_LANEENABLE_MASK;
117 enable_shift = OMAP4_DSI2_LANEENABLE_SHIFT;
118 pipd_mask = OMAP4_DSI2_PIPD_MASK;
119 pipd_shift = OMAP4_DSI2_PIPD_SHIFT;
120 } else {
121 return -ENODEV;
122 }
123
124 reg = omap4_ctrl_pad_readl(OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_DSIPHY);
125
126 reg &= ~enable_mask;
127 reg &= ~pipd_mask;
128
129 reg |= (lanes << enable_shift) & enable_mask;
130 reg |= (lanes << pipd_shift) & pipd_mask;
131
132 omap4_ctrl_pad_writel(reg, OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_DSIPHY);
133
134 return 0;
135}
136
104static int omap_dsi_enable_pads(int dsi_id, unsigned lane_mask) 137static int omap_dsi_enable_pads(int dsi_id, unsigned lane_mask)
105{ 138{
139 if (cpu_is_omap44xx())
140 return omap4_dsi_mux_pads(dsi_id, lane_mask);
141
106 return 0; 142 return 0;
107} 143}
108 144
109static void omap_dsi_disable_pads(int dsi_id, unsigned lane_mask) 145static void omap_dsi_disable_pads(int dsi_id, unsigned lane_mask)
110{ 146{
147 if (cpu_is_omap44xx())
148 omap4_dsi_mux_pads(dsi_id, 0);
111} 149}
112 150
113static int omap_dss_set_min_bus_tput(struct device *dev, unsigned long tput) 151static int omap_dss_set_min_bus_tput(struct device *dev, unsigned long tput)