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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sat, 19 Jan 2019 07:22:29 +0100
From:   Marek Vasut <marex@...x.de>
To:     Tristram.Ha@...rochip.com
Cc:     vivien.didelot@...oirfairelinux.com, UNGLinuxDriver@...rochip.com,
        netdev@...r.kernel.org, f.fainelli@...il.com, andrew@...n.ch,
        dan.carpenter@...cle.com, pavel@....cz,
        sergio.paracuellos@...il.com
Subject: Re: [PATCH RFC v1] net: dsa: microchip: add KSZ9477 I2C driver

On 1/18/19 9:25 PM, Tristram.Ha@...rochip.com wrote:
>>> +#define REG_SIZE			0x8000
>>> +
>>> +#define I2C_REGMAP_VAL			8
>>> +#define I2C_REGMAP_REG			16
>>> +
>>> +#define KSZ_REGMAP_COMMON(n, width)
>> 		\
>>> +{									\
>>> +	.name			= n,					\
>>> +	.max_register		= REG_SIZE - (width),			\
>>> +	.reg_bits		= I2C_REGMAP_REG,			\
>>> +	.val_bits		= I2C_REGMAP_VAL * (width),		\
>>> +	.reg_stride		= (width),				\
>>> +	.reg_format_endian	= REGMAP_ENDIAN_BIG,
>> 	\
>>> +	.val_format_endian	= REGMAP_ENDIAN_BIG,
>> 	\
>>> +}
>> This comes from my regmap RFC series, right ? Why do we need to redefine
>> it here again ?
> 
> This is different from the SPI version.  The variables pad_bits, read_flag_mask, and write_flag_mask are not used.  reg_bits is also different.
> 
> For KSZ8795 SPI the differences are SPI_ADDR_S, SPI_TURNAROUND_S, and SPI_CMD_LEN.

The SPI and I2C protocol of the switch is different ?

-- 
Best regards,
Marek Vasut

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