platform/kernel/linux-stable.git
13 years agoOMAP: DSS2: Clean up for dpll4_m4_ck handling
Tomi Valkeinen [Mon, 14 Mar 2011 12:28:57 +0000 (07:28 -0500)]
OMAP: DSS2: Clean up for dpll4_m4_ck handling

OMAP2 does not have dpll4_m4_ck source clock for dss functional clock,
but later OMAPs do. Currently we check for cpu type in multiple places
to find out if dpll4_m4_ck is available.

This patch cleans up dss.c by using the fact that dss.dpll4_m4_ck
pointer is NULL on OMAP2. This allows us to remove many of the cpu
checks.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP4: HDMI: Add HDMI structure in the board file for OMAP4 PANDA
K, Mythri P [Tue, 15 Mar 2011 04:57:42 +0000 (23:57 -0500)]
OMAP4: HDMI: Add HDMI structure in the board file for OMAP4 PANDA

Adding  board file structure for display which adds the display
structure with HDMI as the default driver when the display init
is called.
HDMI GPIO configurations are also done in this file.

Signed-off-by: Mythri P K <mythripk@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP4: HDMI: Add HDMI structure in the board file for OMAP4 SDP
Mythri P K [Tue, 8 Mar 2011 13:20:09 +0000 (18:50 +0530)]
OMAP4: HDMI: Add HDMI structure in the board file for OMAP4 SDP

Adding  board file structure for display which adds the display
structure with HDMI as the default driver when the display init
is called.
HDMI GPIO configurations are also done in this file.

Signed-off-by: Mythri P K <mythripk@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP4: DSS: HDMI: Call to HDMI module init to register driver.
Mythri P K [Wed, 9 Mar 2011 10:10:02 +0000 (15:40 +0530)]
OMAP4: DSS: HDMI: Call to HDMI module init to register driver.

calling the platform registration of HDMI driver from core
during initialization.

Signed-off-by: Mythri P K <mythripk@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP4: DSS2: HDMI: Add makefile and kconfig changes to enable HDMI in OMAP4
Mythri P K [Thu, 10 Mar 2011 09:42:48 +0000 (15:12 +0530)]
OMAP4: DSS2: HDMI: Add makefile and kconfig changes to enable HDMI in OMAP4

Adding kconfig and makefile changes to add support for HDMI in OMAP4.

Signed-off-by: Mythri P K <mythripk@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP4: DSS2: HDMI: HDMI panel driver addition in the DSS
Mythri P K [Thu, 10 Mar 2011 10:18:48 +0000 (15:48 +0530)]
OMAP4: DSS2: HDMI: HDMI panel driver addition in the DSS

The panel driver(hdmi_omap4_panel.c) in omap2/dss acts as a controller
to manage the enable and disable requests and synchronize audio and video.

Signed-off-by: Mythri P K <mythripk@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP4: DSS2: HDMI: HDMI driver addition in the DSS
Mythri P K [Sat, 12 Mar 2011 06:34:27 +0000 (12:04 +0530)]
OMAP4: DSS2: HDMI: HDMI driver addition in the DSS

Adding the hdmi interface driver(hdmi.c) to the dss driver. It configures
the audio and video portion of HDMI based on functionality called by the
panel driver.

Signed-off-by: Mythri P K <mythripk@ti.com>
Signed-off-by: Yong Zhi <y-zhi@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP4: DSS2: HDMI: HDMI driver header file addition
Mythri P K [Tue, 8 Mar 2011 11:57:56 +0000 (17:27 +0530)]
OMAP4: DSS2: HDMI: HDMI driver header file addition

Adding the hdmi interface driver header file (hdmi.h) to the dss driver.
Register and structure declaration done here.

Signed-off-by: Mythri P K <mythripk@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP4: DSS2: HDMI: Dispc gamma enable set/reset function for TV.
Mythri P K [Fri, 11 Mar 2011 12:32:49 +0000 (18:02 +0530)]
OMAP4: DSS2: HDMI: Dispc gamma enable set/reset function for TV.

Adding function to reset/set gamma table bit for TV interface, currently
only support for disabled is added.

Signed-off-by: Mythri P K <mythripk@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP4: DSS2: HDMI: Select between HDMI VENC clock source.
Mythri P K [Wed, 9 Mar 2011 11:01:38 +0000 (16:31 +0530)]
OMAP4: DSS2: HDMI: Select between HDMI VENC clock source.

Adding function to select between HDMI or VENC clock source.

Signed-off-by: Mythri P K <mythripk@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP4: DSS2: Add display type HDMI to DSS2
Mythri P K [Tue, 8 Mar 2011 11:45:54 +0000 (17:15 +0530)]
OMAP4: DSS2: Add display type HDMI to DSS2

Adding display type HDMI in dss_features, overlay and the manager so that
HDMI type of display will be recognized.

Signed-off-by: Mythri P K <mythripk@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: DSI: fix IRQ debug prints
Tomi Valkeinen [Wed, 2 Mar 2011 13:53:07 +0000 (15:53 +0200)]
OMAP: DSS2: DSI: fix IRQ debug prints

print_irq_status functions can be called with empty irq status when full
irq debugging is enabled. This patch makes print_irq_status functions
return immediately when given an empty irq status to lessen the debug
spam slightly.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: DSI: catch DSI errors in send_bta_sync
Tomi Valkeinen [Fri, 8 Oct 2010 13:15:25 +0000 (16:15 +0300)]
OMAP: DSS2: DSI: catch DSI errors in send_bta_sync

dsi_vc_send_bta_sync() waits for BTA interrupt with a 500ms timeout. If
a DSI error happens, no BTA is received and the timeout triggers. This
could be handled much faster by listening to DSI errors also.

This patch uses the ISR support to notice DSI errors while waiting for
the BTA, thus speeding up the fail-path considerably.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: DSI: use ISR for BTA in framedone
Tomi Valkeinen [Wed, 2 Mar 2011 12:52:48 +0000 (14:52 +0200)]
OMAP: DSS2: DSI: use ISR for BTA in framedone

Remove bta_callback from the interrupt handler, and use ISR support
instead.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: DSI: use ISR in send_bta_sync
Tomi Valkeinen [Wed, 2 Mar 2011 12:48:41 +0000 (14:48 +0200)]
OMAP: DSS2: DSI: use ISR in send_bta_sync

Remove bta_completion handling from the interrupt handler, and use ISR
support instead.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: DSI: Add ISR support
Tomi Valkeinen [Wed, 2 Mar 2011 12:47:04 +0000 (14:47 +0200)]
OMAP: DSS2: DSI: Add ISR support

Add generic ISR support for DSI interrupts. ISRs can be used instead of
custom hooks in the interrupt handler.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: DSI: Restructure IRQ handler
Tomi Valkeinen [Wed, 2 Mar 2011 12:44:27 +0000 (14:44 +0200)]
OMAP: DSS2: DSI: Restructure IRQ handler

