linux.git
6 years agotegra: colibri_t30: colibri_t20: capacitive touch adapter support Apalis-T30_LXDE-Image_2.8b1.64-20171229 Colibri-T20_LXDE-Image_2.8b1.64-20171229 Colibri-T30_LXDE-Image_2.8b1.64-20171229
Dominik Sliwa [Thu, 21 Dec 2017 14:05:32 +0000 (15:05 +0100)]
tegra: colibri_t30: colibri_t20: capacitive touch adapter support

Adds compile time option to enable support for
Toradex Capacitive Touch Adapter.

Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agotegra: colibri_t30: colibri_t20: fix touch panel pins and reset
Dominik Sliwa [Thu, 21 Dec 2017 13:54:15 +0000 (14:54 +0100)]
tegra: colibri_t30: colibri_t20: fix touch panel pins and reset

Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agoapalis/colibri_t20/t30_defconfig: enable user debug
Stefan Agner [Thu, 30 Nov 2017 14:09:24 +0000 (15:09 +0100)]
apalis/colibri_t20/t30_defconfig: enable user debug

Let the kernel print some debug messages when a user program
crashes due to an exception.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agovfs: make O_PATH file descriptors usable for 'fchdir()'
Linus Torvalds [Sat, 7 Jul 2012 17:17:00 +0000 (10:17 -0700)]
vfs: make O_PATH file descriptors usable for 'fchdir()'

We already use them for openat() and friends, but fchdir() also wants to
be able to use O_PATH file descriptors.  This should make it comparable
to the O_SEARCH of Solaris.  In particular, O_PATH allows you to access
(not-quite-open) a directory you don't have read persmission to, only
execute permission.

Noticed during development of multithread support for ksh93.

Reported-by: ольга крыжановская <olga.kryzhanovska@gmail.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: stable@kernel.org # O_PATH introduced in 3.0+
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 332a2e1244bd08b9e3ecd378028513396a004a24)
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agovfs: make O_PATH file descriptors usable for 'fstat()'
Linus Torvalds [Fri, 14 Sep 2012 21:48:21 +0000 (14:48 -0700)]
vfs: make O_PATH file descriptors usable for 'fstat()'

We already use them for openat() and friends, but fstat() also wants to
be able to use O_PATH file descriptors.  This should make it more
directly comparable to the O_SEARCH of Solaris.

Note that you could already do the same thing with "fstatat()" and an
empty path, but just doing "fstat()" directly is simpler and faster, so
there is no reason not to just allow it directly.

See also commit 332a2e1244bd, which did the same thing for fchdir, for
the same reasons.

Reported-by: ольга крыжановская <olga.kryzhanovska@gmail.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: stable@kernel.org # O_PATH introduced in 3.0+
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 55815f70147dcfa3ead5738fd56d3574e2e3c1c2)
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agoVFS: make vfs_fstat() use f[get|put]_light()
Linus Torvalds [Sat, 28 Apr 2012 21:55:17 +0000 (14:55 -0700)]
VFS: make vfs_fstat() use f[get|put]_light()

Use the *_light() versions that properly avoid doing the file user count
updates when they are unnecessary.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit e994defb7b6813ba6fa7a2a36e86d2455ad1dc35)
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agotegra: apalis_t30: colibri_t30: colibri_t20: user crypto in defconfig
Dominik Sliwa [Tue, 21 Nov 2017 15:21:36 +0000 (16:21 +0100)]
tegra: apalis_t30: colibri_t30: colibri_t20: user crypto in defconfig

Add user crypto to defconfigs.

Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agocrypto: Add a flag to identify crypto instances
Steffen Klassert [Tue, 27 Sep 2011 05:21:26 +0000 (07:21 +0200)]
crypto: Add a flag to identify crypto instances

The upcomming crypto user configuration api needs to identify
crypto instances. This patch adds a flag that is set if the
algorithm is an instance that is build from templates.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 64a947b1337b93061da7c7af1f6ce6b2431b70ae)
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agocrypto: Export crypto_remove_final
Steffen Klassert [Tue, 27 Sep 2011 05:23:07 +0000 (07:23 +0200)]
crypto: Export crypto_remove_final

The upcomming crypto usrerspace configuration api needs
to remove the spawns on top on an algorithm, so export
crypto_remove_final.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 22e5b20be72e2e166c3ba915b01a59a8eb2dc71f)
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agocrypto: user - Fix rwsem leak in crypto_user
Jonathan Corbet [Tue, 1 Nov 2011 22:15:16 +0000 (09:15 +1100)]
crypto: user - Fix rwsem leak in crypto_user

The list_empty case in crypto_alg_match() will return without calling
up_read() on crypto_alg_sem.  We could do the "goto out" routine, but the
function will clearly do the right thing with that test simply removed.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit fb223c32b4d3ee593c8dce07e983680d06abe387)
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agocrypto: user - Initialise match in crypto_alg_match
Herbert Xu [Fri, 21 Oct 2011 12:37:10 +0000 (14:37 +0200)]
crypto: user - Initialise match in crypto_alg_match

