7 years agoARM: tegra11: clock: Modify pllx and cpu burst policy restore
Alex Frid [Tue, 4 Sep 2012 22:42:28 +0000]
ARM: tegra11: clock: Modify pllx and cpu burst policy restore

Removed PLLX and cpu burst policy restoration on Tegra11 from
restore_cpu_complex() routine. These settings are preserved across
cpu complex rail-gating, and should be restored by common clock
suspend/resume code across core rail-gating (LP0 state).

Added PLLX restoration to common clock resume procedure (was missing,
since it was done in restore_cpu_complex()). Fixed cpu burst policy
restoration for LP CPU to make sure PLLX DIV2 bypass is not changing
while PLLX is used as cpu clock source.

Change-Id: I3425a4ad65c51d9485e1c3240905b3ce3066e74c
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/130856
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

7 years agoARM: tegra11: clock: Change the order of pll restoration
Alex Frid [Sat, 8 Sep 2012 04:31:30 +0000]
ARM: tegra11: clock: Change the order of pll restoration

Reversed the order of base and miscellaneous registers restoration
for PLLA, PLLD/D2 (base should be restored after miscellaneous
register).

Change-Id: Ide199b876c133e15b1340abea802179d46d03abd
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/130855
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

7 years agoARM: tegra11: clock: Update clock suspend/resume
Alex Frid [Sat, 1 Sep 2012 05:50:35 +0000]
ARM: tegra11: clock: Update clock suspend/resume

Updated clock suspend/resume procedures:
- added missed module clock sources and clock control registers
  to save/restore pool
- added secondary PLLP dividers suspend/resume
- added PLLC2/C3 suspend/resume
- used Tegra11 PLLC suspend/resume operations (instead of direct base
  register save/restore)
- updated clock enable masks

Change-Id: I91949065f85067ddd2ad4bc3a26ed8c92ea7c51d
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/130854
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

7 years agoARM: tegra11: clock: Add PLLC2/3, PLLC, PLLX resume operations
Alex Frid [Sat, 1 Sep 2012 03:40:02 +0000]
ARM: tegra11: clock: Add PLLC2/3, PLLC, PLLX resume operations

Change-Id: Idc1fc070e77ea8161a10321fe074ea329671fb98
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/130853
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

7 years agoARM: mutex: use generic atomic_dec-based implementation for ARMv6+
Will Deacon [Mon, 13 Aug 2012 17:38:48 +0000]
ARM: mutex: use generic atomic_dec-based implementation for ARMv6+

