.. | .. |
---|
13 | 13 | #define DRV_NAME "cavium_ptp" |
---|
14 | 14 | |
---|
15 | 15 | #define PCI_DEVICE_ID_CAVIUM_PTP 0xA00C |
---|
| 16 | +#define PCI_SUBSYS_DEVID_88XX_PTP 0xA10C |
---|
| 17 | +#define PCI_SUBSYS_DEVID_81XX_PTP 0XA20C |
---|
| 18 | +#define PCI_SUBSYS_DEVID_83XX_PTP 0xA30C |
---|
16 | 19 | #define PCI_DEVICE_ID_CAVIUM_RST 0xA00E |
---|
17 | 20 | |
---|
18 | 21 | #define PCI_PTP_BAR_NO 0 |
---|
.. | .. |
---|
83 | 86 | |
---|
84 | 87 | /** |
---|
85 | 88 | * cavium_ptp_adjfine() - Adjust ptp frequency |
---|
86 | | - * @ptp: PTP clock info |
---|
| 89 | + * @ptp_info: PTP clock info |
---|
87 | 90 | * @scaled_ppm: how much to adjust by, in parts per million, but with a |
---|
88 | 91 | * 16 bit binary fractional field |
---|
89 | 92 | */ |
---|
.. | .. |
---|
131 | 134 | |
---|
132 | 135 | /** |
---|
133 | 136 | * cavium_ptp_adjtime() - Adjust ptp time |
---|
134 | | - * @ptp: PTP clock info |
---|
| 137 | + * @ptp_info: PTP clock info |
---|
135 | 138 | * @delta: how much to adjust by, in nanosecs |
---|
136 | 139 | */ |
---|
137 | 140 | static int cavium_ptp_adjtime(struct ptp_clock_info *ptp_info, s64 delta) |
---|
.. | .. |
---|
152 | 155 | |
---|
153 | 156 | /** |
---|
154 | 157 | * cavium_ptp_gettime() - Get hardware clock time with adjustment |
---|
155 | | - * @ptp: PTP clock info |
---|
| 158 | + * @ptp_info: PTP clock info |
---|
156 | 159 | * @ts: timespec |
---|
157 | 160 | */ |
---|
158 | 161 | static int cavium_ptp_gettime(struct ptp_clock_info *ptp_info, |
---|
.. | .. |
---|
174 | 177 | |
---|
175 | 178 | /** |
---|
176 | 179 | * cavium_ptp_settime() - Set hardware clock time. Reset adjustment |
---|
177 | | - * @ptp: PTP clock info |
---|
| 180 | + * @ptp_info: PTP clock info |
---|
178 | 181 | * @ts: timespec |
---|
179 | 182 | */ |
---|
180 | 183 | static int cavium_ptp_settime(struct ptp_clock_info *ptp_info, |
---|
.. | .. |
---|
196 | 199 | |
---|
197 | 200 | /** |
---|
198 | 201 | * cavium_ptp_enable() - Request to enable or disable an ancillary feature. |
---|
199 | | - * @ptp: PTP clock info |
---|
| 202 | + * @ptp_info: PTP clock info |
---|
200 | 203 | * @rq: request |
---|
201 | 204 | * @on: is it on |
---|
202 | 205 | */ |
---|
.. | .. |
---|
277 | 280 | writeq(clock_comp, clock->reg_base + PTP_CLOCK_COMP); |
---|
278 | 281 | |
---|
279 | 282 | clock->ptp_clock = ptp_clock_register(&clock->ptp_info, dev); |
---|
280 | | - if (!clock->ptp_clock) { |
---|
281 | | - err = -ENODEV; |
---|
282 | | - goto error_stop; |
---|
283 | | - } |
---|
284 | 283 | if (IS_ERR(clock->ptp_clock)) { |
---|
285 | 284 | err = PTR_ERR(clock->ptp_clock); |
---|
286 | 285 | goto error_stop; |
---|
.. | .. |
---|
325 | 324 | } |
---|
326 | 325 | |
---|
327 | 326 | static const struct pci_device_id cavium_ptp_id_table[] = { |
---|
328 | | - { PCI_DEVICE(PCI_VENDOR_ID_CAVIUM, PCI_DEVICE_ID_CAVIUM_PTP) }, |
---|
| 327 | + { PCI_DEVICE_SUB(PCI_VENDOR_ID_CAVIUM, PCI_DEVICE_ID_CAVIUM_PTP, |
---|
| 328 | + PCI_VENDOR_ID_CAVIUM, PCI_SUBSYS_DEVID_88XX_PTP) }, |
---|
| 329 | + { PCI_DEVICE_SUB(PCI_VENDOR_ID_CAVIUM, PCI_DEVICE_ID_CAVIUM_PTP, |
---|
| 330 | + PCI_VENDOR_ID_CAVIUM, PCI_SUBSYS_DEVID_81XX_PTP) }, |
---|
| 331 | + { PCI_DEVICE_SUB(PCI_VENDOR_ID_CAVIUM, PCI_DEVICE_ID_CAVIUM_PTP, |
---|
| 332 | + PCI_VENDOR_ID_CAVIUM, PCI_SUBSYS_DEVID_83XX_PTP) }, |
---|
329 | 333 | { 0, } |
---|
330 | 334 | }; |
---|
331 | 335 | |
---|