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  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]
Date:   Mon, 3 Aug 2020 11:14:11 -0700
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Michael Grzeschik <m.grzeschik@...gutronix.de>, andrew@...n.ch
Cc:     netdev@...r.kernel.org, davem@...emloft.net, kernel@...gutronix.de
Subject: Re: [PATCH v4 10/11] net: dsa: microchip: Add Microchip KSZ8863 SPI
 based driver support



On 8/2/2020 10:44 PM, Michael Grzeschik wrote:
> Add KSZ88X3 driver support. We add support for the KXZ88X3 three port
> switches using the SPI Interface.
> 
> Signed-off-by: Michael Grzeschik <m.grzeschik@...gutronix.de>
> 
> ---
> v1 -> v2: - this glue was not implemented
> v2 -> v3: - this glue was part of previous bigger patch
> v3 -> v4: - this glue was moved to this separate patch
> 
>  drivers/net/dsa/microchip/ksz8795_spi.c | 62 ++++++++++++++++++-------
>  1 file changed, 45 insertions(+), 17 deletions(-)
> 
> diff --git a/drivers/net/dsa/microchip/ksz8795_spi.c b/drivers/net/dsa/microchip/ksz8795_spi.c
> index 3bab09c46f6a7bd..d13a83c27428cdc 100644
> --- a/drivers/net/dsa/microchip/ksz8795_spi.c
> +++ b/drivers/net/dsa/microchip/ksz8795_spi.c
> @@ -14,34 +14,70 @@
>  #include <linux/regmap.h>
>  #include <linux/spi/spi.h>
>  
> +#include "ksz8.h"
>  #include "ksz_common.h"
>  
> -#define SPI_ADDR_SHIFT			12
> -#define SPI_ADDR_ALIGN			3
> -#define SPI_TURNAROUND_SHIFT		1
> +#define KSZ8795_SPI_ADDR_SHIFT			12
> +#define KSZ8795_SPI_ADDR_ALIGN			3
> +#define KSZ8795_SPI_TURNAROUND_SHIFT		1
>  
> -KSZ_REGMAP_TABLE(ksz8795, 16, SPI_ADDR_SHIFT,
> -		 SPI_TURNAROUND_SHIFT, SPI_ADDR_ALIGN);
> +#define KSZ8863_SPI_ADDR_SHIFT			8
> +#define KSZ8863_SPI_ADDR_ALIGN			8
> +#define KSZ8863_SPI_TURNAROUND_SHIFT		0
> +
> +KSZ_REGMAP_TABLE(ksz8795, 16, KSZ8795_SPI_ADDR_SHIFT,
> +		 KSZ8795_SPI_TURNAROUND_SHIFT, KSZ8795_SPI_ADDR_ALIGN);
> +
> +KSZ_REGMAP_TABLE(ksz8863, 16, KSZ8863_SPI_ADDR_SHIFT,
> +		 KSZ8863_SPI_TURNAROUND_SHIFT, KSZ8863_SPI_ADDR_ALIGN);

You could fancy a macro that does all of the above, and takes a name and
a model as argument, up to you.

Reviewed-by: Florian Fainelli <f.fainelli@...il.com>
-- 
Florian

Powered by blists - more mailing lists