Commit a76d7bd96d65 ("ARM: 7467/1: mutex: use generic xchg-based
implementation for ARMv6+") removed the barrier-less, ARM-specific
mutex implementation in favour of the generic xchg-based code.

Since then, a bug was uncovered in the xchg code when running on SMP
platforms, due to interactions between the locking paths and the
MUTEX_SPIN_ON_OWNER code. This was fixed in 0bce9c46bf3b ("mutex: place
lock in contended state after fastpath_lock failure"), however, the
atomic_dec-based mutex algorithm is now marginally more efficient for
ARM (~0.5% improvement in hackbench scores on dual A15).

This patch moves ARMv6+ platforms to the atomic_dec-based mutex code.

Change-Id: I80a3a692d3fea595dbcd14874759800d1b6c0827
Cc: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Reviewed-on: http://git-master/r/130778
Tested-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Daniel Parker <dparker@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>

7 years agoARM: 7467/1: mutex: use generic xchg-based implementation for ARMv6+
Will Deacon [Fri, 24 Aug 2012 12:36:47 +0000]
ARM: 7467/1: mutex: use generic xchg-based implementation for ARMv6+

The open-coded mutex implementation for ARMv6+ cores suffers from a
severe lack of barriers, so in the uncontended case we don't actually
protect any accesses performed during the critical section.

Furthermore, the code is largely a duplication of the ARMv6+ atomic_dec
code but optimised to remove a branch instruction, as the mutex fastpath
was previously inlined. Now that this is executed out-of-line, we can
reuse the atomic access code for the locking (in fact, we use the xchg
code as this produces shorter critical sections).

This patch uses the generic xchg based implementation for mutexes on
ARMv6+, which introduces barriers to the lock/unlock operations and also
has the benefit of removing a fair amount of inline assembly code.

Change-Id: I25f3fe00937a3a9dff31b2e28c7e56391220275a
Cc: <stable@vger.kernel.org> : 0bce9c46: mutex: Place lock in contended...
Cc: <stable@vger.kernel.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Nicolas Pitre <nico@linaro.org>
Reported-by: Shan Kang <kangshan0910@gmail.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Reviewed-on: http://git-master/r/130776
Tested-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Daniel Parker <dparker@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>

7 years agoarm: tegra: Define DT bindings for Tegra30 EMC tables
Prashant Gaikwad [Thu, 16 Aug 2012 11:44:43 +0000]
arm: tegra: Define DT bindings for Tegra30 EMC tables

Bug 999688

Change-Id: I86041009ff686073dc81857aaf47e4fcee2618ea
Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Reviewed-on: http://git-master/r/130698
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

7 years agomedia: video: tegra: Add IMX132 Camera sensor support.
Sunil Gangele [Wed, 5 Sep 2012 09:06:03 +0000]
media: video: tegra: Add IMX132 Camera sensor support.

Support for IMX132 Camera sensor driver.

Bug 1022599

Change-Id: I6598cb0a2451e94eb54fbcc03bf05f553fcf6834
Signed-off-by: Sunil Gangele <sgangele@nvidia.com>
Reviewed-on: http://git-master/r/130657
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Yuvraj Pasi <ypasi@nvidia.com>

7 years agoarm: tegra: phy: enable wakeup event for usb phy
Rakesh Bodla [Fri, 7 Sep 2012 10:24:55 +0000]
arm: tegra: phy: enable wakeup event for usb phy

If usb device already connected, should disable WKCN
in USB2D_PORTSC1, and enable WKDS in USB2D_PORTSC1,
during utmi phy power off. All the wakeup resource
should be cleared after the event happened.

Bug 1020021
Bug 1028429

Reviewed-on: http://git-master/r/128547
(cherry picked from commit 65ce999d1b22b01f6a2e6b3516be47e83d6d2584)

Change-Id: I0c4f704cd0517f0195053a5835ddf5c2956a2fa9
Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/130601
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>

7 years agoARM: tegra: Fix debugfs strings for powergate
Peter De Schrijver [Thu, 30 Aug 2012 13:57:21 +0000]
ARM: tegra: Fix debugfs strings for powergate

Replace powergate_name[] by a call to tegra_powergate_get_name().
This fixes the out of bounds accesses for SoCs other than Tegra20.

bug 1041476

Change-Id: I0e299960404fae33af3ef0423344001e133b8653
Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/130597
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>

7 years agoARM: tegra: usb_phy: Remove WAR for host connection detect
srinivas [Wed, 29 Aug 2012 17:30:03 +0000]
ARM: tegra: usb_phy: Remove WAR for host connection detect

T30 USB controller sets fake connect event when it is
in HSIC mode without regard to actual device connection.
This issue got fixed in T114 by adding the connect detect
interrupt. Now standard EHCI interrupt can be used for host
connection detect hence SW WAR kept during T30 is removed.

Removed phy_resume & phy_fence_read functions which are
not required for T114.

Bug 969326

Change-Id: I9bec5f3bfb0c0dca8ad9a584b9514e3680026041
Signed-off-by: srinivas thaduvai <sthaduvai@nvidia.com>
Reviewed-on: http://git-master/r/130477
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

7 years agoARM: tegra: usb_phy: Remove WAR for HSIC bus reset
srinivas [Wed, 29 Aug 2012 17:24:45 +0000]
ARM: tegra: usb_phy: Remove WAR for HSIC bus reset

When UHSIC_DISABLE_BUSRESET, UHSIC_FORCE_XCVR_MODE
bits are set, controller forces bus reset using the
WAR sequences in T30. As HSIC bus reset timer issue
is fixed in T114, these settings can be removed.

Bug 1021578

Change-Id: I21e5acc533d1bec5691d7142eb6776e852db9392
Signed-off-by: srinivas thaduvai <sthaduvai@nvidia.com>
Reviewed-on: http://git-master/r/130474
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

7 years agoARM: Tegra: add support for persistent_ram
Varun Wadekar [Tue, 17 Apr 2012 12:40:49 +0000]
ARM: Tegra: add support for persistent_ram

ram_console driver now depends on persistent_ram to carve the chunk
of memory that it needs. So ask persistent_ram driver to reserve
memory for ram_console instead of doing it in the tegra common
code.

Change-Id: I43854f059f0610f3b5bf54acd1af51e33f9dd330
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Signed-off-by: Johnny Qiu <joqiu@nvidia.com>
Reviewed-on: http://git-master/r/130066
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

7 years agostaging: android: persistent_ram: remove atomic operations
Varun Wadekar [Mon, 3 Sep 2012 06:57:28 +0000]
staging: android: persistent_ram: remove atomic operations

The atomic operations (LDREX/STREX) to handle a buffer's start
pointer and size do not seem to work well on ARMv7.

Bug 1035205

Suggested by: Colin Cross <ccross@android.com>

Change-Id: I71d61c8eb6a9669137dfc5fc6793e57e939f4a12
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Signed-off-by: Johnny Qiu <joqiu@nvidia.com>
Reviewed-on: http://git-master/r/130065
Reviewed-by: Automatic_Commit_Validation_User

7 years agoARM: tegra: dalmore/pluto: Remove unused code
naveenk [Mon, 3 Sep 2012 10:55:03 +0000]
ARM: tegra: dalmore/pluto: Remove unused code

Remove T30 specific code, because Same instances are used
for T30 and T114 on Dakmore/Pluto

Bug 1017708

Change-Id: I73f2e30d7ea0d355ee943c73013a1df9008940cf
Signed-off-by: naveen kumar arepalli <naveenk@nvidia.com>
Reviewed-on: http://git-master/r/130035
Reviewed-by: Pradeep Goudagunta <pgoudagunta@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User

7 years agoARM: tegra: usb_phy: HSIC PMC changes
Abhishek Shukla [Wed, 22 Aug 2012 16:23:42 +0000]
ARM: tegra: usb_phy: HSIC PMC changes

This change updates PMC register macros to
support two HSIC controllers.

Bug 1036606

Change-Id: I9dbae1811857472c9ee6d139ab3fc94db2776f4c
Signed-off-by: Abhishek Shukla <abhisheks@nvidia.com>
Reviewed-on: http://git-master/r/129978
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>

7 years agoMerge remote-tracking branch 'origin/dev/dma-v10' into HEAD
varun colbert [Mon, 10 Sep 2012 19:51:25 +0000]
Merge remote-tracking branch 'origin/dev/dma-v10' into HEAD

7 years agoARM: tegra: dalmore: Remove ldo4 tracking flag
Laxman Dewangan [Fri, 7 Sep 2012 11:37:32 +0000]
ARM: tegra: dalmore: Remove ldo4 tracking flag

VDD_RTC should follow the vdd_core and in Dalmore,
VDD_RTC is supplied by LDO4 and vdd_core is supplied
by SD0.
The device MAX77663 support LDO4 tracking from SD1, not SD0 and
hence it can not be supported in Dalmore.
Removing the flag.

Change-Id: Ib39930f21f5195e1f4ecc1d9645d915b3b74fb37
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/130687
Reviewed-by: Automatic_Commit_Validation_User

7 years agoARM: tegra: pluto: add entry for vdd_sys_bl
Laxman Dewangan [Fri, 7 Sep 2012 11:18:28 +0000]
ARM: tegra: pluto: add entry for vdd_sys_bl

vdd_sys_bl is from battery. So added in the always on
regulator.

Change-Id: I09031ace6fa484993d66cc1c5889994a5db0f7d4
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/130669
Reviewed-by: Automatic_Commit_Validation_User

7 years agoARM: tegra: pluto: add supply for ALS sensor.
Laxman Dewangan [Fri, 7 Sep 2012 10:38:15 +0000]
ARM: tegra: pluto: add supply for ALS sensor.

ALS sensor is mounted on GEN1_I2C address 0x44 (7 bit).
adding vdd supply for this sensor.

Bug 980722

Change-Id: I98f39763f2caf712cf853d13eec0b86b01bc904e
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/130659
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

7 years agoarm: tegra: board: remove board specific vbus initializers
Suresh Mangipudi [Tue, 4 Sep 2012 11:33:24 +0000]
arm: tegra: board: remove board specific vbus initializers

Removed the board dependency for the vbus regulators and the vbus gpio in
tegra platforms. Vbus need not be specified from the board files any more.

Change-Id: I0dbab40f8737138bd469600810a7a17407329149
Signed-off-by: Suresh Mangipudi <smangipudi@nvidia.com>
Reviewed-on: http://git-master/r/130648
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

7 years agoARM: tegra: config: remove REGULATOR_DUMMY config
Laxman Dewangan [Fri, 7 Sep 2012 06:36:54 +0000]
ARM: tegra: config: remove REGULATOR_DUMMY config

Remove dummy regulator support for Tegra3 android and
Tegra114 defconfig files as the regulator support is
added in the platform.

Change-Id: I7a835414bd907af63ed5954522f5e339ec3cef4a
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/130572
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

7 years agopm: EDP: adding sysfs entries
Sivaram Nair [Tue, 28 Aug 2012 16:08:29 +0000]
pm: EDP: adding sysfs entries

This patch adds sysfs entries to represent the EDP framework.  The sysfs
is at /sys/power/edp.

Change-Id: If562d7745a99e5324a982f91991d2dfeacacb84e
Signed-off-by: Sivaram Nair <sivaramn@nvidia.com>
Reviewed-on: http://git-master/r/130510
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>

7 years agoARM: tegra: dvfs: Add debugfs voltage offset knob
Alex Frid [Thu, 6 Sep 2012 02:01:55 +0000]
ARM: tegra: dvfs: Add debugfs voltage offset knob

Added debugfs voltage offset knob for cpu and core rails.

Change-Id: Ied18aefa6b98ccf44b48be54bae479dc73833247
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/130355
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

7 years agovideo: tegra: dsi: Handle video+host syncpt return
Animesh Kishore [Tue, 4 Sep 2012 17:36:33 +0000]
video: tegra: dsi: Handle video+host syncpt return

Fix unused sync point returned after
video+host transfer.

Bug 1003050

Change-Id: I7c42b1d1b4788ce5c4eafe4625aa336bb4bd38d4
Signed-off-by: Animesh Kishore <ankishore@nvidia.com>
Reviewed-on: http://git-master/r/130145
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

7 years agoarm: tegra: pluto: Add ACX442AKM-7 JDI panel support
Animesh Kishore [Fri, 7 Sep 2012 06:49:41 +0000]
arm: tegra: pluto: Add ACX442AKM-7 JDI panel support

4.7" 720x1280 JDI panel

Bug 1034528

Change-Id: Ie669887132feea6bf1e0e3f22ea42d5a632838df
Signed-off-by: Animesh Kishore <ankishore@nvidia.com>
Reviewed-on: http://git-master/r/130123
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
GVS: Gerrit_Virtual_Submit

7 years agovideo: tegra: dsi2edp: Add framework for toshiba TC358770 bridge
Animesh Kishore [Tue, 21 Aug 2012 11:46:37 +0000]
video: tegra: dsi2edp: Add framework for toshiba TC358770 bridge

Toshiba dsi to edp bridge.

Bug 1028789

Signed-off-by: Animesh Kishore <ankishore@nvidia.com>
Change-Id: I7d8e668c707d2924d5fccdddee09370a37706ad8
Reviewed-on: http://git-master/r/130115
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>

7 years agosdhci: tegra: use t11x post reset for non 2x and 3x
naveenk [Fri, 31 Aug 2012 00:14:57 +0000]
sdhci: tegra: use t11x post reset for non 2x and 3x

Bug 1017708

Change-Id: Id18496c546cd204e654c1c49b6b7a060f0aef6c0
Signed-off-by: naveen kumar arepalli <naveenk@nvidia.com>
Reviewed-on: http://git-master/r/130114
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

7 years agoarm: tegra: dalmore: Add toshiba TC358770 bridge support
Animesh Kishore [Fri, 7 Sep 2012 10:04:42 +0000]
arm: tegra: dalmore: Add toshiba TC358770 bridge support

toshiba dsi to edp bridge chip.

Bug 1028789

Change-Id: I1427817e8fdbaedac3f9bb8fe5c91a1f62e47e9b
Signed-off-by: Animesh Kishore <ankishore@nvidia.com>
Reviewed-on: http://git-master/r/130099
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

7 years agosdhci: tegra: Disable HS200, Packed Command Support
naveenk [Wed, 5 Sep 2012 09:02:01 +0000]
sdhci: tegra: Disable HS200, Packed Command Support

Disable HS200, Packed Command Support for eMMC 4.5

Bug 1017708

Change-Id: Ia0d18d7cc257915c2fcf689964e5570106c31ceb
Signed-off-by: naveen kumar arepalli <naveenk@nvidia.com>
Reviewed-on: http://git-master/r/130022
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Pradeep Goudagunta <pgoudagunta@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

7 years agoregulator: palmas: Clear PALMAS_SMPS12_CTRL_MODE_ACTIVE_MASK bits in palmas_set_mode_smps
Axel Lin [Thu, 7 Jun 2012 09:08:21 +0000]
regulator: palmas: Clear PALMAS_SMPS12_CTRL_MODE_ACTIVE_MASK bits in palmas_set_mode_smps

Current code actually clears more bits than PALMAS_SMPS12_CTRL_MODE_ACTIVE_MASK bits.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
(cherry picked from commit 999f0c7cb8e7c378bd1f3fcd56cf8dc5a30c83e4)

Change-Id: I16be7bc3237bbc3494d9bea87f0969f121722acc
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-on: http://git-master/r/130577
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

7 years agoregulator: palmas: Fix ldo enable and disable
Mallikarjun Kasoju [Fri, 7 Sep 2012 06:55:12 +0000]
regulator: palmas: Fix ldo enable and disable

Bug 1044908

Change-Id: Idff82e2780b48d4ee93c17123a712a7b0d7e416b
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-on: http://git-master/r/130570
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

7 years agoarm: tegra: pluto: Don't enable HSIC SMSC on t30
Mallikarjun Kasoju [Fri, 7 Sep 2012 05:30:16 +0000]
arm: tegra: pluto: Don't enable HSIC SMSC on t30

Enable HSIC SMSC hub only on t114

BUG 1045201

Change-Id: I5b14766b07f630989a3f65477eb7e7ee23a9391e
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-on: http://git-master/r/130494
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User

7 years agoarm: tegra: populate device nodes from device tree
Nitin Kumbhar [Wed, 29 Aug 2012 05:00:43 +0000]
arm: tegra: populate device nodes from device tree

Update init_machine routine for cardhu and enterprise
so that device nodes can be populated from device tree.

Disable nodes which are currently added from board files.

Bug 1036909

Change-Id: Iedf394bf5ea414b1e64cace565931991fec858a4
Signed-off-by: Nitin Kumbhar <nkumbhar@nvidia.com>
Reviewed-on: http://git-master/r/130158
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agobcmdhd: nvidia specific driver updates
Nitin Bindal [Tue, 4 Sep 2012 14:55:21 +0000]
bcmdhd: nvidia specific driver updates

1) Enable CONFIG_BCMDHD_WIFI_CONTROL_FUNC to power-up the chip
2) Disable CONFIG_BCMDHD_CSCAN_ENABLE and CONFIG_BCMDHD_CUSTOM_REGULATORY_DOMAIN (no longer needed)
3) Add support for BCM43241 module
4) Remove firmware path manipulation logic

