diff options
Diffstat (limited to 'arch/arm/mach-davinci/dm644x.c')
-rw-r--r-- | arch/arm/mach-davinci/dm644x.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c index 5e5b0a7831fb..0608dd776a16 100644 --- a/arch/arm/mach-davinci/dm644x.c +++ b/arch/arm/mach-davinci/dm644x.c | |||
@@ -322,7 +322,6 @@ static struct emac_platform_data dm644x_emac_pdata = { | |||
322 | .ctrl_reg_offset = DM644X_EMAC_CNTRL_OFFSET, | 322 | .ctrl_reg_offset = DM644X_EMAC_CNTRL_OFFSET, |
323 | .ctrl_mod_reg_offset = DM644X_EMAC_CNTRL_MOD_OFFSET, | 323 | .ctrl_mod_reg_offset = DM644X_EMAC_CNTRL_MOD_OFFSET, |
324 | .ctrl_ram_offset = DM644X_EMAC_CNTRL_RAM_OFFSET, | 324 | .ctrl_ram_offset = DM644X_EMAC_CNTRL_RAM_OFFSET, |
325 | .mdio_reg_offset = DM644X_EMAC_MDIO_OFFSET, | ||
326 | .ctrl_ram_size = DM644X_EMAC_CNTRL_RAM_SIZE, | 325 | .ctrl_ram_size = DM644X_EMAC_CNTRL_RAM_SIZE, |
327 | .version = EMAC_VERSION_1, | 326 | .version = EMAC_VERSION_1, |
328 | }; | 327 | }; |
@@ -330,7 +329,7 @@ static struct emac_platform_data dm644x_emac_pdata = { | |||
330 | static struct resource dm644x_emac_resources[] = { | 329 | static struct resource dm644x_emac_resources[] = { |
331 | { | 330 | { |
332 | .start = DM644X_EMAC_BASE, | 331 | .start = DM644X_EMAC_BASE, |
333 | .end = DM644X_EMAC_BASE + 0x47ff, | 332 | .end = DM644X_EMAC_BASE + SZ_16K - 1, |
334 | .flags = IORESOURCE_MEM, | 333 | .flags = IORESOURCE_MEM, |
335 | }, | 334 | }, |
336 | { | 335 | { |
@@ -350,6 +349,21 @@ static struct platform_device dm644x_emac_device = { | |||
350 | .resource = dm644x_emac_resources, | 349 | .resource = dm644x_emac_resources, |
351 | }; | 350 | }; |
352 | 351 | ||
352 | static struct resource dm644x_mdio_resources[] = { | ||
353 | { | ||
354 | .start = DM644X_EMAC_MDIO_BASE, | ||
355 | .end = DM644X_EMAC_MDIO_BASE + SZ_4K - 1, | ||
356 | .flags = IORESOURCE_MEM, | ||
357 | }, | ||
358 | }; | ||
359 | |||
360 | static struct platform_device dm644x_mdio_device = { | ||
361 | .name = "davinci_mdio", | ||
362 | .id = 0, | ||
363 | .num_resources = ARRAY_SIZE(dm644x_mdio_resources), | ||
364 | .resource = dm644x_mdio_resources, | ||
365 | }; | ||
366 | |||
353 | /* | 367 | /* |
354 | * Device specific mux setup | 368 | * Device specific mux setup |
355 | * | 369 | * |
@@ -776,7 +790,12 @@ static int __init dm644x_init_devices(void) | |||
776 | clk_add_alias("master", dm644x_ccdc_dev.name, "vpss_master", NULL); | 790 | clk_add_alias("master", dm644x_ccdc_dev.name, "vpss_master", NULL); |
777 | clk_add_alias("slave", dm644x_ccdc_dev.name, "vpss_slave", NULL); | 791 | clk_add_alias("slave", dm644x_ccdc_dev.name, "vpss_slave", NULL); |
778 | platform_device_register(&dm644x_edma_device); | 792 | platform_device_register(&dm644x_edma_device); |
793 | |||
794 | platform_device_register(&dm644x_mdio_device); | ||
779 | platform_device_register(&dm644x_emac_device); | 795 | platform_device_register(&dm644x_emac_device); |
796 | clk_add_alias(NULL, dev_name(&dm644x_mdio_device.dev), | ||
797 | NULL, &dm644x_emac_device.dev); | ||
798 | |||
780 | platform_device_register(&dm644x_vpss_device); | 799 | platform_device_register(&dm644x_vpss_device); |
781 | platform_device_register(&dm644x_ccdc_dev); | 800 | platform_device_register(&dm644x_ccdc_dev); |
782 | platform_device_register(&vpfe_capture_dev); | 801 | platform_device_register(&vpfe_capture_dev); |