linux.git
9 years agovideo: tegra: nvmap: prevent null pointer dereference Apalis_T30_LinuxImageV2.3Beta3_20141031 Colibri_T20_LinuxImageV2.3Beta3_20141031 Colibri_T30_LinuxImageV2.3Beta3_20141031
Mariusz Glebocki [Thu, 9 Oct 2014 14:28:12 +0000 (16:28 +0200)]
video: tegra: nvmap: prevent null pointer dereference

9 years agoapalis/colibri t30: fix audio hub lock-up
Marcel Ziswiler [Thu, 25 Sep 2014 21:38:25 +0000 (23:38 +0200)]
apalis/colibri t30: fix audio hub lock-up

This patch fixes a clock related audio hub driver lock-up observed when
booting with mainline U-Boot which we are in the process of migrating
to now.

9 years agommc: tegra: mark host as CMD23 capable
Stefan Agner [Thu, 25 Sep 2014 13:22:25 +0000 (15:22 +0200)]
mmc: tegra: mark host as CMD23 capable

Newer eMMC standards use CMD23 for multi-block transfer. These
command has the advantage that only one command is necessary, no
stop command after the transfer is required. The kernel already
supports this command, but we need to enable the capability on
the host level.

Tests verified that the MMC code detects that SD-card do not
support CMD23 and hence don't use that command.

9 years agoyaffs: fix spinning when flush inodes
Stefan Agner [Fri, 19 Sep 2014 12:09:51 +0000 (14:09 +0200)]
yaffs: fix spinning when flush inodes

While in list_for_each_entry() of yaffs_flush_inodes, the fs code
can delete inodes. This leads to an endless loop which causes a
softlockup. Typically this happend in sync_supers when creating
and deleting files while under CPU load.

This fix checks whether we get twice the same inode. If this is
true, we just retry again.

This is an alternative fix to the proposed fix Jisheng Zhang:
yaffs: fix softlockup cauesed by inode deleted when scanning s_inodes list
http://www.aleph1.co.uk/lurker/message/20110831.075307.3cfeacdf.fr.html

9 years agoyaffs: fix function prototype
Stefan Agner [Fri, 19 Sep 2014 07:44:16 +0000 (09:44 +0200)]
yaffs: fix function prototype

The fsync function in the fs.h header file in our kernel version has
two additional function introduced by this commit:

02c24a82187d5a628c68edfe71ae60dc135cd178
fs: push i_mutex and filemap_write_and_wait down into ->fsync() handlers

Update the function prototype for YAFFS2 too to avoid missinterpreted
datasync parameter and to avoid warnings.

9 years agoASoC: sgtl5000: Fix the cache handling
Fabio Estevam [Mon, 26 May 2014 13:34:20 +0000 (10:34 -0300)]
ASoC: sgtl5000: Fix the cache handling

Since commit e5d80e82e32e (ASoC: sgtl5000: Convert to use regmap directly) a
kernel oops is observed after a suspend/resume sequence.

The kernel oops happens inside sgtl5000_restore_regs() as codec->reg_cache is no
longer a valid pointer.

Add the remaining register entries into sgtl5000_reg_defaults[] and remove
sgtl5000_restore_regs() completely, which allows suspend/resume to work fine and
make the code simpler.

Tested on a im53-qsb board.

Reported-by: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Tested-by: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit 29aa37cddfb9b721013ff28608200d73a9426368)

9 years agoASoC: sgtl5000: fix codec clock source transition to avoid clockless moment
Oskar Schirmer [Mon, 5 Aug 2013 07:36:02 +0000 (07:36 +0000)]
ASoC: sgtl5000: fix codec clock source transition to avoid clockless moment

Powering down PLL before switching to a mode that does not use it
is a bad idea. It would cause the SGTL5000 be without internal
clock supply, especially on the I2C interface, which would make
subsequent access to it fail.

Thus, in case of not using PLL any longer, first set the mode
control, then power down PLL.

Signed-off-by: Oskar Schirmer <oskar@scara.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit e06e4c2d530fd4995c41083009647263ccd77d3b)

9 years agoASoC: sgtl5000: fix buggy 'Capture Attenuate Switch' control
Lothar Waßmann [Wed, 31 Jul 2013 14:44:30 +0000 (16:44 +0200)]
ASoC: sgtl5000: fix buggy 'Capture Attenuate Switch' control

The SGTL5000 Capture Attenuate Switch (or "ADC Volume Range Reduction"
as it is called in the manual) is single bit only.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit 65f2b226763bc348a9b9145aa5e17e7e3f6d8c35)

9 years agoASoC: sgtl5000: prevent playback to be muted when terminating concurrent capture
Lothar Waßmann [Wed, 31 Jul 2013 14:44:29 +0000 (16:44 +0200)]
ASoC: sgtl5000: prevent playback to be muted when terminating concurrent capture

When a sound capture/playback is terminated while a playback/capture
is running, power_vag_event() will clear SGTL5000_CHIP_ANA_POWER in
the SND_SOC_DAPM_PRE_PMD event, thus muting the respective other
channel.

Don't clear SGTL5000_CHIP_ANA_POWER when both DAC and ADC are active
to prevent this.

Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit f091f3f07328f75d20a2a5970d1f8b58d95fc990)

9 years agoASoC: sglt5000: Fix the default value of CHIP_SSS_CTRL
Fabio Estevam [Thu, 4 Jul 2013 23:01:02 +0000 (20:01 -0300)]
ASoC: sglt5000: Fix the default value of CHIP_SSS_CTRL

According to the sgtl5000 reference manual, the default value of CHIP_SSS_CTRL
is 0x10.

Reported-by: Oskar Schirmer <oskar@scara.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
(cherry picked from commit 016fcab8ff46fca29375d484226ec91932aa4a07)

9 years agoASoC: sgtl5000: Fix VAG_POWER enabling/disabling order
Marek Vasut [Tue, 28 May 2013 18:55:56 +0000 (20:55 +0200)]
ASoC: sgtl5000: Fix VAG_POWER enabling/disabling order

The VAG_POWER must be enabled after all other bits in CHIP_ANA_POWER
and disabled before any other bit in CHIP_ANA_POWER. See the SGTL5000
datasheet (Table 31, BIT 7, page 42-43). Failing to follow this order
will result in ugly loud "POP" noise at the end of playback.

To achieve such order, use the _PRE and _POST DAPM widgets to trigger
the power_vag_event, where the event type check has to be fixed
accordingly as well.

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit dd4d2d6dfb49e8916064f2cb07f0ad7b32a82fb7)

9 years agoASoC: sgtl5000: Fix driver probe after reset
Fabio Estevam [Fri, 10 May 2013 00:15:47 +0000 (21:15 -0300)]
ASoC: sgtl5000: Fix driver probe after reset

