~ubuntu-branches/ubuntu/maverick/uboot-imx/maverick

« back to all changes in this revision

Viewing changes to include/asm-arm/arch-pxa/pxa-regs.h

  • Committer: Bazaar Package Importer
  • Author(s): Oliver Grawert
  • Date: 2010-01-06 09:28:25 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100106092825-q8o7x811035syh8k
Tags: 2009.08-0ubuntu1
* move to new upstream (2009.08)
* move to new freescale patchset for the 2009.08 release
* remove README.nios_CONFIG_SYS_NIOS_CPU from debian/docs, 
  this is not shipped upstream anymore
* update 1000_fix_gcc_4.4_compability.patch to apply to the new code
* Makefile target is now mx51_bbg_config, update rules accordingly
* switch everything to to3 (including the binary package)

Show diffs side-by-side

added added

removed removed

Lines of Context:
596
596
/*
597
597
 * USB Device Controller
598
598
 */
599
 
#ifndef CONFIG_CPU_MONAHANS
600
 
#define UDC_RES1        __REG(0x40600004)  /* UDC Undocumented - Reserved1 */
601
 
#define UDC_RES2        __REG(0x40600008)  /* UDC Undocumented - Reserved2 */
602
 
#define UDC_RES3        __REG(0x4060000C)  /* UDC Undocumented - Reserved3 */
603
 
 
604
 
#define UDCCR           __REG(0x40600000)  /* UDC Control Register */
605
 
#define UDCCR_UDE       (1 << 0)        /* UDC enable */
606
 
#define UDCCR_UDA       (1 << 1)        /* UDC active */
607
 
#define UDCCR_RSM       (1 << 2)        /* Device resume */
608
 
#define UDCCR_RESIR     (1 << 3)        /* Resume interrupt request */
609
 
#define UDCCR_SUSIR     (1 << 4)        /* Suspend interrupt request */
610
 
#define UDCCR_SRM       (1 << 5)        /* Suspend/resume interrupt mask */
611
 
#define UDCCR_RSTIR     (1 << 6)        /* Reset interrupt request */
612
 
#define UDCCR_REM       (1 << 7)        /* Reset interrupt mask */
613
 
 
614
 
#define UDCCS0          __REG(0x40600010)  /* UDC Endpoint 0 Control/Status Register */
615
 
#define UDCCS0_OPR      (1 << 0)        /* OUT packet ready */
616
 
#define UDCCS0_IPR      (1 << 1)        /* IN packet ready */
617
 
#define UDCCS0_FTF      (1 << 2)        /* Flush Tx FIFO */
618
 
#define UDCCS0_DRWF     (1 << 3)        /* Device remote wakeup feature */
619
 
#define UDCCS0_SST      (1 << 4)        /* Sent stall */
620
 
#define UDCCS0_FST      (1 << 5)        /* Force stall */
621
 
#define UDCCS0_RNE      (1 << 6)        /* Receive FIFO no empty */
622
 
#define UDCCS0_SA       (1 << 7)        /* Setup active */
 
599
#ifdef CONFIG_PXA27X
 
600
 
 
601
#define UDCCR           __REG(0x40600000)       /* UDC Control Register */
 
602
#define UDCCR_UDE       (1 << 0)                /* UDC enable */
 
603
#define UDCCR_UDA       (1 << 1)                /* UDC active */
 
604
#define UDCCR_RSM       (1 << 2)                /* Device resume */
 
605
#define UDCCR_EMCE      (1 << 3)                /* Endpoint Memory Configuration Error */
 
606
#define UDCCR_SMAC      (1 << 4)                /* Switch Endpoint Memory to Active Configuration */
 
607
#define UDCCR_RESIR     (1 << 29)               /* Resume interrupt request */
 
608
#define UDCCR_SUSIR     (1 << 28)               /* Suspend interrupt request */
 
609
#define UDCCR_SM        (1 << 28)               /* Suspend interrupt mask */
 
610
#define UDCCR_RSTIR     (1 << 27)               /* Reset interrupt request */
 
611
#define UDCCR_REM       (1 << 27)               /* Reset interrupt mask */
 
612
#define UDCCR_RM        (1 << 29)               /* resume interrupt mask */
 
613
#define UDCCR_SRM       (UDCCR_SM|UDCCR_RM)
 
614
#define UDCCR_OEN       (1 << 31)               /* On-the-Go Enable */
 
615
#define UDCCR_AALTHNP   (1 << 30)               /* A-device Alternate Host Negotiation Protocol Port Support */
 
