Revert "tegra3_dvfs: update clock tables for gpu"

This reverts commit 0c7b52fe040fe3475fbad7c02c1c409b6c16c4ee.
ARM: tegra: enterprise: Remove tegra_gpio_enb/dis

Removing tegra_gpio_enable and disable calls
from board files as they are supported through
set direction calls in the driver

Bug 984439

Change-Id: I011fc1ec52b31b1b0602d577f02a6d20f37e402d
Signed-off-by: Ashwini Ghuge <aghuge@nvidia.com>
Reviewed-on: http://git-master/r/102773
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
ARM: tegra: cardhu: enable DSI panel support

Allow for DSI panel support to be present in release builds.
Removed CONFIG_TEGRA_CARDHU_DSI config variable.

Bug 978305.

Change-Id: I2b34fa5c5331de897d2b753da90e26278a6b7870
Signed-off-by: Rakesh Iyer <riyer@nvidia.com>
Reviewed-on: http://git-master/r/106919
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
media: video: tegra: Update ad5816 focuser driver

Modify code structure and incorporate
few review comments raised in base change
of ad5816 driver implementation.

Bug 947792

Change-Id: I4b9e95669353f6e9bb71f4e172b71b4e31b1f0d7
Signed-off-by: Sudhir Vyas <svyas@nvidia.com>
Reviewed-on: http://git-master/r/105933
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
power: smb349: added debugfs to dump registers.

also cleanup the driver code to remove warnings and indent issue.

Change-Id: I6fd81a369be9141a5819bf086078bc609360efd8
Signed-off-by: Linqiang Pu <dpu@nvidia.com>
Reviewed-on: http://git-master/r/106682
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
mmc: proactively issue bkops_start and refresh

Adding CMD56 implementation.
Doing the following for manfid 0x90 and FW revisions 0x73 and
0x7b (both are non-standard custom FW):
1. Adding change to issue BKOPS_START whenever 20 seconds have gone
by without any slow write operations.
2. Adding change to issue CMD56 to refresh (custom feature) 1 block
whenever 60 seconds have gone by without any slow write operations.

Corresponding changes are already there in embedded branches:
http://git-master/r/#change,93247
http://git-master/r/#change,97555

Bug 847037.
Bug 874256.
Bug 963737.

Change-Id: Ie36b52620a75320abfedc36d1408647b36eddb46
Signed-off-by: Vishal Singh <vissingh@nvidia.com>
Reviewed-on: http://git-master/r/102259
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Luis Dib <ldib@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
video: tegra: host: Initialize host1x generic irq

Initialize host1x generic irq at bootup.

Bug 971602

Change-Id: I03fb426a0538c1549fdb5360166c4e4b516e75d6
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/106167
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
ARM: tegra: p1852: remove tegra_gpio_enable/tegra_gpio_disable

tegra_gpio driver supports configuring gpio when direction is set.
So removed tegra_gpio_enable/tegra_gpio_disable from p1852 board
file.

Bug 984442

Change-Id: I176b99fb277e01d0ef426c793ce0d1b3bbbb847d
Signed-off-by: Mohit Kataria <mkataria@nvidia.com>
Reviewed-on: http://git-master/r/105902
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
video: tegra: host: Abstract nvmap support

Abstract nvmap support to one file, and use it via function pointers
from other parts of nvhost.

Bug 965206

Change-Id: I4e5e7de4271e0797d117ac8210af4732b6018973
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/105665
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Mayuresh Kulkarni <mkulkarni@nvidia.com>
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
asoc: max98095: probe with no device there fix

There is path through which registering a card will fail to probe,
but that error code is not propogated back to the tegra machine
driver. To catch this case in the machine driver's probe routine,
we need to ensure that after registering the card, the card is
instantiated and fail probe if not.

Change-Id: I64ba952685ef193a3b248502943771c518396808
Signed-off-by: Rhyland Klein <rklein@nvidia.com>
Reviewed-on: http://git-master/r/106837
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Scott Peterson <speterson@nvidia.com>
arm: tegra: p1852: Remove unwanted audio clocks

Audio Sync clocks should be set at driver level.
Removing this hack as the TDM driver sets the clocks now.

Bug 948478

Change-Id: Ie001b601e740f22852a4dbb6b89a225a263208ee
Signed-off-by: Nitin Pai <npai@nvidia.com>
Reviewed-on: http://git-master/r/107534
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Manoj Chourasia <mchourasia@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Scott Peterson <speterson@nvidia.com>
video: tegra: host: Add config option for timeout

Add configuration variable for default timeout for clients. Set it to
30s for silicon and infinity for simulation.

Change-Id: I08c1fd234f738c4919adfe482dfc50948dc2f862
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/105331
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
video: tegra: dc: Clock-gate display modules dynamically.

Bug 936337
Bug 899053