Bug 982624

Change-Id: Ia6a350028c9671772549afadbe1848b788cc4609
Signed-off-by: Nitin Bindal <nbindal@nvidia.com>
Reviewed-on: http://git-master/r/130086
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Rakesh Kumar <krakesh@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoarch: arm: config: update bcmdhd kconfig variables
Nitin Bindal [Tue, 4 Sep 2012 14:49:37 +0000]
arch: arm: config: update bcmdhd kconfig variables

1)Remove unwanted Kconfig varibles
2)update nvram and firmware path

Bug 982624

Signed-off-by: Nitin Bindal <nbindal@nvidia.com>
Change-Id: I898bfe0bd86f6d25c2a78996feff0ec88f753aac
Reviewed-on: http://git-master/r/130085
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Rakesh Kumar <krakesh@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agosd8797: updated driver for kernel version >= K3.1
Nitin Bindal [Wed, 8 Aug 2012 12:19:35 +0000]
sd8797: updated driver for kernel version >= K3.1

marvell sd8797 driver update to support kernel >= K3.1

Bug 1043943

Change-Id: I0da2e755d14dbf0e182f4bab9748a70dc1dc8a74
Signed-off-by: Nitin Bindal <nbindal@nvidia.com>
Reviewed-on: http://git-master/r/130084
Reviewed-by: Rakesh Kumar <krakesh@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agonet: wireless: bcmdhd: Update to version 1.28.9-5
Dmitry Shmidt [Tue, 28 Aug 2012 01:32:09 +0000]
net: wireless: bcmdhd: Update to version 1.28.9-5

- Add cfg80211 del_station functionality
- Propagate disconnect error code for cfg80211

Change-Id: I0cf772f70323e9604da06d83340ff6cead07b84b
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Reviewed-on: http://git-master/r/130076
Reviewed-by: Nitin Bindal <nbindal@nvidia.com>
Tested-by: Nitin Bindal <nbindal@nvidia.com>
Reviewed-by: Rakesh Kumar <krakesh@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agonet: wireless: bcmdhd: Remove WIPHY_FLAG_SUPPORTS_FW_ROAM flag
Dmitry Shmidt [Wed, 22 Aug 2012 23:09:09 +0000]
net: wireless: bcmdhd: Remove WIPHY_FLAG_SUPPORTS_FW_ROAM flag

