mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-18 10:48:51 +00:00
83d290c56f
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
55 lines
1.2 KiB
C
55 lines
1.2 KiB
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* (C) Copyright 2010
|
|
* Reinhard Meyer, reinhard.meyer@emk-elektronik.de
|
|
* (C) Copyright 2009
|
|
* Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
|
|
*/
|
|
|
|
#include <common.h>
|
|
#include <asm/io.h>
|
|
#include <asm/arch/hardware.h>
|
|
#include <asm/arch/at91_pit.h>
|
|
#include <asm/arch/at91_gpbr.h>
|
|
#include <asm/arch/clk.h>
|
|
|
|
#ifndef CONFIG_SYS_AT91_MAIN_CLOCK
|
|
#define CONFIG_SYS_AT91_MAIN_CLOCK 0
|
|
#endif
|
|
|
|
int arch_cpu_init(void)
|
|
{
|
|
return at91_clock_init(CONFIG_SYS_AT91_MAIN_CLOCK);
|
|
}
|
|
|
|
void arch_preboot_os(void)
|
|
{
|
|
ulong cpiv;
|
|
at91_pit_t *pit = (at91_pit_t *) ATMEL_BASE_PIT;
|
|
|
|
cpiv = AT91_PIT_MR_PIV_MASK(readl(&pit->piir));
|
|
|
|
/*
|
|
* Disable PITC
|
|
* Add 0x1000 to current counter to stop it faster
|
|
* without waiting for wrapping back to 0
|
|
*/
|
|
writel(cpiv + 0x1000, &pit->mr);
|
|
}
|
|
|
|
#if defined(CONFIG_DISPLAY_CPUINFO)
|
|
int print_cpuinfo(void)
|
|
{
|
|
char __maybe_unused buf[32];
|
|
|
|
printf("CPU: %s\n", ATMEL_CPU_NAME);
|
|
printf("Crystal frequency: %8s MHz\n",
|
|
strmhz(buf, get_main_clk_rate()));
|
|
printf("CPU clock : %8s MHz\n",
|
|
strmhz(buf, get_cpu_clk_rate()));
|
|
printf("Master clock : %8s MHz\n",
|
|
strmhz(buf, get_mck_clk_rate()));
|
|
|
|
return 0;
|
|
}
|
|
#endif
|