.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0+ |
---|
1 | 2 | /* |
---|
2 | 3 | * Amlogic Meson GXL Internal PHY Driver |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 2015 Amlogic, Inc. All rights reserved. |
---|
5 | 6 | * Copyright (C) 2016 BayLibre, SAS. All rights reserved. |
---|
6 | 7 | * 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 | | - * |
---|
18 | 8 | */ |
---|
19 | 9 | #include <linux/kernel.h> |
---|
20 | 10 | #include <linux/module.h> |
---|
.. | .. |
---|
146 | 136 | if (ret) |
---|
147 | 137 | return ret; |
---|
148 | 138 | |
---|
149 | | - return genphy_config_init(phydev); |
---|
| 139 | + return 0; |
---|
150 | 140 | } |
---|
151 | 141 | |
---|
152 | 142 | /* This function is provided to cope with the possible failures of this phy |
---|
.. | .. |
---|
234 | 224 | |
---|
235 | 225 | static struct phy_driver meson_gxl_phy[] = { |
---|
236 | 226 | { |
---|
237 | | - .phy_id = 0x01814400, |
---|
238 | | - .phy_id_mask = 0xfffffff0, |
---|
| 227 | + PHY_ID_MATCH_EXACT(0x01814400), |
---|
239 | 228 | .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, |
---|
242 | 232 | .config_init = meson_gxl_config_init, |
---|
243 | | - .aneg_done = genphy_aneg_done, |
---|
244 | 233 | .read_status = meson_gxl_read_status, |
---|
245 | 234 | .ack_interrupt = meson_gxl_ack_interrupt, |
---|
246 | 235 | .config_intr = meson_gxl_config_intr, |
---|
247 | 236 | .suspend = genphy_suspend, |
---|
248 | 237 | .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, |
---|
249 | 252 | }, |
---|
250 | 253 | }; |
---|
251 | 254 | |
---|
252 | 255 | 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) }, |
---|
254 | 258 | { } |
---|
255 | 259 | }; |
---|
256 | 260 | |
---|