If driver advertises FW_ROAM, the supplicant wouldn't send
the BSSID & Freq in the connect command allowing the driver
to choose the AP to connect to. But unless we support ROAM_CACHE
in firware this will delay the ASSOC as the FW need to do a full
scan before attempting to connect.

Change-Id: Iebc88a60243196b9ad27b8302f2b1473710308f6
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
(cherry picked from commit c36a0067fbda423f546b2323c58afb3b89184763)
Reviewed-on: http://git-master/r/130075
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Nitin Bindal <nbindal@nvidia.com>
Tested-by: Nitin Bindal <nbindal@nvidia.com>
Reviewed-by: Rakesh Kumar <krakesh@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agonet: wireless: bcmdhd: Remove WL_CFG80211_SYNC_GON option
Dmitry Shmidt [Mon, 20 Aug 2012 21:54:10 +0000]
net: wireless: bcmdhd: Remove WL_CFG80211_SYNC_GON option

Change-Id: Iee0f977c6d4d5339e83b713740b7e8700e135008
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
(cherry picked from commit e1480edcc45a60aa781548bbb9f9534c30c12b4c)
Reviewed-on: http://git-master/r/130074
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Nitin Bindal <nbindal@nvidia.com>
Tested-by: Nitin Bindal <nbindal@nvidia.com>
Reviewed-by: Rakesh Kumar <krakesh@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agonet: wireless: bcmdhd: Update to Version 1.28.9-2
Dmitry Shmidt [Mon, 20 Aug 2012 18:19:20 +0000]
net: wireless: bcmdhd: Update to Version 1.28.9-2

Change-Id: Ifd55ef8645a7cf613bcbd1f5ea3a71fe249a96ac
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Reviewed-on: http://git-master/r/130073
Reviewed-by: Nitin Bindal <nbindal@nvidia.com>
Tested-by: Nitin Bindal <nbindal@nvidia.com>
Reviewed-by: Rakesh Kumar <krakesh@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agonet: wireless: bcmdhd: Remove obsolete files
Dmitry Shmidt [Thu, 16 Aug 2012 19:56:17 +0000]
net: wireless: bcmdhd: Remove obsolete files

Change-Id: I2969ecf8008e04f88757ec7a41285f11b9e2b928
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
(cherry picked from commit 783a15162f0b2a11c7cdd3f2f3586feab3148b82)
Reviewed-on: http://git-master/r/130072
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Nitin Bindal <nbindal@nvidia.com>
Tested-by: Nitin Bindal <nbindal@nvidia.com>
Reviewed-by: Rakesh Kumar <krakesh@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agocfg80211: restructure AP/GO mode API
Johannes Berg [Mon, 13 Feb 2012 14:17:18 +0000]
cfg80211: restructure AP/GO mode API

The AP/GO mode API isn't very clearly defined, it
has "set beacon" and "new beacon" etc.

Modify the API to the following:
 * start AP -- all settings
 * change beacon -- new beacon data
 * stop AP -- stop AP mode operation

This also reflects in the nl80211 API, rename
the commands there correspondingly (but keep
the old names for compatibility.)

Overall, this makes it much clearer what's going
on in the API.

Kalle developed the ath6kl changes, I created
the rest of the patch.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Change-Id: I93e94c16a38dd2662b2cde1269fa94f81327caaa
Reviewed-on: http://git-master/r/130071
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Nitin Bindal <nbindal@nvidia.com>
Tested-by: Nitin Bindal <nbindal@nvidia.com>
Reviewed-by: Rakesh Kumar <krakesh@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agonet: wireless: bcmdhd: Update to version 1.28-8
Dmitry Shmidt [Thu, 2 Aug 2012 20:22:53 +0000]
net: wireless: bcmdhd: Update to version 1.28-8

Change-Id: Ie264f2b31bd2d4aebf0eef0d2165beb2d73ecb

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Change-Id: I69c6a3905b675eeac7016bd26f45cc5ec5b21e1c
Reviewed-on: http://git-master/r/130070
Reviewed-by: Nitin Bindal <nbindal@nvidia.com>
Tested-by: Nitin Bindal <nbindal@nvidia.com>
Reviewed-by: Rakesh Kumar <krakesh@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agonet: wireless: bcmdhd: Adjust driver/fw/chip info format
Dmitry Shmidt [Fri, 13 Jul 2012 21:38:32 +0000]
net: wireless: bcmdhd: Adjust driver/fw/chip info format

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
(cherry picked from commit b95d9dd57ed4c88ba5eb266a424687501e7234c9)
Change-Id: Ia890b89b6736a5ec2b38f2753e3284d0322bc24a
Reviewed-on: http://git-master/r/130069
Reviewed-by: Nitin Bindal <nbindal@nvidia.com>
Tested-by: Nitin Bindal <nbindal@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Rakesh Kumar <krakesh@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agonet: wireless: bcmdhd: Use proper jiffie-related functions
Dmitry Shmidt [Fri, 13 Jul 2012 21:30:33 +0000]
net: wireless: bcmdhd: Use proper jiffie-related functions

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
(cherry picked from commit 0902d6976ea2516970e1d303ff77f529eb089f3e)
Change-Id: I5d71673a3be36069b6c2907c40e63a8d8ae85a15
Reviewed-on: http://git-master/r/130068
Reviewed-by: Nitin Bindal <nbindal@nvidia.com>
Tested-by: Nitin Bindal <nbindal@nvidia.com>
Reviewed-by: Rakesh Kumar <krakesh@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agonet: wireless: bcmdhd: Decrease chip recognition attempts to 3
Dmitry Shmidt [Fri, 13 Jul 2012 20:31:19 +0000]
net: wireless: bcmdhd: Decrease chip recognition attempts to 3

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
(cherry picked from commit aabc63c27098f31eede28db9e938af5ceef71973)
Change-Id: I0fec4bc566575c371896c786ad8b56355324c0ce
Reviewed-on: http://git-master/r/130067
Reviewed-by: Nitin Bindal <nbindal@nvidia.com>
Tested-by: Nitin Bindal <nbindal@nvidia.com>
Reviewed-by: Rakesh Kumar <krakesh@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

7 years agoARM: tegra11: clock: Enforce PLLX DIV2 bypass early
Alex Frid [Wed, 5 Sep 2012 04:31:44 +0000]
ARM: tegra11: clock: Enforce PLLX DIV2 bypass early

If booting on G CPU, enforced PLLX DIV2 bypass setting early -
during super clock initialization.

Change-Id: Iab40a748ee6fd4a6004655b5cd15f3f90130c5c0
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/130362
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

7 years agoregulator: Pass voltage level to change notification
Alex Frid [Fri, 31 Aug 2012 19:12:36 +0000]
regulator: Pass voltage level to change notification

Passed voltage level to notification chain for events:
REGULATOR_EVENT_OUT_PRECHANGE and REGULATOR_EVENT_OUT_POSTCHANGE.

Change-Id: Ia94495c2237f56ebba2d456af4cd2fc7e98d3e20
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/130354
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

