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: <ab204023-1c45-4c67-9a90-d854da937ee8@nvidia.com>
Date: Fri, 24 Oct 2025 16:13:27 +0100
From: Jon Hunter <jonathanh@...dia.com>
To: Kartik Rajput <kkartik@...dia.com>, akhilrajeev@...dia.com,
 andi.shyti@...nel.org, robh@...nel.org, krzk+dt@...nel.org,
 conor+dt@...nel.org, thierry.reding@...il.com, ldewangan@...dia.com,
 digetx@...il.com, smangipudi@...dia.com, linux-i2c@...r.kernel.org,
 devicetree@...r.kernel.org, linux-tegra@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] i2c: tegra: Add logic to support different register
 offsets


On 01/10/2025 16:36, Kartik Rajput wrote:
> Tegra410 use different offsets for existing I2C registers, update
> the logic to use appropriate offsets per SoC.
> 
> Signed-off-by: Kartik Rajput <kkartik@...dia.com>
> ---
>   drivers/i2c/busses/i2c-tegra.c | 499 ++++++++++++++++++++++-----------
>   1 file changed, 334 insertions(+), 165 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
> index 038809264526..1e26d67cbd30 100644
> --- a/drivers/i2c/busses/i2c-tegra.c
> +++ b/drivers/i2c/busses/i2c-tegra.c

...

> +static const struct tegra_i2c_regs tegra20_i2c_regs_vi = {
> +	.cnfg = 0x0c00 + (0x000 << 2),
> +	.status = 0x0c00 + (0x01c << 2),
> +	.sl_cnfg = 0x0c00 + (0x020 << 2),
> +	.sl_addr1 = 0x0c00 + (0x02c << 2),
> +	.sl_addr2 = 0x0c00 + (0x030 << 2),
> +	.tlow_sext = 0x0c00 + (0x034 << 2),
> +	.tx_fifo = 0x0c00 + (0x050 << 2),
> +	.rx_fifo = 0x0c00 + (0x054 << 2),
> +	.packet_transfer_status = 0x0c00 + (0x058 << 2),
> +	.fifo_control = 0x0c00 + (0x05c << 2),
> +	.fifo_status = 0x0c00 + (0x060 << 2),
> +	.int_mask = 0x0c00 + (0x064 << 2),
> +	.int_status = 0x0c00 + (0x068 << 2),
> +	.clk_divisor = 0x0c00 + (0x06c << 2),
> +	.bus_clear_cnfg = 0x0c00 + (0x084 << 2),
> +	.bus_clear_status = 0x0c00 + (0x088 << 2),
> +	.config_load = 0x0c00 + (0x08c << 2),
> +	.clken_override = 0x0c00 + (0x090 << 2),
> +	.interface_timing_0 = 0x0c00 + (0x094 << 2),
> +	.interface_timing_1 = 0x0c00 + (0x098 << 2),
> +	.hs_interface_timing_0 = 0x0c00 + (0x09c << 2),
> +	.hs_interface_timing_1 = 0x0c00 + (0x0a0 << 2),
> +	.master_reset_cntrl = 0x0c00 + (0x0a8 << 2),
> +	.mst_fifo_control = 0x0c00 + (0x0b4 << 2),
> +	.mst_fifo_status = 0x0c00 + (0x0b8 << 2),
> +	.sw_mutex = 0x0c00 + (0x0ec << 2),

Why do we define all the above with '<< 2'? Seems odd.

Jon

-- 
nvpublic


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