diff options
author | Tom Rini <trini@konsulko.com> | 2021-10-20 14:23:08 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-10-20 14:23:08 -0400 |
commit | 11c41192ec08ba6ded60b0d6e8257cfbd6ad1914 (patch) | |
tree | c704b0558d4ab6a32c95327865ebb7fa6b37208f /drivers/net/macb.c | |
parent | fb1018106a7bbb1a0d723029f6760b1b1b4d306d (diff) | |
parent | ddf4972834fdf33f0a3360ff4a68fde333995113 (diff) |
Merge https://source.denx.de/u-boot/custodians/u-boot-riscv
- Assorted warning fixes, io read/write bugfix
Diffstat (limited to 'drivers/net/macb.c')
-rw-r--r-- | drivers/net/macb.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/net/macb.c b/drivers/net/macb.c index 8151104acfc..8c6461e717b 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c @@ -574,14 +574,9 @@ static int macb_phy_find(struct macb_device *macb, const char *name) #ifdef CONFIG_DM_ETH static int macb_sifive_clk_init(struct udevice *dev, ulong rate) { - fdt_addr_t addr; void *gemgxl_regs; - addr = dev_read_addr_index(dev, 1); - if (addr == FDT_ADDR_T_NONE) - return -ENODEV; - - gemgxl_regs = (void __iomem *)addr; + gemgxl_regs = dev_read_addr_index_ptr(dev, 1); if (!gemgxl_regs) return -ENODEV; @@ -1383,7 +1378,7 @@ static int macb_eth_probe(struct udevice *dev) macb->phy_addr = ofnode_read_u32_default(phandle_args.node, "reg", -1); - macb->regs = (void *)pdata->iobase; + macb->regs = (void *)(uintptr_t)pdata->iobase; macb->is_big_endian = (cpu_to_be32(0x12345678) == 0x12345678); @@ -1444,7 +1439,7 @@ static int macb_eth_of_to_plat(struct udevice *dev) { struct eth_pdata *pdata = dev_get_plat(dev); - pdata->iobase = (phys_addr_t)dev_remap_addr(dev); + pdata->iobase = (uintptr_t)dev_remap_addr(dev); if (!pdata->iobase) return -EINVAL; |