Revert "OMAP4: Add platform data to support HDMI default display"

This reverts commit 0dbb5246bebac208ea2239cca579a6445eac1752.

Reason: Reverted patch broke AV playback cases, so reverting it until
	appropriate fix not submitted.

Change-Id: I87ed4156aa3626579423b8dea3f77a69d5f27696
Signed-off-by: Riazantsev Volodymyr <v.riazantsev@ti.com>
rpmsg: do not kick remote processor upon priming rx buffers

The rpmsg bus driver currently sends a notification to the remote
processor after adding all the receive buffers to the vring. This
is commented out to help support the boot of a non-SMP IPU image.

The non-SMP IPU implementation uses two virtio devices, one per
processor, but represented by a single rproc instance. The rpmsg
probe function would cause the processor to be started for each
virtio device, and then notify the remote processor using the
mailbox (which is created only when the rproc is started) within
the rproc instance. This logic will be adjusted for non-SMP IPU,
wherein the processor would be started only when the second virtio
device is instantiated, and hence the notification cannot be made
prior to starting of the processor.

This change is a quick solution (not so neat) and works for the
most part since the first transmission from the remote processor
is always to announce a rpmsg channel, and the tx packet retrieval
for this announcement will be successful only after the rx buffers
are primed by host. The current notification is used for posting a
semaphore, signalling any tx threads that a new buffer is available.

There is still a small chance wherein a tx buffer retrieval may
happen before the rx buffers are primed, but the image initialization
on the remote processor is long enough to minimize these chances
greatly.

Change-Id: I6f5a4a44e50f3084a102bdeb3d2d235c86cde09a
Signed-off-by: Suman Anna <s-anna@ti.com>
android_omap_defconfig: enable Linux Bluetooth subsystem

For now we are using Bluedroid stack which can work directly with TI shared
transport tty. This is the reason that modules bluetooth.ko and hidp.ko and
other BlueZs modules were excluded from AFS. Bluedroid stack is used to just
enable/disable bluetooth hardware module and runs the hciattach. But actual
bluetooth profile and implementation of bluetooth specification is still
available in BlueZ stack. HIDP layer of the BlueZ stack is needed to use
the bluetooth keyboard as HID input device. So compile BlueZ modules as part
of the kernel.

Change-Id: Ic1979abac46166eb4744deee63bb210a655e7c77
Signed-off-by: Oleksandr Dmytryshyn <oleksandr.dmytryshyn@ti.com>
remoteproc: add support for multiple vdevs within a rproc instance

Support has been added to the core remoteproc code to allow multiple
virtio devices per rproc instance. This feature is generic in general,
but is being added primarily to support booting non-smp ipu cores in
OMAP. The feature is designed by processing all the virtio device
resources first, and registering all of them together. The processor
is booted only when the last virtio device is probed.

Change-Id: I9cbd8f4fad6aeadad0878bab15e2fbba8e154e81
Signed-off-by: Suman Anna <s-anna@ti.com>
omap: remoteproc: add support to boot OMAP4 IPU in non-smp mode

IPU would require an additional timer to provide the system tick
for core1 when running in non-SMP mode. GPTimer 4 is added to the
timers data to serve as this additional timer.

The current logic is hardcoded to boot OMAP4 IPU in non-SMP mode,
with OMAP5 IPU unchanged to boot in SMP-mode. The choice was made
at run-time instead of configuration time, since ARCH_OMAP4 and
ARCH_OMAP5 would both be enabled in most common defconfigs like
omap2plus_defconfig.

Change-Id: Iba94b98e7d1d956f193f7394d797a5e08f416c6b
Signed-off-by: Suman Anna <s-anna@ti.com>
ARM: OMAP4: hwmod_data: Add missing section of the control module

The control module core partition is made of 2 parts. Some modules
need to address "pad" part but there is no address space for it. So,
add missing section of the control module, "pad" part.

Change-Id: Icbf1a8fe43a95150b86a892c76211f2ebfe47e1b
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
ARM: OMAP4: hwmod_data: Correct control module clock domain

