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; }
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); }