We need to default match to 0 as otherwise it may lead to a false
positive.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit e6ea64ece7f4c14294b2fce5403b1e71eab87f1e)
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agocrypto: Add userspace report for compress type algorithms
Steffen Klassert [Tue, 27 Sep 2011 05:48:48 +0000 (07:48 +0200)]
crypto: Add userspace report for compress type algorithms

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 540b97c1dd9ee68112269be322d901f1edc1a282)
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agocrypto: Add userspace report for cipher type algorithms
Steffen Klassert [Tue, 27 Sep 2011 05:48:01 +0000 (07:48 +0200)]
crypto: Add userspace report for cipher type algorithms

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 07a5fa4abd8b6965d4585d3b110f89bdf5612aff)
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agocrypto: Add userspace report for rng type algorithms
Steffen Klassert [Tue, 27 Sep 2011 05:47:11 +0000 (07:47 +0200)]
crypto: Add userspace report for rng type algorithms

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 792608e9c215141fa4b870b7b2a23767a1ef12f4)
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agocrypto: Add userspace report for pcompress type algorithms
Steffen Klassert [Tue, 27 Sep 2011 05:46:32 +0000 (07:46 +0200)]
crypto: Add userspace report for pcompress type algorithms

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit a55465dca7befd31f4ffa54508d4e2d1e701b8dc)
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agocrypto: Add userspace report for nivaead type algorithms
Steffen Klassert [Tue, 27 Sep 2011 05:45:44 +0000 (07:45 +0200)]
crypto: Add userspace report for nivaead type algorithms

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit b735d0a91556fd9fd5bbeeebd7d327c2d92c36c8)
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agocrypto: Add userspace report for aead type algorithms
Steffen Klassert [Tue, 27 Sep 2011 05:44:27 +0000 (07:44 +0200)]
crypto: Add userspace report for aead type algorithms

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 6ad414fe710d4fd3a8c8c6c2ad8fefcfcc207968)
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agocrypto: Add userspace report for givcipher type algorithms
Steffen Klassert [Tue, 27 Sep 2011 05:43:24 +0000 (07:43 +0200)]
crypto: Add userspace report for givcipher type algorithms

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 3e29c1095a091f606a26c04a6542061c9e5f1d6b)
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agocrypto: Add userspace report for ablkcipher type algorithms
Steffen Klassert [Tue, 27 Sep 2011 05:42:32 +0000 (07:42 +0200)]
crypto: Add userspace report for ablkcipher type algorithms

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 29ffc87640e2a5bf0ab98bfeed8d6fc78b2d848e)
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agocrypto: Add userspace report for blkcipher type algorithms
Steffen Klassert [Tue, 27 Sep 2011 05:41:54 +0000 (07:41 +0200)]
crypto: Add userspace report for blkcipher type algorithms

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 50496a1fab6c6a90b77da4b247321a88e632bd46)
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agocrypto: Add userspace report for ahash type algorithms
Steffen Klassert [Tue, 27 Sep 2011 05:41:07 +0000 (07:41 +0200)]
crypto: Add userspace report for ahash type algorithms

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 6238cbaec429c98d1a280014839c934107c7c8f6)
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agocrypto: Add userspace report for shash type algorithms
Steffen Klassert [Tue, 27 Sep 2011 05:26:10 +0000 (07:26 +0200)]
crypto: Add userspace report for shash type algorithms

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit f4d663ce6357e533f107ce3789bd8848c94bea81)
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agocrypto: Add userspace report for larval type algorithms
Steffen Klassert [Tue, 27 Sep 2011 05:25:05 +0000 (07:25 +0200)]
crypto: Add userspace report for larval type algorithms

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 6c5a86f529a9e9ca4c9aca5fa477e9557d4a3d3d)
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agocrypto: Add a report function pointer to crypto_type
Steffen Klassert [Tue, 27 Sep 2011 05:24:29 +0000 (07:24 +0200)]
crypto: Add a report function pointer to crypto_type

We add a report function pointer to struct crypto_type. This function
pointer is used from the crypto userspace configuration API to report
crypto algorithms to userspace.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit b6aa63c09ba3b150a1030f9c95c7647361e7910e)
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agocrypto: Export crypto_remove_spawns
Steffen Klassert [Tue, 27 Sep 2011 05:22:08 +0000 (07:22 +0200)]
crypto: Export crypto_remove_spawns

The upcomming crypto usrerspace configuration api needs
to remove the spawns on top on an algorithm, so export
crypto_remove_spawns.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 89b596ba22d79dd5616616a9975192e1c2bea0fe)
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agocrypto: Add userspace configuration API
Steffen Klassert [Tue, 27 Sep 2011 05:23:50 +0000 (07:23 +0200)]
crypto: Add userspace configuration API

This patch adds a basic userspace configuration API for the crypto layer.
With this it is possible to instantiate, remove and to show crypto
algorithms from userspace.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit a38f7907b926e4c6c7d389ad96cc38cec2e5a9e9)
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agotegra: apalis_t30: colibri_t30: increase pwm clock
Dominik Sliwa [Tue, 10 Oct 2017 11:59:54 +0000 (13:59 +0200)]
tegra: apalis_t30: colibri_t30: increase pwm clock

Incresed PWM base clock to 25.5MHz. This results in maximum 99.6Khz
PWM out frequency which can be further divided by an integer divider.

Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agoARM: mach-tegra: colibri_t30: integrate atmel mxt multitouch controller Apalis-T30_LXDE-Image_2.7b4-20171005 Colibri-T20_LXDE-Image_2.7b4-20171005 Colibri-T30_LXDE-Image_2.7b4-20171005
Bhuvanchandra DV [Wed, 6 Sep 2017 08:54:55 +0000 (14:24 +0530)]
ARM: mach-tegra: colibri_t30: integrate atmel mxt multitouch controller

Integrate Atmel MXT multitouch controller driver which is interfaced
over I2C bus. The driver supports the 7" multitouch variant available
from Logic Technologies.

Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agoARM: mach-tegra: colibri_t20: integrate atmel mxt multitouch controller
Bhuvanchandra DV [Wed, 6 Sep 2017 08:54:56 +0000 (14:24 +0530)]
ARM: mach-tegra: colibri_t20: integrate atmel mxt multitouch controller

Integrate Atmel MXT multitouch controller driver which is interfaced
over I2C bus. The driver supports the 7" multitouch variant available
from Logic Technologies.

Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agoARM: mach-tegra: apalis_t30: integrate atmel mxt multitouch controller
Bhuvanchandra DV [Wed, 6 Sep 2017 08:54:55 +0000 (14:24 +0530)]
ARM: mach-tegra: apalis_t30: integrate atmel mxt multitouch controller

Integrate Atmel MXT multitouch controller driver which is interfaced
over I2C bus. The driver supports the 7" multitouch variant available
from Logic Technologies.

Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agoinput: atmel_mxt_ts driver update
Nick Dyer [Wed, 6 Sep 2017 08:54:55 +0000 (14:24 +0530)]
input: atmel_mxt_ts driver update

Update mxt driver to upstream version.

Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agotegra_udc.c: fix compilation with gcc 7
Max Krummenacher [Mon, 24 Jul 2017 09:30:15 +0000 (11:30 +0200)]
tegra_udc.c: fix compilation with gcc 7

With gcc 7 the following compile time error occurs:

| .../drivers/usb/gadget/tegra_udc.c:2565:17: error: 'out' directive writing 3 bytes into a region of size between 2 and 11 [-Werror=format-overflow=]
|    sprintf(name, "ep%dout", i);
|                  ^~~~~~~~~
| .../drivers/usb/gadget/tegra_udc.c:2565:3: note: 'sprintf' output between 7 and 16 bytes into a destination of size 14
|    sprintf(name, "ep%dout", i);
|    ^~~~~~~~~~~~~~~~~~~~~~~~~~~

