static int tx6x_devices_init(void) { if (!of_machine_is_compatible("karo,imx6dl-tx6dl") && !of_machine_is_compatible("karo,imx6q-tx6q")) return 0; barebox_set_hostname("tx6u"); eth_init(); setup_pmic_voltages(); imx6_bbu_nand_register_handler("nand", BBU_HANDLER_FLAG_DEFAULT); return 0; }
static int phytec_pfla02_init(void) { if (!of_machine_is_compatible("phytec,imx6q-pfla02") && !of_machine_is_compatible("phytec,imx6dl-pfla02") && !of_machine_is_compatible("phytec,imx6s-pfla02")) return 0; phyflex_err006282_workaround(); eth_phy_reset(); phy_register_fixup_for_uid(PHY_ID_KSZ9031, MICREL_PHY_ID_MASK, ksz9031rn_phy_fixup); imx6_bbu_nand_register_handler("nand", BBU_HANDLER_FLAG_DEFAULT); return 0; }
static int phytec_pcaaxl3_init(void) { if (!of_machine_is_compatible("phytec,imx6q-pcaaxl3")) return 0; switch (bootsource_get()) { case BOOTSOURCE_MMC: of_device_enable_path("/chosen/environment-sd"); break; default: case BOOTSOURCE_NAND: of_device_enable_path("/chosen/environment-nand"); break; } imx6_bbu_nand_register_handler("nand", BBU_HANDLER_FLAG_DEFAULT); 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; }