OMAPDSS: HDMI: OMAP4: Complete register definitions for wrapper

Add definitions for missing registers in the HDMI wrapper. Also, order
the registers by offset to improve readability.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
OMAPDSS: HDMI: OMAP4: Complete dumping of wrapper registers

Add missing registers when dumping the HDMI wrapper. Also, order the dump by
offset to improve readability.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
OMAPDSS: HDMI: OMAP4: Complete register definitions for DPLL

Add missing register definitions for spread spectrum clocking.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
OMAPDSS: HDMI: OMAP4: Complete dumping of DPLL registers

Add the spread spectrum clock configuration registers to the DPLL dump.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
OMAPDSS: HDMI: OMAP4: Rename the HDMI_CORE_CTRL1 register

Rename the register to be aligned with the HDMI_CORE_SYS naming convention.
Also, update the naming of the #defines used for its fields.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
OMAPDSS: HDMI: OMAP4: Complete register definitions for core

Add missing register definitions; mainly for colorspace conversion, video
timing and interrupt handling.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
OMAPDSS: HDMI: OMAP4: Complete dumping of core registers

Add missing register entries when dumping the core.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
OMAPDSS: HDMI: Fix AVI infoframe bug

Fix the AVI info frame bug, make it a pass by reference

Signed-off-by: Mythri P K <mythripk@ti.com>
OMAPDSS: HDMI: Don't bail out if HDMI WP pwer state doesn't change

The HDMI_WP_CTRL doesn't seem to reflect the change in power states, but it
functions as expected. Ignore the errors for now.

Signed-off-by: Archit Taneja <archit@ti.com>
OMAPDSS: HDMI: Use one ioremap for each address space

Instead of using only one address space and several offsets, use
one individual ioremap for each address space.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
OMAPDSS: HDMI: Obtain HDMI wrapper address space by name for audio

To ensure that we obtain the correct address space, use its name.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
OMAPDSS: HDMI: OMAP4: Update functions to obtain memory base addresses

Rather than using offsets for the several sections of the HDMI address space,
use the several available ioremaps. Only the core address space continues
to use offsets that are specific to OMAP4.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
OMAPDSS: HDMI: OMAP4: Initialize wrapper interrrupts

Add functionality to intialize the HDMI wrapper interrupt mask bits.

Signed-off-by: Mythri P K <mythripk@ti.com>
Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
OMAPDSS: HDMI: Add function to enable wrapper interrupts

Function to set the wrapper interrupts mask.

Signed-off-by: Mythri P K <mythripk@ti.com>
Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
OMAPDSS: HDMI: Add interrupt handler

Add support to handle wrapper interrupts. Implement support for
OMAP4 IP as well.

Signed-off-by: Mythri P K <mythripk@ti.com>
Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
Signed-off-by: Fairuz WAN ISMAIL <a0919885@ti.com>
OMAPDSS: HDMI: Introduce handler for core interrutps

Interrupts of the OMAP HDMI IP may come from the wrapper or from the
core. Thus, we need to handle both. This patch introduces a new
HDMI operation to handle the core interrupts.

At the moment, the OMAP4 core interrupt handler is dummy.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
OMAPDSS: OMAP5: HDMI: Make functions available for OMAP5

Use both CONFIG_OMAP4_DSS_HDMI and CONFIG_OMAP5_DSS_HDMI to make common
HDMI functions available for OMAP5.

Signed-off-by: Mythri P K <mythripk@ti.com>
OMAPDSS: HDMI: Make wrapper functions available for OMAP5

HDMI wrapper is same across OMAP4 and OMAP5, so the wrapper
functions can be re-used. Thus, we need to make wrapper functions
non-static.

Signed-off-by: Mythri P K <mythripk@ti.com>
OMAPDSS: HDMI: Check PLL control bit

Although the PLL block is common between OMAP4 and 5
the reset bit is swapped. Use the OMAPDSS version to determine
the correct value.

Signed-off-by: Mythri P K <mythripk@ti.com>
Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
OMAPDSS: HDMI: Update DPLL calculation for OMAP5

Update the DPLL settings calculation to encompass OMAP5 HDM IP. The
M2 divider should be used in OMAP5 HDMI PLL. Also, the value must be
2 to get frequencies below 50Mz.

Signed-off-by: Mythri P K <mythripk@ti.com>
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>