OMAP4460: OPP fix Nitro/NitroSB margins

Nitro and NitroSB require 0mV s/w margin to be added.

Based on Data Manual Operating Condition Addendum v0.5 for 4460
(March 2011)

Change-Id: I1802b6ae71177b3ee92106408322c43c06b6ff55
Signed-off-by: Nishanth Menon <nm@ti.com>
OMAP3630+: SmartReflex 1p5: remove voltage clamp down

Vnom is almost never an exact multiple of PMIC voltage used.
Depending on age, process and PMIC used, it is possible that
the safe adjusted voltage after SR calibration and convergence
is higher than Vnom on few OPPs on certain corner lot samples.

By clamping down on voltage, we essentially force the voltage
to a lower than safe value which can result in not enough
margin on the sample for that specific OPP resulting in device
failures.

Change-Id: I6ce2d1a87a512364c9c278c84ebaa76f7575cf08
Reported-by: Michael Wagner <mwagner@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
OMAP4:tablet: enable tc358765 i2c slave interface

Blaze tablet has tc358765 DSI to LVDS converter, that can provide register
access via i2c slave interface. It's preferred way of register access, as
it doesn't cause contentions on DSI lanes.

Change-Id: I99ca8b54ec5e4b806a9466d060158be2af54dd8c
Signed-off-by: Sergiy Kibrik <sergiy.kibrik@globallogic.com>
Enable CONFIG_NETFILTER_XT_MATCH_QTAGUID

Enabling android native socket tag mechanism.
This change will fix network streaming and enable statistics.

Signed-off-by: Roman Shaposhnikov <x0166637@ti.com>
Change-Id: I5f16197d20ff0735547ea280217c98040d87f3c4
gcx: add debugfs feature

Change-Id: I8171fe2788ad7661ea133979e76155cd3d080ab1
Signed-off-by: Craig Stout <craig.stout@ti.com>
gcx: driver cleanup, corrected structure size validation

Change-Id: I3cff33bca512c5485ff7b327642a715a92316cb8
Signed-off-by: David Sin <davidsin@ti.com>
Signed-off-by: Rick Tillery <rtillery@ti.com>
gcx: added zoned debug printing.

Change-Id: I449393e1c1566a646ac3ef0920a8b471203df784
Signed-off-by: Alexei Shlychkov <ashlychkov@vivantecorp.com>
gcx: fixed command buffer overrun.

Change-Id: Idfbb3b199cd40eb7df81532425c98c1c98b208fb
Signed-off-by: Alexei Shlychkov <shlychkov@gmail.com>
gcx: fixed missed blits when batchflags=0.

Change-Id: I9044fa8edb5167d1f8d304e283c6499f28d0e0ae
Signed-off-by: Alexei Shlychkov <shlychkov@gmail.com>
gcx: use uncached memory for command buffer.

currently, we are using cached mem for the cmdbuf,
which requires expensive flush calls before queuing to the 2d hw.

Change-Id: Ib4bbb1979c9329a7937a10105d7e82ad4f096cf7
Signed-off-by: David Sin <davidsin@ti.com>
OMAP4: battery: fix temperature conversion.

Battery driver reads ADC channel 1 to wich NTC resistor
is connected to detect battery temperature.
There is a table that matches ADC value to temperature.
The driver, for looking corresponding temperature uses
ADC value converted to millivolts, instead of ADC value,
which is incorrect.
Use ADC value for temperature conversion.

Change-Id: I25812a4f3d94ce971475546145803513e346dd9a
Signed-off-by: Oleksandr Kozaruk <oleksandr.kozaruk@ti.com>
blaze_defconfig: fix tethering related configurations

Some config options were missed for tethering.
Enabling them back after syncing with ICS kernel.

Change-Id: I53e081c2ca22b9c95eef435fa51e6de0ee023880
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
omap: remoteproc: fix a compilation error on autosuspend disable

The patch,
"omap: remoteproc: set the load boot address in activate function",
introduced a compilation error when the remoteproc autosuspend is
disabled from the kernel menuconfig.

drivers/remoteproc/omap_remoteproc.c: In function 'omap_rproc_activate':
drivers/remoteproc/omap_remoteproc.c:191: error: 'struct omap_rproc_priv' has no member named 'bootaddr'
drivers/remoteproc/omap_remoteproc.c: In function 'omap_rproc_start':
drivers/remoteproc/omap_remoteproc.c:470: error: 'struct omap_rproc_priv' has no member named 'bootaddr'
make[2]: *** [drivers/remoteproc/omap_remoteproc.o] Error 1
make[1]: *** [drivers/remoteproc] Error 2
make: *** [drivers] Error 2

