9
0
Fork 0

imx: switch remaing board to resource

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
This commit is contained in:
Jean-Christophe PLAGNIOL-VILLARD 2011-07-29 15:17:24 +08:00
parent 005b35a13b
commit 4b68e2f5d6
6 changed files with 28 additions and 93 deletions

View File

@ -39,12 +39,6 @@ static struct mxs_mci_platform_data mci_pdata = {
.voltages = MMC_VDD_32_33 | MMC_VDD_33_34, /* fixed to 3.3 V */
};
static struct device_d mci_dev = {
.name = "mxs_mci",
.map_base = IMX_SSP1_BASE,
.platform_data = &mci_pdata,
};
#define GPIO_LCD_RESET 50
#define GPIO_LCD_BACKLIGHT 60
@ -98,13 +92,6 @@ static struct imx_fb_platformdata fb_mode = {
.fixed_screen_size = MAX_FB_SIZE,
};
static struct device_d ldcif_dev = {
.name = "stmfb",
.map_base = IMX_FB_BASE,
.size = 4096,
.platform_data = &fb_mode,
};
static const uint32_t pad_setup[] = {
/* may be not required as already done by the bootlet code */
#if 0
@ -357,8 +344,10 @@ static int falconwing_devices_init(void)
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);
register_device(&mci_dev);
register_device(&ldcif_dev);
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();
@ -375,15 +364,12 @@ static int falconwing_devices_init(void)
device_initcall(falconwing_devices_init);
static struct device_d falconwing_serial_device = {
.name = "stm_serial",
.map_base = IMX_DBGUART_BASE,
.size = 8192,
};
static int falconwing_console_init(void)
{
return register_device(&falconwing_serial_device);
add_generic_device("stm_serial", 0, NULL, IMX_DBGUART_BASE, 8192,
IORESOURCE_MEM, NULL);
return 0;
}
console_initcall(falconwing_console_init);

View File

