aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authoreric miao <eric.miao@marvell.com>2007-12-10 04:51:29 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-01-26 10:07:51 -0500
commitd2b82dded8c45daeaad332459222034a3fabd227 (patch)
tree921a53625b7d8ad56e4a9653e7ba38c929d2a03b /arch/arm
parent49db76eb5fd7d75babb4f3a5f30e86d1f8e82543 (diff)
[ARM] pxa: define SSP platform devices for pxa2xx/pxa3xx
Signed-off-by: eric miao <eric.miao@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-pxa/devices.h8
-rw-r--r--arch/arm/mach-pxa/generic.c277
2 files changed, 285 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/devices.h b/arch/arm/mach-pxa/devices.h
index 51162a7dba07..e78b48f62b36 100644
--- a/arch/arm/mach-pxa/devices.h
+++ b/arch/arm/mach-pxa/devices.h
@@ -13,4 +13,12 @@ extern struct platform_device pxa_device_rtc;
13extern struct platform_device pxa27x_device_i2c_power; 13extern struct platform_device pxa27x_device_i2c_power;
14extern struct platform_device pxa27x_device_ohci; 14extern struct platform_device pxa27x_device_ohci;
15 15
16extern struct platform_device pxa25x_device_ssp;
17extern struct platform_device pxa25x_device_nssp;
18extern struct platform_device pxa25x_device_assp;
19extern struct platform_device pxa27x_device_ssp1;
20extern struct platform_device pxa27x_device_ssp2;
21extern struct platform_device pxa27x_device_ssp3;
22extern struct platform_device pxa3xx_device_ssp4;
23
16void __init pxa_register_device(struct platform_device *dev, void *data); 24void __init pxa_register_device(struct platform_device *dev, void *data);
diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c
index 3d863c919e8b..8bb70e70131e 100644
--- a/arch/arm/mach-pxa/generic.c
+++ b/arch/arm/mach-pxa/generic.c
@@ -24,6 +24,7 @@
24#include <linux/ioport.h> 24#include <linux/ioport.h>
25#include <linux/pm.h> 25#include <linux/pm.h>
26#include <linux/string.h> 26#include <linux/string.h>
27#include <linux/dma-mapping.h>
27 28
28#include <asm/hardware.h> 29#include <asm/hardware.h>
29#include <asm/irq.h> 30#include <asm/irq.h>
@@ -487,3 +488,279 @@ struct platform_device pxa_device_rtc = {
487 .name = "sa1100-rtc", 488 .name = "sa1100-rtc",
488 .id = -1, 489 .id = -1,
489}; 490};
491
492#ifdef CONFIG_PXA25x
493
494static u64 pxa25x_ssp_dma_mask = DMA_BIT_MASK(32);
495
496static struct resource pxa25x_resource_ssp[] = {
497 [0] = {
498 .start = 0x41000000,
499 .end = 0x4100001f,
500 .flags = IORESOURCE_MEM,
501 },
502 [1] = {
503 .start = IRQ_SSP,
504 .end = IRQ_SSP,
505 .flags = IORESOURCE_IRQ,
506 },
507 [2] = {
508 /* DRCMR for RX */
509 .start = 13,
510 .end = 13,
511 .flags = IORESOURCE_DMA,
512 },
513 [3] = {
514 /* DRCMR for TX */
515 .start = 14,
516 .end = 14,
517 .flags = IORESOURCE_DMA,
518 },
519};
520
521struct platform_device pxa25x_device_ssp = {
522 .name = "pxa25x-ssp",
523 .id = 0,
524 .dev = {
525 .dma_mask = &pxa25x_ssp_dma_mask,
526 .coherent_dma_mask = DMA_BIT_MASK(32),
527 },
528 .resource = pxa25x_resource_ssp,
529 .num_resources = ARRAY_SIZE(pxa25x_resource_ssp),
530};
531
532static u64 pxa25x_nssp_dma_mask = DMA_BIT_MASK(32);
533
534static struct resource pxa25x_resource_nssp[] = {
535 [0] = {
536 .start = 0x41400000,
537 .end = 0x4140002f,
538 .flags = IORESOURCE_MEM,
539 },
540 [1] = {
541 .start = IRQ_NSSP,
542 .end = IRQ_NSSP,
543 .flags = IORESOURCE_IRQ,
544 },
545 [2] = {
546 /* DRCMR for RX */
547 .start = 15,
548 .end = 15,
549 .flags = IORESOURCE_DMA,
550 },
551 [3] = {
552 /* DRCMR for TX */
553 .start = 16,
554 .end = 16,
555 .flags = IORESOURCE_DMA,
556 },
557};
558
559struct platform_device pxa25x_device_nssp = {
560 .name = "pxa25x-nssp",
561 .id = 1,
562 .dev = {
563 .dma_mask = &pxa25x_nssp_dma_mask,
564 .coherent_dma_mask = DMA_BIT_MASK(32),
565 },
566 .resource = pxa25x_resource_nssp,
567 .num_resources = ARRAY_SIZE(pxa25x_resource_nssp),
568};
569
570static u64 pxa25x_assp_dma_mask = DMA_BIT_MASK(32);
571
572static struct resource pxa25x_resource_assp[] = {
573 [0] = {
574 .start = 0x41500000,
575 .end = 0x4150002f,
576 .flags = IORESOURCE_MEM,
577 },
578 [1] = {
579 .start = IRQ_ASSP,
580 .end = IRQ_ASSP,
581 .flags = IORESOURCE_IRQ,
582 },
583 [2] = {
584 /* DRCMR for RX */
585 .start = 23,
586 .end = 23,
587 .flags = IORESOURCE_DMA,
588 },
589 [3] = {
590 /* DRCMR for TX */
591 .start = 24,
592 .end = 24,
593 .flags = IORESOURCE_DMA,
594 },
595};
596
597struct platform_device pxa25x_device_assp = {
598 /* ASSP is basically equivalent to NSSP */
599 .name = "pxa25x-nssp",
600 .id = 2,
601 .dev = {
602 .dma_mask = &pxa25x_assp_dma_mask,
603 .coherent_dma_mask = DMA_BIT_MASK(32),
604 },
605 .resource = pxa25x_resource_assp,
606 .num_resources = ARRAY_SIZE(pxa25x_resource_assp),
607};
608#endif /* CONFIG_PXA25x */
609
610#if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx)
611
612static u64 pxa27x_ssp1_dma_mask = DMA_BIT_MASK(32);
613
614static struct resource pxa27x_resource_ssp1[] = {
615 [0] = {
616 .start = 0x41000000,
617 .end = 0x4100003f,
618 .flags = IORESOURCE_MEM,
619 },
620 [1] = {
621 .start = IRQ_SSP,
622 .end = IRQ_SSP,
623 .flags = IORESOURCE_IRQ,
624 },
625 [2] = {
626 /* DRCMR for RX */
627 .start = 13,
628 .end = 13,
629 .flags = IORESOURCE_DMA,
630 },
631 [3] = {
632 /* DRCMR for TX */
633 .start = 14,
634 .end = 14,
635 .flags = IORESOURCE_DMA,
636 },
637};
638
639struct platform_device pxa27x_device_ssp1 = {
640 .name = "pxa27x-ssp",
641 .id = 0,
642 .dev = {
643 .dma_mask = &pxa27x_ssp1_dma_mask,
644 .coherent_dma_mask = DMA_BIT_MASK(32),
645 },
646 .resource = pxa27x_resource_ssp1,
647 .num_resources = ARRAY_SIZE(pxa27x_resource_ssp1),
648};
649
650static u64 pxa27x_ssp2_dma_mask = DMA_BIT_MASK(32);
651
652static struct resource pxa27x_resource_ssp2[] = {
653 [0] = {
654 .start = 0x41700000,
655 .end = 0x4170003f,
656 .flags = IORESOURCE_MEM,
657 },
658 [1] = {
659 .start = IRQ_SSP2,
660 .end = IRQ_SSP2,
661 .flags = IORESOURCE_IRQ,
662 },
663 [2] = {
664 /* DRCMR for RX */
665 .start = 15,
666 .end = 15,
667 .flags = IORESOURCE_DMA,
668 },
669 [3] = {
670 /* DRCMR for TX */
671 .start = 16,
672 .end = 16,
673 .flags = IORESOURCE_DMA,
674 },
675};
676
677struct platform_device pxa27x_device_ssp2 = {
678 .name = "pxa27x-ssp",
679 .id = 1,
680 .dev = {
681 .dma_mask = &pxa27x_ssp2_dma_mask,
682 .coherent_dma_mask = DMA_BIT_MASK(32),
683 },
684 .resource = pxa27x_resource_ssp2,
685 .num_resources = ARRAY_SIZE(pxa27x_resource_ssp2),
686};
687
688static u64 pxa27x_ssp3_dma_mask = DMA_BIT_MASK(32);
689
690static struct resource pxa27x_resource_ssp3[] = {
691 [0] = {
692 .start = 0x41900000,
693 .end = 0x4190003f,
694 .flags = IORESOURCE_MEM,
695 },
696 [1] = {
697 .start = IRQ_SSP3,
698 .end = IRQ_SSP3,
699 .flags = IORESOURCE_IRQ,
700 },
701 [2] = {
702 /* DRCMR for RX */
703 .start = 66,
704 .end = 66,
705 .flags = IORESOURCE_DMA,
706 },
707 [3] = {
708 /* DRCMR for TX */
709 .start = 67,
710 .end = 67,
711 .flags = IORESOURCE_DMA,
712 },
713};
714
715struct platform_device pxa27x_device_ssp3 = {
716 .name = "pxa27x-ssp",
717 .id = 2,
718 .dev = {
719 .dma_mask = &pxa27x_ssp3_dma_mask,
720 .coherent_dma_mask = DMA_BIT_MASK(32),
721 },
722 .resource = pxa27x_resource_ssp3,
723 .num_resources = ARRAY_SIZE(pxa27x_resource_ssp3),
724};
725#endif /* CONFIG_PXA27x || CONFIG_PXA3xx */
726
727#ifdef CONFIG_PXA3xx
728static u64 pxa3xx_ssp4_dma_mask = DMA_BIT_MASK(32);
729
730static struct resource pxa3xx_resource_ssp4[] = {
731 [0] = {
732 .start = 0x41a00000,
733 .end = 0x41a0003f,
734 .flags = IORESOURCE_MEM,
735 },
736 [1] = {
737 .start = IRQ_SSP4,
738 .end = IRQ_SSP4,
739 .flags = IORESOURCE_IRQ,
740 },
741 [2] = {
742 /* DRCMR for RX */
743 .start = 2,
744 .end = 2,
745 .flags = IORESOURCE_DMA,
746 },
747 [3] = {
748 /* DRCMR for TX */
749 .start = 3,
750 .end = 3,
751 .flags = IORESOURCE_DMA,
752 },
753};
754
755struct platform_device pxa3xx_device_ssp4 = {
756 /* PXA3xx SSP is basically equivalent to PXA27x */
757 .name = "pxa27x-ssp",
758 .id = 3,
759 .dev = {
760 .dma_mask = &pxa3xx_ssp4_dma_mask,
761 .coherent_dma_mask = DMA_BIT_MASK(32),
762 },
763 .resource = pxa3xx_resource_ssp4,
764 .num_resources = ARRAY_SIZE(pxa3xx_resource_ssp4),
765};
766#endif /* CONFIG_PXA3xx */