The same has been fixed.

Change-Id: I99506d6d30724e51a0325762d9ba2dff533fe852
Reported-by: Mihail Dobrev <x0099086@ti.com>
Signed-off-by: Miguel Vadillo <vadillo@ti.com>
rpmsg: omx: return actual user-provided bytes written in write

The 'write' system call is expected to return the number of bytes
written back to userspace. The rpmsg omx driver adds a small packet
header when sending a message to the remote processor, and is
currently returning this header length as well in the driver's write
fop function. This results in the write call always returning more
bytes than what the user has requested. The header length is now
left out of the bytes returned back.

Change-Id: I7132001fbc6fb34d01913bb3c30f455626c91658
Signed-off-by: Suman Anna <s-anna@ti.com>
remoteproc: export rproc_da_to_pa function

The rproc_da_to_pa function has been converted from an internal
function to a public function. The function's signature is also
modified to be similar to its counter-part and already exported
function, rproc_pa_to_da.

Change-Id: I30492e90ea839124483b7eefd41cb8bec45065ce
Signed-off-by: Suman Anna <s-anna@ti.com>
rpmsg: kconfig: add a dependency with remoteproc in rpmsg_omx

Due to the use of the rproc_pa_to_da API's in rpmsg_omx, now
this module depends on remoteproc directly. So a dependency
needs to be added in kconfig to avoid breaking the build
when disabling remoteproc driver.

Change-Id: Ife9b3ec20154ddf24cc0f7a5241dd13b08440101
Signed-off-by: Juan Gutierrez <jgutierrez@ti.com>
omap4: hdmi: adding a macro for acr wa dependency with rpmsg and ipu

Hdmi acr workaround is based on the creation of an rpmsg channel
to start/stop the workaround in the ipu remote processor. If the ipu
remoteproc or rpmsg are disabled by menu config, the build is broken.

This patch adds a macro for disabling hdmiwa in the case of rpmsg
or remoteproc_ipu are disabled.

Change-Id: I1618d886d16ffe0c07b810e6e1fd678debc547cd
Signed-off-by: Juan Gutierrez <jgutierrez@ti.com>
remoteproc: get suspend address from resource table

The suspend address is used as a flag to check if the remoteproc
has actually suspended. The address could vary according to the
memory map in the remoteproc. Changing the memory map in the
remote processor changes the value of the suspend address.
Passing the address in the resource table information avoids
hardcoding the value in the platform data of the remoteproc.
The value is instead assigned while parsing the resource table.

Change-Id: I698b81d61d391af85bc1556d2abc4c407c1db018
Signed-off-by: Juan Gutierrez <jgutierrez@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
serial_core: used uninitialized termios when port-tty is unset

There is no reason to pass the termios struct to the
uport->ops->set_termios() when it is filled with zeros.

It leads to corruption of uart registers.

Change-Id: I2cc2c07c3ada6caf35b93d69ac9949b99ca145a5
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
ARM:OMAP4:Temp Sensor: Define TALERT_IRQ as High level interrupt sensitive

The thermal alert IRQ is registered as a threaded IRQ with TRIGGER_RISING and
ONESHOT flags.
This means that omap_talert_irq_handler() IRQ handler will be called upon a
rising edge of the T_ALERT (HW signal coming from HW comparison of current
temperature with hot & cold thresholds).
This means also that the irq line is disabled until the threaded handler has
been run (due to ONESHOT flag): the T_ALERT IRQ is masked at GIC level during
the threaded handler execution.
Any new thermal event occurring during the execution of the threaded handler
will not be detected. This may occur if OMAP on-die temperature variations are
fast and if the T_ALERT IRQ handler is delayed by higher priority interrupts.
Finally, the thermal governor is not informed of the new event and could
maintain incorrect constraints on CPU frequency for example.

This patch defines the TALERT_IRQ as TRIGGER_HIGH interrupt instead of
TRIGGER_RISING interrupt. Even if interrupt line is disabled during the handler
execution, HW will maintain the T_ALERT signal to high level if a second thermal
event occurs. When re-enabling the interrupt line, the omap_talert_irq_handler()
IRQ handler will be called again if needed.

Change-Id: I629d5a66702fb60b5f96773c717a2d87238dff2c
Signed-off-by: Sebastien Sabatier <s-sabatier1@ti.com>