616
#define UDCCR_AHNP      (1 << 29)               /* A-device Host Negotiation Protocol Support */
 
617
#define UDCCR_BHNP      (1 << 28)               /* B-device Host Negotiation Protocol Enable */
 
618
#define UDCCR_DWRE      (1 << 16)               /* Device Remote Wake-up Enable */
 
619
#define UDCCR_ACN       (0x03 << 11)            /* Active UDC configuration Number */
 
620
#define UDCCR_ACN_S     11
 
621
#define UDCCR_AIN       (0x07 << 8)             /* Active UDC interface Number */
 
622
#define UDCCR_AIN_S     8
 
623
#define UDCCR_AAISN     (0x07 << 5)             /* Active UDC Alternate Interface  Setting Number */
 
624
#define UDCCR_AAISN_S   5
 
625
 
 
626
#define UDCCS0          __REG(0x40600100)       /* UDC Endpoint 0 Control/Status Register */
 
627
#define UDCCS0_OPR      (1 << 0)                /* OUT packet ready */
 
628
#define UDCCS0_IPR      (1 << 1)                /* IN packet ready */
 
629
#define UDCCS0_FTF      (1 << 2)                /* Flush Tx FIFO */
 
630
#define UDCCS0_DRWF     (1 << 16)               /* Device remote wakeup feature */
 
631
#define UDCCS0_SST      (1 << 4)                /* Sent stall */
 
632
#define UDCCS0_FST      (1 << 5)                /* Force stall */
 
633
#define UDCCS0_RNE      (1 << 6)                /* Receive FIFO no empty */
 
634
#define UDCCS0_SA       (1 << 7)                /* Setup active */
623
635
 
624
636
/* Bulk IN - Endpoint 1,6,11 */
625
 
#define UDCCS1          __REG(0x40600014)  /* UDC Endpoint 1 (IN) Control/Status Register */
 
637
#define UDCCS1          __REG(0x40600104)  /* UDC Endpoint 1 (IN) Control/Status Register */
626
638
#define UDCCS6          __REG(0x40600028)  /* UDC Endpoint 6 (IN) Control/Status Register */
627
639
#define UDCCS11         __REG(0x4060003C)  /* UDC Endpoint 11 (IN) Control/Status Register */
628
640
 
629
641
#define UDCCS_BI_TFS    (1 << 0)        /* Transmit FIFO service */
630
642
#define UDCCS_BI_TPC    (1 << 1)        /* Transmit packet complete */
631
 
#define UDCCS_BI_FTF    (1 << 2)        /* Flush Tx FIFO */
 
643
#define UDCCS_BI_FTF    (1 << 8)        /* Flush Tx FIFO */
632
644
#define UDCCS_BI_TUR    (1 << 3)        /* Transmit FIFO underrun */
633
645
#define UDCCS_BI_SST    (1 << 4)        /* Sent stall */
634
646
#define UDCCS_BI_FST    (1 << 5)        /* Force stall */
635
647
#define UDCCS_BI_TSP    (1 << 7)        /* Transmit short packet */
636
648
 
637
649
/* Bulk OUT - Endpoint 2,7,12 */
638
 
#define UDCCS2          __REG(0x40600018)  /* UDC Endpoint 2 (OUT) Control/Status Register */
 
650
#define UDCCS2          __REG(0x40600108)  /* UDC Endpoint 2 (OUT) Control/Status Register */
639
651
#define UDCCS7          __REG(0x4060002C)  /* UDC Endpoint 7 (OUT) Control/Status Register */
640
652
#define UDCCS12         __REG(0x40600040)  /* UDC Endpoint 12 (OUT) Control/Status Register */
641
653
 
684
696
#define UDCCS_INT_TSP   (1 << 7)        /* Transmit short packet */
685
697
 
686
698
#define UFNRH           __REG(0x40600060)  /* UDC Frame Number Register High */
687
 
#define UFNRL           __REG(0x40600064)  /* UDC Frame Number Register Low */
688
 
#define UBCR2           __REG(0x40600068)  /* UDC Byte Count Reg 2 */
 
699
#define UFNRL           __REG(0x40600014)  /* UDC Frame Number Register Low */
 
