OMAPDSS: remove declarations for non-existing functions

Remove dispc_mgr_is_channel_enabled() and dss_mgr_get_timings()
declarations, as the function doesn't exist.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
OMAPDSS: DPI: fix crash with dpi_verify_dsi_pll()

If the DSI support has not been compiled in or the SoC doesn't have DSI
hardware, dpi_get_dsidev() returns NULL. This NULL is passed to
dpi_verify_dsi_pll() causing a crash. The bug was added with commit
0e8276ef75f5c7811b038d1d23b2b42c16efc5ac (OMAPDSS: DPI: always use DSI
PLL if available).

Fix this by checking if dsidev is NULL before calling
dpi_verify_dsi_pll().

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
OMAPDSS: don't WARN if there's no DSI device

dsi_get_dsidev_from_id() gives a WARN if DSI support is not compiled in.
This warning is not right, as it's valid to call
dsi_get_dsidev_from_id() to see if there is DSI support or not.

Remove the WARN().

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
OMAPDSS: DISPC: add no_framedone_tv feat

OMAP2/3 do not have FRAMEDONETV irq, but later omaps do. We currently
always return 0 from dispc_mgr_get_framedone_irq() for TV output to be
compatible with OMAP2/3.

This patch implements "no_framedone_tv" dispc-feature that is used in
dispc_mgr_get_framedone_irq to return either 0 for OMAP2/3, or the
correct IRQ number for FRAMEDONETV on OMAP4+.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
OMAPDSS: DISPC: use get_framedone_irq in disable_digit_out

dispc_mgr_disable_digit_out() needs to wait until the DIGIT output is
turned off. This is done with either VSYNC irq on OMAP2/3 and
FRAMEDONETV on OMAP4+. It currently uses a rather hacky way to decide
what irq to use.

This patch changes dispc_mgr_disable_digit_out to use
dispc_mgr_get_framedone_irq to find out if there's framedone irq on this
SoC, and if not, uses VSYNC.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
OMAPDSS: DISPC: Remove blocking code from dispc_wb_enable()

WB will not be used with compat-mode, i.e. from omapfb. This means we
don't need the current complex dispc_wb_enable function, but can have a
simple register write version of the function.

This patch removes all the extra code from dispc_wb_enable()

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
OMAPDSS: cleanup WB enable/is_enabled functions

Instead of doing direct register reads/writes, dispc_wb_enable() and
dispc_wb_is_enabled() functions can use the common overlay functions to
set and check the enable bit.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
OMAPDSS: DISPC: use WARN_ON() in dispc_mgr_go

dispc_mgr_go() should never be called with manager output disabled or if
the GO bit is already set. Change the current silent returns to
WARN_ONs.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
OMAPDSS: DISPC: pclk & lclk rates for writeback

Change the dispc_plane_pclk_rate and dispc_plane_lclk_rate functions to
return 0 if the given plane is the writeback plane. The clocks are not
valid for WB, but returning 0 from these functions instead of running
into BUG() will simplify the code that uses these functions.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
OMAPDSS: DISPC: pass pclk to calc_core_clk()

In order to make the scaling calculations independent of the current
hardware configuration (e.g. which manager is connected to this output),
we need to change the calc funcs to get all the variables needed for the
calculations via parameters.

This patch changes calc_core_clk() function to get pclk as a parameter.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
OMAPDSS: DISPC: pass pclk & lclk to check_horiz_timing_omap3

In order to make the scaling calculations independent of the current
hardware configuration (e.g. which manager is connected to this output),
we need to change the calc funcs to get all the variables needed for the
calculations via parameters.

This patch changes check_horiz_timing_omap3() to get pclk and lclk as
parameters.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
OMAPDSS: DISPC: pass pclk & lclk to calc_scaling

In order to make the scaling calculations independent of the current
hardware configuration (e.g. which manager is connected to this output),
we need to change the calc funcs to get all the variables needed for the
calculations via parameters.

This patch changes calc_scaling to get pclk and lclk as parameters.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
OMAPDSS: DISPC: pass pclk & lclk to dispc_ovl_calc_scaling

In order to make the scaling calculations independent of the current
hardware configuration (e.g. which manager is connected to this output),
we need to change the calc funcs to get all the variables needed for the
calculations via parameters.

This patch changes dispc_ovl_calc_scaling to get pclk and lclk as
parameters.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
OMAPDSS: create display-sysfs.c

Move display sysfs related code from display.c to display-sysfs.c, for
clarity. The sysfs code will only be used for compat mode.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
OMAPDSS: add dss_get_core_pdev()

Add dss_get_core_pdev() which returns the platform device for dss core
device. The following patches use the core pdev to register sysfs files
in the compat code.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
ARM: OMAP2+: HDMI: Relocate audio platform device creation

Creating the accessory devices (such as audio) from the HDMI driver,
allows to regard HDMI as a single entity with audio an display
functionality. This intends to follow the design of drivers such
as MFD-type, in which a single entity handles the creation of the accessory
devices. Such devices are then used by domain-specific drivers (audio in
this case). This is in line with the DT implementation of HDMI, in which
we will have a single node to describe this feature of the OMAP SoC. Otherwise,
we would need to have separate nodes for audio and video functionality.

Previously, the platform device for the audio driver was created in
arch/arm/mach-omap2/devices.c. Thus, this is removed.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
ARM: OMAP2+: HDMI: Refine the DMA resource for audio drivers

Instead of passing the complete resource to the audio drivers, just
pass the adress offset of the DMA port for audio samples. Thus,
we prevent that two drivers try to ioremap the same resources. This
is to be safe, as the audio drivers will not need to ioremap such
resource.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
ARM: OMAP4+: HDMI: Rearrange platform devices for ASoC drivers

This relocates and renames the platform devices for ASoC HDMI drivers
to give them a more logical structure.

The previous omap-hdmi-audio device is renamed as omap-hdmi-audio-card
and is relocated to the SDP4430 and Pandaboard board files. This is to
better illustrate the fact that it describes the whole HDMI audio
functionality on such boards, including the companion chip.

The previous omap-hdmi-audio-dai is renamed as omap-hdmi-audio. The -dai
part is removed to not have references to ASoC concepts in the OMAPDSS
HDMI driver. Also, as it will be used by the ASoC HDMI CPU DAI driver,
the name refers only to OMAP HDMI audio functionality, irrespective of the
board.

The names of the ASoC drivers are also updated accordingly.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
codec fails to register
how to define the device id?

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>