Skip to content

Commit 8c274d6

Browse files
DanielmachonPaolo Abeni
authored andcommitted
net: sparx5: ops out PTP IRQ handler
The PTP registers are located in two different register targets on Sparx5 and lan969x. We can't handle this with the register macros, so ops out the handler. Reviewed-by: Steen Hegelund <[email protected]> Reviewed-by: Jacob Keller <[email protected]> Signed-off-by: Daniel Machon <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
1 parent b7e09dd commit 8c274d6

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

drivers/net/ethernet/microchip/sparx5/sparx5_main.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,7 @@ static int sparx5_start(struct sparx5 *sparx5)
605605
{
606606
u8 broadcast[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
607607
const struct sparx5_consts *consts = sparx5->data->consts;
608+
const struct sparx5_ops *ops = sparx5->data->ops;
608609
char queue_name[32];
609610
u32 idx;
610611
int err;
@@ -729,7 +730,7 @@ static int sparx5_start(struct sparx5 *sparx5)
729730

730731
if (sparx5->ptp_irq >= 0) {
731732
err = devm_request_threaded_irq(sparx5->dev, sparx5->ptp_irq,
732-
NULL, sparx5_ptp_irq_handler,
733+
NULL, ops->ptp_irq_handler,
733734
IRQF_ONESHOT, "sparx5-ptp",
734735
sparx5);
735736
if (err)
@@ -993,6 +994,7 @@ static const struct sparx5_ops sparx5_ops = {
993994
.get_hsch_max_group_rate = &sparx5_get_hsch_max_group_rate,
994995
.get_sdlb_group = &sparx5_get_sdlb_group,
995996
.set_port_mux = &sparx5_port_mux_set,
997+
.ptp_irq_handler = &sparx5_ptp_irq_handler,
996998
};
997999

9981000
static const struct sparx5_match_data sparx5_desc = {

drivers/net/ethernet/microchip/sparx5/sparx5_main.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,8 @@ struct sparx5_ops {
269269
struct sparx5_sdlb_group *(*get_sdlb_group)(int idx);
270270
int (*set_port_mux)(struct sparx5 *sparx5, struct sparx5_port *port,
271271
struct sparx5_port_config *conf);
272+
273+
irqreturn_t (*ptp_irq_handler)(int irq, void *args);
272274
};
273275

274276
struct sparx5_main_io_resource {

0 commit comments

Comments
 (0)