aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/dm365.c
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /arch/arm/mach-davinci/dm365.c
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'arch/arm/mach-davinci/dm365.c')
-rw-r--r--arch/arm/mach-davinci/dm365.c40
1 files changed, 25 insertions, 15 deletions
diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c
index 7781e35daec3..4604e72d7d99 100644
--- a/arch/arm/mach-davinci/dm365.c
+++ b/arch/arm/mach-davinci/dm365.c
@@ -459,7 +459,7 @@ static struct clk_lookup dm365_clks[] = {
459 CLK(NULL, "usb", &usb_clk), 459 CLK(NULL, "usb", &usb_clk),
460 CLK("davinci_emac.1", NULL, &emac_clk), 460 CLK("davinci_emac.1", NULL, &emac_clk),
461 CLK("davinci_voicecodec", NULL, &voicecodec_clk), 461 CLK("davinci_voicecodec", NULL, &voicecodec_clk),
462 CLK("davinci-asp.0", NULL, &asp0_clk), 462 CLK("davinci-mcbsp", NULL, &asp0_clk),
463 CLK(NULL, "rto", &rto_clk), 463 CLK(NULL, "rto", &rto_clk),
464 CLK(NULL, "mjcp", &mjcp_clk), 464 CLK(NULL, "mjcp", &mjcp_clk),
465 CLK(NULL, NULL, NULL), 465 CLK(NULL, NULL, NULL),
@@ -625,12 +625,7 @@ static u64 dm365_spi0_dma_mask = DMA_BIT_MASK(32);
625static struct davinci_spi_platform_data dm365_spi0_pdata = { 625static struct davinci_spi_platform_data dm365_spi0_pdata = {
626 .version = SPI_VERSION_1, 626 .version = SPI_VERSION_1,
627 .num_chipselect = 2, 627 .num_chipselect = 2,
628 .clk_internal = 1, 628 .dma_event_q = EVENTQ_3,
629 .cs_hold = 1,
630 .intr_level = 0,
631 .poll_mode = 1, /* 0 -> interrupt mode 1-> polling mode */
632 .c2tdelay = 0,
633 .t2cdelay = 0,
634}; 629};
635 630
636static struct resource dm365_spi0_resources[] = { 631static struct resource dm365_spi0_resources[] = {
@@ -651,10 +646,6 @@ static struct resource dm365_spi0_resources[] = {
651 .start = 16, 646 .start = 16,
652 .flags = IORESOURCE_DMA, 647 .flags = IORESOURCE_DMA,
653 }, 648 },
654 {
655 .start = EVENTQ_3,
656 .flags = IORESOURCE_DMA,
657 },
658}; 649};
659 650
660static struct platform_device dm365_spi0_device = { 651static struct platform_device dm365_spi0_device = {
@@ -691,7 +682,6 @@ static struct emac_platform_data dm365_emac_pdata = {
691 .ctrl_reg_offset = DM365_EMAC_CNTRL_OFFSET, 682 .ctrl_reg_offset = DM365_EMAC_CNTRL_OFFSET,
692 .ctrl_mod_reg_offset = DM365_EMAC_CNTRL_MOD_OFFSET, 683 .ctrl_mod_reg_offset = DM365_EMAC_CNTRL_MOD_OFFSET,
693 .ctrl_ram_offset = DM365_EMAC_CNTRL_RAM_OFFSET, 684 .ctrl_ram_offset = DM365_EMAC_CNTRL_RAM_OFFSET,
694 .mdio_reg_offset = DM365_EMAC_MDIO_OFFSET,
695 .ctrl_ram_size = DM365_EMAC_CNTRL_RAM_SIZE, 685 .ctrl_ram_size = DM365_EMAC_CNTRL_RAM_SIZE,
696 .version = EMAC_VERSION_2, 686 .version = EMAC_VERSION_2,
697}; 687};
@@ -699,7 +689,7 @@ static struct emac_platform_data dm365_emac_pdata = {
699static struct resource dm365_emac_resources[] = { 689static struct resource dm365_emac_resources[] = {
700 { 690 {
701 .start = DM365_EMAC_BASE, 691 .start = DM365_EMAC_BASE,
702 .end = DM365_EMAC_BASE + 0x47ff, 692 .end = DM365_EMAC_BASE + SZ_16K - 1,
703 .flags = IORESOURCE_MEM, 693 .flags = IORESOURCE_MEM,
704 }, 694 },
705 { 695 {
@@ -734,6 +724,21 @@ static struct platform_device dm365_emac_device = {
734 .resource = dm365_emac_resources, 724 .resource = dm365_emac_resources,
735}; 725};
736 726
727static struct resource dm365_mdio_resources[] = {
728 {
729 .start = DM365_EMAC_MDIO_BASE,
730 .end = DM365_EMAC_MDIO_BASE + SZ_4K - 1,
731 .flags = IORESOURCE_MEM,
732 },
733};
734
735static struct platform_device dm365_mdio_device = {
736 .name = "davinci_mdio",
737 .id = 0,
738 .num_resources = ARRAY_SIZE(dm365_mdio_resources),
739 .resource = dm365_mdio_resources,
740};
741
737static u8 dm365_default_priorities[DAVINCI_N_AINTC_IRQ] = { 742static u8 dm365_default_priorities[DAVINCI_N_AINTC_IRQ] = {
738 [IRQ_VDINT0] = 2, 743 [IRQ_VDINT0] = 2,
739 [IRQ_VDINT1] = 6, 744 [IRQ_VDINT1] = 6,
@@ -908,8 +913,8 @@ static struct resource dm365_asp_resources[] = {
908}; 913};
909 914
910static struct platform_device dm365_asp_device = { 915static struct platform_device dm365_asp_device = {
911 .name = "davinci-asp", 916 .name = "davinci-mcbsp",
912 .id = 0, 917 .id = -1,
913 .num_resources = ARRAY_SIZE(dm365_asp_resources), 918 .num_resources = ARRAY_SIZE(dm365_asp_resources),
914 .resource = dm365_asp_resources, 919 .resource = dm365_asp_resources,
915}; 920};
@@ -1219,7 +1224,12 @@ static int __init dm365_init_devices(void)
1219 1224
1220 davinci_cfg_reg(DM365_INT_EDMA_CC); 1225 davinci_cfg_reg(DM365_INT_EDMA_CC);
1221 platform_device_register(&dm365_edma_device); 1226 platform_device_register(&dm365_edma_device);
1227
1228 platform_device_register(&dm365_mdio_device);
1222 platform_device_register(&dm365_emac_device); 1229 platform_device_register(&dm365_emac_device);
1230 clk_add_alias(NULL, dev_name(&dm365_mdio_device.dev),
1231 NULL, &dm365_emac_device.dev);
1232
1223 /* Add isif clock alias */ 1233 /* Add isif clock alias */
1224 clk_add_alias("master", dm365_isif_dev.name, "vpss_master", NULL); 1234 clk_add_alias("master", dm365_isif_dev.name, "vpss_master", NULL);
1225 platform_device_register(&dm365_vpss_device); 1235 platform_device_register(&dm365_vpss_device);