Re: [PATCH v5 3/3] remoteproc: Add AVM WASP driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
Tested-by: Timo Dorfner <timo.capa@xxxxxxxxx> # 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@xxxxxxxxx>");
--
2.17.1




[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux