void at91sam9m10ihd_devices_detect_hw(void) { at91sam9m10ihd_devices_detect_one("/dev/ds24310"); at91sam9m10ihd_devices_detect_one("/dev/ds24330"); pr_info("sn: 0x%x, rev: 0x%x\n", sn, rev); armlinux_set_revision(rev); armlinux_set_serial(sn); }
static void ek_set_board_type(void) { if (machine_is_at91sam9g20ek()) { armlinux_set_architecture(MACH_TYPE_AT91SAM9G20EK); if (IS_ENABLED(CONFIG_AT91_HAVE_2MMC)) armlinux_set_revision(HAVE_2MMC); } else { armlinux_set_architecture(MACH_TYPE_AT91SAM9260EK); } }
static void ek_set_board_revision(void) { u32 rev; #ifdef CONFIG_LCD_LG_LB043WQ1 rev = HAVE_LCD_LG_LB043WQ1; #else rev = HAVE_LCD_TRULY_TFT1N4633E; #endif armlinux_set_revision(rev); }
static int loco_pmic_init(void) { struct mc34708 *mc34708; int rev; mc34708 = mc34708_get(); if (!mc34708) { /* so we have a DA9053 based board */ printf("MCIMX53-START board 1.0\n"); armlinux_set_revision(loco_system_rev); return 0; } /* get the board revision from fuse */ rev = readl(MX53_IIM_BASE_ADDR + 0x878); set_board_rev(rev); printf("MCIMX53-START-R board 1.0 rev %c\n", (rev == 1) ? 'A' : 'B' ); armlinux_set_revision(loco_system_rev); return 0; }
void at91sam9x5ek_devices_detect_hw(void) { at91sam9x5ek_devices_detect_one("/dev/ds24310"); at91sam9x5ek_devices_detect_one("/dev/ds24311"); at91sam9x5ek_devices_detect_one("/dev/ds24330"); pr_info("sn: 0x%x, rev: 0x%x\n", sn, rev); armlinux_set_revision(rev); armlinux_set_serial(sn); if (at91sam9x5ek_cm_is_vendor(VENDOR_COGENT)) of_register_fixup(cm_cogent_fixup); }
static int f3s_pmic_init(void) { struct mc13xxx *mc13xxx; struct mc9sdz60 *mc9sdz60; int rev; mc13xxx = mc13xxx_get(); if (!mc13xxx) { printf("FAILED to get PMIC handle!\n"); return 0; } rev = f3s_get_rev(mc13xxx); switch (rev) { case MX35PDK_BOARD_REV_1: break; case MX35PDK_BOARD_REV_2: f3s_pmic_init_v2(mc13xxx); break; default: printf("FAILED to identify board revision!\n"); return 0; } set_board_rev(rev); printf("i.MX35 PDK CPU board version %d.\n", rev ); mc9sdz60 = mc9sdz60_get(); if (!mc9sdz60) { printf("FAILED to get mc9sdz60 handle!\n"); return 0; } f3s_pmic_init_all(mc9sdz60); armlinux_set_revision(imx35_3ds_system_rev); return 0; }
static int archosg9_devices_init(void){ i2c_register_board_info(0, i2c_devices, ARRAY_SIZE(i2c_devices)); omap44xx_add_i2c1(NULL); omap44xx_add_mmc1(NULL); #if defined(CONFIG_KEYBOARD_TWL6030) && defined(CONFIG_KEYBOARD_GPIO) add_generic_device_res("twl6030_pwrbtn", DEVICE_ID_DYNAMIC, 0, 0, &pwrbtn_data); add_gpio_keys_device(DEVICE_ID_DYNAMIC, &gk_data); #endif armlinux_set_bootparams((void *)0x80000100); /* * This should be: * armlinux_set_architecture(MACH_TYPE_OMAP4_ARCHOSG9); * But Archos has not registered it's board to arch/arm/tools/mach-types * So here there is the hardcoded value */ armlinux_set_architecture(5032); armlinux_set_revision(5); armlinux_set_atag_appender(archos_append_atags); return 0; }
static int efikamx_late_init(void) { int i; if (!of_machine_is_compatible("genesi,imx51-sb")) return 0; defaultenv_append_directory(defaultenv_efikasb); for (i = 0; i < ARRAY_SIZE(leds); i++) led_gpio_register(&leds[i]); led_set_trigger(LED_TRIGGER_HEARTBEAT, &leds[0].led); writew(0x0, MX51_WDOG_BASE_ADDR + 0x8); imx51_bbu_internal_mmc_register_handler("mmc", "/dev/mmc1", BBU_HANDLER_FLAG_DEFAULT); armlinux_set_architecture(2370); armlinux_set_revision(0x5100 | imx_silicon_revision()); return 0; }
static int loco_late_init(void) { struct mc13xxx *mc34708; int rev; if (!of_machine_is_compatible("fsl,imx53-qsb") && !of_machine_is_compatible("fsl,imx53-qsrb")) return 0; mc34708 = mc13xxx_get(); if (mc34708) { unsigned int val; int ret; /* get the board revision from fuse */ rev = readl(MX53_IIM_BASE_ADDR + 0x878); set_board_rev(rev); printf("MCIMX53-START-R board 1.0 rev %c\n", (rev == 1) ? 'A' : 'B' ); barebox_set_hostname("loco-r"); armlinux_set_revision(loco_system_rev); /* Set VDDGP to 1.25V for 1GHz on SW1 */ mc13xxx_reg_read(mc34708, MC13892_REG_SW_0, &val); val = (val & ~SWx_VOLT_MASK_MC34708) | SWx_1_250V_MC34708; ret = mc13xxx_reg_write(mc34708, MC13892_REG_SW_0, val); if (ret) { printf("Writing to REG_SW_0 failed: %d\n", ret); return ret; } /* Set VCC as 1.30V on SW2 */ mc13xxx_reg_read(mc34708, MC13892_REG_SW_1, &val); val = (val & ~SWx_VOLT_MASK_MC34708) | SWx_1_300V_MC34708; ret = mc13xxx_reg_write(mc34708, MC13892_REG_SW_1, val); if (ret) { printf("Writing to REG_SW_1 failed: %d\n", ret); return ret; } /* Set global reset timer to 4s */ mc13xxx_reg_read(mc34708, MC13892_REG_POWER_CTL2, &val); val = (val & ~TIMER_MASK_MC34708) | TIMER_4S_MC34708; ret = mc13xxx_reg_write(mc34708, MC13892_REG_POWER_CTL2, val); if (ret) { printf("Writing to REG_POWER_CTL2 failed: %d\n", ret); return ret; } /* Set VUSBSEL and VUSBEN for USB PHY supply*/ mc13xxx_reg_read(mc34708, MC13892_REG_MODE_0, &val); val |= (VUSBSEL_MC34708 | VUSBEN_MC34708); ret = mc13xxx_reg_write(mc34708, MC13892_REG_MODE_0, val); if (ret) { printf("Writing to REG_MODE_0 failed: %d\n", ret); return ret; } /* Set SWBST to 5V in auto mode */ val = SWBST_AUTO; ret = mc13xxx_reg_write(mc34708, SWBST_CTRL, val); if (ret) { printf("Writing to SWBST_CTRL failed: %d\n", ret); return ret; } } else { /* so we have a DA9053 based board */ printf("MCIMX53-START board 1.0\n"); barebox_set_hostname("loco"); armlinux_set_revision(loco_system_rev); } /* USB PWR enable */ gpio_direction_output(MX53_LOCO_USB_PWREN, 0); gpio_set_value(MX53_LOCO_USB_PWREN, 1); loco_fec_reset(); set_silicon_rev(imx_silicon_revision()); armlinux_set_architecture(MACH_TYPE_MX53_LOCO); imx53_bbu_internal_mmc_register_handler("mmc", "/dev/mmc0", BBU_HANDLER_FLAG_DEFAULT); return 0; }