mbox series

[0/2] net: sh_eth: add support for SH7786 and big-endian

Message ID 20171204141744.18599-1-thomas.petazzoni@free-electrons.com
Headers show
Series net: sh_eth: add support for SH7786 and big-endian | expand

Message

Thomas Petazzoni Dec. 4, 2017, 2:17 p.m. UTC
Hello,

I've recently been working on an SH7786 based platform, which uses the
sh_eth network controller. One peculiarity of my setup is that the CPU
is configured big-endian (even though little-endian is more
traditional in the Linux SuperH world), and the sh_eth driver was not
ready for this.

The first patch simply adds the sh_eth_cpu_data structure that
describes the SH7786 controller.

The second patch fixes the driver for big-endian operation. However,
I'd like this patch to be carefully reviewed by Sergei Shtylyov who
already did some endianness related changes in this driver. Indeed, my
change is based on the assumption that the DMA descriptors are in the
native endianness of the CPU.

Thanks,

Thomas

Thomas Petazzoni (2):
  net: sh_eth: add support for SH7786
  net: sh_eth: make work on big endian systems

 drivers/net/ethernet/renesas/sh_eth.c | 89 ++++++++++++++++++++++-------------
 1 file changed, 55 insertions(+), 34 deletions(-)

Comments

David Miller Dec. 5, 2017, 7:44 p.m. UTC | #1
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Date: Mon,  4 Dec 2017 15:17:42 +0100

> I've recently been working on an SH7786 based platform, which uses the
> sh_eth network controller. One peculiarity of my setup is that the CPU
> is configured big-endian (even though little-endian is more
> traditional in the Linux SuperH world), and the sh_eth driver was not
> ready for this.
> 
> The first patch simply adds the sh_eth_cpu_data structure that
> describes the SH7786 controller.
> 
> The second patch fixes the driver for big-endian operation. However,
> I'd like this patch to be carefully reviewed by Sergei Shtylyov who
> already did some endianness related changes in this driver. Indeed, my
> change is based on the assumption that the DMA descriptors are in the
> native endianness of the CPU.

Sergei, please let me know when you've re-reviewed this series now
that you have documentation in hand...

Thanks.