arm: tegra: config: enable SATA for L4T

Enable CONFIG_SATA_AHCI_TEGRA

Bug 1171138

Change-Id: Id0cf3679a0fb0b85e20cd83c94135bf2aab2dd71
Original-author: Mike Thompson <mikthompson@nvidia.com>
Signed-off-by: Mike Thompson <mikthompson@nvidia.com>
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Signed-off-by: Syed Rafiuddin <srafiuddin@nvidia.com>
Reviewed-on: http://git-master/r/143985
Tested-by: Simone Willett <swillett@nvidia.com>
(cherry picked from commit 6830e27f86e0f3a2f1e3bad51ee2bf6855dc99b7)
Signed-off-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-on: http://git-master/r/166838
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
config: tegra3: enable RFKILL_GPIO

required for bluetooth

Bug 1033671

Change-Id: Ibc45eaf344ef7a5eea88e7df5747f8dcdcbf202d
Signed-off-by: Mursalin Akon <makon@nvidia.com>
Reviewed-on: http://git-master/r/166347
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
bluetooth: hid: make Android code conditional

Commit 7c786ce33a1b4194cb95aa1e68bc38d552eda932
introduced couple of fields, which are not used
in standard bluez user space stack. However,
Android bluez use them. This CL, conditionally
builds the part of the code introduced in the
above commit.

Bug 1178960

Change-Id: I7254fe83c7fb4bbfd14e00dda3ec3a14afc1b234
Signed-off-by: Mursalin Akon <makon@nvidia.com>
(cherry picked from commit e3375fd96fa5e0d7cfcda848d797cd512c12b7a6)
Reviewed-on: http://git-master/r/167540
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Eric Brower <ebrower@nvidia.com>
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
config: tegra3: BT and HID options

- enable couple of HID devices
- modify couple of BT options

Bug 1178960

Change-Id: Id9377edff2189d8a63f624d5d4e388e54658482f
Signed-off-by: Mursalin Akon <makon@nvidia.com>
Reviewed-on: http://git-master/r/167541
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Tested-by: Matthew Pedro <mapedro@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
ARM: tegra: p852: Fix misbracketed cond clause

This misbracketing can potentially result in an invalid pointer dereference.

Signed-off-by: Andrew Chew <achew@nvidia.com>
Change-Id: Iaed185dd2141f1aa332747eeba10d22b850caa37
Reviewed-on: http://git-master/r/168475
Reviewed-by: Peng Wu <pengw@nvidia.com>
Tested-by: Peng Wu <pengw@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Allen Martin <amartin@nvidia.com>
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
usb: tegra: conditionally set wake enable

Set wake enable only if remote wakeup is supported
by the platform

Bug 1039143

Signed-off-by: Preetham Chandru R <pchandru@nvidia.com>
Change-Id: I805dd773cdbb5639f59b2f5ba4bcb2e14be74d5b
Reviewed-on: http://git-master/r/147462
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Suresh Mangipudi <smangipudi@nvidia.com>
Reviewed-by: Krishna Yarlagadda <kyarlagadda@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
tegra_camera: fix building error when disable CONFIG_TEGRA_CAMERA

  LD      vmlinux.o
drivers/built-in.o: In function `is_tegra_camera_on':
/home/roc/Work/bug_vip/source_vibrante/kernel/include/media/
tegra_camera.h:59: multiple definition of `is_tegra_camera_on'
arch/arm/mach-tegra/built-in.o:/home/roc/Work/bug_vip/source_vibrante
/kernel/include/media/tegra_camera.h:59: first defined here
make: *** [vmlinux.o] Error 1

Commit '678708d WAR: gr3d: limit 3d clock when camera is on'
introduced a function is_tegra_camera_on(), which is dummy when
CONFIG_TEGRA_CAMERA is disabled. But it will be multiple defined
when includ this header file in multiple C files.

So marking it as static will kill this error.

Change-Id: I9dbcf1231f744c23e761d70da0bfc874fb286e4a
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/167510
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
media: tegra: Add docs for Tegra V4L2 camera

This readme describes theory of operations of the Tegra camera host
driver.

