int print_cpuinfo(void) { int i = 0; u32 cpu_type = rmobile_get_cpu_type(); for (; i < ARRAY_SIZE(rmobile_cpuinfo); i++) { if (rmobile_cpuinfo[i].cpu_type == cpu_type) { printf("CPU: Renesas Electronics %s rev %d.%d\n", rmobile_cpuinfo[i].cpu_name, rmobile_get_cpu_rev_integer(), rmobile_get_cpu_rev_fraction()); break; } } return 0; }
void s_init(void) { struct rcar_rwdt *rwdt = (struct rcar_rwdt *)RWDT_BASE; struct rcar_swdt *swdt = (struct rcar_swdt *)SWDT_BASE; /* Watchdog init */ writel(0xA5A5A500, &rwdt->rwtcsra); writel(0xA5A5A500, &swdt->swtcsra); /* CPU frequency setting. Set to 1.4GHz */ if (rmobile_get_cpu_rev_integer() >= R8A7790_CUT_ES2X) { u32 stat = 0; u32 stc = ((1400 / CLK2MHZ(CONFIG_SYS_CLK_FREQ)) - 1) << PLL0_STC_BIT; clrsetbits_le32(PLL0CR, PLL0_STC_MASK, stc); do { stat = readl(PLLECR) & PLL0ST; } while (stat == 0x0); } /* QoS(Quality-of-Service) Init */ qos_init(); }