The last end point will never be greater than 32 but the compiler can
not find this out from the code. Work around this by passing a format
specifier to interpreat i as a signed char.

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agocolibri_t20: update defconfig for wifi
Dominik Sliwa [Fri, 25 Aug 2017 09:03:25 +0000 (11:03 +0200)]
colibri_t20: update defconfig for wifi

Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agocolibri_t30: update defconfig for wifi
Dominik Sliwa [Fri, 25 Aug 2017 09:00:35 +0000 (11:00 +0200)]
colibri_t30: update defconfig for wifi

Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agotegra: do not enable pci without TEGRA_PCI
Dominik Sliwa [Fri, 25 Aug 2017 08:56:41 +0000 (10:56 +0200)]
tegra: do not enable pci without TEGRA_PCI

Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agoapalis_t30: update defconfig for wifi
Dominik Sliwa [Wed, 9 Aug 2017 09:28:02 +0000 (11:28 +0200)]
apalis_t30: update defconfig for wifi

Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agovideo: tegra: make tegra_fb_find_mode check default modes
Dominik Sliwa [Wed, 26 Jul 2017 14:45:34 +0000 (16:45 +0200)]
video: tegra: make tegra_fb_find_mode check default modes

We were only looking in tegra, VESA and CEA tables.
Let's also check standard video mode definitions table

Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agoapalis/colibri_t20/t30: power i2c 100 khz limitation
Marcel Ziswiler [Tue, 4 Jul 2017 20:31:28 +0000 (22:31 +0200)]
apalis/colibri_t20/t30: power i2c 100 khz limitation

At least the LM95245 temperature sensor is only supposed to be run at a
speed of 100 KHz.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
6 years agoapalis/colibri_t30: snapd squashfs configuration Apalis-T30_LXDE-Image_2.7b3-20170630 Colibri-T20_LXDE-Image_2.7b3-20170630 Colibri-T30_LXDE-Image_2.7b3-20170630
Marcel Ziswiler [Wed, 28 Jun 2017 17:08:41 +0000 (19:08 +0200)]
apalis/colibri_t30: snapd squashfs configuration

Prepare for snapd integration.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
6 years agoapalis_t30: pinmux: enable internal pull-up on mxm3 pin 37
Marcel Ziswiler [Sat, 17 Jun 2017 12:51:07 +0000 (14:51 +0200)]
apalis_t30: pinmux: enable internal pull-up on mxm3 pin 37

While MXM3 pin 37 aka WAKE1_MICO is pulled up with 4.7 K on the Apalis
Evaluation board and 100 K on the Ixora carrier board a custom carrier
board may leave it floating which may cause an unintended high interrupt
load on the default wake-up key with which may cause a lower CPU
performance.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
6 years agocolibri_t30: pinmux: enable internal pull-down on sodimm pin 45
Bhuvanchandra DV [Thu, 8 Jun 2017 10:11:22 +0000 (15:41 +0530)]
colibri_t30: pinmux: enable internal pull-down on sodimm pin 45

While SODIMM pin 45 is pulled down with 100 K on the Colibri Evaluation
board it is currently left floating on the Iris carrier board. This can
cause an unintended high interrupt load on the default power-key with
wake-up capabilities which can cause a lower CPU performance.

Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agocolibri_t30: add warning message before reaching critical temperature
Bhuvanchandra DV [Wed, 10 May 2017 12:27:53 +0000 (17:57 +0530)]
colibri_t30: add warning message before reaching critical temperature

Print log message before module (local) or SoC (remote) is reaching
critical shutdown temperature nT_CRIT as the LM95245 temperature
sensor's OVERT_N pin is directly connected to PMIC PWRDN.

Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agoapalis_t30: add warning message before reaching critical temperature
Bhuvanchandra DV [Wed, 10 May 2017 12:27:52 +0000 (17:57 +0530)]
apalis_t30: add warning message before reaching critical temperature

Print log message before module (local) or SoC (remote) is reaching
critical shutdown temperature nT_CRIT as the LM95245 temperature
sensor's OVERT_N pin is directly connected to PMIC PWRDN.

Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agoapalis/colibri_t30: clean-up thermal throttling
Marcel Ziswiler [Fri, 16 Jun 2017 15:10:29 +0000 (17:10 +0200)]
apalis/colibri_t30: clean-up thermal throttling

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
6 years agoiio: adc: fix number of channels when not using TS block
Stefan Agner [Wed, 17 May 2017 16:45:17 +0000 (09:45 -0700)]
iio: adc: fix number of channels when not using TS block

The number of channels registered when not using the touchscreen
block has been wrong. This did not allow to access all channels
in case where touchscreen is not used. By default Apalis and
Colibri T30 do use the touchscreen block, so the bug has not
affected the products when used with default platform data.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
6 years agoapalis/colibri_t30: drop TPS65910 driver in favour of TPS6591X one
Marcel Ziswiler [Thu, 27 Apr 2017 09:24:10 +0000 (11:24 +0200)]
apalis/colibri_t30: drop TPS65910 driver in favour of TPS6591X one

Rather than the TPS65910 driver the TPS6591X one is in use and to avoid
any confusion we drop the former completely.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
7 years agocolibri_t20: Register soc device Apalis-T30_LXDE-Image_2.7b2-20170410 Colibri-T20_LXDE-Image_2.7b2-20170410 Colibri-T30_LXDE-Image_2.7b2-20170410
Bhuvanchandra DV [Mon, 20 Feb 2017 17:44:03 +0000 (23:14 +0530)]
colibri_t20: Register soc device

Register SOC device to expose the SoC UID information via soc_sys

Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
7 years agocolibri_t30: Register soc device
Bhuvanchandra DV [Mon, 20 Feb 2017 17:44:02 +0000 (23:14 +0530)]
colibri_t30: Register soc device

Register SOC device to expose the SoC UID information via soc_sys

Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
7 years agoapalis_t30: Register soc device
Bhuvanchandra DV [Mon, 20 Feb 2017 17:44:01 +0000 (23:14 +0530)]
apalis_t30: Register soc device

Register SOC device to expose the SoC UID information via soc_sys

Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
7 years agoarm: tegra: soc: Use sys_soc to expose SoC UID
Bhuvanchandra DV [Mon, 20 Feb 2017 17:44:00 +0000 (23:14 +0530)]
arm: tegra: soc: Use sys_soc to expose SoC UID

Use the standard sys_soc interface to expose the SoC UID information.

e.g.
~# cat /sys/bus/soc/devices/soc0/machine
NVIDIA Tegra
~# cat /sys/bus/soc/devices/soc0/family
NVIDIA Tegra30
~# cat /sys/bus/soc/devices/soc0/revision
A03
~# cat /sys/bus/soc/devices/soc0/soc_id
98317451306464792

Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
7 years agodrivers/base: fix compiler warning in SoC export driver - idr should be ida
Lee Jones [Mon, 20 Feb 2017 17:43:59 +0000 (23:13 +0530)]
drivers/base: fix compiler warning in SoC export driver - idr should be ida

