Commit c16e5c94 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'arm-fixes-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull SoC fixes from Arnd Bergmann:
 "Most of the fixes this time are for platform specific drivers,
  addressing issues found through build testing on freescale, ep93xx,
  starfive, and npcm platforms, as as well as the ffa firmware.

  The fixes for the scmi firmware driver address compatibility problems
  found on broadcom machines.

  There are only two devicetree fixes, addressing incorrect in
  configuration on broadcom and marvell machines.

  The changes to the Documentation and MAINTAINERS files are for
  clarification only"

* tag 'arm-fixes-6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc:
  firmware: arm_ffa: Avoid string-fortify warning caused by memcpy()
  firmware: arm_scmi: Queue in scmi layer for mailbox implementation
  firmware: arm_ffa: Avoid string-fortify warning in export_uuid()
  firmware: arm_scmi: Give SMC transport precedence over mailbox
  firmware: arm_scmi: Fix the double free in scmi_debugfs_common_setup()
  Documentation/process: maintainer-soc: clarify submitting patches
  dmaengine: cirrus: check that output may be truncated
  dmaengine: cirrus: ERR_CAST() ioremap error
  MAINTAINERS: use the canonical soc mailing list address and mark it as L:
  ARM: dts: bcm2837-rpi-cm3-io3: Fix HDMI hpd-gpio pin
  arm64: dts: marvell: cn9130-sr-som: fix cp0 mdio pin numbers
  soc: fsl: cpm1: qmc: Fix unused data compilation warning
  soc: fsl: cpm1: qmc: Do not use IS_ERR_VALUE() on error pointers
  reset: starfive: jh71x0: Fix accessing the empty member on JH7110 SoC
  reset: npcm: convert comma to semicolon
