linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: <Conor.Dooley@microchip.com>
To: <Damien.LeMoal@wdc.com>, <robh+dt@kernel.org>,
	<jassisinghbrar@gmail.com>,  <aou@eecs.berkeley.edu>,
	<paul.walmsley@sifive.com>, <palmer@dabbelt.com>,
	 <devicetree@vger.kernel.org>, <linux-riscv@lists.infradead.org>
Cc: Cyril.Jean@microchip.com, david.abdurachmanov@gmail.com,
	Daire.McNamara@microchip.com, Anup.Patel@wdc.com,
	Atish.Patra@wdc.com, Lewis.Hanly@microchip.com
Subject: Re: [PATCH 1/6] mbox: add polarfire soc system controller mailbox
Date: Mon, 30 Nov 2020 13:23:06 +0000	[thread overview]
Message-ID: <ffa091eb-0963-f2b5-de9a-c76767d6776c@microchip.com> (raw)
In-Reply-To: <BL0PR04MB6514AA9B313828842F7EF0D8E7FF0@BL0PR04MB6514.namprd04.prod.outlook.com>

On 20/11/2020 00:05, Damien Le Moal wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> On 2020/11/20 2:05, conor.dooley@microchip.com wrote:
>> From: Conor Dooley <conor.dooley@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@microchip.com>
>> ---
>>  drivers/mailbox/Kconfig        |  12 ++
>>  drivers/mailbox/Makefile       |   2 +
>>  drivers/mailbox/mailbox-mpfs.c | 296 +++++++++++++++++++++++++++++++++
>>  3 files changed, 310 insertions(+)
>>  create mode 100644 drivers/mailbox/mailbox-mpfs.c
>>
>> diff --git a/drivers/mailbox/Kconfig b/drivers/mailbox/Kconfig
>> index 05b1009e2820..4881a519683a 100644
>> --- a/drivers/mailbox/Kconfig
>> +++ b/drivers/mailbox/Kconfig
>> @@ -153,6 +153,18 @@ config MAILBOX_TEST
>>         Test client to help with testing new Controller driver
>>         implementations.
>>
>> +config MPFS_MBOX
>> +     tristate "MPFS Mailbox"
>> +     depends on HAS_IOMEM
> Shouldn't this dependency be on SOC_MICROCHIP_POLARFIRE ?
Not entirely sure what you mean by this one. You want the HAS_IOMEM to be selected by SOC_MICROCHIP_POLARFIRE ?
>
>> +     depends on SOC_MICROCHIP_POLARFIRE
>> +     help
>> +       This driver adds support for the Polarfire SoC mailbox controller.
>> +
>> +       To compile this driver as a module, choose M here. the
>> +       module will be called mailbox-mpfs.
>> +
>> +       If unsure, say Y.
>> +
>>  config QCOM_APCS_IPC
>>       tristate "Qualcomm APCS IPC driver"
>>       depends on ARCH_QCOM || COMPILE_TEST
>> diff --git a/drivers/mailbox/Makefile b/drivers/mailbox/Makefile
>> index 2e06e02b2e03..63f49b5bcc43 100644
>> --- a/drivers/mailbox/Makefile
>> +++ b/drivers/mailbox/Makefile
>> @@ -39,6 +39,8 @@ obj-$(CONFIG_BCM_PDC_MBOX)  += bcm-pdc-mailbox.o
>>
>>  obj-$(CONFIG_BCM_FLEXRM_MBOX)        += bcm-flexrm-mailbox.o
>>
>> +obj-$(CONFIG_MPFS_MBOX)      += mailbox-mpfs.o
>> +
>>  obj-$(CONFIG_QCOM_APCS_IPC)  += qcom-apcs-ipc-mailbox.o
>>
>>  obj-$(CONFIG_TEGRA_HSP_MBOX) += tegra-hsp.o
>> diff --git a/drivers/mailbox/mailbox-mpfs.c b/drivers/mailbox/mailbox-mpfs.c
>> new file mode 100644
>> index 000000000000..686ccd3317f9
>> --- /dev/null
>> +++ b/drivers/mailbox/mailbox-mpfs.c
>> @@ -0,0 +1,296 @@
>> +// 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@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_SUCCESS                              0u
trimmed, will address the rest in V2
> -- 
> Damien Le Moal
> Western Digital Research

 

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2020-11-30 13:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-19 17:04 [PATCH 1/6] mbox: add polarfire soc system controller mailbox conor.dooley
2020-11-20  0:05 ` Damien Le Moal
2020-11-30 13:23   ` Conor.Dooley [this message]
2020-11-30 21:50     ` Damien Le Moal
2020-12-01 10:11       ` Ben Dooks

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ffa091eb-0963-f2b5-de9a-c76767d6776c@microchip.com \
    --to=conor.dooley@microchip.com \
    --cc=Anup.Patel@wdc.com \
    --cc=Atish.Patra@wdc.com \
    --cc=Cyril.Jean@microchip.com \
    --cc=Daire.McNamara@microchip.com \
    --cc=Damien.LeMoal@wdc.com \
    --cc=Lewis.Hanly@microchip.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=david.abdurachmanov@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jassisinghbrar@gmail.com \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).