コード例 #1
0
ファイル: board.c プロジェクト: AshishNamdev/barebox
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;
}
コード例 #2
0
ファイル: board.c プロジェクト: masahir0y/barebox-yamada
static int rdu2_devices_init(void)
{
	struct i2c_client client;

	if (!of_machine_is_compatible("zii,imx6q-zii-rdu2") &&
	    !of_machine_is_compatible("zii,imx6qp-zii-rdu2"))
		return 0;

	client.adapter = i2c_get_adapter(1);
	if (client.adapter) {
		u8 reg;

		/*
		 * Reset PMIC SW1AB and SW1C rails to 1.375V. If an event
		 * caused only the i.MX6 SoC reset, the PMIC might still be
		 * stuck on the low voltage for the slow operating point.
		 */
		client.addr = 0x08; /* PMIC i2c address */
		reg = 0x2b; /* 1.375V, valid for both rails */
		i2c_write_reg(&client, 0x20, &reg, 1);
		i2c_write_reg(&client, 0x2e, &reg, 1);
	}

	barebox_set_hostname("rdu2");

	imx6_bbu_internal_spi_i2c_register_handler("SPI", "/dev/m25p0.barebox",
						   BBU_HANDLER_FLAG_DEFAULT);

	imx6_bbu_internal_mmcboot_register_handler("eMMC", "/dev/mmc3", 0);

	defaultenv_append_directory(defaultenv_rdu2);

	return 0;
}
コード例 #3
0
ファイル: board.c プロジェクト: AubrCool/barebox
static int hipercam_init(void)
{
	if (!of_machine_is_compatible("eltec,hipercam-rev01"))
		return 0;

	imx6_bbu_internal_spi_i2c_register_handler("nor", "/dev/m25p0.barebox",
			BBU_HANDLER_FLAG_DEFAULT);

	return 0;
}
コード例 #4
0
ファイル: board.c プロジェクト: bmourit/barebox
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;
}
コード例 #5
0
ファイル: board.c プロジェクト: AubrCool/barebox
static int nitrogen6x_devices_init(void)
{
	if (!of_machine_is_compatible("fsl,imx6dl-nitrogen6x") &&
	    !of_machine_is_compatible("fsl,imx6q-nitrogen6x"))
		return 0;

	imx6_bbu_internal_spi_i2c_register_handler("spiflash", "/dev/m25p0.barebox",
			BBU_HANDLER_FLAG_DEFAULT);

	barebox_set_hostname("nitrogen6x");

	return 0;
}
コード例 #6
0
ファイル: board.c プロジェクト: RobertCNelson/barebox
static int sabrelite_devices_init(void)
{
	if (!of_machine_is_compatible("fsl,imx6q-sabrelite") &&
	    !of_machine_is_compatible("fsl,imx6dl-sabrelite"))
		return 0;

	sabrelite_ehci_init();

	armlinux_set_architecture(3769);

	imx6_bbu_internal_spi_i2c_register_handler("spiflash", "/dev/m25p0.barebox",
			BBU_HANDLER_FLAG_DEFAULT);

	return 0;
}
コード例 #7
0
ファイル: board.c プロジェクト: MinimumLaw/ravion-barebox
static int rdu2_devices_init(void)
{
	if (!of_machine_is_compatible("zii,imx6q-zii-rdu2") &&
	    !of_machine_is_compatible("zii,imx6qp-zii-rdu2"))
		return 0;

	barebox_set_hostname("rdu2");

	imx6_bbu_internal_spi_i2c_register_handler("SPI", "/dev/m25p0.barebox",
						   BBU_HANDLER_FLAG_DEFAULT);

	imx6_bbu_internal_mmcboot_register_handler("eMMC", "/dev/mmc3", 0);

	defaultenv_append_directory(defaultenv_rdu2);

	return 0;
}
コード例 #8
0
ファイル: board.c プロジェクト: jiangxilong/barebox
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;
}
コード例 #9
0
ファイル: board.c プロジェクト: AubrCool/barebox
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;
}