aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/devices.c
diff options
context:
space:
mode:
authorHaojian Zhuang <haojian.zhuang@marvell.com>2010-11-23 22:54:19 -0500
committerEric Miao <eric.y.miao@gmail.com>2010-12-18 08:02:14 -0500
commita4553358d94b4a1f3e6f24aacfd076022ac14855 (patch)
tree7d6d7909730801a6f512aa2a7f637353ce0931bf /arch/arm/mach-pxa/devices.c
parentaae8224ddd72e045bb92eaf6b73b89282c771c69 (diff)
ARM: pxa: support pxa95x
The core of PXA955 is PJ4. Add new PJ4 support. And add new macro CONFIG_PXA95x. Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch/arm/mach-pxa/devices.c')
-rw-r--r--arch/arm/mach-pxa/devices.c247
1 files changed, 124 insertions, 123 deletions
diff --git a/arch/arm/mach-pxa/devices.c b/arch/arm/mach-pxa/devices.c
index aaa1166df964..022c2fa4af04 100644
--- a/arch/arm/mach-pxa/devices.c
+++ b/arch/arm/mach-pxa/devices.c
@@ -342,27 +342,6 @@ struct platform_device pxa27x_device_i2c_power = {
342}; 342};
343#endif 343#endif
344 344
345#ifdef CONFIG_PXA3xx
346static struct resource pxa3xx_resources_i2c_power[] = {
347 {
348 .start = 0x40f500c0,
349 .end = 0x40f500d3,
350 .flags = IORESOURCE_MEM,
351 }, {
352 .start = IRQ_PWRI2C,
353 .end = IRQ_PWRI2C,
354 .flags = IORESOURCE_IRQ,
355 },
356};
357
358struct platform_device pxa3xx_device_i2c_power = {
359 .name = "pxa3xx-pwri2c",
360 .id = 1,
361 .resource = pxa3xx_resources_i2c_power,
362 .num_resources = ARRAY_SIZE(pxa3xx_resources_i2c_power),
363};
364#endif
365
366static struct resource pxai2s_resources[] = { 345static struct resource pxai2s_resources[] = {
367 { 346 {
368 .start = 0x40400000, 347 .start = 0x40400000,
@@ -633,30 +612,35 @@ struct platform_device pxa25x_device_assp = {
633#endif /* CONFIG_PXA25x */ 612#endif /* CONFIG_PXA25x */
634 613
635#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx) 614#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
636 615static struct resource pxa27x_resource_camera[] = {
637static struct resource pxa27x_resource_keypad[] = {
638 [0] = { 616 [0] = {
639 .start = 0x41500000, 617 .start = 0x50000000,
640 .end = 0x4150004c, 618 .end = 0x50000fff,
641 .flags = IORESOURCE_MEM, 619 .flags = IORESOURCE_MEM,
642 }, 620 },
643 [1] = { 621 [1] = {
644 .start = IRQ_KEYPAD, 622 .start = IRQ_CAMERA,
645 .end = IRQ_KEYPAD, 623 .end = IRQ_CAMERA,
646 .flags = IORESOURCE_IRQ, 624 .flags = IORESOURCE_IRQ,
647 }, 625 },
648}; 626};
649 627
650struct platform_device pxa27x_device_keypad = { 628static u64 pxa27x_dma_mask_camera = DMA_BIT_MASK(32);
651 .name = "pxa27x-keypad", 629
652 .id = -1, 630static struct platform_device pxa27x_device_camera = {
653 .resource = pxa27x_resource_keypad, 631 .name = "pxa27x-camera",
654 .num_resources = ARRAY_SIZE(pxa27x_resource_keypad), 632 .id = 0, /* This is used to put cameras on this interface */
633 .dev = {
634 .dma_mask = &pxa27x_dma_mask_camera,
635 .coherent_dma_mask = 0xffffffff,
636 },
637 .num_resources = ARRAY_SIZE(pxa27x_resource_camera),
638 .resource = pxa27x_resource_camera,
655}; 639};
656 640
657void __init pxa_set_keypad_info(struct pxa27x_keypad_platform_data *info) 641void __init pxa_set_camera_info(struct pxacamera_platform_data *info)
658{ 642{
659 pxa_register_device(&pxa27x_device_keypad, info); 643 pxa_register_device(&pxa27x_device_camera, info);
660} 644}
661 645
662static u64 pxa27x_ohci_dma_mask = DMA_BIT_MASK(32); 646static u64 pxa27x_ohci_dma_mask = DMA_BIT_MASK(32);
@@ -689,6 +673,33 @@ void __init pxa_set_ohci_info(struct pxaohci_platform_data *info)
689{ 673{
690 pxa_register_device(&pxa27x_device_ohci, info); 674 pxa_register_device(&pxa27x_device_ohci, info);
691} 675}
676#endif /* CONFIG_PXA27x || CONFIG_PXA3xx */
677
678#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx) || defined(CONFIG_PXA95x)
679static struct resource pxa27x_resource_keypad[] = {
680 [0] = {
681 .start = 0x41500000,
682 .end = 0x4150004c,
683 .flags = IORESOURCE_MEM,
684 },
685 [1] = {
686 .start = IRQ_KEYPAD,
687 .end = IRQ_KEYPAD,
688 .flags = IORESOURCE_IRQ,
689 },
690};
691
692struct platform_device pxa27x_device_keypad = {
693 .name = "pxa27x-keypad",
694 .id = -1,
695 .resource = pxa27x_resource_keypad,
696 .num_resources = ARRAY_SIZE(pxa27x_resource_keypad),
697};
698
699void __init pxa_set_keypad_info(struct pxa27x_keypad_platform_data *info)
700{
701 pxa_register_device(&pxa27x_device_keypad, info);
702}
692 703
693static u64 pxa27x_ssp1_dma_mask = DMA_BIT_MASK(32); 704static u64 pxa27x_ssp1_dma_mask = DMA_BIT_MASK(32);
694 705
@@ -833,79 +844,9 @@ struct platform_device pxa27x_device_pwm1 = {
833 .resource = pxa27x_resource_pwm1, 844 .resource = pxa27x_resource_pwm1,
834 .num_resources = ARRAY_SIZE(pxa27x_resource_pwm1), 845 .num_resources = ARRAY_SIZE(pxa27x_resource_pwm1),
835}; 846};
836 847#endif /* CONFIG_PXA27x || CONFIG_PXA3xx || CONFIG_PXA95x*/
837static struct resource pxa27x_resource_camera[] = {
838 [0] = {
839 .start = 0x50000000,
840 .end = 0x50000fff,
841 .flags = IORESOURCE_MEM,
842 },
843 [1] = {
844 .start = IRQ_CAMERA,
845 .end = IRQ_CAMERA,
846 .flags = IORESOURCE_IRQ,
847 },
848};
849
850static u64 pxa27x_dma_mask_camera = DMA_BIT_MASK(32);
851
852static struct platform_device pxa27x_device_camera = {
853 .name = "pxa27x-camera",
854 .id = 0, /* This is used to put cameras on this interface */
855 .dev = {
856 .dma_mask = &pxa27x_dma_mask_camera,
857 .coherent_dma_mask = 0xffffffff,
858 },
859 .num_resources = ARRAY_SIZE(pxa27x_resource_camera),
860 .resource = pxa27x_resource_camera,
861};
862
863void __init pxa_set_camera_info(struct pxacamera_platform_data *info)
864{
865 pxa_register_device(&pxa27x_device_camera, info);
866}
867#endif /* CONFIG_PXA27x || CONFIG_PXA3xx */
868 848
869#ifdef CONFIG_PXA3xx 849#ifdef CONFIG_PXA3xx
870static u64 pxa3xx_ssp4_dma_mask = DMA_BIT_MASK(32);
871
872static struct resource pxa3xx_resource_ssp4[] = {
873 [0] = {
874 .start = 0x41a00000,
875 .end = 0x41a0003f,
876 .flags = IORESOURCE_MEM,
877 },
878 [1] = {
879 .start = IRQ_SSP4,
880 .end = IRQ_SSP4,
881 .flags = IORESOURCE_IRQ,
882 },
883 [2] = {
884 /* DRCMR for RX */
885 .start = 2,
886 .end = 2,
887 .flags = IORESOURCE_DMA,
888 },
889 [3] = {
890 /* DRCMR for TX */
891 .start = 3,
892 .end = 3,
893 .flags = IORESOURCE_DMA,
894 },
895};
896
897struct platform_device pxa3xx_device_ssp4 = {
898 /* PXA3xx SSP is basically equivalent to PXA27x */
899 .name = "pxa27x-ssp",
900 .id = 3,
901 .dev = {
902 .dma_mask = &pxa3xx_ssp4_dma_mask,
903 .coherent_dma_mask = DMA_BIT_MASK(32),
904 },
905 .resource = pxa3xx_resource_ssp4,
906 .num_resources = ARRAY_SIZE(pxa3xx_resource_ssp4),
907};
908
909static struct resource pxa3xx_resources_mci2[] = { 850static struct resource pxa3xx_resources_mci2[] = {
910 [0] = { 851 [0] = {
911 .start = 0x42000000, 852 .start = 0x42000000,
@@ -984,6 +925,54 @@ void __init pxa3xx_set_mci3_info(struct pxamci_platform_data *info)
984 pxa_register_device(&pxa3xx_device_mci3, info); 925 pxa_register_device(&pxa3xx_device_mci3, info);
985} 926}
986 927
928static struct resource pxa3xx_resources_gcu[] = {
929 {
930 .start = 0x54000000,
931 .end = 0x54000fff,
932 .flags = IORESOURCE_MEM,
933 },
934 {
935 .start = IRQ_GCU,
936 .end = IRQ_GCU,
937 .flags = IORESOURCE_IRQ,
938 },
939};
940
941static u64 pxa3xx_gcu_dmamask = DMA_BIT_MASK(32);
942
943struct platform_device pxa3xx_device_gcu = {
944 .name = "pxa3xx-gcu",
945 .id = -1,
946 .num_resources = ARRAY_SIZE(pxa3xx_resources_gcu),
947 .resource = pxa3xx_resources_gcu,
948 .dev = {
949 .dma_mask = &pxa3xx_gcu_dmamask,
950 .coherent_dma_mask = 0xffffffff,
951 },
952};
953
954#endif /* CONFIG_PXA3xx */
955
956#if defined(CONFIG_PXA3xx) || defined(CONFIG_PXA95x)
957static struct resource pxa3xx_resources_i2c_power[] = {
958 {
959 .start = 0x40f500c0,
960 .end = 0x40f500d3,
961 .flags = IORESOURCE_MEM,
962 }, {
963 .start = IRQ_PWRI2C,
964 .end = IRQ_PWRI2C,
965 .flags = IORESOURCE_IRQ,
966 },
967};
968
969struct platform_device pxa3xx_device_i2c_power = {
970 .name = "pxa3xx-pwri2c",
971 .id = 1,
972 .resource = pxa3xx_resources_i2c_power,
973 .num_resources = ARRAY_SIZE(pxa3xx_resources_i2c_power),
974};
975
987static struct resource pxa3xx_resources_nand[] = { 976static struct resource pxa3xx_resources_nand[] = {
988 [0] = { 977 [0] = {
989 .start = 0x43100000, 978 .start = 0x43100000,
@@ -1027,33 +1016,45 @@ void __init pxa3xx_set_nand_info(struct pxa3xx_nand_platform_data *info)
1027 pxa_register_device(&pxa3xx_device_nand, info); 1016 pxa_register_device(&pxa3xx_device_nand, info);
1028} 1017}
1029 1018
1030static struct resource pxa3xx_resources_gcu[] = { 1019static u64 pxa3xx_ssp4_dma_mask = DMA_BIT_MASK(32);
1031 { 1020
1032 .start = 0x54000000, 1021static struct resource pxa3xx_resource_ssp4[] = {
1033 .end = 0x54000fff, 1022 [0] = {
1023 .start = 0x41a00000,
1024 .end = 0x41a0003f,
1034 .flags = IORESOURCE_MEM, 1025 .flags = IORESOURCE_MEM,
1035 }, 1026 },
1036 { 1027 [1] = {
1037 .start = IRQ_GCU, 1028 .start = IRQ_SSP4,
1038 .end = IRQ_GCU, 1029 .end = IRQ_SSP4,
1039 .flags = IORESOURCE_IRQ, 1030 .flags = IORESOURCE_IRQ,
1040 }, 1031 },
1032 [2] = {
1033 /* DRCMR for RX */
1034 .start = 2,
1035 .end = 2,
1036 .flags = IORESOURCE_DMA,
1037 },
1038 [3] = {
1039 /* DRCMR for TX */
1040 .start = 3,
1041 .end = 3,
1042 .flags = IORESOURCE_DMA,
1043 },
1041}; 1044};
1042 1045
1043static u64 pxa3xx_gcu_dmamask = DMA_BIT_MASK(32); 1046struct platform_device pxa3xx_device_ssp4 = {
1044 1047 /* PXA3xx SSP is basically equivalent to PXA27x */
1045struct platform_device pxa3xx_device_gcu = { 1048 .name = "pxa27x-ssp",
1046 .name = "pxa3xx-gcu", 1049 .id = 3,
1047 .id = -1,
1048 .num_resources = ARRAY_SIZE(pxa3xx_resources_gcu),
1049 .resource = pxa3xx_resources_gcu,
1050 .dev = { 1050 .dev = {
1051 .dma_mask = &pxa3xx_gcu_dmamask, 1051 .dma_mask = &pxa3xx_ssp4_dma_mask,
1052 .coherent_dma_mask = 0xffffffff, 1052 .coherent_dma_mask = DMA_BIT_MASK(32),
1053 }, 1053 },
1054 .resource = pxa3xx_resource_ssp4,
1055 .num_resources = ARRAY_SIZE(pxa3xx_resource_ssp4),
1054}; 1056};
1055 1057#endif /* CONFIG_PXA3xx || CONFIG_PXA95x */
1056#endif /* CONFIG_PXA3xx */
1057 1058
1058/* pxa2xx-spi platform-device ID equals respective SSP platform-device ID + 1. 1059/* pxa2xx-spi platform-device ID equals respective SSP platform-device ID + 1.
1059 * See comment in arch/arm/mach-pxa/ssp.c::ssp_probe() */ 1060 * See comment in arch/arm/mach-pxa/ssp.c::ssp_probe() */