OMAP: Serial: Fix build error in omap_serial_check_wakeup

Fix error:
arch/arm/mach-omap2/serial.c:202: error: expected ';', ',' or ')' before 'struct'
arch/arm/mach-omap2/serial.c: In function 'omap_serial_board_init':
arch/arm/mach-omap2/serial.c:400: error: implicit declaration of function 'omap_serial_check_wakeup'

Change-Id: I3c6ac8e8e41888b5bdad7a63fd83c37f16057b86
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
OMAP: OMAPFB: Enable disabled displays on FB_UNBLANK

Correspondingly, disable displays if suspend is not implemented
on FB_BLANK.

ported from:
   p-android-omap-3.0:bc3cadf42 [Lajos Molnar <molnar@ti.com>]

Change-Id: I82eb334045f0fe4fc31f01f367d1cd7d24330f9d
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: Riazantsev Volodymyr <v.riazantsev@ti.com>
ARM: OMAP4: twl-common: Configure resource "clk32kg" as always_on

Configure resource "clk32kg" as always_on by default.
This resource is used for the WiLink and should always be enabled.

Previous patch that added this functionality was lost when merging.

Change-Id: I025be2eada91fcff4bd9ea58e1fe00cdb9545563
Signed-off-by: Oleksandr Tyshchenko <oleksandr.tyshchenko@ti.com>
OMAP4: Platfrom: Add OMAP44XX SDP4430 HDMI support

Adding HDMI support for OMAP44XX SDP4430.

Based on k3.0 commits:
p-android-omap-3.0: 9a9016832d [Mythri P K <mythripk@ti.com>]
p-android-omap-3.0: 78a1ad8f12 [Tomi Valkeinen <tomi.valkeinen@ti.com>]

Change-Id: Ie5c8c38e937739c6d59a8b78ad72477ea9140761
Signed-off-by: Alexander Savchenko <oleksandr.savchenko@ti.com>
OMAP4:HDMI: Device can't boot with HDMI cable plugged

Enabling DSS interface clock to prevent kernel crash
on boot when HDMI cable is plugged.

Change-Id: Ibc8f487bad4429519162c73ef6459e574ec54c12
Signed-off-by: Vadym Shovkoplias <shovkoplias.vadym@ti.com>
Signed-off-by: Volodymyr Mieshkov <volodymyr.mieshkov@ti.com>
ARM: OMAP4: HWMOD: Don't reset DSP IP on boot.

On IP reset, SW running on DSP as to execute sleep instruction
(aka WFI on ARM) to enter sleep state. Since there is no SW
running on DSP module continues to be ON, thus preventing
OFFmode entry.

Change-Id: Id7dba5dd06e2d6c704a23d05cf29d4685d836d54
Signed-off-by: Ambresh K <ambresh@ti.com>
Signed-off-by: Praveen BP <bp.praveen@samsung.com>
Signed-off-by: Vinay Chaurasia <vinaych@ti.com>
OMAP5:DWC3: Updation of dwc3 mode.

The "mode" of operation is changed from various places
- Via a debugfs entry
- At init
The right place for the dwc->mode to get updated is in the dwc3_set_mode()
function so that the real mode and dwc->mode are always the same.

Change-Id: I38c7dcca758e63d87652f488cb361aad204a5936
Signed-off-by: Ruchika Kharwar <ruchika@ti.com>
DWC3: OTG: Register offset correction

Correction of a few register offsets.

Change-Id: I24dd255984f568322fce4377b09268e946753cc8
Signed-off-by: Ruchika Kharwar <ruchika@ti.com>
TEMP WA:OMAP: SAR: save USB UHH context conditionally

This patch adds support for SAR module / entry flags to the core code.
Support for SAR_SAVE_COND and SAR_INVALID flags is added at this point.
SAR_SAVE_COND is needed for fixing a USB UHH related bug, where the
save-and-restore context can be corrupted if the device enters off mode
repeatedly.