This fixes:
  note: expected ‘struct ida *’ but argument is of type ‘struct idr *’
  warning: passing argument 1 of ‘ida_pre_get’ from incompatible pointer type

Reported-by: Arnd Bergman <arnd@arndb.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 3a4ffe930a2d2dad07604fe74d21b878decc6461)

7 years agodrivers/base: add bus for System-on-Chip devices
Lee Jones [Mon, 20 Feb 2017 17:43:58 +0000 (23:13 +0530)]
drivers/base: add bus for System-on-Chip devices

Traditionally, any System-on-Chip based platform creates a flat list
of platform_devices directly under /sys/devices/platform.

In order to give these some better structure, this introduces a new
bus type for soc_devices that are registered with the new
soc_device_register() function.  All devices that are on the same
chip should then be registered as child devices of the soc device.

The soc bus also exports a few standardised device attributes which
allow user space to query the specific type of soc.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 74d1d82cdaaec727f5072eb1c9f49b7e920e076f)

7 years agocolibri_t20: hack: prevent boot lock-up if hdmi is not connected
Marcel Ziswiler [Mon, 13 Feb 2017 07:46:59 +0000 (08:46 +0100)]
colibri_t20: hack: prevent boot lock-up if hdmi is not connected

Hack to prevent boot lock-up if HDMI is not connected.

This has been observed on recent T20 SoC production lots produced some
when after mid 2015.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
7 years agocrypto: add CMAC support to CryptoAPI
Jussi Kivilinna [Mon, 8 Apr 2013 07:48:44 +0000 (10:48 +0300)]
crypto: add CMAC support to CryptoAPI

Patch adds support for NIST recommended block cipher mode CMAC to CryptoAPI.

This work is based on Tom St Denis' earlier patch,
 http://marc.info/?l=linux-crypto-vger&m=135877306305466&w=2

Cc: Tom St Denis <tstdenis@elliptictech.com>
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 93b5e86a6d13c5dec18c6611933fb38d7d80f0d2)

7 years agommc: core: add eMMC hardware reset support
Adrian Hunter [Mon, 29 Aug 2011 13:42:11 +0000 (16:42 +0300)]
mmc: core: add eMMC hardware reset support

eMMC's may have a hardware reset line.  This patch provides a
host controller operation to implement hardware reset and
a function to reset and reinitialize the card.  Also, for MMC,
the reset is always performed before initialization.

The host must set the new host capability MMC_CAP_HW_RESET
to enable hardware reset.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
(cherry picked from commit b2499518b5ad7e28bb3ed348fd3f370eeb1e36c0)

7 years agoapalis/colibri_t20/t30: disable ext4 configuration Apalis_T30_LinuxImageV2.7Beta1_20170112 Colibri_T20_LinuxImageV2.7Beta1_20170112 Colibri_T30_LinuxImageV2.7Beta1_20170112
Marcel Ziswiler [Thu, 22 Dec 2016 15:31:56 +0000 (16:31 +0100)]
apalis/colibri_t20/t30: disable ext4 configuration

As ext4 is known to cause issues on that ancient NVIDIA L4T kernel just
disable it in favour of ext3 which is known to be working fine.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
7 years agoapalis_t30: fix pcie clock and reset not conforming to specification
Marcel Ziswiler [Wed, 9 Nov 2016 17:21:06 +0000 (18:21 +0100)]
apalis_t30: fix pcie clock and reset not conforming to specification

Fix PCIe clock and reset not conforming to specification by moving PCIe
reset handling including the PLX PEX 8605 errata 5 workaround from the
board platform data into the right places timing wise in the PCIe driver
itself.

Also add a kernel command line argument to allow using the Apalis GPIO7
as a regular GPIO rather than for above mentioned PLX PEX 8605
workaround:

pex_perst=0

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
7 years agoapalis/colibri_t20/t30: configure IPv6 SIT driver as module
Stefan Agner [Tue, 8 Nov 2016 23:16:38 +0000 (15:16 -0800)]
apalis/colibri_t20/t30: configure IPv6 SIT driver as module

SIT tunnels (IPv6 over IPv4) are not often used hence configure
the driver as a module. This also gets rid of the extra network
interface sit0 by default.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
7 years agoapalis/colibri_t30: pull-down multiplexed camera input pins saves 100mW Apalis_T30_LinuxImageV2.6.1Beta1_20160929 Colibri_T20_LinuxImageV2.6.1Beta1_20160929 Colibri_T30_LinuxImageV2.6.1Beta1_20160929
Marcel Ziswiler [Wed, 21 Sep 2016 14:49:16 +0000 (16:49 +0200)]
apalis/colibri_t30: pull-down multiplexed camera input pins saves 100mW

Floating pins towards the camera input level-shifter cause it to
consume at least 100mW of power even in idle. This patch fixes this by
configuring pull-downs on all multiplexed camera input pins.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
7 years agocolibri_t20: fix gcc-6 compilation
Marcel Ziswiler [Thu, 18 Aug 2016 07:43:28 +0000 (09:43 +0200)]
colibri_t20: fix gcc-6 compilation

arch/arm/mach-tegra/board-colibri_t20.c:668:43: error: 'i2c2_ddc'
defined but not used [-Werror=unused-const-variable=]
 static const struct tegra_pingroup_config i2c2_ddc = {
                                           ^~~~~~~~

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
7 years agoasoc: tegra: fix gcc-6 compilation
Marcel Ziswiler [Thu, 18 Aug 2016 06:41:38 +0000 (08:41 +0200)]
asoc: tegra: fix gcc-6 compilation

sound/soc/tegra/tegra30_dam.c: In function 'tegra30_dam_probe':
sound/soc/tegra/tegra30_dam.c:620:3: error: this 'if' clause does not
guard... [-Werror=misleading-indentation]
   if ((i == TEGRA30_DAM_CTRL_RSVD_6) ||
   ^~
sound/soc/tegra/tegra30_dam.c:624:4: note: ...this statement, but the
latter is misleadingly indented as if it is guarded by the 'if'
    dam->reg_cache[i] =
    ^~~

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
7 years agovideo: tegra: dsi: fix gcc-6 compilation
Marcel Ziswiler [Thu, 18 Aug 2016 06:40:40 +0000 (08:40 +0200)]
video: tegra: dsi: fix gcc-6 compilation

drivers/video/tegra/dc/dsi.c: In function 'tegra_dsi_read_fifo':
drivers/video/tegra/dc/dsi.c:2515:3: error: this 'if' clause does not
guard... [-Werror=misleading-indentation]
   if (rd_fifo_cnt << 2 > DSI_READ_FIFO_DEPTH)
   ^~
drivers/video/tegra/dc/dsi.c:2518:4: note: ...this statement, but the
latter is misleadingly indented as if it is guarded by the 'if'
    break;
    ^~~~~

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
7 years agocompiler-gcc: disable -ftracer for __noclone functions
Paolo Bonzini [Thu, 31 Mar 2016 07:38:51 +0000 (09:38 +0200)]
compiler-gcc: disable -ftracer for __noclone functions

commit 95272c29378ee7dc15f43fa2758cb28a5913a06d upstream.

-ftracer can duplicate asm blocks causing compilation to fail in
noclone functions.  For example, KVM declares a global variable
in an asm like

    asm("2: ... \n
         .pushsection data \n
         .global vmx_return \n
         vmx_return: .long 2b");

and -ftracer causes a double declaration.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Michal Marek <mmarek@suse.cz>
Cc: stable@vger.kernel.org
Cc: kvm@vger.kernel.org
Reported-by: Linda Walsh <lkml@tlinx.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit 5d814ad8d35e5e23e0c27fb0f0b80c1044ecefad)

7 years agocompiler-gcc: integrate the various compiler-gcc[345].h files
Joe Perches [Thu, 25 Jun 2015 22:01:02 +0000 (15:01 -0700)]
compiler-gcc: integrate the various compiler-gcc[345].h files

commit cb984d101b30eb7478d32df56a0023e4603cba7f upstream.

As gcc major version numbers are going to advance rather rapidly in the
future, there's no real value in separate files for each compiler
version.

Deduplicate some of the macros #defined in each file too.

Neaten comments using normal kernel commenting style.

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Michal Marek <mmarek@suse.cz>
Cc: Segher Boessenkool <segher@kernel.crashing.org>
Cc: Sasha Levin <levinsasha928@gmail.com>
Cc: Anton Blanchard <anton@samba.org>
Cc: Alan Modra <amodra@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[ philm: backport to 3.10-stable ]
Signed-off-by: Philip Müller <philm@manjaro.org>
Signed-off-by: Willy Tarreau <w@1wt.eu>
(cherry picked from commit a4a4f1cd733fe5b345db4e8cc19bb8868d562a8a)

7 years agocompiler-gcc.h: Add gcc-recommended GCC_VERSION macro
Daniel Santos [Fri, 22 Feb 2013 00:41:39 +0000 (16:41 -0800)]
compiler-gcc.h: Add gcc-recommended GCC_VERSION macro

Throughout compiler*.h, many version checks are made.  These can be
simplified by using the macro that gcc's documentation recommends.
However, my primary reason for adding this is that I need bug-check
macros that are enabled at certain gcc versions and it's cleaner to use
this macro than the tradition method:

  #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ => 2)

If you add patch level, it gets this ugly:

  #if __GNUC__ > 4 || (__GNUC__ == 4 && (__GNUC_MINOR__ > 2 || \
      __GNUC_MINOR__ == 2 __GNUC_PATCHLEVEL__ >= 1))

As opposed to:

  #if GCC_VERSION >= 40201

While having separate headers for gcc 3 & 4 eliminates some of this
verbosity, they can still be cleaned up by this.

See also:

  http://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html

Signed-off-by: Daniel Santos <daniel.santos@pobox.com>
Acked-by: Borislav Petkov <bp@alien8.de>
Acked-by: David Rientjes <rientjes@google.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Joe Perches <joe@perches.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 3f3f8d2f48acfd8ed3b8e6b7377935da57b27b16)

7 years agoftrace: Make all inline tags also include notrace
Steven Rostedt [Thu, 14 Jun 2012 14:54:28 +0000 (10:54 -0400)]
ftrace: Make all inline tags also include notrace

