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

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

 



> +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



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux