diff options
author | Tom Rini <trini@konsulko.com> | 2020-09-25 12:55:06 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-09-25 12:55:06 -0400 |
commit | 253388acd6d0d52205ed9a32282f990e055bb87d (patch) | |
tree | a84e1d53a94b4ea3dbf1d1994ebf02606aa41503 /drivers/net/pfe_eth/pfe_eth.c | |
parent | 1da91d9bcd6e5ef046c1df0d373d0df87b1e8a72 (diff) | |
parent | 8ec619f8fd847eb80d75fa0a582e1fa3c74a21a7 (diff) |
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriq
- Bug fixes related to PCIe, pfe, xfi, gpio, reset, vid, env, and usb on
layerscape products
Diffstat (limited to 'drivers/net/pfe_eth/pfe_eth.c')
-rw-r--r-- | drivers/net/pfe_eth/pfe_eth.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/drivers/net/pfe_eth/pfe_eth.c b/drivers/net/pfe_eth/pfe_eth.c index e49bf4a6f3..3b4ca0393c 100644 --- a/drivers/net/pfe_eth/pfe_eth.c +++ b/drivers/net/pfe_eth/pfe_eth.c @@ -176,9 +176,10 @@ static int pfe_eth_send(struct udevice *dev, void *packet, int length) udelay(100); i++; - if (i == 30000) + if (i == 30000) { printf("Tx timeout, send failed\n"); - break; + break; + } } return 0; @@ -213,27 +214,22 @@ static int pfe_eth_recv(struct udevice *dev, int flags, uchar **packetp) static int pfe_eth_probe(struct udevice *dev) { struct pfe_eth_dev *priv = dev_get_priv(dev); - struct pfe_ddr_address *pfe_addr; + struct pfe_ddr_address pfe_addr; struct pfe_eth_pdata *pdata = dev_get_platdata(dev); int ret = 0; static int init_done; if (!init_done) { - pfe_addr = (struct pfe_ddr_address *)malloc(sizeof - (struct pfe_ddr_address)); - if (!pfe_addr) - return -ENOMEM; - - pfe_addr->ddr_pfe_baseaddr = + pfe_addr.ddr_pfe_baseaddr = (void *)pdata->pfe_ddr_addr.ddr_pfe_baseaddr; - pfe_addr->ddr_pfe_phys_baseaddr = + pfe_addr.ddr_pfe_phys_baseaddr = (unsigned long)pdata->pfe_ddr_addr.ddr_pfe_phys_baseaddr; debug("ddr_pfe_baseaddr: %p, ddr_pfe_phys_baseaddr: %08x\n", - pfe_addr->ddr_pfe_baseaddr, - (u32)pfe_addr->ddr_pfe_phys_baseaddr); + pfe_addr.ddr_pfe_baseaddr, + (u32)pfe_addr.ddr_pfe_phys_baseaddr); - ret = pfe_drv_init(pfe_addr); + ret = pfe_drv_init(&pfe_addr); if (ret) return ret; |