diff options
| -rw-r--r-- | arch/arm/mach-omap2/display.c | 38 |
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 | ||
| 104 | static 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 | |||
| 104 | static int omap_dsi_enable_pads(int dsi_id, unsigned lane_mask) | 137 | static 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 | ||
| 109 | static void omap_dsi_disable_pads(int dsi_id, unsigned lane_mask) | 145 | static 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 | ||
| 113 | static int omap_dss_set_min_bus_tput(struct device *dev, unsigned long tput) | 151 | static int omap_dss_set_min_bus_tput(struct device *dev, unsigned long tput) |
