Example #1
0
static int mx28_evk_devices_init(void)
{
	int i;

	/* initizalize muxing */
	for (i = 0; i < ARRAY_SIZE(mx28evk_pads); i++)
		imx_gpio_mode(mx28evk_pads[i]);

	/* enable IOCLK0 to run at the PLL frequency */
	imx_set_ioclk(0, 480000000);
	/* run the SSP unit clock at 100 MHz */
	imx_set_sspclk(0, 100000000, 1);

	armlinux_set_bootparams((void *)IMX_MEMORY_BASE + 0x100);
	armlinux_set_architecture(MACH_TYPE_MX28EVK);

	add_generic_device("mxs_mci", 0, NULL, IMX_SSP0_BASE, 0x2000,
			   IORESOURCE_MEM, &mci_pdata);

	add_generic_device("stmfb", 0, NULL, IMX_FB_BASE, 0x2000,
			   IORESOURCE_MEM, &mx28_evk_fb_pdata);

	add_generic_device("ocotp", 0, NULL, IMX_OCOTP_BASE, 0x2000,
			IORESOURCE_MEM, NULL);
	mx28_evk_get_ethaddr(); /* must be after registering ocotp */

	imx_enable_enetclk();
	mx28_evk_fec_reset();
	add_generic_device("fec_imx", 0, NULL, IMX_FEC0_BASE, 0x4000,
			   IORESOURCE_MEM, &fec_info);

	return 0;
}
Example #2
0
static int mx23_evk_devices_init(void)
{
	int i, rc;

	/* initizalize gpios */
	for (i = 0; i < ARRAY_SIZE(pad_setup); i++)
		imx_gpio_mode(pad_setup[i]);

	armlinux_set_bootparams((void*)IMX_MEMORY_BASE + 0x100);
	armlinux_set_architecture(MACH_TYPE_MX23EVK);

	imx_set_ioclk(480000000); /* enable IOCLK to run at the PLL frequency */
	imx_set_sspclk(0, 100000000, 1);

	add_generic_device("mxs_mci", DEVICE_ID_DYNAMIC, NULL, IMX_SSP1_BASE,
					0x8000, IORESOURCE_MEM, &mci_pdata);

	rc = register_persistant_environment();
	if (rc != 0)
		printf("Cannot create the 'env0' persistant "
			 "environment storage (%d)\n", rc);

#ifdef CONFIG_USB_GADGET_DRIVER_ARC
	imx23_usb_phy_enable();
	add_generic_usb_ehci_device(DEVICE_ID_DYNAMIC, IMX_USB_BASE, NULL);
	add_generic_device("fsl-udc", DEVICE_ID_DYNAMIC, NULL, IMX_USB_BASE,
			   0x200, IORESOURCE_MEM, &usb_pdata);
#endif
	return 0;
}
Example #3
0
static int falconwing_devices_init(void)
{
	int i, rc;

	/* initizalize gpios */
	for (i = 0; i < ARRAY_SIZE(pad_setup); i++)
		imx_gpio_mode(pad_setup[i]);

	imx_set_ioclk(480000000); /* enable IOCLK to run at the PLL frequency */
	/* run the SSP unit clock at 100,000 kHz */
	imx_set_sspclk(0, 100000000, 1);
	add_generic_device("mxs_mci", 0, NULL, IMX_SSP1_BASE, 0,
			   IORESOURCE_MEM, &mci_pdata);
	add_generic_device("stmfb", 0, NULL, IMX_FB_BASE, 4096,
			   IORESOURCE_MEM, &fb_mode);

	falconwing_init_usb();

	armlinux_set_bootparams((void *)IMX_MEMORY_BASE + 0x100);
	armlinux_set_architecture(MACH_TYPE_CHUMBY);

	rc = register_persistant_environment();
	if (rc != 0)
		printf("Cannot create the 'env0' persistant environment storage (%d)\n", rc);

	return 0;
}
static int imx23_olinuxino_devices_init(void)
{
	int i, rc;


	/* initizalize gpios */
	for (i = 0; i < ARRAY_SIZE(pad_setup); i++)
		imx_gpio_mode(pad_setup[i]);

	armlinux_set_bootparams((void *)IMX_MEMORY_BASE + 0x100);
	armlinux_set_architecture(MACH_TYPE_IMX233_OLINUXINO);

	/* enable IOCLK to run at the PLL frequency */
	imx_set_ioclk(480000000);

	/* run the SSP unit clock at 100,000 kHz */
	imx_set_sspclk(0, 100000000, 1);

	add_generic_device("mxs_mci", DEVICE_ID_DYNAMIC, NULL, IMX_SSP1_BASE,
					0x8000, IORESOURCE_MEM, &mci_pdata);

	olinuxino_init_usb();

	rc = envfs_register_partition("disk0", 1);
	if (rc != 0)
		printf("Cannot create the 'env0' persistent "
			 "environment storage (%d)\n", rc);

	return 0;
}
Example #5
0
void base_board_init(void)
{
	int i, ret;

	/* initialize gpios */
	for (i = 0; i < ARRAY_SIZE(tx28_starterkit_pad_setup); i++)
		imx_gpio_mode(tx28_starterkit_pad_setup[i]);

	/* enable IOCLK0 to run at the PLL frequency */
	imx_set_ioclk(0, 480000000);
	/* run the SSP unit clock at 100 MHz */
	imx_set_sspclk(0, 100000000, 1);

	add_generic_device("mxs_mci", 0, NULL, IMX_SSP0_BASE, 0,
			   IORESOURCE_MEM, &mci_pdata);

	if (tx28_fb_pdata.fixed_screen < (void *)&_end) {
		printf("Warning: fixed_screen overlaps barebox\n");
		tx28_fb_pdata.fixed_screen = NULL;
	}

	add_generic_device("stmfb", 0, NULL, IMX_FB_BASE, 4096,
			   IORESOURCE_MEM, &tx28_fb_pdata);

	add_generic_device("ocotp", 0, NULL, IMX_OCOTP_BASE, 0,
			   IORESOURCE_MEM, NULL);

	tx28_get_ethaddr();

	imx_enable_enetclk();
	add_generic_device("fec_imx", 0, NULL, IMX_FEC0_BASE, 0,
			   IORESOURCE_MEM, &fec_info);

	ret = register_persistent_environment();
	if (ret != 0)
		printf("Cannot create the 'env0' persistent environment "
				"storage (%d)\n", ret);
}
Example #6
0
static int cfa10036_devices_init(void)
{
	int i;

	/* initizalize muxing */
	for (i = 0; i < ARRAY_SIZE(cfa10036_pads); i++)
		imx_gpio_mode(cfa10036_pads[i]);

	/* enable IOCLK0 to run at the PLL frequency */
	imx_set_ioclk(0, 480000000);
	/* run the SSP unit clock at 100 MHz */
	imx_set_sspclk(0, 100000000, 1);

	armlinux_set_bootparams((void *)IMX_MEMORY_BASE + 0x100);
	armlinux_set_architecture(MACH_TYPE_CFA10036);

	add_generic_device("mxs_mci", 0, NULL, IMX_SSP0_BASE, SZ_8K,
			   IORESOURCE_MEM, &mci_pdata);

	add_generic_device("ocotp", 0, NULL, IMX_OCOTP_BASE, SZ_8K,
			   IORESOURCE_MEM, NULL);

	return 0;
}