lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1adc068bbf1a15b1b10651f6ad9385415f6d4227.camel@pengutronix.de>
Date: Fri, 23 Jan 2026 14:00:31 +0100
From: Philipp Zabel <p.zabel@...gutronix.de>
To: Anirudh Srinivasan <asrinivasan@....tenstorrent.com>, Drew Fustini	
 <dfustini@....tenstorrent.com>, Joel Stanley <jms@....tenstorrent.com>, Rob
 Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor
 Dooley	 <conor+dt@...nel.org>, Michael Turquette <mturquette@...libre.com>,
 Stephen Boyd <sboyd@...nel.org>
Cc: linux-riscv@...ts.infradead.org, devicetree@...r.kernel.org, 
	linux-kernel@...r.kernel.org, linux-clk@...r.kernel.org, joel@....id.au, 
	fustini@...nel.org, mpe@...nel.org, mpe@....tenstorrent.com, 
	npiggin@....tenstorrent.com, agross@...nel.org, agross@....tenstorrent.com,
 	bmasney@...hat.com
Subject: Re: [PATCH v2 2/3] reset: tenstorrent: Add reset controller for
 Atlantis

On Do, 2026-01-22 at 16:36 -0600, Anirudh Srinivasan wrote:
> Adds Atlantis Reset Controller and auxiliary device definitions for
> reset to share same regmap interface as clock controller.
> 
> This version of the reset controller driver covers resets from the RCPU
> syscon.
> 
> Signed-off-by: Anirudh Srinivasan <asrinivasan@....tenstorrent.com>
> ---
>  MAINTAINERS                                |   2 +
>  drivers/reset/Kconfig                      |  11 ++
>  drivers/reset/Makefile                     |   1 +
>  drivers/reset/reset-tenstorrent-atlantis.c | 158 +++++++++++++++++++++++++++++
>  include/soc/tenstorrent/atlantis-syscon.h  |  26 +++++
>  5 files changed, 198 insertions(+)
> 
[...]
> diff --git a/drivers/reset/reset-tenstorrent-atlantis.c b/drivers/reset/reset-tenstorrent-atlantis.c
> new file mode 100644
> index 000000000000..2e7f09409f79
> --- /dev/null
> +++ b/drivers/reset/reset-tenstorrent-atlantis.c
> @@ -0,0 +1,158 @@
[...]
> +static int atlantis_reset_update(struct reset_controller_dev *rcdev,
> +				 unsigned long id, bool assert)
> +{
> +	unsigned int val;
> +	struct atlantis_reset_controller *rst =
> +		to_atlantis_reset_controller(rcdev);
> +	const struct atlantis_reset_data *data = &rst->data->reset_data[id];
> +	unsigned int mask = BIT(data->bit);
> +	struct regmap *regmap = rst->regmap;
> +
> +	if (data->active_low ^ assert)
> +		val = mask;
> +	else
> +		val = ~mask;

		val = 0;

The ~mask bits will be ignored anyway.

[...]
> diff --git a/include/soc/tenstorrent/atlantis-syscon.h b/include/soc/tenstorrent/atlantis-syscon.h
> new file mode 100644
> index 000000000000..2c6387e5c21a
> --- /dev/null
> +++ b/include/soc/tenstorrent/atlantis-syscon.h
> @@ -0,0 +1,26 @@
> +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
> +/*
> + * Copyright (c) 2026 Tenstorrent
> + */
> +#ifndef __SOC_ATLANTIS_SYSCON_H__
> +#define __SOC_ATLANTIS_SYSCON_H__
> +
> +#include <linux/bits.h>
> +#include <linux/types.h>

#include <linux/auxiliary_bus.h>

struct regmap;

> +
> +struct atlantis_ccu_adev {
> +	struct auxiliary_device adev;
> +	struct regmap *regmap;
> +};
> +
> +#define to_atlantis_ccu_adev(_adev) \
> +	container_of((_adev), struct atlantis_ccu_adev, adev)

Please use an inline function instead of a macro.

> +
> +/* RCPU Reset Register Offsets */
> +#define RCPU_BLK_RST_REG	0x001c
> +#define LSIO_BLK_RST_REG	0x0020
> +#define HSIO_BLK_RST_REG	0x000c
> +#define PCIE_SUBS_RST_REG	0x0000
> +#define MM_RSTN_REG		0x0014

Why not move these into reset-tenstorrent-atlantis.c, they are not part
of the interface between clock and reset drivers.

regards
Philipp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