Commit 5963e317b1e9d2a ("ftrace/x86: Do not change stacks in DEBUG when
calling lockdep") prevented lockdep calls from the int3 breakpoint handler
from reseting the stack if a function that was called was in the process
of being converted for tracing and had a breakpoint on it. The idea is,
before calling the lockdep code, do a load_idt() to the special IDT that
kept the breakpoint stack from reseting. This worked well as a quick fix
for this kernel release, until a certain config caused a lockup in the
function tracer start up tests.

Investigating it, I found that the load_idt that was used to prevent
the int3 from changing stacks was itself being traced!

Even though the config had CONFIG_OPTIMIZE_INLINING disabled, and
all 'inline' tags were set to always inline, there were still cases that
it did not inline! This was caused by CONFIG_PARAVIRT_GUEST, where it
would add a pointer to the native_load_idt() which made that function
to be traced.

Commit 45959ee7aa645815a ("ftrace: Do not function trace inlined functions")
only touched the 'inline' tags when CONFIG_OPMITIZE_INLINING was enabled.
PARAVIRT_GUEST shows that this was not enough and we need to also
mark always_inline with notrace as well.

Reported-by: Fengguang Wu <wfg@linux.intel.com>
Tested-by: Fengguang Wu <wfg@linux.intel.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
(cherry picked from commit 93b3cca1ccd30b1ad290951a3fc7c10c73db7313)

7 years agoftrace: Do not function trace inlined functions
Steven Rostedt [Mon, 12 Dec 2011 20:22:41 +0000 (15:22 -0500)]
ftrace: Do not function trace inlined functions

When gcc inlines a function, it does not mark it with the mcount
prologue, which in turn means that inlined functions are not traced
by the function tracer. But if CONFIG_OPTIMIZE_INLINING is set, then
gcc is allowed not to inline a function that is marked inline.

Depending on the options and the compiler, a function may or may
not be traced by the function tracer, depending on whether gcc
decides to inline a function or not. This has caused several
problems in the pass becaues gcc is not always consistent with
what it decides to inline between different gcc versions.

Some places should not be traced (like paravirt native_* functions)
and these are mostly marked as inline. When gcc decides not to
inline the function, and if that function should not be traced, then
the ftrace function tracer will suddenly break when it use to work
fine. This becomes even harder to debug when different versions of
gcc will not inline that function, making the same kernel and config
work for some gcc versions and not work for others.

By making all functions marked inline to not be traced will remove
the ambiguity that gcc adds when it comes to tracing functions marked
inline. All gcc versions will be consistent with what functions are
traced and having volatile working code will be removed.

Note, only the inline macro when CONFIG_OPTIMIZE_INLINING is set needs
to have notrace added, as the attribute __always_inline will force
the function to be inlined and then not traced.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
(cherry picked from commit 45959ee7aa645815a5ce303a0ea1e48a21e67c6a)

7 years agotegra: HDMI allow more aspect ratios
Dominik Sliwa [Fri, 22 Jul 2016 12:57:59 +0000 (14:57 +0200)]
tegra: HDMI allow more aspect ratios

When connected display EDID presents
aspect ratio that is in valid range,
but it's not in a table of valid ratios
accept it with a warning message.

Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
7 years agotegra: Fix unsupported HDMI screen crash
Dominik Sliwa [Fri, 15 Jul 2016 09:44:36 +0000 (11:44 +0200)]
tegra: Fix unsupported HDMI screen crash

Connecting unsuported screen to HDMI
resulted in kernel panic.

Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
7 years agoapalis/colibri_t30: disable tps62362 pull-downs, use vdd_core set 0 Apalis_T30_LinuxImageV2.6Beta2_20160701 Colibri_T20_LinuxImageV2.6Beta2_20160701 Colibri_T30_LinuxImageV2.6Beta2_20160701
Marcel Ziswiler [Mon, 27 Jun 2016 12:38:29 +0000 (14:38 +0200)]
apalis/colibri_t30: disable tps62362 pull-downs, use vdd_core set 0

TPS62362:
- disable all internal pull-down resistors to decrease (RTC battery)
  current consumption
- make sure we use VDD_CORE set point 0

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
7 years agoapalis/colibri_t30: initialise tps65911 gpios
Marcel Ziswiler [Mon, 27 Jun 2016 12:33:24 +0000 (14:33 +0200)]
apalis/colibri_t30: initialise tps65911 gpios

Initialise TPS65911 GPIOs:
- disable internal pull-down resistors to decrease (RTC battery)
  current consumption
- output 0 during sleep state on GPIO2 (EN_VDD_CORE) and GPIO6
  (EN_VDD_HDMI)

While at it also remove some obsolete includes, update some comments,
fix some indenting and FIXED_REG resp. GPIO_REG ids.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
7 years agoapalis_t30: allow for setting vi level-shifter direction
Marcel Ziswiler [Tue, 14 Jun 2016 12:22:06 +0000 (14:22 +0200)]
apalis_t30: allow for setting vi level-shifter direction

Allow for setting the direction of the VI pins' level-shifter. Do not
tri-state those pins' output driver in order to be able to actually
output any values as well. Default to direction input and update
comments accordingly.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
7 years agoapalis_t30: enable 24 mhz cam1_mclk aka vi_sensor clock
Marcel Ziswiler [Tue, 14 Jun 2016 12:17:23 +0000 (14:17 +0200)]
apalis_t30: enable 24 mhz cam1_mclk aka vi_sensor clock

Enable a static 24 MHz camera clock on CAM1_MCLK suitable for e.g.
ov5640, ov7670soc or the like.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
7 years agoarm: smp: sched: clean-up and silence cpu hot-plugging debug
Marcel Ziswiler [Fri, 3 Jun 2016 07:40:44 +0000 (09:40 +0200)]
arm: smp: sched: clean-up and silence cpu hot-plugging debug

Clean-up and silence those annoying CPU hot-plugging debug messages.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
7 years agommc: sdhci: handle command timeout after transfer complete interrupt
Nicolas Serafini [Thu, 28 Apr 2016 09:24:24 +0000 (11:24 +0200)]
mmc: sdhci: handle command timeout after transfer complete interrupt

On a tegra3 platform with Hynix eMMC we can observe that sometimes we
receive a command timeout after a transfer complete interrupt on a
multiple block read request.

Here is the output using MMC_DEBUG and ftrace.

When it works:

tegra_sdhci_set_clock: tegra_sdhci_set_clock mmc0 0 enabled=1
tegra_sdhci_set_clock: tegra_sdhci_set_clock mmc0 52000000 enabled=0
__mmc_start_req: mmc0: starting CMD18 arg 00a73044 flags 000000b5
__mmc_start_req: mmc0:    blksz 512 blocks 2 flags 00000200 tsac 150 ms nsac 1000
__mmc_start_req: mmc0:    CMD12 arg 00000000 flags 0000049d
sdhci_irq: sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
sdhci_finish_command: sdhci_finish_command:1075
sdhci_irq: sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000002
sdhci_tasklet_finish: sdhci_tasklet_finish:2064

When we have the error:

tegra_sdhci_set_clock: tegra_sdhci_set_clock mmc0 0 enabled=1
tegra_sdhci_set_clock: tegra_sdhci_set_clock mmc0 52000000 enabled=0
__mmc_start_req: mmc0: starting CMD18 arg 00a63d12 flags 000000b5
__mmc_start_req: mmc0:    blksz 512 blocks 2 flags 00000200 tsac 150 ms nsac 1000
__mmc_start_req: mmc0:    CMD12 arg 00000000 flags 0000049d
sdhci_irq: sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00000001
sdhci_finish_command: sdhci_finish_command:1075
sdhci_irq: sdhci [sdhci_irq()]: *** mmc0 got interrupt: 0x00018000
------NOW THE REQUEST BLOCK UNTIL TIMEOUT------

We can see that when it works the multiple read blocks command stopped by
the CMD12 receive two interrupts. The first is the Transfer complete
interrupt (SDHCI_INT_RESPONSE) and just after the Block Gap Event
interrupt (SDHCI_INT_DATA_END). In this case the command is finished and
the data is finished too.

In the bad case instead of receiving SDHCI_INT_DATA_END we receive a
command timeout error (SDHCI_INT_TIMEOUT) but command was already
finished by the SDHCI_INT_RESPONSE so not more command is waiting and the
driver wait until the timeout timer end because this case is not managed.

Signed-off-by: Nicolas Serafini <nicolas.serafini@sensefly.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
7 years agommc: host: sdhci: fix suspend/resume issue
Marcel Ziswiler [Sun, 24 Apr 2016 14:49:25 +0000 (16:49 +0200)]
mmc: host: sdhci: fix suspend/resume issue

This fixes the following eMMC suspend/resume issue as seen on
Colibri T30 1GB IT V1.1A:

[   75.479664] mmcblk0: error -110 transferring data, sector 287240, nr 2,
 cmd response 0x900, card status 0xc00
[   75.580923] end_request: I/O error, dev mmcblk0, sector 287240
[   75.586782] Buffer I/O error on device mmcblk0p2, logical block 123140
[   75.593313] lost page write due to I/O error on mmcblk0p2

(fixes an issue probably caused by a merge conflict introduced by
commit 7f7b042a978edfc6c7d1e14ec9c6ec01ffcc284b)

Signed-off-by: Mirza Krak <mirza.krak@hostmobility.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
7 years agoapalis_t30: v4l2: Epson S2D13P04 integration
BhuvanChandra.DV [Wed, 20 Apr 2016 04:52:16 +0000 (04:52 +0000)]
apalis_t30: v4l2: Epson S2D13P04 integration

Integrate Epson S2D13P04 video decoder support.

Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
7 years agoapalis/colibri_t30: modularise wi-fi configuration
Marcel Ziswiler [Tue, 19 Apr 2016 13:35:41 +0000 (15:35 +0200)]
apalis/colibri_t30: modularise wi-fi configuration

Modularise our Wi-Fi configuration meaning build support for our
former Ralink RT3070 based Ambicom WL250N as module as well plus
while at it enable support for newer Ralink RT5370 based common
Wi-Fi USB sticks as well.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
7 years agomedia: Epson S2D13P04 decoder support for Colibri T30
Wojciech Bieganski [Fri, 1 Apr 2016 10:38:40 +0000 (12:38 +0200)]
media: Epson S2D13P04 decoder support for Colibri T30

This commit adds support for Epson S2D13P04 (4-input
analog video decoder with parallel interface) for
Colibri T30.
Currently the only supported standard is PAL-B/G/I/N
and the output is arranged in 'merge mode' (4 input
streams on one screen)

Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
8 years agortl8192cu: Add new device IDs Apalis_T30_LinuxImageV2.6Beta1_20160331 Colibri_T20_LinuxImageV2.6Beta1_20160331 Colibri_T30_LinuxImageV2.6Beta1_20160331
Larry Finger [Tue, 18 Oct 2011 22:52:01 +0000 (17:52 -0500)]
rtl8192cu: Add new device IDs

The latest vendor (non-mac80211) driver of 9/22/2011 shows some new
device IDs for rtl8192cu. In addition, some typos in the table are
fixed and one duplicate is removed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
(cherry picked from commit 6cddafab54e9a17b2efefe982547865955a5ff3a)

8 years agoARM: 8429/1: disable GCC SRA optimization
Ard Biesheuvel [Thu, 3 Sep 2015 12:24:40 +0000 (13:24 +0100)]
ARM: 8429/1: disable GCC SRA optimization

While working on the 32-bit ARM port of UEFI, I noticed a strange
corruption in the kernel log. The following snprintf() statement
(in drivers/firmware/efi/efi.c:efi_md_typeattr_format())

snprintf(pos, size, "|%3s|%2s|%2s|%2s|%3s|%2s|%2s|%2s|%2s]",

was producing the following output in the log:

|    |   |   |   |    |WB|WT|WC|UC]
|    |   |   |   |    |WB|WT|WC|UC]
|    |   |   |   |    |WB|WT|WC|UC]
|RUN|   |   |   |    |WB|WT|WC|UC]*
|RUN|   |   |   |    |WB|WT|WC|UC]*
|    |   |   |   |    |WB|WT|WC|UC]
|RUN|   |   |   |    |WB|WT|WC|UC]*
|    |   |   |   |    |WB|WT|WC|UC]
|RUN|   |   |   |    |   |   |   |UC]
|RUN|   |   |   |    |   |   |   |UC]

