23 Oct, 2020
1 commit
-
…nux/kernel/git/linusw/linux-gpio") into android-mainline
Steps on the way to 5.10-rc1
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I7395903c218c84b8d629829069690a8f9f618f58
14 Sep, 2020
1 commit
-
This adds a new SCM memprotect command to set virtual address ranges.
Signed-off-by: Stanimir Varbanov
Reviewed-by: Elliot Berman
Acked-by: Bjorn Andersson
Signed-off-by: Mauro Carvalho Chehab
07 Aug, 2020
3 commits
-
…ernel/git/teigland/linux-dlm") into android-mainline
Steps along the way to 5.9-rc1
Fixed conflicts in:
drivers/scsi/ufs/Kconfig
drivers/scsi/ufs/ufshcd-crypto.c
drivers/scsi/ufs/ufshcd.h
drivers/staging/android/ion/ion.c
drivers/staging/android/ion/ion_heap.c
include/linux/ion.hSigned-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ia2602190d5960b7ad1beaf49a00489d49f144a4e -
…dom.h") into android-mainline
Baby steps on the way to 5.9-rc1.
Resolves merge issues with:
arch/arm64/boot/dts/qcom/sdm845-db845c.dts
drivers/soc/qcom/Kconfig
kernel/sched/cpufreq_schedutil.cSigned-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ieb3344a22f9cf0d55ec5fc0daebe7602a248ab53 -
Pull SCSI updates from James Bottomley:
"This consists of the usual driver updates (ufs, qla2xxx, tcmu, lpfc,
hpsa, zfcp, scsi_debug) and minor bug fixes.We also have a huge docbook fix update like most other subsystems and
no major update to the core (the few non trivial updates are either
minor fixes or removing an unused feature [scsi_sdb_cache])"* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (307 commits)
scsi: scsi_transport_srp: Sanitize scsi_target_block/unblock sequences
scsi: ufs-mediatek: Apply DELAY_AFTER_LPM quirk to Micron devices
scsi: ufs: Introduce device quirk "DELAY_AFTER_LPM"
scsi: virtio-scsi: Correctly handle the case where all LUNs are unplugged
scsi: scsi_debug: Implement tur_ms_to_ready parameter
scsi: scsi_debug: Fix request sense
scsi: lpfc: Fix typo in comment for ULP
scsi: ufs-mediatek: Prevent LPM operation on undeclared VCC
scsi: iscsi: Do not put host in iscsi_set_flashnode_param()
scsi: hpsa: Correct ctrl queue depth
scsi: target: tcmu: Make TMR notification optional
scsi: target: tcmu: Implement tmr_notify callback
scsi: target: tcmu: Fix and simplify timeout handling
scsi: target: tcmu: Factor out new helper ring_insert_padding
scsi: target: tcmu: Do not queue aborted commands
scsi: target: tcmu: Use priv pointer in se_cmd
scsi: target: Add tmr_notify backend function
scsi: target: Modify core_tmr_abort_task()
scsi: target: iscsi: Fix inconsistent debug message
scsi: target: iscsi: Fix login error when receiving
...
25 Jul, 2020
1 commit
-
Add support for the Inline Crypto Engine (ICE) key programming interface
that's needed for the ufs-qcom driver to use inline encryption on
Snapdragon SoCs. This interface consists of two SCM calls: one to program
a key into a keyslot, and one to invalidate a keyslot.Although the UFS specification defines a standard way to do this, on these
SoCs the Linux kernel isn't permitted to access the needed crypto
configuration registers directly; these SCM calls must be used instead.Link: https://lore.kernel.org/r/20200710072013.177481-2-ebiggers@kernel.org
Acked-by: Bjorn Andersson
Signed-off-by: Eric Biggers
Signed-off-by: Martin K. Petersen
14 Jul, 2020
2 commits
-
This change adds a compatible for msm8994,
which requires no additional clocks for
scm to probe correctly.Acked-by: Rob Herring
Signed-off-by: Konrad Dybcio
Link: https://lore.kernel.org/r/20200624150107.76234-2-konradybcio@gmail.com
Signed-off-by: Bjorn Andersson -
The move to a combined driver for the QCOM SCM hardware changed the
io_writel and io_readl helpers to use non-atomic calls, despite the
commit message saying that atomic was a better option. This breaks these
helpers on hardware that uses the old legacy convention (access fails
with a -95 return code). Switch back to using the atomic calls.Observed as a failure routing GPIO interrupts to the Apps processor on
an IPQ8064; fix is confirmed as correctly allowing the interrupts to be
routed and observed.Reviewed-by: Elliot Berman
Fixes: 57d3b816718c ("firmware: qcom_scm: Remove thin wrappers")
Cc: stable@vger.kernel.org
Signed-off-by: Jonathan McDowell
Link: https://lore.kernel.org/r/20200704172334.GA759@earth.li
Signed-off-by: Bjorn Andersson
24 Jun, 2020
1 commit
-
…inux/kernel/git/powerpc/linux") into android-mainline
Small steps on the way to 5.8-rc1.
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ic41e7ca6e9ea1dd506ec44a4251f1ded701efbf6
21 Apr, 2020
2 commits
-
As far as the device is concerned the dma address is the physical
address. There is no need to convert it to a physical address,
especially not using dma-direct internals that are not available
to drivers and which will interact badly with IOMMUs. Last but not
least the commit introducing it claimed to just fix a type issue,
but actually changed behavior.Fixes: 6e37ccf78a532 ("firmware: qcom_scm: Use proper types for dma mappings")
Reviewed-by: Bjorn Andersson
Signed-off-by: Christoph Hellwig
Link: https://lore.kernel.org/r/20200414123136.441454-1-hch@lst.de
Signed-off-by: Bjorn Andersson -
The '>' expression itself is bool, no need to convert it to bool again.
This fixes the following coccicheck warning:drivers/firmware/qcom_scm.c:946:25-30: WARNING: conversion to bool not
needed hereReviewed-by: Bjorn Andersson
Signed-off-by: Jason Yan
Link: https://lore.kernel.org/r/20200420123516.7888-1-yanaijie@huawei.com
Signed-off-by: Bjorn Andersson
17 Apr, 2020
1 commit
-
Allow the qcom_scm driver to be loadable as a
permenent module.Bug: 153049053
Signed-off-by: John Stultz
Change-Id: I7c0a3c9dc53ee9729cadd0457522ac0229de254d
08 Jan, 2020
5 commits
-
Dynamically support SMCCCC and legacy conventions by detecting which
convention to use at runtime. qcom_scm_call_atomic and qcom_scm_call can
then be moved in qcom_scm.c and use underlying convention backend as
appropriate. Thus, rename qcom_scm-64,-32 to reflect that they are
backends for -smc and -legacy, respectively.Also add support for making SCM calls earlier than when SCM driver
probes to support use cases such as qcom_scm_set_cold_boot_addr. Support
is added by lazily initializing the convention and guarding the query
with a spin lock. The limitation of these early SCM calls is that they
cannot use DMA, as in the case of >4 arguments for SMC convention and
any non-atomic call for legacy convention.Tested-by: Brian Masney # arm32
Tested-by: Stephan Gerhold
Signed-off-by: Elliot Berman
Link: https://lore.kernel.org/r/1578431066-19600-18-git-send-email-eberman@codeaurora.org
Signed-off-by: Bjorn Andersson -
qcom_scm-32 and qcom_scm-64 implementations are nearly identical, so
make qcom_scm_call and qcom_scm_call_atomic unique to each and the SCM
descriptor creation common to each. There are the following catches:
- __qcom_scm_is_call_available is still in each -32,-64 implementation
as the argument is unique to each convention
- For some functions, only one implementation was provided in -32 or
-64. The actual implementation was moved into qcom_scm.c
- io_writel and io_readl in -64 were non-atomic calls and in -32 they
were. Atomic is the better option, so use it.Tested-by: Brian Masney # arm32
Tested-by: Stephan Gerhold
Signed-off-by: Elliot Berman
Link: https://lore.kernel.org/r/1578431066-19600-17-git-send-email-eberman@codeaurora.org
Signed-off-by: Bjorn Andersson -
Definitions throughout qcom_scm are loosely grouped and loosely ordered.
Sort all the functions/definitions by service ID/command ID to improve
sanity when needing to add new functionality to this driver.Acked-by: Bjorn Andersson
Tested-by: Brian Masney # arm32
Tested-by: Stephan Gerhold
Signed-off-by: Elliot Berman
Link: https://lore.kernel.org/r/1578431066-19600-16-git-send-email-eberman@codeaurora.org
Signed-off-by: Bjorn Andersson -
Add unused "device" parameter to reduce merge friction between SMCCC and
legacy based conventions in an upcoming patch.Tested-by: Brian Masney # arm32
Tested-by: Stephan Gerhold
Signed-off-by: Elliot Berman
Link: https://lore.kernel.org/r/1578431066-19600-15-git-send-email-eberman@codeaurora.org
Signed-off-by: Bjorn Andersson -
Create a consistent naming scheme for command IDs. The scheme is
QCOM_SCM_##svc_##cmd. Remove unused macros QCOM_SCM_FLAG_HLOS,
QCOM_SCM_FLAG_COLDBOOT_MC, QCOM_SCM_FLAG_WARMBOOT_MC,
QCOM_SCM_CMD_CORE_HOTPLUGGED, and QCOM_SCM_BOOT_ADDR_MC.Reviewed-by: Bjorn Andersson
Reviewed-by: Vinod Koul
Reviewed-by: Stephen Boyd
Tested-by: Brian Masney # arm32
Tested-by: Stephan Gerhold
Signed-off-by: Elliot Berman
Link: https://lore.kernel.org/r/1578431066-19600-3-git-send-email-eberman@codeaurora.org
Signed-off-by: Bjorn Andersson
07 Dec, 2019
1 commit
-
Pull more drm updates from Dave Airlie:
"Rob pointed out I missed his pull request for msm-next, it's been in
next for a while outside of my tree so shouldn't cause any unexpected
issues, it has some OCMEM support in drivers/soc that is acked by
other maintainers as it's outside my tree.Otherwise it's a usual fixes pull, i915, amdgpu, the main ones, with
some tegra, omap, mgag200 and one core fix.Summary:
msm-next:
- OCMEM support for a3xx and a4xx GPUs.
- a510 support + display supportcore:
- mst payload deletion fixi915:
- uapi alignment fix
- fix for power usage regression due to security fixes
- change default preemption timeout to 640ms from 100ms
- EHL voltage level display fixes
- TGL DGL PHY fix
- gvt - MI_ATOMIC cmd parser fix, CFL non-priv warning
- CI spotted deadlock fix
- EHL port D programming fixamdgpu:
- VRAM lost fixes on BACO for CI/VI
- navi14 DC fixes
- misc SR-IOV, gfx10 fixes
- XGMI fixes for arcturus
- SRIOV fixesamdkfd:
- KFD on ppc64le enabled
- page table optimisationsradeon:
- fix for r1xx/2xx register checker.tegra:
- displayport regression fixes
- DMA API regression fixesmgag200:
- fix devices that can't scanout except at 0 addromap:
- fix dma_addr refcounting"* tag 'drm-next-2019-12-06' of git://anongit.freedesktop.org/drm/drm: (100 commits)
drm/dp_mst: Correct the bug in drm_dp_update_payload_part1()
drm/omap: fix dma_addr refcounting
drm/tegra: Run hub cleanup on ->remove()
drm/tegra: sor: Make the +5V HDMI supply optional
drm/tegra: Silence expected errors on IOMMU attach
drm/tegra: vic: Export module device table
drm/tegra: sor: Implement system suspend/resume
drm/tegra: Use proper IOVA address for cursor image
drm/tegra: gem: Remove premature import restrictions
drm/tegra: gem: Properly pin imported buffers
drm/tegra: hub: Remove bogus connection mutex check
ia64: agp: Replace empty define with do while
agp: Add bridge parameter documentation
agp: remove unused variable num_segments
agp: move AGPGART_MINOR to include/linux/miscdevice.h
agp: remove unused variable size in agp_generic_create_gatt_table
drm/dp_mst: Fix build on systems with STACKTRACE_SUPPORT=n
drm/radeon: fix r1xx/r2xx register checker for POT textures
drm/amdgpu: fix GFX10 missing CSIB set(v3)
drm/amdgpu: should stop GFX ring in hw_fini
...
05 Nov, 2019
1 commit
-
Qcom's smmu-500 needs to toggle wait-for-safe sequence to
handle TLB invalidation sync's.
Few firmwares allow doing that through SCM interface.
Add API to toggle wait for safe from firmware through a
SCM call.Signed-off-by: Vivek Gautam
Reviewed-by: Bjorn Andersson
Reviewed-by: Stephen Boyd
Acked-by: Andy Gross
Signed-off-by: Sai Prakash Ranjan
Signed-off-by: Will Deacon
07 Oct, 2019
2 commits
-
Add support to restore the secure configuration for qcm_scm-32.c. This
is needed by the On Chip MEMory (OCMEM) that is present on some
Snapdragon devices.Signed-off-by: Rob Clark
[masneyb@onstation.org: ported to latest kernel; set ctx_bank_num to
spare parameter.]
Signed-off-by: Brian Masney
Reviewed-by: Bjorn Andersson
Tested-by: Gabriel Francisco
Signed-off-by: Rob Clark -
Add support for the OCMEM lock/unlock interface that is needed by the
On Chip MEMory (OCMEM) that is present on some Snapdragon devices.Signed-off-by: Rob Clark
[masneyb@onstation.org: ported to latest kernel; minor reformatting.]
Signed-off-by: Brian Masney
Reviewed-by: Bjorn Andersson
Tested-by: Gabriel Francisco
Signed-off-by: Rob Clark
23 Jul, 2019
3 commits
-
There are some questionable coding styles in this function. It looks
quite odd to deref a pointer with array indexing that only uses the
first element. Also, destroying an input/output variable halfway through
the function and then overwriting it on success is not clear. It's
better to use a local variable and the kernel macros to step through
each bit set in a bitmask and clearly show where outputs are set.Cc: Ian Jackson
Cc: Julien Grall
Cc: Bjorn Andersson
Cc: Avaneesh Kumar Dwivedi
Tested-by: Bjorn Andersson
Signed-off-by: Stephen Boyd
[bjorn: Changed for_each_set_bit() size to BITS_PER_LONG]
Signed-off-by: Bjorn Andersson -
Some words are misspelled and we put a full stop after a return value
integer. Fix these things up so it doesn't look so odd.Cc: Ian Jackson
Cc: Julien Grall
Cc: Bjorn Andersson
Cc: Avaneesh Kumar Dwivedi
Signed-off-by: Stephen Boyd
Signed-off-by: Bjorn Andersson -
We need to use the proper types and convert between physical addresses
and dma addresses here to avoid mismatch warnings. This is especially
important on systems with a different size for dma addresses and
physical addresses. Otherwise, we get the following warning:drivers/firmware/qcom_scm.c: In function "qcom_scm_assign_mem":
drivers/firmware/qcom_scm.c:469:47: error: passing argument 3 of "dma_alloc_coherent" from incompatible pointer type [-Werror=incompatible-pointer-types]We also fix the size argument to dma_free_coherent() because that size
doesn't need to be aligned after it's already aligned on the allocation
size. In fact, dma debugging expects the same arguments to be passed to
both the allocation and freeing sides of the functions so changing the
size is incorrect regardless.Reported-by: Ian Jackson
Cc: Ian Jackson
Cc: Julien Grall
Cc: Bjorn Andersson
Cc: Avaneesh Kumar Dwivedi
Tested-by: Bjorn Andersson
Signed-off-by: Stephen Boyd
Signed-off-by: Bjorn Andersson
05 Jun, 2019
1 commit
-
Based on 1 normalized pattern(s):
this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license version 2 and
only version 2 as published by the free software foundation this
program is distributed in the hope that it will be useful but
without any warranty without even the implied warranty of
merchantability or fitness for a particular purpose see the gnu
general public license for more detailsextracted by the scancode license scanner the SPDX license identifier
GPL-2.0-only
has been chosen to replace the boilerplate/reference in 294 file(s).
Signed-off-by: Thomas Gleixner
Reviewed-by: Allison Randal
Reviewed-by: Alexios Zavras
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190529141900.825281744@linutronix.de
Signed-off-by: Greg Kroah-Hartman
14 Sep, 2018
1 commit
-
At one point in time all "future" platforms required three clocks, so
the binding and driver was written to treat this as the default case.
But new platforms has no clock requirements, which currently makes them
all a special case, causing the need for a patch in the binding and
driver for each new platform added.This patch reworks the driver logic so that it will attempt to acquire
all three clocks and fail based on the given compatible. This allow us
to drop the clock requirement from "qcom,scm", in a way that will remain
backwards compatible with existing DT files.Specific compatibles are added for apq8084, msm8916 and msm8974 to match
the updated binding and although equivalent to qcom,scm both ipq4019 and
msm8996 are kept as these have been used without fallback to qcom,scm.The result of this patch is that new platforms, that require no clocks,
can be use the fallback compatible of "qcom,scm".Signed-off-by: Bjorn Andersson
Reviewed-by: Stephen Boyd
Signed-off-by: Andy Gross
25 Apr, 2018
1 commit
-
Add the compatible for ipq4019.
This does not need clocks to do scm calls.Reviewed-by: Rob Herring
Signed-off-by: Sricharan R
Acked-by: Bjorn Andersson
Signed-off-by: Andy Gross
21 Dec, 2017
1 commit
-
Now that of_platform_default_populate_init() takes care of populating
all the devices under the /firmware/ node, this patch removes the
redandant call to of_platform_populate here.Cc: Andy Gross
Cc: David Brown
Cc: linux-arm-msm@vger.kernel.org
Signed-off-by: Sudeep Holla
Signed-off-by: Andy Gross
18 Nov, 2017
1 commit
-
Pull remoteproc updates from Bjorn Andersson:
"This adds an interface for configuring Qualcomm's "secure SMMU" and
adds support for booting the modem Hexagon on MSM8996.Two new debugfs entries are added in the remoteproc core to introspect
the list of memory carveouts and the loaded resource table"* tag 'rproc-v4.15' of git://github.com/andersson/remoteproc:
remoteproc: qcom: Fix error handling paths in order to avoid memory leaks
remoteproc: qcom: Drop pr_err in q6v5_xfer_mem_ownership()
remoteproc: debug: add carveouts list dump feature
remoteproc: debug: add resource table dump feature
remoteproc: qcom: Add support for mss remoteproc on msm8996
remoteproc: qcom: Make secure world call for mem ownership switch
remoteproc: qcom: refactor mss fw image loading sequence
firmware: scm: Add new SCM call API for switching memory ownership
31 Oct, 2017
1 commit
-
Two different processors on a SOC need to switch memory ownership
during load/unload. To enable this, second level memory map table
need to be updated, which is done by secure layer.
This patch adds the interface for making secure monitor call for
memory ownership switching request.Acked-by: Andy Gross
Signed-off-by: Avaneesh Kumar Dwivedi
[bjorn: Minor style and kerneldoc updates]
Signed-off-by: Bjorn Andersson
12 Oct, 2017
2 commits
-
In order to aid post-mortem debugging the Qualcomm platforms provide a
"memory download mode", where the boot loader will provide an interface
for custom tools to "download" the content of RAM to a host machine.The mode is triggered by writing a magic value somewhere in RAM, that is
read in the boot code path after a warm-restart. Two mechanism for
setting this magic value are supported in modern platforms; a direct SCM
call to enable the mode or through a secure io write of a magic value.In order for a normal reboot not to trigger "download mode" the magic
must be cleared during a clean reboot.Download mode has to be enabled by including qcom_scm.download_mode=1 on
the command line.Reviewed-by: Stephen Boyd
Signed-off-by: Bjorn Andersson
Signed-off-by: Andy Gross -
The secure IO service provides operations for reading and writing secure
memory from non-secure mode, expose this API through SCM.Reviewed-by: Stephen Boyd
Signed-off-by: Bjorn Andersson
Signed-off-by: Andy Gross
29 Mar, 2017
2 commits
-
Those two new SCM calls are needed from qcom-iommu driver in order
to initialize secure iommu page table.Signed-off-by: Stanimir Varbanov
Signed-off-by: Rob Clark
Signed-off-by: Andy Gross -
Signed-off-by: Rob Clark
Signed-off-by: Andy Gross
17 Jan, 2017
2 commits
-
This patch adds a set remote state SCM API. This will be used by the
Venus and GPU subsystems to set state on the remote processors.This work was based on two patch sets by Jordan Crouse and Stanimir
Varbanov.Signed-off-by: Andy Gross
-
This patch masks the core clk requirement for the APQ8064. Until the
other peripherals correctly describe their clock dependencies or the
bus driver is put in place to handle the RPM dependencies, this bit
will remain masked.Signed-off-by: Andy Gross
24 Nov, 2016
2 commits
-
When devm_clk_get fails for core clock, the failure was ignored
and the core_clk was explicitly set to NULL so that other
remaining clocks can be queried. However, now that we have a
cleaner way of expressing the clock dependency, return failure
when devm_clk_get fails for core clock.Signed-off-by: Sarangdhar Joshi
Reviewed-by: Stephen Boyd
Acked-by: Bjorn Andersson
Signed-off-by: Andy Gross -
Core, iface and bus clocks are not required to be voted from SCM
driver for some of the Qualcomm chipsets. Remove dependency on
these clocks from driver.Suggested-by: Bjorn Andersson
Signed-off-by: Sarangdhar Joshi
Acked-by: Bjorn Andersson
Signed-off-by: Andy Gross
13 Nov, 2016
1 commit
-
Use devm_reset_controller_register() for the reset controller
registration and fixes the memory leak when unload the module.Signed-off-by: Wei Yongjun
Signed-off-by: Andy Gross
24 Aug, 2016
1 commit
-
The Kconfig currently controlling compilation of this code is:
drivers/firmware/Kconfig:config QCOM_SCM
drivers/firmware/Kconfig: bool...meaning that it currently is not being built as a module by anyone.
Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.Since module_init was not in use by this code, the init ordering
remains unchanged with this commit.Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.
We also delete the MODULE_LICENSE tag etc. since all that information
was (or is now) contained at the top of the file in the comments.Cc: Andy Gross
Cc: David Brown
Cc: linux-arm-msm@vger.kernel.org
Cc: linux-soc@vger.kernel.org
Signed-off-by: Paul Gortmaker
Signed-off-by: Andy Gross