]> git.baikalelectronics.ru Git - uboot.git/commit
net: sun8i-emac: Use common syscon setup for R40
authorSamuel Holland <samuel@sholland.org>
Sun, 22 Jan 2023 22:51:05 +0000 (16:51 -0600)
committerAndre Przywara <andre.przywara@arm.com>
Tue, 11 Apr 2023 23:17:21 +0000 (00:17 +0100)
commit2c4fda6a84ef77df174fc50f677e239245ccb334
treeddcd41e40f4f385ae89c3ab53695e01963b55ede
parent0bc6934411fb36cfc48b6e4b6129fd049934736b
net: sun8i-emac: Use common syscon setup for R40

While R40 puts the EMAC syscon register at a different address from
other variants, the relevant portion of the register's layout is the
same. Factor out the register offset so the same code can be shared
by all variants. This matches what the Linux driver does.

This change provides two benefits beyond the simplification:
 - R40 boards now respect the RX delays from the devicetree
 - This resolves a warning on architectures where readl/writel
   expect the address to have a pointer type, not phys_addr_t.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
drivers/net/sun8i_emac.c