[PATCH v3 3/5] soc: add polarfire soc system controller
Jonathan Neuschäfer
j.neuschaefer at gmx.net
Tue Jan 5 17:14:02 EST 2021
Hello,
On Wed, Dec 23, 2020 at 04:33:10PM +0000, conor.dooley at microchip.com wrote:
> From: Conor Dooley <conor.dooley at microchip.com>
>
> This driver provides an interface for other drivers to access the
> functions of the system controller on the Microchip PolarFire SoC.
>
> Signed-off-by: Conor Dooley <conor.dooley at microchip.com>
> ---
[...]
> --- a/drivers/soc/Makefile
> +++ b/drivers/soc/Makefile
> @@ -14,6 +14,7 @@ obj-$(CONFIG_ARCH_GEMINI) += gemini/
> obj-y += imx/
> obj-$(CONFIG_ARCH_IXP4XX) += ixp4xx/
> obj-$(CONFIG_SOC_XWAY) += lantiq/
> +obj-$(CONFIG_SOC_MICROCHIP_POLARFIRE) += microchip/
CONFIG_SOC_MICROCHIP_POLARFIRE is more specific than a flag guarding
the microchip directory should (intuitively) be (because there may be
Microchip SoCs that are not Microchip PolarFire). Fortunately, since
mpfs-sys-controller.o itself is guarded by CONFIG_POLARFIRE_SOC_SYS_CTRL,
using "obj-y += microchip/" here should work without a problem.
[...]
> +int mpfs_blocking_transaction(struct mpfs_sys_controller *mpfs_client, void *msg,
> + void *response, u16 response_size_bytes)
> +{
> + int ret;
> +
> + mpfs_client->response = response;
> + mpfs_client->response_size_bytes = response_size_bytes;
> +
> + mutex_lock_interruptible(&transaction_lock);
> +
> + reinit_completion(&mpfs_client->c);
> +
> + ret = mbox_send_message(mpfs_client->chan, msg);
> + if (ret >= 0) {
> + if (wait_for_completion_timeout(&mpfs_client->c, HZ)) {
> + ret = 0;
> + } else {
> + ret = -ETIMEDOUT;
> + dev_warn(mpfs_client->client.dev, "MPFS sys controller transaction timeout");
\n is missing
> + }
> + } else {
> + dev_err(mpfs_client->client.dev,
> + "mpfs sys controller transaction returned %d\r\n", ret);
\r\n is quite unusual and probably unnecessary in printk-style
functions, \n is enough.
> + }
> +
> + mutex_unlock(&transaction_lock);
> +
> + return ret;
> +}
> +EXPORT_SYMBOL(mpfs_blocking_transaction);
Best regards,
Jonathan Neuschäfer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-riscv/attachments/20210105/78e05341/attachment.sig>
More information about the linux-riscv
mailing list