After a 'reboot' command in Linux or after pressing the system's reset button
the sgtl5000 driver fails to probe:

sgtl5000 0-000a: Device with ID register ffff is not a sgtl5000
sgtl5000 0-000a: ASoC: failed to probe CODEC -19
imx-sgtl5000 sound.12: ASoC: failed to instantiate card -19
imx-sgtl5000 sound.12: snd_soc_register_card failed (-19)

sgtl5000 codec does not have a reset line, nor a reset command in software, so
after a system reset the codec does not contain the default register values
from sgtl5000_reg_defaults[] anymore, as these are only valid after a
power-on-reset cycle.

Fix this issue by explicitly reading all the reset register values from
sgtl5000_reg_defaults[] and writing them back into sgtl5000 to ensure a sane
state.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Tested-by: Eric Nelson <eric.nelson@boundarydevices.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
(cherry picked from commit af8ee11209e749c75eabf32b2a4ca631f396acf8)

Conflicts:
sound/soc/codecs/sgtl5000.c

9 years agoarm: tegra30: pcie: do not disable clk after deasserting resets Apalis_T30_LinuxImageV2.3Beta2_20140903
Shreshtha SAHU [Wed, 3 Sep 2014 12:15:17 +0000 (17:45 +0530)]
arm: tegra30: pcie: do not disable clk after deasserting resets

Do not disable and re-enable clocks after deasserting
PCIE, AFI and PCIEX resets. Deasserting the resets should
be followed by programming the PCIE.

Bug 1521306

Change-Id: Idc43bc9b21cac3818852ed059fe512f4cd75b748
Signed-off-by: Shreshtha SAHU <ssahu@nvidia.com>
9 years agouvcvideo: Add a mapping for H.264 payloads
Stephan Lachowsky [Fri, 28 Jan 2011 19:38:58 +0000 (16:38 -0300)]
uvcvideo: Add a mapping for H.264 payloads

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
9 years agoRevert "fbcon: workaround full screen custom boot logo issue and disable cursor" Apalis_T30_LinuxImageV2.3Beta1_20140804 Colibri_T20_LinuxImageV2.3Beta1_20140804 Colibri_T30_LinuxImageV2.3Beta1_20140804
Marcel Ziswiler [Mon, 4 Aug 2014 11:08:05 +0000 (13:08 +0200)]
Revert "fbcon: workaround full screen custom boot logo issue and disable cursor"

The whole rounding stuff really depends on a specific resolution.

This reverts commit 4dd83942b418b937e3da02746baabf63f37fe682.

9 years agofbcon: workaround full screen custom boot logo issue and disable cursor
Raul Munoz [Mon, 4 Aug 2014 09:28:48 +0000 (11:28 +0200)]
fbcon: workaround full screen custom boot logo issue and disable cursor

Force round down in division calculating required logo height as
preceding code did round up as follows:

logo_lines = DIV_ROUND_UP(logo_height, vc->vc_font.height);

Which resulted in no boot-logo shown at all due to not enough lines
being available.

Additionally disable cursor for custom boot logo.

9 years agoRevert "fbcon: workaround full screen boot-logo issue"
Marcel Ziswiler [Mon, 4 Aug 2014 07:58:47 +0000 (09:58 +0200)]
Revert "fbcon: workaround full screen boot-logo issue"

Using this unconditionally cuts the birds feet (;-p).

This reverts commit 491f263ebfb338c59abfbde6d4e0e7256a0150fa.

9 years agoARM: 7670/1: fix the memset fix
Nicolas Pitre [Tue, 12 Mar 2013 12:00:42 +0000 (13:00 +0100)]
ARM: 7670/1: fix the memset fix

