Rebased from upstream / out of band repository.
[librecmc/librecmc.git] / target / linux / sunxi / patches-4.14 / 003-net-stmmac-sun8i-Restore-the-compatibles.patch
1 From a8ff8ccb45d37efa64476958fc5e9a8d9716b23b Mon Sep 17 00:00:00 2001
2 From: Corentin Labbe <clabbe.montjoie@gmail.com>
3 Date: Tue, 24 Oct 2017 19:57:14 +0200
4 Subject: [PATCH] net: stmmac: sun8i: Restore the compatibles
5
6 The original dwmac-sun8i DT bindings have some issue on how to handle
7 integrated PHY and was reverted in last RC of 4.13.
8 But now we have a solution so we need to get back that was reverted.
9
10 This patch restore compatibles about dwmac-sun8i
11 This reverts commit ad4540cc5aa3 ("net: stmmac: sun8i: Remove the compatibles")
12
13 Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
14 Signed-off-by: David S. Miller <davem@davemloft.net>
15 ---
16  drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 8 ++++++++
17  1 file changed, 8 insertions(+)
18
19 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
20 +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
21 @@ -1072,6 +1072,14 @@ return ret;
22  }
23  
24  static const struct of_device_id sun8i_dwmac_match[] = {
25 +       { .compatible = "allwinner,sun8i-h3-emac",
26 +               .data = &emac_variant_h3 },
27 +       { .compatible = "allwinner,sun8i-v3s-emac",
28 +               .data = &emac_variant_v3s },
29 +       { .compatible = "allwinner,sun8i-a83t-emac",
30 +               .data = &emac_variant_a83t },
31 +       { .compatible = "allwinner,sun50i-a64-emac",
32 +               .data = &emac_variant_a64 },
33         { }
34  };
35  MODULE_DEVICE_TABLE(of, sun8i_dwmac_match);