This errata exists on all OMAP4 and 5 variants.
The next version of this errata fix is expected to be in the scope of the
EHCI driver.

Portions of the patch are ported from this commit id on K3.0

(From b5edcef7f15a12302b9cecb13478955641cb8d2d Mon Sep 17 00:00:00 2001
From: Jon Hunter <jon-hunter@ti.com>
Date: Tue, 6 Mar 2012 17:30:58 -0600
Subject: [PATCH] ARM: OMAP4: USB: Update workaround for USB errata i719

Due to USB errata i719 the USB host save-and-restore context can be corrupted
if the device enters off mode more than two times without enabling the USB
host controller in between.

The corruption is occuring during the software save of the USB context which
occurs on entry to every off mode attempt. To avoid this problem only save the
USB context if the USB host controller has been enabled since the previous off
mode attempt. We do not need to save the USB context on every entry to off mode
if the USB controller has not been enabled.

Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Signed-off-by: Volodymyr Riazantsev <v.riazantsev@ti.com>
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@ti.com>
)

Change-Id: I7cbdc1915e3208c6f63a8137236d63fceed45111
Signed-off-by: Ruchika Kharwar <ruchika@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
OMAP5: CM2: Resolve register offset difference

OMAP5 ES1 and ES2 have different register offsets for this register.

Change-Id: I0e598f64bdb8f32a84f7ae16717d58ae1b2441d4
Signed-off-by: Ruchika Kharwar <ruchika@ti.com>
omap2plus: defconfig: Enable ARM Errata 761171

below commit accidentally removed ARM Errata 761171 enablement
commit 83a4af6f0c4d5ce5d9580f76c9963bbb608e0f63
Author: Subramaniam C.A <subramaniam.ca@ti.com>
defconfig: select rpmsg and remote proc component as modules
--

This patch re-enables back ARM errata 761171

Change-Id: I0043382e1d8db2ac83f6ef2dbf8285a582a5ba2d
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
Merge branch 'p-linux-omap-3.4' into p-android-omap-3.4

* p-linux-omap-3.4:
  omap2plus: defconfig: Enable ARM Errata 761171
  OMAP5: CM2: Resolve register offset difference
  TEMP WA:OMAP: SAR: save USB UHH context conditionally
  DWC3: OTG: Register offset correction
  OMAP5:DWC3: Updation of dwc3 mode.
  ARM: OMAP4: HWMOD: Don't reset DSP IP on boot.
  OMAP: OMAPFB: Enable disabled displays on FB_UNBLANK
  OMAP: Serial: Fix build error in omap_serial_check_wakeup

Change-Id: I81ef3cc8dcb0cf5467ad839f821787275fb4c0f9
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
android_defconfig: ARM: CORTEX-A15: Enable Errata 761171

Enable ARM Errata ARM_ERRATA_761171 in android defconfig

Change-Id: Ie9969fed09eafef3975bd72940d9f5f5c0f25bff
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
ARM: OMAP3+: mux: fix omap_mux_mode_gpio() function definition

Specified function was defined under CONFIG_OMAP_MUX, but
used in both cases - when CONFIG_OMAP_MUX is defined and not.
This caused a build error when CONFIG_OMAP_MUX is not defined.
Now fix this.

Change-Id: I20dab4fda9780ace508d1c381be8710229c659bb
Signed-off-by: Andrii.Tseglytskyi <andrii.tseglytskyi@ti.com>
ARM: OMAP54XX: distribute function declaration for OMAP5

This is needed for Zebu minimal defconfig. In omap_5430zebu_defconfig
configuration file only ARCH_OMAP5 option is defined, therefore
compile time error occurs. Now fixed.

Change-Id: Ia8c2a37457fc0d423ea3d55cb1744c3efb176871
Signed-off-by: Andrii.Tseglytskyi <andrii.tseglytskyi@ti.com>
ARM: OMAP2+: twl-common: remove header inclusion flag

