diff options
author | Alejandro Mery <amery@hanoverdisplays.com> | 2017-12-05 07:34:56 -0500 |
---|---|---|
committer | Sekhar Nori <nsekhar@ti.com> | 2017-12-07 00:46:51 -0500 |
commit | b638823a7bbd251d442042b0e9522100bdaa5b66 (patch) | |
tree | 4b73e2760ff7584dd1ffda55a957defded083371 | |
parent | 4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323 (diff) |
ARM: davinci: Use platform_device_register_full() to create pdev for dm365's eDMA
Convert the DM365 EDMA platform device creation to use
struct platform_device_info XXXXXX __initconst and
platform_device_register_full()
This will allow us to specify the dma_mask for the device
in an upcoming patch. Without this, EDMA on DM365 refuses
to probe.
Fixes: 7ab388e85faa ("ARM: davinci: Use platform_device_register_full() to create pdev for eDMA")
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Alejandro Mery <amery@hanoverdisplays.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
-rw-r--r-- | arch/arm/mach-davinci/dm365.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c index 8be04ec95adf..9bd17bc77b5c 100644 --- a/arch/arm/mach-davinci/dm365.c +++ b/arch/arm/mach-davinci/dm365.c | |||
@@ -925,12 +925,13 @@ static struct resource edma_resources[] = { | |||
925 | /* not using TC*_ERR */ | 925 | /* not using TC*_ERR */ |
926 | }; | 926 | }; |
927 | 927 | ||
928 | static struct platform_device dm365_edma_device = { | 928 | static const struct platform_device_info dm365_edma_device __initconst = { |
929 | .name = "edma", | 929 | .name = "edma", |
930 | .id = 0, | 930 | .id = 0, |
931 | .dev.platform_data = &dm365_edma_pdata, | 931 | .res = edma_resources, |
932 | .num_resources = ARRAY_SIZE(edma_resources), | 932 | .num_res = ARRAY_SIZE(edma_resources), |
933 | .resource = edma_resources, | 933 | .data = &dm365_edma_pdata, |
934 | .size_data = sizeof(dm365_edma_pdata), | ||
934 | }; | 935 | }; |
935 | 936 | ||
936 | static struct resource dm365_asp_resources[] = { | 937 | static struct resource dm365_asp_resources[] = { |
@@ -1428,13 +1429,18 @@ int __init dm365_init_video(struct vpfe_config *vpfe_cfg, | |||
1428 | 1429 | ||
1429 | static int __init dm365_init_devices(void) | 1430 | static int __init dm365_init_devices(void) |
1430 | { | 1431 | { |
1432 | struct platform_device *edma_pdev; | ||
1431 | int ret = 0; | 1433 | int ret = 0; |
1432 | 1434 | ||
1433 | if (!cpu_is_davinci_dm365()) | 1435 | if (!cpu_is_davinci_dm365()) |
1434 | return 0; | 1436 | return 0; |
1435 | 1437 | ||
1436 | davinci_cfg_reg(DM365_INT_EDMA_CC); | 1438 | davinci_cfg_reg(DM365_INT_EDMA_CC); |
1437 | platform_device_register(&dm365_edma_device); | 1439 | edma_pdev = platform_device_register_full(&dm365_edma_device); |
1440 | if (IS_ERR(edma_pdev)) { | ||
1441 | pr_warn("%s: Failed to register eDMA\n", __func__); | ||
1442 | return PTR_ERR(edma_pdev); | ||
1443 | } | ||
1438 | 1444 | ||
1439 | platform_device_register(&dm365_mdio_device); | 1445 | platform_device_register(&dm365_mdio_device); |
1440 | platform_device_register(&dm365_emac_device); | 1446 | platform_device_register(&dm365_emac_device); |