Ronak Jain
de85123395
firmware: zynqmp: Add documentation for runtime feature config
...
Add documentation for sysfs entries like feature_config_id and
feature_config_value for runtime feature configuration. The support is
added for an over temperature and external watchdog features.
Acked-by: Michal Simek <michal.simek@xilinx.com >
Signed-off-by: Ronak Jain <ronak.jain@xilinx.com >
Link: https://lore.kernel.org/r/20220209082709.32378-3-ronak.jain@xilinx.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-25 12:13:20 +01:00
Ronak Jain
f1d0821bf3
firmware: xilinx: Add support for runtime features
...
Add support for runtime features by using an IOCTL call. The features
can be enabled or disabled from the firmware as well as the features
can be configured at runtime by querying IOCTL_SET_FEATURE_CONFIG id.
Similarly, the user can get the configured values of features by
querying IOCTL_GET_FEATURE_CONFIG id.
Acked-by: Michal Simek <michal.simek@xilinx.com >
Signed-off-by: Ronak Jain <ronak.jain@xilinx.com >
Link: https://lore.kernel.org/r/20220209082709.32378-2-ronak.jain@xilinx.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-25 12:13:20 +01:00
Ricky WU
86f4c65fd5
misc: rtsx: rts522a rts5228 rts5261 support Runtime PM
...
rts522a, rts5228, rts5261
add extra init flow for rtd3
add more power_down setting for avoid being woken up
by plugging or unplugging card when system in S3
Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com >
Signed-off-by: Ricky Wu <ricky_wu@realtek.com >
Link: https://lore.kernel.org/r/dace32f573a445908fec0a10482c394c@realtek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-25 12:11:16 +01:00
Kees Cook
f4e335f345
lkdtm/fortify: Swap memcpy() for strncpy()
...
The memcpy() runtime defenses are still not landed, so test with
strncpy() for now.
Cc: Arnd Bergmann <arnd@arndb.de >
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Reported-by: Muhammad Usama Anjum <usama.anjum@collabora.com >
Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com >
Signed-off-by: Kees Cook <keescook@chromium.org >
Link: https://lore.kernel.org/r/20220216202548.2093883-1-keescook@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-25 12:11:01 +01:00
Tom Rix
2c9ae45354
misc: rtsx: conditionally build rtsx_pm_power_saving()
...
On s390 allyesconfig, there is this build error
rtsx_pcr.c:1084:13: error: 'rtsx_pm_power_saving'
defined but not used
1084 | static void rtsx_pm_power_saving(struct rtsx_pcr *pcr)
| ^~~~~~~~~~~~~~~~~~~~
rtsx_pm_power_saving() is only used by rtsx_pci_runtime_idle()
which is conditional on CONFIG_PM. So conditionally build
rtsx_pm_power_saving() and the similar
rtsx_comm_pm_power_saving() and rtsx_enable_aspm().
Signed-off-by: Tom Rix <trix@redhat.com >
Link: https://lore.kernel.org/r/20220213171907.2786442-1-trix@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-25 12:10:45 +01:00
Marijn Suijten
3bdd6d5ad5
config: android-recommended: Disable BPF_UNPRIV_DEFAULT_OFF for netd
...
AOSP's `netd` process fails to start on Android S:
E ClatdController: getClatEgress4MapFd() failure: Operation not permitted
I netd : Initializing ClatdController: 410us
E netd : Failed to start trafficcontroller: (Status[code: 1, msg: "Pinned map not accessible or does not exist: (/sys/fs/bpf/map_netd_cookie_tag_map): Operation not permitted"])
E netd : CRITICAL: sleeping 60 seconds, netd exiting with failure, crash loop likely!
And on Android R:
I ClatdController: 4.9+ kernel and device shipped with P - clat ebpf might work.
E ClatdController: getClatEgressMapFd() failure: Operation not permitted
I netd : Initializing ClatdController: 1409us
E netd : Failed to start trafficcontroller: (Status[code: 1, msg: "Pinned map not accessible or does not exist: (/sys/fs/bpf/map_netd_cookie_tag_map): Operation not permitted"])
These permission issues are caused by 08389d8882 ("bpf: Add kconfig
knob for disabling unpriv bpf by default") because AOSP does not provide
netd the `SYS_ADMIN` capability, and also has no userspace support for
the `BPF` capability yet.
Cc: Amit Pundir <amit.pundir@linaro.org >
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Suggested-by: John Stultz <john.stultz@linaro.org >
[John suggested this in https://linaro.atlassian.net/browse/ACK-107?focusedCommentId=117382 ]
Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org >
Link: https://lore.kernel.org/r/20220202100528.190794-2-marijn.suijten@somainline.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-25 12:10:27 +01:00
Marijn Suijten
4c4559b43c
config: android-recommended: Don't explicitly disable CONFIG_AIO
...
Android nowadays (for a couple years already) requires AIO for at least
its `adb` "Android Debug Bridge" [1]. Without this config option
(`default y`) it simply refuses start, making users unable to connect to
their phone for debugging purposes when using these kernel fragments.
[1]: a2cb8de5e6
Cc: Amit Pundir <amit.pundir@linaro.org >
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Cc: John Stultz <john.stultz@linaro.org >
Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org >
Link: https://lore.kernel.org/r/20220202100528.190794-1-marijn.suijten@somainline.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-25 12:10:27 +01:00
Cai Huoqing
aef3125dd6
powerpc/BSR: Make use of the helper macro LIST_HEAD()
...
Replace "struct list_head head = LIST_HEAD_INIT(head)" with
"LIST_HEAD(head)" to simplify the code.
Signed-off-by: Cai Huoqing <cai.huoqing@linux.dev >
Link: https://lore.kernel.org/r/20220209032450.37849-1-cai.huoqing@linux.dev
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-25 12:10:15 +01:00
Cai Huoqing
4044fe5525
ocxl: Make use of the helper macro LIST_HEAD()
...
Replace "struct list_head head = LIST_HEAD_INIT(head)" with
"LIST_HEAD(head)" to simplify the code.
Acked-by: Frederic Barrat <fbarrat@linux.ibm.com >
Acked-by: Andrew Donnellan <ajd@linux.ibm.com >
Signed-off-by: Cai Huoqing <cai.huoqing@linux.dev >
Link: https://lore.kernel.org/r/20220209032421.37725-1-cai.huoqing@linux.dev
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-25 12:09:56 +01:00
Andy Shevchenko
20dde50ffe
misc: sgi-gru: Don't cast parameter in bit operations
...
While in this particular case (*) it would not be an issue,
the pattern itself is bad and error prone in case somebody
blindly copies to their code.
Don't cast parameter to unsigned long pointer in the bit
operations. Note, new compilers might warn on this line for
potential outbound access.
*) it seems a dead code, so remove it all for good
Fixes: 13d19498b0 ("GRU Driver: driver internal header files")
Acked-by: Dimitri Sivanich <sivanich@hpe.com >
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20220214153958.9721-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-25 12:09:26 +01:00
Tom Rix
22f01029cd
xilinx_hwicap: cleanup comments
...
Remove the second 'the'.
Replacements:
was to what
intiate to initiate
Signed-off-by: Tom Rix <trix@redhat.com >
Link: https://lore.kernel.org/r/20220215193054.3032955-1-trix@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-25 12:08:57 +01:00
Kees Cook
3bc93c7bde
comedi: drivers: ni_routes: Use strcmp() instead of memcmp()
...
The family and device comparisons were using memcmp(), but this could
lead to Out-of-bounds reads when the length was larger than the
buffers being compared. Since these appear to always be NUL-terminated
strings, just use strcmp() instead.
This was found with Clang under LTO:
[ 92.405851][ T1] kernel BUG at lib/string_helpers.c:980!
...
[ 92.409141][ T1] RIP: 0010:fortify_panic (fbdev.c:?)
...
[ 92.410056][ T1] ni_assign_device_routes (fbdev.c:?)
[ 92.410056][ T1] ? unittest_enter (fbdev.c:?)
[ 92.410056][ T1] ni_routes_unittest (ni_routes_test.c:?)
[ 92.410056][ T1] ? unittest_enter (fbdev.c:?)
[ 92.410056][ T1] __initstub__kmod_ni_routes_test__505_604_ni_routes_unittest6 (fbdev.c:?)
[ 92.410056][ T1] do_one_initcall (fbdev.c:?)
Link: https://lore.kernel.org/lkml/20220210072821.GD4074@xsang-OptiPlex-9020
Fixes: 4bb90c87ab ("staging: comedi: add interface to ni routing table information")
Cc: Ian Abbott <abbotti@mev.co.uk >
Cc: H Hartley Sweeten <hsweeten@visionengravers.com >
Cc: Spencer E. Olson <olsonse@umich.edu >
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Cc: Masahiro Yamada <masahiroy@kernel.org >
Cc: Lee Jones <lee.jones@linaro.org >
Reported-by: kernel test robot <oliver.sang@intel.com >
Reviewed-by: Ian Abbott <abbotti@mev.co.uk >
Signed-off-by: Kees Cook <keescook@chromium.org >
Link: https://lore.kernel.org/r/20220215171017.1247291-1-keescook@chromium.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-25 12:08:52 +01:00
Christophe JAILLET
77e861619b
VMCI: Fix some error handling paths in vmci_guest_probe_device()
...
The 'err_remove_vmci_dev_g' error label is not at the right place.
This could lead to un-released resource.
There is also a missing label. If pci_alloc_irq_vectors() fails, the
previous vmci_event_subscribe() call must be undone.
Acked-by: Vishnu Dasa <vdasa@vmware.com >
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Link: https://lore.kernel.org/r/959218ce3b135197946d85cd9453551cd04fa5da.1645734041.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-25 11:55:01 +01:00
Christophe JAILLET
cc312da2d3
VMCI: No need to clear memory after a dma_alloc_coherent() call
...
dma_alloc_coherent() already clear the allocated memory, there is no need
to explicitly call memset().
This saves a few cycles and a few lines of code.
Acked-by: Vishnu Dasa <vdasa@vmware.com >
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Link: https://lore.kernel.org/r/3e8c0bfaa77500e22d6c90f249da1c53dbae716e.1645734041.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-25 11:55:01 +01:00
Christophe JAILLET
b791da2389
VMCI: Fix the description of vmci_check_host_caps()
...
vmci_check_host_caps() doesn't return a bool but an int.
Fix the description accordingly.
Fixes: 782f244535 ("VMCI: fix error handling path when registering guest driver")
Acked-by: Vishnu Dasa <vdasa@vmware.com >
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Link: https://lore.kernel.org/r/c181bec88aab1145d3868d61b7e52d53923f8206.1645734041.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-25 11:55:01 +01:00
Lucas Denefle
41a92a89ee
w1: w1_therm: fixes w1_seq for ds28ea00 sensors
...
w1_seq was failing due to several devices responding to the
CHAIN_DONE at the same time. Now properly selects the current
device in the chain with MATCH_ROM. Also acknowledgment was
read twice.
Signed-off-by: Lucas Denefle <lucas.denefle@converge.io >
Link: https://lore.kernel.org/r/20220223113558.232750-1-lucas.denefle@converge.io
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-25 11:54:38 +01:00
Richard Gong
085a884434
firmware: stratix10-svc: extend SVC driver to get the firmware version
...
Extend Intel service layer driver to get the firmware version running at
FPGA device. Therefore FPGA manager driver, one of Intel service layer
driver's client, can decide whether to handle the newly added bitstream
authentication function based on the retrieved firmware version.
Link: https://lore.kernel.org/lkml/1617114785-22211-2-git-send-email-richard.gong@linux.intel.com
Acked-by: Moritz Fischr <mdf@kernel.org >
Signed-off-by: Richard Gong <richard.gong@intel.com >
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org >
Link: https://lore.kernel.org/r/20220223144908.399522-2-dinguyen@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-25 11:54:25 +01:00
Dinh Nguyen
7d658f5c40
MAINTAINERS: add a git repo for the Stratix10 Service driver
...
Add a git repo entry for the Stratix10 Service driver.
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org >
Link: https://lore.kernel.org/r/20220223144908.399522-1-dinguyen@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-25 11:54:25 +01:00
Vincent Shih
8fb29b4501
dt-bindings: nvmem: Add bindings doc for Sunplus OCOTP driver
...
Add bindings doc for Sunplus OCOTP driver
Reviewed-by: Rob Herring <robh@kernel.org >
Signed-off-by: Vincent Shih <vincent.sunplus@gmail.com >
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org >
Link: https://lore.kernel.org/r/20220223223502.29454-4-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-25 11:49:36 +01:00
Vincent Shih
8747ec2e97
nvmem: Add driver for OCOTP in Sunplus SP7021
...
Add driver for OCOTP in Sunplus SP7021
Signed-off-by: Vincent Shih <vincent.sunplus@gmail.com >
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org >
Link: https://lore.kernel.org/r/20220223223502.29454-3-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-25 11:49:36 +01:00
Knox Chiou
bc5c75e0a5
nvmem: qfprom: Increase fuse blow timeout to prevent write fail
...
sc7180 blow fuses got slightly chances to hit qfprom_reg_write timeout.
Current timeout is simply too low. Since blowing fuses is a
very rare operation, so the risk associated with overestimating this
number is low.
Increase fuse blow timeout from 1ms to 10ms.
Reviewed-by: Douglas Anderson <dianders@chromium.org >
Signed-off-by: Knox Chiou <knoxchiou@chromium.org >
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org >
Link: https://lore.kernel.org/r/20220223223502.29454-2-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-25 11:49:36 +01:00
Robert Marko
f24b35aa52
MAINTAINERS: Add Delta Networks TN48M CPLD drivers
...
Add maintainers entry for the Delta Networks TN48M
CPLD MFD drivers.
Signed-off-by: Robert Marko <robert.marko@sartura.hr >
Link: https://lore.kernel.org/r/20220131133049.77780-7-robert.marko@sartura.hr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-25 09:59:35 +01:00
Robert Marko
54ae8c4b8c
dt-bindings: mfd: Add Delta TN48M CPLD drivers bindings
...
Add binding documents for the Delta TN48M CPLD drivers.
Signed-off-by: Robert Marko <robert.marko@sartura.hr >
Link: https://lore.kernel.org/r/20220131133049.77780-6-robert.marko@sartura.hr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-25 09:59:35 +01:00
Robert Marko
5cd3921d16
reset: Add Delta TN48M CPLD reset controller
...
Delta TN48M CPLD exposes resets for the following:
* 88F7040 SoC
* 88F6820 SoC
* 98DX3265 switch MAC-s
* 88E1680 PHY-s
* 88E1512 PHY
* PoE PSE controller
Controller supports only self clearing resets.
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de >
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com >
Signed-off-by: Robert Marko <robert.marko@sartura.hr >
Link: https://lore.kernel.org/r/20220131133049.77780-5-robert.marko@sartura.hr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-25 09:59:35 +01:00
Robert Marko
440c7317e4
dt-bindings: reset: Add Delta TN48M
...
Add header for the Delta TN48M CPLD provided
resets.
Acked-by: Philipp Zabel <p.zabel@pengutronix.de >
Signed-off-by: Robert Marko <robert.marko@sartura.hr >
Link: https://lore.kernel.org/r/20220131133049.77780-4-robert.marko@sartura.hr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-25 09:59:35 +01:00
Robert Marko
b3dcb5de62
gpio: Add Delta TN48M CPLD GPIO driver
...
Delta TN48M switch has an onboard Lattice CPLD that is used as a GPIO
expander.
The CPLD provides 12 pins in total on the TN48M, but on more advanced
switch models it provides up to 192 pins, so the driver is extendable
to support more switches.
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com >
Reviewed-by: Michael Walle <michael@walle.cc >
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Acked-by: Bartosz Golaszewski <brgl@bgdev.pl >
Signed-off-by: Robert Marko <robert.marko@sartura.hr >
Link: https://lore.kernel.org/r/20220131133049.77780-3-robert.marko@sartura.hr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-25 09:59:35 +01:00
Robert Marko
d0cac2434c
mfd: simple-mfd-i2c: Add Delta TN48M CPLD support
...
Delta TN48M switches have a Lattice CPLD that serves
multiple purposes including being a GPIO expander.
So, lets use the simple I2C MFD driver to provide the MFD core.
Also add a virtual symbol which pulls in the simple-mfd-i2c driver and
provide a common symbol on which the subdevice drivers can depend on.
Acked-for-MFD-by: Lee Jones <lee.jones@linaro.org >
Signed-off-by: Robert Marko <robert.marko@sartura.hr >
Link: https://lore.kernel.org/r/20220131133049.77780-2-robert.marko@sartura.hr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-25 09:59:35 +01:00
Kai-Heng Feng
7570fb41e4
mmc: rtsx: Let MMC core handle runtime PM
...
Since MMC core handles runtime PM reference counting, we can avoid doing
redundant runtime PM work in the driver. That means the only thing
commit 5b4258f672 ("misc: rtsx: rts5249 support runtime PM") misses is
to always enable runtime PM, to let its parent driver enable ASPM in the
runtime idle routine.
Fixes: 7499b529d9 ("mmc: rtsx: Use pm_runtime_{get,put}() to handle runtime PM")
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org >
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com >
Link: https://lore.kernel.org/r/20220216055435.2335297-1-kai.heng.feng@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-22 08:41:06 +01:00
Andy Shevchenko
4c49300d8e
thunderbolt: Drop duplicate NULL checks around nvmem_unregister()
...
Since nvmem_unregister() checks for NULL, no need to repeat in
the caller. Drop duplicate NULL checks.
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com >
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org >
Link: https://lore.kernel.org/r/20220220151527.17216-14-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-21 18:00:30 +01:00
Andy Shevchenko
bcf4ef28b0
mtd: core: Drop duplicate NULL checks around nvmem_unregister()
...
Since nvmem_unregister() checks for NULL, no need to repeat in
the caller. Drop duplicate NULL checks.
Acked-by: Miquel Raynal <miquel.raynal@bootlin.com >
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org >
Link: https://lore.kernel.org/r/20220220151527.17216-13-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-21 18:00:30 +01:00
Sean Anderson
671aa5a4d4
doc: nvmem: Update example
...
Update the example to reflect the new API. I have chosen the brcm-nvram
driver since it seems to be simpler than the qfprom driver.
Signed-off-by: Sean Anderson <sean.anderson@seco.com >
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org >
Link: https://lore.kernel.org/r/20220220151527.17216-12-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-21 18:00:30 +01:00
Sean Anderson
673d2cc5c1
doc: nvmem: Remove references to regmap
...
Since commit 795ddd18d3 ("nvmem: core: remove regmap dependency"),
nvmem devices do not use the regmap API. Remove references to it from
the documentation.
Signed-off-by: Sean Anderson <sean.anderson@seco.com >
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org >
Link: https://lore.kernel.org/r/20220220151527.17216-11-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-21 18:00:30 +01:00
Michael Walle
f78451012b
nvmem: add driver for Layerscape SFP (Security Fuse Processor)
...
Add support for the Security Fuse Processor found on Layerscape SoCs.
This driver implements basic read access.
Signed-off-by: Michael Walle <michael@walle.cc >
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org >
Link: https://lore.kernel.org/r/20220220151527.17216-10-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-21 18:00:30 +01:00
Michael Walle
6f9817cdcc
dt-bindings: nvmem: add fsl,layerscape-sfp binding
...
The Security Fuse Processor provides efuses and is responsible for
reading it at SoC startup and configuring it accordingly.
Reviewed-by: Rob Herring <robh@kernel.org >
Signed-off-by: Michael Walle <michael@walle.cc >
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org >
Link: https://lore.kernel.org/r/20220220151527.17216-9-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-21 18:00:30 +01:00
Xiaoke Wang
4dc8d89fae
nvmem: meson-mx-efuse: replace unnecessary devm_kstrdup()
...
Replace unnecessary devm_kstrdup() so to avoid redundant memory allocation.
Suggested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com >
Signed-off-by: Xiaoke Wang <xkernel.wang@foxmail.com >
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org >
Link: https://lore.kernel.org/r/20220220151527.17216-8-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-21 18:00:30 +01:00
Samuel Holland
07ae4fde9e
nvmem: sunxi_sid: Add support for D1 variant
...
D1 has a smaller eFuse block than some other recent SoCs, and it no
longer requires a workaround to read the eFuse data.
Signed-off-by: Samuel Holland <samuel@sholland.org >
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org >
Link: https://lore.kernel.org/r/20220220151527.17216-7-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-21 18:00:30 +01:00
Samuel Holland
aea875a9da
dt-bindings: nvmem: SID: Add compatible for D1
...
D1 has a SID like other Allwinner SoCs, but with a unique eFuse layout.
Add a new compatible string for it.
Acked-by: Rob Herring <robh@kernel.org >
Signed-off-by: Samuel Holland <samuel@sholland.org >
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org >
Link: https://lore.kernel.org/r/20220220151527.17216-6-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-21 18:00:29 +01:00
Srinivas Kandagatla
05196facc0
nvmem: qfprom: fix kerneldoc warning
...
This patch fixes below kernel doc warning,
warning: expecting prototype for qfprom_efuse_reg_write().
Prototype was for qfprom_reg_write() instead
No code changes.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org >
Link: https://lore.kernel.org/r/20220220151527.17216-5-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-21 18:00:29 +01:00
Andy Shevchenko
8c751e0d9a
nvmem: core: Check input parameter for NULL in nvmem_unregister()
...
nvmem_unregister() frees resources and standard pattern is to allow
caller to not care if it's NULL or not. This will reduce burden on
the callers to perform this check.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org >
Link: https://lore.kernel.org/r/20220220151527.17216-4-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-21 18:00:29 +01:00
Andy Shevchenko
5825b2c676
nvmem: core: Use devm_add_action_or_reset()
...
Slightly simplify the devm_nvmem_register() by using the
devm_add_action_or_reset().
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org >
Link: https://lore.kernel.org/r/20220220151527.17216-3-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-21 18:00:29 +01:00
Andy Shevchenko
190fae4685
nvmem: core: Remove unused devm_nvmem_unregister()
...
There are no users and seems no will come of the devm_nvmem_unregister().
Remove the function and remove the unused devm_nvmem_match() along with it.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org >
Link: https://lore.kernel.org/r/20220220151527.17216-2-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-21 18:00:29 +01:00
Greg Kroah-Hartman
c29930ef83
Merge tag 'fsi-for-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/fsi into char-misc-next
...
Joel writes:
FSI changes for v5.18
* Improvements in SCOM and OCC drivers for error handling and retries
* Addition of tracepoints for initialisation path
* API for setting long running SBE FIFO operations
* tag 'fsi-for-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/fsi:
fsi: Add trace events in initialization path
fsi: sbefifo: Implement FSI_SBEFIFO_READ_TIMEOUT_SECONDS ioctl
fsi: sbefifo: Use specified value of start of response timeout
fsi: occ: Improve response status checking
fsi: scom: Remove retries in indirect scoms
fsi: scom: Fix error handling
2022-02-21 17:47:42 +01:00
Eddie James
f2af60bb7c
fsi: Add trace events in initialization path
...
Add definitions for trace events to show the scanning flow.
Signed-off-by: Eddie James <eajames@linux.ibm.com >
Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org >
Link: https://lore.kernel.org/r/20220207161640.35605-1-eajames@linux.ibm.com
Signed-off-by: Joel Stanley <joel@jms.id.au >
2022-02-21 19:38:54 +10:30
Amitay Isaacs
a1dc630886
fsi: sbefifo: Implement FSI_SBEFIFO_READ_TIMEOUT_SECONDS ioctl
...
FSI_SBEFIFO_READ_TIMEOUT_SECONDS ioctl sets the read timeout (in
seconds) for the response received by sbefifo device from sbe. The
timeout affects only the read operation on current sbefifo device fd.
Certain SBE operations can take long time to complete and the default
timeout of 10 seconds might not be sufficient to start receiving
response from SBE. In such cases, allow the timeout to be set to the
maximum of 120 seconds.
The kernel does not contain the definition of the various SBE
operations, so we must expose an interface to userspace to set the
timeout for the given operation.
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org >
Signed-off-by: Joel Stanley <joel@jms.id.au >
Reviewed-by: Eddie James <eajames@linux.ibm.com >
Link: https://lore.kernel.org/r/20220121053816.82253-3-joel@jms.id.au
Signed-off-by: Joel Stanley <joel@jms.id.au >
2022-02-21 19:38:17 +10:30
Amitay Isaacs
b8d536d277
fsi: sbefifo: Use specified value of start of response timeout
...
For some of the chip-ops where sbe needs to collect trace information,
sbe can take a long time (>30s) to respond. Currently these chip-ops
will timeout as the start of response timeout defaults to 10s.
Instead of default value, use specified value. The require timeout
value will be set using ioctl.
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org >
Signed-off-by: Joel Stanley <joel@jms.id.au >
Reviewed-by: Eddie James <eajames@linux.ibm.com >
Link: https://lore.kernel.org/r/20220121053816.82253-2-joel@jms.id.au
Signed-off-by: Joel Stanley <joel@jms.id.au >
2022-02-21 19:38:17 +10:30
Eddie James
3dcf3c84f5
fsi: occ: Improve response status checking
...
If the driver sequence number coincidentally equals the previous
command response sequence number, the driver may proceed with
fetching the entire buffer before the OCC has processed the current
command. To be sure the correct response is obtained, check the
command type and also retry if any of the response parameters have
changed when the rest of the buffer is fetched. Also initialize the
driver with a random sequence number in order to reduce the chances
of this happening.
Signed-off-by: Eddie James <eajames@linux.ibm.com >
Reviewed-by: Joel Stanley <joel@jms.id.au >
Link: https://lore.kernel.org/r/20220208152235.19686-1-eajames@linux.ibm.com
Signed-off-by: Joel Stanley <joel@jms.id.au >
2022-02-21 19:37:03 +10:30
Greg Kroah-Hartman
e6cb9c167e
Merge 5.17-rc4 into char-misc-next
...
We need the char/misc fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-02-14 09:00:38 +01:00
Linus Torvalds
754e0b0e35
Linux 5.17-rc4
v5.17-rc4
2022-02-13 12:13:30 -08:00
Linus Torvalds
e89d3a4671
Merge tag 'kbuild-fixes-v5.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
...
Pull Kbuild fixes from Masahiro Yamada:
- Fix the truncated path issue for HAVE_GCC_PLUGINS test in Kconfig
- Move -Wunsligned-access to W=1 builds to avoid sprinkling warnings
for the latest Clang
- Fix missing fclose() in Kconfig
- Fix Kconfig to touch dep headers correctly when KCONFIG_AUTOCONFIG is
overridden.
* tag 'kbuild-fixes-v5.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
kconfig: fix failing to generate auto.conf
kconfig: fix missing fclose() on error paths
Makefile.extrawarn: Move -Wunaligned-access to W=1
kconfig: let 'shell' return enough output for deep path names
2022-02-13 11:58:11 -08:00
Linus Torvalds
c5d714aa6d
Merge tag 'irq-urgent-2022-02-13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
...
Pull irq fixes from Thomas Gleixner:
"Interrupt chip driver fixes:
- Don't install an hotplug notifier for GICV3-ITS on systems which do
not need it to prevent a warning in the notifier about inconsistent
state
- Add the missing device tree matching for the T-HEAD PLIC variant so
the related SoC is properly supported"
* tag 'irq-urgent-2022-02-13' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
irqchip/sifive-plic: Add missing thead,c900-plic match string
dt-bindings: update riscv plic compatible string
irqchip/gic-v3-its: Skip HP notifier when no ITS is registered
2022-02-13 10:06:40 -08:00