diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2011-07-29 15:17:24 +0800 |
---|---|---|
committer | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2011-07-30 02:05:27 +0800 |
commit | 4b68e2f5d6bde89e37799d4f2d6bf732e8a4d16c (patch) | |
tree | 4b3e59f29fdf61092cb3e510845efaa96a17c368 /arch/arm/boards/karo-tx28 | |
parent | 005b35a13b856c59d64af792dab415b0b9dbd49f (diff) | |
download | barebox-4b68e2f5d6bde89e37799d4f2d6bf732e8a4d16c.tar.gz barebox-4b68e2f5d6bde89e37799d4f2d6bf732e8a4d16c.tar.xz |
imx: switch remaing board to resource
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'arch/arm/boards/karo-tx28')
-rw-r--r-- | arch/arm/boards/karo-tx28/tx28-stk5.c | 39 |
1 files changed, 10 insertions, 29 deletions
diff --git a/arch/arm/boards/karo-tx28/tx28-stk5.c b/arch/arm/boards/karo-tx28/tx28-stk5.c index 81cb80c7e0..8427dc2391 100644 --- a/arch/arm/boards/karo-tx28/tx28-stk5.c +++ b/arch/arm/boards/karo-tx28/tx28-stk5.c @@ -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); |