Age | Commit message (Collapse) | Author |
|
Enable WIRELESS_EXT and WEXT_PRIV options for the backported
rtl81288eu driver.
Related-to: ELB-2388
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
|
|
Disabling all wireless drivers and cfg80211 module makes able
to completely avoid interferences with backported drivers.
Related-to: ELB-2388
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
|
|
The config option WIRELESS_EXT and WEXT_PRIV use to build external
drivers, such as backports. Make these options storable in config file
to be able to set them independently.
Related-to: ELB-2388
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
|
|
Backports-5.4 requires the config option CRYPTO_HASH_INFO.
Enable it in the default config file.
Related-to: ELB-2388
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
|
|
CRYPTO_HASH_INFO option needs to build external packages like
backports-5.4. Make it selectable with Kconfig subsystem.
Related-to: ELB-23898
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
|
|
The module staging/rtl8188eu in backports-5.4 depends on hidden
config options WIRELESS_EXT and WEXT_PRIV. Enable both of them.
Related-to: ELB-2388
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
|
|
Required to build backports-5.4.
cherry picked from commit fe18957e8e87403a9d4be8e8a62352ef107def99
Add GOST/IETF Streebog hash function (GOST R 34.11-2012, RFC 6986)
generic hash transformation.
Related-to: ELB-2388
Cc: linux-integrity@vger.kernel.org
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
|
|
Required to build backports-5.4.
cherry picked from commit 4f0fc1600edbdb3612b931aa5076ca984f7ee8fe
Add OSCCA SM3 secure hash (OSCCA GM/T 0004-2012 SM3)
generic hash transformation.
Related-to: ELB-2388
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
|
|
Required to build backports-5.4.
cherry picked from commit 53964b9ee63b7075931b8df85307c449da564b50
This patch adds the implementation of SHA3 algorithm
in software and it's based on original implementation
pushed in patch https://lwn.net/Articles/518415/ with
additional changes to match the padding rules specified
in SHA-3 specification.
Related-to: ELB-2388
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Raveendra Padasalagi <raveendra.padasalagi@broadcom.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
|
|
Required to build backports-5.4.
cherry picked from commit ee08997fee16f10be23c9748d609dbdf3baab8e4
This patch provides a single place for information about hash algorithms,
such as hash sizes and kernel driver names, which will be used by IMA
and the public key code.
Changelog:
- Fix sparse and checkpatch warnings
- Move hash algo enums to uapi for userspace signing functions.
Related-to: ELB-2388
Signed-off-by: Dmitry Kasatkin <d.kasatkin@samsung.com>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
|
|
In some cases struct bug_entry can be used before declaring [1].
This patch fixes such situations.
[1] Building the backports-5.4 for toradex_tk1_l4t_r21.7-next
---------------------------
In file included from /home/cryo/work/bp-5.4-clean/backport-include/linux/bug.h:3,
from /home/cryo/work/bp-5.4-clean/backport-include/linux/kernel.h:4,
from include/asm-generic/bug.h:13,
from /home/cryo/work/bp-5.4-clean/backport-include/asm-generic/bug.h:4,
from /home/cryo/work/gitlab/linux-toradex-32/arch/arm/include/asm/bug.h:59,
from /home/cryo/work/bp-5.4-clean/backport-include/asm/bug.h:4,
from /home/cryo/work/gitlab/linux-toradex-32/arch/arm/include/asm/div64.h:63,
from include/linux/math64.h:5,
from /home/cryo/work/bp-5.4-clean/backport-include/linux/math64.h:3,
from include/linux/jiffies.h:4,
from /home/cryo/work/bp-5.4-clean/backport-include/linux/jiffies.h:3,
from /home/cryo/work/bp-5.4-clean/net/mac80211/rx.c:12:
include/linux/bug.h:91:47: warning: ‘struct bug_entry’ declared inside parameter list will not be visible outside of this definition or declaration
91 | static inline int is_warning_bug(const struct bug_entry *bug)
| ^~~~~~~~~
include/linux/bug.h: In function ‘is_warning_bug’:
include/linux/bug.h:93:12: error: dereferencing pointer to incomplete type ‘const struct bug_entry’
93 | return bug->flags & BUGFLAG_WARNING;
| ^~
---------------------------
Related-to: ELB-2388
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
|
|
When we use CONFIG_PROFILE_ALL_BRANCHES, every 'if()' introduces
a static variable, but that is not allowed in 'extern inline'
functions:
mpi-inline.h:116:204: warning: '______f' is static but declared in inline function 'mpihelp_sub' which is not static
mpi-inline.h:113:184: warning: '______f' is static but declared in inline function 'mpihelp_sub' which is not static
mpi-inline.h:70:184: warning: '______f' is static but declared in inline function 'mpihelp_add' which is not static
mpi-inline.h:56:204: warning: '______f' is static but declared in inline function 'mpihelp_add_1' which is not static
This changes the MPI code to use 'static inline' instead, to get
rid of hundreds of warnings.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
(cherry picked from commit 9c6bd0c2f103f4748cb4abcaf141f7d11aabfe9f)
|
|
Backports-5.4 requires the undocumented build option CRYPTO_HASH_INFO.
This option is selected by enabled ASYMMETRIC_PUBLIC_KEY_SUBTYPE.
Related-to: ELB-2388
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
|
|
Fixes: '3f76b6ebb8c tegra: dc: events.c: fix error about packed' if
GCC < 9.0.1 is used.
| events.c:195:32: error: unknown option after '#pragma GCC diagnostic' kind [-Werror=pragmas]
| #pragma GCC diagnostic warning "-Waddress-of-packed-member"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
|
|
With GCC 9.2.0 we get the following error twice:
| events.c:194:36: error: taking address of packed member of 'struct <anonymous>'
| may result in an unaligned pointer value [-Werror=address-of-packed-member]
| tegra_dc_ext_queue_event(control, &pack.event);
| ^~~~~~~~~~~
Demote error to warning.
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
|
|
[ Upstream commit a6e60d84989fa0e91db7f236eda40453b0e44afa ]
The upcoming GCC 9 release extends the -Wmissing-attributes warnings
(enabled by -Wall) to C and aliases: it warns when particular function
attributes are missing in the aliases but not in their target.
In particular, it triggers for all the init/cleanup_module
aliases in the kernel (defined by the module_init/exit macros),
ending up being very noisy.
These aliases point to the __init/__exit functions of a module,
which are defined as __cold (among other attributes). However,
the aliases themselves do not have the __cold attribute.
Since the compiler behaves differently when compiling a __cold
function as well as when compiling paths leading to calls
to __cold functions, the warning is trying to point out
the possibly-forgotten attribute in the alias.
In order to keep the warning enabled, we decided to silence
this case. Ideally, we would mark the aliases directly
as __init/__exit. However, there are currently around 132 modules
in the kernel which are missing __init/__exit in their init/cleanup
functions (either because they are missing, or for other reasons,
e.g. the functions being called from somewhere else); and
a section mismatch is a hard error.
A conservative alternative was to mark the aliases as __cold only.
However, since we would like to eventually enforce __init/__exit
to be always marked, we chose to use the new __copy function
attribute (introduced by GCC 9 as well to deal with this).
With it, we copy the attributes used by the target functions
into the aliases. This way, functions that were not marked
as __init/__exit won't have their aliases marked either,
and therefore there won't be a section mismatch.
Note that the warning would go away marking either the extern
declaration, the definition, or both. However, we only mark
the definition of the alias, since we do not want callers
(which only see the declaration) to be compiled as if the function
was __cold (and therefore the paths leading to those calls
would be assumed to be unlikely).
Cc: <stable@vger.kernel.org> # 4.14+
Link: https://lore.kernel.org/lkml/20190123173707.GA16603@gmail.com/
Link: https://lore.kernel.org/lkml/20190206175627.GA20399@gmail.com/
Suggested-by: Martin Sebor <msebor@gcc.gnu.org>
Acked-by: Jessica Yu <jeyu@kernel.org>
Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Signed-off-by: Stefan Agner <stefan@agner.ch>
(cherry picked from commit dbc40d3d4afafbce1d64acedc28dfbeb4bf20695)
Conflicts:
include/linux/module.h Changed code has moved to a different file
|
|
[ Upstream commit c0d9782f5b6d7157635ae2fd782a4b27d55a6013
From the GCC manual:
copy
copy(function)
The copy attribute applies the set of attributes with which function
has been declared to the declaration of the function to which
the attribute is applied. The attribute is designed for libraries
that define aliases or function resolvers that are expected
to specify the same set of attributes as their targets. The copy
attribute can be used with functions, variables, or types. However,
the kind of symbol to which the attribute is applied (either
function or variable) must match the kind of symbol to which
the argument refers. The copy attribute copies only syntactic and
semantic attributes but not attributes that affect a symbol’s
linkage or visibility such as alias, visibility, or weak.
The deprecated attribute is also not copied.
https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html
The upcoming GCC 9 release extends the -Wmissing-attributes warnings
(enabled by -Wall) to C and aliases: it warns when particular function
attributes are missing in the aliases but not in their target, e.g.:
void __cold f(void) {}
void __alias("f") g(void);
diagnoses:
warning: 'g' specifies less restrictive attribute than
its target 'f': 'cold' [-Wmissing-attributes]
Using __copy(f) we can copy the __cold attribute from f to g:
void __cold f(void) {}
void __copy(f) __alias("f") g(void);
This attribute is most useful to deal with situations where an alias
is declared but we don't know the exact attributes the target has.
For instance, in the kernel, the widely used module_init/exit macros
define the init/cleanup_module aliases, but those cannot be marked
always as __init/__exit since some modules do not have their
functions marked as such.
Cc: <stable@vger.kernel.org> # 4.14+
Suggested-by: Martin Sebor <msebor@gcc.gnu.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Signed-off-by: Stefan Agner <stefan@agner.ch>
(cherry picked from commit c4fa716aa388078b44017d25ebc66fb661cef7c3)
Conflicts:
include/linux/compiler.h
|
|
According to the manual [1], SYS_MCLK should base on SYS_FS, not on sample rate.
Calculating SYS_MCLK using sample rate only prevents playing/recording
samples with rate < 16 kHz:
---------------------------------------------------------------
root@apalis-tk1:~# aplay test-8k-sample.wav
Playing WAVE 'test-8k-sample.wav' : Signed 16 bit
[...] tegra-snd-apalis-tk1-sgtl5000 tegra-snd-apalis-tk1-sgtl5000.0: ASoC: machine hw_params failed: -22
Little Endian, Rate 8000 Hz, Stereo
aplay: set_params:1403: Unable to install hw params:
...
---------------------------------------------------------------
Using the helper from sgtl5000.h fixes this issue.
To keep determination of sys_fs solid, use a helper in device driver.
[1] https://www.nxp.com/docs/en/data-sheet/SGTL5000.pdf
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
|
|
Calculate SYS_MCLK using sample rate or SYS_FS.
These helpers allow to simplify a code to set up external system clock
for different sample rates.
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
|
|
This makes able to switch ADC on automatically when recording
starts.
Commit 6b01f0b022a (Fix enabling ZCD for HP and ADC) fixes
initial setting of SGTL5000_CHIP_ANA_CTRL, keeping muted
HP, DAC and ADC blocks on probing device. HP and DAC mute issue
was fixed with 60f67ac489 (Add on/off control for HP/LINE out).
This commit fixes ADC mute issue in the same manner as HP/DAC.
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
|
|
All displays sold by Toradex have now a common typical frequency
for dimming backlight. This commit sets that frequency to 150Hz and
put some better brightness values.
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
|
|
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
|
|
Add handlers for HP/DAC/ADC power on/off event.
Mute outputs on power on/off of any chip block to
avoid pops.
Improve logic for VAG to power on/off to avoid muxing pops.
Fix DAPM widgets' definitions to use new handlers.
Related to: #48500
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
|
|
Define SND_SOC_DAPM_PRE_POST_PMU to reduce code.
Related to: #48500
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
|
|
- adding mute/unmute controls for headphone and lineout allows
alsa-compatible sound players automatically unmute output
port to play music.
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
|
|
- increase trailing delay after VAG power down to reduce trailing pop;
- mute HP/LINE output before VAG power up.
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
|
|
- set VDDD voltage ONLY if use internal ldo regulator;
- assign manually the source of charge pump ONLY if
automatic selection can't perform.
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
|
|
- change HP_ZCD_EN/ADC_ZCD_EN bits only in CHIP_ANA_CTRL register.
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
|
|
- define the SMALL_POP as a 1-bit mask, not value;
- properly set the SMALL_POP on device probing.
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
|
|
- ldo_regulator_remove() doesn't reset sgtl5000->ldo so it is
possible to dereference members of previously freed struct ldo.
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
|
|
- Name headphone mux related data objects correctly.
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
|
|
- the code to fallback to internal ldo regulator instead of external
vddd is completely wrong. According to TDM and Errata of sgtl5000
chips revision < 0x11 strongly need to use external vddd due to ER1.
For chips revision >= 0x11 there is no limitation to use either
external vddd or internal ldo regulator.
- fix logical error in cleanup sequence.
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
|
|
commit c251ea7bd7a04f1f2575467e0de76e803cf59149 upstream
On a mx28evk with a sgtl5000 codec we notice a loud 'click' sound to happen
5 seconds after the end of a playback.
The SMALL_POP bit should fix this, but its definition is incorrect:
according to the sgtl5000 manual it is bit 0 of CHIP_REF_CTRL register, not
bit 1.
Fix the definition accordingly and enable the bit as intended per the code
comment.
After applying this change, no loud 'click' sound is heard after playback
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
|
|
commit f091f3f07328f75d20a2a5970d1f8b58d95fc990 upstream
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>
|
|
commit dd4d2d6dfb49e8916064f2cb07f0ad7b32a82fb7 upstream
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 0a8984655b5239833a3e6e0d54c7c867dbc7ea63)
This fixes the dual camera use case.
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
|
|
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Related to: #40373
|
|
Fix a type of flag of disabling HS200 mode on tegra sdhci.
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
|
|
Set vddio_sdmmc, vqmmc, vmmc regulators for eMMC.
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Related to: #40373
|
|
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
|
|
If the OTG port is configured for USB 3.0 operation
using usb_port_owner_info kernel cmd line argument
operate in host mode only.
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
|
|
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
|
|
Prioritize CAN TX trafic, and move from edge to level triggered
interrupts.
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
|
|
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
|
|
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
|
|
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
|
|
Previously fw was not released when K20 was flashed successfully
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
|
|
Signed-off-by: Rolf Eike Beer <eb@emlix.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
|
|
Signed-off-by: Rolf Eike Beer <eb@emlix.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
|
|
Signed-off-by: Rolf Eike Beer <eb@emlix.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
|