.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /** |
---|
2 | 3 | * 1588 PTP support for Cadence GEM device. |
---|
3 | 4 | * |
---|
4 | | - * Copyright (C) 2017 Cadence Design Systems - http://www.cadence.com |
---|
| 5 | + * Copyright (C) 2017 Cadence Design Systems - https://www.cadence.com |
---|
5 | 6 | * |
---|
6 | 7 | * Authors: Rafal Ozieblo <rafalo@cadence.com> |
---|
7 | 8 | * Bartosz Folta <bfolta@cadence.com> |
---|
8 | | - * |
---|
9 | | - * This program is free software: you can redistribute it and/or modify |
---|
10 | | - * it under the terms of the GNU General Public License version 2 of |
---|
11 | | - * the License as published by the Free Software Foundation. |
---|
12 | | - * |
---|
13 | | - * This program is distributed in the hope that it will be useful, |
---|
14 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
15 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
16 | | - * GNU General Public License for more details. |
---|
17 | | - * |
---|
18 | | - * You should have received a copy of the GNU General Public License |
---|
19 | | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
---|
20 | 9 | */ |
---|
21 | 10 | #include <linux/kernel.h> |
---|
22 | 11 | #include <linux/types.h> |
---|
.. | .. |
---|
149 | 138 | * (temp / USEC_PER_SEC) + 0.5 |
---|
150 | 139 | */ |
---|
151 | 140 | adj += (USEC_PER_SEC >> 1); |
---|
152 | | - adj >>= GEM_SUBNSINCR_SIZE; /* remove fractions */ |
---|
| 141 | + adj >>= PPM_FRACTION; /* remove fractions */ |
---|
153 | 142 | adj = div_u64(adj, USEC_PER_SEC); |
---|
154 | 143 | adj = neg_adj ? (word - adj) : (word + adj); |
---|
155 | 144 | |
---|
.. | .. |
---|
480 | 469 | case HWTSTAMP_TX_ONESTEP_SYNC: |
---|
481 | 470 | if (gem_ptp_set_one_step_sync(bp, 1) != 0) |
---|
482 | 471 | return -ERANGE; |
---|
483 | | - /* fall through */ |
---|
| 472 | + fallthrough; |
---|
484 | 473 | case HWTSTAMP_TX_ON: |
---|
485 | 474 | tx_bd_control = TSTAMP_ALL_FRAMES; |
---|
486 | 475 | break; |
---|