Clean up the IRQ handler a bit by separating collection of IRQ stats and
handling of IRQ errors to separate functions.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: FEATURES: DSI PLL parameter cleanup
Taneja, Archit [Tue, 15 Mar 2011 04:28:23 +0000 (23:28 -0500)]
OMAP: DSS2: FEATURES: DSI PLL parameter cleanup

The DSI PLL parameters (regm, regn, regm_dispc, regm_dsi, fint) have different
fields and also different Max values on OMAP3 and OMAP4. Use dss features to
calculate the register fields and min/max values based on current OMAP revision.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: FEATURES: Functions to return min and max values of parameters
Taneja, Archit [Tue, 15 Mar 2011 04:28:22 +0000 (23:28 -0500)]
OMAP: DSS2: FEATURES: Functions to return min and max values of parameters

Create 2 functions dss_feat_get_param_min() and dss_feat_get_param_max() which
return the minimum and maximum value of a parameter. Introduce a enum in
dss_features called dss_range_param which contains parameters whose ranges we
are interested in.

Replace this with dss_feat_get_max_dss_fck() which is specific to the parameter
DSS_FCK.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP2PLUS: DSS2: FEATURES: Fix usage of dss_reg_field and dss_clk_source_name
Taneja, Archit [Tue, 15 Mar 2011 04:28:21 +0000 (23:28 -0500)]
OMAP2PLUS: DSS2: FEATURES: Fix usage of dss_reg_field and dss_clk_source_name

The structures dss_reg_field and dss_clk_source_name have enum members which
specify the register field and the clock source respectively. These members are
not used to choose the correct result in the corresponding feature functions.
Remove these members and change the features array declaration to incorporate
these enums.

The structure dss_clk_source_name without the enum member is just a pointer to
an string. Remove the structure and use a character pointer directly.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoHACK: OMAP: DSS2: VENC: disable VENC on OMAP4 to prevent crash
Tomi Valkeinen [Fri, 11 Mar 2011 07:28:06 +0000 (09:28 +0200)]
HACK: OMAP: DSS2: VENC: disable VENC on OMAP4 to prevent crash

Something seems to be wrong with OMAP4 & VENC, and register access fails
in omap_venchw_probe().

This patch skips venc driver registration on OMAP4, thus circumventing
the problem for now.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: Add gpio-keys support for Overo
Steve Sakoman [Thu, 10 Mar 2011 00:08:06 +0000 (18:08 -0600)]
OMAP: Add gpio-keys support for Overo

This patch adds support for the standard push buttons available on
Overo expansion boards.

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: Add gpio-leds support for Overo
Steve Sakoman [Thu, 10 Mar 2011 00:08:05 +0000 (18:08 -0600)]
OMAP: Add gpio-leds support for Overo

This patch adds support for the standard LEDs on the Overo COM and expansion boards

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoomap: overo: Add regulator for ads7846
Steve Sakoman [Sat, 5 Mar 2011 16:12:26 +0000 (10:12 -0600)]
omap: overo: Add regulator for ads7846

The ads7846 driver now requires a regulator.  This patch adds the
necessary regulator to the overo board file.  Without it, the
following error occurs (and the touchscreen will not function):

ads7846 spi1.0: unable to get regulator: -19

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP4: DSS2: Clock source changes for OMAP4
Taneja, Archit [Tue, 8 Mar 2011 11:50:35 +0000 (05:50 -0600)]
OMAP4: DSS2: Clock source changes for OMAP4

On OMAP3, the pixel clock for the LCD manager was derived through DISPC_FCLK as:

Lcd Pixel clock = DISPC_FCLK / lcd / pcd

Where lcd and pcd are divisors in the DISPC_DIVISOR register.

On OMAP4, the pixel clocks for LCD1 and LCD2 managers are derived from 2 new
clocks named LCD1_CLK and LCD2_CLK. The pixel clocks are calculated as:

Lcd_o Pixel clock = LCDo_CLK / lcdo /pcdo, o = 1, 2

Where lcdo and pcdo registers are divisors in DISPC_DIVISORo registers.

LCD1_CLK and LCD2_CLK can have DSS_FCLK, and the M4 divider clocks of DSI1 PLL
and DSI2 PLL as clock sources respectively. Introduce functions to select and
get the clock source for these new clocks. Modify DISPC functions get the
correct lck and pck rates based on the clock source of these clocks. Since
OMAP2/3 don't have these clocks, force OMAP2/3 to always have the LCD_CLK source
as DSS_CLK_SRC_FCK by introducing a dss feature.

Introduce clock source names for OMAP4 and some register field changes in
DSS_CTRL on OMAP4.

Currently, LCD2_CLK can only have DSS_FCLK as its clock source as DSI2 PLL
functionality hasn't been introduced yet. BUG for now if DSI2 PLL is selected as
clock.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP2PLUS: DSS2: Cleanup clock source related code
Taneja, Archit [Tue, 8 Mar 2011 11:50:34 +0000 (05:50 -0600)]
OMAP2PLUS: DSS2: Cleanup clock source related code

Clean up some of the DSS functions which select/get clock sources, use switch
to select the clock source members since more clock sources will be introduced
later on.

Remove the use of macro CONFIG_OMAP2_DSS_DSI in dispc_fclk_rate, use a dummy
inline for function for dsi_get_pll_hsdiv_dispc_rate() instead for code clarity.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: Add DSS2 support for Overo
Steve Sakoman [Sat, 5 Mar 2011 13:58:39 +0000 (07:58 -0600)]
OMAP: DSS2: Add DSS2 support for Overo

This patch adds DSS2 support for DVI, S-video, the 480x272 Samsung
LTE430WQ-F0C panel, and the 320x240 LG.Philips LB035Q02 panel.

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: Add support for LG Philips LB035Q02 panel
Steve Sakoman [Sat, 5 Mar 2011 13:58:38 +0000 (07:58 -0600)]
OMAP: DSS2: Add support for LG Philips LB035Q02 panel

This patch adds support for the Gumstix Palo35 expansion board
which utilizes the 320 x 240 pixel LG.Philips LB035Q02 LCD Panel

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: fix omap_dispc_register_isr() fail path
Tomi Valkeinen [Fri, 4 Mar 2011 16:19:54 +0000 (18:19 +0200)]
OMAP: DSS2: fix omap_dispc_register_isr() fail path

Fix handling of error in omap_dispc_register_isr() in case there are no
free isr slots available.

Reported-by: Ben Tucker <btucker@mpcdata.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP4: DSS2: Using dss_features to set independent core clock divider
Murthy, Raghuveer [Thu, 3 Mar 2011 15:28:00 +0000 (09:28 -0600)]
OMAP4: DSS2: Using dss_features to set independent core clock divider

Using dss_features to select independent core clock divider and setting
it. Added the register used, to DISPC context save and restore group

-----------------------------------------------------------------------
In OMAP4, the minimum DISPC_CORE_CLK required can be expressed as:

DISPC_CORE_CLK >= max(PCLK1*HSCALE1, PCLK2*HSCALE2, ...)

Where PCLKi is the pixel clock generated by MANAGERi and HSCALEi is the
maximum horizontal downscaling done through MANAGERi

Based on the usecase, core clk can be increased or decreased at runtime
to save power. Such mechanism are not yet implemented. Hence, we set the
core clock divisor to 1, to support maximum range of resolutions
------------------------------------------------------------------------

Signed-off-by: Raghuveer Murthy <raghuveer.murthy@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: Renaming register macro DISPC_DIVISOR(ch)
Murthy, Raghuveer [Thu, 3 Mar 2011 15:27:59 +0000 (09:27 -0600)]
OMAP: DSS2: Renaming register macro DISPC_DIVISOR(ch)

The OMAP4 DISPC_DIVISOR1 is backward compatible to OMAP3xxx DISPC_DIVISOR.
However DISPC_DIVISOR is also provided in OMAP4, to control DISPC_CORE_CLK
independent of Primary and Secondary display clocks.

Renamed DISPC_DIVISOR(ch) to DISPC_DIVISORo(ch), to facilitate introduction
of DISPC_DIVISOR register, which is specific for OMAP4. OMAP4 has 3 registers
DISPC_DIVISOR, DISPC_DIVISOR1 and DISPC_DIVISOR2.

Also updated, all the usages of DISPC_DIVISOR(ch) to DISPC_DIVISORo(ch).
Use DISPC_DIVISORo(ch) when DISPC_DIVISOR1 or DISPC_DIVISOR2 has to be
configured

OMAP4 TRM uses DISPC_DIVISORo generically to refer to DISPC_DIVISOR1 and
DISPC_DIVISOR2

Signed-off-by: Raghuveer Murthy <raghuveer.murthy@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: Adding dss_features for independent core clk divider
Murthy, Raghuveer [Thu, 3 Mar 2011 15:27:58 +0000 (09:27 -0600)]
OMAP: DSS2: Adding dss_features for independent core clk divider

In OMAP3xxx DISPC_DIVISOR register has a logical clock divisor (lcd_div)
field. The lcd_div is common, for deciding the DISPC core functional clock
frequency, and the final pixel clock frequency for LCD display.

In OMAP4, there are 2 LCD channels, hence two divisor registers, DISPC_DIVISOR1
and DISPC_DIVISOR2. Also, there is a third register DISPC_DIVISOR.

The DISPC_DIVISOR in OMAP4 is used to configure lcd_div exclusively for core
functional clock configuration. For pixel clock configuration of primary and
secondary LCDs, lcd_div of DISPC_DIVISOR1 and DISPC_DIVISOR2 are used
respectively

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Raghuveer Murthy <raghuveer.murthy@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoHACK: OMAP: DSS2: add delay after enabling clocks
Tomi Valkeinen [Thu, 3 Mar 2011 11:16:23 +0000 (13:16 +0200)]
HACK: OMAP: DSS2: add delay after enabling clocks

On omap4 the registers may not be accessible right after enabling the
clocks. At some point this will be handled by pm_runtime, but, for the
time begin, adding a small delay after clk_enable() should make things
work.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoHACK: OMAP: DSS2: Fix OMAP2_DSS_USE_DSI_PLL
Tomi Valkeinen [Wed, 2 Mar 2011 08:06:48 +0000 (10:06 +0200)]
HACK: OMAP: DSS2: Fix OMAP2_DSS_USE_DSI_PLL

When using OMAP2_DSS_USE_DSI_PLL, which selects DSI PLL as source clock
for DISPC, the DSI needs the vdds_dsi regulator. Latest regulator
changes broke this, causing the the code to not acquire the regulator
when using OMAP2_DSS_USE_DSI_PLL.

This patch acquires the vdds_dsi regulator in dsi_pll_init(), fixing the
issue. This is is just a quick hack to get the OMAP2_DSS_USE_DSI_PLL
option working. There shouldn't be any other downside in this solution
than some extra lines of code.

OMAP2_DSS_USE_DSI_PLL is itself a big hack, and should be removed, and
the feature itself should be implemented in a more sane way. However,
the solution is not trivial, and people are using DSI PLL to get more
exact pixel clocks, so this hack is an acceptable temporary solution for
the time being.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: Use request / release calls in Taal for DSI Virtual Channels.
Archit Taneja [Tue, 1 Mar 2011 08:29:46 +0000 (13:59 +0530)]
OMAP: DSS2: Use request / release calls in Taal for DSI Virtual Channels.

Taal driver used to take a hard coded Macro for Virtual Channel and the VC_ID.
The Taal panel driver now requests for a Virtual channel through the
omap_dsi_request_vc() call in taal_probe().

The channel number returned by the request_vc() call is used for sending command
and data to the Panel. The DSI driver automatically configures the Virtual
Channel's source to either Video Port or L4 Slave port based on what the panel
driver is using it for.

The driver uses omap_dsi_release_vc() to free the VC specified by the panel.
taal_remove() or when a request_vc() call fails.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: Functions to request/release DSI VCs
Archit Taneja [Wed, 2 Mar 2011 07:05:53 +0000 (12:35 +0530)]
OMAP: DSS2: Functions to request/release DSI VCs

Introduce functions which request and release VC's. This will be used in panel
drivers in their probes.

omap_dsi_request_vc() takes in the pointer to the omap_dss_device, the VC_ID
parameter which goes into the header of the DSI packets, and returns a Virtual
channel number (or virtual channel register set) which it can use.

omap_dsi_set_vc_id() takes the omap_dss_device pointer, the Virtual Channel
number and the VC_ID that needs to be set for the specifed Virtual Channel.

omap_dsi_release_vc() takes the omap_dss_device pointer and the Virtual Channel
number that needs to be made free.

Initialisation of VC parameters is done in dsi_init().

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: Remove unneeded cpu_is_xxx checks
Tomi Valkeinen [Wed, 2 Mar 2011 10:48:35 +0000 (12:48 +0200)]
OMAP: DSS2: Remove unneeded cpu_is_xxx checks

cpu_is_omapxxx() was used previously to select the supported interfaces.
Now that the interfaces are platform devices, we no longer need to do
the check when registering the driver. Thus we can just remove the
checks.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: Move DPI & SDI init into DSS plat driver
Tomi Valkeinen [Wed, 2 Mar 2011 10:47:54 +0000 (12:47 +0200)]
OMAP: DSS2: Move DPI & SDI init into DSS plat driver

DPI and SDI are different from the other interfaces as they are not
hwmods and there is not platform driver for them. They could be said to
be a part of DSS or DISPC modules, although it's not a clear definition.

This patch moves DPI and SDI initialization into DSS platform driver,
making the code more consistent: omap_dss_probe() only initializes
platform drivers now.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: Remove pdev argument from dpi_init
Tomi Valkeinen [Wed, 2 Mar 2011 10:32:48 +0000 (12:32 +0200)]
OMAP: DSS2: Remove pdev argument from dpi_init