700
#define UBCR2           __REG(0x40600208)  /* UDC Byte Count Reg 2 */
689
701
#define UBCR4           __REG(0x4060006c)  /* UDC Byte Count Reg 4 */
690
702
#define UBCR7           __REG(0x40600070)  /* UDC Byte Count Reg 7 */
691
703
#define UBCR9           __REG(0x40600074)  /* UDC Byte Count Reg 9 */
692
704
#define UBCR12          __REG(0x40600078)  /* UDC Byte Count Reg 12 */
693
705
#define UBCR14          __REG(0x4060007c)  /* UDC Byte Count Reg 14 */
694
 
#define UDDR0           __REG(0x40600080)  /* UDC Endpoint 0 Data Register */
695
 
#define UDDR1           __REG(0x40600100)  /* UDC Endpoint 1 Data Register */
696
 
#define UDDR2           __REG(0x40600180)  /* UDC Endpoint 2 Data Register */
 
706
#define UDDR0           __REG(0x40600300)  /* UDC Endpoint 0 Data Register */
 
707
#define UDDR1           __REG(0x40600304)  /* UDC Endpoint 1 Data Register */
 
708
#define UDDR2           __REG(0x40600308)  /* UDC Endpoint 2 Data Register */
697
709
#define UDDR3           __REG(0x40600200)  /* UDC Endpoint 3 Data Register */
698
710
#define UDDR4           __REG(0x40600400)  /* UDC Endpoint 4 Data Register */
699
711
#define UDDR5           __REG(0x406000A0)  /* UDC Endpoint 5 Data Register */
708
720
#define UDDR14          __REG(0x40600E00)  /* UDC Endpoint 14 Data Register */
709
721
#define UDDR15          __REG(0x406000E0)  /* UDC Endpoint 15 Data Register */
710
722
 
711
 
#define UICR0           __REG(0x40600050)  /* UDC Interrupt Control Register 0 */
 
723
#define UICR0           __REG(0x40600004)  /* UDC Interrupt Control Register 0 */
712
724
 
713
725
#define UICR0_IM0       (1 << 0)        /* Interrupt mask ep 0 */
714
726
#define UICR0_IM1       (1 << 1)        /* Interrupt mask ep 1 */
719
731
#define UICR0_IM6       (1 << 6)        /* Interrupt mask ep 6 */
720
732
#define UICR0_IM7       (1 << 7)        /* Interrupt mask ep 7 */
721
733
 
722
 
#define UICR1           __REG(0x40600054)  /* UDC Interrupt Control Register 1 */
 
734
#define UICR1           __REG(0x40600008)  /* UDC Interrupt Control Register 1 */
723
735
 
724
736
#define UICR1_IM8       (1 << 0)        /* Interrupt mask ep 8 */
725
737
#define UICR1_IM9       (1 << 1)        /* Interrupt mask ep 9 */
730
742
#define UICR1_IM14      (1 << 6)        /* Interrupt mask ep 14 */
731
743
#define UICR1_IM15      (1 << 7)        /* Interrupt mask ep 15 */
732
744
 
733
 
#define USIR0           __REG(0x40600058)  /* UDC Status Interrupt Register 0 */
 
745
#define USIR0           __REG(0x4060000C)  /* UDC Status Interrupt Register 0 */
734
746
 
735
747
#define USIR0_IR0       (1 << 0)        /* Interrup request ep 0 */
736
 
#define USIR0_IR1       (1 << 1)        /* Interrup request ep 1 */
737
 
#define USIR0_IR2       (1 << 2)        /* Interrup request ep 2 */
 
748
#define USIR0_IR1       (1 << 2)        /* Interrup request ep 1 */
 
749
#define USIR0_IR2       (1 << 4)        /* Interrup request ep 2 */
738
750
#define USIR0_IR3       (1 << 3)        /* Interrup request ep 3 */
739
751
#define USIR0_IR4       (1 << 4)        /* Interrup request ep 4 */
740
752
#define USIR0_IR5       (1 << 5)        /* Interrup request ep 5 */
741
753
#define USIR0_IR6       (1 << 6)        /* Interrup request ep 6 */
742
754
#define USIR0_IR7       (1 << 7)        /* Interrup request ep 7 */
743
755
 
744
 
#define USIR1           __REG(0x4060005C)  /* UDC Status Interrupt Register 1 */
 
756
#define USIR1           __REG(0x40600010)  /* UDC Status Interrupt Register 1 */
745
757
 
746
758
#define USIR1_IR8       (1 << 0)        /* Interrup request ep 8 */
747
759
#define USIR1_IR9       (1 << 1)        /* Interrup request ep 9 */
751
763
#define USIR1_IR13      (1 << 5)        /* Interrup request ep 13 */
752
764
#define USIR1_IR14      (1 << 6)        /* Interrup request ep 14 */
753
765
#define USIR1_IR15      (1 << 7)        /* Interrup request ep 15 */
754
 