parents 5c94bdab 1b59d6c1
...@@ -30,10 +30,13 @@ tree as a dedicated branch covering multiple subsystems. ...@@ -30,10 +30,13 @@ tree as a dedicated branch covering multiple subsystems.
The main SoC tree is housed on git.kernel.org: The main SoC tree is housed on git.kernel.org:
https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git/ https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git/
Maintainers
-----------
Clearly this is quite a wide range of topics, which no one person, or even Clearly this is quite a wide range of topics, which no one person, or even
small group of people are capable of maintaining. Instead, the SoC subsystem small group of people are capable of maintaining. Instead, the SoC subsystem
is comprised of many submaintainers, each taking care of individual platforms is comprised of many submaintainers (platform maintainers), each taking care of
and driver subdirectories. individual platforms and driver subdirectories.
In this regard, "platform" usually refers to a series of SoCs from a given In this regard, "platform" usually refers to a series of SoCs from a given
vendor, for example, Nvidia's series of Tegra SoCs. Many submaintainers operate vendor, for example, Nvidia's series of Tegra SoCs. Many submaintainers operate
on a vendor level, responsible for multiple product lines. For several reasons, on a vendor level, responsible for multiple product lines. For several reasons,
...@@ -43,14 +46,43 @@ MAINTAINERS file. ...@@ -43,14 +46,43 @@ MAINTAINERS file.
Most of these submaintainers have their own trees where they stage patches, Most of these submaintainers have their own trees where they stage patches,
sending pull requests to the main SoC tree. These trees are usually, but not sending pull requests to the main SoC tree. These trees are usually, but not
always, listed in MAINTAINERS. The main SoC maintainers can be reached via the always, listed in MAINTAINERS.
alias soc@kernel.org if there is no platform-specific maintainer, or if they
are unresponsive.
What the SoC tree is not, however, is a location for architecture-specific code What the SoC tree is not, however, is a location for architecture-specific code
changes. Each architecture has its own maintainers that are responsible for changes. Each architecture has its own maintainers that are responsible for
architectural details, CPU errata and the like. architectural details, CPU errata and the like.
Submitting Patches for Given SoC
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All typical platform related patches should be sent via SoC submaintainers
(platform-specific maintainers). This includes also changes to per-platform or
shared defconfigs (scripts/get_maintainer.pl might not provide correct
addresses in such case).
Submitting Patches to the Main SoC Maintainers
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The main SoC maintainers can be reached via the alias soc@kernel.org only in
following cases:
1. There are no platform-specific maintainers.
2. Platform-specific maintainers are unresponsive.
3. Introducing a completely new SoC platform. Such new SoC work should be sent
first to common mailing lists, pointed out by scripts/get_maintainer.pl, for
community review. After positive community review, work should be sent to
soc@kernel.org in one patchset containing new arch/foo/Kconfig entry, DTS
files, MAINTAINERS file entry and optionally initial drivers with their
Devicetree bindings. The MAINTAINERS file entry should list new
platform-specific maintainers, who are going to be responsible for handling
patches for the platform from now on.
Note that the soc@kernel.org is usually not the place to discuss the patches,
thus work sent to this address should be already considered as acceptable by
the community.
Information for (new) Submaintainers Information for (new) Submaintainers
------------------------------------ ------------------------------------
......
...@@ -1761,8 +1761,8 @@ F: include/uapi/linux/if_arcnet.h ...@@ -1761,8 +1761,8 @@ F: include/uapi/linux/if_arcnet.h
ARM AND ARM64 SoC SUB-ARCHITECTURES (COMMON PARTS) ARM AND ARM64 SoC SUB-ARCHITECTURES (COMMON PARTS)
M: Arnd Bergmann <arnd@arndb.de> M: Arnd Bergmann <arnd@arndb.de>
M: Olof Johansson <olof@lixom.net> M: Olof Johansson <olof@lixom.net>
M: soc@kernel.org
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
L: soc@lists.linux.dev
S: Maintained S: Maintained
P: Documentation/process/maintainer-soc.rst P: Documentation/process/maintainer-soc.rst
C: irc://irc.libera.chat/armlinux C: irc://irc.libera.chat/armlinux
...@@ -21778,8 +21778,8 @@ F: drivers/accessibility/speakup/ ...@@ -21778,8 +21778,8 @@ F: drivers/accessibility/speakup/
SPEAR PLATFORM/CLOCK/PINCTRL SUPPORT SPEAR PLATFORM/CLOCK/PINCTRL SUPPORT
M: Viresh Kumar <vireshk@kernel.org> M: Viresh Kumar <vireshk@kernel.org>
M: Shiraz Hashim <shiraz.linux.kernel@gmail.com> M: Shiraz Hashim <shiraz.linux.kernel@gmail.com>
M: soc@kernel.org
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
L: soc@lists.linux.dev
S: Maintained S: Maintained
W: http://www.st.com/spear W: http://www.st.com/spear
F: arch/arm/boot/dts/st/spear* F: arch/arm/boot/dts/st/spear*
......
...@@ -77,7 +77,7 @@ &gpio { ...@@ -77,7 +77,7 @@ &gpio {
}; };
&hdmi { &hdmi {
hpd-gpios = <&expgpio 1 GPIO_ACTIVE_LOW>; hpd-gpios = <&expgpio 0 GPIO_ACTIVE_LOW>;
power-domains = <&power RPI_POWER_DOMAIN_HDMI>; power-domains = <&power RPI_POWER_DOMAIN_HDMI>;
status = "okay"; status = "okay";
}; };
......
...@@ -136,7 +136,7 @@ cp0_i2c0_pins: cp0-i2c0-pins { ...@@ -136,7 +136,7 @@ cp0_i2c0_pins: cp0-i2c0-pins {
}; };
cp0_mdio_pins: cp0-mdio-pins { cp0_mdio_pins: cp0-mdio-pins {
marvell,pins = "mpp40", "mpp41"; marvell,pins = "mpp0", "mpp1";
marvell,function = "ge"; marvell,function = "ge";
}; };
......
...@@ -1391,11 +1391,12 @@ static struct ep93xx_dma_engine *ep93xx_dma_of_probe(struct platform_device *pde ...@@ -1391,11 +1391,12 @@ static struct ep93xx_dma_engine *ep93xx_dma_of_probe(struct platform_device *pde
INIT_LIST_HEAD(&dma_dev->channels); INIT_LIST_HEAD(&dma_dev->channels);
for (i = 0; i < edma->num_channels; i++) { for (i = 0; i < edma->num_channels; i++) {
struct ep93xx_dma_chan *edmac = &edma->channels[i]; struct ep93xx_dma_chan *edmac = &edma->channels[i];
int len;
edmac->chan.device = dma_dev; edmac->chan.device = dma_dev;
edmac->regs = devm_platform_ioremap_resource(pdev, i); edmac->regs = devm_platform_ioremap_resource(pdev, i);
if (IS_ERR(edmac->regs)) if (IS_ERR(edmac->regs))
return edmac->regs; return ERR_CAST(edmac->regs);
edmac->irq = fwnode_irq_get(dev_fwnode(dev), i); edmac->irq = fwnode_irq_get(dev_fwnode(dev), i);
if (edmac->irq < 0) if (edmac->irq < 0)
...@@ -1404,9 +1405,11 @@ static struct ep93xx_dma_engine *ep93xx_dma_of_probe(struct platform_device *pde ...@@ -1404,9 +1405,11 @@ static struct ep93xx_dma_engine *ep93xx_dma_of_probe(struct platform_device *pde
edmac->edma = edma; edmac->edma = edma;
if (edma->m2m) if (edma->m2m)
snprintf(dma_clk_name, sizeof(dma_clk_name), "m2m%u", i); len = snprintf(dma_clk_name, sizeof(dma_clk_name), "m2m%u", i);
else else
snprintf(dma_clk_name, sizeof(dma_clk_name), "m2p%u", i); len = snprintf(dma_clk_name, sizeof(dma_clk_name), "m2p%u", i);
if (len >= sizeof(dma_clk_name))
return ERR_PTR(-ENOBUFS);
edmac->clk = devm_clk_get(dev, dma_clk_name); edmac->clk = devm_clk_get(dev, dma_clk_name);
if (IS_ERR(edmac->clk)) { if (IS_ERR(edmac->clk)) {
......
...@@ -481,11 +481,16 @@ static int ffa_msg_send_direct_req2(u16 src_id, u16 dst_id, const uuid_t *uuid, ...@@ -481,11 +481,16 @@ static int ffa_msg_send_direct_req2(u16 src_id, u16 dst_id, const uuid_t *uuid,
struct ffa_send_direct_data2 *data) struct ffa_send_direct_data2 *data)
{ {
u32 src_dst_ids = PACK_TARGET_INFO(src_id, dst_id); u32 src_dst_ids = PACK_TARGET_INFO(src_id, dst_id);
union {
uuid_t uuid;
__le64 regs[2];
} uuid_regs = { .uuid = *uuid };
ffa_value_t ret, args = { ffa_value_t ret, args = {
.a0 = FFA_MSG_SEND_DIRECT_REQ2, .a1 = src_dst_ids, .a0 = FFA_MSG_SEND_DIRECT_REQ2,
.a1 = src_dst_ids,
.a2 = le64_to_cpu(uuid_regs.regs[0]),
.a3 = le64_to_cpu(uuid_regs.regs[1]),
}; };
export_uuid((u8 *)&args.a2, uuid);
memcpy((void *)&args + offsetof(ffa_value_t, a4), data, sizeof(*data)); memcpy((void *)&args + offsetof(ffa_value_t, a4), data, sizeof(*data));
invoke_ffa_fn(args, &ret); invoke_ffa_fn(args, &ret);
...@@ -496,7 +501,7 @@ static int ffa_msg_send_direct_req2(u16 src_id, u16 dst_id, const uuid_t *uuid, ...@@ -496,7 +501,7 @@ static int ffa_msg_send_direct_req2(u16 src_id, u16 dst_id, const uuid_t *uuid,
return ffa_to_linux_errno((int)ret.a2); return ffa_to_linux_errno((int)ret.a2);
if (ret.a0 == FFA_MSG_SEND_DIRECT_RESP2) { if (ret.a0 == FFA_MSG_SEND_DIRECT_RESP2) {
memcpy(data, &ret.a4, sizeof(*data)); memcpy(data, (void *)&ret + offsetof(ffa_value_t, a4), sizeof(*data));
return 0; return 0;
} }
......
...@@ -2976,10 +2976,8 @@ static struct scmi_debug_info *scmi_debugfs_common_setup(struct scmi_info *info) ...@@ -2976,10 +2976,8 @@ static struct scmi_debug_info *scmi_debugfs_common_setup(struct scmi_info *info)
dbg->top_dentry = top_dentry; dbg->top_dentry = top_dentry;
if (devm_add_action_or_reset(info->dev, if (devm_add_action_or_reset(info->dev,
scmi_debugfs_common_cleanup, dbg)) { scmi_debugfs_common_cleanup, dbg))
scmi_debugfs_common_cleanup(dbg);
return NULL; return NULL;
}
return dbg; return dbg;
} }
......
# SPDX-License-Identifier: GPL-2.0-only # SPDX-License-Identifier: GPL-2.0-only
scmi_transport_mailbox-objs := mailbox.o # Keep before scmi_transport_mailbox.o to allow precedence
obj-$(CONFIG_ARM_SCMI_TRANSPORT_MAILBOX) += scmi_transport_mailbox.o # while matching the compatible.
scmi_transport_smc-objs := smc.o scmi_transport_smc-objs := smc.o
obj-$(CONFIG_ARM_SCMI_TRANSPORT_SMC) += scmi_transport_smc.o obj-$(CONFIG_ARM_SCMI_TRANSPORT_SMC) += scmi_transport_smc.o
scmi_transport_mailbox-objs := mailbox.o
obj-$(CONFIG_ARM_SCMI_TRANSPORT_MAILBOX) += scmi_transport_mailbox.o
scmi_transport_optee-objs := optee.o scmi_transport_optee-objs := optee.o
obj-$(CONFIG_ARM_SCMI_TRANSPORT_OPTEE) += scmi_transport_optee.o obj-$(CONFIG_ARM_SCMI_TRANSPORT_OPTEE) += scmi_transport_optee.o
scmi_transport_virtio-objs := virtio.o scmi_transport_virtio-objs := virtio.o
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
* @chan_platform_receiver: Optional Platform Receiver mailbox unidirectional channel * @chan_platform_receiver: Optional Platform Receiver mailbox unidirectional channel
* @cinfo: SCMI channel info * @cinfo: SCMI channel info
* @shmem: Transmit/Receive shared memory area * @shmem: Transmit/Receive shared memory area
* @chan_lock: Lock that prevents multiple xfers from being queued
*/ */
struct scmi_mailbox { struct scmi_mailbox {
struct mbox_client cl; struct mbox_client cl;
...@@ -33,6 +34,7 @@ struct scmi_mailbox { ...@@ -33,6 +34,7 @@ struct scmi_mailbox {
struct mbox_chan *chan_platform_receiver; struct mbox_chan *chan_platform_receiver;
struct scmi_chan_info *cinfo; struct scmi_chan_info *cinfo;
struct scmi_shared_mem __iomem *shmem; struct scmi_shared_mem __iomem *shmem;
struct mutex chan_lock;
}; };
#define client_to_scmi_mailbox(c) container_of(c, struct scmi_mailbox, cl) #define client_to_scmi_mailbox(c) container_of(c, struct scmi_mailbox, cl)
...@@ -238,6 +240,7 @@ static int mailbox_chan_setup(struct scmi_chan_info *cinfo, struct device *dev, ...@@ -238,6 +240,7 @@ static int mailbox_chan_setup(struct scmi_chan_info *cinfo, struct device *dev,
cinfo->transport_info = smbox; cinfo->transport_info = smbox;
smbox->cinfo = cinfo; smbox->cinfo = cinfo;
mutex_init(&smbox->chan_lock);
return 0; return 0;
} }
...@@ -267,13 +270,23 @@ static int mailbox_send_message(struct scmi_chan_info *cinfo, ...@@ -267,13 +270,23 @@ static int mailbox_send_message(struct scmi_chan_info *cinfo,
struct scmi_mailbox *smbox = cinfo->transport_info; struct scmi_mailbox *smbox = cinfo->transport_info;
int ret; int ret;
ret = mbox_send_message(smbox->chan, xfer); /*
* The mailbox layer has its own queue. However the mailbox queue
* confuses the per message SCMI timeouts since the clock starts when
* the message is submitted into the mailbox queue. So when multiple
* messages are queued up the clock starts on all messages instead of
* only the one inflight.
*/
mutex_lock(&smbox->chan_lock);
/* mbox_send_message returns non-negative value on success, so reset */ ret = mbox_send_message(smbox->chan, xfer);
if (ret > 0) /* mbox_send_message returns non-negative value on success */
ret = 0; if (ret < 0) {
mutex_unlock(&smbox->chan_lock);
return ret;
}
return ret; return 0;
} }
static void mailbox_mark_txdone(struct scmi_chan_info *cinfo, int ret, static void mailbox_mark_txdone(struct scmi_chan_info *cinfo, int ret,
...@@ -281,13 +294,10 @@ static void mailbox_mark_txdone(struct scmi_chan_info *cinfo, int ret, ...@@ -281,13 +294,10 @@ static void mailbox_mark_txdone(struct scmi_chan_info *cinfo, int ret,
{ {
struct scmi_mailbox *smbox = cinfo->transport_info; struct scmi_mailbox *smbox = cinfo->transport_info;
/*
* NOTE: we might prefer not to need the mailbox ticker to manage the
* transfer queueing since the protocol layer queues things by itself.
* Unfortunately, we have to kick the mailbox framework after we have
* received our message.
*/
mbox_client_txdone(smbox->chan, ret); mbox_client_txdone(smbox->chan, ret);
/* Release channel */
mutex_unlock(&smbox->chan_lock);
} }
static void mailbox_fetch_response(struct scmi_chan_info *cinfo, static void mailbox_fetch_response(struct scmi_chan_info *cinfo,
......
...@@ -405,8 +405,8 @@ static int npcm_rc_probe(struct platform_device *pdev) ...@@ -405,8 +405,8 @@ static int npcm_rc_probe(struct platform_device *pdev)
if (!of_property_read_u32(pdev->dev.of_node, "nuvoton,sw-reset-number", if (!of_property_read_u32(pdev->dev.of_node, "nuvoton,sw-reset-number",
&rc->sw_reset_number)) { &rc->sw_reset_number)) {
if (rc->sw_reset_number && rc->sw_reset_number < 5) { if (rc->sw_reset_number && rc->sw_reset_number < 5) {
rc->restart_nb.priority = 192, rc->restart_nb.priority = 192;
rc->restart_nb.notifier_call = npcm_rc_restart, rc->restart_nb.notifier_call = npcm_rc_restart;
ret = register_restart_handler(&rc->restart_nb); ret = register_restart_handler(&rc->restart_nb);
if (ret) if (ret)
dev_warn(&pdev->dev, "failed to register restart handler\n"); dev_warn(&pdev->dev, "failed to register restart handler\n");
......
...@@ -94,6 +94,9 @@ static int jh71x0_reset_status(struct reset_controller_dev *rcdev, ...@@ -94,6 +94,9 @@ static int jh71x0_reset_status(struct reset_controller_dev *rcdev,
void __iomem *reg_status = data->status + offset * sizeof(u32); void __iomem *reg_status = data->status + offset * sizeof(u32);
u32 value = readl(reg_status); u32 value = readl(reg_status);
if (!data->asserted)
return !(value & mask);
return !((value ^ data->asserted[offset]) & mask); return !((value ^ data->asserted[offset]) & mask);
} }
......
...@@ -1761,10 +1761,9 @@ static int qmc_qe_init_resources(struct qmc *qmc, struct platform_device *pdev) ...@@ -1761,10 +1761,9 @@ static int qmc_qe_init_resources(struct qmc *qmc, struct platform_device *pdev)
*/ */
info = devm_qe_muram_alloc(qmc->dev, UCC_SLOW_PRAM_SIZE + 2 * 64, info = devm_qe_muram_alloc(qmc->dev, UCC_SLOW_PRAM_SIZE + 2 * 64,
ALIGNMENT_OF_UCC_SLOW_PRAM); ALIGNMENT_OF_UCC_SLOW_PRAM);
if (IS_ERR_VALUE(info)) { if (info < 0)
dev_err(qmc->dev, "cannot allocate MURAM for PRAM"); return info;
return -ENOMEM;
}
if (!qe_issue_cmd(QE_ASSIGN_PAGE_TO_DEVICE, qmc->qe_subblock, if (!qe_issue_cmd(QE_ASSIGN_PAGE_TO_DEVICE, qmc->qe_subblock,
QE_CR_PROTOCOL_UNSPECIFIED, info)) { QE_CR_PROTOCOL_UNSPECIFIED, info)) {
dev_err(qmc->dev, "QE_ASSIGN_PAGE_TO_DEVICE cmd failed"); dev_err(qmc->dev, "QE_ASSIGN_PAGE_TO_DEVICE cmd failed");
...@@ -2056,7 +2055,7 @@ static void qmc_remove(struct platform_device *pdev) ...@@ -2056,7 +2055,7 @@ static void qmc_remove(struct platform_device *pdev)
qmc_exit_xcc(qmc); qmc_exit_xcc(qmc);
} }
static const struct qmc_data qmc_data_cpm1 = { static const struct qmc_data qmc_data_cpm1 __maybe_unused = {
.version = QMC_CPM1, .version = QMC_CPM1,
.tstate = 0x30000000, .tstate = 0x30000000,
.rstate = 0x31000000, .rstate = 0x31000000,
...@@ -2066,7 +2065,7 @@ static const struct qmc_data qmc_data_cpm1 = { ...@@ -2066,7 +2065,7 @@ static const struct qmc_data qmc_data_cpm1 = {
.rpack = 0x00000000, .rpack = 0x00000000,
}; };
static const struct qmc_data qmc_data_qe = { static const struct qmc_data qmc_data_qe __maybe_unused = {
.version = QMC_QE, .version = QMC_QE,
.tstate = 0x30000000, .tstate = 0x30000000,
.rstate = 0x30000000, .rstate = 0x30000000,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment