diff options
author | Mikael Olsson <mikael.olsson@arm.com> | 2023-09-11 14:07:31 +0200 |
---|---|---|
committer | Mikael Olsson <mikael.olsson@arm.com> | 2023-09-15 10:51:16 +0200 |
commit | a45260efce33ecb55a37545212ff9e5da244c4e9 (patch) | |
tree | 5694f7dc8780d9d540eb4aecb0fcce1cf32a32a4 /remoteproc | |
parent | 3875fa7e48e302efc0a8e2f6dbacd9c321a9884d (diff) | |
download | ethos-u-linux-driver-stack-a45260efce33ecb55a37545212ff9e5da244c4e9.tar.gz |
Add support for new Juno FPGA reset controller
Support for a new reset controller that identifies itself with ID
0x20113 has been added in the Juno FPGA reset driver.
The driver version has been given a minor version bump to indicate the
new support.
Change-Id: Ife21d8b2c97d68eea3c4780c4124aac136b36c0b
Signed-off-by: Mikael Olsson <mikael.olsson@arm.com>
Diffstat (limited to 'remoteproc')
-rw-r--r-- | remoteproc/juno_fpga_reset.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/remoteproc/juno_fpga_reset.c b/remoteproc/juno_fpga_reset.c index 29b2eb9..0d29c20 100644 --- a/remoteproc/juno_fpga_reset.c +++ b/remoteproc/juno_fpga_reset.c @@ -25,7 +25,7 @@ #include <linux/platform_device.h> #include <linux/reset-controller.h> -#define JUNO_FPGA_RESET_DRIVER_VERSION "0.0.1" +#define JUNO_FPGA_RESET_DRIVER_VERSION "0.1.0" struct juno_fpga_reset { struct reset_controller_dev rst; @@ -33,6 +33,10 @@ struct juno_fpga_reset { void __iomem *base; }; +/* Supported controller IDs */ +#define JUNO_FPGA_RESET_MIN_SUPPORTED_ID 0x2010f +#define JUNO_FPGA_RESET_MAX_SUPPORTED_ID 0x20113 + #define JUNO_FPGA_RESET_ID(base) (base) #define JUNO_FPGA_RESET_SOFT_RESET(base) ((base) + 0x140) #define JUNO_FPGA_RESET_CPU_WAIT(base) ((base) + 0x144) @@ -53,11 +57,9 @@ static void __iomem *verify_and_remap(struct device *dev, id = readl(JUNO_FPGA_RESET_ID(base)); - if (id != 0x2010f && - id != 0x20110 && - id != 0x20111 && - id != 0x20112) { - dev_err(dev, "ID not matching"); + if (id < JUNO_FPGA_RESET_MIN_SUPPORTED_ID || + id > JUNO_FPGA_RESET_MAX_SUPPORTED_ID) { + dev_err(dev, "Unknown controller ID: %u", id); return IOMEM_ERR_PTR(-EINVAL); } |