From a83e1bc06bef1dc155b7f4d9f96f2bfc315d4dd7 Mon Sep 17 00:00:00 2001 From: Joel Stanley Date: Wed, 13 Jul 2016 16:36:57 +0930 Subject: ARM: AST2500: add support Extracted from ast_sdk.v00.03.21 which is based on u-boot v2013. Signed-off-by: Joel Stanley --- arch/arm/mach-aspeed/cpuinfo.c | 46 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 arch/arm/mach-aspeed/cpuinfo.c (limited to 'arch/arm/mach-aspeed/cpuinfo.c') diff --git a/arch/arm/mach-aspeed/cpuinfo.c b/arch/arm/mach-aspeed/cpuinfo.c new file mode 100644 index 0000000000..45f70a8183 --- /dev/null +++ b/arch/arm/mach-aspeed/cpuinfo.c @@ -0,0 +1,46 @@ +/* + * This file is released under the terms of GPL v2 and any later version. + * See the file COPYING in the root directory of the source tree for details. + */ + +#include +#include +#include +#include +#include +#include + +#if defined(CONFIG_DISPLAY_CPUINFO) +int print_cpuinfo(void) +{ + char buf[32]; + ulong size = 0; + + ast_scu_revision_id(); + + ast_scu_sys_rest_info(); + +#ifdef AST_SOC_G5 + ast_scu_security_info(); +#endif + printf("PLL : %4s MHz\n", strmhz(buf, ast_get_clk_source())); + printf("CPU : %4s MHz\n", strmhz(buf, ast_get_h_pll_clk())); +#ifdef AST_SOC_G5 + printf("MEM : %4s MHz, EEC: %s, Cache: %s \n", + strmhz(buf, ast_get_m_pll_clk() * 2), + ast_sdmc_get_eec() ? "Enable" : "Disable", + ast_sdmc_get_cache() ? "Enable" : "Disable"); +#else + printf("MEM : %4s MHz, EEC:%s \n", + strmhz(buf, ast_get_m_pll_clk()), + ast_sdmc_get_eec() ? "Enable" : "Disable"); +#endif + size = ast_scu_get_vga_memsize(); + + puts("VGA : "); + print_size(size, "\n"); + + ast_scu_get_who_init_dram(); + return 0; +} +#endif -- cgit v1.2.1