mirror of
https://github.com/armbian/linux-cix.git
synced 2026-01-06 12:30:45 -08:00
Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
Pull ARM SoC-related driver updates from Olof Johansson:
"Various driver updates for platforms and a couple of the small driver
subsystems we merge through our tree:
- A driver for SCU (system control) on NXP i.MX8QXP
- Qualcomm Always-on Subsystem messaging driver (AOSS QMP)
- Qualcomm PM support for MSM8998
- Support for a newer version of DRAM PHY driver for Broadcom (DPFE)
- Reset controller support for Bitmain BM1880
- TI SCI (System Control Interface) support for CPU control on AM654
processors
- More TI sysc refactoring and rework"
* tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (84 commits)
reset: remove redundant null check on pointer dev
soc: rockchip: work around clang warning
dt-bindings: reset: imx7: Fix the spelling of 'indices'
soc: imx: Add i.MX8MN SoC driver support
soc: aspeed: lpc-ctrl: Fix probe error handling
soc: qcom: geni: Add support for ACPI
firmware: ti_sci: Fix gcc unused-but-set-variable warning
firmware: ti_sci: Use the correct style for SPDX License Identifier
soc: imx8: Use existing of_root directly
soc: imx8: Fix potential kernel dump in error path
firmware/psci: psci_checker: Park kthreads before stopping them
memory: move jedec_ddr.h from include/memory to drivers/memory/
memory: move jedec_ddr_data.c from lib/ to drivers/memory/
MAINTAINERS: Remove myself as qcom maintainer
soc: aspeed: lpc-ctrl: make parameter optional
soc: qcom: apr: Don't use reg for domain id
soc: qcom: fix QCOM_AOSS_QMP dependency and build errors
memory: tegra: Fix -Wunused-const-variable
firmware: tegra: Early resume BPMP
soc/tegra: Select pinctrl for Tegra194
...
This commit is contained in:
@@ -6,7 +6,7 @@ that are provided by the hardware platform it is running on, including power
|
||||
and performance functions.
|
||||
|
||||
This binding is intended to define the interface the firmware implementing
|
||||
the SCMI as described in ARM document number ARM DUI 0922B ("ARM System Control
|
||||
the SCMI as described in ARM document number ARM DEN 0056A ("ARM System Control
|
||||
and Management Interface Platform Design Document")[0] provide for OSPM in
|
||||
the device tree.
|
||||
|
||||
|
||||
11
Documentation/devicetree/bindings/misc/fsl,dpaa2-console.txt
Normal file
11
Documentation/devicetree/bindings/misc/fsl,dpaa2-console.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
DPAA2 console support
|
||||
|
||||
Required properties:
|
||||
|
||||
- compatible
|
||||
Value type: <string>
|
||||
Definition: Must be "fsl,dpaa2-console".
|
||||
- reg
|
||||
Value type: <prop-encoded-array>
|
||||
Definition: A standard property. Specifies the region where the MCFBA
|
||||
(MC firmware base address) register can be found.
|
||||
@@ -6,6 +6,8 @@ which then translates it into a corresponding voltage on a rail
|
||||
Required Properties:
|
||||
- compatible: Should be one of the following
|
||||
* qcom,msm8996-rpmpd: RPM Power domain for the msm8996 family of SoC
|
||||
* qcom,msm8998-rpmpd: RPM Power domain for the msm8998 family of SoC
|
||||
* qcom,qcs404-rpmpd: RPM Power domain for the qcs404 family of SoC
|
||||
* qcom,sdm845-rpmhpd: RPMh Power domain for the sdm845 family of SoC
|
||||
- #power-domain-cells: number of cells in Power domain specifier
|
||||
must be 1.
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
Bitmain BM1880 SoC Reset Controller
|
||||
===================================
|
||||
|
||||
Please also refer to reset.txt in this directory for common reset
|
||||
controller binding usage.
|
||||
|
||||
Required properties:
|
||||
- compatible: Should be "bitmain,bm1880-reset"
|
||||
- reg: Offset and length of reset controller space in SCTRL.
|
||||
- #reset-cells: Must be 1.
|
||||
|
||||
Example:
|
||||
|
||||
rst: reset-controller@c00 {
|
||||
compatible = "bitmain,bm1880-reset";
|
||||
reg = <0xc00 0x8>;
|
||||
#reset-cells = <1>;
|
||||
};
|
||||
@@ -45,6 +45,6 @@ Example:
|
||||
};
|
||||
|
||||
|
||||
For list of all valid reset indicies see
|
||||
For list of all valid reset indices see
|
||||
<dt-bindings/reset/imx7-reset.h> for i.MX7 and
|
||||
<dt-bindings/reset/imx8mq-reset.h> for i.MX8MQ
|
||||
|
||||
@@ -2,8 +2,8 @@ Amlogic Canvas
|
||||
================================
|
||||
|
||||
A canvas is a collection of metadata that describes a pixel buffer.
|
||||
Those metadata include: width, height, phyaddr, wrapping, block mode
|
||||
and endianness.
|
||||
Those metadata include: width, height, phyaddr, wrapping and block mode.
|
||||
Starting with GXBB the endianness can also be described.
|
||||
|
||||
Many IPs within Amlogic SoCs rely on canvas indexes to read/write pixel data
|
||||
rather than use the phy addresses directly. For instance, this is the case for
|
||||
@@ -18,7 +18,11 @@ Video Lookup Table
|
||||
--------------------------
|
||||
|
||||
Required properties:
|
||||
- compatible: "amlogic,canvas"
|
||||
- compatible: has to be one of:
|
||||
- "amlogic,meson8-canvas", "amlogic,canvas" on Meson8
|
||||
- "amlogic,meson8b-canvas", "amlogic,canvas" on Meson8b
|
||||
- "amlogic,meson8m2-canvas", "amlogic,canvas" on Meson8m2
|
||||
- "amlogic,canvas" on GXBB and newer
|
||||
- reg: Base physical address and size of the canvas registers.
|
||||
|
||||
Example:
|
||||
|
||||
81
Documentation/devicetree/bindings/soc/qcom/qcom,aoss-qmp.txt
Normal file
81
Documentation/devicetree/bindings/soc/qcom/qcom,aoss-qmp.txt
Normal file
@@ -0,0 +1,81 @@
|
||||
Qualcomm Always-On Subsystem side channel binding
|
||||
|
||||
This binding describes the hardware component responsible for side channel
|
||||
requests to the always-on subsystem (AOSS), used for certain power management
|
||||
requests that is not handled by the standard RPMh interface. Each client in the
|
||||
SoC has it's own block of message RAM and IRQ for communication with the AOSS.
|
||||
The protocol used to communicate in the message RAM is known as Qualcomm
|
||||
Messaging Protocol (QMP)
|
||||
|
||||
The AOSS side channel exposes control over a set of resources, used to control
|
||||
a set of debug related clocks and to affect the low power state of resources
|
||||
related to the secondary subsystems. These resources are exposed as a set of
|
||||
power-domains.
|
||||
|
||||
- compatible:
|
||||
Usage: required
|
||||
Value type: <string>
|
||||
Definition: must be "qcom,sdm845-aoss-qmp"
|
||||
|
||||
- reg:
|
||||
Usage: required
|
||||
Value type: <prop-encoded-array>
|
||||
Definition: the base address and size of the message RAM for this
|
||||
client's communication with the AOSS
|
||||
|
||||
- interrupts:
|
||||
Usage: required
|
||||
Value type: <prop-encoded-array>
|
||||
Definition: should specify the AOSS message IRQ for this client
|
||||
|
||||
- mboxes:
|
||||
Usage: required
|
||||
Value type: <prop-encoded-array>
|
||||
Definition: reference to the mailbox representing the outgoing doorbell
|
||||
in APCS for this client, as described in mailbox/mailbox.txt
|
||||
|
||||
- #clock-cells:
|
||||
Usage: optional
|
||||
Value type: <u32>
|
||||
Definition: must be 0
|
||||
The single clock represents the QDSS clock.
|
||||
|
||||
- #power-domain-cells:
|
||||
Usage: optional
|
||||
Value type: <u32>
|
||||
Definition: must be 1
|
||||
The provided power-domains are:
|
||||
CDSP state (0), LPASS state (1), modem state (2), SLPI
|
||||
state (3), SPSS state (4) and Venus state (5).
|
||||
|
||||
= SUBNODES
|
||||
The AOSS side channel also provides the controls for three cooling devices,
|
||||
these are expressed as subnodes of the QMP node. The name of the node is used
|
||||
to identify the resource and must therefor be "cx", "mx" or "ebi".
|
||||
|
||||
- #cooling-cells:
|
||||
Usage: optional
|
||||
Value type: <u32>
|
||||
Definition: must be 2
|
||||
|
||||
= EXAMPLE
|
||||
|
||||
The following example represents the AOSS side-channel message RAM and the
|
||||
mechanism exposing the power-domains, as found in SDM845.
|
||||
|
||||
aoss_qmp: qmp@c300000 {
|
||||
compatible = "qcom,sdm845-aoss-qmp";
|
||||
reg = <0x0c300000 0x100000>;
|
||||
interrupts = <GIC_SPI 389 IRQ_TYPE_EDGE_RISING>;
|
||||
mboxes = <&apss_shared 0>;
|
||||
|
||||
#power-domain-cells = <1>;
|
||||
|
||||
cx_cdev: cx {
|
||||
#cooling-cells = <2>;
|
||||
};
|
||||
|
||||
mx_cdev: mx {
|
||||
#cooling-cells = <2>;
|
||||
};
|
||||
};
|
||||
@@ -9,7 +9,7 @@ used for audio/voice services on the QDSP.
|
||||
Value type: <stringlist>
|
||||
Definition: must be "qcom,apr-v<VERSION-NUMBER>", example "qcom,apr-v2"
|
||||
|
||||
- reg
|
||||
- qcom,apr-domain
|
||||
Usage: required
|
||||
Value type: <u32>
|
||||
Definition: Destination processor ID.
|
||||
@@ -49,9 +49,9 @@ by the individual bindings for the specific service
|
||||
The following example represents a QDSP based sound card on a MSM8996 device
|
||||
which uses apr as communication between Apps and QDSP.
|
||||
|
||||
apr@4 {
|
||||
apr {
|
||||
compatible = "qcom,apr-v2";
|
||||
reg = <APR_DOMAIN_ADSP>;
|
||||
qcom,apr-domain = <APR_DOMAIN_ADSP>;
|
||||
|
||||
q6core@3 {
|
||||
compatible = "qcom,q6core";
|
||||
|
||||
@@ -2091,7 +2091,6 @@ S: Maintained
|
||||
|
||||
ARM/QUALCOMM SUPPORT
|
||||
M: Andy Gross <agross@kernel.org>
|
||||
M: David Brown <david.brown@linaro.org>
|
||||
L: linux-arm-msm@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/soc/qcom/
|
||||
@@ -2113,7 +2112,7 @@ F: drivers/i2c/busses/i2c-qup.c
|
||||
F: drivers/i2c/busses/i2c-qcom-geni.c
|
||||
F: drivers/mfd/ssbi.c
|
||||
F: drivers/mmc/host/mmci_qcom*
|
||||
F: drivers/mmc/host/sdhci_msm.c
|
||||
F: drivers/mmc/host/sdhci-msm.c
|
||||
F: drivers/pci/controller/dwc/pcie-qcom.c
|
||||
F: drivers/phy/qualcomm/
|
||||
F: drivers/power/*/msm*
|
||||
@@ -6527,6 +6526,7 @@ M: Li Yang <leoyang.li@nxp.com>
|
||||
L: linuxppc-dev@lists.ozlabs.org
|
||||
L: linux-arm-kernel@lists.infradead.org
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/misc/fsl,dpaa2-console.txt
|
||||
F: Documentation/devicetree/bindings/soc/fsl/
|
||||
F: drivers/soc/fsl/
|
||||
F: include/linux/fsl/
|
||||
@@ -11907,11 +11907,13 @@ F: include/linux/mtd/onenand*.h
|
||||
|
||||
OP-TEE DRIVER
|
||||
M: Jens Wiklander <jens.wiklander@linaro.org>
|
||||
L: tee-dev@lists.linaro.org
|
||||
S: Maintained
|
||||
F: drivers/tee/optee/
|
||||
|
||||
OP-TEE RANDOM NUMBER GENERATOR (RNG) DRIVER
|
||||
M: Sumit Garg <sumit.garg@linaro.org>
|
||||
L: tee-dev@lists.linaro.org
|
||||
S: Maintained
|
||||
F: drivers/char/hw_random/optee-rng.c
|
||||
|
||||
@@ -13295,7 +13297,7 @@ M: Niklas Cassel <niklas.cassel@linaro.org>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
|
||||
F: Documentation/devicetree/bindings/net/qcom,dwmac.txt
|
||||
F: Documentation/devicetree/bindings/net/qcom,ethqos.txt
|
||||
|
||||
QUALCOMM GENERIC INTERFACE I2C DRIVER
|
||||
M: Alok Chauhan <alokc@codeaurora.org>
|
||||
@@ -15745,6 +15747,7 @@ F: include/media/i2c/tw9910.h
|
||||
|
||||
TEE SUBSYSTEM
|
||||
M: Jens Wiklander <jens.wiklander@linaro.org>
|
||||
L: tee-dev@lists.linaro.org
|
||||
S: Maintained
|
||||
F: include/linux/tee_drv.h
|
||||
F: include/uapi/linux/tee.h
|
||||
|
||||
@@ -3442,6 +3442,7 @@ static int omap_hwmod_check_module(struct device *dev,
|
||||
* @dev: struct device
|
||||
* @oh: module
|
||||
* @sysc_fields: sysc register bits
|
||||
* @clockdomain: clockdomain
|
||||
* @rev_offs: revision register offset
|
||||
* @sysc_offs: sysconfig register offset
|
||||
* @syss_offs: sysstatus register offset
|
||||
@@ -3453,6 +3454,7 @@ static int omap_hwmod_check_module(struct device *dev,
|
||||
static int omap_hwmod_allocate_module(struct device *dev, struct omap_hwmod *oh,
|
||||
const struct ti_sysc_module_data *data,
|
||||
struct sysc_regbits *sysc_fields,
|
||||
struct clockdomain *clkdm,
|
||||
s32 rev_offs, s32 sysc_offs,
|
||||
s32 syss_offs, u32 sysc_flags,
|
||||
u32 idlemodes)
|
||||
@@ -3460,8 +3462,6 @@ static int omap_hwmod_allocate_module(struct device *dev, struct omap_hwmod *oh,
|
||||
struct omap_hwmod_class_sysconfig *sysc;
|
||||
struct omap_hwmod_class *class = NULL;
|
||||
struct omap_hwmod_ocp_if *oi = NULL;
|
||||
struct clockdomain *clkdm = NULL;
|
||||
struct clk *clk = NULL;
|
||||
void __iomem *regs = NULL;
|
||||
unsigned long flags;
|
||||
|
||||
@@ -3508,36 +3508,6 @@ static int omap_hwmod_allocate_module(struct device *dev, struct omap_hwmod *oh,
|
||||
oi->user = OCP_USER_MPU | OCP_USER_SDMA;
|
||||
}
|
||||
|
||||
if (!oh->_clk) {
|
||||
struct clk_hw_omap *hwclk;
|
||||
|
||||
clk = of_clk_get_by_name(dev->of_node, "fck");
|
||||
if (!IS_ERR(clk))
|
||||
clk_prepare(clk);
|
||||
else
|
||||
clk = NULL;
|
||||
|
||||
/*
|
||||
* Populate clockdomain based on dts clock. It is needed for
|
||||
* clkdm_deny_idle() and clkdm_allow_idle() until we have have
|
||||
* interconnect driver and reset driver capable of blocking
|
||||
* clockdomain idle during reset, enable and idle.
|
||||
*/
|
||||
if (clk) {
|
||||
hwclk = to_clk_hw_omap(__clk_get_hw(clk));
|
||||
if (hwclk && hwclk->clkdm_name)
|
||||
clkdm = clkdm_lookup(hwclk->clkdm_name);
|
||||
}
|
||||
|
||||
/*
|
||||
* Note that we assume interconnect driver manages the clocks
|
||||
* and do not need to populate oh->_clk for dynamically
|
||||
* allocated modules.
|
||||
*/
|
||||
clk_unprepare(clk);
|
||||
clk_put(clk);
|
||||
}
|
||||
|
||||
spin_lock_irqsave(&oh->_lock, flags);
|
||||
if (regs)
|
||||
oh->_mpu_rt_va = regs;
|
||||
@@ -3623,7 +3593,7 @@ int omap_hwmod_init_module(struct device *dev,
|
||||
u32 sysc_flags, idlemodes;
|
||||
int error;
|
||||
|
||||
if (!dev || !data)
|
||||
if (!dev || !data || !data->name || !cookie)
|
||||
return -EINVAL;
|
||||
|
||||
oh = _lookup(data->name);
|
||||
@@ -3694,7 +3664,8 @@ int omap_hwmod_init_module(struct device *dev,
|
||||
return error;
|
||||
|
||||
return omap_hwmod_allocate_module(dev, oh, data, sysc_fields,
|
||||
rev_offs, sysc_offs, syss_offs,
|
||||
cookie->clkdm, rev_offs,
|
||||
sysc_offs, syss_offs,
|
||||
sysc_flags, idlemodes);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <linux/platform_data/wkup_m3.h>
|
||||
#include <linux/platform_data/asoc-ti-mcbsp.h>
|
||||
|
||||
#include "clockdomain.h"
|
||||
#include "common.h"
|
||||
#include "common-board-devices.h"
|
||||
#include "control.h"
|
||||
@@ -460,6 +461,62 @@ static void __init dra7x_evm_mmc_quirk(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
static struct clockdomain *ti_sysc_find_one_clockdomain(struct clk *clk)
|
||||
{
|
||||
struct clockdomain *clkdm = NULL;
|
||||
struct clk_hw_omap *hwclk;
|
||||
|
||||
hwclk = to_clk_hw_omap(__clk_get_hw(clk));
|
||||
if (hwclk && hwclk->clkdm_name)
|
||||
clkdm = clkdm_lookup(hwclk->clkdm_name);
|
||||
|
||||
return clkdm;
|
||||
}
|
||||
|
||||
/**
|
||||
* ti_sysc_clkdm_init - find clockdomain based on clock
|
||||
* @fck: device functional clock
|
||||
* @ick: device interface clock
|
||||
* @dev: struct device
|
||||
*
|
||||
* Populate clockdomain based on clock. It is needed for
|
||||
* clkdm_deny_idle() and clkdm_allow_idle() for blocking clockdomain
|
||||
* clockdomain idle during reset, enable and idle.
|
||||
*
|
||||
* Note that we assume interconnect driver manages the clocks
|
||||
* and do not need to populate oh->_clk for dynamically
|
||||
* allocated modules.
|
||||
*/
|
||||
static int ti_sysc_clkdm_init(struct device *dev,
|
||||
struct clk *fck, struct clk *ick,
|
||||
struct ti_sysc_cookie *cookie)
|
||||
{
|
||||
if (fck)
|
||||
cookie->clkdm = ti_sysc_find_one_clockdomain(fck);
|
||||
if (cookie->clkdm)
|
||||
return 0;
|
||||
if (ick)
|
||||
cookie->clkdm = ti_sysc_find_one_clockdomain(ick);
|
||||
if (cookie->clkdm)
|
||||
return 0;
|
||||
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
static void ti_sysc_clkdm_deny_idle(struct device *dev,
|
||||
const struct ti_sysc_cookie *cookie)
|
||||
{
|
||||
if (cookie->clkdm)
|
||||
clkdm_deny_idle(cookie->clkdm);
|
||||
}
|
||||
|
||||
static void ti_sysc_clkdm_allow_idle(struct device *dev,
|
||||
const struct ti_sysc_cookie *cookie)
|
||||
{
|
||||
if (cookie->clkdm)
|
||||
clkdm_allow_idle(cookie->clkdm);
|
||||
}
|
||||
|
||||
static int ti_sysc_enable_module(struct device *dev,
|
||||
const struct ti_sysc_cookie *cookie)
|
||||
{
|
||||
@@ -491,6 +548,9 @@ static struct of_dev_auxdata omap_auxdata_lookup[];
|
||||
|
||||
static struct ti_sysc_platform_data ti_sysc_pdata = {
|
||||
.auxdata = omap_auxdata_lookup,
|
||||
.init_clockdomain = ti_sysc_clkdm_init,
|
||||
.clkdm_deny_idle = ti_sysc_clkdm_deny_idle,
|
||||
.clkdm_allow_idle = ti_sysc_clkdm_allow_idle,
|
||||
.init_module = omap_hwmod_init_module,
|
||||
.enable_module = ti_sysc_enable_module,
|
||||
.idle_module = ti_sysc_idle_module,
|
||||
|
||||
@@ -399,8 +399,8 @@ static int __init brcmstb_gisb_arb_probe(struct platform_device *pdev)
|
||||
&gisb_panic_notifier);
|
||||
}
|
||||
|
||||
dev_info(&pdev->dev, "registered mem: %p, irqs: %d, %d\n",
|
||||
gdev->base, timeout_irq, tea_irq);
|
||||
dev_info(&pdev->dev, "registered irqs: %d, %d\n",
|
||||
timeout_irq, tea_irq);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -443,11 +443,31 @@ int dprc_get_obj_region(struct fsl_mc_io *mc_io,
|
||||
struct fsl_mc_command cmd = { 0 };
|
||||
struct dprc_cmd_get_obj_region *cmd_params;
|
||||
struct dprc_rsp_get_obj_region *rsp_params;
|
||||
u16 major_ver, minor_ver;
|
||||
int err;
|
||||
|
||||
/* prepare command */
|
||||
cmd.header = mc_encode_cmd_header(DPRC_CMDID_GET_OBJ_REG,
|
||||
cmd_flags, token);
|
||||
err = dprc_get_api_version(mc_io, 0,
|
||||
&major_ver,
|
||||
&minor_ver);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
/**
|
||||
* MC API version 6.3 introduced a new field to the region
|
||||
* descriptor: base_address. If the older API is in use then the base
|
||||
* address is set to zero to indicate it needs to be obtained elsewhere
|
||||
* (typically the device tree).
|
||||
*/
|
||||
if (major_ver > 6 || (major_ver == 6 && minor_ver >= 3))
|
||||
cmd.header =
|
||||
mc_encode_cmd_header(DPRC_CMDID_GET_OBJ_REG_V2,
|
||||
cmd_flags, token);
|
||||
else
|
||||
cmd.header =
|
||||
mc_encode_cmd_header(DPRC_CMDID_GET_OBJ_REG,
|
||||
cmd_flags, token);
|
||||
|
||||
cmd_params = (struct dprc_cmd_get_obj_region *)cmd.params;
|
||||
cmd_params->obj_id = cpu_to_le32(obj_id);
|
||||
cmd_params->region_index = region_index;
|
||||
@@ -461,8 +481,12 @@ int dprc_get_obj_region(struct fsl_mc_io *mc_io,
|
||||
|
||||
/* retrieve response parameters */
|
||||
rsp_params = (struct dprc_rsp_get_obj_region *)cmd.params;
|
||||
region_desc->base_offset = le64_to_cpu(rsp_params->base_addr);
|
||||
region_desc->base_offset = le64_to_cpu(rsp_params->base_offset);
|
||||
region_desc->size = le32_to_cpu(rsp_params->size);
|
||||
if (major_ver > 6 || (major_ver == 6 && minor_ver >= 3))
|
||||
region_desc->base_address = le64_to_cpu(rsp_params->base_addr);
|
||||
else
|
||||
region_desc->base_address = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -487,10 +487,19 @@ static int fsl_mc_device_get_mmio_regions(struct fsl_mc_device *mc_dev,
|
||||
"dprc_get_obj_region() failed: %d\n", error);
|
||||
goto error_cleanup_regions;
|
||||
}
|
||||
|
||||
error = translate_mc_addr(mc_dev, mc_region_type,
|
||||
/*
|
||||
* Older MC only returned region offset and no base address
|
||||
* If base address is in the region_desc use it otherwise
|
||||
* revert to old mechanism
|
||||
*/
|
||||
if (region_desc.base_address)
|
||||
regions[i].start = region_desc.base_address +
|
||||
region_desc.base_offset;
|
||||
else
|
||||
error = translate_mc_addr(mc_dev, mc_region_type,
|
||||
region_desc.base_offset,
|
||||
®ions[i].start);
|
||||
|
||||
if (error < 0) {
|
||||
dev_err(parent_dev,
|
||||
"Invalid MC offset: %#x (for %s.%d\'s region %d)\n",
|
||||
@@ -504,6 +513,8 @@ static int fsl_mc_device_get_mmio_regions(struct fsl_mc_device *mc_dev,
|
||||
regions[i].flags = IORESOURCE_IO;
|
||||
if (region_desc.flags & DPRC_REGION_CACHEABLE)
|
||||
regions[i].flags |= IORESOURCE_CACHEABLE;
|
||||
if (region_desc.flags & DPRC_REGION_SHAREABLE)
|
||||
regions[i].flags |= IORESOURCE_MEM;
|
||||
}
|
||||
|
||||
mc_dev->regions = regions;
|
||||
|
||||
@@ -79,9 +79,11 @@ int dpmcp_reset(struct fsl_mc_io *mc_io,
|
||||
|
||||
/* DPRC command versioning */
|
||||
#define DPRC_CMD_BASE_VERSION 1
|
||||
#define DPRC_CMD_2ND_VERSION 2
|
||||
#define DPRC_CMD_ID_OFFSET 4
|
||||
|
||||
#define DPRC_CMD(id) (((id) << DPRC_CMD_ID_OFFSET) | DPRC_CMD_BASE_VERSION)
|
||||
#define DPRC_CMD_V2(id) (((id) << DPRC_CMD_ID_OFFSET) | DPRC_CMD_2ND_VERSION)
|
||||
|
||||
/* DPRC command IDs */
|
||||
#define DPRC_CMDID_CLOSE DPRC_CMD(0x800)
|
||||
@@ -100,6 +102,7 @@ int dpmcp_reset(struct fsl_mc_io *mc_io,
|
||||
#define DPRC_CMDID_GET_OBJ_COUNT DPRC_CMD(0x159)
|
||||
#define DPRC_CMDID_GET_OBJ DPRC_CMD(0x15A)
|
||||
#define DPRC_CMDID_GET_OBJ_REG DPRC_CMD(0x15E)
|
||||
#define DPRC_CMDID_GET_OBJ_REG_V2 DPRC_CMD_V2(0x15E)
|
||||
#define DPRC_CMDID_SET_OBJ_IRQ DPRC_CMD(0x15F)
|
||||
|
||||
struct dprc_cmd_open {
|
||||
@@ -199,9 +202,16 @@ struct dprc_rsp_get_obj_region {
|
||||
/* response word 0 */
|
||||
__le64 pad;
|
||||
/* response word 1 */
|
||||
__le64 base_addr;
|
||||
__le64 base_offset;
|
||||
/* response word 2 */
|
||||
__le32 size;
|
||||
__le32 pad2;
|
||||
/* response word 3 */
|
||||
__le32 flags;
|
||||
__le32 pad3;
|
||||
/* response word 4 */
|
||||
/* base_addr may be zero if older MC firmware is used */
|
||||
__le64 base_addr;
|
||||
};
|
||||
|
||||
struct dprc_cmd_set_obj_irq {
|
||||
@@ -334,6 +344,7 @@ int dprc_set_obj_irq(struct fsl_mc_io *mc_io,
|
||||
/* Region flags */
|
||||
/* Cacheable - Indicates that region should be mapped as cacheable */
|
||||
#define DPRC_REGION_CACHEABLE 0x00000001
|
||||
#define DPRC_REGION_SHAREABLE 0x00000002
|
||||
|
||||
/**
|
||||
* enum dprc_region_type - Region type
|
||||
@@ -342,7 +353,8 @@ int dprc_set_obj_irq(struct fsl_mc_io *mc_io,
|
||||
*/
|
||||
enum dprc_region_type {
|
||||
DPRC_REGION_TYPE_MC_PORTAL,
|
||||
DPRC_REGION_TYPE_QBMAN_PORTAL
|
||||
DPRC_REGION_TYPE_QBMAN_PORTAL,
|
||||
DPRC_REGION_TYPE_QBMAN_MEM_BACKED_PORTAL
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -360,6 +372,7 @@ struct dprc_region_desc {
|
||||
u32 size;
|
||||
u32 flags;
|
||||
enum dprc_region_type type;
|
||||
u64 base_address;
|
||||
};
|
||||
|
||||
int dprc_get_obj_region(struct fsl_mc_io *mc_io,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -185,6 +185,8 @@ scmi_clock_describe_rates_get(const struct scmi_handle *handle, u32 clk_id,
|
||||
if (rate_discrete)
|
||||
clk->list.num_rates = tot_rate_cnt;
|
||||
|
||||
clk->rate_discrete = rate_discrete;
|
||||
|
||||
err:
|
||||
scmi_xfer_put(handle, t);
|
||||
return ret;
|
||||
|
||||
@@ -30,10 +30,12 @@ struct scmi_msg_resp_sensor_description {
|
||||
__le32 id;
|
||||
__le32 attributes_low;
|
||||
#define SUPPORTS_ASYNC_READ(x) ((x) & BIT(31))
|
||||
#define NUM_TRIP_POINTS(x) (((x) >> 4) & 0xff)
|
||||
#define NUM_TRIP_POINTS(x) ((x) & 0xff)
|
||||
__le32 attributes_high;
|
||||
#define SENSOR_TYPE(x) ((x) & 0xff)
|
||||
#define SENSOR_SCALE(x) (((x) >> 11) & 0x3f)
|
||||
#define SENSOR_SCALE(x) (((x) >> 11) & 0x1f)
|
||||
#define SENSOR_SCALE_SIGN BIT(4)
|
||||
#define SENSOR_SCALE_EXTEND GENMASK(7, 5)
|
||||
#define SENSOR_UPDATE_SCALE(x) (((x) >> 22) & 0x1f)
|
||||
#define SENSOR_UPDATE_BASE(x) (((x) >> 27) & 0x1f)
|
||||
u8 name[SCMI_MAX_STR_SIZE];
|
||||
@@ -140,6 +142,10 @@ static int scmi_sensor_description_get(const struct scmi_handle *handle,
|
||||
s = &si->sensors[desc_index + cnt];
|
||||
s->id = le32_to_cpu(buf->desc[cnt].id);
|
||||
s->type = SENSOR_TYPE(attrh);
|
||||
s->scale = SENSOR_SCALE(attrh);
|
||||
/* Sign extend to a full s8 */
|
||||
if (s->scale & SENSOR_SCALE_SIGN)
|
||||
s->scale |= SENSOR_SCALE_EXTEND;
|
||||
strlcpy(s->name, buf->desc[cnt].name, SCMI_MAX_STR_SIZE);
|
||||
}
|
||||
|
||||
|
||||
@@ -359,16 +359,16 @@ static int suspend_test_thread(void *arg)
|
||||
for (;;) {
|
||||
/* Needs to be set first to avoid missing a wakeup. */
|
||||
set_current_state(TASK_INTERRUPTIBLE);
|
||||
if (kthread_should_stop()) {
|
||||
__set_current_state(TASK_RUNNING);
|
||||
if (kthread_should_park())
|
||||
break;
|
||||
}
|
||||
schedule();
|
||||
}
|
||||
|
||||
pr_info("CPU %d suspend test results: success %d, shallow states %d, errors %d\n",
|
||||
cpu, nb_suspend, nb_shallow_sleep, nb_err);
|
||||
|
||||
kthread_parkme();
|
||||
|
||||
return nb_err;
|
||||
}
|
||||
|
||||
@@ -433,8 +433,10 @@ static int suspend_tests(void)
|
||||
|
||||
|
||||
/* Stop and destroy all threads, get return status. */
|
||||
for (i = 0; i < nb_threads; ++i)
|
||||
for (i = 0; i < nb_threads; ++i) {
|
||||
err += kthread_park(threads[i]);
|
||||
err += kthread_stop(threads[i]);
|
||||
}
|
||||
out:
|
||||
cpuidle_resume_and_unlock();
|
||||
kfree(threads);
|
||||
|
||||
@@ -803,7 +803,9 @@ static int __maybe_unused tegra_bpmp_resume(struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static SIMPLE_DEV_PM_OPS(tegra_bpmp_pm_ops, NULL, tegra_bpmp_resume);
|
||||
static const struct dev_pm_ops tegra_bpmp_pm_ops = {
|
||||
.resume_early = tegra_bpmp_resume,
|
||||
};
|
||||
|
||||
#if IS_ENABLED(CONFIG_ARCH_TEGRA_186_SOC) || \
|
||||
IS_ENABLED(CONFIG_ARCH_TEGRA_194_SOC)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user