7 years agoARM: tegra11: dvfs: Update dvfs tables and parameters
Alex Frid [Fri, 31 Aug 2012 06:19:19 +0000]
ARM: tegra11: dvfs: Update dvfs tables and parameters

- increased maximum voltage on CPU rail
- updated host1x and sdmmc tables
- added xusb clocks dvfs tables
- change clk_out maximum limits

Change-Id: Id34a0242891bc21fd25815765c57d9913b02bbc1
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/130351
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

7 years agoARM: tegra11: clock: Add XUSB device partition clock support
Alex Frid [Tue, 4 Sep 2012 19:25:44 +0000]
ARM: tegra11: clock: Add XUSB device partition clock support

Change-Id: If7bf21fd1187038b54412d4bcd00f0a779111baf
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/130350
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

7 years agoARM: tegra11: clock: Add XUSB HS clock support
Alex Frid [Fri, 31 Aug 2012 00:14:52 +0000]
ARM: tegra11: clock: Add XUSB HS clock support

Change-Id: I971bb6f2b1144877b91fdc32443b76f67b387563
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/130349
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

7 years agoARM: tegra11: clock: Change initial state of no enable peripherals
Alex Frid [Thu, 30 Aug 2012 20:46:40 +0000]
ARM: tegra11: clock: Change initial state of no enable peripherals

Set initial state of peripherals with no h/w enable control same as
initial parent state (instead of unconditional ON state).

Change-Id: Icbda7c1f9c9dad3e198382a0971638910e65ca5f
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/130348
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

7 years agoARM: tegra11: dvfs: Add core buses cap sysfs interface
Alex Frid [Thu, 30 Aug 2012 07:13:23 +0000]
ARM: tegra11: dvfs: Add core buses cap sysfs interface

/sys/kernel/tegra_cap/core_cap_level - common cap level for all core
shared buses: emc (memory), sbus (system clock), and cbuses (graphics
clocks). Cap level is specified in millivolts, and maximum rate limits
from the respective dvfs tables are applied to all bus clocks. Note
that cap level affects only bus frequencies. Core voltage is not
necessarily set at the cap level, since CPU and/or fixed peripheral
clocks outside the buses may require higher voltages.

/sys/kernel/tegra_cap/core_cap_state - provides enable/disable control
of cap level throttling effect.

Change-Id: Id56b1b8c1b0e2fb59e71f93f64cecad85506db5f
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/130347
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

7 years agoARM: Tegra: Dalmore: Enable HDMI in panel file
Graziano Misuraca [Thu, 6 Sep 2012 20:33:54 +0000]
ARM: Tegra: Dalmore: Enable HDMI in panel file

Enable HDMI output on T30 Dalmore boards.

Bug 1043813

Change-Id: If75c6c04177438a2a6777bba275c84d2e9e17d5f
Signed-off-by: Graziano Misuraca <gmisuraca@nvidia.com>
Reviewed-on: http://git-master/r/130291
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User

7 years agovideo: tegra: nvmap: Update with new dma_map_ops
Hiroshi Doyu [Thu, 16 Aug 2012 11:23:03 +0000]
video: tegra: nvmap: Update with new dma_map_ops

Updated to use new dma_map_ops.

New DMA_ATTR_SKIP_CPU_SYNC attr to skip cache_maint instead of custom
usage of DMA_NONE.

Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>

7 years agoarm: tegra: Rename PLATFORM_IOMMUABLE to PLATFORM_ENABLE_IOMMU
Hiroshi Doyu [Tue, 28 Aug 2012 07:19:54 +0000]
arm: tegra: Rename PLATFORM_IOMMUABLE to PLATFORM_ENABLE_IOMMU

Rename PLATFORM_IOMMUABLE to PLATFORM_ENABLE_IOMMU.

Change-Id: Ifd09355cc3f86678dbf0e85f048fde4be1bbec20

7 years agoARM: dma-mapping: Avoid to overwrite a map
Hiroshi Doyu [Wed, 29 Aug 2012 08:38:52 +0000]
ARM: dma-mapping: Avoid to overwrite a map

Avoid to overwrite a map, and warn it.

Change-Id: Ieef971bf8dc7e9719445b7b253daa55f4c109ae2
Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>

7 years agoplatform: IOMMU'able platform_device w/ PLATFORM_ENABLE_IOMMU
Hiroshi Doyu [Thu, 22 Mar 2012 14:06:27 +0000]
platform: IOMMU'able platform_device w/ PLATFORM_ENABLE_IOMMU

Introduced a new kernel config option, PLATFORM_ENABLE_IOMMU. With
this, all platform devices can be converted to be IOMMU'able if
platform_bus has non-null dma_iommu_map, where H/Ws always see its IO
virtual address and virt_to_phys() doesn't work from H/W POV.

Change-Id: Iafc4cac73624cfa0bb0f513febd7d91c59954268
Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>

7 years agoARM: dma-mapping: Introduce dma_map_linear_attrs() for IOVA linear map
Hiroshi Doyu [Wed, 25 Jul 2012 13:46:28 +0000]
ARM: dma-mapping: Introduce dma_map_linear_attrs() for IOVA linear map

Introduce a helper function, dma_map_linear(_attrs)() to create IOVA
linear map, where IOVA and kernel virtual addresses are mapped at the
same address linearly. This is useful to support legacy device drivers
which expects no IOMMU.

Change-Id: Iedd7cd291b1c2a814ac0270344ceb4f439d47a00
Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>

7 years agoARM: dma-mapping: New dma_map_ops->map_page*_at* function
Hiroshi Doyu [Mon, 27 Aug 2012 09:13:10 +0000]
ARM: dma-mapping: New dma_map_ops->map_page*_at* function

Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>

7 years agoARM: dma-mapping: New dma_map_ops->iova_alloc*_at* function
Hiroshi Doyu [Mon, 27 Aug 2012 08:58:42 +0000]
ARM: dma-mapping: New dma_map_ops->iova_alloc*_at* function

To allocate IOVA area at specified address

Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>

7 years agoARM: dma-mapping: New dma_map_ops->iova_{alloc,free}() functions
Hiroshi Doyu [Thu, 17 May 2012 20:10:26 +0000]
ARM: dma-mapping: New dma_map_ops->iova_{alloc,free}() functions

There are some cases that IOVA allocation and mapping have to be done
seperately, especially for perf optimization reasons. This patch
allows client modules to {alloc,free} IOVA space without backing up
actual pages for that area.

Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>

7 years agoARM: dma-mapping: New dma_map_ops->iova_get_free_{total,max} functions
Hiroshi Doyu [Tue, 6 Mar 2012 09:24:16 +0000]
ARM: dma-mapping: New dma_map_ops->iova_get_free_{total,max} functions

->iova>_get_free_total() returns the sum of available free areas.
->iova>_get_free_max() returns the largest available free area size.

Change-Id: I817ff46bea799a809e2e6b163b2e86cb737cf077
Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>

7 years agoARM: dma-mapping: Skip cache maint for invalid page
Hiroshi Doyu [Tue, 28 Aug 2012 08:51:56 +0000]
ARM: dma-mapping: Skip cache maint for invalid page

Skip cache maint for invalid page but warn it.

Change-Id: I780587d132fd9440767046877c0724939897889f
Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>

7 years agoARM: dma-mapping: Refrain noisy console message
Hiroshi Doyu [Mon, 6 Aug 2012 09:31:04 +0000]
ARM: dma-mapping: Refrain noisy console message