#endif /* ! CONFIG_CPU_MONAHANS */
 
766
 
 
767
 
 
768
#define UDCICR0         __REG(0x40600004)       /* UDC Interrupt Control Register0 */
 
769
#define UDCICR1         __REG(0x40600008)       /* UDC Interrupt Control Register1 */
 
770
#define UDCICR_FIFOERR  (1 << 1)                        /* FIFO Error interrupt for EP */
 
771
#define UDCICR_PKTCOMPL (1 << 0)                        /* Packet Complete interrupt for EP */
 
772
 
 
773
#define UDCICR_INT(n, intr) (((intr) & 0x03) << (((n) & 0x0F) * 2))
 
774
#define UDCICR1_IECC    (1 << 31)       /* IntEn - Configuration Change */
 
775
#define UDCICR1_IESOF   (1 << 30)       /* IntEn - Start of Frame */
 
776
#define UDCICR1_IERU    (1 << 29)       /* IntEn - Resume */
 
777
#define UDCICR1_IESU    (1 << 28)       /* IntEn - Suspend */
 
778
#define UDCICR1_IERS    (1 << 27)       /* IntEn - Reset */
 
779
 
 
780
#define UDCISR0         __REG(0x4060000C) /* UDC Interrupt Status Register 0 */
 
781
#define UDCISR1         __REG(0x40600010) /* UDC Interrupt Status Register 1 */
 
782
#define UDCISR_INT(n, intr) (((intr) & 0x03) << (((n) & 0x0F) * 2))
 
783
#define UDCISR1_IRCC    (1 << 31)       /* IntEn - Configuration Change */
 
784
#define UDCISR1_IRSOF   (1 << 30)       /* IntEn - Start of Frame */
 
785
#define UDCISR1_IRRU    (1 << 29)       /* IntEn - Resume */
 
786
#define UDCISR1_IRSU    (1 << 28)       /* IntEn - Suspend */
 
787
#define UDCISR1_IRRS    (1 << 27)       /* IntEn - Reset */
 
788
 
 
789
 
 
790
#define UDCFNR                  __REG(0x40600014) /* UDC Frame Number Register */
 
791
#define UDCOTGICR               __REG(0x40600018) /* UDC On-The-Go interrupt control */
 
792
#define UDCOTGICR_IESF          (1 << 24)       /* OTG SET_FEATURE command recvd */
 
793
#define UDCOTGICR_IEXR          (1 << 17)       /* Extra Transciever Interrupt Rising Edge Interrupt Enable */
 
794
#define UDCOTGICR_IEXF          (1 << 16)       /* Extra Transciever Interrupt Falling Edge Interrupt Enable */
 
795
#define UDCOTGICR_IEVV40R       (1 << 9)        /* OTG Vbus Valid 4.0V Rising Edge Interrupt Enable */
 
796
#define UDCOTGICR_IEVV40F       (1 << 8)        /* OTG Vbus Valid 4.0V Falling Edge Interrupt Enable */
 
797
#define UDCOTGICR_IEVV44R       (1 << 7)        /* OTG Vbus Valid 4.4V Rising Edge  Interrupt Enable */
 
798
#define UDCOTGICR_IEVV44F       (1 << 6)        /* OTG Vbus Valid 4.4V Falling Edge Interrupt Enable */
 
799
#define UDCOTGICR_IESVR         (1 << 5)        /* OTG Session Valid Rising Edge Interrupt Enable */
 
800
#define UDCOTGICR_IESVF         (1 << 4)        /* OTG Session Valid Falling Edge Interrupt Enable */
 
801
#define UDCOTGICR_IESDR         (1 << 3)        /* OTG A-Device SRP Detect Rising Edge Interrupt Enable */
 
802
#define UDCOTGICR_IESDF         (1 << 2)        /* OTG A-Device SRP Detect Falling  Edge Interrupt Enable */
 
803
#define UDCOTGICR_IEIDR         (1 << 1)        /* OTG ID Change Rising Edge Interrupt Enable */
 
804
#define UDCOTGICR_IEIDF         (1 << 0)        /* OTG ID Change Falling Edge Interrupt Enable */
 
805
 
 
806
#define UDCCSN(x)       __REG2(0x40600100, (x) << 2)
 
807
#define UDCCSR0         __REG(0x40600100) /* UDC Control/Status register - Endpoint 0 */
 