commit 1ab832871093884e9d8e4971ebc244733baaf9a9
(ARM: OMAP5: Board file changes to enable Palmas)
introduced palmas specific header inclusion. However, the
palmas header is common included for generic twl code, it is
upto the board files to invoke the same as needed based on
type of Palmas or platform  PMIC used.

Change-Id: I2154b89805242a2ac23f9f9f466563552e962ef7
Reported-by: Andrii.Tseglytskyi <andrii.tseglytskyi@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Merge branch 'p-linux-omap-3.4' into p-android-omap-3.4

* p-linux-omap-3.4:
  ARM: OMAP2+: twl-common: remove header inclusion flag
  ARM: OMAP54XX: distribute function declaration for OMAP5
  ARM: OMAP3+: mux: fix omap_mux_mode_gpio() function definition

Change-Id: I265183f2d396fb5ca644932c320c0be5ea8d9d43
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
ARM: OMAP3630: add PRM register definitions for ABB

OMAP3630 supports an Adaptive Body-Bias(ABB) LDO as well as some MPU
interrupts related to voltage control that are not present on OMAP34XX.
This patch adds the offsets, register addresses, bitfield shifts and
masks to support this feature.

Change-Id: I0a75ca1171c956bc6c5a689b770bb7d304825427
Signed-off-by: Mike Turquette <mturquette@ti.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
[andrii.tseglytskyi@ti.com: rebased to K3.4]
Signed-off-by: Andrii Tseglytskyi <andrii.tseglytskyi@ti.com>
ARM: OMAP3+: add ABB PRM_IRQSTATUS handlers

Some PRM_IRQSTATUS registers contain a bit to signal that an ABB LDO
transition has completed.  These tranxdone bits exist for every instance
of an ABB LDO; thus these tranxdone bits are supported on 36xx variants
for the MPU voltage domain, and on 44xx variants for the MPU and IVA
voltage domains.

This patch introduces some data structures and helper functions for
checking on and clearing the TRANXDONE bits.  They are a copy-paste of
existing VP functions of similar nature and will be used in forthcoming
patches that control the ABB programming sequence during a DVFS
transition.

Some previous discussion on the design of the ABB PRM handlers can be
found here:
http://article.gmane.org/gmane.linux.ports.arm.omap/63609

Change-Id: I85c8845d8bf717642f8230067db2ff7515a238b5
Signed-off-by: Mike Turquette <mturquette@ti.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
[andrii.tseglytskyi@ti.com: rebased to K3.4]
Signed-off-by: Andrii Tseglytskyi <andrii.tseglytskyi@ti.com>
ARM: OMAP3+: Adaptive Body-Bias structures & data

Starting with OMAP36XX, some voltage domains have an LDO for biasing
voltage to the transistors within that domain.

This LDO has three modes of operation.  The first is Forward Body-Bias
mode (FBB) which boosts performance of transistors at high OPPs by
providng a positive voltage bias.  This comes at a cost of power.

The second mode is Reverse Body-Bias or RBB.  This mode provides a
negative voltage bias which saves on static leakage at lower OPPs.

Finally ABB can also be bypassed (the default state) in which case it
will just follow the voltage of the VP/VC.

This patch introduces the data structures needed to represent the ABB
LDOs in the voltage layer, and populates the appropriate data for 3630
and OMAP4.

Not all voltage domains have an ABB LDO; on OMAP36XX the CORE voltage
domain does not have an ABB ldo, and there are none on OMAP34xx.  In
such cases the voltage data will be marked with OMAP_ABB_NO_LDO.

Change-Id: If51fe172c78b2e20933c80a5f62709bd6fbcfad9
Signed-off-by: Mike Turquette <mturquette@ti.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
[andrii.tseglytskyi@ti.com: rebased to K3.4, add OMAP5 data, RBB support]
Signed-off-by: Andrii Tseglytskyi <andrii.tseglytskyi@ti.com>