diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-14 17:54:26 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-14 17:54:26 -0500 |
commit | c2714334b944abbeaaadda8cddde619eff0292a1 (patch) | |
tree | b45be97a313f58aa62933040230d51aa3a8592b4 /arch/arm/plat-orion | |
parent | 0beb58783f2168354e2b5297af45fc7db70adf12 (diff) | |
parent | 5e5d8999a316d596f2012fe1cf4c59e0de693dab (diff) |
Merge tag 'mvebu' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC updates for Marvell mvebu/kirkwood from Olof Johansson:
"This is a branch with updates for Marvell's mvebu/kirkwood platforms.
They came in late-ish, and were heavily interdependent such that it
didn't make sense to split them up across the cross-platform topic
branches. So here they are (for the second release in a row) in a
branch on their own."
* tag 'mvebu' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (88 commits)
arm: l2x0: add aurora related properties to OF binding
arm: mvebu: add Aurora L2 Cache Controller to the DT
arm: mvebu: add L2 cache support
dma: mv_xor: fix error handling path
dma: mv_xor: fix error checking of irq_of_parse_and_map()
dma: mv_xor: use request_irq() instead of devm_request_irq()
dma: mv_xor: clear the window override control registers
arm: mvebu: fix address decoding armada_cfg_base() function
ARM: mvebu: update defconfig with I2C and RTC support
ARM: mvebu: Add SATA support for OpenBlocks AX3-4
ARM: mvebu: Add support for the RTC in OpenBlocks AX3-4
ARM: mvebu: Add support for I2C on OpenBlocks AX3-4
ARM: mvebu: Add support for I2C controllers in Armada 370/XP
arm: mvebu: Add hardware I/O Coherency support
arm: plat-orion: Add coherency attribute when setup mbus target
arm: dma mapping: Export a dma ops function arm_dma_set_mask
arm: mvebu: Add SMP support for Armada XP
arm: mm: Add support for PJ4B cpu and init routines
arm: mvebu: Add IPI support via doorbells
arm: mvebu: Add initial support for power managmement service unit
...
Diffstat (limited to 'arch/arm/plat-orion')
-rw-r--r-- | arch/arm/plat-orion/addr-map.c | 4 | ||||
-rw-r--r-- | arch/arm/plat-orion/common.c | 192 | ||||
-rw-r--r-- | arch/arm/plat-orion/include/plat/addr-map.h | 1 | ||||
-rw-r--r-- | arch/arm/plat-orion/include/plat/common.h | 1 |
4 files changed, 69 insertions, 129 deletions
diff --git a/arch/arm/plat-orion/addr-map.c b/arch/arm/plat-orion/addr-map.c index a7b8060c293a..febe3862873c 100644 --- a/arch/arm/plat-orion/addr-map.c +++ b/arch/arm/plat-orion/addr-map.c | |||
@@ -42,6 +42,8 @@ EXPORT_SYMBOL_GPL(mv_mbus_dram_info); | |||
42 | #define WIN_REMAP_LO_OFF 0x0008 | 42 | #define WIN_REMAP_LO_OFF 0x0008 |
43 | #define WIN_REMAP_HI_OFF 0x000c | 43 | #define WIN_REMAP_HI_OFF 0x000c |
44 | 44 | ||
45 | #define ATTR_HW_COHERENCY (0x1 << 4) | ||
46 | |||
45 | /* | 47 | /* |
46 | * Default implementation | 48 | * Default implementation |
47 | */ | 49 | */ |
@@ -163,6 +165,8 @@ void __init orion_setup_cpu_mbus_target(const struct orion_addr_map_cfg *cfg, | |||
163 | w = &orion_mbus_dram_info.cs[cs++]; | 165 | w = &orion_mbus_dram_info.cs[cs++]; |
164 | w->cs_index = i; | 166 | w->cs_index = i; |
165 | w->mbus_attr = 0xf & ~(1 << i); | 167 | w->mbus_attr = 0xf & ~(1 << i); |
168 | if (cfg->hw_io_coherency) | ||
169 | w->mbus_attr |= ATTR_HW_COHERENCY; | ||
166 | w->base = base & 0xffff0000; | 170 | w->base = base & 0xffff0000; |
167 | w->size = (size | 0x0000ffff) + 1; | 171 | w->size = (size | 0x0000ffff) + 1; |
168 | } | 172 | } |
diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c index b8a688cad4c2..2d4b6414609f 100644 --- a/arch/arm/plat-orion/common.c +++ b/arch/arm/plat-orion/common.c | |||
@@ -606,26 +606,6 @@ void __init orion_wdt_init(void) | |||
606 | ****************************************************************************/ | 606 | ****************************************************************************/ |
607 | static u64 orion_xor_dmamask = DMA_BIT_MASK(32); | 607 | static u64 orion_xor_dmamask = DMA_BIT_MASK(32); |
608 | 608 | ||
609 | void __init orion_xor_init_channels( | ||
610 | struct mv_xor_platform_data *orion_xor0_data, | ||
611 | struct platform_device *orion_xor0_channel, | ||
612 | struct mv_xor_platform_data *orion_xor1_data, | ||
613 | struct platform_device *orion_xor1_channel) | ||
614 | { | ||
615 | /* | ||
616 | * two engines can't do memset simultaneously, this limitation | ||
617 | * satisfied by removing memset support from one of the engines. | ||
618 | */ | ||
619 | dma_cap_set(DMA_MEMCPY, orion_xor0_data->cap_mask); | ||
620 | dma_cap_set(DMA_XOR, orion_xor0_data->cap_mask); | ||
621 | platform_device_register(orion_xor0_channel); | ||
622 | |||
623 | dma_cap_set(DMA_MEMCPY, orion_xor1_data->cap_mask); | ||
624 | dma_cap_set(DMA_MEMSET, orion_xor1_data->cap_mask); | ||
625 | dma_cap_set(DMA_XOR, orion_xor1_data->cap_mask); | ||
626 | platform_device_register(orion_xor1_channel); | ||
627 | } | ||
628 | |||
629 | /***************************************************************************** | 609 | /***************************************************************************** |
630 | * XOR0 | 610 | * XOR0 |
631 | ****************************************************************************/ | 611 | ****************************************************************************/ |
@@ -636,61 +616,30 @@ static struct resource orion_xor0_shared_resources[] = { | |||
636 | }, { | 616 | }, { |
637 | .name = "xor 0 high", | 617 | .name = "xor 0 high", |
638 | .flags = IORESOURCE_MEM, | 618 | .flags = IORESOURCE_MEM, |
619 | }, { | ||
620 | .name = "irq channel 0", | ||
621 | .flags = IORESOURCE_IRQ, | ||
622 | }, { | ||
623 | .name = "irq channel 1", | ||
624 | .flags = IORESOURCE_IRQ, | ||
639 | }, | 625 | }, |
640 | }; | 626 | }; |
641 | 627 | ||
642 | static struct platform_device orion_xor0_shared = { | 628 | static struct mv_xor_channel_data orion_xor0_channels_data[2]; |
643 | .name = MV_XOR_SHARED_NAME, | ||
644 | .id = 0, | ||
645 | .num_resources = ARRAY_SIZE(orion_xor0_shared_resources), | ||
646 | .resource = orion_xor0_shared_resources, | ||
647 | }; | ||
648 | 629 | ||
649 | static struct resource orion_xor00_resources[] = { | 630 | static struct mv_xor_platform_data orion_xor0_pdata = { |
650 | [0] = { | 631 | .channels = orion_xor0_channels_data, |
651 | .flags = IORESOURCE_IRQ, | ||
652 | }, | ||
653 | }; | ||
654 | |||
655 | static struct mv_xor_platform_data orion_xor00_data = { | ||
656 | .shared = &orion_xor0_shared, | ||
657 | .hw_id = 0, | ||
658 | .pool_size = PAGE_SIZE, | ||
659 | }; | 632 | }; |
660 | 633 | ||
661 | static struct platform_device orion_xor00_channel = { | 634 | static struct platform_device orion_xor0_shared = { |
662 | .name = MV_XOR_NAME, | 635 | .name = MV_XOR_NAME, |
663 | .id = 0, | 636 | .id = 0, |
664 | .num_resources = ARRAY_SIZE(orion_xor00_resources), | 637 | .num_resources = ARRAY_SIZE(orion_xor0_shared_resources), |
665 | .resource = orion_xor00_resources, | 638 | .resource = orion_xor0_shared_resources, |
666 | .dev = { | 639 | .dev = { |
667 | .dma_mask = &orion_xor_dmamask, | 640 | .dma_mask = &orion_xor_dmamask, |
668 | .coherent_dma_mask = DMA_BIT_MASK(64), | 641 | .coherent_dma_mask = DMA_BIT_MASK(64), |
669 | .platform_data = &orion_xor00_data, | 642 | .platform_data = &orion_xor0_pdata, |
670 | }, | ||
671 | }; | ||
672 | |||
673 | static struct resource orion_xor01_resources[] = { | ||
674 | [0] = { | ||
675 | .flags = IORESOURCE_IRQ, | ||
676 | }, | ||
677 | }; | ||
678 | |||
679 | static struct mv_xor_platform_data orion_xor01_data = { | ||
680 | .shared = &orion_xor0_shared, | ||
681 | .hw_id = 1, | ||
682 | .pool_size = PAGE_SIZE, | ||
683 | }; | ||
684 | |||
685 | static struct platform_device orion_xor01_channel = { | ||
686 | .name = MV_XOR_NAME, | ||
687 | .id = 1, | ||
688 | .num_resources = ARRAY_SIZE(orion_xor01_resources), | ||
689 | .resource = orion_xor01_resources, | ||
690 | .dev = { | ||
691 | .dma_mask = &orion_xor_dmamask, | ||
692 | .coherent_dma_mask = DMA_BIT_MASK(64), | ||
693 | .platform_data = &orion_xor01_data, | ||
694 | }, | 643 | }, |
695 | }; | 644 | }; |
696 | 645 | ||
@@ -704,15 +653,23 @@ void __init orion_xor0_init(unsigned long mapbase_low, | |||
704 | orion_xor0_shared_resources[1].start = mapbase_high; | 653 | orion_xor0_shared_resources[1].start = mapbase_high; |
705 | orion_xor0_shared_resources[1].end = mapbase_high + 0xff; | 654 | orion_xor0_shared_resources[1].end = mapbase_high + 0xff; |
706 | 655 | ||
707 | orion_xor00_resources[0].start = irq_0; | 656 | orion_xor0_shared_resources[2].start = irq_0; |
708 | orion_xor00_resources[0].end = irq_0; | 657 | orion_xor0_shared_resources[2].end = irq_0; |
709 | orion_xor01_resources[0].start = irq_1; | 658 | orion_xor0_shared_resources[3].start = irq_1; |
710 | orion_xor01_resources[0].end = irq_1; | 659 | orion_xor0_shared_resources[3].end = irq_1; |
711 | 660 | ||
712 | platform_device_register(&orion_xor0_shared); | 661 | /* |
662 | * two engines can't do memset simultaneously, this limitation | ||
663 | * satisfied by removing memset support from one of the engines. | ||
664 | */ | ||
665 | dma_cap_set(DMA_MEMCPY, orion_xor0_channels_data[0].cap_mask); | ||
666 | dma_cap_set(DMA_XOR, orion_xor0_channels_data[0].cap_mask); | ||
667 | |||
668 | dma_cap_set(DMA_MEMSET, orion_xor0_channels_data[1].cap_mask); | ||
669 | dma_cap_set(DMA_MEMCPY, orion_xor0_channels_data[1].cap_mask); | ||
670 | dma_cap_set(DMA_XOR, orion_xor0_channels_data[1].cap_mask); | ||
713 | 671 | ||
714 | orion_xor_init_channels(&orion_xor00_data, &orion_xor00_channel, | 672 | platform_device_register(&orion_xor0_shared); |
715 | &orion_xor01_data, &orion_xor01_channel); | ||
716 | } | 673 | } |
717 | 674 | ||
718 | /***************************************************************************** | 675 | /***************************************************************************** |
@@ -725,61 +682,30 @@ static struct resource orion_xor1_shared_resources[] = { | |||
725 | }, { | 682 | }, { |
726 | .name = "xor 1 high", | 683 | .name = "xor 1 high", |
727 | .flags = IORESOURCE_MEM, | 684 | .flags = IORESOURCE_MEM, |
685 | }, { | ||
686 | .name = "irq channel 0", | ||
687 | .flags = IORESOURCE_IRQ, | ||
688 | }, { | ||
689 | .name = "irq channel 1", | ||
690 | .flags = IORESOURCE_IRQ, | ||
728 | }, | 691 | }, |
729 | }; | 692 | }; |
730 | 693 | ||
731 | static struct platform_device orion_xor1_shared = { | 694 | static struct mv_xor_channel_data orion_xor1_channels_data[2]; |
732 | .name = MV_XOR_SHARED_NAME, | ||
733 | .id = 1, | ||
734 | .num_resources = ARRAY_SIZE(orion_xor1_shared_resources), | ||
735 | .resource = orion_xor1_shared_resources, | ||
736 | }; | ||
737 | |||
738 | static struct resource orion_xor10_resources[] = { | ||
739 | [0] = { | ||
740 | .flags = IORESOURCE_IRQ, | ||
741 | }, | ||
742 | }; | ||
743 | |||
744 | static struct mv_xor_platform_data orion_xor10_data = { | ||
745 | .shared = &orion_xor1_shared, | ||
746 | .hw_id = 0, | ||
747 | .pool_size = PAGE_SIZE, | ||
748 | }; | ||
749 | |||
750 | static struct platform_device orion_xor10_channel = { | ||
751 | .name = MV_XOR_NAME, | ||
752 | .id = 2, | ||
753 | .num_resources = ARRAY_SIZE(orion_xor10_resources), | ||
754 | .resource = orion_xor10_resources, | ||
755 | .dev = { | ||
756 | .dma_mask = &orion_xor_dmamask, | ||
757 | .coherent_dma_mask = DMA_BIT_MASK(64), | ||
758 | .platform_data = &orion_xor10_data, | ||
759 | }, | ||
760 | }; | ||
761 | |||
762 | static struct resource orion_xor11_resources[] = { | ||
763 | [0] = { | ||
764 | .flags = IORESOURCE_IRQ, | ||
765 | }, | ||
766 | }; | ||
767 | 695 | ||
768 | static struct mv_xor_platform_data orion_xor11_data = { | 696 | static struct mv_xor_platform_data orion_xor1_pdata = { |
769 | .shared = &orion_xor1_shared, | 697 | .channels = orion_xor1_channels_data, |
770 | .hw_id = 1, | ||
771 | .pool_size = PAGE_SIZE, | ||
772 | }; | 698 | }; |
773 | 699 | ||
774 | static struct platform_device orion_xor11_channel = { | 700 | static struct platform_device orion_xor1_shared = { |
775 | .name = MV_XOR_NAME, | 701 | .name = MV_XOR_NAME, |
776 | .id = 3, | 702 | .id = 1, |
777 | .num_resources = ARRAY_SIZE(orion_xor11_resources), | 703 | .num_resources = ARRAY_SIZE(orion_xor1_shared_resources), |
778 | .resource = orion_xor11_resources, | 704 | .resource = orion_xor1_shared_resources, |
779 | .dev = { | 705 | .dev = { |
780 | .dma_mask = &orion_xor_dmamask, | 706 | .dma_mask = &orion_xor_dmamask, |
781 | .coherent_dma_mask = DMA_BIT_MASK(64), | 707 | .coherent_dma_mask = DMA_BIT_MASK(64), |
782 | .platform_data = &orion_xor11_data, | 708 | .platform_data = &orion_xor1_pdata, |
783 | }, | 709 | }, |
784 | }; | 710 | }; |
785 | 711 | ||
@@ -793,15 +719,23 @@ void __init orion_xor1_init(unsigned long mapbase_low, | |||
793 | orion_xor1_shared_resources[1].start = mapbase_high; | 719 | orion_xor1_shared_resources[1].start = mapbase_high; |
794 | orion_xor1_shared_resources[1].end = mapbase_high + 0xff; | 720 | orion_xor1_shared_resources[1].end = mapbase_high + 0xff; |
795 | 721 | ||
796 | orion_xor10_resources[0].start = irq_0; | 722 | orion_xor1_shared_resources[2].start = irq_0; |
797 | orion_xor10_resources[0].end = irq_0; | 723 | orion_xor1_shared_resources[2].end = irq_0; |
798 | orion_xor11_resources[0].start = irq_1; | 724 | orion_xor1_shared_resources[3].start = irq_1; |
799 | orion_xor11_resources[0].end = irq_1; | 725 | orion_xor1_shared_resources[3].end = irq_1; |
800 | 726 | ||
801 | platform_device_register(&orion_xor1_shared); | 727 | /* |
728 | * two engines can't do memset simultaneously, this limitation | ||
729 | * satisfied by removing memset support from one of the engines. | ||
730 | */ | ||
731 | dma_cap_set(DMA_MEMCPY, orion_xor1_channels_data[0].cap_mask); | ||
732 | dma_cap_set(DMA_XOR, orion_xor1_channels_data[0].cap_mask); | ||
802 | 733 | ||
803 | orion_xor_init_channels(&orion_xor10_data, &orion_xor10_channel, | 734 | dma_cap_set(DMA_MEMSET, orion_xor1_channels_data[1].cap_mask); |
804 | &orion_xor11_data, &orion_xor11_channel); | 735 | dma_cap_set(DMA_MEMCPY, orion_xor1_channels_data[1].cap_mask); |
736 | dma_cap_set(DMA_XOR, orion_xor1_channels_data[1].cap_mask); | ||
737 | |||
738 | platform_device_register(&orion_xor1_shared); | ||
805 | } | 739 | } |
806 | 740 | ||
807 | /***************************************************************************** | 741 | /***************************************************************************** |
diff --git a/arch/arm/plat-orion/include/plat/addr-map.h b/arch/arm/plat-orion/include/plat/addr-map.h index ec63e4a627d0..b76c06569fe5 100644 --- a/arch/arm/plat-orion/include/plat/addr-map.h +++ b/arch/arm/plat-orion/include/plat/addr-map.h | |||
@@ -17,6 +17,7 @@ struct orion_addr_map_cfg { | |||
17 | const int num_wins; /* Total number of windows */ | 17 | const int num_wins; /* Total number of windows */ |
18 | const int remappable_wins; | 18 | const int remappable_wins; |
19 | void __iomem *bridge_virt_base; | 19 | void __iomem *bridge_virt_base; |
20 | int hw_io_coherency; | ||
20 | 21 | ||
21 | /* If NULL, the default cpu_win_can_remap will be used, using | 22 | /* If NULL, the default cpu_win_can_remap will be used, using |
22 | the value in remappable_wins */ | 23 | the value in remappable_wins */ |
diff --git a/arch/arm/plat-orion/include/plat/common.h b/arch/arm/plat-orion/include/plat/common.h index 6bbc3fe5f58e..e06fc5fefa14 100644 --- a/arch/arm/plat-orion/include/plat/common.h +++ b/arch/arm/plat-orion/include/plat/common.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/mv643xx_eth.h> | 12 | #include <linux/mv643xx_eth.h> |
13 | 13 | ||
14 | struct dsa_platform_data; | 14 | struct dsa_platform_data; |
15 | struct mv_sata_platform_data; | ||
15 | 16 | ||
16 | void __init orion_uart0_init(void __iomem *membase, | 17 | void __init orion_uart0_init(void __iomem *membase, |
17 | resource_size_t mapbase, | 18 | resource_size_t mapbase, |