Linux Remote Processor Subsystem development
 help / color / mirror / Atom feed
From: Tanmay Shah <tanmays@amd.com>
To: Daniel Kestrel <kestrelseventyfour@gmail.com>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>,
	Mathieu Poirier <mathieu.poirier@linaro.org>,
	Rob Herring <robh+dt@kernel.org>,
	linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 3/3] remoteproc: Add AVM WASP driver
Date: Sun, 30 Oct 2022 10:58:22 -0700	[thread overview]
Message-ID: <0a9e9a6a-71f6-0cff-b7c5-9270273d7747@amd.com> (raw)
In-Reply-To: <20220804210806.4053-4-kestrelseventyfour@gmail.com>

Hello,

Thanks for your patch. Please find my comments below.

On 8/4/22 2:08 PM, Daniel Kestrel wrote:
> CAUTION: This message has originated from an External Source. Please use proper judgment and caution when opening attachments, clicking links, or responding to this email.
>
>
> Some AVM Fritzbox router boards (3390, 3490, 5490, 5491, 7490),
> that are Lantiq XRX200 based, have a memory only ATH79 based
> WASP (Wireless Assistant Support Processor) SoC that has wifi
> cards connected to it. It does not share anything with the
> Lantiq host and has no persistent storage. It has an mdio based
> connection for bringing up a small network boot firmware and is
> connected to the Lantiq GSWIP switch via gigabit ethernet. This
> is used to load an initramfs linux image to it, after the
> network boot firmware was started.
>
> In order to initialize this remote processor we need to:
> - power on the SoC using power gpio
> - reset the SoC using the reset gpio
> - send the network boot firmware using mdio
> - send the linux image using raw ethernet frames
>
> This driver allows to start and stop the WASP SoC.
>
> Signed-off-by: Daniel Kestrel <kestrelseventyfour@gmail.com>
> Tested-by: Timo Dorfner <timo.capa@gmail.com> # tested on Fritzbox 7490
> ---
>   drivers/remoteproc/Kconfig    |   10 +
>   drivers/remoteproc/Makefile   |    1 +
>   drivers/remoteproc/avm_wasp.c | 1051 +++++++++++++++++++++++++++++++++
>   3 files changed, 1062 insertions(+)
>   create mode 100644 drivers/remoteproc/avm_wasp.c
>
> diff --git a/drivers/remoteproc/Kconfig b/drivers/remoteproc/Kconfig
> index 166019786653..a761186c5171 100644
> --- a/drivers/remoteproc/Kconfig
> +++ b/drivers/remoteproc/Kconfig
> @@ -23,6 +23,16 @@ config REMOTEPROC_CDEV
>
>            It's safe to say N if you don't want to use this interface.
>
> +config AVM_WASP_REMOTEPROC
> +       tristate "AVM WASP remoteproc support"
> +       depends on NET_DSA_LANTIQ_GSWIP
> +       help
> +         Say y here to support booting the secondary SoC ATH79 target
> +         called Wireless Assistant Support Processor (WASP) that some
> +         AVM Fritzbox devices (3390, 3490, 5490, 5491, 7490) have built in.
> +
> +         It's safe to say N here.
> +
>   config IMX_REMOTEPROC
>          tristate "i.MX remoteproc support"
>          depends on ARCH_MXC
> diff --git a/drivers/remoteproc/Makefile b/drivers/remoteproc/Makefile
> index 5478c7cb9e07..0ae175c6722f 100644
> --- a/drivers/remoteproc/Makefile
> +++ b/drivers/remoteproc/Makefile
> @@ -11,6 +11,7 @@ remoteproc-y                          += remoteproc_sysfs.o
>   remoteproc-y                           += remoteproc_virtio.o
>   remoteproc-y                           += remoteproc_elf_loader.o
>   obj-$(CONFIG_REMOTEPROC_CDEV)          += remoteproc_cdev.o
> +obj-$(CONFIG_AVM_WASP_REMOTEPROC)      += avm_wasp.o
>   obj-$(CONFIG_IMX_REMOTEPROC)           += imx_rproc.o
>   obj-$(CONFIG_IMX_DSP_REMOTEPROC)       += imx_dsp_rproc.o
>   obj-$(CONFIG_INGENIC_VPU_RPROC)                += ingenic_rproc.o
> diff --git a/drivers/remoteproc/avm_wasp.c b/drivers/remoteproc/avm_wasp.c
> new file mode 100644
> index 000000000000..6eda4db5cf4d
> --- /dev/null
> +++ b/drivers/remoteproc/avm_wasp.c
> @@ -0,0 +1,1051 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * AVM WASP Remote Processor driver
> + *
> + * Copyright (c) 2019-2020 Andreas Böhler
> + * Copyright (c) 2021-2022 Daniel Kestrel
> + *
> + */
> +
> +#include <linux/kernel.h>
> +#include <linux/module.h>
> +#include <linux/of_device.h>
> +#include <linux/of_mdio.h>
> +#include <linux/of_gpio.h>
> +#include <linux/platform_device.h>
> +#include <linux/remoteproc.h>
> +#include <linux/timekeeping.h>
> +#include <net/sock.h>
> +#include <asm-generic/gpio.h>
> +
> +#include "remoteproc_internal.h"
> [...]
> +
> +module_platform_driver(avm_wasp_rproc_driver);
> +
> +MODULE_LICENSE("GPL v2");

Recently I ran into issue where checkpatch.pl script complained about 
keeping MODULE_LICENSE("GPL v2").

In such case, It is completely fine to keep MODULE_LICENSE("GPL") and 
SPDX-License-Identifier: GPL-2.0-only


> +MODULE_DESCRIPTION("AVM WASP remote processor boot driver");
> +MODULE_AUTHOR("Daniel Kestrel <kestrelseventyfour@gmail.com>");
> --
> 2.17.1
>

  parent reply	other threads:[~2022-10-30 17:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-04 21:08 [PATCH v5 0/3] Add support for WASP SoC on AVM router boards Daniel Kestrel
2022-08-04 21:08 ` [PATCH v5 1/3] dt-bindings: vendor-prefixes: Add AVM Daniel Kestrel
2022-08-04 21:08 ` [PATCH v5 2/3] dt-bindings: remoteproc: Add AVM WASP Daniel Kestrel
2022-08-09 19:33   ` Rob Herring
2022-08-04 21:08 ` [PATCH v5 3/3] remoteproc: Add AVM WASP driver Daniel Kestrel
2022-10-25 17:59   ` Mathieu Poirier
2022-10-26 17:54   ` Mathieu Poirier
2022-10-30 17:58   ` Tanmay Shah [this message]
2022-10-24 16:38 ` [PATCH v5 0/3] Add support for WASP SoC on AVM router boards Mathieu Poirier

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=0a9e9a6a-71f6-0cff-b7c5-9270273d7747@amd.com \
    --to=tanmays@amd.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=kestrelseventyfour@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --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