Beispiel #1
0
static void __init mx28evk_init(void)
{
	int ret;

	mxs_iomux_setup_multiple_pads(mx28evk_pads, ARRAY_SIZE(mx28evk_pads));

	mx28_add_duart();
	mx28_add_auart0();
	mx28_add_auart3();

	if (mx28evk_fec_get_mac())
		pr_warn("%s: failed on fec mac setup\n", __func__);

	mx28evk_fec_reset();
	mx28_add_fec(0, &mx28_fec_pdata[0]);
	mx28_add_fec(1, &mx28_fec_pdata[1]);

	ret = gpio_request_one(MX28EVK_FLEXCAN_SWITCH, GPIOF_DIR_OUT,
				"flexcan-switch");
	if (ret) {
		pr_err("failed to request gpio flexcan-switch: %d\n", ret);
	} else {
		mx28_add_flexcan(0, &mx28evk_flexcan_pdata[0]);
		mx28_add_flexcan(1, &mx28evk_flexcan_pdata[1]);
	}

	ret = gpio_request_one(MX28EVK_LCD_ENABLE, GPIOF_DIR_OUT, "lcd-enable");
	if (ret)
		pr_warn("failed to request gpio lcd-enable: %d\n", ret);
	else
		gpio_set_value(MX28EVK_LCD_ENABLE, 1);

	ret = gpio_request_one(MX28EVK_BL_ENABLE, GPIOF_DIR_OUT, "bl-enable");
	if (ret)
		pr_warn("failed to request gpio bl-enable: %d\n", ret);
	else
		gpio_set_value(MX28EVK_BL_ENABLE, 1);

	mx28_add_mxsfb(&mx28evk_mxsfb_pdata);

	/* power on mmc slot by writing 0 to the gpio */
	ret = gpio_request_one(MX28EVK_MMC0_SLOT_POWER, GPIOF_OUT_INIT_LOW,
			       "mmc0-slot-power");
	if (ret)
		pr_warn("failed to request gpio mmc0-slot-power: %d\n", ret);
	mx28_add_mxs_mmc(0, &mx28evk_mmc_pdata[0]);

	ret = gpio_request_one(MX28EVK_MMC1_SLOT_POWER, GPIOF_OUT_INIT_LOW,
			       "mmc1-slot-power");
	if (ret)
		pr_warn("failed to request gpio mmc1-slot-power: %d\n", ret);
	mx28_add_mxs_mmc(1, &mx28evk_mmc_pdata[1]);

	gpio_led_register_device(0, &mx28evk_led_data);
}
Beispiel #2
0
static void __init mx28evk_init(void)
{
	int ret;

	mx28_soc_init();

	mxs_iomux_setup_multiple_pads(mx28evk_pads, ARRAY_SIZE(mx28evk_pads));

	mx28_add_duart();
	mx28_add_auart0();
	mx28_add_auart3();

	if (mx28evk_fec_get_mac())
		pr_warn("%s: failed on fec mac setup\n", __func__);

	ret = gpio_request_array(mx28evk_gpios, ARRAY_SIZE(mx28evk_gpios));
	if (ret)
		pr_err("One or more GPIOs failed to be requested: %d\n", ret);

	mx28evk_fec_reset();
	mx28_add_fec(0, &mx28_fec_pdata[0]);
	mx28_add_fec(1, &mx28_fec_pdata[1]);

	mx28_add_flexcan(0, &mx28evk_flexcan_pdata[0]);
	mx28_add_flexcan(1, &mx28evk_flexcan_pdata[1]);

	mx28_add_mxsfb(&mx28evk_mxsfb_pdata);

	mxs_saif_clkmux_select(MXS_DIGCTL_SAIF_CLKMUX_EXTMSTR0);
	mx28_add_saif(0, &mx28evk_mxs_saif_pdata[0]);
	mx28_add_saif(1, &mx28evk_mxs_saif_pdata[1]);

	mx28_add_mxs_i2c(0);
	i2c_register_board_info(0, mxs_i2c0_board_info,
				ARRAY_SIZE(mxs_i2c0_board_info));

	mx28evk_add_regulators();

	mxs_add_platform_device("mxs-sgtl5000", 0, NULL, 0,
			NULL, 0);

	mx28_add_mxs_mmc(0, &mx28evk_mmc_pdata[0]);
	mx28_add_mxs_mmc(1, &mx28evk_mmc_pdata[1]);

	mx28_add_rtc_stmp3xxx();

	gpio_led_register_device(0, &mx28evk_led_data);
}
Beispiel #3
0
static void __init mx28evk_init(void)
{
	int ret;

	mxs_iomux_setup_multiple_pads(mx28evk_pads, ARRAY_SIZE(mx28evk_pads));

	mx28_add_duart();
	mx28_add_auart0();
	mx28_add_auart3();

	if (mx28evk_fec_get_mac())
		pr_warn("%s: failed on fec mac setup\n", __func__);

	mx28evk_fec_reset();
	mx28_add_fec(0, &mx28_fec_pdata[0]);
	mx28_add_fec(1, &mx28_fec_pdata[1]);

	ret = gpio_request_one(MX28EVK_FLEXCAN_SWITCH, GPIOF_DIR_OUT,
				"flexcan-switch");
	if (ret) {
		pr_err("failed to request gpio flexcan-switch: %d\n", ret);
	} else {
		mx28_add_flexcan(0, &mx28evk_flexcan_pdata[0]);
		mx28_add_flexcan(1, &mx28evk_flexcan_pdata[1]);
	}

	ret = gpio_request_one(MX28EVK_LCD_ENABLE, GPIOF_DIR_OUT, "lcd-enable");
	if (ret)
		pr_warn("failed to request gpio lcd-enable: %d\n", ret);
	else
		gpio_set_value(MX28EVK_LCD_ENABLE, 1);

	ret = gpio_request_one(MX28EVK_BL_ENABLE, GPIOF_DIR_OUT, "bl-enable");
	if (ret)
		pr_warn("failed to request gpio bl-enable: %d\n", ret);
	else
		gpio_set_value(MX28EVK_BL_ENABLE, 1);

	mx28_add_gpmi_nfc(&mx28evk_gpmi_nfc_data);
	mx28_add_mxsfb(&mx28evk_mxsfb_pdata);
}