From: Lennert Buytenhek Date: Fri, 19 Oct 2007 02:10:28 +0000 (+0200) Subject: mv643xx_eth: Disable RX/TX byte swapping on little-endian systems X-Git-Tag: v2.6.24-rc1~15^2~15^2~7 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=9f316841440c4c7e59227d0a3fe00a31ead1c436;p=linux-2.6-omap-h63xx.git mv643xx_eth: Disable RX/TX byte swapping on little-endian systems On little-endian systems, configure the SDMA unit with MV643XX_ETH_BLM_RX_NO_SWAP and MV643XX_ETH_BLM_TX_NO_SWAP. Signed-off-by: Lennert Buytenhek Acked-by: Tzachi Perelstein Signed-off-by: Dale Farnsworth --- diff --git a/drivers/net/mv643xx_eth.h b/drivers/net/mv643xx_eth.h index 20acd2e5245..d82b48d685c 100644 --- a/drivers/net/mv643xx_eth.h +++ b/drivers/net/mv643xx_eth.h @@ -266,10 +266,21 @@ #define MV643XX_ETH_IPG_INT_RX(value) ((value & 0x3fff) << 8) +#if defined(__BIG_ENDIAN) #define MV643XX_ETH_PORT_SDMA_CONFIG_DEFAULT_VALUE \ MV643XX_ETH_RX_BURST_SIZE_4_64BIT | \ MV643XX_ETH_IPG_INT_RX(0) | \ MV643XX_ETH_TX_BURST_SIZE_4_64BIT +#elif defined(__LITTLE_ENDIAN) +#define MV643XX_ETH_PORT_SDMA_CONFIG_DEFAULT_VALUE \ + MV643XX_ETH_RX_BURST_SIZE_4_64BIT | \ + MV643XX_ETH_BLM_RX_NO_SWAP | \ + MV643XX_ETH_BLM_TX_NO_SWAP | \ + MV643XX_ETH_IPG_INT_RX(0) | \ + MV643XX_ETH_TX_BURST_SIZE_4_64BIT +#else +#error One of __BIG_ENDIAN or __LITTLE_ENDIAN must be defined +#endif /* These macros describe Ethernet Port serial control reg (PSCR) bits */ #define MV643XX_ETH_SERIAL_PORT_DISABLE 0