ARM: 6998/2: kernel: use proper memory barriers for bitops

Improve scalability by avoiding costly and unnecessary L2 cache sync
in handling bitops.

Change-Id: If6b9f52edbb597e3298227a13ed4e6edc629bf11
Signed-off-by: Heechul Yun <hyun@nvidia.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Maulik Mankad <maulik@ti.com>
mmc: omap: Increase number of blks we can handle

The above block layer is doing a "min" of max_req_size
and max_blk_count*512 before submitting each request.

As a result, the maximum size of request we are getting
is only 120*512 = 60KB even though each line in the
ADMA table can handle can handle that data alone.

So, we increase the max_blk_count we can handle. Also,
note that worst case is when above block layer gives
us 512 segments, in which there are 511 single block
entries, but one large block that is of size
mmc->max_req_size - (511*512) bytes.

In this case, we use the reserved 512 table entries
to break up the large request. Also adjust the
max_segs accordingly.

Change-Id: I733effdebea94f51a49bbf323950529afbb00dc4
Signed-off-by: Viswanath Puttagunta <vishp@ti.com>
OMAP4430: USB Host: Implement workaround for Errata i687

The OMAP4 EHCI controller has the following defect (errata ID i687):

Title:
	USB TLL Hold Timing Violation

Description:
	There is a timing hold violation on an internal logic on
	the clock USB TLL path resulting in a systematic connection
	failure on the TLL link

WORKAROUND:
	As part of workaround, next should be done:
	Set the I/O drive strength to 1.
	Depending which USB host subsystem is used,
	• Port B1 used: Set CONTROL.CONTROL_SMART2IO_PADCONF_2[11] USBB1_DR0_DS = 0x1
	• Port B2 used: Set CONTROL.CONTROL_SMART2IO_PADCONF_2[12] USBB2_DR0_DS = 0x1

All OMAP4430 devices are impacted.

Change-Id: Iba45e5a3b04a6180db3398edb8c00563f67f6105
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@ti.com>
OMAPDSS: DSSCOMP: Fix klocworks errors

Change-Id: If2ed914c738e28c9b5b19b67353bd367d612e91b
Signed-off-by: Tony Lofthouse <a0741364@ti.com>
SGX-KM: egl.cfg sysfs entry

Create a runtime sysfs entry for egl.cfg. This is needed
by the SGX driver to determine which OpenGL libraries
to load.

Change-Id: Ief39f498721d0ad71942f8a49fcfefc4c449d656
Signed-off-by: Tate Hornbeck <tate.hornbeck@ti.com>
SGX-KM: Use define to set core revision

Use SGX_CORE_REV to set the attribute in the
sysfs entry.

This will allow to use different core revisions
with the same SGX core.

Signed-off-by: Rodrigo Obregon <robregon@ti.com>
Change-Id: I618a8fc6b62ae716ee26a079fc3f939ec4083a45
ARM: OMAP4: EMIF: implementation of errata i735 for PM timer

EMIF Power Management timer for Self Refresh will put the external SDRAM
in Self Refresh mode after the EMIF is idle for number of DDR clock cycles
that is set with REG_SR_TIM. The minimal value starts at 16 cycles.
However due to Errata i735, the minimal value is 512 DDR cycles as it is
required at OPP100 frequency.

Change-Id: If0748903580877aa4c1803f47e9134ee60c1dd75
Signed-off-by: Konstantyn Shlyakhovoy <x0155534@ti.com>

Conflicts:
	arch/arm/mach-omap2/emif.c
OMAP4: HSOTG: Improved HSOTG USB EYE diagram

1. Added the ability to improve HSOTG USB EYE diagram.

 solution #1: (all 44XX CPUs family)
   Improvement of 2-3% in EYE diagram opening by playing slightly on USB
   driver output impedance.

 solution #2: (4430 CPUs)
   Improvement of up to 8% in EYE diagram opening has been accomplished by
   decreasing the internal termination impedance by increasing the SWCAP
   trim code in USBPHY_USB2PHYCM_TRIM register to 0x24.

2. Added menuconfig option for this feature:
   'System Type'--->'OMAP 44XX HSOTG Eye diagram correction'