With many IOMMU'able devices, console gets noisy.

Tegra30 has a few dozen of IOMMU'able devices.

Change-Id: I031fd6b5e88d04d3d2ab117677ca9ab2535ba475
Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>

7 years agoARM: dma-mapping: Remove unsed var at arm_coherent_iommu_unmap_page
Hiroshi Doyu [Mon, 27 Aug 2012 05:40:43 +0000]
ARM: dma-mapping: Remove unsed var at arm_coherent_iommu_unmap_page

Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>

7 years agoARM: dma-mapping: Small logical clean up
Hiroshi Doyu [Fri, 24 Aug 2012 08:47:59 +0000]
ARM: dma-mapping: Small logical clean up

Skip unnecessary operations if order == 0. A little bit easier to
read.

Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>

7 years agoarm: config: tegra: enable CMA
Hiroshi Doyu [Tue, 31 Jul 2012 06:11:17 +0000]
arm: config: tegra: enable CMA

Enable contiguous memory allocator (CMA).

Change-Id: I3f4d113e88ee45e24202bebec9f1951121aef1bf
Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>

7 years agoarm: config: tegra2: enable CMA
Hiroshi Doyu [Tue, 31 Jul 2012 06:10:39 +0000]
arm: config: tegra2: enable CMA

Enable contiguous memory allocator (CMA).

Change-Id: I1ea2886e6a839e64f9ba6692979eee5f84d7b8b3
Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>

7 years agoarm: config: tegra3: enable CMA
Hiroshi Doyu [Wed, 11 Jul 2012 07:07:10 +0000]
arm: config: tegra3: enable CMA

Enable contiguous memory allocator (CMA).

Change-Id: Id5acc9fbf5dcbdb2871d5e0f40e2855d8ba2d335
Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>

7 years agodma-buf: minor documentation fixes.
Sumit Semwal [Wed, 23 May 2012 09:57:40 +0000]
dma-buf: minor documentation fixes.

Some minor inline documentation fixes for gaps resulting from new patches.

Change-Id: I58680d261ae5574582d654c58b61067ac5e82f3b
Signed-off-by: Sumit Semwal <sumit.semwal@ti.com>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>

7 years agodma-buf: add vmap interface
Dave Airlie [Sun, 20 May 2012 07:03:56 +0000]
dma-buf: add vmap interface

The main requirement I have for this interface is for scanning out
using the USB gpu devices. Since these devices have to read the
framebuffer on updates and linearly compress it, using kmaps
is a major overhead for every update.

v2: fix warn issues pointed out by Sylwester Nawrocki.

v3: fix compile !CONFIG_DMA_SHARED_BUFFER and add _GPL for now

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Rob Clark <rob.clark@linaro.org>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>

7 years agoARM: dma-mapping: IOMMU allocates pages from atomic_pool with GFP_ATOMIC
Hiroshi Doyu [Thu, 23 Aug 2012 12:25:09 +0000]
ARM: dma-mapping: IOMMU allocates pages from atomic_pool with GFP_ATOMIC

Make use of the same atomic pool as DMA does, and skip a kernel page
mapping which can involve sleep'able operations at allocating a kernel
page table.

Change-Id: I72e62f521d2d357621aa5a7fd6f513ec941a49e2
Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>

7 years agoARM: dma-mapping: Introduce __atomic_get_pages() for __iommu_get_pages()
Hiroshi Doyu [Thu, 23 Aug 2012 12:24:06 +0000]
ARM: dma-mapping: Introduce __atomic_get_pages() for __iommu_get_pages()

Support atomic allocation in __iommu_get_pages().

Change-Id: I16f94a0ad9a54ffc53bac4e53c090336c4b5560d
Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>

7 years agoARM: dma-mapping: Refactor out to introduce __in_atomic_pool
Hiroshi Doyu [Wed, 22 Aug 2012 14:26:29 +0000]
ARM: dma-mapping: Refactor out to introduce __in_atomic_pool

Check the given range("start", "size") is included in "atomic_pool" or not.

Change-Id: I6e5e08784917054481e7c767eb742866c60abe83
Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>

7 years agoARM: dma-mapping: atomic_pool with struct page **pages
Hiroshi Doyu [Fri, 24 Aug 2012 06:36:41 +0000]
ARM: dma-mapping: atomic_pool with struct page **pages

struct page **pages is necessary to align with non atomic path in
__iommu_get_pages(). atomic_pool() has the intialized **pages instead
of just *page.

Change-Id: I3d8c2501fb7c74dc28226510f48f0e2c126e0076
Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>

7 years agodrivers: dma-contiguous: refactor dma_alloc_from_contiguous()
Michal Nazarewicz [Fri, 24 Aug 2012 17:34:05 +0000]
drivers: dma-contiguous: refactor dma_alloc_from_contiguous()

The dma_alloc_from_contiguous() function returns either a valid pointer
to a page structure or NULL, the error code set when pageno >= cma->count
is not used at all and can be safely removed.

This commit also changes the function to avoid goto and have only one exit
path and one place where mutex is unlocked.

Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

7 years agomm: cma: fix alignment requirements for contiguous regions
Marek Szyprowski [Mon, 27 Aug 2012 18:27:19 +0000]
mm: cma: fix alignment requirements for contiguous regions

Contiguous Memory Allocator requires each of its regions to be aligned
in such a way that it is possible to change migration type for all
pageblocks holding it and then isolate page of largest possible order from
the buddy allocator (which is MAX_ORDER-1). This patch relaxes alignment
requirements by one order, because MAX_ORDER alignment is not really
needed.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
CC: Michal Nazarewicz <mina86@mina86.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>

7 years agoARM: DMA-Mapping: print warning when atomic coherent allocation fails
Marek Szyprowski [Wed, 22 Aug 2012 12:50:42 +0000]
ARM: DMA-Mapping: print warning when atomic coherent allocation fails

Print a loud warning when system runs out of memory from atomic DMA
coherent pool to let users notice the potential problem.

Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

7 years agoARM: DMA-Mapping: add function for setting coherent pool size from platform code
Marek Szyprowski [Mon, 20 Aug 2012 09:19:25 +0000]
ARM: DMA-Mapping: add function for setting coherent pool size from platform code

Some platforms might require to increase atomic coherent pool to make
sure that their device will be able to allocate all their buffers from
atomic context. This function can be also used to decrease atomic
coherent pool size if coherent allocations are not used for the given
sub-platform.

Suggested-by: Josh Coombs <josh.coombs@gmail.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

7 years agoARM: add coherent iommu dma ops
Rob Herring [Tue, 21 Aug 2012 10:23:23 +0000]
ARM: add coherent iommu dma ops

Remove arch_is_coherent() from iommu dma ops and implement separate
coherent ops functions.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

7 years agoARM: add coherent dma ops
Rob Herring [Tue, 21 Aug 2012 10:20:17 +0000]
ARM: add coherent dma ops

arch_is_coherent is problematic as it is a global symbol. This
doesn't work for multi-platform kernels or platforms which can support
per device coherent DMA.

This adds arm_coherent_dma_ops to be used for devices which connected
coherently (i.e. to the ACP port on Cortex-A9 or A15). The arm_dma_ops
are modified at boot when arch_is_coherent is true.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

