aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/dm644x.c
diff options
context:
space:
mode:
authorCyril Chemparathy <cyril@ti.com>2010-09-15 10:11:22 -0400
committerKevin Hilman <khilman@deeprootsystems.com>2010-09-24 10:40:29 -0400
commitd22960c8bbb8f685c2d8c4051e1f335ab13dca24 (patch)
tree7e0dd3bc31197293ef242180100f5c7093e3fbb0 /arch/arm/mach-davinci/dm644x.c
parentf20136eb03a1dbdfb04f3c62fd11c0d02d02b726 (diff)
davinci: add mdio platform devices
This patch adds mdio platform devices on SoCs that have the necessary hardware. Clock lookup entries (aliases) have also been added, so that the MDIO and EMAC drivers can independently enable/disable a shared underlying clock. Further, the EMAC MMR region has been split down into separate MDIO and EMAC regions. Signed-off-by: Cyril Chemparathy <cyril@ti.com> Acked-by: David S. Miller <davem@davemloft.net> Tested-by: Michael Williamson <michael.williamson@criticallink.com> Tested-by: Caglar Akyuz <caglarakyuz@gmail.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci/dm644x.c')
-rw-r--r--arch/arm/mach-davinci/dm644x.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c
index 40fec315c99a..c103b2c8caff 100644
--- a/arch/arm/mach-davinci/dm644x.c
+++ b/arch/arm/mach-davinci/dm644x.c
@@ -330,7 +330,7 @@ static struct emac_platform_data dm644x_emac_pdata = {
330static struct resource dm644x_emac_resources[] = { 330static struct resource dm644x_emac_resources[] = {
331 { 331 {
332 .start = DM644X_EMAC_BASE, 332 .start = DM644X_EMAC_BASE,
333 .end = DM644X_EMAC_BASE + 0x47ff, 333 .end = DM644X_EMAC_BASE + SZ_16K - 1,
334 .flags = IORESOURCE_MEM, 334 .flags = IORESOURCE_MEM,
335 }, 335 },
336 { 336 {
@@ -350,6 +350,21 @@ static struct platform_device dm644x_emac_device = {
350 .resource = dm644x_emac_resources, 350 .resource = dm644x_emac_resources,
351}; 351};
352 352
353static struct resource dm644x_mdio_resources[] = {
354 {
355 .start = DM644X_EMAC_MDIO_BASE,
356 .end = DM644X_EMAC_MDIO_BASE + SZ_4K - 1,
357 .flags = IORESOURCE_MEM,
358 },
359};
360
361static struct platform_device dm644x_mdio_device = {
362 .name = "davinci_mdio",
363 .id = 0,
364 .num_resources = ARRAY_SIZE(dm644x_mdio_resources),
365 .resource = dm644x_mdio_resources,
366};
367
353/* 368/*
354 * Device specific mux setup 369 * Device specific mux setup
355 * 370 *
@@ -777,7 +792,12 @@ static int __init dm644x_init_devices(void)
777 clk_add_alias("master", dm644x_ccdc_dev.name, "vpss_master", NULL); 792 clk_add_alias("master", dm644x_ccdc_dev.name, "vpss_master", NULL);
778 clk_add_alias("slave", dm644x_ccdc_dev.name, "vpss_slave", NULL); 793 clk_add_alias("slave", dm644x_ccdc_dev.name, "vpss_slave", NULL);
779 platform_device_register(&dm644x_edma_device); 794 platform_device_register(&dm644x_edma_device);
795
796 platform_device_register(&dm644x_mdio_device);
780 platform_device_register(&dm644x_emac_device); 797 platform_device_register(&dm644x_emac_device);
798 clk_add_alias(NULL, dev_name(&dm644x_mdio_device.dev),
799 NULL, &dm644x_emac_device.dev);
800
781 platform_device_register(&dm644x_vpss_device); 801 platform_device_register(&dm644x_vpss_device);
782 platform_device_register(&dm644x_ccdc_dev); 802 platform_device_register(&dm644x_ccdc_dev);
783 platform_device_register(&vpfe_capture_dev); 803 platform_device_register(&vpfe_capture_dev);