resmgr: omap: correct platform device registration

We need to call platform_device_add instead of platform_device_register
when we are using platform_device_alloc call

Signed-off-by: Subramaniam C.A <subramaniam.ca@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.
Since, carveouts and mappings are stored separately,
we need to traverse both lists.

Also stored the physical addresses for RSC_DEVMEM entries
to enable pa to da conversion for dev mem address spaces too.

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: 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.

Signed-off-by: Suman Anna <s-anna@ti.com>
rpmsg: omx: lower the traces level in driver open, ioctl & release

The dev_info traces in open, connect ioctl and release incur a time
penalty and affect application launch time performances. These have
been converted to dev_dbg traces.

Signed-off-by: Suman Anna <s-anna@ti.com>
rpmsg: omx: remove additional rpmsg hex dump log

Removed additional HEX dumping in the rpmsg

Signed-off-by: Dan Murphy <dmurphy@ti.com>
rpmsg: omx: add safety removal of devices

Add safety when the rpmsg channel device is removed while the
module has users. Also that is useful when recovery is done in
RPMSG, where the channels are destroyed and created again.

Signed-off-by: Fernando Guzman Lugo <fernando.lugo@ti.com>
rpmsg: omx: buffer integration and transmission for ion and sgx

The user buffers passed via the write call can be PVR buffer
or an ion buffer. This patch adds support to inspect the
omx packet, get the phys addr using ion and pvr APIs, replace
the buffer addresses in place, before transmitting them
across to the remote processor.

Depending on the type of buffer we support, upto 3 buffers
could be passed across to the remote processor in a single
omx write call.

This also adds register/unregister functionality for
ion handles with an ion client created during driver open.

The patch is essentially based on work done for ics on kernel 3.0.

Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com>
Signed-off-by: Aditya Monga <admonga@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
rpmsg: omx: transmit remote processor virtual address

The rpmsg omx driver should convert the physical addresses
into remote processor virtual addresses before transmitting
them. The buffers would be an ion handle for a PVR or a
tiler buffer. Once the we get the pa, the rproc_pa_to_da api
is used to do the translation and then transmit the device
address to the remote processor.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com>
Signed-off-by: Sarthak Aggarwal <sarthak@ti.com>
Signed-off-by: Fernando Guzman Lugo <fernando.lugo@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.

Signed-off-by: Hemant Hariyani <hemanthariyani@ti.com>
Signed-off-by: Subramaniam C.A <subramaniam.ca@ti.com>
UBUNTU: add include guards to iomap.h

Signed-off-by: Xavier Boudet <x-boudet@ti.com>
Revert "ASoC: dapm: Remove SND_SOC_DAPM_MICBIAS_E()"

This reverts commit 5fc9aced13ae4bca67408816908be75684c1e7ba.
UBUNTU: export function vb2_get_vma

Signed-off-by: Xavier Boudet <x-boudet@ti.com>
UBUNTU: HACK: clock54xx_data.c - remove hsi_fclk_div

Signed-off-by: Xavier Boudet <x-boudet@ti.com>
UBUNTU: HACK: no omap_pm_set_max_dev_wakeup_lat API available

Signed-off-by: Xavier Boudet <x-boudet@ti.com>
UBUNTU: Initial Debianization

Signed-off-by: Xavier Boudet <x-boudet@ti.com>
KBuild: Allow scripts/* to be cross compiled

Cross compiling the binaries in scripts/* is not possible
because various makefiles assume that $(obj)/whatever is
executable on the build host.

This patch introduces a new variable called KBUILD_SCRIPTROOT
that points to script/binaries to use while cross compiling.

Usage:

Build scripts for the build host:
	make O=path/to/buildhost/buildscripts \
		silentoldconfig prepare scripts
Then cross build script for target:
	make O=path/to/target/buildscripts \
		HOSTCC=$CROSS_COMPILE \
		KBUILD_SCRIPTROOT=path/to/buildhost/buildscripts
		silentoldconfig prepare scripts

This patch does not use KBUILD_SCRIPTROOT for all script invocations
it only redefines the following if KBUILD_SCRIPTROOT is defined.

scripts/Makefile.build
	scripts/basic/fixdep --> $(KBUILD_SCRIPTROOT)/scripts/basic/fixdep

scripts/kconfig/Makefile
	$(obj)/conf --> $(KBUILD_SCRIPTROOT)/scripts/kconfig/conf

scripts/mod/Makefile
	$(obj)mk_elfconfig --> $(KBUILD_SCRIPTROOT)/scripts/mod/mk_elfconfig

Signed-off-by: John Rigby <john.rigby@linaro.org>
LINARO: Use KBUILD_SCRIPTROOT to cross build scripts

Signed-off-by: Xavier Boudet <x-boudet@ti.com>
UBUNTU: add omap_drv.h and omap_drm.h to linux-headers-<abi>-omap4

Add sym link for omap_drm.h and omap_drv.h in include/linux
Force delivery of the 2 files into drivers/staging/omapdrm

Signed-off-by: Xavier Boudet <x-boudet@ti.com>
UBUNTU: SAUCE: [arm] fixup __aeabi_uldivmod undefined build error

When building on arm we run into the following build error due to
gcc-4.6 optimizing do_div into a uldivmod call:

ERROR: "__aeabi_uldivmod" [drivers/scsi/megaraid/megaraid_sas.ko] undefined!

Inline some assembly to prevent the compiler optimization.

Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
UBUNTU: exclude crypto-modules and sata-modules from udeb

Signed-off-by: Xavier Boudet <x-boudet@ti.com>