7 years agoARM: dma: Drop GFP_COMP for DMA-IOMMU memory allocations
Hiroshi Doyu [Mon, 2 Apr 2012 07:42:02 +0000]
ARM: dma: Drop GFP_COMP for DMA-IOMMU memory allocations

dma_alloc_coherent wants to split pages after allocation in order to
reduce the memory footprint. This does not work well with GFP_COMP
pages, so drop this flag before allocation.

This patch is ported from arch/avr32
(commit 3611553ef985ef7c5863c8a94641738addd04cff).

Change-Id: I67eb2b15807c36c6a3ade95ee35bf5856d8e0e11
Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>

7 years agoARM: mm: Replace lowmem_limit with arm_lowmem_limit
Hiroshi Doyu [Fri, 13 Jul 2012 10:37:39 +0000]
ARM: mm: Replace lowmem_limit with arm_lowmem_limit

Only for NV's enhancement part.

Change-Id: I065f377126a6cee372337567fb7241abe9d4563f
Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>

7 years agoARM: dma-mapping: fix incorrect freeing of atomic allocations
Aaro Koskinen [Tue, 7 Aug 2012 12:44:05 +0000]
ARM: dma-mapping: fix incorrect freeing of atomic allocations

Commit e9da6e9905e639b0f842a244bc770b48ad0523e9 (ARM: dma-mapping:
remove custom consistent dma region) changed the way atomic allocations
are handled. However, arm_dma_free() was not modified accordingly, and
as a result freeing of atomic allocations does not work correctly when
CMA is disabled. Memory is leaked and following WARNINGs are seen:

[   57.698911] ------------[ cut here ]------------
[   57.753518] WARNING: at arch/arm/mm/dma-mapping.c:263 arm_dma_free+0x88/0xe4()
[   57.811473] trying to free invalid coherent area: e0848000
[   57.867398] Modules linked in: sata_mv(-)
[   57.921373] [<c000d270>] (unwind_backtrace+0x0/0xf0) from [<c0015430>] (warn_slowpath_common+0x50/0x68)
[   58.033924] [<c0015430>] (warn_slowpath_common+0x50/0x68) from [<c00154dc>] (warn_slowpath_fmt+0x30/0x40)
[   58.152024] [<c00154dc>] (warn_slowpath_fmt+0x30/0x40) from [<c000dc18>] (arm_dma_free+0x88/0xe4)
[   58.219592] [<c000dc18>] (arm_dma_free+0x88/0xe4) from [<c008fa30>] (dma_pool_destroy+0x100/0x148)
[   58.345526] [<c008fa30>] (dma_pool_destroy+0x100/0x148) from [<c019a64c>] (release_nodes+0x144/0x218)
[   58.475782] [<c019a64c>] (release_nodes+0x144/0x218) from [<c0197e10>] (__device_release_driver+0x60/0xb8)
[   58.614260] [<c0197e10>] (__device_release_driver+0x60/0xb8) from [<c0198608>] (driver_detach+0xd8/0xec)
[   58.756527] [<c0198608>] (driver_detach+0xd8/0xec) from [<c0197c54>] (bus_remove_driver+0x7c/0xc4)
[   58.901648] [<c0197c54>] (bus_remove_driver+0x7c/0xc4) from [<c004bfac>] (sys_delete_module+0x19c/0x220)
[   59.051447] [<c004bfac>] (sys_delete_module+0x19c/0x220) from [<c0009140>] (ret_fast_syscall+0x0/0x2c)
[   59.207996] ---[ end trace 0745420412c0325a ]---
[   59.287110] ------------[ cut here ]------------
[   59.366324] WARNING: at arch/arm/mm/dma-mapping.c:263 arm_dma_free+0x88/0xe4()
[   59.450511] trying to free invalid coherent area: e0847000
[   59.534357] Modules linked in: sata_mv(-)
[   59.616785] [<c000d270>] (unwind_backtrace+0x0/0xf0) from [<c0015430>] (warn_slowpath_common+0x50/0x68)
[   59.790030] [<c0015430>] (warn_slowpath_common+0x50/0x68) from [<c00154dc>] (warn_slowpath_fmt+0x30/0x40)
[   59.972322] [<c00154dc>] (warn_slowpath_fmt+0x30/0x40) from [<c000dc18>] (arm_dma_free+0x88/0xe4)
[   60.070701] [<c000dc18>] (arm_dma_free+0x88/0xe4) from [<c008fa30>] (dma_pool_destroy+0x100/0x148)
[   60.256817] [<c008fa30>] (dma_pool_destroy+0x100/0x148) from [<c019a64c>] (release_nodes+0x144/0x218)
[   60.445201] [<c019a64c>] (release_nodes+0x144/0x218) from [<c0197e10>] (__device_release_driver+0x60/0xb8)
[   60.634148] [<c0197e10>] (__device_release_driver+0x60/0xb8) from [<c0198608>] (driver_detach+0xd8/0xec)
[   60.823623] [<c0198608>] (driver_detach+0xd8/0xec) from [<c0197c54>] (bus_remove_driver+0x7c/0xc4)
[   61.013268] [<c0197c54>] (bus_remove_driver+0x7c/0xc4) from [<c004bfac>] (sys_delete_module+0x19c/0x220)
[   61.203472] [<c004bfac>] (sys_delete_module+0x19c/0x220) from [<c0009140>] (ret_fast_syscall+0x0/0x2c)
[   61.393390] ---[ end trace 0745420412c0325b ]---

The patch fixes this.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

7 years agoARM: dma-mapping: fix atomic allocation alignment
Aaro Koskinen [Tue, 7 Aug 2012 12:39:25 +0000]
ARM: dma-mapping: fix atomic allocation alignment

The alignment mask is calculated incorrectly. Fixing the calculation
makes strange hangs/lockups disappear during the boot with Amstrad E3
and 3.6-rc1 kernel.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

7 years agoARM: mm: fix MMU mapping of CMA regions
Chris Brand [Tue, 7 Aug 2012 12:01:14 +0000]
ARM: mm: fix MMU mapping of CMA regions

Fix dma_contiguous_remap() so that it continues through all the
regions, even after encountering one that is outside lowmem.
Without this change, if you have two CMA regions, the first outside
lowmem and the seocnd inside lowmem, only the second one will get
set up in the MMU. Data written to that region then doesn't get
automatically flushed from the cache into memory.

Signed-off-by: Chris Brand <cbrand@broadcom.com>
[extended patch subject with 'fix' word]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

7 years agoARM: dma-mapping: add support for DMA_ATTR_SKIP_CPU_SYNC attribute
Marek Szyprowski [Wed, 6 Jun 2012 12:50:56 +0000]
ARM: dma-mapping: add support for DMA_ATTR_SKIP_CPU_SYNC attribute

This patch adds support for DMA_ATTR_SKIP_CPU_SYNC attribute for
dma_(un)map_(single,page,sg) functions family. It lets dma mapping clients
to create a mapping for the buffer for the given device without performing
a CPU cache synchronization. CPU cache synchronization can be skipped for
the buffers which it is known that they are already in 'device' domain (CPU
caches have been already synchronized or there are only coherent mappings
for the buffer). For advanced users only, please use it with care.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>

7 years agocommon: DMA-mapping: add DMA_ATTR_SKIP_CPU_SYNC attribute
Marek Szyprowski [Wed, 6 Jun 2012 12:46:44 +0000]
common: DMA-mapping: add DMA_ATTR_SKIP_CPU_SYNC attribute