According to TRMs:
- OMAP4430_ES2.x_Public_TRM_vAJ
- OMAP4460_ES1.x_Public_TRM_vV
- OMAP4470_ES1.0_Public_TRM_vN

The PRCM module provides the CFG_L4_ICLK functional clock to each of
the two core control submodules, the clock is in L4_CFG clock domain.
Currently we have set incorrect clock domain name "ducati_clkdm", so
correct the clock domain name to actual - "l4_cfg_clkdm".

Change-Id: Id1ede121d43f5d68719db3570df2e74d963f88a3
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
Merge branch 'p-linux-omap-3.4' into p-android-omap-3.4

* p-linux-omap-3.4:
  ARM: OMAP4: hwmod_data: Correct control module clock domain
  ARM: OMAP4: hwmod_data: Add missing section of the control module
  omap: remoteproc: add support to boot OMAP4 IPU in non-smp mode
  remoteproc: add support for multiple vdevs within a rproc instance
  rpmsg: do not kick remote processor upon priming rx buffers

Change-Id: I0fa967c2e3c08b0411c2e68da13fa4888e25c268
Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
digsig: Fix memory leakage in digsig_verify_rsa()

commit 7810cc1e7721220f1ed2a23ca95113d6434f6dcd upstream.

digsig_verify_rsa() does not free kmalloc'ed buffer returned by
mpi_get_buffer().

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@intel.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drm/radeon/evergreen+: wait for the MC to settle after MC blackout

commit ed39fadd6df01095378e499fac3674883f16b853 upstream.

Some chips seem to need a little delay after blacking out
the MC before the requests actually stop.

May fix:
https://bugs.freedesktop.org/show_bug.cgi?id=56139
https://bugs.freedesktop.org/show_bug.cgi?id=57567

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drm/radeon: add WAIT_UNTIL to the non-VM safe regs list for cayman/TN

commit 674a16f2b4724880d07389abbb95abf320b924aa upstream.

Newer versions of mesa emit this.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drm/radeon: add quirk for RV100 board

commit 9200ee4941a6e5d1ec5df88982243686882dff3f upstream.

vbios says external TMDS while the board is actually
internal TMDS.

fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=60037

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drm/radeon: fix MC blackout on evergreen+

commit bb588820ef421c6098dca1fec29c3b347f1c8c19 upstream.

Force the crtc mem requests on/off immediately rather
than waiting for the double buffered updates to kick in.
Seems we miss the update in certain conditions.  Also
handle the DCE6 case.

Signed-off-by: Christopher Staite <chris@yourdreamnet.co.uk>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drm/radeon: prevent crash in the ring space allocation

commit fd5d93a0015ce1a7db881382022b2fcdfdc61760 upstream.

If the requested number of DWs on the ring is larger than
the size of the ring itself, return an error.

In testing with large VM updates, we've seen crashes when we
try and allocate more space on the ring than the total size
of the ring without checking.

This prevents the crash but for large VM updates or bo moves
of very large buffers, we will need to break the transaction
down into multiple batches.  I have patches to use IBs for
the next kernel.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drm/radeon: Calling object_unrefer() when creating fb failure

commit f2d68cf4daa4de97d400d94836b907e35228e54f upstream.

When kzalloc() failed in radeon_user_framebuffer_create(), need to
call object_unreference() to match the object_reference().

Signed-off-by: liu chuansheng <chuansheng.liu@intel.com>
Signed-off-by: xueminsu <xuemin.su@intel.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
x86-64: Replace left over sti/cli in ia32 audit exit code

commit 40a1ef95da85843696fc3ebe5fce39b0db32669f upstream.

For some reason they didn't get replaced so far by their
paravirt equivalents, resulting in code to be run with
interrupts disabled that doesn't expect so (causing, in the
observed case, a BUG_ON() to trigger) when syscall auditing is
enabled.

David (Cc-ed) came up with an identical fix, so likely this can
be taken to count as an ack from him.

