Skip to content

Commit

Permalink
CLOCKSOURCE: mips-gic: Split clocksource and clockevent initialization
Browse files Browse the repository at this point in the history
This is preparation work for the introduction of clockevent frequency
update with a clock notifier. This is only possible when the device
is passed a clk struct, so let's split the legacy and devicetree
initialization.

Reviewed-by: Andrew Bresticker <[email protected]>
Signed-off-by: Ezequiel Garcia <[email protected]>
Acked-by: Daniel Lezcano <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: Thomas Gleixner <[email protected]>
Cc: James Hartley <[email protected]>
Cc: Govindraj Raja <[email protected]>
Cc: Damien Horsley <[email protected]>
Cc: James Hogan <[email protected]>
Cc: Ezequiel Garcia <[email protected]>
Patchwork: https://patchwork.linux-mips.org/patch/10781/
Signed-off-by: Ralf Baechle <[email protected]>
  • Loading branch information
Ezequiel Garcia authored and ralfbaechle committed Sep 3, 2015
1 parent f95ac85 commit 67d4e66
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions drivers/clocksource/mips-gic-timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,6 @@ static void __init __gic_clocksource_init(void)
ret = clocksource_register_hz(&gic_clocksource, gic_frequency);
if (ret < 0)
pr_warn("GIC: Unable to register clocksource\n");

gic_clockevent_init();

/* And finally start the counter */
gic_start_count();
}

void __init gic_clocksource_init(unsigned int frequency)
Expand All @@ -156,6 +151,10 @@ void __init gic_clocksource_init(unsigned int frequency)
GIC_LOCAL_TO_HWIRQ(GIC_LOCAL_INT_COMPARE);

__gic_clocksource_init();
gic_clockevent_init();

/* And finally start the counter */
gic_start_count();
}

static void __init gic_clocksource_of_init(struct device_node *node)
Expand Down Expand Up @@ -187,6 +186,10 @@ static void __init gic_clocksource_of_init(struct device_node *node)
}

__gic_clocksource_init();
gic_clockevent_init();

/* And finally start the counter */
gic_start_count();
}
CLOCKSOURCE_OF_DECLARE(mips_gic_timer, "mti,gic-timer",
gic_clocksource_of_init);

0 comments on commit 67d4e66

Please sign in to comment.