summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorSylvain Lemieux <slemieux@tycoint.com>2015-07-27 13:37:40 -0400
committerTom Rini <trini@konsulko.com>2015-08-13 07:19:41 -0400
commit68a776687e91209a20d8832f4ba777192cfa3b6c (patch)
treef46a57d5740ecd35cbda0b4e29c2dcda55364a96 /drivers/net
parentfcd78fa604d994477fd209b9faab4a974b103250 (diff)
downloadu-boot-imx-68a776687e91209a20d8832f4ba777192cfa3b6c.zip
u-boot-imx-68a776687e91209a20d8832f4ba777192cfa3b6c.tar.gz
u-boot-imx-68a776687e91209a20d8832f4ba777192cfa3b6c.tar.bz2
net: lpc32xx: eth buffers base config
Add support to specify the Ethernet buffer base address; if none are supply by the board, the default value is use (from existing code). Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/lpc32xx_eth.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/lpc32xx_eth.c b/drivers/net/lpc32xx_eth.c
index f3ab0f4..e76e9bc 100644
--- a/drivers/net/lpc32xx_eth.c
+++ b/drivers/net/lpc32xx_eth.c
@@ -353,15 +353,17 @@ int lpc32xx_eth_phy_write(struct mii_dev *bus, int phy_addr, int dev_addr,
#endif
/*
+ * Provide default Ethernet buffers base address if target did not.
* Locate buffers in SRAM at 0x00001000 to avoid cache issues and
* maximize throughput.
*/
-
-#define LPC32XX_ETH_BUFS 0x00001000
+#if !defined(CONFIG_LPC32XX_ETH_BUFS_BASE)
+#define CONFIG_LPC32XX_ETH_BUFS_BASE 0x00001000
+#endif
static struct lpc32xx_eth_device lpc32xx_eth = {
.regs = (struct lpc32xx_eth_registers *)LPC32XX_ETH_BASE,
- .bufs = (struct lpc32xx_eth_buffers *)LPC32XX_ETH_BUFS,
+ .bufs = (struct lpc32xx_eth_buffers *)CONFIG_LPC32XX_ETH_BUFS_BASE,
#if defined(CONFIG_RMII)
.phy_rmii = true,
#endif