808
 
 
809
#define UDCCSR0_SA      (1 << 7)        /* Setup Active */
 
810
#define UDCCSR0_RNE     (1 << 6)        /* Receive FIFO Not Empty */
 
811
#define UDCCSR0_FST     (1 << 5)        /* Force Stall */
 
812
#define UDCCSR0_SST     (1 << 4)        /* Sent Stall */
 
813
#define UDCCSR0_DME     (1 << 3)        /* DMA Enable */
 
814
#define UDCCSR0_FTF     (1 << 2)        /* Flush Transmit FIFO */
 
815
#define UDCCSR0_IPR     (1 << 1)        /* IN Packet Ready */
 
816
#define UDCCSR0_OPC     (1 << 0)        /* OUT Packet Complete */
 
817
 
 
818
#define UDCCSRA         __REG(0x40600104) /* UDC Control/Status register - Endpoint A */
 
819
#define UDCCSRB         __REG(0x40600108) /* UDC Control/Status register - Endpoint B */
 
820
#define UDCCSRC         __REG(0x4060010C) /* UDC Control/Status register - Endpoint C */
 
821
#define UDCCSRD         __REG(0x40600110) /* UDC Control/Status register - Endpoint D */
 
822
#define UDCCSRE         __REG(0x40600114) /* UDC Control/Status register - Endpoint E */
 
823
#define UDCCSRF         __REG(0x40600118) /* UDC Control/Status register - Endpoint F */
 
824
#define UDCCSRG         __REG(0x4060011C) /* UDC Control/Status register - Endpoint G */
 
825
#define UDCCSRH         __REG(0x40600120) /* UDC Control/Status register - Endpoint H */
 
826
#define UDCCSRI         __REG(0x40600124) /* UDC Control/Status register - Endpoint I */
 
827
#define UDCCSRJ         __REG(0x40600128) /* UDC Control/Status register - Endpoint J */
 
828
#define UDCCSRK         __REG(0x4060012C) /* UDC Control/Status register - Endpoint K */
 
829
#define UDCCSRL         __REG(0x40600130) /* UDC Control/Status register - Endpoint L */
 
830
#define UDCCSRM         __REG(0x40600134) /* UDC Control/Status register - Endpoint M */
 
831
#define UDCCSRN         __REG(0x40600138) /* UDC Control/Status register - Endpoint N */
 
832
#define UDCCSRP         __REG(0x4060013C) /* UDC Control/Status register - Endpoint P */
 
833
#define UDCCSRQ         __REG(0x40600140) /* UDC Control/Status register - Endpoint Q */
 
834
#define UDCCSRR         __REG(0x40600144) /* UDC Control/Status register - Endpoint R */
 
835
#define UDCCSRS         __REG(0x40600148) /* UDC Control/Status register - Endpoint S */
 
836
#define UDCCSRT         __REG(0x4060014C) /* UDC Control/Status register - Endpoint T */
 
837
#define UDCCSRU         __REG(0x40600150) /* UDC Control/Status register - Endpoint U */
 
838
#define UDCCSRV         __REG(0x40600154) /* UDC Control/Status register - Endpoint V */
 
839
#define UDCCSRW         __REG(0x40600158) /* UDC Control/Status register - Endpoint W */
 
840
#define UDCCSRX         __REG(0x4060015C) /* UDC Control/Status register - Endpoint X */
 
841
 
 
842
#define UDCCSR_DPE      (1 << 9)        /* Data Packet Error */
 
843
#define UDCCSR_FEF      (1 << 8)        /* Flush Endpoint FIFO */
 
844
#define UDCCSR_SP       (1 << 7)        /* Short Packet Control/Status */
 
845
#define UDCCSR_BNE      (1 << 6)        /* Buffer Not Empty (IN endpoints) */
 
846
#define UDCCSR_BNF      (1 << 6)        /* Buffer Not Full (OUT endpoints) */
 
847
#define UDCCSR_FST      (1 << 5)        /* Force STALL */
 
848
#define UDCCSR_SST      (1 << 4)        /* Sent STALL */
 
849
#define UDCCSR_DME      (1 << 3)        /* DMA Enable */
 
850
#define UDCCSR_TRN      (1 << 2)        /* Tx/Rx NAK */
 
851
#define UDCCSR_PC       (1 << 1)        /* Packet Complete */
 
852
#define UDCCSR_FS       (1 << 0)        /* FIFO needs service */
 
