net: sun8i-emac: Fix pinmux setup for Allwinner H5
authorAndre Przywara <andre.przywara@arm.com>
Thu, 15 Apr 2021 23:53:17 +0000 (00:53 +0100)
committerAndre Przywara <andre.przywara@arm.com>
Mon, 26 Apr 2021 09:12:35 +0000 (10:12 +0100)
commit4e26bc63a01da2ceaf64d8d84e08c8b948b78fed
treeeb2ad0bb76f4627be05c7f774fae07963abb9123
parent4dda435131251a94b29afd52f010cf1ec5a7ceb2
net: sun8i-emac: Fix pinmux setup for Allwinner H5

Commit eb5a2b671075 ("net: sun8i-emac: Determine pinmux based on SoC,
not EMAC type") switched the pinmux setup over to look at
CONFIG_MACH_SUN* symbols, to find the appropriate mux value.
Unfortunately this patch missed to check for the H5, which is
pin-compatible to the H3, but uses a different Kconfig symbol (because
it has ARMv8 vs. ARMv7 cores).

Replace the pure SUN8I_H3 symbol with the joint SUNXI_H3_H5 one, which is
there to cover the peripherals common to both SoCs.
Also explicitly list each supported SoC, and have an error message in the
fallback case, to avoid those problems in the future.

This fixes Ethernet support on all H5 boards.

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