int board_init(void) { u32 cpu_type = rmobile_get_cpu_type(); /* adress of boot parameters */ gd->bd->bi_boot_params = CONFIG_SYS_TEXT_BASE + 0x50000; if (cpu_type == RMOBILE_CPU_TYPE_R8A7795) { /* GSX: force power and clock supply */ writel(0x0000001F, SYSC_PWRONCR2); while (readl(SYSC_PWRSR2) != 0x000003E0) mdelay(20); mstp_clrbits_le32(MSTPSR1, SMSTPCR1, GSX_MSTP112); } /* USB1 pull-up */ setbits_le32(PFC_PUEN6, PUEN_USB1_OVC | PUEN_USB1_PWEN); /* Configure the HSUSB block */ mstp_clrbits_le32(MSTPSR7, SMSTPCR7, HSUSB_MSTP704); /* Choice USB0SEL */ clrsetbits_le32(HSUSB_REG_UGCTRL2, HSUSB_REG_UGCTRL2_USB0SEL, HSUSB_REG_UGCTRL2_USB0SEL_EHCI); /* low power status */ setbits_le16(HSUSB_REG_LPSTS, HSUSB_REG_LPSTS_SUSPM_NORMAL); return 0; }
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; }
int board_fit_config_name_match(const char *name) { /* PRR driver is not available yet */ u32 cpu_type = rmobile_get_cpu_type(); if ((cpu_type == RMOBILE_CPU_TYPE_R8A7795) && !strcmp(name, "r8a7795-salvator-x-u-boot")) return 0; if ((cpu_type == RMOBILE_CPU_TYPE_R8A7796) && !strcmp(name, "r8a7796-salvator-x-u-boot")) return 0; if ((cpu_type == RMOBILE_CPU_TYPE_R8A77965) && !strcmp(name, "r8a77965-salvator-x-u-boot")) return 0; return -1; }
void rcar_gen3_memmap_fixup(void) { u32 cpu_type = rmobile_get_cpu_type(); switch (cpu_type) { case RMOBILE_CPU_TYPE_R8A7795: mem_map = r8a7795_mem_map; break; case RMOBILE_CPU_TYPE_R8A7796: case RMOBILE_CPU_TYPE_R8A77965: mem_map = r8a7796_mem_map; break; case RMOBILE_CPU_TYPE_R8A77970: mem_map = r8a77970_mem_map; break; case RMOBILE_CPU_TYPE_R8A77995: mem_map = r8a77995_mem_map; break; } }