853
 
 
854
#define UDCBCN(x)       __REG2(0x40600200, (x)<<2)
 
855
#define UDCBCR0         __REG(0x40600200) /* Byte Count Register - EP0 */
 
856
#define UDCBCRA         __REG(0x40600204) /* Byte Count Register - EPA */
 
857
#define UDCBCRB         __REG(0x40600208) /* Byte Count Register - EPB */
 
858
#define UDCBCRC         __REG(0x4060020C) /* Byte Count Register - EPC */
 
859
#define UDCBCRD         __REG(0x40600210) /* Byte Count Register - EPD */
 
860
#define UDCBCRE         __REG(0x40600214) /* Byte Count Register - EPE */
 
861
#define UDCBCRF         __REG(0x40600218) /* Byte Count Register - EPF */
 
862
#define UDCBCRG         __REG(0x4060021C) /* Byte Count Register - EPG */
 
863
#define UDCBCRH         __REG(0x40600220) /* Byte Count Register - EPH */
 
864
#define UDCBCRI         __REG(0x40600224) /* Byte Count Register - EPI */
 
865
#define UDCBCRJ         __REG(0x40600228) /* Byte Count Register - EPJ */
 
866
#define UDCBCRK         __REG(0x4060022C) /* Byte Count Register - EPK */
 
867
#define UDCBCRL         __REG(0x40600230) /* Byte Count Register - EPL */
 
868
#define UDCBCRM         __REG(0x40600234) /* Byte Count Register - EPM */
 
869
#define UDCBCRN         __REG(0x40600238) /* Byte Count Register - EPN */
 
870
#define UDCBCRP         __REG(0x4060023C) /* Byte Count Register - EPP */
 
871
#define UDCBCRQ         __REG(0x40600240) /* Byte Count Register - EPQ */
 
872
#define UDCBCRR         __REG(0x40600244) /* Byte Count Register - EPR */
 
873
#define UDCBCRS         __REG(0x40600248) /* Byte Count Register - EPS */
 
874
#define UDCBCRT         __REG(0x4060024C) /* Byte Count Register - EPT */
 
875
#define UDCBCRU         __REG(0x40600250) /* Byte Count Register - EPU */
 
876
#define UDCBCRV         __REG(0x40600254) /* Byte Count Register - EPV */
 
877
#define UDCBCRW         __REG(0x40600258) /* Byte Count Register - EPW */
 
878
#define UDCBCRX         __REG(0x4060025C) /* Byte Count Register - EPX */
 
879
 
 
880
#define UDCDN(x)        __REG2(0x40600300, (x)<<2)
 
881
#define UDCDR0          __REG(0x40600300) /* Data Register - EP0 */
 
882
#define UDCDRA          __REG(0x40600304) /* Data Register - EPA */
 
883
#define UDCDRB          __REG(0x40600308) /* Data Register - EPB */
 
884
#define UDCDRC          __REG(0x4060030C) /* Data Register - EPC */
 
885
#define UDCDRD          __REG(0x40600310) /* Data Register - EPD */
 
886
#define UDCDRE          __REG(0x40600314) /* Data Register - EPE */
 
887
#define UDCDRF          __REG(0x40600318) /* Data Register - EPF */
 
888
#define UDCDRG          __REG(0x4060031C) /* Data Register - EPG */
 
889
#define UDCDRH          __REG(0x40600320) /* Data Register - EPH */
 
890
#define UDCDRI          __REG(0x40600324) /* Data Register - EPI */
 
891
#define UDCDRJ          __REG(0x40600328) /* Data Register - EPJ */
 
892
#define UDCDRK          __REG(0x4060032C) /* Data Register - EPK */
 
893
#define UDCDRL          __REG(0x40600330) /* Data Register - EPL */
 
894
#define UDCDRM          __REG(0x40600334) /* Data Register - EPM */
 
895
#define UDCDRN          __REG(0x40600338) /* Data Register - EPN */
 
896
#define UDCDRP          __REG(0x4060033C) /* Data Register - EPP */
 
897
#define UDCDRQ          __REG(0x40600340) /* Data Register - EPQ */
 
898
#define UDCDRR          __REG(0x40600344) /* Data Register - EPR */
 
899
#define UDCDRS          __REG(0x40600348) /* Data Register - EPS */
 
900
#define UDCDRT          __REG(0x4060034C) /* Data Register - EPT */
 
901
#define UDCDRU          __REG(0x40600350) /* Data Register - EPU */
 
902
#define UDCDRV          __REG(0x40600354) /* Data Register - EPV */
 
