[U-Boot] [PATCH v7 9/9] net: macb: Fix check for little-endian system in gmac_configure_dma()
Anup Patel
Anup.Patel at wdc.com
Mon Jun 24 04:03:26 UTC 2019
We should depend on __LITTLE_ENDIAN pre-defined compiler macro for
little-endian system instead of U-Boot specific CONFIG_SYS_LITTLE_ENDIAN
macro.
Signed-off-by: Anup Patel <anup.patel at wdc.com>
---
drivers/net/macb.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index 727cb0bc49..1cfdfd817a 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -740,10 +740,10 @@ static void gmac_configure_dma(struct macb_device *macb)
dmacfg |= GEM_BIT(TXPBMS) | GEM_BF(RXBMS, -1L);
dmacfg &= ~GEM_BIT(ENDIA_PKT);
-#ifdef CONFIG_SYS_LITTLE_ENDIAN
- dmacfg &= ~GEM_BIT(ENDIA_DESC);
+#ifdef __LITTLE_ENDIAN
+ dmacfg &= ~GEM_BIT(ENDIA_DESC);
#else
- dmacfg |= GEM_BIT(ENDIA_DESC); /* CPU in big endian */
+ dmacfg |= GEM_BIT(ENDIA_DESC); /* CPU in big endian */
#endif
dmacfg &= ~GEM_BIT(ADDR64);
@@ -1306,6 +1306,7 @@ static const struct macb_config sama5d4_config = {
};
static const struct macb_config sifive_config = {
+ .dma_burst_length = 16,
.probe = macb_sifive_probe,
.set_tx_clk = macb_sifive_set_tx_clk,
};
--
2.17.1
More information about the U-Boot
mailing list