mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	Old early platform device support is now sh-specific. Before moving on to implementing new early platform framework based on real platform devices, prefix all early platform symbols with 'sh_'. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Cc: Rich Felker <dalias@libc.org> Link: https://lore.kernel.org/r/20191003092913.10731-3-brgl@bgdev.pl Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
		
			
				
	
	
		
			45 lines
		
	
	
	
		
			1.2 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			45 lines
		
	
	
	
		
			1.2 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
// SPDX-License-Identifier: GPL-2.0
 | 
						|
/*
 | 
						|
 *  arch/sh/kernel/time.c
 | 
						|
 *
 | 
						|
 *  Copyright (C) 1999  Tetsuya Okada & Niibe Yutaka
 | 
						|
 *  Copyright (C) 2000  Philipp Rumpf <prumpf@tux.org>
 | 
						|
 *  Copyright (C) 2002 - 2009  Paul Mundt
 | 
						|
 *  Copyright (C) 2002  M. R. Brown  <mrbrown@linux-sh.org>
 | 
						|
 */
 | 
						|
#include <linux/kernel.h>
 | 
						|
#include <linux/init.h>
 | 
						|
#include <linux/profile.h>
 | 
						|
#include <linux/timex.h>
 | 
						|
#include <linux/sched.h>
 | 
						|
#include <linux/clockchips.h>
 | 
						|
#include <linux/platform_device.h>
 | 
						|
#include <linux/smp.h>
 | 
						|
#include <linux/rtc.h>
 | 
						|
#include <asm/clock.h>
 | 
						|
#include <asm/rtc.h>
 | 
						|
#include <asm/platform_early.h>
 | 
						|
 | 
						|
static void __init sh_late_time_init(void)
 | 
						|
{
 | 
						|
	/*
 | 
						|
	 * Make sure all compiled-in early timers register themselves.
 | 
						|
	 *
 | 
						|
	 * Run probe() for two "earlytimer" devices, these will be the
 | 
						|
	 * clockevents and clocksource devices respectively. In the event
 | 
						|
	 * that only a clockevents device is available, we -ENODEV on the
 | 
						|
	 * clocksource and the jiffies clocksource is used transparently
 | 
						|
	 * instead. No error handling is necessary here.
 | 
						|
	 */
 | 
						|
	sh_early_platform_driver_register_all("earlytimer");
 | 
						|
	sh_early_platform_driver_probe("earlytimer", 2, 0);
 | 
						|
}
 | 
						|
 | 
						|
void __init time_init(void)
 | 
						|
{
 | 
						|
	timer_probe();
 | 
						|
 | 
						|
	clk_init();
 | 
						|
 | 
						|
	late_time_init = sh_late_time_init;
 | 
						|
}
 |