903
#define UDCDRW          __REG(0x40600358) /* Data Register - EPW */
 
904
#define UDCDRX          __REG(0x4060035C) /* Data Register - EPX */
 
905
 
 
906
#define UDCCN(x)        __REG2(0x40600400, (x)<<2)
 
907
#define UDCCRA          __REG(0x40600404) /* Configuration register EPA */
 
908
#define UDCCRB          __REG(0x40600408) /* Configuration register EPB */
 
909
#define UDCCRC          __REG(0x4060040C) /* Configuration register EPC */
 
910
#define UDCCRD          __REG(0x40600410) /* Configuration register EPD */
 
911
#define UDCCRE          __REG(0x40600414) /* Configuration register EPE */
 
912
#define UDCCRF          __REG(0x40600418) /* Configuration register EPF */
 
913
#define UDCCRG          __REG(0x4060041C) /* Configuration register EPG */
 
914
#define UDCCRH          __REG(0x40600420) /* Configuration register EPH */
 
915
#define UDCCRI          __REG(0x40600424) /* Configuration register EPI */
 
916
#define UDCCRJ          __REG(0x40600428) /* Configuration register EPJ */
 
917
#define UDCCRK          __REG(0x4060042C) /* Configuration register EPK */
 
918
#define UDCCRL          __REG(0x40600430) /* Configuration register EPL */
 
919
#define UDCCRM          __REG(0x40600434) /* Configuration register EPM */
 
920
#define UDCCRN          __REG(0x40600438) /* Configuration register EPN */
 
921
#define UDCCRP          __REG(0x4060043C) /* Configuration register EPP */
 
922
#define UDCCRQ          __REG(0x40600440) /* Configuration register EPQ */
 
923
#define UDCCRR          __REG(0x40600444) /* Configuration register EPR */
 
924
#define UDCCRS          __REG(0x40600448) /* Configuration register EPS */
 
925
#define UDCCRT          __REG(0x4060044C) /* Configuration register EPT */
 
926
#define UDCCRU          __REG(0x40600450) /* Configuration register EPU */
 
927
#define UDCCRV          __REG(0x40600454) /* Configuration register EPV */
 
928
#define UDCCRW          __REG(0x40600458) /* Configuration register EPW */
 
929
#define UDCCRX          __REG(0x4060045C) /* Configuration register EPX */
 
930
 
 
931
#define UDCCONR_CN      (0x03 << 25)    /* Configuration Number */
 
932
#define UDCCONR_CN_S    (25)
 
933
#define UDCCONR_IN      (0x07 << 22)    /* Interface Number */
 
934
#define UDCCONR_IN_S    (22)
 
935
#define UDCCONR_AISN    (0x07 << 19)    /* Alternate Interface Number */
 
936
#define UDCCONR_AISN_S  (19)
 
937
#define UDCCONR_EN      (0x0f << 15)    /* Endpoint Number */
 
938
#define UDCCONR_EN_S    (15)
 
939
#define UDCCONR_ET      (0x03 << 13)    /* Endpoint Type: */
 
940
#define UDCCONR_ET_S    (13)
 
941
#define UDCCONR_ET_INT  (0x03 << 13)    /* Interrupt */
 
942
#define UDCCONR_ET_BULK (0x02 << 13)    /* Bulk */
 
943
#define UDCCONR_ET_ISO  (0x01 << 13)    /* Isochronous */
 
944
#define UDCCONR_ET_NU   (0x00 << 13)    /* Not used */
 
945
#define UDCCONR_ED      (1 << 12)       /* Endpoint Direction */
 
946
#define UDCCONR_MPS     (0x3ff << 2)    /* Maximum Packet Size */
 
947
#define UDCCONR_MPS_S   (2)
 
948
#define UDCCONR_DE      (1 << 1)        /* Double Buffering Enable */
 
949
#define UDCCONR_EE      (1 << 0)        /* Endpoint Enable */
 
950
 
 
951
 
 
952
#define UDC_INT_FIFOERROR       (0x2)
 
953
#define UDC_INT_PACKETCMP       (0x1)
 
954
#define UDC_FNR_MASK            (0x7ff)
 
955
#define UDCCSR_WR_MASK          (UDCCSR_DME|UDCCSR_FST)
 
956
#define UDC_BCR_MASK            (0x3ff)
 
957
 
 
958
#endif /* CONFIG_PXA27X */
755
959
 
756
960
#if defined(CONFIG_PXA27X) || defined(CONFIG_CPU_MONAHANS)
757
961
 
