[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YUh7ammFjBHj3Kj8@lunn.ch>
Date: Mon, 20 Sep 2021 14:15:38 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Horatiu Vultur <horatiu.vultur@...rochip.com>
Cc: davem@...emloft.net, kuba@...nel.org, robh+dt@...nel.org,
linux@...linux.org.uk, f.fainelli@...il.com,
alexandre.belloni@...tlin.com, vladimir.oltean@....com,
UNGLinuxDriver@...rochip.com, netdev@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-phy@...ts.infradead.org, linux-pm@...r.kernel.org
Subject: Re: [RFC PATCH net-next 07/12] power: reset: Add lan966x power reset
driver
> +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
Powered by blists - more mailing lists