Change-Id: Ifd0450e8eeea57e6f68d1e166fe878a39ce52f71
Signed-off-by: Volodymyr Riazantsev <x0153367@ti.com>
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@ti.com>
OMAP4: HSOTG: Improved HSOTG USB EYE diagram for 4460 and 4470 CPUs

Added 10-15mV adjustable improvement for 4460 and 4470 CPUs

Change-Id: If12eac91f5244bc8fa25ae7adb750ea47515c0f8
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@ti.com>
USB: OTG: twl6030: Disable VUSB LDO when not in use

VUSB LDO is kept ON as VUSB_IN_VBAT bit of MISC2 register is
set to "1" in u-boot and not changed in kernel.

Program VUSB_IN_VBAT bit to disable the input supply for VUSB
regulator when USB is not connected.

Change-Id: Ide7af47bf65fa409c964a78ac89d23fc70f361b3
Signed-off-by: Mohan V <mohanv@ti.com>
Signed-off-by: Maulik Mankad <maulik@ti.com>
Signed-off-by: Huzefa Kankroliwala <huzefank@ti.com>
OMAPDSS: DSSCOMP: export needed functions for PVR SGX

Make dsscomp symbol visible to kernel modules. The SGX DDK
in modular form requires this symbol to be exported.

Change-Id: I5d45b953379f1ae7c05d10271427a9cd611248a6
Signed-off-by: Rogelio Garcia <rgarcia@ti.com>
OMAPDSS: DISPC: HW WA for UV plane overread HW bug

vidrot attribute is ignored for NV12 format, but setting it to
1 prevents overread of the UV plane when scaling.

Change-Id: If436c26aace4c805723ccfc1bd2b989bdc7efcd5
Signed-off-by: Sathya Prakash M R <a0393677@ti.com>
Signed-off-by: Lajos Molnar <lajos@ti.com>
Revert "OMAP:DSS: SW workaround for HW scaler overread issue"

This reverts commit 0e11c5b311d2c7436756f80c35c8aef4cd0d911b.

The SW workaround is no longer needed as a hardware workaround
exists, and the SW workaround created artifacts.

Change-Id: I5d8a601b24502a3ac5d4c1f17fcb3936ba8e7e10
Signed-off-by: Sathya Prakash M R <a0393677@ti.com>
Signed-off-by: Lajos Molnar <lajos@ti.com>
remoteproc: add an api to do pa to da conversion

Added an api to provide memory translation from a
physical address to a device virtual address.

Change-Id: I476ce1ba8dc53562c500ad069be42b62e69c5ee3
Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com>
Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
rpmsg: store rproc reference during virtio device creation

Get and store a reference to the rproc associated with the
virtio device. This can later be used by rpmsg drivers to
exercise rproc API (for eg: rproc_da_to_pa).

An API is provided to get this reference from a given rpmsg
channel device.

Change-Id: Ieb397a8cbdd9897a09d631f902c37364fa612210
Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com>
Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
remoteproc: remove pa hardcoding of IPU_MEM_IOBUFS

While adding a mem entry, we currently check the pa of
IPU_MEM_IOBUFS and mark the entry not to be considered
during core dump. The pa hardcoding is removed in this
patch and we use the resource name instead, to make it
independent of the address location of this section.

Change-Id: If0fa893e033b8d0252d8d9d13532c7385417045c
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com>
rpmsg: omx: re-work buffer lookup to support contiguous NV12

SGX544 requires Y and UV to be contiguous in SGX virtual address space. This
is done by using single FD for two ion handles.

Change-Id: I33ced876905d74e6293a2c32df0612f01a23d13f
Signed-off-by: Hemant Hariyani <hemanthariyani@ti.com>
Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com>
rpmsg: omx: use rproc api for pa to da conversion

This patch adds the capability to query the remote proc memory
map to perform pa to da conversions in the rpmsg omx driver.
This removes the hard-coded table lookup for translating buffer
addresses.

Change-Id: I116e0983db493f7184796bce416cb45f99c86dd5
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com>
Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
rpmsg-omx: tiler_virt2phys called for 1D buffers

While migrating to the new PVR APIs, the changes caused
a the tiler_virt2phys to be bypassed in case it is not
a PVR buffer. This patches fixes the issue

Change-Id: I9a3353053d58a7bc0ef89012de46534fad5f4b88
Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com>
Signed-off-by: Tate Hornbeck <tate.hornbeck@ti.com>
Fix merge error