aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/dm365.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/dm365.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/dm365.c')
-rw-r--r--arch/arm/mach-davinci/dm365.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c
index 6b6f4c643709..71f0f9d5c56a 100644
--- a/arch/arm/mach-davinci/dm365.c
+++ b/arch/arm/mach-davinci/dm365.c
@@ -699,7 +699,7 @@ static struct emac_platform_data dm365_emac_pdata = {
699static struct resource dm365_emac_resources[] = { 699static struct resource dm365_emac_resources[] = {
700 { 700 {
701 .start = DM365_EMAC_BASE, 701 .start = DM365_EMAC_BASE,
702 .end = DM365_EMAC_BASE + 0x47ff, 702 .end = DM365_EMAC_BASE + SZ_16K - 1,
703 .flags = IORESOURCE_MEM, 703 .flags = IORESOURCE_MEM,
704 }, 704 },
705 { 705 {
@@ -734,6 +734,21 @@ static struct platform_device dm365_emac_device = {
734 .resource = dm365_emac_resources, 734 .resource = dm365_emac_resources,
735}; 735};
736 736
737static struct resource dm365_mdio_resources[] = {
738 {
739 .start = DM365_EMAC_MDIO_BASE,
740 .end = DM365_EMAC_MDIO_BASE + SZ_4K - 1,
741 .flags = IORESOURCE_MEM,
742 },
743};
744
745static struct platform_device dm365_mdio_device = {
746 .name = "davinci_mdio",
747 .id = 0,
748 .num_resources = ARRAY_SIZE(dm365_mdio_resources),
749 .resource = dm365_mdio_resources,
750};
751
737static u8 dm365_default_priorities[DAVINCI_N_AINTC_IRQ] = { 752static u8 dm365_default_priorities[DAVINCI_N_AINTC_IRQ] = {
738 [IRQ_VDINT0] = 2, 753 [IRQ_VDINT0] = 2,
739 [IRQ_VDINT1] = 6, 754 [IRQ_VDINT1] = 6,
@@ -1220,7 +1235,12 @@ static int __init dm365_init_devices(void)
1220 1235
1221 davinci_cfg_reg(DM365_INT_EDMA_CC); 1236 davinci_cfg_reg(DM365_INT_EDMA_CC);
1222 platform_device_register(&dm365_edma_device); 1237 platform_device_register(&dm365_edma_device);
1238
1239 platform_device_register(&dm365_mdio_device);
1223 platform_device_register(&dm365_emac_device); 1240 platform_device_register(&dm365_emac_device);
1241 clk_add_alias(NULL, dev_name(&dm365_mdio_device.dev),
1242 NULL, &dm365_emac_device.dev);
1243
1224 /* Add isif clock alias */ 1244 /* Add isif clock alias */
1225 clk_add_alias("master", dm365_isif_dev.name, "vpss_master", NULL); 1245 clk_add_alias("master", dm365_isif_dev.name, "vpss_master", NULL);
1226 platform_device_register(&dm365_vpss_device); 1246 platform_device_register(&dm365_vpss_device);