aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/dm646x.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-davinci/dm646x.c')
-rw-r--r--arch/arm/mach-davinci/dm646x.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c
index 26e8a9c7f50b..1e0f809644bb 100644
--- a/arch/arm/mach-davinci/dm646x.c
+++ b/arch/arm/mach-davinci/dm646x.c
@@ -358,7 +358,6 @@ static struct emac_platform_data dm646x_emac_pdata = {
358 .ctrl_reg_offset = DM646X_EMAC_CNTRL_OFFSET, 358 .ctrl_reg_offset = DM646X_EMAC_CNTRL_OFFSET,
359 .ctrl_mod_reg_offset = DM646X_EMAC_CNTRL_MOD_OFFSET, 359 .ctrl_mod_reg_offset = DM646X_EMAC_CNTRL_MOD_OFFSET,
360 .ctrl_ram_offset = DM646X_EMAC_CNTRL_RAM_OFFSET, 360 .ctrl_ram_offset = DM646X_EMAC_CNTRL_RAM_OFFSET,
361 .mdio_reg_offset = DM646X_EMAC_MDIO_OFFSET,
362 .ctrl_ram_size = DM646X_EMAC_CNTRL_RAM_SIZE, 361 .ctrl_ram_size = DM646X_EMAC_CNTRL_RAM_SIZE,
363 .version = EMAC_VERSION_2, 362 .version = EMAC_VERSION_2,
364}; 363};
@@ -366,7 +365,7 @@ static struct emac_platform_data dm646x_emac_pdata = {
366static struct resource dm646x_emac_resources[] = { 365static struct resource dm646x_emac_resources[] = {
367 { 366 {
368 .start = DM646X_EMAC_BASE, 367 .start = DM646X_EMAC_BASE,
369 .end = DM646X_EMAC_BASE + 0x47ff, 368 .end = DM646X_EMAC_BASE + SZ_16K - 1,
370 .flags = IORESOURCE_MEM, 369 .flags = IORESOURCE_MEM,
371 }, 370 },
372 { 371 {
@@ -401,6 +400,21 @@ static struct platform_device dm646x_emac_device = {
401 .resource = dm646x_emac_resources, 400 .resource = dm646x_emac_resources,
402}; 401};
403 402
403static struct resource dm646x_mdio_resources[] = {
404 {
405 .start = DM646X_EMAC_MDIO_BASE,
406 .end = DM646X_EMAC_MDIO_BASE + SZ_4K - 1,
407 .flags = IORESOURCE_MEM,
408 },
409};
410
411static struct platform_device dm646x_mdio_device = {
412 .name = "davinci_mdio",
413 .id = 0,
414 .num_resources = ARRAY_SIZE(dm646x_mdio_resources),
415 .resource = dm646x_mdio_resources,
416};
417
404/* 418/*
405 * Device specific mux setup 419 * Device specific mux setup
406 * 420 *
@@ -896,7 +910,11 @@ static int __init dm646x_init_devices(void)
896 if (!cpu_is_davinci_dm646x()) 910 if (!cpu_is_davinci_dm646x())
897 return 0; 911 return 0;
898 912
913 platform_device_register(&dm646x_mdio_device);
899 platform_device_register(&dm646x_emac_device); 914 platform_device_register(&dm646x_emac_device);
915 clk_add_alias(NULL, dev_name(&dm646x_mdio_device.dev),
916 NULL, &dm646x_emac_device.dev);
917
900 return 0; 918 return 0;
901} 919}
902postcore_initcall(dm646x_init_devices); 920postcore_initcall(dm646x_init_devices);