Describe this feature instead of using the SoC ID.
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>
struct emac_variant {
enum emac_variant_id variant;
+ bool soc_has_internal_phy;
bool support_rmii;
};
if (pdata->phy_interface == PHY_INTERFACE_MODE_NA)
return -EINVAL;
- if (priv->variant->variant == H3_EMAC) {
+ if (priv->variant->soc_has_internal_phy) {
ret = sun8i_handle_internal_phy(dev, priv);
if (ret)
return ret;
static const struct emac_variant emac_variant_h3 = {
.variant = H3_EMAC,
+ .soc_has_internal_phy = true,
.support_rmii = true,
};