@@ -245,6 +245,15 @@ void alchemy_sleep_au1000(void);
245245void alchemy_sleep_au1550 (void );
246246void au_sleep (void );
247247
248+ /* USB: drivers/usb/host/alchemy-common.c */
249+ enum alchemy_usb_block {
250+ ALCHEMY_USB_OHCI0 ,
251+ ALCHEMY_USB_UDC0 ,
252+ ALCHEMY_USB_EHCI0 ,
253+ ALCHEMY_USB_OTG0 ,
254+ };
255+ int alchemy_usb_control (int block , int enable );
256+
248257
249258/* SOC Interrupt numbers */
250259
@@ -687,7 +696,8 @@ enum soc_au1200_ints {
687696 */
688697
689698#define AU1000_AC97_PHYS_ADDR 0x10000000 /* 012 */
690- #define AU1000_USBD_PHYS_ADDR 0x10200000 /* 0123 */
699+ #define AU1000_USB_OHCI_PHYS_ADDR 0x10100000 /* 012 */
700+ #define AU1000_USB_UDC_PHYS_ADDR 0x10200000 /* 0123 */
691701#define AU1000_IC0_PHYS_ADDR 0x10400000 /* 01234 */
692702#define AU1000_MAC0_PHYS_ADDR 0x10500000 /* 023 */
693703#define AU1000_MAC1_PHYS_ADDR 0x10510000 /* 023 */
@@ -710,12 +720,17 @@ enum soc_au1200_ints {
710720#define AU1550_DBDMA_CONF_PHYS_ADDR 0x14003000 /* 34 */
711721#define AU1000_MACDMA0_PHYS_ADDR 0x14004000 /* 0123 */
712722#define AU1000_MACDMA1_PHYS_ADDR 0x14004200 /* 0123 */
723+ #define AU1550_USB_OHCI_PHYS_ADDR 0x14020000 /* 3 */
724+ #define AU1200_USB_CTL_PHYS_ADDR 0x14020000 /* 4 */
725+ #define AU1200_USB_OTG_PHYS_ADDR 0x14020020 /* 4 */
726+ #define AU1200_USB_OHCI_PHYS_ADDR 0x14020100 /* 4 */
727+ #define AU1200_USB_EHCI_PHYS_ADDR 0x14020200 /* 4 */
728+ #define AU1200_USB_UDC_PHYS_ADDR 0x14022000 /* 4 */
713729
714730
715731#ifdef CONFIG_SOC_AU1000
716732#define MEM_PHYS_ADDR 0x14000000
717733#define STATIC_MEM_PHYS_ADDR 0x14001000
718- #define USBH_PHYS_ADDR 0x10100000
719734#define IRDA_PHYS_ADDR 0x10300000
720735#define SSI0_PHYS_ADDR 0x11600000
721736#define SSI1_PHYS_ADDR 0x11680000
@@ -729,7 +744,6 @@ enum soc_au1200_ints {
729744#ifdef CONFIG_SOC_AU1500
730745#define MEM_PHYS_ADDR 0x14000000
731746#define STATIC_MEM_PHYS_ADDR 0x14001000
732- #define USBH_PHYS_ADDR 0x10100000
733747#define PCI_PHYS_ADDR 0x14005000
734748#define PCI_MEM_PHYS_ADDR 0x400000000ULL
735749#define PCI_IO_PHYS_ADDR 0x500000000ULL
@@ -745,7 +759,6 @@ enum soc_au1200_ints {
745759#ifdef CONFIG_SOC_AU1100
746760#define MEM_PHYS_ADDR 0x14000000
747761#define STATIC_MEM_PHYS_ADDR 0x14001000
748- #define USBH_PHYS_ADDR 0x10100000
749762#define IRDA_PHYS_ADDR 0x10300000
750763#define SSI0_PHYS_ADDR 0x11600000
751764#define SSI1_PHYS_ADDR 0x11680000
@@ -760,7 +773,6 @@ enum soc_au1200_ints {
760773#ifdef CONFIG_SOC_AU1550
761774#define MEM_PHYS_ADDR 0x14000000
762775#define STATIC_MEM_PHYS_ADDR 0x14001000
763- #define USBH_PHYS_ADDR 0x14020000
764776#define PCI_PHYS_ADDR 0x14005000
765777#define PE_PHYS_ADDR 0x14008000
766778#define PSC0_PHYS_ADDR 0x11A00000
@@ -783,8 +795,6 @@ enum soc_au1200_ints {
783795#define STATIC_MEM_PHYS_ADDR 0x14001000
784796#define AES_PHYS_ADDR 0x10300000
785797#define CIM_PHYS_ADDR 0x14004000
786- #define USBM_PHYS_ADDR 0x14020000
787- #define USBH_PHYS_ADDR 0x14020100
788798#define PSC0_PHYS_ADDR 0x11A00000
789799#define PSC1_PHYS_ADDR 0x11B00000
790800#define LCD_PHYS_ADDR 0x15000000
@@ -868,21 +878,6 @@ enum soc_au1200_ints {
868878#define USB_EHCI_LEN 0x100
869879#define USB_UDC_BASE 0x14022000
870880#define USB_UDC_LEN 0x2000
871- #define USB_MSR_BASE 0xB4020000
872- #define USB_MSR_MCFG 4
873- #define USBMSRMCFG_OMEMEN 0
874- #define USBMSRMCFG_OBMEN 1
875- #define USBMSRMCFG_EMEMEN 2
876- #define USBMSRMCFG_EBMEN 3
877- #define USBMSRMCFG_DMEMEN 4
878- #define USBMSRMCFG_DBMEN 5
879- #define USBMSRMCFG_GMEMEN 6
880- #define USBMSRMCFG_OHCCLKEN 16
881- #define USBMSRMCFG_EHCCLKEN 17
882- #define USBMSRMCFG_UDCCLKEN 18
883- #define USBMSRMCFG_PHYPLLEN 19
884- #define USBMSRMCFG_RDCOMB 30
885- #define USBMSRMCFG_PFEN 31
886881
887882#define FOR_PLATFORM_C_USB_HOST_INT AU1200_USB_INT
888883
@@ -963,51 +958,6 @@ enum soc_au1200_ints {
963958#define USB_OHCI_LEN 0x00100000
964959#endif
965960
966- #ifndef CONFIG_SOC_AU1200
967-
968- /* USB Device Controller */
969- #define USBD_EP0RD 0xB0200000
970- #define USBD_EP0WR 0xB0200004
971- #define USBD_EP2WR 0xB0200008
972- #define USBD_EP3WR 0xB020000C
973- #define USBD_EP4RD 0xB0200010
974- #define USBD_EP5RD 0xB0200014
975- #define USBD_INTEN 0xB0200018
976- #define USBD_INTSTAT 0xB020001C
977- # define USBDEV_INT_SOF (1 << 12)
978- # define USBDEV_INT_HF_BIT 6
979- # define USBDEV_INT_HF_MASK (0x3f << USBDEV_INT_HF_BIT)
980- # define USBDEV_INT_CMPLT_BIT 0
981- # define USBDEV_INT_CMPLT_MASK (0x3f << USBDEV_INT_CMPLT_BIT)
982- #define USBD_CONFIG 0xB0200020
983- #define USBD_EP0CS 0xB0200024
984- #define USBD_EP2CS 0xB0200028
985- #define USBD_EP3CS 0xB020002C
986- #define USBD_EP4CS 0xB0200030
987- #define USBD_EP5CS 0xB0200034
988- # define USBDEV_CS_SU (1 << 14)
989- # define USBDEV_CS_NAK (1 << 13)
990- # define USBDEV_CS_ACK (1 << 12)
991- # define USBDEV_CS_BUSY (1 << 11)
992- # define USBDEV_CS_TSIZE_BIT 1
993- # define USBDEV_CS_TSIZE_MASK (0x3ff << USBDEV_CS_TSIZE_BIT)
994- # define USBDEV_CS_STALL (1 << 0)
995- #define USBD_EP0RDSTAT 0xB0200040
996- #define USBD_EP0WRSTAT 0xB0200044
997- #define USBD_EP2WRSTAT 0xB0200048
998- #define USBD_EP3WRSTAT 0xB020004C
999- #define USBD_EP4RDSTAT 0xB0200050
1000- #define USBD_EP5RDSTAT 0xB0200054
1001- # define USBDEV_FSTAT_FLUSH (1 << 6)
1002- # define USBDEV_FSTAT_UF (1 << 5)
1003- # define USBDEV_FSTAT_OF (1 << 4)
1004- # define USBDEV_FSTAT_FCNT_BIT 0
1005- # define USBDEV_FSTAT_FCNT_MASK (0x0f << USBDEV_FSTAT_FCNT_BIT)
1006- #define USBD_ENABLE 0xB0200058
1007- # define USBDEV_ENABLE (1 << 1)
1008- # define USBDEV_CE (1 << 0)
1009-
1010- #endif /* !CONFIG_SOC_AU1200 */
1011961
1012962/* Ethernet Controllers */
1013963
0 commit comments