mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 20:00:53 +07:00
ARM: versatile: use new init_early for clock tree and sched_clock init
Initialize the clock tree and our sched_clock() early. Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
c735c9873d
commit
ad3bb19c5b
@ -762,14 +762,21 @@ static void versatile_leds_event(led_event_t ledevt)
|
||||
}
|
||||
#endif /* CONFIG_LEDS */
|
||||
|
||||
/* Early initializations */
|
||||
void __init versatile_init_early(void)
|
||||
{
|
||||
void __iomem *sys = __io_address(VERSATILE_SYS_BASE);
|
||||
|
||||
osc4_clk.vcoreg = sys + VERSATILE_SYS_OSCCLCD_OFFSET;
|
||||
clkdev_add_table(lookups, ARRAY_SIZE(lookups));
|
||||
|
||||
versatile_sched_clock_init(sys + VERSATILE_SYS_24MHz_OFFSET, 24000000);
|
||||
}
|
||||
|
||||
void __init versatile_init(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
osc4_clk.vcoreg = __io_address(VERSATILE_SYS_BASE) + VERSATILE_SYS_OSCCLCD_OFFSET;
|
||||
|
||||
clkdev_add_table(lookups, ARRAY_SIZE(lookups));
|
||||
|
||||
platform_device_register(&versatile_flash_device);
|
||||
platform_device_register(&versatile_i2c_device);
|
||||
platform_device_register(&smc91x_device);
|
||||
@ -785,12 +792,6 @@ void __init versatile_init(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
* The sched_clock counter
|
||||
*/
|
||||
#define REFCOUNTER (__io_address(VERSATILE_SYS_BASE) + \
|
||||
VERSATILE_SYS_24MHz_OFFSET)
|
||||
|
||||
/*
|
||||
* Where is the timer (VA)?
|
||||
*/
|
||||
@ -806,8 +807,6 @@ static void __init versatile_timer_init(void)
|
||||
{
|
||||
u32 val;
|
||||
|
||||
versatile_sched_clock_init(REFCOUNTER, 24000000);
|
||||
|
||||
/*
|
||||
* set clock frequency:
|
||||
* VERSATILE_REFCLK is 32KHz
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include <linux/amba/bus.h>
|
||||
|
||||
extern void __init versatile_init(void);
|
||||
extern void __init versatile_init_early(void);
|
||||
extern void __init versatile_init_irq(void);
|
||||
extern void __init versatile_map_io(void);
|
||||
extern struct sys_timer versatile_timer;
|
||||
|
@ -37,6 +37,7 @@ MACHINE_START(VERSATILE_AB, "ARM-Versatile AB")
|
||||
/* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
|
||||
.boot_params = 0x00000100,
|
||||
.map_io = versatile_map_io,
|
||||
.init_early = versatile_init_early,
|
||||
.init_irq = versatile_init_irq,
|
||||
.timer = &versatile_timer,
|
||||
.init_machine = versatile_init,
|
||||
|
@ -110,6 +110,7 @@ MACHINE_START(VERSATILE_PB, "ARM-Versatile PB")
|
||||
/* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
|
||||
.boot_params = 0x00000100,
|
||||
.map_io = versatile_map_io,
|
||||
.init_early = versatile_init_early,
|
||||
.init_irq = versatile_init_irq,
|
||||
.timer = &versatile_timer,
|
||||
.init_machine = versatile_pb_init,
|
||||
|
Loading…
Reference in New Issue
Block a user