From 62b7f5931c54e96fca56dd8761b0e466d355c881 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Thu, 18 Feb 2021 18:04:33 +0100 Subject: bcm27xx: import latest patches from the RPi foundation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bcm2708: boot tested on RPi B+ v1.2 bcm2709: boot tested on RPi 3B v1.2 and RPi 4B v1.1 4G bcm2710: boot tested on RPi 3B v1.2 bcm2711: boot tested on RPi 4B v1.1 4G Signed-off-by: Álvaro Fernández Rojas (cherry-picked from commit f07e572f64) --- ...-reset-simple-header-out-of-drivers-reset.patch | 168 +++++++++++++++++++++ 1 file changed, 168 insertions(+) create mode 100644 target/linux/bcm27xx/patches-5.4/950-0527-reset-Move-reset-simple-header-out-of-drivers-reset.patch (limited to 'target/linux/bcm27xx/patches-5.4/950-0527-reset-Move-reset-simple-header-out-of-drivers-reset.patch') diff --git a/target/linux/bcm27xx/patches-5.4/950-0527-reset-Move-reset-simple-header-out-of-drivers-reset.patch b/target/linux/bcm27xx/patches-5.4/950-0527-reset-Move-reset-simple-header-out-of-drivers-reset.patch new file mode 100644 index 0000000000..3df4fde439 --- /dev/null +++ b/target/linux/bcm27xx/patches-5.4/950-0527-reset-Move-reset-simple-header-out-of-drivers-reset.patch @@ -0,0 +1,168 @@ +From e108e2c34b3acc70ec55b7d0772abb79c96319b2 Mon Sep 17 00:00:00 2001 +From: Maxime Ripard +Date: Tue, 28 Jan 2020 09:33:52 +0100 +Subject: [PATCH] reset: Move reset-simple header out of drivers/reset + +The reset-simple code can be useful for drivers outside of drivers/reset +that have a few reset controls as part of their features. Let's move it to +include/linux/reset. + +Cc: Philipp Zabel +Signed-off-by: Maxime Ripard +--- + drivers/reset/reset-simple.c | 3 +-- + drivers/reset/reset-socfpga.c | 3 +-- + drivers/reset/reset-sunxi.c | 3 +-- + drivers/reset/reset-uniphier-glue.c | 3 +-- + {drivers => include/linux}/reset/reset-simple.h | 0 + 5 files changed, 4 insertions(+), 8 deletions(-) + rename {drivers => include/linux}/reset/reset-simple.h (100%) + +--- a/drivers/reset/reset-simple.c ++++ b/drivers/reset/reset-simple.c +@@ -18,10 +18,9 @@ + #include + #include + #include ++#include + #include + +-#include "reset-simple.h" +- + static inline struct reset_simple_data * + to_reset_simple_data(struct reset_controller_dev *rcdev) + { +--- a/drivers/reset/reset-socfpga.c ++++ b/drivers/reset/reset-socfpga.c +@@ -11,13 +11,12 @@ + #include + #include + #include ++#include + #include + #include + #include + #include + +-#include "reset-simple.h" +- + #define SOCFPGA_NR_BANKS 8 + + static int a10_reset_init(struct device_node *np) +--- a/drivers/reset/reset-sunxi.c ++++ b/drivers/reset/reset-sunxi.c +@@ -14,13 +14,12 @@ + #include + #include + #include ++#include + #include + #include + #include + #include + +-#include "reset-simple.h" +- + static int sunxi_reset_init(struct device_node *np) + { + struct reset_simple_data *data; +--- a/drivers/reset/reset-uniphier-glue.c ++++ b/drivers/reset/reset-uniphier-glue.c +@@ -9,8 +9,7 @@ + #include + #include + #include +- +-#include "reset-simple.h" ++#include + + #define MAX_CLKS 2 + #define MAX_RSTS 2 +--- a/drivers/reset/reset-simple.h ++++ /dev/null +@@ -1,41 +0,0 @@ +-/* SPDX-License-Identifier: GPL-2.0-or-later */ +-/* +- * Simple Reset Controller ops +- * +- * Based on Allwinner SoCs Reset Controller driver +- * +- * Copyright 2013 Maxime Ripard +- * +- * Maxime Ripard +- */ +- +-#ifndef __RESET_SIMPLE_H__ +-#define __RESET_SIMPLE_H__ +- +-#include +-#include +-#include +- +-/** +- * struct reset_simple_data - driver data for simple reset controllers +- * @lock: spinlock to protect registers during read-modify-write cycles +- * @membase: memory mapped I/O register range +- * @rcdev: reset controller device base structure +- * @active_low: if true, bits are cleared to assert the reset. Otherwise, bits +- * are set to assert the reset. Note that this says nothing about +- * the voltage level of the actual reset line. +- * @status_active_low: if true, bits read back as cleared while the reset is +- * asserted. Otherwise, bits read back as set while the +- * reset is asserted. +- */ +-struct reset_simple_data { +- spinlock_t lock; +- void __iomem *membase; +- struct reset_controller_dev rcdev; +- bool active_low; +- bool status_active_low; +-}; +- +-extern const struct reset_control_ops reset_simple_ops; +- +-#endif /* __RESET_SIMPLE_H__ */ +--- /dev/null ++++ b/include/linux/reset/reset-simple.h +@@ -0,0 +1,41 @@ ++/* SPDX-License-Identifier: GPL-2.0-or-later */ ++/* ++ * Simple Reset Controller ops ++ * ++ * Based on Allwinner SoCs Reset Controller driver ++ * ++ * Copyright 2013 Maxime Ripard ++ * ++ * Maxime Ripard ++ */ ++ ++#ifndef __RESET_SIMPLE_H__ ++#define __RESET_SIMPLE_H__ ++ ++#include ++#include ++#include ++ ++/** ++ * struct reset_simple_data - driver data for simple reset controllers ++ * @lock: spinlock to protect registers during read-modify-write cycles ++ * @membase: memory mapped I/O register range ++ * @rcdev: reset controller device base structure ++ * @active_low: if true, bits are cleared to assert the reset. Otherwise, bits ++ * are set to assert the reset. Note that this says nothing about ++ * the voltage level of the actual reset line. ++ * @status_active_low: if true, bits read back as cleared while the reset is ++ * asserted. Otherwise, bits read back as set while the ++ * reset is asserted. ++ */ ++struct reset_simple_data { ++ spinlock_t lock; ++ void __iomem *membase; ++ struct reset_controller_dev rcdev; ++ bool active_low; ++ bool status_active_low; ++}; ++ ++extern const struct reset_control_ops reset_simple_ops; ++ ++#endif /* __RESET_SIMPLE_H__ */ -- cgit v1.2.3