Thread (30 messages) 30 messages, 6 authors, 2021-09-23

Re: [RFC PATCH net-next 07/12] power: reset: Add lan966x power reset driver

From: Andrew Lunn <andrew@lunn.ch>
Date: 2021-09-20 12:15:49
Also in: linux-phy, linux-pm, lkml, netdev

+struct lan966x_reset_context {
+	struct regmap *gcb_ctrl;
+	struct regmap *cpu_ctrl;
+	struct notifier_block restart_handler;
+};
+
+#define PROTECT_REG    0x88
+#define PROTECT_BIT    BIT(5)
+#define SOFT_RESET_REG 0x00
+#define SOFT_RESET_BIT BIT(1)
+
+static int lan966x_restart_handle(struct notifier_block *this,
+				  unsigned long mode, void *cmd)
+{
+	struct lan966x_reset_context *ctx = container_of(this, struct lan966x_reset_context,
+							restart_handler);
+
+	/* Make sure the core is not protected from reset */
+	regmap_update_bits(ctx->cpu_ctrl, PROTECT_REG, PROTECT_BIT, 0);
This all looks familiar...

Maybe yet another compatible added to reset-microchip-sparx5.c ?

      Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help