Change-Id: I2b3d8cfc8a00881338c1e17d03f2844d15ba7d3e
Signed-off-by: Kevin Huang <kevinh@nvidia.com>
Reviewed-on: http://git-master/r/106313
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
ARM: Tegra: Kai: Move Raydium init declaration

Move Raydium touch init declaration from board-specific
board-kai.h to generic board-touch.h

Signed-off-by: Graziano Misuraca <gmisuraca@nvidia.com>
Change-Id: If82572a296ad6e5a3b1733827289e9b71a624176
Reviewed-on: http://git-master/r/95919
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
arm: tegra: p1852: drive touch panel with resolution 1366x768

Enable WXGA display and touch input for p1852 touch panel.

board-p1852-panel.c:
added WXGA timing for atmel touch panel.

board-p1852.c:
initialize touch panel if touch input is defined.

board-p1852.h:
added p1852 touch panel GPIO and bus.

tegra_p1852_gnu_linux_defconfig:
added touch panel flags, not defined by default.

bug 936232

Change-Id: Ia50b991f6aa5ed0ece458ad3871a68684a9234a6
Signed-off-by: Dongfang Shi <dshi@nvidia.com>
Reviewed-on: http://git-master/r/101348
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
ARM: tegra: p1852: defconfig: Enable PL310_ERRATA_727915

bug 820324

Change-Id: Ia4dec298b3c0cda8cb4e8572b46067b7d06b3758
Signed-off-by: Manoj Chourasia <mchourasia@nvidia.com>
Reviewed-on: http://git-master/r/107592
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
mtd: tegra-nor: Fix dma/cpu coherency issues

Call dma sync single api's to maintain coherency between
CPU, dma and device in data transfers.

bug 984029
bug 980884

Change-Id: I50b5a24a7ce482f473670347af3c75d6975c6060
Signed-off-by: Manoj Chourasia <mchourasia@nvidia.com>
Reviewed-on: http://git-master/r/105917
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
power: smb349: fix I2C error when unplug ext power

When unplug the external power, SMB349 will reload the OTP setting.
It sometimes caused I2c errors. See bug 996103 and 991401.

Add a 50ms delay when hotplugging the external power to fix the
issue.

SMB349 might mistakenly detect dedicated USB charger as standard
USB device if plug in the USB at low speed. See Bug 996108.

Add a 500ms delay to fix the issue.

Bug 996103
Bug 996108
Bug 991401

Change-Id: I008a45fa221e9a566af64afb1988bbbd7a9f5c79
Signed-off-by: Chandler Zhang <chazhang@nvidia.com>
Signed-off-by: Syed Rafiuddin <srafiuddin@nvidia.com>
Reviewed-on: http://git-master/r/106684
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Avoid aliasing mappings in DMA coherent allocator

Avoid multiple mappings with DMA coherent/writecombine allocator by pre-
allocating the mappings, and removing that memory from the system memory
mapping.  (See previous discussions on linux-arm-kernel as to why this
is bad.)

NB1: By default, we preallocate 2MB for DMA coherent, and 2MB for write
combine memory, rather than 1MB for each in case 1MB is not sufficient
for existing platform usage.  Platforms have the option of shrinking
this down to 1MB DMA / 1MB WC (or even 2MB DMA / 0MB WC) if they so wish.
The DMA memory must be a multiple of 1MB, the write combine memory must
also be a multiple of 1MB, and the two together must be a multiple of
2MB.

NB2: On ARMv6/7 where we use 'normal uncacheable' memory for both DMA
and WC, the two pools are combined into one, as was the case with the
previous implementation.

The down side to this change is that the memory is permanently set aside
for DMA purposes, but I believe that to be unavoidable if we are to
avoid the possibility of the cache getting in the way on VIPT CPUs.

This removes the last known offender (at this time) from the kernel.

Given that DMA memory is fully coherent by this patch, cache
invalidation/clean is not required and so, we skip cache related
activities for the memory managed by the DMA layer. The bus
address -> virtual address conversion normally used in the calling
path and the fact that we remove kernel static mapping corresponding
to the DMA buffers leads to exceptions otherwise.

bug 876019
bug 965047
bug 987589

Change-Id: I72beb386605aafe1a301494a95a67d094ea6b2e4
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Manoj Chourasia <mchourasia@nvidia.com>
Reviewed-on: http://git-master/r/106212
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
video: tegra: dc: Fix backlight on/off sequence

Register backlight device after tegradc.0 and tegradc.1. This makes
sure turning on/off backlight in correct sequence and eliminates the
flicker during suspending and resuming.

Bug 964626

Change-Id: I16a545b0148faa341b2443c76d9ca4c7eb7f636c
Signed-off-by: Mark Zhang <markz@nvidia.com>
Reviewed-on: http://git-master/r/105611
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Peer Chen <pchen@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Shashank Sharma <shashanks@nvidia.com>
Reviewed-by: Jon Mayo <jmayo@nvidia.com>