Reported-by: Peter Moody <pmoody@google.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Cc: David Vrabel <david.vrabel@citrix.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Link: http://lkml.kernel.org/r/5108E01902000078000BA9C5@nat28.tlf.novell.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: David Vrabel <david.vrabel@citrix.com>
Tested-by: Peter Moody <pmoody@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sched/rt: Use root_domain of rt_rq not current processor

commit aa7f67304d1a03180f463258aa6f15a8b434e77d upstream.

When the system has multiple domains do_sched_rt_period_timer()
can run on any CPU and may iterate over all rt_rq in
cpu_online_mask.  This means when balance_runtime() is run for a
given rt_rq that rt_rq may be in a different rd than the current
processor.  Thus if we use smp_processor_id() to get rd in
do_balance_runtime() we may borrow runtime from a rt_rq that is
not part of our rd.

This changes do_balance_runtime to get the rd from the passed in
rt_rq ensuring that we borrow runtime only from the correct rd
for the given rt_rq.

This fixes a BUG at kernel/sched/rt.c:687! in __disable_runtime
when we try reclaim runtime lent to other rt_rq but runtime has
been lent to a rt_rq in another rd.

Signed-off-by: Shawn Bohrer <sbohrer@rgmadvisors.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Acked-by: Mike Galbraith <bitbucket@online.de>
Cc: peterz@infradead.org
Link: http://lkml.kernel.org/r/1358186131-29494-1-git-send-email-sbohrer@rgmadvisors.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
nilfs2: fix fix very long mount time issue

commit a9bae189542e71f91e61a4428adf6e5a7dfe8063 upstream.

There exists a situation when GC can work in background alone without
any other filesystem activity during significant time.

The nilfs_clean_segments() method calls nilfs_segctor_construct() that
updates superblocks in the case of NILFS_SC_SUPER_ROOT and
THE_NILFS_DISCONTINUED flags are set.  But when GC is working alone the
nilfs_clean_segments() is called with unset THE_NILFS_DISCONTINUED flag.
As a result, the update of superblocks doesn't occurred all this time
and in the case of SPOR superblocks keep very old values of last super
root placement.

SYMPTOMS:

Trying to mount a NILFS2 volume after SPOR in such environment ends with
very long mounting time (it can achieve about several hours in some
cases).

REPRODUCING PATH:

1. It needs to use external USB HDD, disable automount and doesn't
   make any additional filesystem activity on the NILFS2 volume.

2. Generate temporary file with size about 100 - 500 GB (for example,
   dd if=/dev/zero of=<file_name> bs=1073741824 count=200).  The size of
   file defines duration of GC working.

3. Then it needs to delete file.

4. Start GC manually by means of command "nilfs-clean -p 0".  When you
   start GC by means of such way then, at the end, superblocks is updated
   by once.  So, for simulation of SPOR, it needs to wait sometime (15 -
   40 minutes) and simply switch off USB HDD manually.

5. Switch on USB HDD again and try to mount NILFS2 volume.  As a
   result, NILFS2 volume will mount during very long time.

REPRODUCIBILITY: 100%

FIX:

This patch adds checking that superblocks need to update and set
THE_NILFS_DISCONTINUED flag before nilfs_clean_segments() call.

Reported-by: Sergey Alexandrov <splavgm@gmail.com>
Signed-off-by: Vyacheslav Dubeyko <slava@dubeyko.com>
Tested-by: Vyacheslav Dubeyko <slava@dubeyko.com>
Acked-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Tested-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/rtc/rtc-isl1208.c: call rtc_update_irq() from the alarm irq handler

commit 72fca4a4b32dc778b5b885c3498700e42b610d49 upstream.

Previously the alarm event was not propagated into the RTC subsystem.
By adding a call to rtc_update_irq, this fixes a timeout problem with
the hwclock utility.

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
USB: ftdi_sio: add Zolix FTDI PID

commit 0ba3b2ccc72b3df5c305d61f59d93ab0f0e87991 upstream.

Add support for Zolix Omni 1509 monochromator custom USB-RS232 converter.

Signed-off-by: Petr Kubánek <petr@kubanek.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>