dpi_init() does not use the pdev argument for anything. Remove it.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: Remove FB_OMAP_BOOTLOADER_INIT support
Tomi Valkeinen [Wed, 2 Mar 2011 10:29:27 +0000 (12:29 +0200)]
OMAP: DSS2: Remove FB_OMAP_BOOTLOADER_INIT support

FB_OMAP_BOOTLOADER_INIT does not work, and it was only partially
implemented for SDI.

This patch removes support for FB_OMAP_BOOTLOADER_INIT to clean up the
code and to remove any assumptions that FB_OMAP_BOOTLOADER_INIT would
work.

Proper implementation is much more complex, requiring early boot time
register and clock handling to keep the DSS running.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP2PLUS: DSS2: DSI: Generalize DSI PLL Clock Naming
Archit Taneja [Thu, 24 Feb 2011 08:47:30 +0000 (14:17 +0530)]
OMAP2PLUS: DSS2: DSI: Generalize DSI PLL Clock Naming

DSI PLL output clock names have been made more generic. The clock name
describes what the source of the clock and what clock is used for. Some of
DSI PLL parameters like dividers and DSI PLL source have also been made more
generic.

dsi1_pll_fclk and dsi2_pll_fclk have been changed as dsi_pll_hsdiv_dispc_clk
and dsi_pll_hsdiv_dsi_clk respectively. Also, the hsdividers are now named
regm_dispc and regm_dsi instead of regm3 and regm4.

Functions and macros named on the basis of these clock names have also been
made generic.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP2PLUS: DSS2: Use dss features to get clock source names of current OMAP
Archit Taneja [Wed, 2 Mar 2011 06:27:25 +0000 (11:57 +0530)]
OMAP2PLUS: DSS2: Use dss features to get clock source names of current OMAP

Clock source names vary across OMAP2/3 and OMAP4, the clock source enum
names have been made generic in the driver, but for purposes of debugging
and dumping clock sources, it is better to preserve the actual TRM name of
the clock.

Introduce a dss feature function 'dss_feat_get_clk_source_name()' which
returns a string with the TRM clock name for the current OMAP in use. The OMAP
specific name is printed along the generic name within brackets.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP2PLUS: DSS2: Make members of dss_clk_source generic
Archit Taneja [Thu, 6 Jan 2011 05:14:10 +0000 (10:44 +0530)]
OMAP2PLUS: DSS2: Make members of dss_clk_source generic

The enum members of 'dss_clk_source' have clock source names specific to
OMAP2/3. Change the names to more generic terms such that they now describe
where the clocks come from and what they are used for.

Also, change the enum member names to have "DSS_CLK_SRC" instead of "DSS_SRC"
for more clarity.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP2PLUS: DSS2: FEATURES: Function to Provide the max fck supported
Archit Taneja [Tue, 1 Mar 2011 06:24:00 +0000 (11:54 +0530)]
OMAP2PLUS: DSS2: FEATURES: Function to Provide the max fck supported

The maximum supported frequency for DSS has increased from 173 to 186 Mhz on
OMAP4.

Introduce a dss feature function to get the max_fck to replace DISPC_MAX_FCK
macro.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP2PLUS: DSS2: FEATURES: DISPC overlay code cleanup
Archit Taneja [Wed, 2 Mar 2011 05:49:50 +0000 (11:19 +0530)]
OMAP2PLUS: DSS2: FEATURES: DISPC overlay code cleanup

Add dss_features and register fields to incorporate changes in DISPC pipelines
between OMAP3 and OMAP4.

Register fields added: FEAT_REG_HORIZONTALACCU, FEAT_REG_VERTICALACCU
DSS Features added: FEAT_LINEBUFFERSPLIT, FEAT_ROWREPEATENABLE, FEAT_RESIZECONF

_dispc_set_scaling() and _dispc_set_rotation_attrs() have been cleaned up.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoomapfb: Fix linker error in drivers/video/omap/lcd_2430sdp.c
Jarkko Nikula [Tue, 1 Mar 2011 08:40:37 +0000 (02:40 -0600)]
omapfb: Fix linker error in drivers/video/omap/lcd_2430sdp.c

There is a linker error from lcd_2430sdp.c if CONFIG_TWL4030_CORE is not
set. This can be triggered on OMAP2 builds when OMAP3 or OMAP4 are not set.

drivers/built-in.o: In function `sdp2430_panel_disable':
drivers/video/omap/lcd_2430sdp.c:123: undefined reference to `twl_i2c_write_u8'
drivers/video/omap/lcd_2430sdp.c:124: undefined reference to `twl_i2c_write_u8'
drivers/built-in.o: In function `sdp2430_panel_enable':
drivers/video/omap/lcd_2430sdp.c:110: undefined reference to `twl_i2c_write_u8'
drivers/video/omap/lcd_2430sdp.c:112: undefined reference to `twl_i2c_write_u8'

Fix this by selecting the TWL4030_CORE for MACH_OMAP_2430SDP when building
with CONFIG_FB_OMAP as there is no own Kconfig entry for lcd_2430 and it is
compiled always when both MACH_OMAP_2430SDP and FB_OMAP are set.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP2PLUS:DSS2: Use opt_clock_available from pdata
Semwal, Sumit [Tue, 1 Mar 2011 08:42:14 +0000 (02:42 -0600)]
OMAP2PLUS:DSS2: Use opt_clock_available from pdata

hwmod databases provide information about which optional clocks are available
for a given platform. This is available via a function pointer opt_clock_enable
in pdata.

Use this information during get/enable/disable/put of clocks.

Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP2PLUS:DSS2: add opt_clock_available in pdata
Semwal, Sumit [Tue, 1 Mar 2011 08:42:13 +0000 (02:42 -0600)]
OMAP2PLUS:DSS2: add opt_clock_available in pdata

Provide a function in pdata to allow dss submodules to check if a given
clock is available on a platform as an optional clock.

Signed-off-by: Senthilvadivu Guruswamy <svadivu@ti.com>
(based on implementation from Senthil)

Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: DSI: remove unused function
Tomi Valkeinen [Wed, 2 Jun 2010 12:09:37 +0000 (15:09 +0300)]
OMAP: DSS2: DSI: remove unused function

dsi_reset_tx_fifo() was not used. Furthermore, OMAP errata states that
TX FIFO flush is not functional, so the function wouldn't even have
worked.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: Remove unused list
Tomi Valkeinen [Thu, 28 Oct 2010 12:29:33 +0000 (15:29 +0300)]
OMAP: DSS2: Remove unused list

There was an unused list defined in display.c. Remove it.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: OMAPFB: Adding help for FB_OMAP_LCD_VGA option
Janorkar, Mayuresh [Thu, 24 Feb 2011 09:39:17 +0000 (03:39 -0600)]
OMAP: OMAPFB: Adding help for FB_OMAP_LCD_VGA option

