hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/phy/phy-xgene.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * AppliedMicro X-Gene Multi-purpose PHY driver
34 *
....@@ -5,19 +6,6 @@
56 * Author: Loc Ho <lho@apm.com>
67 * Tuan Phan <tphan@apm.com>
78 * 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/>.
219 *
2210 * The APM X-Gene PHY consists of two PLL clock macro's (CMU) and lanes.
2311 * The first PLL clock macro is used for internal reference clock. The second
....@@ -1354,7 +1342,7 @@
13541342 static void xgene_phy_force_lat_summer_cal(struct xgene_phy_ctx *ctx, int lane)
13551343 {
13561344 int i;
1357
- struct {
1345
+ static const struct {
13581346 u32 reg;
13591347 u32 val;
13601348 } serdes_reg[] = {
....@@ -1627,7 +1615,7 @@
16271615
16281616 if (args->args_count <= 0)
16291617 return ERR_PTR(-EINVAL);
1630
- if (args->args[0] < MODE_SATA || args->args[0] >= MODE_MAX)
1618
+ if (args->args[0] >= MODE_MAX)
16311619 return ERR_PTR(-EINVAL);
16321620
16331621 ctx->mode = args->args[0];