@ -156,13 +156,6 @@ static struct fsl_usb2_platform_data usb_pdata = {
.phy_mode = FSL_USB2_PHY_UTMI,
};
static struct device_d usbotg_dev = {
.name = "fsl-udc",
.map_base = IMX_OTG_BASE,
.size = 0x200,
.platform_data = &usb_pdata,
};
#ifdef CONFIG_MMU
static void eukrea_cpuimx25_mmu_init(void)
{
@ -280,7 +273,8 @@ static int eukrea_cpuimx25_devices_init(void)
imx25_usb_init();
add_generic_usb_ehci_device(-1, IMX_OTG_BASE + 0x400, NULL);
#endif
register_device(&usbotg_dev);
add_generic_device("fsl-udc", -1, NULL, IMX_OTG_BASE, 0x200,
IORESOURCE_MEM, &usb_pdata);
armlinux_set_bootparams((void *)0x80000100);
armlinux_set_architecture(MACH_TYPE_EUKREA_CPUIMX25);

View File

@ -149,14 +149,6 @@ static struct imx_fb_platform_data eukrea_cpuimx27_fb_data = {
.lscr1 = 0x00120300,
.dmacr = 0x00020010,
};
static struct device_d imxfb_dev = {
.id = -1,
.name = "imxfb",
.map_base = 0x10021000,
.size = 0x1000,
.platform_data = &eukrea_cpuimx27_fb_data,
};
#endif
static int eukrea_cpuimx27_devices_init(void)
@ -252,7 +244,7 @@ static int eukrea_cpuimx27_devices_init(void)
printf("Using environment in %s Flash\n", envdev);
#ifdef CONFIG_DRIVER_VIDEO_IMX
register_device(&imxfb_dev);
imx_add_fb((void *)0x10021000, &eukrea_cpuimx27_fb_data);
gpio_direction_output(GPIO_PORTE | 5, 0);
gpio_set_value(GPIO_PORTE | 5, 1);
gpio_direction_output(GPIO_PORTA | 25, 0);
@ -267,19 +259,10 @@ static int eukrea_cpuimx27_devices_init(void)
device_initcall(eukrea_cpuimx27_devices_init);
#ifdef CONFIG_DRIVER_SERIAL_IMX
static struct device_d eukrea_cpuimx27_serial_device = {
.id = -1,
.name = "imx_serial",
.map_base = IMX_UART1_BASE,
.size = 4096,
};
#endif
static int eukrea_cpuimx27_console_init(void)
{
#ifdef CONFIG_DRIVER_SERIAL_IMX
register_device(&eukrea_cpuimx27_serial_device);
imx_add_uart((void *)IMX_UART1_BASE, -1);
#endif
/* configure 8 bit UART on cs3 */
FMCR &= ~0x2;

View File

@ -124,13 +124,6 @@ static struct fsl_usb2_platform_data usb_pdata = {
.operating_mode = FSL_USB2_DR_DEVICE,
.phy_mode = FSL_USB2_PHY_UTMI,
};
static struct device_d usbotg_dev = {
.name = "fsl-udc",
.map_base = IMX_OTG_BASE,
.size = 0x200,
.platform_data = &usb_pdata,
};
#endif
#ifdef CONFIG_MMU
@ -182,7 +175,8 @@ static int eukrea_cpuimx35_devices_init(void)
/* Workaround ENGcm09152 */
tmp = readl(IMX_OTG_BASE + 0x608);
writel(tmp | (1 << 23), IMX_OTG_BASE + 0x608);
register_device(&usbotg_dev);
add_generic_device("fsl-udc", -1, NULL, IMX_OTG_BASE, 0x200,
IORESOURCE_MEM, &usb_pdata);
#endif
armlinux_set_bootparams((void *)0x80000100);
armlinux_set_architecture(MACH_TYPE_EUKREA_CPUIMX35);

View File

@ -40,15 +40,12 @@ static int mx23_evk_devices_init(void)
device_initcall(mx23_evk_devices_init);
static struct device_d mx23_evk_serial_device = {
.name = "stm_serial",
.map_base = IMX_DBGUART_BASE,
.size = 8192,
};
static int mx23_evk_console_init(void)
{
return register_device(&mx23_evk_serial_device);
add_generic_device("stm_serial", 0, NULL, IMX_DBGUART_BASE, 8192,
IORESOURCE_MEM, NULL);
return 0;
}
console_initcall(mx23_evk_console_init);

View File

@ -35,24 +35,12 @@ static struct mxs_mci_platform_data mci_pdata = {
.f_max = 25000000,
};
static struct device_d mci_socket = {
.name = "mxs_mci",
.map_base = IMX_SSP0_BASE,
.platform_data = &mci_pdata,
};
/* PhyAD[0..2]=0, RMIISEL=1 */
static struct fec_platform_data fec_info = {
.xcv_type = RMII,
.phy_addr = 0,
};
static struct device_d fec_dev = {
.name = "fec_imx",
.map_base = IMX_FEC0_BASE,
.platform_data = &fec_info,
};
/*
* The TX28 EVK comes with a VGA connector. We can support many video modes
*
@ -215,13 +203,6 @@ static struct imx_fb_platformdata tx28_fb_pdata = {
.enable = tx28_fb_enable,
};
static struct device_d ldcif_dev = {
.name = "stmfb",
.map_base = IMX_FB_BASE,
.size = 4096,
.platform_data = &tx28_fb_pdata,
};
static const uint32_t tx28_starterkit_pad_setup[] = {
/*
* Part II of phy's initialization
@ -378,17 +359,20 @@ void base_board_init(void)
/* run the SSP unit clock at 100 MHz */
imx_set_sspclk(0, 100000000, 1);
register_device(&mci_socket);
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;
}
register_device(&ldcif_dev);
add_generic_device("stmfb", 0, NULL, IMX_FB_BASE, 4096,
IORESOURCE_MEM, &tx28_fb_pdata);
imx_enable_enetclk();
register_device(&fec_dev);
add_generic_device("fec_imx", 0, NULL, IMX_FEC0_BASE, 0,
IORESOURCE_MEM, &fec_info);
ret = register_persistent_environment();
if (ret != 0)
@ -396,15 +380,12 @@ void base_board_init(void)
"storage (%d)\n", ret);
}
static struct device_d tx28kit_serial_device = {
.name = "stm_serial",
.map_base = IMX_DBGUART_BASE,
.size = 8192,
};
static int tx28kit_console_init(void)
{
return register_device(&tx28kit_serial_device);
add_generic_device("stm_serial", 0, NULL, IMX_DBGUART_BASE, 8192,
IORESOURCE_MEM, NULL);
return 0;
}
console_initcall(tx28kit_console_init);