hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/drivers/net/phy/meson-gxl.c
....@@ -1,20 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0+
12 /*
23 * Amlogic Meson GXL Internal PHY Driver
34 *
45 * Copyright (C) 2015 Amlogic, Inc. All rights reserved.
56 * Copyright (C) 2016 BayLibre, SAS. All rights reserved.
67 * Author: Neil Armstrong <narmstrong@baylibre.com>
7
- *
8
- * This program is free software; you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation; either version 2 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful, but WITHOUT
14
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16
- * more details.
17
- *
188 */
199 #include <linux/kernel.h>
2010 #include <linux/module.h>
....@@ -146,7 +136,7 @@
146136 if (ret)
147137 return ret;
148138
149
- return genphy_config_init(phydev);
139
+ return 0;
150140 }
151141
152142 /* This function is provided to cope with the possible failures of this phy
....@@ -234,23 +224,37 @@
234224
235225 static struct phy_driver meson_gxl_phy[] = {
236226 {
237
- .phy_id = 0x01814400,
238
- .phy_id_mask = 0xfffffff0,
227
+ PHY_ID_MATCH_EXACT(0x01814400),
239228 .name = "Meson GXL Internal PHY",
240
- .features = PHY_BASIC_FEATURES,
241
- .flags = PHY_IS_INTERNAL | PHY_HAS_INTERRUPT,
229
+ /* PHY_BASIC_FEATURES */
230
+ .flags = PHY_IS_INTERNAL,
231
+ .soft_reset = genphy_soft_reset,
242232 .config_init = meson_gxl_config_init,
243
- .aneg_done = genphy_aneg_done,
244233 .read_status = meson_gxl_read_status,
245234 .ack_interrupt = meson_gxl_ack_interrupt,
246235 .config_intr = meson_gxl_config_intr,
247236 .suspend = genphy_suspend,
248237 .resume = genphy_resume,
238
+ .read_mmd = genphy_read_mmd_unsupported,
239
+ .write_mmd = genphy_write_mmd_unsupported,
240
+ }, {
241
+ PHY_ID_MATCH_EXACT(0x01803301),
242
+ .name = "Meson G12A Internal PHY",
243
+ /* PHY_BASIC_FEATURES */
244
+ .flags = PHY_IS_INTERNAL,
245
+ .soft_reset = genphy_soft_reset,
246
+ .ack_interrupt = meson_gxl_ack_interrupt,
247
+ .config_intr = meson_gxl_config_intr,
248
+ .suspend = genphy_suspend,
249
+ .resume = genphy_resume,
250
+ .read_mmd = genphy_read_mmd_unsupported,
251
+ .write_mmd = genphy_write_mmd_unsupported,
249252 },
250253 };
251254
252255 static struct mdio_device_id __maybe_unused meson_gxl_tbl[] = {
253
- { 0x01814400, 0xfffffff0 },
256
+ { PHY_ID_MATCH_VENDOR(0x01814400) },
257
+ { PHY_ID_MATCH_VENDOR(0x01803301) },
254258 { }
255259 };
256260