mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
Merge tag 'soc-drivers-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
Pull SoC driver updates from Arnd Bergmann:
"Updates are across the usual driver subsystems with SoC specific
drivers:
- added soc specicific drivers for sophgo cv1800 and sg2044, qualcomm
sm8750, and amlogic c3 and s4 chips.
- cache controller updates for sifive chips, plus binding changes for
other cache descriptions.
- memory controller drivers for mediatek mt6893, stm32 and cleanups
for a few more drivers
- reset controller drivers for T-Head TH1502, Sophgo sg2044 and
Renesas RZ/V2H(P)
- SCMI firmware updates to better deal with buggy firmware, plus
better support for Qualcomm X1E and NXP i.MX specific interfaces
- a new platform driver for the crypto firmware on Cznic Turris
Omnia/MOX
- cleanups for the TEE firmware subsystem and amdtee driver
- minor updates and fixes for freescale/nxp, qualcomm, google,
aspeed, wondermedia, ti, nxp, renesas, hisilicon, mediatek,
broadcom and samsung SoCs"
* tag 'soc-drivers-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (133 commits)
soc: aspeed: Add NULL check in aspeed_lpc_enable_snoop()
soc: aspeed: lpc: Fix impossible judgment condition
ARM: aspeed: Don't select SRAM
docs: firmware: qcom_scm: Fix kernel-doc warning
soc: fsl: qe: Consolidate chained IRQ handler install/remove
firmware: qcom: scm: Allow QSEECOM for HP EliteBook Ultra G1q
dt-bindings: mfd: qcom,tcsr: Add compatible for ipq5018
dt-bindings: cache: add QiLai compatible to ax45mp
memory: stm32_omm: Fix error handling in stm32_omm_disable_child()
dt-bindings: cache: Convert marvell,tauros2-cache to DT schema
dt-bindings: cache: Convert marvell,{feroceon,kirkwood}-cache to DT schema
soc: samsung: exynos-pmu: enable CPU hotplug support for gs101
MAINTAINERS: Add google,gs101-pmu-intr-gen.yaml binding file
dt-bindings: soc: samsung: exynos-pmu: gs101: add google,pmu-intr-gen phandle
dt-bindings: soc: google: Add gs101-pmu-intr-gen binding documentation
bus: fsl-mc: Use strscpy() instead of strscpy_pad()
soc: fsl: qbman: Remove const from portal->cgrs allocation type
bus: fsl_mc: Fix driver_managed_dma check
bus: fsl-mc: increase MC_CMD_COMPLETION_TIMEOUT_MS value
bus: fsl-mc: drop useless cleanup
...
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include <linux/firmware/samsung/exynos-acpm-protocol.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/iopoll.h>
|
||||
#include <linux/ktime.h>
|
||||
#include <linux/mailbox/exynos-message.h>
|
||||
#include <linux/mailbox_client.h>
|
||||
#include <linux/module.h>
|
||||
@@ -32,8 +33,7 @@
|
||||
|
||||
#define ACPM_PROTOCOL_SEQNUM GENMASK(21, 16)
|
||||
|
||||
/* The unit of counter is 20 us. 5000 * 20 = 100 ms */
|
||||
#define ACPM_POLL_TIMEOUT 5000
|
||||
#define ACPM_POLL_TIMEOUT_US (100 * USEC_PER_MSEC)
|
||||
#define ACPM_TX_TIMEOUT_US 500000
|
||||
|
||||
#define ACPM_GS101_INITDATA_BASE 0xa000
|
||||
@@ -300,12 +300,13 @@ static int acpm_dequeue_by_polling(struct acpm_chan *achan,
|
||||
const struct acpm_xfer *xfer)
|
||||
{
|
||||
struct device *dev = achan->acpm->dev;
|
||||
unsigned int cnt_20us = 0;
|
||||
ktime_t timeout;
|
||||
u32 seqnum;
|
||||
int ret;
|
||||
|
||||
seqnum = FIELD_GET(ACPM_PROTOCOL_SEQNUM, xfer->txd[0]);
|
||||
|
||||
timeout = ktime_add_us(ktime_get(), ACPM_POLL_TIMEOUT_US);
|
||||
do {
|
||||
ret = acpm_get_rx(achan, xfer);
|
||||
if (ret)
|
||||
@@ -315,12 +316,11 @@ static int acpm_dequeue_by_polling(struct acpm_chan *achan,
|
||||
return 0;
|
||||
|
||||
/* Determined experimentally. */
|
||||
usleep_range(20, 30);
|
||||
cnt_20us++;
|
||||
} while (cnt_20us < ACPM_POLL_TIMEOUT);
|
||||
udelay(20);
|
||||
} while (ktime_before(ktime_get(), timeout));
|
||||
|
||||
dev_err(dev, "Timeout! ch:%u s:%u bitmap:%lx, cnt_20us = %d.\n",
|
||||
achan->id, seqnum, achan->bitmap_seqnum[0], cnt_20us);
|
||||
dev_err(dev, "Timeout! ch:%u s:%u bitmap:%lx.\n",
|
||||
achan->id, seqnum, achan->bitmap_seqnum[0]);
|
||||
|
||||
return -ETIME;
|
||||
}
|
||||
@@ -649,7 +649,7 @@ static int acpm_probe(struct platform_device *pdev)
|
||||
|
||||
platform_set_drvdata(pdev, acpm);
|
||||
|
||||
return 0;
|
||||
return devm_of_platform_populate(dev);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -677,43 +677,30 @@ static void devm_acpm_release(struct device *dev, void *res)
|
||||
}
|
||||
|
||||
/**
|
||||
* acpm_get_by_phandle() - get the ACPM handle using DT phandle.
|
||||
* @dev: device pointer requesting ACPM handle.
|
||||
* @property: property name containing phandle on ACPM node.
|
||||
* acpm_get_by_node() - get the ACPM handle using node pointer.
|
||||
* @dev: device pointer requesting ACPM handle.
|
||||
* @np: ACPM device tree node.
|
||||
*
|
||||
* Return: pointer to handle on success, ERR_PTR(-errno) otherwise.
|
||||
*/
|
||||
static const struct acpm_handle *acpm_get_by_phandle(struct device *dev,
|
||||
const char *property)
|
||||
static const struct acpm_handle *acpm_get_by_node(struct device *dev,
|
||||
struct device_node *np)
|
||||
{
|
||||
struct platform_device *pdev;
|
||||
struct device_node *acpm_np;
|
||||
struct device_link *link;
|
||||
struct acpm_info *acpm;
|
||||
|
||||
acpm_np = of_parse_phandle(dev->of_node, property, 0);
|
||||
if (!acpm_np)
|
||||
return ERR_PTR(-ENODEV);
|
||||
|
||||
pdev = of_find_device_by_node(acpm_np);
|
||||
if (!pdev) {
|
||||
dev_err(dev, "Cannot find device node %s\n", acpm_np->name);
|
||||
of_node_put(acpm_np);
|
||||
pdev = of_find_device_by_node(np);
|
||||
if (!pdev)
|
||||
return ERR_PTR(-EPROBE_DEFER);
|
||||
}
|
||||
|
||||
of_node_put(acpm_np);
|
||||
|
||||
acpm = platform_get_drvdata(pdev);
|
||||
if (!acpm) {
|
||||
dev_err(dev, "Cannot get drvdata from %s\n",
|
||||
dev_name(&pdev->dev));
|
||||
platform_device_put(pdev);
|
||||
return ERR_PTR(-EPROBE_DEFER);
|
||||
}
|
||||
|
||||
if (!try_module_get(pdev->dev.driver->owner)) {
|
||||
dev_err(dev, "Cannot get module reference.\n");
|
||||
platform_device_put(pdev);
|
||||
return ERR_PTR(-EPROBE_DEFER);
|
||||
}
|
||||
@@ -732,14 +719,14 @@ static const struct acpm_handle *acpm_get_by_phandle(struct device *dev,
|
||||
}
|
||||
|
||||
/**
|
||||
* devm_acpm_get_by_phandle() - managed get handle using phandle.
|
||||
* @dev: device pointer requesting ACPM handle.
|
||||
* @property: property name containing phandle on ACPM node.
|
||||
* devm_acpm_get_by_node() - managed get handle using node pointer.
|
||||
* @dev: device pointer requesting ACPM handle.
|
||||
* @np: ACPM device tree node.
|
||||
*
|
||||
* Return: pointer to handle on success, ERR_PTR(-errno) otherwise.
|
||||
*/
|
||||
const struct acpm_handle *devm_acpm_get_by_phandle(struct device *dev,
|
||||
const char *property)
|
||||
const struct acpm_handle *devm_acpm_get_by_node(struct device *dev,
|
||||
struct device_node *np)
|
||||
{
|
||||
const struct acpm_handle **ptr, *handle;
|
||||
|
||||
@@ -747,7 +734,7 @@ const struct acpm_handle *devm_acpm_get_by_phandle(struct device *dev,
|
||||
if (!ptr)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
handle = acpm_get_by_phandle(dev, property);
|
||||
handle = acpm_get_by_node(dev, np);
|
||||
if (!IS_ERR(handle)) {
|
||||
*ptr = handle;
|
||||
devres_add(dev, ptr);
|
||||
@@ -757,6 +744,7 @@ const struct acpm_handle *devm_acpm_get_by_phandle(struct device *dev,
|
||||
|
||||
return handle;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(devm_acpm_get_by_node);
|
||||
|
||||
static const struct acpm_match_data acpm_gs101 = {
|
||||
.initdata_base = ACPM_GS101_INITDATA_BASE,
|
||||
|
||||
Reference in New Issue
Block a user