Signed-off-by: Andrew Chew <achew@nvidia.com>
Change-Id: I9e6f761cd60f5b8a537174290df21fb85f016dca
Reviewed-on: http://git-master/r/145347
(cherry picked from commit 7dd02775470d2b243f96b7d1f4e8b9c4e3b3ada6)

Signed-off-by: Bryan Wu <pengw@nvidia.com>
Change-Id: I10fd56ea6e3e83db6e09b75126a2048552ef052c
Reviewed-on: http://git-master/r/170822
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Andrew Chew <achew@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
GVS: Gerrit_Virtual_Submit
media: tegra: Tegra V4L2 camera

This is the Tegra V4L2 camera host driver, for Tegra2/Tegra3's VI/CSI
controller.

Signed-off-by: Andrew Chew <achew@nvidia.com>
Change-Id: If2d9eefe53c2119c1a6ae518216e1a3c3ed216ef
Reviewed-on: http://git-master/r/145346
(cherry picked from commit 5a9bfd588b755f354ae21471a3a2a3e559ca6fae)

Signed-off-by: Bryan Wu <pengw@nvidia.com>
Change-Id: I4db33b17efdb401938603cb2153d73bf3421ba61
Reviewed-on: http://git-master/r/170823
Reviewed-by: Andrew Chew <achew@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
media: tegra: Tegra videobuf2

This is based off of videobuf2-dma-contig, except we use Tegra's
nvmap for the buffer allocations.

Signed-off-by: Andrew Chew <achew@nvidia.com>
Change-Id: I15e689c33ee7b4fc0aade794c78701c82483df3f
Reviewed-on: http://git-master/r/145345
(cherry picked from commit 70a4f20fbdd6c2c719400d6c59ef58d845657031)

Signed-off-by: Bryan Wu <pengw@nvidia.com>
Change-Id: Ia0632d7fcb28415e33fbb22c48f29117d7436f1d
Reviewed-on: http://git-master/r/170824
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Andrew Chew <achew@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
tegra: Add function to release resources

Add a companion function to nvhost_client_device_get_resources()
called nvhost_client_device_put_resources() that does the opposite
thing. This is useful for any nvhost clients that need to be loaded
as modules, since the driver removal path will be exercised in that
case.

Change-Id: Ib5cec6fce7b05c780b135b03fcd88e068f772244
Signed-off-by: Andrew Chew <achew@nvidia.com>
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/169833
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
tegra: Add nvmap_mark_global()

Add this function, to be able to set the global field of an
nvmap_handle while preserving the nvmap API's encapsulation
mechanisms.

Change-Id: I62de773a65119722f059b114e2d0e906c7e04e83
Signed-off-by: Andrew Chew <achew@nvidia.com>
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/169834
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
media: tegra: enable a clock for VIP in APB MISC register

Change-Id: Ic4d91f4ed70fc3daf52768118f6ea537d529a5a8
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/169835
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
media: ov5640: Add Omnivision OV5640 support

Based on ov5642 driver. There seem to be some register differences,
so forking the driver to make those changes.

Change-Id: Idb4a79757cbbcd15d5456ce82a708f433faaff7a
Signed-off-by: Andrew Chew <achew@nvidia.com>
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/169836
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
arm: tegra: display: provide framebuffer clear function

Add tegra_clear_framebuffer function.

bug 1175957

Change-Id: I12c249e011ecd839bbe9c5371b8be6e8a4b27bba
Signed-off-by: Jong Kim <jongk@nvidia.com>
Reviewed-on: http://git-master/r/170661
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
arm: tegra: display: handle fbmem2 cmdline parameter

Parse and handle fbmem2 cmdline parameter.

bug 1175957

Change-Id: I0933825371bf13782e9f4364a4dba078929ae836
Signed-off-by: Jong Kim <jongk@nvidia.com>
Reviewed-on: http://git-master/r/170662
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
video: tegra: clear fb2 unspecified by bootloader

Clear framebuffer2 if and only if framebuffer2 is not specified by the
bootloader. If the bootloader framebuffer2 is specified, then copy the
contents to kernel framebuffer2.

bug 1175957

Change-Id: I4ac4432c1dac6a6c634ab3e6ae31628f9c64ddb4
Signed-off-by: Jong Kim <jongk@nvidia.com>
Reviewed-on: http://git-master/r/170663
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Winnie Hsu <whsu@nvidia.com>