This patch adds DMA_ATTR_SKIP_CPU_SYNC attribute to the DMA-mapping
subsystem.

By default dma_map_{single,page,sg} functions family transfer a given
buffer from CPU domain to device domain. Some advanced use cases might
require sharing a buffer between more than one device. This requires
having a mapping created separately for each device and is usually
performed by calling dma_map_{single,page,sg} function more than once
for the given buffer with device pointer to each device taking part in
the buffer sharing. The first call transfers a buffer from 'CPU' domain
to 'device' domain, what synchronizes CPU caches for the given region
(usually it means that the cache has been flushed or invalidated
depending on the dma direction). However, next calls to
dma_map_{single,page,sg}() for other devices will perform exactly the
same sychronization operation on the CPU cache. CPU cache sychronization
might be a time consuming operation, especially if the buffers are
large, so it is highly recommended to avoid it if possible.
DMA_ATTR_SKIP_CPU_SYNC allows platform code to skip synchronization of
the CPU cache for the given buffer assuming that it has been already
transferred to 'device' domain. This attribute can be also used for
dma_unmap_{single,page,sg} functions family to force buffer to stay in
device domain after releasing a mapping for it. Use this attribute with
care!

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>

7 years agoARM: dma-mapping: add support for dma_get_sgtable()
Marek Szyprowski [Wed, 13 Jun 2012 08:01:15 +0000]
ARM: dma-mapping: add support for dma_get_sgtable()

This patch adds support for dma_get_sgtable() function which is required
to let drivers to share the buffers allocated by DMA-mapping subsystem.

Generic implementation based on virt_to_page() is not suitable for ARM
dma-mapping subsystem.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>

7 years agocommon: dma-mapping: introduce dma_get_sgtable() function
Marek Szyprowski [Wed, 13 Jun 2012 08:05:52 +0000]
common: dma-mapping: introduce dma_get_sgtable() function

This patch adds dma_get_sgtable() function which is required to let
drivers to share the buffers allocated by DMA-mapping subsystem. Right
now the driver gets a dma address of the allocated buffer and the kernel
virtual mapping for it. If it wants to share it with other device (= map
into its dma address space) it usually hacks around kernel virtual
addresses to get pointers to pages or assumes that both devices share
the DMA address space. Both solutions are just hacks for the special
cases, which should be avoided in the final version of buffer sharing.

To solve this issue in a generic way, a new call to DMA mapping has been
introduced - dma_get_sgtable(). It allocates a scatter-list which
describes the allocated buffer and lets the driver(s) to use it with
other device(s) by calling dma_map_sg() on it.

This patch provides a generic implementation based on virt_to_page()
call. Architectures which require more sophisticated translation might
provide their own get_sgtable() methods.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

7 years agoARM: dma-mapping: add support for DMA_ATTR_NO_KERNEL_MAPPING attribute
Marek Szyprowski [Wed, 16 May 2012 18:38:58 +0000]
ARM: dma-mapping: add support for DMA_ATTR_NO_KERNEL_MAPPING attribute

This patch adds support for DMA_ATTR_NO_KERNEL_MAPPING attribute for
IOMMU allocations, what let drivers to save precious kernel virtual
address space for large buffers that are intended to be accessed only
from userspace.

This patch is heavily based on initial work kindly provided by Abhinav
Kochhar <abhinav.k@samsung.com>.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>

7 years agocommon: DMA-mapping: add DMA_ATTR_NO_KERNEL_MAPPING attribute
Marek Szyprowski [Wed, 16 May 2012 13:20:37 +0000]
common: DMA-mapping: add DMA_ATTR_NO_KERNEL_MAPPING attribute

This patch adds DMA_ATTR_NO_KERNEL_MAPPING attribute which lets the
platform to avoid creating a kernel virtual mapping for the allocated
buffer. On some architectures creating such mapping is non-trivial task
and consumes very limited resources (like kernel virtual address space
or dma consistent address space). Buffers allocated with this attribute
can be only passed to user space by calling dma_mmap_attrs().

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

7 years agocommon: dma-mapping: add support for generic dma_mmap_* calls
Marek Szyprowski [Thu, 14 Jun 2012 11:03:04 +0000]
common: dma-mapping: add support for generic dma_mmap_* calls

Commit 9adc5374 ('common: dma-mapping: introduce mmap method') added a
generic method for implementing mmap user call to dma_map_ops structure.

This patch converts ARM and PowerPC architectures (the only providers of
dma_mmap_coherent/dma_mmap_writecombine calls) to use this generic
dma_map_ops based call and adds a generic cross architecture
definition for dma_mmap_attrs, dma_mmap_coherent, dma_mmap_writecombine
functions.

The generic mmap virt_to_page-based fallback implementation is provided for
architectures which don't provide their own implementation for mmap method.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>

7 years agoARM: dma-mapping: fix error path for memory allocation failure
Marek Szyprowski [Fri, 27 Jul 2012 15:12:50 +0000]
ARM: dma-mapping: fix error path for memory allocation failure

This patch fixes incorrect check in error path. When the allocation of
first page fails, the kernel ops appears due to accessing -1 element of
the pages array.

Reported-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

7 years agoARM: dma-mapping: add more sanity checks in arm_dma_mmap()
Marek Szyprowski [Mon, 30 Jul 2012 07:35:26 +0000]
ARM: dma-mapping: add more sanity checks in arm_dma_mmap()

Add some sanity checks and forbid mmaping of buffers into vma areas larger
than allocated dma buffer.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

7 years agoARM: dma-mapping: remove custom consistent dma region
Marek Szyprowski [Mon, 30 Jul 2012 07:11:33 +0000]
ARM: dma-mapping: remove custom consistent dma region

This patch changes dma-mapping subsystem to use generic vmalloc areas
for all consistent dma allocations. This increases the total size limit
of the consistent allocations and removes platform hacks and a lot of
duplicated code.

Atomic allocations are served from special pool preallocated on boot,
because vmalloc areas cannot be reliably created in atomic context.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Minchan Kim <minchan@kernel.org>

Conflicts:

arch/arm/mm/dma-mapping.c

Change-Id: I376c99671f8dc3d078d1951022bacec4e46d5865
Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>

7 years agomm: vmalloc: use const void * for caller argument
Marek Szyprowski [Fri, 13 Apr 2012 10:32:09 +0000]
mm: vmalloc: use const void * for caller argument

'const void *' is a safer type for caller function type. This patch
updates all references to caller function type.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Minchan Kim <minchan@kernel.org>

7 years agolib/scatterlist: do not re-write gfp_flags in __sg_alloc_table()
Mandeep Singh Baines [Mon, 30 Jul 2012 21:43:22 +0000]
lib/scatterlist: do not re-write gfp_flags in __sg_alloc_table()

We are seeing a lot of sg_alloc_table allocation failures using the new
drm prime infrastructure.  We isolated the cause to code in
__sg_alloc_table that was re-writing the gfp_flags.

There is a comment in the code that suggest that there is an assumption
about the allocation coming from a memory pool.  This was likely true
when sg lists were primarily used for disk I/O.

Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Cong Wang <amwang@redhat.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Rob Clark <rob.clark@linaro.org>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Inki Dae <inki.dae@samsung.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Sonny Rao <sonnyrao@chromium.org>
Cc: Olof Johansson <olofj@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>