[PATCH v2 1/5] mbox: add polarfire soc system controller mailbox

Conor.Dooley at microchip.com Conor.Dooley at microchip.com
Tue Dec 1 10:54:30 EST 2020


On 01/12/2020 11:55, Damien Le Moal wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> On 2020/12/01 20:02, conor.dooley at microchip.com wrote:
>> From: Conor Dooley <conor.dooley at microchip.com>
>>
>> This driver adds support for the single mailbox channel of the MSS
>> system controller on the Microchip PolarFire SoC.
>>
>> Signed-off-by: Conor Dooley <conor.dooley at microchip.com>
>> ---
>>  drivers/mailbox/Kconfig        |  12 ++
>>  drivers/mailbox/Makefile       |   2 +
>>  drivers/mailbox/mailbox-mpfs.c | 285 +++++++++++++++++++++++++++++++++
>>  include/soc/microchip/mpfs.h   |  51 ++++++
>>  4 files changed, 350 insertions(+)
>>  create mode 100644 drivers/mailbox/mailbox-mpfs.c
>>  create mode 100644 include/soc/microchip/mpfs.h
(trimmed)
>> diff --git a/drivers/mailbox/mailbox-mpfs.c b/drivers/mailbox/mailbox-mpfs.c
>> new file mode 100644
>> index 000000000000..e1ecf3081312
>> --- /dev/null
>> +++ b/drivers/mailbox/mailbox-mpfs.c
>> @@ -0,0 +1,285 @@
>> +// SPDX-License-Identifier: GPL-2.0
>> +/*
>> + * Microchip MPFS system controller/mailbox controller driver
>> + *
>> + * Copyright (c) 2020 Microchip Corporation. All rights reserved.
>> + *
>> + * Author: Conor Dooley <conor.dooley at microchip.com>
>> + *
>> + */
>> +
>> +#include <linux/io.h>
>> +#include <linux/err.h>
>> +#include <linux/init.h>
>> +#include <linux/module.h>
>> +#include <linux/kernel.h>
>> +#include <linux/interrupt.h>
>> +#include <linux/platform_device.h>
>> +#include <linux/mailbox_controller.h>
>> +#include <soc/microchip/mpfs.h>
>> +
>> +#define SERVICES_CR_OFFSET           0x50u
>> +#define SERVICES_SR_OFFSET           0x54u
>> +#define MAILBOX_REG_OFFSET           0x800u
>> +#define MSS_SYS_BUSY                 -EBUSY
>> +#define MSS_SYS_PARAM_ERR            -EINVAL
>> +#define MSS_SYS_MAILBOX_DATA_OFFSET  0u
>> +#define SCB_MASK_WIDTH                       16u
> Value identation seems off here. Aligning it would be nice.

Not really sure why thats off, its off in my mail client too but it's aligned when I apply the patch from the original text file, or if I git am the emailed patch.

I'll address the other comments in the next version.

> --
> Damien Le Moal
> Western Digital Research




More information about the linux-riscv mailing list