[PATCH 2/4] remoteproc: imx_rproc: Populate devices under "rpmsg" subnode

Shenwei Wang shenwei.wang at nxp.com
Thu Aug 21 11:51:12 PDT 2025



> -----Original Message-----
> From: Peng Fan (OSS) <peng.fan at oss.nxp.com>
> Sent: Thursday, August 21, 2025 6:03 AM
> To: Shenwei Wang <shenwei.wang at nxp.com>
> Cc: Bjorn Andersson <andersson at kernel.org>; Mathieu Poirier
> <mathieu.poirier at linaro.org>; Rob Herring <robh at kernel.org>; Krzysztof
> Kozlowski <krzk+dt at kernel.org>; Conor Dooley <conor+dt at kernel.org>; Shawn
> Guo <shawnguo at kernel.org>; Sascha Hauer <s.hauer at pengutronix.de>; Linus
> Walleij <linus.walleij at linaro.org>; Bartosz Golaszewski <brgl at bgdev.pl>;
> Pengutronix Kernel Team <kernel at pengutronix.de>; Fabio Estevam
> <festevam at gmail.com>; Peng Fan <peng.fan at nxp.com>; linux-
> remoteproc at vger.kernel.org; devicetree at vger.kernel.org; imx at lists.linux.dev;
> linux-arm-kernel at lists.infradead.org; linux-kernel at vger.kernel.org; dl-linux-imx
> <linux-imx at nxp.com>
> Subject: Re: [PATCH 2/4] remoteproc: imx_rproc: Populate devices under
> "rpmsg" subnode
> >
> > #include "imx_rproc.h"
> >@@ -1084,6 +1088,126 @@ static int imx_rproc_sys_off_handler(struct
> sys_off_data *data)
> > 	return NOTIFY_DONE;
> > }
> >
> 
> Just wonder could the changes be moved to drivers/rpmsg?

Since the DTS node is under imx_rproc, the most straightforward approach is to implement the 
feature here. Moving the implementation to drivers/rpmsg would introduce additional complexity
and might be less direct.

Thanks,
Shenwei

> 
> >+struct imx_rpmsg_driver {
> >+	struct rpmsg_driver rpdrv;
> >+	void *driver_data;
> >+};
> >+
> >+	i = drvdata->map_idx;
> >+	if (i >= ARRAY_SIZE(channel_device_map))
> >+		return -ENODEV;
> >+
> >+	auxdata = devm_kzalloc(dev, sizeof(*auxdata)*2, GFP_KERNEL);
> >+	if (!auxdata)
> >+		return -ENOMEM;
> >+
> >+	u8 major;
> >+	u8 minor;
> >+	u8 type;
> >+	u8 cmd;
> >+	u8 reserved[5];
> >+} __packed;
> 
> A comment should be added to describe each member.
> 
> Regards,
> Peng



More information about the linux-arm-kernel mailing list