.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * AppliedMicro X-Gene Multi-purpose PHY driver |
---|
3 | 4 | * |
---|
.. | .. |
---|
5 | 6 | * Author: Loc Ho <lho@apm.com> |
---|
6 | 7 | * Tuan Phan <tphan@apm.com> |
---|
7 | 8 | * Suman Tripathi <stripathi@apm.com> |
---|
8 | | - * |
---|
9 | | - * This program is free software; you can redistribute it and/or modify it |
---|
10 | | - * under the terms of the GNU General Public License as published by the |
---|
11 | | - * Free Software Foundation; either version 2 of the License, or (at your |
---|
12 | | - * option) any later version. |
---|
13 | | - * |
---|
14 | | - * This program is distributed in the hope that it will be useful, |
---|
15 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
16 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
17 | | - * GNU General Public License for more details. |
---|
18 | | - * |
---|
19 | | - * You should have received a copy of the GNU General Public License |
---|
20 | | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
---|
21 | 9 | * |
---|
22 | 10 | * The APM X-Gene PHY consists of two PLL clock macro's (CMU) and lanes. |
---|
23 | 11 | * The first PLL clock macro is used for internal reference clock. The second |
---|
.. | .. |
---|
1354 | 1342 | static void xgene_phy_force_lat_summer_cal(struct xgene_phy_ctx *ctx, int lane) |
---|
1355 | 1343 | { |
---|
1356 | 1344 | int i; |
---|
1357 | | - struct { |
---|
| 1345 | + static const struct { |
---|
1358 | 1346 | u32 reg; |
---|
1359 | 1347 | u32 val; |
---|
1360 | 1348 | } serdes_reg[] = { |
---|
.. | .. |
---|
1627 | 1615 | |
---|
1628 | 1616 | if (args->args_count <= 0) |
---|
1629 | 1617 | return ERR_PTR(-EINVAL); |
---|
1630 | | - if (args->args[0] < MODE_SATA || args->args[0] >= MODE_MAX) |
---|
| 1618 | + if (args->args[0] >= MODE_MAX) |
---|
1631 | 1619 | return ERR_PTR(-EINVAL); |
---|
1632 | 1620 | |
---|
1633 | 1621 | ctx->mode = args->args[0]; |
---|