Commit 455bd4c430b0 ("ARM: 7668/1: fix memset-related crashes caused by
recent GCC (4.7.2) optimizations") attempted to fix a compliance issue
with the memset return value.  However the memset itself became broken
by that patch for misaligned pointers.

This fixes the above by branching over the entry code from the
misaligned fixup code to avoid reloading the original pointer.

Also, because the function entry alignment is wrong in the Thumb mode
compilation, that fixup code is moved to the end.

While at it, the entry instructions are slightly reworked to help dual
issue pipelines.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Tested-by: Alexander Holler <holler@ahsoftware.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
9 years agoARM: 7668/1: fix memset-related crashes caused by recent GCC (4.7.2) optimizations
Ivan Djelic [Wed, 6 Mar 2013 19:09:27 +0000 (20:09 +0100)]
ARM: 7668/1: fix memset-related crashes caused by recent GCC (4.7.2) optimizations

Recent GCC versions (e.g. GCC-4.7.2) perform optimizations based on
assumptions about the implementation of memset and similar functions.
The current ARM optimized memset code does not return the value of
its first argument, as is usually expected from standard implementations.

For instance in the following function:

void debug_mutex_lock_common(struct mutex *lock, struct mutex_waiter *waiter)
{
memset(waiter, MUTEX_DEBUG_INIT, sizeof(*waiter));
waiter->magic = waiter;
INIT_LIST_HEAD(&waiter->list);
}

compiled as:

800554d0 <debug_mutex_lock_common>:
800554d0:       e92d4008        push    {r3, lr}
800554d4:       e1a00001        mov     r0, r1
800554d8:       e3a02010        mov     r2, #16 ; 0x10
800554dc:       e3a01011        mov     r1, #17 ; 0x11
800554e0:       eb04426e        bl      80165ea0 <memset>
800554e4:       e1a03000        mov     r3, r0
800554e8:       e583000c        str     r0, [r3, #12]
800554ec:       e5830000        str     r0, [r3]
800554f0:       e5830004        str     r0, [r3, #4]
800554f4:       e8bd8008        pop     {r3, pc}

GCC assumes memset returns the value of pointer 'waiter' in register r0; causing
register/memory corruptions.

This patch fixes the return value of the assembly version of memset.
It adds a 'mov' instruction and merges an additional load+store into
existing load/store instructions.
For ease of review, here is a breakdown of the patch into 4 simple steps:

Step 1
======
Perform the following substitutions:
ip -> r8, then
r0 -> ip,
and insert 'mov ip, r0' as the first statement of the function.
At this point, we have a memset() implementation returning the proper result,
but corrupting r8 on some paths (the ones that were using ip).

Step 2
======
Make sure r8 is saved and restored when (! CALGN(1)+0) == 1:

save r8:
-       str     lr, [sp, #-4]!
+       stmfd   sp!, {r8, lr}

and restore r8 on both exit paths:
-       ldmeqfd sp!, {pc}               @ Now <64 bytes to go.
+       ldmeqfd sp!, {r8, pc}           @ Now <64 bytes to go.
(...)
        tst     r2, #16
        stmneia ip!, {r1, r3, r8, lr}
-       ldr     lr, [sp], #4
+       ldmfd   sp!, {r8, lr}

Step 3
======
Make sure r8 is saved and restored when (! CALGN(1)+0) == 0:

save r8:
-       stmfd   sp!, {r4-r7, lr}
+       stmfd   sp!, {r4-r8, lr}

and restore r8 on both exit paths:
        bgt     3b
-       ldmeqfd sp!, {r4-r7, pc}
+       ldmeqfd sp!, {r4-r8, pc}
(...)
        tst     r2, #16
        stmneia ip!, {r4-r7}
-       ldmfd   sp!, {r4-r7, lr}
+       ldmfd   sp!, {r4-r8, lr}

Step 4
======
Rewrite register list "r4-r7, r8" as "r4-r8".

Signed-off-by: Ivan Djelic <ivan.djelic@parrot.com>
Reviewed-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
9 years agoapalis/colibri t20/t30: enable vlan functionality
Marcel Ziswiler [Sat, 26 Jul 2014 00:21:10 +0000 (02:21 +0200)]
apalis/colibri t20/t30: enable vlan functionality

Enable VLAN networking functionality.

While at it also enable some more kernel modules for Apalis T30 PCIe
based devices like the Intel E1000E NICs, Intel IWLAGN Wi-Fi cards,
PCIe serial cards and XHCI based USB 3.0 controllers.

9 years agoRevert "asoc: tegra20_ac97: fix sampling rate"
Marcel Ziswiler [Fri, 25 Jul 2014 23:39:42 +0000 (01:39 +0200)]
Revert "asoc: tegra20_ac97: fix sampling rate"

This reverts commit f162e88fc6aac0fef03c49c1ac596995a03ff134.

Somehow NVIDIA's media player does not like it to be fixed as
it starts stuttering like crazy at times.

Still keep the dangerous time out handling clean-up.

While at it get rid of the excessive dev_info() logging as well.

9 years agocgroup: remove synchronize_rcu() from cgroup_attach_{task|proc}()
Li Zefan [Mon, 14 Jan 2013 09:23:26 +0000 (17:23 +0800)]
cgroup: remove synchronize_rcu() from cgroup_attach_{task|proc}()

These 2 syncronize_rcu()s make attaching a task to a cgroup
quite slow, and it can't be ignored in some situations.

A real case from Colin Cross: Android uses cgroups heavily to
manage thread priorities, putting threads in a background group
with reduced cpu.shares when they are not visible to the user,
and in a foreground group when they are. Some RPCs from foreground
threads to background threads will temporarily move the background
thread into the foreground group for the duration of the RPC.
This results in many calls to cgroup_attach_task.

In cgroup_attach_task() it's task->cgroups that is protected by RCU,
and put_css_set() calls kfree_rcu() to free it.

If we remove this synchronize_rcu(), there can be threads in RCU-read
sections accessing their old cgroup via current->cgroups with
concurrent rmdir operation, but this is safe.

 # time for ((i=0; i<50; i++)) { echo $$ > /mnt/sub/tasks; echo $$ > /mnt/tasks; }

real    0m2.524s
user    0m0.008s
sys     0m0.004s

With this patch:

real    0m0.004s
user    0m0.004s
sys     0m0.000s

tj: These synchronize_rcu()s are utterly confused.  synchornize_rcu()
    necessarily has to come between two operations to guarantee that
    the changes made by the former operation are visible to all rcu
    readers before proceeding to the latter operation.  Here,
    synchornize_rcu() are at the end of attach operations with nothing
    beyond it.  Its only effect would be delaying completion of
    write(2) to sysfs tasks/procs files until all rcu readers see the
    change, which doesn't mean anything.

Signed-off-by: Li Zefan <lizefan@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Colin Cross <ccross@google.com>
Conflicts:
kernel/cgroup.c

9 years agoapalis/colibri t30: use hda hdmi audio and split sound init
Marcel Ziswiler [Fri, 25 Jul 2014 19:53:00 +0000 (21:53 +0200)]
apalis/colibri t30: use hda hdmi audio and split sound init

Use HDA HDMI audio now on Colibri T30 as well allowing for up to 7.1
multi-channel playback. Split board sound initialisation between Apalis
and Colibri T30 in order to distinguish better between default SPDIF
being supported out-of-the-box on Apalis vs. this being an optional
feature for the Colibri. Therefore remove SPDIF for the Colibri T30.

While at it add csus clock required for vi_sensor camera master clock
on Apalis T30 and clk_out_2/extern2 for Colibri T30, fix debug UART1
initialisation, get rid of spurious CONFIG_SND_USB enable and further
clean-up both board platform data files.

9 years agoapalis/colibri t30: make hda 2nd sound card hack
Marcel Ziswiler [Fri, 25 Jul 2014 09:41:45 +0000 (11:41 +0200)]
apalis/colibri t30: make hda 2nd sound card hack

Hack HDA driver to make it the 2nd rather than the first sound card as
the first one should be the SGTL5000 which is always present on our T30
modules. Especially on Ixora where there is no HDA codec on the carrier
board HDA being the first sound card does not make much sense even more
though as there was no primary device (e.g. device=hw:0,0).

9 years agoapalis/colibri t20/t30: enable fhandle for systemd
Marcel Ziswiler [Fri, 25 Jul 2014 09:27:12 +0000 (11:27 +0200)]
apalis/colibri t20/t30: enable fhandle for systemd

Enable CONFIG_FHANDLE required for systemd >= 209 according to

lists.freedesktop.org/archives/systemd-devel/2014-February/017362.html

While at it put them all 3 on par concerning ARM Errata configuration.

9 years agoapalis/colibri t30: fix issue with slow spdif clock
Marcel Ziswiler [Wed, 23 Jul 2014 13:10:58 +0000 (15:10 +0200)]
apalis/colibri t30: fix issue with slow spdif clock

Fix issue with slow SPDIF clock by just doubling desired rate prior to
doing any further calculations on it.

BTW: A proper fix might involve overall clock doubler configuration.

9 years agoapalis/colibri t20/t30: fix/introduce spi device controller data
Marcel Ziswiler [Tue, 22 Jul 2014 15:15:18 +0000 (17:15 +0200)]
apalis/colibri t20/t30: fix/introduce spi device controller data

Fix (Colibri) resp. introduce (Apalis) SPI device controller data to
properly use HW based chip select with one clock of setup and hold time
each for both MCP2515 CAN controller(s) as well as spidev.

9 years agommc: card: retry if transfer aborted due to out of range
Stefan Agner [Tue, 24 Jun 2014 11:57:21 +0000 (13:57 +0200)]
mmc: card: retry if transfer aborted due to out of range

This works around a issue we see when using eMMC 4.5 on tegra
SDHCI host controller.

9 years agommc: tegra: use 1.8V quirk only on affected instances
Stefan Agner [Tue, 24 Jun 2014 11:47:49 +0000 (13:47 +0200)]
mmc: tegra: use 1.8V quirk only on affected instances

The 1.8V quirk also affected the internal eMMC which disabled newer
modes such as SDR50, SDR104 and DDR50. This in turn lead to an
out of spec usage since the clock was still 50MHz.

By creating a no_1v8 field in the platform data we can now enable
this work around on a per-instance basis. Hence we enable the
quirk only on the controllers which are connected to the external
SD-slots.

9 years agoarm: tegra3: PCIe Clock and Reset Conform to Specification
Eric Yuen [Tue, 8 Jul 2014 10:34:33 +0000 (10:34 +0000)]
arm: tegra3: PCIe Clock and Reset Conform to Specification

PCIe Reset line must be asserted for at least 100us after clock is enabled.
PEX 2 Controller Register fix, offsets are not at constant intervals.

Bug 1521306

Reviewed-on: http://git-master/r/225399
(cherry picked from commit df0760bf515236bed2e87e590509642ab72a01b5)
Change-Id: I7b44ea51e7e02f2bca93cfc75ed85e01ab91fe03
Signed-off-by: Shreshtha Sahu <ssahu@nvidia.com>
9 years agofbcon: workaround full screen boot-logo issue
Raul Munoz [Mon, 14 Jul 2014 11:43:42 +0000 (13:43 +0200)]
fbcon: workaround full screen boot-logo issue

Force round down in division calculating required logo height as
preceding code did round up as follows:

logo_lines = DIV_ROUND_UP(logo_height, vc->vc_font.height);

Which resulted in no boot-logo shown at all due to not enough lines
being available.

9 years agoasoc: tegra20_ac97: fix sampling rate
Marcel Ziswiler [Tue, 8 Jul 2014 14:08:40 +0000 (16:08 +0200)]
asoc: tegra20_ac97: fix sampling rate

The AC97 sampling rate is really fixed to 48 kHz at all times.

While at it clean-up dangerous time out handling.

9 years agoLinux playback channel fix
Daniel Kochmanski [Fri, 27 Jun 2014 09:24:59 +0000 (11:24 +0200)]
Linux playback channel fix

9 years agoAC97 working capture device
Daniel Kochmanski [Fri, 27 Jun 2014 09:24:28 +0000 (11:24 +0200)]
AC97 working capture device

9 years agomedia: vi driver on Colibri T20 is working again
Wojciech Bieganski [Mon, 19 May 2014 12:09:12 +0000 (14:09 +0200)]
media: vi driver on Colibri T20 is working again

This commit resolves an issue of non-working vi camera driver
on Colibri T20 occured after a l4t-r16-r4 merge.

9 years agomedia: AS0260 camera driver improvements
Wojciech Bieganski [Thu, 15 May 2014 13:18:45 +0000 (15:18 +0200)]
media: AS0260 camera driver improvements

10 years agocolibri t20/t30: add spi controller platform data for hw cs
Marcel Ziswiler [Fri, 9 May 2014 12:43:07 +0000 (14:43 +0200)]
colibri t20/t30: add spi controller platform data for hw cs

Add SPI controller platform data required for use of hardware chip
selects.

While at it pull-up SPI chip select pin due to NVIDIA's designers
taking the term chip select a little too personal: they indeed only
select a chip otherwise all the chip select pins are just left
floating!

10 years agocolibri t20/t30: clarify mcp2515 reset
Marcel Ziswiler [Fri, 9 May 2014 08:57:24 +0000 (10:57 +0200)]
colibri t20/t30: clarify mcp2515 reset

The MCP2515 on the Colibri EvalBoard V3.1a actually uses regular system
reset aka RESET_OUT# on SODIMM 87 to reset the MCP2515.

Therefore clean-up resp. remove any MECS Tellurium legacy in that
respect.

While at it adjust copyright year, re-order some include, clean-up some
struct spacing, re-order clocks and improve some comments.

10 years agomedia: enabled CSI mode in AS0260 camera driver
Wojciech Bieganski [Mon, 5 May 2014 13:17:43 +0000 (15:17 +0200)]
media: enabled CSI mode in AS0260 camera driver

10 years agoarm: tegra: dc: disable dc when framebuffer off detected
Stefan Agner [Tue, 29 Apr 2014 10:50:00 +0000 (12:50 +0200)]
arm: tegra: dc: disable dc when framebuffer off detected

Don't initialize the whole display controller (dc) when framebuffer
mode is set to off.

This avoids creation of the /dev/tegra_dc_x device. The tegra X
driver requires for each tegra_dc_x device an framebuffer device
with the same id. This patch avoids creation of both, which makes
the tegra X driver load correctly.

Note: Turning off tegrafb0 still leads to kernel crash due to
hard coded device enumeration.

10 years agocan: mcp251x: fix locking in BERR counter functionality
Marcel Ziswiler [Tue, 22 Apr 2014 11:31:51 +0000 (13:31 +0200)]
can: mcp251x: fix locking in BERR counter functionality

Symptoms:

The interface stops receiving CAN frames when reception of CAN frame
and call to the introduced get_berr_counter function coincide.

Reproduction:

Ip requests, among others, the berr field for the can interfaces. NOTE
that it does so even if called as 'ip link show lo', as interface-based
filtering is only done after the system calls to receive interface
information.

Run candump on a MCP-based can interface that has a lot of traffic (via
'cangen -g1' on another can node).
On the system with the MCP chip, run
while /bin/true; do ip link > /dev/null ; done;
Reception of CAN-frames (as shown by candump) will cease within
seconds.

This issue got introduced by commit
1b59090a47101b4bf379d2c35986ad3f0bcb2aa1 as access to the SPI registers
of the MCP251x were not locked.

Issue report and patch courtesy David R. Piegdon of Indurad GmbH.

10 years agomedia: added improved Aptina AS0260 driver
Wojciech Bieganski [Tue, 15 Apr 2014 13:26:37 +0000 (15:26 +0200)]
media: added improved Aptina AS0260 driver

Driver features:
1. Supported formats:
   - Full HD, 1920x1080, 8.5 FPS, YUYV
   - VGA, 640x480, 30 FPS, YUYV
2. Available controls with enabled AE (auto exposure):
   - brightness [0...255],
   - contrast [16...64],
   - saturation [0...256],
   - hue [-2200...2200],
   - gamma [100...280].
3. Works only in parallell interface mode (CSI in progress).
4. No external tools needed (for i2c).

10 years agomedia: image from analog cameras is back to full speed
Wojciech Bieganski [Tue, 15 Apr 2014 08:27:04 +0000 (10:27 +0200)]
media: image from analog cameras is back to full speed

This commit restores the full framerate (25 FPS), after a drop to
16 FPS caused by a l4t-r16-r4 merge.

10 years agomedia: added camera settings per decoder
Wojciech Bieganski [Mon, 14 Apr 2014 13:56:00 +0000 (15:56 +0200)]
media: added camera settings per decoder

This commit adds settings such as:
 - values of horizontal/vertical active start,
 - enabling/disabling internal sync,
to the private data of decoders: MAX9526, ADV7180, TVP5150,
OV7670 and AS0260.
The feature is available through *_tegra_camera_platform_data
struct initialised in board-*.c files.

10 years agomedia: fixes in board-*.c files for Colibri T20/T30 and Apalis T30
Wojciech Bieganski [Thu, 3 Apr 2014 11:13:53 +0000 (13:13 +0200)]
media: fixes in board-*.c files for Colibri T20/T30 and Apalis T30

This commit fixes the crash that occures while loading tegra_v4l2_camera
module caused by its new features (private data per sensor).

updated files:
arch/arm/mach-tegra/board-apalis_t30.c
arch/arm/mach-tegra/board-colibri_t20.c
arch/arm/mach-tegra/board-colibri_t30.c

10 years agomedia: symbol tegra_powergate_partition now exports
Wojciech Bieganski [Thu, 3 Apr 2014 11:05:25 +0000 (13:05 +0200)]
media: symbol tegra_powergate_partition now exports

This commit fixes the kernel compilation error with the lack
of the export of tegra_powergate_partition symbol in
arch/arm/mach-tegra/powergate.c

10 years agomedia: a quick fix to make tegra_v4l2_camera module reloadable
Wojciech Bieganski [Thu, 3 Apr 2014 09:25:15 +0000 (11:25 +0200)]
media: a quick fix to make tegra_v4l2_camera module reloadable

10 years agomedia: tegra_v4l2: add CSI pad calibration
Bryan Wu [Wed, 16 Oct 2013 01:25:30 +0000 (18:25 -0700)]
media: tegra_v4l2: add CSI pad calibration

Bug 1369083

Change-Id: I1a81bcb62e8f6bb654ffbebba09661187ab4b512
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/309536
Tested-by: Vikram Fugro <vfugro@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Kaustubh Purandare <kpurandare@nvidia.com>
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
10 years agomedia: tegra_v4l2: add dual camera support
Bryan Wu [Mon, 24 Jun 2013 21:32:10 +0000 (14:32 -0700)]
media: tegra_v4l2: add dual camera support

Add support for dual cameras from both CSI-A and CSI-B:
 - move all the CSI settings into video buffer struct
 - queue the video buffer struct to a dedicated queue
 - process one video buffer struct from the queue at one time

Bug 1369083

Change-Id: Ie64d69282ab991b66e97327e288a2bacde088bd6
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/246269
(cherry picked from commit 228b0c2d9ae3fa1121f88836626d654ae0fc4ff0)
Reviewed-on: http://git-master/r/279987
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Tested-by: Matthew Pedro <mapedro@nvidia.com>
Conflicts:
drivers/media/video/tegra_v4l2_camera.c

10 years agomedia: tegra_v4l2: pass platform_data via soc_camera_link
Bryan Wu [Mon, 3 Jun 2013 21:40:25 +0000 (14:40 -0700)]
media: tegra_v4l2: pass platform_data via soc_camera_link

soc_camera_link supports passing power on/off control callback to
soc_camera stack. So the power control can be handled by soc_camera
stack instead of our Tegra V4L2 host driver.

Also pass other platform_data fields via soc_camera_link instead of
a hacking nvhost_device_data struct.

Bug 1240806
Bug 1369083

Change-Id: I443a7d28196cc8292805da70d2d5ff1c3cd50a5d
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/246267
(cherry picked from commit 9083d270bf93b583cd5bf5151a52ea250f8541a3)
Reviewed-on: http://git-master/r/279986
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Tested-by: Matthew Pedro <mapedro@nvidia.com>
Conflicts:
drivers/media/video/tegra_v4l2_camera.c

10 years agomedia: tegra: add supporting for RAW8/RAW10 input and output
Bryan Wu [Tue, 12 Feb 2013 18:49:23 +0000 (10:49 -0800)]
media: tegra: add supporting for RAW8/RAW10 input and output

CSI host controller of Tegra can support Bayer Raw8 and Raw 10 data
input, it also output data as extended 16-bit data format in memory
directly.

Raw data output should be handled by the second output channel.

This patch add supporting for Raw data input/output and the second
output channel.

All were tested on Cardhu board.

Change-Id: Ifd1d8c94671a1d4571dcf176774e2d3cffafc399
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/200225
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Conflicts:
drivers/media/video/tegra_v4l2_camera.c

10 years agoapalis_t30: ieee 1588 ptp support
Marcel Ziswiler [Mon, 31 Mar 2014 15:57:51 +0000 (17:57 +0200)]
apalis_t30: ieee 1588 ptp support

Enable IEEE 1588 precision time protocol (PTP) support.

10 years agoapalis_t30: igb: no nvm and Ethernet MAC address handling
Marcel Ziswiler [Mon, 31 Mar 2014 15:54:25 +0000 (17:54 +0200)]
apalis_t30: igb: no nvm and Ethernet MAC address handling

Springville/i211 with a blank Flash/iNVM use different PCI IDs. Extend
the driver to load despite i210/i211 data sheets claiming tools only,
not for driver.

Only warn rather than fail on NVM validation failures on Apalis T30.

Revise Ethernet MAC address assignment: should now handle up to two
instances of custom user MACs (2nd one with a 0x100000 offset). This
way customer does not have to worry about NVM on a secondary Ethernet
on the carrier board and still gets a valid official MAC address from
us (e.g. analogous to how we did it on our Protea carrier board).

Use the Toradex OUI as default MAC address if no valid one is
encountered.

Tested on samples of Apalis T30 2GB V1.0B, V1.0C and Apalis T30 1GB
V1.0A both with blank NVMs as well as iNVMs programmed with Intel's
defaults.

10 years agoigb: integrate tools only device support
Marcel Ziswiler [Mon, 31 Mar 2014 15:52:49 +0000 (17:52 +0200)]
igb: integrate tools only device support

Springville/i211 with a blank Flash/iNVM use a different PCI ID (tools
only, not for driver) than properly programmed ones.

10 years agoigb: integrate igb driver 5.1.2
Marcel Ziswiler [Mon, 31 Mar 2014 15:50:10 +0000 (17:50 +0200)]
igb: integrate igb driver 5.1.2

Integrate latest igb driver version 5.1.2
(igb-5.1.2.tar.gz from e1000.sf.net).

10 years agoptp: Add a method for obtaining the device index.
Richard Cochran [Tue, 3 Apr 2012 22:59:16 +0000 (22:59 +0000)]
ptp: Add a method for obtaining the device index.

This commit adds a method that MAC drivers may call in order to find out
the device number of their associated PTP Hardware Clock.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoethtool: Introduce a method for getting time stamping capabilities.
Richard Cochran [Tue, 3 Apr 2012 22:59:17 +0000 (22:59 +0000)]
ethtool: Introduce a method for getting time stamping capabilities.

This commit adds a new ethtool ioctl that exposes the SO_TIMESTAMPING
capabilities of a network interface. In addition, user space programs
can use this ioctl to discover the PTP Hardware Clock (PHC) device
associated with the interface.

Since software receive time stamps are handled by the stack, the generic
ethtool code can answer the query correctly in case the MAC or PHY
drivers lack special time stamping features.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Reviewed-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agoethtool: Centralise validation of ETHTOOL_{G, S}RXFHINDIR parameters
Ben Hutchings [Thu, 15 Dec 2011 13:55:01 +0000 (13:55 +0000)]
ethtool: Centralise validation of ETHTOOL_{G, S}RXFHINDIR parameters

Add a new ethtool operation (get_rxfh_indir_size) to get the
indirectional table size.  Use this to validate the user buffer size
before calling get_rxfh_indir or set_rxfh_indir.  Use get_rxnfc to get
the number of RX rings, and validate the contents of the new
indirection table before calling set_rxfh_indir.  Remove this
validation from drivers.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Acked-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
10 years agosolved low framerate issue with analog cameras Apalis_T30_LinuxImageV2.1Beta3_20140318 Colibri_T20_LinuxImageV2.1Beta3_20140318 Colibri_T30_LinuxImageV2.1Beta3_20140318
Wojciech Bieganski [Thu, 6 Mar 2014 11:32:34 +0000 (12:32 +0100)]
solved low framerate issue with analog cameras

10 years agoadded Aptina AS0260SOC driver
Wojciech Bieganski [Thu, 6 Mar 2014 11:28:45 +0000 (12:28 +0100)]
added Aptina AS0260SOC driver

10 years agoOV7670 and TVP5150 drivers added, updated configs
Wojciech Bieganski [Tue, 4 Mar 2014 15:05:13 +0000 (16:05 +0100)]
OV7670 and TVP5150 drivers added, updated configs

10 years agoPCI: Disable Gen2 for Tegra20 and Tegra30
Eric Brower [Mon, 18 Nov 2013 22:55:06 +0000 (22:55 +0000)]
PCI: Disable Gen2 for Tegra20 and Tegra30

Tegra20 and Tegra30 do not support gen2 PCIe, so correct the
register setting to disable it.

Signed-off-by: Eric Brower <ebrower@nvidia.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Thierry Reding <treding@nvidia.com>
10 years agoMerge branch 'l4t/l4t-r16-r2' into colibri
Marcel Ziswiler [Wed, 12 Mar 2014 15:06:34 +0000 (16:06 +0100)]
Merge branch 'l4t/l4t-r16-r2' into colibri

Conflicts:
drivers/media/video/tegra_v4l2_camera.c
reverted to current driver supporting ACM rather than CSI2
drivers/media/video/videobuf2-dma-nvmap.c
drivers/video/tegra/host/Makefile

10 years agotty: serial: tegra: initialize with lower baudrate
Stefan Agner [Mon, 10 Mar 2014 13:01:29 +0000 (14:01 +0100)]
tty: serial: tegra: initialize with lower baudrate

While setup, there is a time the serial port is running on a
predefined speed (115200). When data arrived during this phase at
a lower baudrate (e.g. 9600), a lot of overrun and break error
messages were shown. Due to those messages, the terminal setup
never finished, and thus never reached the selected baudrate (e.g.
9600). By choosing a lower baudrate at the startup (9600), a lot
less (if any at all) messages are shown and those initialization
always succeeds.

Another solution would be to disable those messages completely.
However, while normal mode its good to have those UART error
messages.

10 years agovideo: tegra: fb: colibri_t20: hack avoid 24 Hz mode
Marcel Ziswiler [Mon, 10 Feb 2014 16:17:46 +0000 (17:17 +0100)]
video: tegra: fb: colibri_t20: hack avoid 24 Hz mode

Hack to avoid 24 Hz mode in X resulting in no display at all. This has
been encountered using e.g. a Samsung SyncMaster F2380 if connected by
HDMI.

root@colibri-t20:~# xrandr
Screen 0: minimum 256 x 128, current 1920 x 1080, maximum 2048 x 2048
LVDS-1 connected 1920x1080+0+0 (normal left inverted right x axis y
axis) 0mm x 0mm
   1920x1080      60.0*+
HDMI-1 connected 1920x1080+0+0 (normal left inverted right x axis y
axis) 160mm x 90mm
   1920x1080      60.0 +   24.0*
   1680x1050      59.9
   1280x1024      75.0     60.0
   1440x900       75.0     59.9
   1280x960       60.0
   1280x800       59.9
   1152x864       75.0
   1280x720       60.0     50.0
   1024x768       75.0     70.1     60.0
   832x624        74.6
   800x600        72.2     75.0     60.3     56.2
   720x576        50.0
   720x480        59.9
   640x480        75.0     72.8     66.7     59.9
   720x400        70.1

This is really just enabling the same hack from Apalis/Colibri T30
which is now relevant on the Colibri T20 as well due to the modedb
changes:

3a6fc5303b9e798295caa01d2cfe75b05fdccf55

10 years agovideo: tegra: check if framebuffer is registred Apalis_T30_LinuxImageV2.1Beta2_20140206 Colibri_T20_LinuxImageV2.1Beta2_20140207 Colibri_T30_LinuxImageV2.1Beta2_20140206
Stefan Agner [Thu, 6 Feb 2014 17:14:35 +0000 (18:14 +0100)]
video: tegra: check if framebuffer is registred

Before updating modes on HDMI hotplug, check if framebuffer is
registered at all. This allows to disable framebuffers completely.

10 years agoinput: touchscreen: fusion: platform independent GPIO description
Stefan Agner [Tue, 4 Feb 2014 09:46:13 +0000 (10:46 +0100)]
input: touchscreen: fusion: platform independent GPIO description

Use platform independent description for requested GPIOs.

10 years agoapalis_t30: add Fusion touchscreen driver
Stefan Agner [Tue, 4 Feb 2014 09:37:42 +0000 (10:37 +0100)]
apalis_t30: add Fusion touchscreen driver

Activate Fusion touchscreen driver. Use GPIO 5/6 as pen down/reset
GPIO and provide a helper function to free the GPIO before the
driver requests them.

10 years agoMerge branch 'fusion-touchscreen' into colibri
Stefan Agner [Wed, 29 Jan 2014 14:43:28 +0000 (15:43 +0100)]
Merge branch 'fusion-touchscreen' into colibri

10 years agocolibri_t20/colibri_t30: use new platform data for fusion touchscreen
Stefan Agner [Mon, 27 Jan 2014 13:34:11 +0000 (14:34 +0100)]
colibri_t20/colibri_t30: use new platform data for fusion touchscreen

Fusion touchscreen driver now uses platform data to do GPIO
initialization by itself. Make use of this by providing GPIO numbers
instead of doing initialization in the board initialization.

10 years agoinput: touchscreen: fusion: fix error handling
Stefan Agner [Mon, 27 Jan 2014 09:06:22 +0000 (10:06 +0100)]
input: touchscreen: fusion: fix error handling

Fix chip reset by sleeping long enought after reset. Do proper error
handling (free GPIO on failure). Use dev_* for message logging to get
similar messages for all fusion driver related errors and warnings.

10 years agoinput: touchscreen: fusion: use new I2C PM functions
Stefan Agner [Mon, 27 Jan 2014 09:17:08 +0000 (10:17 +0100)]
input: touchscreen: fusion: use new I2C PM functions

To avoid warnings use the new I2C power management function for
suspend and resume.

10 years agoinput: touchscreen: added platform data for Fusion touchscreen
Stefan Agner [Fri, 24 Jan 2014 16:29:43 +0000 (17:29 +0100)]
input: touchscreen: added platform data for Fusion touchscreen

Added platform data struct to define interrupt and reset GPIO. This
allows to initialize the touchscreen controller inside the driver
rather then in each platform and use the driver as a module.

10 years agoinput: touchscreen: fix race condition in Fusion driver
Stefan Agner [Tue, 21 Jan 2014 13:12:33 +0000 (14:12 +0100)]
input: touchscreen: fix race condition in Fusion driver

When the next interrupt request apeares between the confirmation of
the previous (a write via I2C, fusion_F0710A_write_complete) and
the reenable of the GPIO interrupt, the driver hangs and no more
touch inputs are reported.

This patch moves the confirmation after the reenabling of the GPIO
interrupt.

10 years agoinput: touchscreen: add ABS_X/ABS_Y axis for Fusion touchscreen
Stefan Agner [Tue, 21 Jan 2014 09:28:47 +0000 (10:28 +0100)]
input: touchscreen: add ABS_X/ABS_Y axis for Fusion touchscreen

Recent evdev X-Server input driver implementation complain when
only multitouch axes have been reported ("found only multitouch-axes.
That shouldn't happen."). Therefor also report the primary touch
detection with default axis.

10 years agovideo: tegra: kernel parameters to change RGB clock polarity
Stefan Agner [Tue, 28 Jan 2014 16:37:08 +0000 (17:37 +0100)]
video: tegra: kernel parameters to change RGB clock polarity

Allow to change clock polarity for RGB display output using the
keywords outputen/pixclockpol/vsync and hsync. Add them right
after the driver specification, use 0/1 to specifiy high/low
polarity, e.g. video=tegrafb0:pixclockpol:1,800x480

10 years agovideo: tegra: remove special clocks for Tegra 2
Stefan Agner [Tue, 28 Jan 2014 16:34:19 +0000 (17:34 +0100)]
video: tegra: remove special clocks for Tegra 2

Remove special clocks for Tegra 2, but use backup clock source
instead. This allows to run all common used resolution within
the drivers -1/+9% allowed band for pixelclock exactness.

10 years agovideo: tegra: add more modes and tweaked pixelclocks for Tegra 2
Stefan Agner [Fri, 24 Jan 2014 16:11:58 +0000 (17:11 +0100)]
video: tegra: add more modes and tweaked pixelclocks for Tegra 2

Add some more modes e.g. for full HD panel.

Also add tweaked pixel clock for Tegra 2 because the clock is always
a child of the peripherial clock and only some divisors are available.

10 years agovideo: tegra: fb: apalis/colibri_t30: hack avoid 24 Hz mode
Marcel Ziswiler [Fri, 24 Jan 2014 15:58:56 +0000 (16:58 +0100)]
video: tegra: fb: apalis/colibri_t30: hack avoid 24 Hz mode

Hack to avoid 24 Hz mode in X resulting in no display at all. This has
been encountered using e.g. a Samsung SyncMaster F2380 if connected by
HDMI.

root@apalis-t30:~# xrandr
Screen 0: minimum 256 x 128, current 1920 x 1080, maximum 2048 x 2048
LVDS-1 connected 1920x1080+0+0 (normal left inverted right x axis y
axis) 0mm x 0mm
   1920x1080      58.6*+
HDMI-1 connected 1920x1080+0+0 (normal left inverted right x axis y
axis) 160mm x 90mm
   1920x1080      60.0*+
   1680x1050      59.9
   1280x1024      75.0     60.0
   1440x900       75.0     59.9
   1280x960       60.0
   1280x800       59.9
   1152x864       75.0
   1280x720       60.0     50.0
   1024x768       75.0     70.1     60.0
   832x624        74.6
   800x600        72.2     75.0     60.3     56.2
   720x576        50.0
   720x480        59.9
   640x480        75.0     72.8     66.7     59.9
   720x400        70.1

This is basically a revamp of the following commit which got scrapped
by the modedb changes:

8174d21e5fe0d086cb5824161c58eb065f412281

10 years agoCheck null pointers for sysfs calls
Stefan Agner [Wed, 22 Jan 2014 17:41:04 +0000 (18:41 +0100)]
Check null pointers for sysfs calls

When grepping through sysfs, grep tries to read all sysfs files
which are available. Some of them lead to error due to null pointers.
Therefor check for null pointers before using them.

10 years agoMerge branch 'tegra-dc-changes-modedb' into colibri
Stefan Agner [Wed, 22 Jan 2014 17:47:32 +0000 (18:47 +0100)]
Merge branch 'tegra-dc-changes-modedb' into colibri

10 years agocolibri_t20/colibri_t30/apalis_t30: remove TEGRA_FB_VGA defines
Stefan Agner [Wed, 22 Jan 2014 17:23:26 +0000 (18:23 +0100)]
colibri_t20/colibri_t30/apalis_t30: remove TEGRA_FB_VGA defines

Remove TEGRA_FB_VGA defines and use VGA as default. Since initial
mode is now configureable through kernel cmd line parameter, we
don't need those compile time helpers.

10 years agovideo: tegra: updated comments, move front_porch work around
Stefan Agner [Wed, 22 Jan 2014 17:09:13 +0000 (18:09 +0100)]
video: tegra: updated comments, move front_porch work around

Updated several comments to make code easier to read and understand.
Also use the front_porch workaround in any case, for HDMI output
too.

10 years agocolibri_t20: video: use new modedb based settings
Stefan Agner [Mon, 13 Jan 2014 11:32:29 +0000 (12:32 +0100)]
colibri_t20: video: use new modedb based settings

Use modedb to set mode on framebuffer/display controller for
Tegra 20 based module Colibri T20 too.

10 years agotegra: video: parse multiple modedbs
Stefan Agner [Thu, 9 Jan 2014 12:20:53 +0000 (13:20 +0100)]
tegra: video: parse multiple modedbs

In order to find a viable resolution we not only parse VESA mode,
we also parse CEA (multimedia) modes and our own small modedb (for
specific touch screens).

10 years agotegra: video: remove unreferenced resolution from tegra_fb_info
Stefan Agner [Tue, 7 Jan 2014 12:35:39 +0000 (13:35 +0100)]
tegra: video: remove unreferenced resolution from tegra_fb_info

10 years agotegra: video: use correct return value for callback
Stefan Agner [Tue, 7 Jan 2014 12:32:44 +0000 (13:32 +0100)]
tegra: video: use correct return value for callback

10 years agotegra: video: use new modedb based settings
Stefan Agner [Tue, 7 Jan 2014 10:23:06 +0000 (11:23 +0100)]
tegra: video: use new modedb based settings

Use new modedb based framebuffer settings by defining default_mode
in the display controllers platform data. Also impelmented the
fallback logic to this default_mode in case no kernel cmd line
parameter was set.

10 years agotegra: video: use modedb to specify framebuffer resolution
Stefan Agner [Tue, 7 Jan 2014 09:40:38 +0000 (10:40 +0100)]
tegra: video: use modedb to specify framebuffer resolution

Allow to specify framebufffer videomode using kernel command line
parameters. NVIDIAs binary X driver later on picks up those settings
and start X with current mode settings, if no EDID data are available.

10 years agocolibri_t20: android: disable hw stat mon
Marcel Ziswiler [Fri, 13 Dec 2013 18:52:33 +0000 (19:52 +0100)]
colibri_t20: android: disable hw stat mon

Disable hardware statistics monitor for AVP due to it completely
hanging upon boot on certain Colibri T20 V1.2a modules.

10 years agocolibri_t30/apalis_t30: enable STMPE ADC driver
Stefan Agner [Mon, 9 Dec 2013 17:15:14 +0000 (18:15 +0100)]
colibri_t30/apalis_t30: enable STMPE ADC driver

Make use of the new STMPE ADC driver to expose the four free ADC
channels on the STMPE811 to userspace.

10 years agoiio: adc: add STMPE ADC driver using IIO framework
Stefan Agner [Mon, 9 Dec 2013 15:29:12 +0000 (16:29 +0100)]
iio: adc: add STMPE ADC driver using IIO framework

This adds an ADC driver for the STMPE device using the industrial
input/output interface. The driver supports raw reading of values.
The driver depends on the MFD stmpe driver. If the touchscreen
block is enabled too, only for of the 8 ADC channels are available.

10 years agomfd: stmpe: add ADC block resources
Stefan Agner [Mon, 9 Dec 2013 12:23:53 +0000 (13:23 +0100)]
mfd: stmpe: add ADC block resources

In order to use the auxiliar ADC inputs of STMPE811 devices we need
to add resources for the ADC block. Also move the ADC macros from
the touchscreen driver to the general header file. We will need them
for the ADC driver in future.

10 years agotegra: pcie: use integer for root_bus_nr
Stefan Agner [Mon, 9 Dec 2013 08:51:33 +0000 (09:51 +0100)]
tegra: pcie: use integer for root_bus_nr

The drivers internal root_bus_nr used to be u8 which lead to a wrong
error detection in bus_to_port. Bus number can be -1 in case bus is
not scanned yet. Thanks to James pointing that out.

10 years agoregulator: tps6586x: fixed voltage table for TPS658643
Stefan Agner [Mon, 2 Dec 2013 09:51:50 +0000 (10:51 +0100)]
regulator: tps6586x: fixed voltage table for TPS658643

The voltage table for the SM2 regulator on TPS658643 was wrong. However,
since the requested voltage of 1.8V was at the right place, the system
worked fine nonetheless.

10 years agocolibri_t20/colibri_t30: don't register KEY_BACK for wakeup
Stefan Agner [Wed, 20 Nov 2013 18:04:50 +0000 (19:04 +0100)]
colibri_t20/colibri_t30: don't register KEY_BACK for wakeup

The port used for KEY_BACK does not support wakeup (no wake PIN). Remove
the wake flag, this prevents unbalanced irq warning messages.

10 years agoapalis_t30: add gpio keyboard configuration
Stefan Agner [Tue, 26 Nov 2013 12:02:27 +0000 (13:02 +0100)]
apalis_t30: add gpio keyboard configuration

Add GPIO keyboard platform device configuration. Currently only the power key
is defined which is registred as wake key as well in order to wake the SoC when
in sleep mode (MXM3 37/WAKE1_MICO).

10 years agohdmi: avoid division by zero oops
Stefan Agner [Tue, 26 Nov 2013 08:42:47 +0000 (09:42 +0100)]
hdmi: avoid division by zero oops

After suspend, mode filter might be called with empty yres. This leads
to division by zero when checking aspect ratio. Return as invalid mode
when yres is zero.

10 years agoahci-tegra: add avdd_plle regulator
Stefan Agner [Mon, 25 Nov 2013 17:33:12 +0000 (18:33 +0100)]
ahci-tegra: add avdd_plle regulator

When enabling SATA clocks, the PCIE clocks are enabled as well since
those are the parent clocks. In order to enable this parent clocks,
the PCIE regulator avdd_plle needs to be enabled. The resume path used
to freeze because the PCIE PLL did not lock.

10 years agoARM: tegra: make SKU 0x81 same as 0xB1 for tegra3 tegra-l4t-r16-16.4
Shreshtha Sahu [Fri, 22 Nov 2013 06:41:10 +0000 (12:11 +0530)]
ARM: tegra: make SKU 0x81 same as 0xB1 for tegra3

SKU 0x81 is identical to 0xB1 so same can be used
for sku to speedo ID conversion.

Bug 1313434

Change-Id: I63f08522878524a05c2a6fb0a82fee90a59a99bd
Signed-off-by: Shreshtha Sahu <ssahu@nvidia.com>
Reviewed-on: http://git-master/r/334396
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>