static int e9_devices_init(void) { int ret; char *environment_path; if (!of_machine_is_compatible("embedsky,e9")) return 0; armlinux_set_architecture(3980); environment_path = basprintf("/chosen/environment-mmc%d", bootsource_get_instance()); ret = of_device_enable_path(environment_path); if (ret < 0) pr_warn("Failed to enable environment partition '%s' (%d)\n", environment_path, ret); free(environment_path); defaultenv_append_directory(defaultenv_e9); imx6_bbu_internal_mmc_register_handler("sd", "/dev/mmc1", BBU_HANDLER_FLAG_DEFAULT); imx6_bbu_internal_mmc_register_handler("emmc", "/dev/mmc3", BBU_HANDLER_FLAG_DEFAULT); return 0; }
static int tqma6x_env_init(void) { void *flash_header_start; void *flash_header_end; if (of_machine_is_compatible("tq,tqma6s")) { flash_header_start = (void *)flash_header_tqma6dl_start; flash_header_end = (void *)flash_header_tqma6dl_end; } else if (of_machine_is_compatible("tq,tqma6q")) { flash_header_start = (void *)flash_header_tqma6q_start; flash_header_end = (void *)flash_header_tqma6q_end; } else { return 0; } devfs_add_partition("m25p0", 0, SZ_512K, DEVFS_PARTITION_FIXED, "m25p0.barebox"); imx6_bbu_internal_spi_i2c_register_handler("spiflash", "/dev/m25p0.barebox", BBU_HANDLER_FLAG_DEFAULT, (void *)flash_header_start, flash_header_end - flash_header_start, 0); imx6_bbu_internal_mmc_register_handler("emmc", "/dev/mmc2.boot0", 0, (void *)flash_header_start, flash_header_end - flash_header_start, 0); device_detect_by_name("mmc2"); default_environment_path = "/dev/mmc2.boot1"; return 0; }
static int hummingboard_late_init(void) { if (!of_machine_is_compatible("solidrun,hummingboard")) return 0; imx6_bbu_internal_mmc_register_handler("sdcard", "/dev/mmc1.barebox", BBU_HANDLER_FLAG_DEFAULT); return 0; }
static int realq7_env_init(void) { if (!of_machine_is_compatible("dmo,imx6q-edmqmx6")) return 0; imx6_bbu_internal_spi_i2c_register_handler("spiflash", "/dev/m25p0.barebox", BBU_HANDLER_FLAG_DEFAULT, NULL, 0, 0x00907000); imx6_bbu_internal_mmc_register_handler("mmc", "/dev/mmc3.barebox", 0, NULL, 0, 0x00907000); return 0; }
static int imx6sx_sdb_coredevices_init(void) { if (!of_machine_is_compatible("fsl,imx6sx-sdb")) return 0; imx6sx_sdb_setup_fec(); imx6_bbu_internal_mmc_register_handler("sd", "/dev/mmc3", BBU_HANDLER_FLAG_DEFAULT); return 0; }
static int wandboard_device_init(void) { if (!of_machine_is_compatible("wand,imx6dl-wandboard") && !of_machine_is_compatible("wand,imx6q-wandboard")) return 0; phy_register_fixup_for_uid(PHY_ID_AR8031, AR_PHY_ID_MASK, ar8031_phy_fixup); barebox_set_hostname("wandboard"); imx6_bbu_internal_mmc_register_handler("mmc", "/dev/mmc2.barebox", BBU_HANDLER_FLAG_DEFAULT); return 0; }
static int nxp_imx6ull_evk_init(void) { if (!of_machine_is_compatible("fsl,imx6ull-14x14-evk")) return 0; phy_register_fixup_for_uid(PHY_ID_KSZ8081, MICREL_PHY_ID_MASK, ksz8081_phy_fixup); imx6_bbu_internal_mmc_register_handler("mmc", "/dev/mmc1.barebox", BBU_HANDLER_FLAG_DEFAULT); barebox_set_hostname("imx6ull-evk"); return 0; }
static int tqma6x_env_init(void) { if (!of_machine_is_compatible("tq,mba6x")) return 0; devfs_add_partition("m25p0", 0, SZ_512K, DEVFS_PARTITION_FIXED, "m25p0.barebox"); imx6_bbu_internal_spi_i2c_register_handler("spiflash", "/dev/m25p0.barebox", BBU_HANDLER_FLAG_DEFAULT); imx6_bbu_internal_mmc_register_handler("emmc", "/dev/mmc2.boot0", 0); device_detect_by_name("mmc2"); default_environment_path_set("/dev/mmc2.boot1"); barebox_set_hostname("mba6x"); return 0; }
static int tx6x_devices_init(void) { void __iomem *src_base = IOMEM(MX6_SRC_BASE_ADDR); uint32_t sbmr1; if (!of_machine_is_compatible("karo,imx6dl-tx6dl") && !of_machine_is_compatible("karo,imx6q-tx6q")) return 0; barebox_set_hostname("tx6"); eth_init(); setup_pmic_voltages(); sbmr1 = readl(src_base + IMX6_SRC_SBMR1); /* * Check if this board is booted from eMMC or NAND to enable the * corresponding device. We can't use the regular bootsource * function here as it might return that we are in serial * downloader mode. Even if we are SBMR1[7] indicates whether * this board has eMMC or NAND. */ if (sbmr1 & (1 << 7)) { imx6_bbu_nand_register_handler("nand", BBU_HANDLER_FLAG_DEFAULT); of_device_enable_and_register_by_name("environment-nand"); of_device_enable_and_register_by_name("gpmi-nand@00112000"); } else { imx6_bbu_internal_mmc_register_handler("eMMC", "/dev/mmc3.boot0", BBU_HANDLER_FLAG_DEFAULT); of_device_enable_and_register_by_name("environment-emmc"); of_device_enable_and_register_by_name("usdhc@0219c000"); } return 0; }
static int dfi_fs700_m60_init(void) { unsigned flag_spi = 0, flag_mmc = 0; if (!of_machine_is_compatible("dfi,fs700-m60")) return 0; phy_register_fixup_for_uid(PHY_ID_AR8031, AR_PHY_ID_MASK, ar8031_phy_fixup); if (bootsource_get() == BOOTSOURCE_SPI) flag_spi |= BBU_HANDLER_FLAG_DEFAULT; else flag_mmc |= BBU_HANDLER_FLAG_DEFAULT; imx6_bbu_internal_mmc_register_handler("mmc", "/dev/mmc3.boot0", flag_mmc); imx6_bbu_internal_spi_i2c_register_handler("spiflash", "/dev/m25p0", flag_spi); armlinux_set_architecture(MACH_TYPE_MX6Q_SABRESD); return 0; }