That data structure was used for constructing the commands
before executing them, but it was never really useful. Using
the structure just complicated the driver. The commands are
64-bit wide, so it is enough to simply fill a u64 variable.
No data structures needed.
This simplifies the driver considerable and makes it much
easier to for example add support for big endian systems
later on.
Change-Id: I3533a2c24c3a91ea51e2ebdefe6bc2351223ca0b
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Tested-by: Ajay Gupta <ajayg@nvidia.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20191104142435.29960-16-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 470ce43a1a810117f09aa4bcad6ca2be6b29c8d1
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
Signed-off-by: Jack Pham <jackp@codeaurora.org>
The drivers now only use the new API, so removing the old one.
Change-Id: I716f18549d9f3efcbd47ef51ca371d37e4a5f3df
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Tested-by: Ajay Gupta <ajayg@nvidia.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20191104142435.29960-15-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 2ede55468ca8cc236da66579359c2c406d4c1cba
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Replacing the old "cmd" and "sync" callbacks with an
implementation of struct ucsi_operations. The interrupt
handler will from now on read the CCI (Command Status and
Connector Change Indication) register, and call
ucsi_connector_change() function and/or complete pending
command completions based on it.
Change-Id: I9dfdc70b10544d6e65a0d289491be7cd9232e4af
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Tested-by: Ajay Gupta <ajayg@nvidia.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20191104142435.29960-14-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: e32fd989ac1c45f993fbe89ad0a89aa9ea6993d2
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Replacing the old "cmd" and "sync" callbacks with an
implementation of struct ucsi_operations. The ACPI
notification (interrupt) handler will from now on read the
CCI (Command Status and Connector Change Indication)
register, and call ucsi_connector_change() function and/or
complete pending command completions based on it.
Change-Id: Ia7c8e9e87f23ce6a70a657bf0e053345caf543cc
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20191104142435.29960-13-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: f56de278e8ec963637995944156527162dcf3021
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Adding more simplified API for interface registration and
read and write operations.
The registration is split into separate creation and
registration phases. That allows the drivers to properly
initialize the interface before registering it if necessary.
The read and write operations are supplied in a completely
separate struct ucsi_operations that is passed to the
ucsi_register() function during registration. The new read
and write operations will work more traditionally so that
the read callback function reads a requested amount of data
from an offset, and the write callback functions write the
given data to the offset. The drivers will have to support
both non-blocking writing and blocking writing. In blocking
writing the driver itself is responsible of waiting for the
completion event.
The new API makes it possible for the drivers to perform
tasks also independently of the core ucsi.c, and that should
allow for example quirks to be handled completely in the
drivers without the need to touch ucsi.c.
The old API is kept until all drivers have been converted to
the new API.
Change-Id: Ica25b44b228a96adbc2bd397d74978db6074c82e
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Tested-by: Ajay Gupta <ajayg@nvidia.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20191104142435.29960-12-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: bdc62f2bae8fb0e8e99574de5232f0a3c54a27df
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Supplying the operation callbacks as part of a struct
typec_operations instead of as part of struct
typec_capability during port registration.
Change-Id: I51ad090a7551096558f921cf5f347d4871ea769f
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20191104142435.29960-7-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 6df475f804e62887f5d2132832ecabe6e596cd1c
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Supplying the operation callbacks as part of a struct
typec_operations instead of as part of struct
typec_capability during port registration. After this there
is not need to keep the capabilities stored anywhere in the
driver.
Change-Id: Ib7bd4d899925522dbea297e25a50d8bdd3aa79e2
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20191104142435.29960-6-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 1007dda3be1c9f924746f892c094219be250928e
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Supplying the operation callbacks as part of a struct
typec_operations instead of as part of struct
typec_capability during port registration.
Change-Id: I6eb7c3e87c8704e4d9ccae1d6e615bb1e492fd81
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20191104142435.29960-5-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 00ec21e58dc63dd899a1e1cb3f1d44fa18ca22dd
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Introducing struct typec_operations which has the same
callbacks as struct typec_capability. The old callbacks are
kept for now, but after all users have been converted, they
will be removed.
Change-Id: Idfad5265f42ee2fcf6dbd0e109ed4f98b7563cb0
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20191104142435.29960-4-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 46310e4dade2bc3b574d540e421e3aa9f32cfd5f
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Leaving the private driver_data pointer of the port device
to the port drivers.
Change-Id: Ib38c66e69a15904d5a8160312af6532f28712b67
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20191104142435.29960-3-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 8c127a42af89c39560a8c5bd5accadaaa5741f8c
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Copying everything from struct typec_capability to struct
typec_port during port registration. This will make sure
that under no circumstances the driver can change the values
in the struct typec_capability that the port uses.
Change-Id: I6e94623300837afe5eedfc5a7d7214d61c147cff
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20191104142435.29960-2-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: ad772c39b2fbb24ff6104d73d14fc125d8f02711
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Add ability to filter MAC addresses from 802_1Q packets.
MAC address is located in a different offset than in ETH_II
header.
Change-Id: I4b808102dbb708779762bedb998c2477b5058886
Signed-off-by: Amir Levy <alevy@codeaurora.org>
Adding API to upstream driver to get secure dump state and protect
memory regions. Migrating SCM calls used in the IPA driver.
Change-Id: Ia61436d8c18ddda49c411e06f147cdae345a23af
Signed-off-by: Siddharth Gupta <sidgup@codeaurora.org>
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
Adding API to upstream driver to get JTAG ETM feat id.
Migrating SCM calls used in the JTAG driver.
Change-Id: I60cd57d5c6aae62ec089e960b55ac221f0474f64
Signed-off-by: Siddharth Gupta <sidgup@codeaurora.org>
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
Migrating all SCM calls made to the old driver to now be made
through the backported upstream driver.
Change-Id: Ic77d315c5a55859f0cc58d7bbf05c0c24d1ef155
Signed-off-by: Siddharth Gupta <sidgup@codeaurora.org>
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
Migrate SCM IO read calls in the smmu driver to use new SCM driver.
Add support for io-pgtable-msm-secure map and unmap in SCM driver.
Change-Id: If1ce054b9cfcfdcdab3aecc6752fcd4765197a05
Signed-off-by: Siddharth Gupta <sidgup@codeaurora.org>
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
Migrate SCM io_read/write to upstream API in core hang detection.
Change-Id: If720dcd0f9a5341276fcd2a052c8ab6cf238aaa5
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
Signed-off-by: Siddharth Gupta <sidgup@codeaurora.org>
Add support for SCM call to deactivate secure watchdog on Qualcomm
devices.
Change-Id: I4008792e45d2c264b98ca954ea37a94093ea771e
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
Secure world imposed that buffer exchanges between secure and non-secure
worlds be allocated from qtee_shmbridge, so add a function to allocate
buffer space using shmbridge for extra arguments. Change helps in
dealing with early scm calls when the driver is not initialized.
Change-Id: I270b4aef9d33ec6d7ea0897ddcc0944ac9e1833f
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
Merge qtee_shmbridge and qcom_scm drivers into a single compilation unit.
Change-Id: Icfbf7c335fc8d9468236cdc08dfda52fa563be40
Signed-off-by: Siddharth Gupta <sidgup@codeaurora.org>
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
- Rename qcom_scm-64.c to qcom_scm-smc as it supports SMC-based calling
conventions for 32 and 64-bit targets
- Remove qcom_scm-32.c as it has been superceded by qcom_scm-smc.c
- Update Kconfig to select QCOM_SCM_TRANSPORT_SMC on ARM and ARM64
targets
Change-Id: Iae94a73e0c7cefb9a253230212d01f6126cd0c15
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
Enable the ARM SMMU driver as a module for Lahaina GKI.
Change-Id: I217b0fc81c78331fc2a710546eaa1d3e79a59917
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
Allow the ARM SMMU driver to be compiled as a loadable
kernel module.
Change-Id: Ib982ddb7f8ed82c5f7983db8b85bb2c6c83502c6
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
Query if a domain is atomic or not after initializing the
domain, as opposed to before, when the domain properties
have not been finalized.
Change-Id: Ib2f05156268a16cccb410e263de957d9eb2070ae
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
Use a bitmap to maintain the domain attributes for SMMU domains.
This simplifies the handling for the domain attributes, as it
removes the need to explicitly manipulate the bits, which can
be error-prone.
Change-Id: I719900df9d80801239b8e815d29953f3c6d067f0
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
Update the parent names used for gpll0 to match the actual names in the
GCC driver. Without this change, clk_set_rate will fail when the
determine_rate callback fails to find the associated parent.
Change-Id: I0b17fed4e11c30ffb00a2737078bfab5ea1ef523
Signed-off-by: Mike Tipton <mdtipton@codeaurora.org>
Remove unused register offset related enums as those are not used
for configuration within USB PHY driver. This helps to reduce
number of register offset value need to pass from devicetree with
USB QMP PHY device node.
Change-Id: Ia0581c3dc8210bfaac9a7318eb75e1ffa35440b6
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Some build environments do not support -xtype. Therefore
use -type instead.
Change-Id: I459bdd9e16dc31ea0b91d5f0cb86d4dabb1e3352
Signed-off-by: Bruce Levy <blevy@codeaurora.org>