CONFIG_FB_OMAP_LCD_VGA option is present in drivers/video/omap
There is no explaination about what this flag does.
Lets add information about it.

FB_OMAP_LCD_VGA flag sets resolution of display to VGA (640 X 480).
The default resolution of 3430 LDP is 320 X 240.

Signed-off-by: Mayuresh Janorkar <mayur@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: Check for SDI HW before accessing SDI registers
Tomi Valkeinen [Thu, 24 Feb 2011 12:18:50 +0000 (14:18 +0200)]
OMAP: DSS2: Check for SDI HW before accessing SDI registers

Only OMAP 3430 hardware has SDI support. The availability of SDI HW can
be found out by checking if the LCD channel supports SDI displays.

This patch checks for SDI HW support before accessing SDI registers,
which fixes a crash on OMAP4 when SDI SW support is compiled in.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: FEATURES: Remove DSI & SDI from OMAP2
Tomi Valkeinen [Thu, 24 Feb 2011 12:21:25 +0000 (14:21 +0200)]
OMAP: DSS2: FEATURES: Remove DSI & SDI from OMAP2

OMAP2 doesn't support SDI or DSI. Remove them from
omap2_dss_supported_displays.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: FEATURES: Remove SDI from 3630 displays
Tomi Valkeinen [Thu, 24 Feb 2011 12:20:31 +0000 (14:20 +0200)]
OMAP: DSS2: FEATURES: Remove SDI from 3630 displays

OMAP 3630 does not support SDI. Split omap3_dss_supported_displays into
3430 and 3630 entries, and remove the SDI from 3630 entry.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: Clean up a switch-case
Tomi Valkeinen [Thu, 24 Feb 2011 11:59:13 +0000 (13:59 +0200)]
OMAP: DSS2: Clean up a switch-case

Support for the display interface was checked in a separate switch-case.
There's no reason for that, and this patch handles the fail code path in
the same switch-case where the display initialization is done.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP2/3/4: DSS2: Enable Display SubSystem as modules
Samreen [Thu, 24 Feb 2011 06:26:40 +0000 (06:26 +0000)]
OMAP2/3/4: DSS2: Enable Display SubSystem as modules

Enabling all the display interface options to be built as module
And enabling all the display panels to be built as modules.

Signed-off-by: Samreen <samreen@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoMAINTAINERS: Update OMAP DSS maintainer
Tomi Valkeinen [Wed, 23 Feb 2011 14:34:17 +0000 (16:34 +0200)]
MAINTAINERS: Update OMAP DSS maintainer

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: Have separate irq handlers for DISPC and DSI
archit taneja [Wed, 23 Feb 2011 08:41:03 +0000 (08:41 +0000)]
OMAP: DSS2: Have separate irq handlers for DISPC and DSI

Currently, the core DSS platform device requests for an irq line for OMAP2 and
OMAP3. Make DISPC and DSI platform devices request for a shared IRQ line.

On OMAP3, the logical OR of DSI and DISPC interrupt lines goes to the MPU. There
is a register DSS_IRQSTATUS which tells if the interrupt came from DISPC or DSI.

On OMAP2, there is no DSI, only DISPC interrupts goto the MPU. There is no
DSS_IRQSTATUS register.

Hence, it makes more sense to have separate irq handlers corresponding to the
DSS sub modules instead of having a common handler.

Since on OMAP3 the logical OR of the lines goes to MPU, the irq line is shared
among the IRQ handlers.

The hwmod irq info has been removed for DSS to DISPC and DSI for OMAP2 and OMAP3
hwmod databases. The Probes of DISPC and DSI now request for irq handlers.

Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAPFB: Adding a check for timings in set_def_mode
Janorkar, Mayuresh [Tue, 22 Feb 2011 13:35:13 +0000 (07:35 -0600)]
OMAPFB: Adding a check for timings in set_def_mode

When omapfb.mode is passed through bootargs, when omapfb is setting mode,
it would check if timings passed are fine for panel attached to it.
It makes use of check_timing API provided by the panel.

In current code if check_timing API is not available for attached panel,
OMAPFB would return -EINVAL and BPP sent via bootargs will not have any effect.

In case of panels like TAAL panel, omapfb or any other driver should not be allowed to
change the timings. So bpps sent via bootargs will not have an effect.

In such case we can check only the x_res and y_res with the panels resolution
and if they match go ahead and set the bpps.
The bpp value sent via bootarg would have an effect.

Signed-off-by: Mayuresh Janorkar <mayur@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: Support for Samsung LTE430WQ-F0C
Tomi Valkeinen [Tue, 22 Feb 2011 14:39:47 +0000 (16:39 +0200)]
OMAP: DSS2: Support for Samsung LTE430WQ-F0C

Add support for Samsung LTE430WQ-F0C to panel-generic-dpi.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: Delay regulator_get() calls
Tomi Valkeinen [Tue, 22 Feb 2011 13:53:46 +0000 (15:53 +0200)]
OMAP: DSS2: Delay regulator_get() calls

DSS submodules DPI/SDI/DSI/VENC require a regulator to function.
However, if the board doesn't use, say, SDI, the board shouldn't need to
configure vdds_sdi regulator required by the SDI module.

Currently the regulators are acquired when the DSS driver is loaded.
This means that if the kernel is configured with SDI, vdds_sdi regulator
is needed for all boards.

This patch changes the DSS driver to acquire the regulators only when a
display of particular type is initialized. For example, vdds_sdi is
acquired when sdi_init_display() is called.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: DSS2: Fix def_disp module param description
Jani Nikula [Wed, 16 Feb 2011 10:53:44 +0000 (04:53 -0600)]
OMAP: DSS2: Fix def_disp module param description

MODULE_PARM_DESC() takes the name of the actual module parameter, not the
name of the variable, as input. Fix the module parameter description for
def_disp.

Signed-off-by: Jani Nikula <jani@nikula.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP4: DSS2: Add hwmod device names for OMAP4.
Mayuresh Janorkar [Thu, 27 Jan 2011 11:17:04 +0000 (11:17 +0000)]
OMAP4: DSS2: Add hwmod device names for OMAP4.

Add hwmod device names for OMAP4; this enables device build for omap4 dss
hwmod IPs.

Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
Signed-off-by: Mayuresh Janorkar <mayur@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP2PLUS: DSS2: Add OMAP4 Kconfig support
Mayuresh Janorkar [Wed, 16 Feb 2011 04:54:29 +0000 (22:54 -0600)]
OMAP2PLUS: DSS2: Add OMAP4 Kconfig support

Enable DSS2 and OMAPFB for OMAP4 in Kconfig

Signed-off-by: Mayuresh Janorkar <mayur@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP4: DSS2: clocks: Add ick as dummy clock
Sumit Semwal [Mon, 31 Jan 2011 16:27:46 +0000 (16:27 +0000)]
OMAP4: DSS2: clocks: Add ick as dummy clock

