Net: USB: Implement the tx/rx statistics for the raw IP network interface.

Change-Id: I593f6abf83a56ccd29221849ee32de8612283e4f
Signed-off-by: Raphanus Lo <raphanus_lo@asus.com>

Conflicts:
	drivers/net/usb/raw_ip_net.c
Net: USB: Modify the config of modem port for the modem crash dump.

Change-Id: Ice9e3ff8fe4160d64f44836b72551c05b433b725
Signed-off-by: Raphanus Lo <raphanus_lo@asus.com>
Net: USB: Modify the raw_ip_net driver to built-in.

Change-Id: I4fddcd3436be76f5821e2bd39125cd0bcc8da042
Signed-off-by: Raphanus Lo <raphanus_lo@asus.com>

Conflicts:
	arch/arm/configs/tegra3_android_defconfig
	drivers/net/usb/raw_ip_net.c
x3: config: raw_ip_net as built-in
x3: config: disable fiq debugger
video: tegra: nvmap: Introduce dma-buf exporter

Based on Terje's host nvmap exporter.

Change-Id: I9627ac9c4fc838f2e2c5c95b6972aa6185be7d6b
Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
Cc: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/133500
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
video: tegra: host: add per device module-reg-read-write ioctl

- currently, the ioctl NVHOST_IOCTL_CTRL_MODULE_REGRDWR is
a part of nvhost-ctrl node
- however, it doesn't deal with host1x. infact it read/write
actual module registers
- for this kernel needs to maintain a list of all nvhost_devices
registered for a SoC. currently, this is encapsulated within
nvhost_bus which provides a iterator to walk these device list
- however, once we phase out nvhost_bus and adopt the platform_bus
we do not have a way to know the list of these devices
- this commit adds a new per-device ioctl for module register
read-write functionality
- all the new code should be using this new per device ioctl. the
old will be removed as soon as all the clients are ready to use
new ioctl

bug 1154790

Change-Id: I0552aec61a4506243461de82ac0cf6e4c1f3b220
Signed-off-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-on: http://git-master/r/141579
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Arto Merilainen <amerilainen@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
GVS: Gerrit_Virtual_Submit
scatterlist: add sg_alloc_table_from_pages function

This patch adds a new constructor for an sg table. The table is constructed
from an array of struct pages. All contiguous chunks of the pages are merged
into a single sg nodes. A user may provide an offset and a size of a buffer if
the buffer is not page-aligned.

The function is dedicated for DMABUF exporters which often perform conversion
from an page array to a scatterlist. Moreover the scatterlist should be
squashed in order to save memory and to speed-up the process of DMA mapping
using dma_map_sg.

The code is based on the patch 'v4l: vb2-dma-contig: add support for
scatterlist in userptr mode' and hints from Laurent Pinchart.

Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
CC: Andrew Morton <akpm@linux-foundation.org>
video: tegra: nvmap: fix cache_maint leak

Under certain error conditions, nvmap's cache_maint would do an early
return while holding an incremented refcount and an allocated pte,
causing leaks.

Bug 1042888

Change-Id: Ie6d557f5678e7475cf46c1524a43ed464502e94c
Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
Reviewed-on: http://git-master/r/131887
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
video: tegra: nvmap: fix pinning unalloc'd handles

nvmap_pin_ids takes a list of handles to pin from userspace.
Unfortunately, it does not check that the handles are actually
allocated, which will trigger a BUG_ON later in pin_locked().

Bug 1023954

Change-Id: Iba4c53bc0a6c47b7f4f740a93e59b613dc3b95f6
Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
Reviewed-on: http://git-master/r/131888
Reviewed-by: Mrutyunjay Sawant <msawant@nvidia.com>
Tested-by: Mrutyunjay Sawant <msawant@nvidia.com>
video: tegra: nvmap: Add pin, unpin trace events

Change-Id: I62deda9d607476e3dc82428b872ad1a3e396e37e
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/143421
Reviewed-by: Mrutyunjay Sawant <msawant@nvidia.com>
Tested-by: Mrutyunjay Sawant <msawant@nvidia.com>
video: tegra: dsi: remove unsigned variable comparison with zero

fix coverity issue
unsigned variable 'i' may result in infinite for loop
so change loop to 'while'

bug 1046331

Change-Id: I812845bcac3efda45101e8384ece132e1e6b8866
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/134067
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
video: tegra: dc: enable cp with global alpha

When global alpha is enabled, color palette also
has to be enabled, for the change to take effect.

This also enabled global alpha for 11x

Bug 672060

Change-Id: Ic2759dd7f15fa58a134ac5dfbaa968096e8a750a
Signed-off-by: Prashant Malani <pmalani@nvidia.com>
Reviewed-on: http://git-master/r/143417
Reviewed-by: Kevin Huang (Eng-SW) <kevinh@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
video: tegra : dc: fix build error
ARM: tegra: cpuquiet: add min/max_cpus debugfs nodes back

Bug 1047573

Change-Id: I7209ca87075b3d8a1d53141c48fe8fbdd86c4728
Signed-off-by: Peter Boonstoppel <pboonstoppel@nvidia.com>
Reviewed-on: http://git-master/r/131606
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Ilan Aelion <iaelion@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
tegra:cpuquiet: fix errors
tegra:clocks: alow cpu to go to 51000kHz even when screen is on
usb: Add support for building USB driver as a module

- Export required symbols for USB driver support as a module
- Remove call to set_irq_flags since this is not exported to modules

Change-Id: Ibe40d1ac8636bd1a3ba1d06dee57d9928cbb8a4c
Reviewed-on: http://git-master/r/115423
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
arm: tegra: usb: USB hotplug detection using PMC

Add logic for detection of USB hotplug using PMC.

Bug 1057339
Bug 1171244

Change-Id: I0064fa95ce99ead0f16fe38de75db9ed107fc5c9
Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/161275
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

Conflicts:
	arch/arm/mach-tegra/tegra11x_usb_phy.c
arm: usb: fix build error