]> git.dujemihanovic.xyz Git - u-boot.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)
commit3cfb1e69142a5cde251e43fa373d8c5a2b5cfae4
treeddcd41e40f4f385ae89c3ab53695e01963b55ede
parent0e148342f764dad64bbb6ce40d92262e5f436c64
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