758
962
/*
759
 
 * USB Client Controller (incomplete)
760
 
 */
761
 
#define UDCCR           __REG(0x40600000)
762
 
#define UDCICR0         __REG(0x40600004)
763
 
#define UDCCIR0         __REG(0x40600008)
764
 
#define UDCISR0         __REG(0x4060000c)
765
 
#define UDCSIR1         __REG(0x40600010)
766
 
#define UDCFNR          __REG(0x40600014)
767
 
#define UDCOTGICR       __REG(0x40600018)
768
 
#define UDCOTGISR       __REG(0x4060001c)
769
 
#define UP2OCR          __REG(0x40600020)
770
 
#define UP3OCR          __REG(0x40600024)
771
 
 
772
 
/*
773
963
 * USB Host Controller
774
964
 */
775
965
#define OHCI_REGS_BASE  0x4C000000      /* required for ohci driver */
802
992
#define UHCHIE          __REG(0x4C000068)
803
993
#define UHCHIT          __REG(0x4C00006C)
804
994
 
 
995
#if defined(CONFIG_CPU_MONAHANS)
 
996
#define UP2OCR          __REG(0x40600020)
 
997
#endif
 
998
 
805
999
#define UHCHR_FSBIR     (1<<0)
806
1000
#define UHCHR_FHR       (1<<1)
807
1001
#define UHCHR_CGR       (1<<2)
900
1094
#define OMCR10          __REG(0x40A000D8)  /* OS Match Control Register 10 */
901
1095
#define OMCR11          __REG(0x40A000DC)  /* OS Match Control Register 11 */
902
1096
 
903
 
#define OSCR_CLK_FREQ    3.250             /* MHz */
 
1097
#define OSCR_CLK_FREQ    3250              /* kHz = 3.25 MHz */
904
1098
#endif /* CONFIG_CPU_MONAHANS */
905
1099
 
906
1100
#define OSSR_M4         (1 << 4)        /* Match status channel 4 */
1023
1217
#define GCFER3          __REG(0x40E004AC) /* Clr Falling Edge Det. Enable[127:96] */
1024
1218
 
1025
1219
#define GSDR(x)         __REG2(0x40E00400, ((x) & 0x60) >> 3)
1026
 
#define GCDR(x)         __REG2(0x40300420, ((x) & 0x60) >> 3)
 
1220
#define GCDR(x)         __REG2(0x40E00420, ((x) & 0x60) >> 3)
1027
1221
 
1028
1222
/* Multi-funktion Pin Registers, uncomplete, only:
1029
1223
 *    - GPIO
1758
1952
#define CKENA_2_USBHOST (1 << 2)        /* USB Host Unit Clock Enable */
1759
1953
#define CKENA_1_LCD     (1 << 1)        /* LCD Unit Clock Enable */
1760
1954
 
1761
 
#define CKENB_8_1WIRE   ((1 << 8) + 32) /* One Wire Interface Unit Clock Enable */
1762
 
#define CKENB_7_GPIO    ((1 << 7) + 32) /* GPIO Clock Enable */
1763
 
#define CKENB_6_IRQ     ((1 << 6) + 32) /* Interrupt Controller Clock Enable */
1764
 
#define CKENB_4_I2C     ((1 << 4) + 32) /* I2C Unit Clock Enable */
1765
 
#define CKENB_1_PWM1    ((1 << 1) + 32) /* PWM2 & PWM3 Clock Enable */
1766
 
#define CKENB_0_PWM0    ((1 << 0) + 32) /* PWM0 & PWM1 Clock Enable */
 
1955
#define CKENB_9_SYSBUS2 (1 << 9)        /* System bus 2 */
 
1956
#define CKENB_8_1WIRE   (1 << 8)        /* One Wire Interface Unit Clock Enable */
 
1957
#define CKENB_7_GPIO    (1 << 7)        /* GPIO Clock Enable */
 
1958
#define CKENB_6_IRQ     (1 << 6)        /* Interrupt Controller Clock Enable */
 
1959
#define CKENB_4_I2C     (1 << 4)        /* I2C Unit Clock Enable */
 
1960
#define CKENB_1_PWM1    (1 << 1)        /* PWM2 & PWM3 Clock Enable */
 
1961
#define CKENB_0_PWM0    (1 << 0)        /* PWM0 & PWM1 Clock Enable */
1767
1962
 
1768
1963
#else /* if defined CONFIG_CPU_MONAHANS */
1769
1964