DSS code uses ick as one of the clocks in clk_get/clk_put. OMAP4 clock database
doesn't have ick for DSS, so adding ick as dummy clock.

This is needed for backward compatibility with OMAP2/3.

Once pm_runtime* APIs get introduced in DSS, this will be revisited.

Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP2PLUS: DSS2: Generalize external clock names in struct dss of dss.c
Archit Taneja [Mon, 31 Jan 2011 16:27:45 +0000 (16:27 +0000)]
OMAP2PLUS: DSS2: Generalize external clock names in struct dss of dss.c

The dss struct in dss.c has omap2/3 specific clock names. Making them generic,
to increase readability and extendability.

Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP2PLUS: DSS2: Generalize naming of PRCM related clock enums in DSS driver
Archit Taneja [Mon, 31 Jan 2011 16:27:44 +0000 (16:27 +0000)]
OMAP2PLUS: DSS2: Generalize naming of PRCM related clock enums in DSS driver

enum dss_clock structure is replaced with generic names that
could be used across OMAP2420, 2430, 3xxx, 44xx platforms.

Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP2PLUS: clocks: Align DSS clock names and roles
Sumit Semwal [Mon, 31 Jan 2011 16:27:43 +0000 (16:27 +0000)]
OMAP2PLUS: clocks: Align DSS clock names and roles

Currently, clock database has <dev, clock-name> tuples for DSS2. Because of
this, the clock names are different across different OMAP platforms.

This patch aligns the DSS2 clock names and roles across OMAP 2420, 2430, 3xxx,
44xx platforms in the clock databases, hwmod databases for opt-clocks, and DSS
clock handling.

This ensures that clk_get/put/enable/disable APIs in DSS can use uniform role
names.

Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
Acked-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP2,3: DSS2: Get DSS IRQ from platform device
Senthilvadivu Guruswamy [Wed, 16 Feb 2011 05:14:00 +0000 (23:14 -0600)]
OMAP2,3: DSS2: Get DSS IRQ from platform device

DSS IRQ number can be obtained from platform_get_irq().  This API in turn
picks the right IRQ number belonging to HW IP from the hwmod database.
So hardcoding of IRQ number could be removed.

This IRQ is stored in dss_irq as part of dss structure, and freed it in
dss_exit().

Reviewed-by: Paul Walmsley <paul@pwsan.com>
Reviewed-by: Kevin Hilman <khilman@ti.com>
Tested-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Senthilvadivu Guruswamy <svadivu@ti.com>
Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP2,3: DSS2: Use platform device to get baseaddr
Senthilvadivu Guruswamy [Mon, 24 Jan 2011 06:22:04 +0000 (06:22 +0000)]
OMAP2,3: DSS2: Use platform device to get baseaddr

DSS, DISPC, DSI, RFBI, VENC baseaddr can be obtained from platform_get_resource().
This API in turn picks the right silicon baseaddr from the hwmod database.
So hardcoding of base addr could be removed.

Reviewed-by: Paul Walmsley <paul@pwsan.com>
Reviewed-by: Kevin Hilman <khilman@ti.com>
Tested-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
Signed-off-by: Senthilvadivu Guruswamy <svadivu@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP2,3: DSS2: replace printk with dev_dbg in init
Sumit Semwal [Mon, 24 Jan 2011 06:22:03 +0000 (06:22 +0000)]
OMAP2,3: DSS2: replace printk with dev_dbg in init

This patch replaces printk's in the init/probe functions to dev_dbg
for boot time optimization.

Reviewed-by: Kevin Hilman <khilman@ti.com>
Tested-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP2, 3: DSS2: DSI: create platform_driver, move init, exit to driver
Senthilvadivu Guruswamy [Mon, 24 Jan 2011 06:22:02 +0000 (06:22 +0000)]
OMAP2, 3: DSS2: DSI: create platform_driver, move init, exit to driver

Hwmod adaptation design requires each of the DSS HW IP to be a platform driver.
So a platform_driver for DSI is created and init exit methods are moved from core.c
to its driver probe,remove. pdev member has to be maintained by its own drivers.

Also, vdds_dsi regulator handling is copied to dsi.c, since vdds_dsi regulator is
needed by dpi_init() too. Board files are updated accordingly to add 2 instances of
vdds_dsi regulator.

DSI platform driver is registered from inside omap_dss_probe, in the order desired.

Signed-off-by: Senthilvadivu Guruswamy <svadivu@ti.com>
Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP2, 3: DSS2: VENC: create platform_driver, move init, exit to driver
Senthilvadivu Guruswamy [Mon, 24 Jan 2011 06:22:01 +0000 (06:22 +0000)]
OMAP2, 3: DSS2: VENC: create platform_driver, move init, exit to driver

Hwmod adaptation design requires each of the DSS HW IP to be a platform driver.
So a platform_driver for VENC is created and init exit methods are moved from core.c
to its driver probe,remove. pdev member has to be maintained by its own drivers.

Also, venc_vdda_dac reading is moved to venc.c.

VENC platform driver is registered from inside omap_dss_probe, in the order desired.

Signed-off-by: Senthilvadivu Guruswamy <svadivu@ti.com>
Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP2, 3: DSS2: DISPC: create platform_driver, move init, exit to driver
Senthilvadivu Guruswamy [Mon, 24 Jan 2011 06:22:00 +0000 (06:22 +0000)]
OMAP2, 3: DSS2: DISPC: create platform_driver, move init, exit to driver

Hwmod adaptation design requires each of the DSS HW IP to be a platform driver.
So a platform_driver for DISPC is created and init exit methods are moved from core.c
to its driver probe,remove. pdev member has to be maintained by its own drivers.

DISPC platform driver is registered from inside omap_dss_probe, in the order desired.

Signed-off-by: Senthilvadivu Guruswamy <svadivu@ti.com>
Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP2, 3: DSS2: RFBI: create platform_driver, move init, exit to driver
Senthilvadivu Guruswamy [Mon, 24 Jan 2011 06:21:59 +0000 (06:21 +0000)]
OMAP2, 3: DSS2: RFBI: create platform_driver, move init, exit to driver

Hwmod adaptation design requires each of the DSS HW IP to be a platform driver.
So a platform_driver for RFBI is created and init exit methods are moved from core.c
to its driver probe,remove. pdev member has to be maintained by its own drivers.

RFBI platform driver is registered from inside omap_dss_probe, in the order desired.

Signed-off-by: Senthilvadivu Guruswamy <svadivu@ti.com>
Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP2, 3: DSS2: Move clocks from core driver to dss driver
Senthilvadivu Guruswamy [Mon, 24 Jan 2011 06:21:58 +0000 (06:21 +0000)]
OMAP2, 3: DSS2: Move clocks from core driver to dss driver

All clock management is moved to dss platform driver. clk_get/put APIs use
dss device instead of core platform device.