As it turns out, this is caused by incorrect code being emitted for
the string() function in lib/vsprintf.c. The following code

if (!(spec.flags & LEFT)) {
while (len < spec.field_width--) {
if (buf < end)
*buf = ' ';
++buf;
}
}
for (i = 0; i < len; ++i) {
if (buf < end)
*buf = *s;
++buf; ++s;
}
while (len < spec.field_width--) {
if (buf < end)
*buf = ' ';
++buf;
}

when called with len == 0, triggers an issue in the GCC SRA optimization
pass (Scalar Replacement of Aggregates), which handles promotion of signed
struct members incorrectly. This is a known but as yet unresolved issue.
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65932). In this particular
case, it is causing the second while loop to be executed erroneously a
single time, causing the additional space characters to be printed.

So disable the optimization by passing -fno-ipa-sra.

Cc: <stable@vger.kernel.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
(cherry picked from commit a077224fd35b2f7fbc93f14cf67074fc792fbac2)

8 years agotegra3_clocks.c: fix unusual comparision
Max Krummenacher [Thu, 14 May 2015 12:46:45 +0000 (14:46 +0200)]
tegra3_clocks.c: fix unusual comparision

newer compilers throw the following error:
tegra3_clocks.c:820:31: error: logical not is only applied to the left hand side of comparison [-Werror=logical-not-parentheses]
|   c->state = (!is_lp_cluster() == (c->u.cpu.mode == MODE_G))? ON : OFF;
|                                ^

Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
8 years agoInput: sentelic - use "static inline" instead of "inline"
Khem Raj [Fri, 22 May 2015 16:56:29 +0000 (09:56 -0700)]
Input: sentelic - use "static inline" instead of "inline"

gcc-5 defaults to gnu11 which used c99 inline semantics in c99 'inline' is
not externally visible unlike gnu89, therefore we use 'static inline' which
has same semantics between gnu89 and c99

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
(cherry picked from commit bde304575f3ecaa9570a9329196dffaadf3adafa)

8 years agoInput: lifebook - use "static inline" instead of "inline" in lifebook.h
Chen Gang [Sun, 9 Nov 2014 21:31:11 +0000 (13:31 -0800)]
Input: lifebook - use "static inline" instead of "inline" in lifebook.h

For functions defined in header files we should use static inline rather
than inline, which breaks under the latest upstream gcc (which is really
gcc issue, but static inline is better suited regardless).

The related error (with allmodconfig under tile):

    MODPOST 4002 modules
  ERROR: "lifebook_detect" [drivers/input/mouse/psmouse.ko] undefined!

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
(cherry picked from commit bd447b61c49fc26f0299587db3e6d66da49dc529)

8 years agokernel: add support for gcc 5
Sasha Levin [Mon, 13 Oct 2014 22:51:05 +0000 (15:51 -0700)]
kernel: add support for gcc 5

We're missing include/linux/compiler-gcc5.h which is required now
because gcc branched off to v5 in trunk.

Just copy the relevant bits out of include/linux/compiler-gcc4.h,
no new code is added as of now.

This fixes a build error when using gcc 5.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 71458cfc782eafe4b27656e078d379a34e472adf)

8 years agoARM: 8158/1: LLVMLinux: use static inline in ARM ftrace.h
Behan Webster [Wed, 24 Sep 2014 00:06:46 +0000 (01:06 +0100)]
ARM: 8158/1: LLVMLinux: use static inline in ARM ftrace.h

With compilers which follow the C99 standard (like modern versions of gcc and
clang), "extern inline" does the wrong thing (emits code for an externally
linkable version of the inline function). In this case using static inline
and removing the NULL version of return_address in return_address.c does
the right thing.

Signed-off-by: Behan Webster <behanw@converseincode.com>
Reviewed-by: Mark Charlebois <charlebm@gmail.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
(cherry picked from commit aeea3592a13bf12861943e44fc48f1f270941f8d)

