lantiq: copy target to kernel 4.19
[oweals/openwrt.git] / target / linux / lantiq / patches-4.19 / 0027-01-net-phy-intel-xway-add-VR9-version-number.patch
1 From 5b73d9955fb4b0e3c37f8f6c71910293246c89dc Mon Sep 17 00:00:00 2001
2 From: Mathias Kresin <dev@kresin.me>
3 Date: Thu, 22 Mar 2018 23:31:38 +0100
4 Subject: [PATCH 1/2] net: phy: intel-xway: add VR9 version number
5
6 The VR9 phy ids are matching only for the SoC version 1.2. Rename the
7 macros and change the names to take this into account.
8
9 Signed-off-by: Mathias Kresin <dev@kresin.me>
10 Signed-off-by: David S. Miller <davem@davemloft.net>
11 ---
12  drivers/net/phy/intel-xway.c | 16 ++++++++--------
13  1 file changed, 8 insertions(+), 8 deletions(-)
14
15 --- a/drivers/net/phy/intel-xway.c
16 +++ b/drivers/net/phy/intel-xway.c
17 @@ -149,8 +149,8 @@
18  #define PHY_ID_PHY22F_1_4              0xD565A410
19  #define PHY_ID_PHY11G_1_5              0xD565A401
20  #define PHY_ID_PHY22F_1_5              0xD565A411
21 -#define PHY_ID_PHY11G_VR9              0xD565A409
22 -#define PHY_ID_PHY22F_VR9              0xD565A419
23 +#define PHY_ID_PHY11G_VR9_1_2          0xD565A409
24 +#define PHY_ID_PHY22F_VR9_1_2          0xD565A419
25  
26  #if IS_ENABLED(CONFIG_OF_MDIO)
27  static int vr9_gphy_of_reg_init(struct phy_device *phydev)
28 @@ -366,9 +366,9 @@ static struct phy_driver xway_gphy[] = {
29                 .suspend        = genphy_suspend,
30                 .resume         = genphy_resume,
31         }, {
32 -               .phy_id         = PHY_ID_PHY11G_VR9,
33 +               .phy_id         = PHY_ID_PHY11G_VR9_1_2,
34                 .phy_id_mask    = 0xffffffff,
35 -               .name           = "Intel XWAY PHY11G (xRX integrated)",
36 +               .name           = "Intel XWAY PHY11G (xRX v1.2 integrated)",
37                 .features       = PHY_GBIT_FEATURES,
38                 .flags          = PHY_HAS_INTERRUPT,
39                 .config_init    = xway_gphy_config_init,
40 @@ -380,9 +380,9 @@ static struct phy_driver xway_gphy[] = {
41                 .suspend        = genphy_suspend,
42                 .resume         = genphy_resume,
43         }, {
44 -               .phy_id         = PHY_ID_PHY22F_VR9,
45 +               .phy_id         = PHY_ID_PHY22F_VR9_1_2,
46                 .phy_id_mask    = 0xffffffff,
47 -               .name           = "Intel XWAY PHY22F (xRX integrated)",
48 +               .name           = "Intel XWAY PHY22F (xRX v1.2 integrated)",
49                 .features       = PHY_BASIC_FEATURES,
50                 .flags          = PHY_HAS_INTERRUPT,
51                 .config_init    = xway_gphy_config_init,
52 @@ -404,8 +404,8 @@ static struct mdio_device_id __maybe_unu
53         { PHY_ID_PHY22F_1_4, 0xffffffff },
54         { PHY_ID_PHY11G_1_5, 0xffffffff },
55         { PHY_ID_PHY22F_1_5, 0xffffffff },
56 -       { PHY_ID_PHY11G_VR9, 0xffffffff },
57 -       { PHY_ID_PHY22F_VR9, 0xffffffff },
58 +       { PHY_ID_PHY11G_VR9_1_2, 0xffffffff },
59 +       { PHY_ID_PHY22F_VR9_1_2, 0xffffffff },
60         { }
61  };
62  MODULE_DEVICE_TABLE(mdio, xway_gphy_tbl);