Hwmod adaptation design requires each of the DSS HW IP to be a platform driver.
So the device name is changed from omapdss to omapdss_dss in 2420, 2430,
3xxx clock database files. Now the core driver "omapdss" only takes care
of panel registration with the custom bus.
core driver also uses the clk_enable() / clk_disable() APIs exposed by DSS for
clock management.
DSS driver would do clock management of clocks needed by DISPC, RFBI, DSI, VENC

TODO:  The clock content would be adapted to omap_hwmod in a seperate series.

Signed-off-by: Senthilvadivu Guruswamy <svadivu@ti.com>
Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP2, 3: DSS2: DSS: create platform_driver, move init, exit to driver
Senthilvadivu Guruswamy [Mon, 24 Jan 2011 06:21:57 +0000 (06:21 +0000)]
OMAP2, 3: DSS2: DSS: create platform_driver, move init, exit to driver

Hwmod adaptation design requires each of the DSS HW IP to be a platform driver.
So a platform_driver of DSS is created and init exit methods are moved from core.c
to its driver probe,remove. pdev member has to be maintained by its own drivers.

DSS platform driver is registered from inside omap_dss_probe, in the order desired.

Signed-off-by: Senthilvadivu Guruswamy <svadivu@ti.com>
Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP2,3: DSS2: Build omap_device for each DSS HWIP
Senthilvadivu Guruswamy [Mon, 24 Jan 2011 06:21:56 +0000 (06:21 +0000)]
OMAP2,3: DSS2: Build omap_device for each DSS HWIP

Looks up the hwmod database for each of the given DSS HW IP and builds
omap_device which inturn does the platform device register for each of DSS HW IP

Signed-off-by: Senthilvadivu Guruswamy <svadivu@ti.com>
Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP2, 3: DSS2: remove forced clk-disable from omap_dss_remove
Sumit Semwal [Mon, 24 Jan 2011 06:21:48 +0000 (06:21 +0000)]
OMAP2, 3: DSS2: remove forced clk-disable from omap_dss_remove

As part of omap hwmod changes, DSS will not be the only controller of its
clocks. hwmod initialization also enables the interface clocks, and
manages them.
So, when DSS is built as a module, omap_dss_remove doesn't try to disable
all clocks that have a higher usecount.

Reviewed-by: Kevin Hilman <khilman@ti.com>
Tested-by: Kevin Hilman <khilman@ti.com>
Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoOMAP: 3430SDP: Remove unused vdda_dac supply
Tomi Valkeinen [Thu, 24 Feb 2011 07:02:28 +0000 (09:02 +0200)]
OMAP: 3430SDP: Remove unused vdda_dac supply

Remove extra vdda_dac supply definition. It was a leftover from conflict
resolution.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
13 years agoMerge branch 'for_2.6.39/pm-misc' of ssh://master.kernel.org/pub/scm/linux/kernel...
Tony Lindgren [Fri, 11 Mar 2011 02:54:14 +0000 (18:54 -0800)]
Merge branch 'for_2.6.39/pm-misc' of ssh:///linux/kernel/git/khilman/linux-omap-pm into omap-for-linus

13 years agoOMAP3: PM: Clear the SCTLR C bit in asm code to prevent data cache allocation
Santosh Shilimkar [Sun, 23 Jan 2011 17:21:09 +0000 (22:51 +0530)]
OMAP3: PM: Clear the SCTLR C bit in asm code to prevent data cache allocation

On the newer ARM processors like CortexA8, CortexA9, the caches can be
speculatively loaded while they are getting flushed.

Clear the SCTLR C bit to prevent further data cache allocation as
part of cache clean routine

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
13 years agoOMAP3: PM: Remove un-necessary cp15 registers form low power cpu context
Santosh Shilimkar [Sun, 23 Jan 2011 16:07:03 +0000 (21:37 +0530)]
OMAP3: PM: Remove un-necessary cp15 registers form low power cpu context

The current code saves few un-necessary registers which are read-only or
write-only, unused CP15 registers.

Remove them and keep only necessary CP15 registers part of
low power context save/restore.

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
13 years agoOMAP3: PM: Allow the cache clean when L1 is lost.
Santosh Shilimkar [Sun, 23 Jan 2011 14:03:53 +0000 (19:33 +0530)]
OMAP3: PM: Allow the cache clean when L1 is lost.

When L1 cache is suppose to be lost, it needs to be cleaned before
entrering to the low power mode.

While at this, also fix few comments and remove un-necessary
clean_l2 lable.

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
13 years agoOMAP3: PM: Fix the MMU on sequence in the asm code
Santosh Shilimkar [Sun, 23 Jan 2011 10:34:39 +0000 (16:04 +0530)]
OMAP3: PM: Fix the MMU on sequence in the asm code

Add necessary barriers after enabling MMU. Also use the sane way to
load pc and jump to it instead of executing ldma first up.

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
13 years agoOMAP3: PM: Use ARMv7 supported instructions instead of legacy CP15 ones
Santosh Shilimkar [Sun, 23 Jan 2011 13:30:34 +0000 (19:00 +0530)]
OMAP3: PM: Use ARMv7 supported instructions instead of legacy CP15 ones

On ARMv7 dsb, dmb instructions are supported and can be used directly
instead of their cp15 equivalnet. Also remove the opcodes for smc
and use the available instruction directly in OMAP3 low power asm code

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
13 years agoOMAP2+: smartreflex: remove SR debug directory in omap_sr_remove()
Anand S Sawant [Thu, 17 Feb 2011 15:57:30 +0000 (21:27 +0530)]
OMAP2+: smartreflex: remove SR debug directory in omap_sr_remove()

omap_sr_probe() creates the smartreflex debug directory and its
underlying nvalue debug directory. These directories are removed in
omap_sr_remove().

Basic smartreflex functionality tested on OMAP3630 Zoom3 & OMAP4430 SDP

Signed-off-by: Anand S Sawant <sawant@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
13 years agoARM: omap3: Thumb-2 compatibility for sleep34xx.S
Dave Martin [Fri, 4 Mar 2011 15:33:57 +0000 (15:33 +0000)]
ARM: omap3: Thumb-2 compatibility for sleep34xx.S

 * Build unconditionally as ARM for correct interoperation with
   OMAP firmware.

 * Fix an out-of-range ADR when building for ARM.

 * Remove deprecated PC-relative stores.

 * Add the required ENDPROC() directive for each ENTRY().

 * .align before data words.

 * Handle non-interworking return from v7_flush_dcache_all.

Signed-off-by: Dave Martin <dave.martin@linaro.org>
Signed-off-by: Kevin Hilman <khilman@ti.com>
13 years agoARM: omap3: Thumb-2 compatibility for sram34xx.S
Dave Martin [Fri, 4 Mar 2011 15:33:56 +0000 (15:33 +0000)]
ARM: omap3: Thumb-2 compatibility for sram34xx.S

 * Build unconditionally as ARM for correct interoperation with
   OMAP firmware.

 * Remove deprecated PC-relative stores

 * Add the required ENDPROC() directive for each ENTRY().

 * .align before data words

