diff options
Diffstat (limited to 'arch/ppc/syslib/mpc85xx_devices.c')
-rw-r--r-- | arch/ppc/syslib/mpc85xx_devices.c | 185 |
1 files changed, 185 insertions, 0 deletions
diff --git a/arch/ppc/syslib/mpc85xx_devices.c b/arch/ppc/syslib/mpc85xx_devices.c index 1e658ef57e75..b30c57d4518f 100644 --- a/arch/ppc/syslib/mpc85xx_devices.c +++ b/arch/ppc/syslib/mpc85xx_devices.c | |||
@@ -40,6 +40,42 @@ static struct gianfar_platform_data mpc85xx_tsec2_pdata = { | |||
40 | .phy_reg_addr = MPC85xx_ENET1_OFFSET, | 40 | .phy_reg_addr = MPC85xx_ENET1_OFFSET, |
41 | }; | 41 | }; |
42 | 42 | ||
43 | static struct gianfar_platform_data mpc85xx_etsec1_pdata = { | ||
44 | .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT | | ||
45 | FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON | | ||
46 | FSL_GIANFAR_DEV_HAS_MULTI_INTR | | ||
47 | FSL_GIANFAR_DEV_HAS_CSUM | FSL_GIANFAR_DEV_HAS_VLAN | | ||
48 | FSL_GIANFAR_DEV_HAS_EXTENDED_HASH, | ||
49 | .phy_reg_addr = MPC85xx_ENET1_OFFSET, | ||
50 | }; | ||
51 | |||
52 | static struct gianfar_platform_data mpc85xx_etsec2_pdata = { | ||
53 | .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT | | ||
54 | FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON | | ||
55 | FSL_GIANFAR_DEV_HAS_MULTI_INTR | | ||
56 | FSL_GIANFAR_DEV_HAS_CSUM | FSL_GIANFAR_DEV_HAS_VLAN | | ||
57 | FSL_GIANFAR_DEV_HAS_EXTENDED_HASH, | ||
58 | .phy_reg_addr = MPC85xx_ENET1_OFFSET, | ||
59 | }; | ||
60 | |||
61 | static struct gianfar_platform_data mpc85xx_etsec3_pdata = { | ||
62 | .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT | | ||
63 | FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON | | ||
64 | FSL_GIANFAR_DEV_HAS_MULTI_INTR | | ||
65 | FSL_GIANFAR_DEV_HAS_CSUM | FSL_GIANFAR_DEV_HAS_VLAN | | ||
66 | FSL_GIANFAR_DEV_HAS_EXTENDED_HASH, | ||
67 | .phy_reg_addr = MPC85xx_ENET1_OFFSET, | ||
68 | }; | ||
69 | |||
70 | static struct gianfar_platform_data mpc85xx_etsec4_pdata = { | ||
71 | .device_flags = FSL_GIANFAR_DEV_HAS_GIGABIT | | ||
72 | FSL_GIANFAR_DEV_HAS_COALESCE | FSL_GIANFAR_DEV_HAS_RMON | | ||
73 | FSL_GIANFAR_DEV_HAS_MULTI_INTR | | ||
74 | FSL_GIANFAR_DEV_HAS_CSUM | FSL_GIANFAR_DEV_HAS_VLAN | | ||
75 | FSL_GIANFAR_DEV_HAS_EXTENDED_HASH, | ||
76 | .phy_reg_addr = MPC85xx_ENET1_OFFSET, | ||
77 | }; | ||
78 | |||
43 | static struct gianfar_platform_data mpc85xx_fec_pdata = { | 79 | static struct gianfar_platform_data mpc85xx_fec_pdata = { |
44 | .phy_reg_addr = MPC85xx_ENET1_OFFSET, | 80 | .phy_reg_addr = MPC85xx_ENET1_OFFSET, |
45 | }; | 81 | }; |
@@ -48,6 +84,10 @@ static struct fsl_i2c_platform_data mpc85xx_fsl_i2c_pdata = { | |||
48 | .device_flags = FSL_I2C_DEV_SEPARATE_DFSRR, | 84 | .device_flags = FSL_I2C_DEV_SEPARATE_DFSRR, |
49 | }; | 85 | }; |
50 | 86 | ||
87 | static struct fsl_i2c_platform_data mpc85xx_fsl_i2c2_pdata = { | ||
88 | .device_flags = FSL_I2C_DEV_SEPARATE_DFSRR, | ||
89 | }; | ||
90 | |||
51 | static struct plat_serial8250_port serial_platform_data[] = { | 91 | static struct plat_serial8250_port serial_platform_data[] = { |
52 | [0] = { | 92 | [0] = { |
53 | .mapbase = 0x4500, | 93 | .mapbase = 0x4500, |
@@ -536,6 +576,151 @@ struct platform_device ppc_sys_platform_devices[] = { | |||
536 | }, | 576 | }, |
537 | }, | 577 | }, |
538 | #endif /* CONFIG_CPM2 */ | 578 | #endif /* CONFIG_CPM2 */ |
579 | [MPC85xx_eTSEC1] = { | ||
580 | .name = "fsl-gianfar", | ||
581 | .id = 1, | ||
582 | .dev.platform_data = &mpc85xx_etsec1_pdata, | ||
583 | .num_resources = 4, | ||
584 | .resource = (struct resource[]) { | ||
585 | { | ||
586 | .start = MPC85xx_ENET1_OFFSET, | ||
587 | .end = MPC85xx_ENET1_OFFSET + | ||
588 | MPC85xx_ENET1_SIZE - 1, | ||
589 | .flags = IORESOURCE_MEM, | ||
590 | }, | ||
591 | { | ||
592 | .name = "tx", | ||
593 | .start = MPC85xx_IRQ_TSEC1_TX, | ||
594 | .end = MPC85xx_IRQ_TSEC1_TX, | ||
595 | .flags = IORESOURCE_IRQ, | ||
596 | }, | ||
597 | { | ||
598 | .name = "rx", | ||
599 | .start = MPC85xx_IRQ_TSEC1_RX, | ||
600 | .end = MPC85xx_IRQ_TSEC1_RX, | ||
601 | .flags = IORESOURCE_IRQ, | ||
602 | }, | ||
603 | { | ||
604 | .name = "error", | ||
605 | .start = MPC85xx_IRQ_TSEC1_ERROR, | ||
606 | .end = MPC85xx_IRQ_TSEC1_ERROR, | ||
607 | .flags = IORESOURCE_IRQ, | ||
608 | }, | ||
609 | }, | ||
610 | }, | ||
611 | [MPC85xx_eTSEC2] = { | ||
612 | .name = "fsl-gianfar", | ||
613 | .id = 2, | ||
614 | .dev.platform_data = &mpc85xx_etsec2_pdata, | ||
615 | .num_resources = 4, | ||
616 | .resource = (struct resource[]) { | ||
617 | { | ||
618 | .start = MPC85xx_ENET2_OFFSET, | ||
619 | .end = MPC85xx_ENET2_OFFSET + | ||
620 | MPC85xx_ENET2_SIZE - 1, | ||
621 | .flags = IORESOURCE_MEM, | ||
622 | }, | ||
623 | { | ||
624 | .name = "tx", | ||
625 | .start = MPC85xx_IRQ_TSEC2_TX, | ||
626 | .end = MPC85xx_IRQ_TSEC2_TX, | ||
627 | .flags = IORESOURCE_IRQ, | ||
628 | }, | ||
629 | { | ||
630 | .name = "rx", | ||
631 | .start = MPC85xx_IRQ_TSEC2_RX, | ||
632 | .end = MPC85xx_IRQ_TSEC2_RX, | ||
633 | .flags = IORESOURCE_IRQ, | ||
634 | }, | ||
635 | { | ||
636 | .name = "error", | ||
637 | .start = MPC85xx_IRQ_TSEC2_ERROR, | ||
638 | .end = MPC85xx_IRQ_TSEC2_ERROR, | ||
639 | .flags = IORESOURCE_IRQ, | ||
640 | }, | ||
641 | }, | ||
642 | }, | ||
643 | [MPC85xx_eTSEC3] = { | ||
644 | .name = "fsl-gianfar", | ||
645 | .id = 3, | ||
646 | .dev.platform_data = &mpc85xx_etsec3_pdata, | ||
647 | .num_resources = 4, | ||
648 | .resource = (struct resource[]) { | ||
649 | { | ||
650 | .start = MPC85xx_ENET3_OFFSET, | ||
651 | .end = MPC85xx_ENET3_OFFSET + | ||
652 | MPC85xx_ENET3_SIZE - 1, | ||
653 | .flags = IORESOURCE_MEM, | ||
654 | }, | ||
655 | { | ||
656 | .name = "tx", | ||
657 | .start = MPC85xx_IRQ_TSEC3_TX, | ||
658 | .end = MPC85xx_IRQ_TSEC3_TX, | ||
659 | .flags = IORESOURCE_IRQ, | ||
660 | }, | ||
661 | { | ||
662 | .name = "rx", | ||
663 | .start = MPC85xx_IRQ_TSEC3_RX, | ||
664 | .end = MPC85xx_IRQ_TSEC3_RX, | ||
665 | .flags = IORESOURCE_IRQ, | ||
666 | }, | ||
667 | { | ||
668 | .name = "error", | ||
669 | .start = MPC85xx_IRQ_TSEC3_ERROR, | ||
670 | .end = MPC85xx_IRQ_TSEC3_ERROR, | ||
671 | .flags = IORESOURCE_IRQ, | ||
672 | }, | ||
673 | }, | ||
674 | }, | ||
675 | [MPC85xx_eTSEC4] = { | ||
676 | .name = "fsl-gianfar", | ||
677 | .id = 4, | ||
678 | .dev.platform_data = &mpc85xx_etsec4_pdata, | ||
679 | .num_resources = 4, | ||
680 | .resource = (struct resource[]) { | ||
681 | { | ||
682 | .start = 0x27000, | ||
683 | .end = 0x27fff, | ||
684 | .flags = IORESOURCE_MEM, | ||
685 | }, | ||
686 | { | ||
687 | .name = "tx", | ||
688 | .start = MPC85xx_IRQ_TSEC4_TX, | ||
689 | .end = MPC85xx_IRQ_TSEC4_TX, | ||
690 | .flags = IORESOURCE_IRQ, | ||
691 | }, | ||
692 | { | ||
693 | .name = "rx", | ||
694 | .start = MPC85xx_IRQ_TSEC4_RX, | ||
695 | .end = MPC85xx_IRQ_TSEC4_RX, | ||
696 | .flags = IORESOURCE_IRQ, | ||
697 | }, | ||
698 | { | ||
699 | .name = "error", | ||
700 | .start = MPC85xx_IRQ_TSEC4_ERROR, | ||
701 | .end = MPC85xx_IRQ_TSEC4_ERROR, | ||
702 | .flags = IORESOURCE_IRQ, | ||
703 | }, | ||
704 | }, | ||
705 | }, | ||
706 | [MPC85xx_IIC2] = { | ||
707 | .name = "fsl-i2c", | ||
708 | .id = 2, | ||
709 | .dev.platform_data = &mpc85xx_fsl_i2c2_pdata, | ||
710 | .num_resources = 2, | ||
711 | .resource = (struct resource[]) { | ||
712 | { | ||
713 | .start = 0x03100, | ||
714 | .end = 0x031ff, | ||
715 | .flags = IORESOURCE_MEM, | ||
716 | }, | ||
717 | { | ||
718 | .start = MPC85xx_IRQ_IIC1, | ||
719 | .end = MPC85xx_IRQ_IIC1, | ||
720 | .flags = IORESOURCE_IRQ, | ||
721 | }, | ||
722 | }, | ||
723 | }, | ||
539 | }; | 724 | }; |
540 | 725 | ||
541 | static int __init mach_mpc85xx_fixup(struct platform_device *pdev) | 726 | static int __init mach_mpc85xx_fixup(struct platform_device *pdev) |