8 years agobcma: use static keyword for inline function declaration in bcma.h
Arend van Spriel [Thu, 8 Dec 2011 23:06:42 +0000 (15:06 -0800)]
bcma: use static keyword for inline function declaration in bcma.h

Just scratching an itch here, but it makes more sense to use the
static keyword if you think about how the compiler treats inline
functions.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
(cherry picked from commit 084455524f0d46dd210b4397898aff73579b97e8)

8 years agoapalis/colibri_t20/t30: synchronize USB serial options
Stefan Agner [Tue, 26 Jan 2016 23:45:14 +0000 (15:45 -0800)]
apalis/colibri_t20/t30: synchronize USB serial options

Compile USB device classes such as WDM and CDC ACM as modules.
Enable USB driver for GSM and CDMA modems (Option and others).
Also enable USB serial console option which allows to use a USB
serial device as a serial console at boot time.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
8 years agoapalis_t30: ixora: optionally support leds, switch, foff and wdisable
Marcel Ziswiler [Wed, 13 Jan 2016 23:53:35 +0000 (00:53 +0100)]
apalis_t30: ixora: optionally support leds, switch, foff and wdisable

The Ixora carrier board has a few MXM3 pins repurposed as follows:

Functionality MXM3 Pin
LED4_RED 146
LED4_GREEN 162
LED5_RED 156
LED5_GREEN 152
PCIE1_WDISABLE_N 144
SW3 160
UART2_3_RS232_FOFF_N 164

This patch allows uncommenting an IXORA define in the board header file
in order to make use of those repurposed pins.

Please note that those pins are usually used for the 8-bit MMC/SD slot
aka Apalis MMC1 and the SDHCI controller/driver unfortunately changes
the output driver behaviour in a way preventing any regular GPIO use.
This patch therefore explicitly does not register the SDHCI driver on
this controller instance in the Ixora case to avoid this.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
8 years agocolibri_t20/t30: add as0260 camera platform data Apalis_T30_LinuxImageV2.5Beta3_20151215 Colibri_T20_LinuxImageV2.5Beta3_20151215 Colibri_T30_LinuxImageV2.5Beta3_20151215
Marcel Ziswiler [Mon, 14 Dec 2015 23:00:23 +0000 (00:00 +0100)]
colibri_t20/t30: add as0260 camera platform data

Add Aptina AS0260 camera platform data.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
8 years agoapalis/colibri_t20/t30: clean-up board files
Marcel Ziswiler [Mon, 14 Dec 2015 22:46:33 +0000 (23:46 +0100)]
apalis/colibri_t20/t30: clean-up board files

Purely cosmetic clean-up of board files by fixing indentation,
re-ordering camera platform data, splitting lines longer than 80
characters etc.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
8 years agocolibri_t20: v4l2: adv7280 integration
Bhuvanchandra DV [Mon, 14 Dec 2015 14:06:15 +0000 (19:36 +0530)]
colibri_t20: v4l2: adv7280 integration

Integrate ADV7280 video decoder support.

Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
8 years agocolibri_t30: v4l2: adv7280 integration
Bhuvanchandra DV [Mon, 14 Dec 2015 14:06:14 +0000 (19:36 +0530)]
colibri_t30: v4l2: adv7280 integration

Integrate ADV7280 video decoder support.

Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
8 years agoapalis/colibri_t20/t30: Add multitouch HID support
Stefan Agner [Mon, 30 Nov 2015 19:34:35 +0000 (11:34 -0800)]
apalis/colibri_t20/t30: Add multitouch HID support

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
8 years agoapalis/colibri_t20/t30: Enable RTL8192CU driver
Bhuvanchandra DV [Tue, 24 Nov 2015 13:54:29 +0000 (19:24 +0530)]
apalis/colibri_t20/t30: Enable RTL8192CU driver

Enable RTL8192CU driver to support LM006 USB WiFi adapter.

Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
8 years agotimeconst.pl: Eliminate Perl warning Apalis_T30_LinuxImageV2.5Beta2_20151106 Colibri_T20_LinuxImageV2.5Beta2_20151106 Colibri_T30_LinuxImageV2.5Beta2_20151106
H. Peter Anvin [Fri, 8 Feb 2013 01:14:08 +0000 (17:14 -0800)]
timeconst.pl: Eliminate Perl warning

defined(@array) is deprecated in Perl and gives off a warning.
Restructure the code to remove that warning.

[ hpa: it would be interesting to revert to the timeconst.bc script.
  It appears that the failures reported by akpm during testing of
  that script was due to a known broken version of make, not a problem
  with bc.  The Makefile rules could probably be restructured to avoid
  the make bug, or it is probably old enough that it doesn't matter. ]

Reported-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: <stable@vger.kernel.org>
(cherry picked from commit 63a3f603413ffe82ad775f2d62a5afff87fd94a0)
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
8 years agoRevert "apalis_t30: Make audio and leds-pwm platform devices dependent on kconfig...
Marcel Ziswiler [Fri, 6 Nov 2015 10:03:33 +0000 (11:03 +0100)]
Revert "apalis_t30: Make audio and leds-pwm platform devices dependent on kconfig symbols"

This reverts commit 0b206b99b8b7c27e70fb91bc13e2255cb0cfeb28.

Unfortunately there is no CONFIG_AUDIO_SGTL5000_TEGRA!

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
8 years agoVarious Tegra HS UART backports
Mitja Spes [Thu, 27 Aug 2015 07:03:06 +0000 (09:03 +0200)]
Various Tegra HS UART backports

Various Tegra HS UART backports

Signed-off-by: Mitja Spes <mitja@lxnav.com>
8 years agoFix HS UART HW buffer overrun issue
Mitja Spes [Thu, 27 Aug 2015 07:01:42 +0000 (09:01 +0200)]
Fix HS UART HW buffer overrun issue

Fix HS UART HW buffer overrun issue when using no flow control

Signed-off-by: Mitja Spes <mitja@lxnav.com>
8 years agoinput: touchscreen: fusion: implement multitouch with slot handling
Stefan Agner [Thu, 29 Oct 2015 22:06:26 +0000 (15:06 -0700)]
input: touchscreen: fusion: implement multitouch with slot handling

According to multi-touch-protocol.txt the kernel knows two type of
devices:
- Type A: devices which provide anonymous contacts
- Type B: devices which are capable of tracking individual contacts

The Fusion touch screen is a Type B device: The Touch ID field allows
to differentiate between 2 different fingers. This updates the driver
to properly allocate a slot for each identified contact and use the
helper functions available from the input core system.

(cherry picked from commit 698d0a9bb80d94adef58122717c61f55dd61e22d)