Signed-off-by: Dave Martin <dave.martin@linaro.org>
Tested-by: Jean Pihet <j-pihet@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
13 years agoARM: omap3: Remove hand-encoded SMC instructions
Dave Martin [Fri, 4 Mar 2011 15:33:55 +0000 (15:33 +0000)]
ARM: omap3: Remove hand-encoded SMC instructions

For various reasons, Linux now only officially supports being built
with tools which are new enough to understand the SMC instruction.

Replacing the hand-encoded instructions when the mnemonic also
allows for correct assembly in Thumb-2 (otherwise, the result is
random data in the middle of the code).

The Makefile already ensures that this file is built with a high
enough gcc -march= flag (armv7-a).

Signed-off-by: Dave Martin <dave.martin@linaro.org>
Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Tested-by: Jean Pihet <j-pihet@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
13 years agoARM: omap4: Convert END() to ENDPROC() for correct linkage with CONFIG_THUMB2_KERNEL
Dave Martin [Fri, 4 Mar 2011 15:33:54 +0000 (15:33 +0000)]
ARM: omap4: Convert END() to ENDPROC() for correct linkage with CONFIG_THUMB2_KERNEL

Code marked with ENTRY() also needs a matching ENDPROC() directive,
in order to ensure that the type and instruction set of the
symbol are correctly annotated.

ENDPROC() tags the affected symbol as a function symbol, which will
ensure that link-time fixups don't accidentally switch to the
wrong instruction set.

Signed-off-by: Dave Martin <dave.martin@linaro.org>
Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
13 years agoARM: omap4: Provide do_wfi() for Thumb-2
Dave Martin [Fri, 4 Mar 2011 15:33:53 +0000 (15:33 +0000)]
ARM: omap4: Provide do_wfi() for Thumb-2

For CONFIG_THUMB2_KERNEL, the existing definition of do_wfi() will
insert invalid code into the instruction stream.

Any assembler which can assemble Thumb-2 is guaranteed to accept
the "wfi" mnemonic, so for the Thumb-2 case, just use the mnemonic.

The ARM case is left as-is.

Signed-off-by: Dave Martin <dave.martin@linaro.org>
Signed-off-by: Kevin Hilman <khilman@ti.com>
13 years agoOMAP3: PM: Initialize IVA only if available
Sanjeev Premi [Fri, 25 Feb 2011 13:27:20 +0000 (18:57 +0530)]
OMAP3: PM: Initialize IVA only if available

IVA device is not present in many OMAP3 variants.

This patch ensures that initialization is tied to
the presence of IVA on the device.

Signed-off-by: Sanjeev Premi <premi@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
13 years agoOMAP3: PM: Set/clear T2 bit for Smartreflex on TWL
Thara Gopinath [Tue, 15 Feb 2011 07:58:58 +0000 (13:28 +0530)]
OMAP3: PM: Set/clear T2 bit for Smartreflex on TWL

Voltage control on TWL can be done using VMODE/I2C1/I2C_SR.
Since almost all platforms use I2C_SR on omap3, omap3_twl_init by
default expects that OMAP's I2C_SR is plugged in to TWL's I2C
and calls omap3_twl_set_sr_bit. On platforms where I2C_SR is not connected,
the board files are expected to call omap3_twl_set_sr_bit(false) to
ensure that I2C_SR path is not set for voltage control and prevent
the default behavior of omap3_twl_init.

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Thara Gopinath <thara@ti.com>
Signed-off-by: Shweta Gulati <shweta.gulati@ti.com>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Kevin Hilman <khilman@ti.com>
13 years agoomap3: cpuidle: Add description field to each C-state.
Santosh Shilimkar [Fri, 11 Feb 2011 15:12:12 +0000 (20:42 +0530)]
omap3: cpuidle: Add description field to each C-state.

Add a description field to each idle C-state. This helps to give
better data with PowerTop and one don't have to refer to the code
to link what Cx means from system point of view while analysing
PowerTop data.

No functional change.

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Kevin Hilman <khilman@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
13 years agoomap3: pm: Use exported set_cr() instead of a custom one.
Santosh Shilimkar [Fri, 11 Feb 2011 15:12:11 +0000 (20:42 +0530)]
omap3: pm: Use exported set_cr() instead of a custom one.

Remove the custom restore_control_register() and use the exported
set_cr() instead to set the system control register(SCTRL) value.

No functional change.

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Kevin Hilman <khilman@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
13 years agoOMAP2/3: PM: remove unnecessary wakeup/sleep dependency clear
Paul Walmsley [Thu, 27 Jan 2011 09:52:55 +0000 (02:52 -0700)]
OMAP2/3: PM: remove unnecessary wakeup/sleep dependency clear

The OMAP2 and OMAP3 PM code clears clockdomain wakeup and sleep
dependencies.  This is unnecessary after commit
6f7f63cc9adf3192e6fcac4e8bed5cc10fd924aa ("OMAP clockdomain:
initialize clockdomain registers when the clockdomain layer starts")
which clears these dependencies during clockdomain init.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
13 years agoOMAP2+: remove unused UART base addresses from omap_globals
Kevin Hilman [Fri, 21 Jan 2011 22:30:15 +0000 (14:30 -0800)]
OMAP2+: remove unused UART base addresses from omap_globals

Now that omap_hwmod + omap_device is used for OMAP UART device and
driver code, we no longer need the UART physical addresses in
omap_globals.

Note that the #defines for the base addresses are still left in
<plat/serial.h> since they are used by DEBUG_LL and uncompress code.

Build tested for OMAP1 (omap1_defconfig) and OMAP2+ (omap2plus_defconfig)

Signed-off-by: Kevin Hilman <khilman@ti.com>
13 years agoOMAP: PM: SmartReflex: fix potential NULL dereference
Vasiliy Kulikov [Wed, 19 Jan 2011 12:57:22 +0000 (15:57 +0300)]
OMAP: PM: SmartReflex: fix potential NULL dereference

kzalloc() may fail, if so return -ENOMEM.  Also Walter Harms suggested
to use kasprintf() instead of kzalloc+strcpy+strcat.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
13 years agoOMAP3: beagle xm: enable up to 800MHz OPP
Nishanth Menon [Fri, 7 Jan 2011 15:41:13 +0000 (09:41 -0600)]
OMAP3: beagle xm: enable up to 800MHz OPP

OMP3630 silicon can enable higher frequencies only depending on the board
characteristics meeting the recommended standards, and has to be selectively
toggled.

Beagle XM uses 3730 variant and the board design allows enabling 800MHz and
1GHz OPPs. However, We need Smart reflex class 1.5 and ABB to enable 1GHz
safely.  For the moment, we tweak the default table to allow for 800Mhz OPP
usage.

Reported-by: Koen Kooi <koen@beagleboard.org>
Tested-by: Koen Kooi <koen@beagleboard.org>
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>