|
@@ -454,3 +454,199 @@
|
|
|
#endif /* LANGUAGE == C */
|
|
|
|
|
|
/*
|
|
|
+ * USB Host Interface Controller
|
|
|
+ *
|
|
|
+ * Registers
|
|
|
+ * Revision
|
|
|
+ * Control
|
|
|
+ * CommandStatus
|
|
|
+ * InterruptStatus
|
|
|
+ * InterruptEnable
|
|
|
+ * HCCA
|
|
|
+ * PeriodCurrentED
|
|
|
+ * ControlHeadED
|
|
|
+ * BulkHeadED
|
|
|
+ * BulkCurrentED
|
|
|
+ * DoneHead
|
|
|
+ * FmInterval
|
|
|
+ * FmRemaining
|
|
|
+ * FmNumber
|
|
|
+ * PeriodicStart
|
|
|
+ * LSThreshold
|
|
|
+ * RhDescriptorA
|
|
|
+ * RhDescriptorB
|
|
|
+ * RhStatus
|
|
|
+ * RhPortStatus
|
|
|
+ * USBStatus
|
|
|
+ * USBReset
|
|
|
+ * USTAR
|
|
|
+ * USWER
|
|
|
+ * USRFR
|
|
|
+ * USNFR
|
|
|
+ * USTCSR
|
|
|
+ * USSR
|
|
|
+ *
|
|
|
+ */
|
|
|
+
|
|
|
+#define _USB( x ) _SA1101( ( x ) + __USB_CONTROL )
|
|
|
+
|
|
|
+
|
|
|
+#define _Revision _USB( 0x0000 )
|
|
|
+#define _Control _USB( 0x0888 )
|
|
|
+#define _CommandStatus _USB( 0x0c00 )
|
|
|
+#define _InterruptStatus _USB( 0x1000 )
|
|
|
+#define _InterruptEnable _USB( 0x1400 )
|
|
|
+#define _HCCA _USB( 0x1800 )
|
|
|
+#define _PeriodCurrentED _USB( 0x1c00 )
|
|
|
+#define _ControlHeadED _USB( 0x2000 )
|
|
|
+#define _BulkHeadED _USB( 0x2800 )
|
|
|
+#define _BulkCurrentED _USB( 0x2c00 )
|
|
|
+#define _DoneHead _USB( 0x3000 )
|
|
|
+#define _FmInterval _USB( 0x3400 )
|
|
|
+#define _FmRemaining _USB( 0x3800 )
|
|
|
+#define _FmNumber _USB( 0x3c00 )
|
|
|
+#define _PeriodicStart _USB( 0x4000 )
|
|
|
+#define _LSThreshold _USB( 0x4400 )
|
|
|
+#define _RhDescriptorA _USB( 0x4800 )
|
|
|
+#define _RhDescriptorB _USB( 0x4c00 )
|
|
|
+#define _RhStatus _USB( 0x5000 )
|
|
|
+#define _RhPortStatus _USB( 0x5400 )
|
|
|
+#define _USBStatus _USB( 0x11800 )
|
|
|
+#define _USBReset _USB( 0x11c00 )
|
|
|
+
|
|
|
+#define _USTAR _USB( 0x10400 )
|
|
|
+#define _USWER _USB( 0x10800 )
|
|
|
+#define _USRFR _USB( 0x10c00 )
|
|
|
+#define _USNFR _USB( 0x11000 )
|
|
|
+#define _USTCSR _USB( 0x11400 )
|
|
|
+#define _USSR _USB( 0x11800 )
|
|
|
+
|
|
|
+
|
|
|
+#if (LANGUAGE == C)
|
|
|
+
|
|
|
+#define Revision (*((volatile Word *) SA1101_p2v (_Revision)))
|
|
|
+#define Control (*((volatile Word *) SA1101_p2v (_Control)))
|
|
|
+#define CommandStatus (*((volatile Word *) SA1101_p2v (_CommandStatus)))
|
|
|
+#define InterruptStatus (*((volatile Word *) SA1101_p2v (_InterruptStatus)))
|
|
|
+#define InterruptEnable (*((volatile Word *) SA1101_p2v (_InterruptEnable)))
|
|
|
+#define HCCA (*((volatile Word *) SA1101_p2v (_HCCA)))
|
|
|
+#define PeriodCurrentED (*((volatile Word *) SA1101_p2v (_PeriodCurrentED)))
|
|
|
+#define ControlHeadED (*((volatile Word *) SA1101_p2v (_ControlHeadED)))
|
|
|
+#define BulkHeadED (*((volatile Word *) SA1101_p2v (_BulkHeadED)))
|
|
|
+#define BulkCurrentED (*((volatile Word *) SA1101_p2v (_BulkCurrentED)))
|
|
|
+#define DoneHead (*((volatile Word *) SA1101_p2v (_DoneHead)))
|
|
|
+#define FmInterval (*((volatile Word *) SA1101_p2v (_FmInterval)))
|
|
|
+#define FmRemaining (*((volatile Word *) SA1101_p2v (_FmRemaining)))
|
|
|
+#define FmNumber (*((volatile Word *) SA1101_p2v (_FmNumber)))
|
|
|
+#define PeriodicStart (*((volatile Word *) SA1101_p2v (_PeriodicStart)))
|
|
|
+#define LSThreshold (*((volatile Word *) SA1101_p2v (_LSThreshold)))
|
|
|
+#define RhDescriptorA (*((volatile Word *) SA1101_p2v (_RhDescriptorA)))
|
|
|
+#define RhDescriptorB (*((volatile Word *) SA1101_p2v (_RhDescriptorB)))
|
|
|
+#define RhStatus (*((volatile Word *) SA1101_p2v (_RhStatus)))
|
|
|
+#define RhPortStatus (*((volatile Word *) SA1101_p2v (_RhPortStatus)))
|
|
|
+#define USBStatus (*((volatile Word *) SA1101_p2v (_USBStatus)))
|
|
|
+#define USBReset (*((volatile Word *) SA1101_p2v (_USBReset)))
|
|
|
+#define USTAR (*((volatile Word *) SA1101_p2v (_USTAR)))
|
|
|
+#define USWER (*((volatile Word *) SA1101_p2v (_USWER)))
|
|
|
+#define USRFR (*((volatile Word *) SA1101_p2v (_USRFR)))
|
|
|
+#define USNFR (*((volatile Word *) SA1101_p2v (_USNFR)))
|
|
|
+#define USTCSR (*((volatile Word *) SA1101_p2v (_USTCSR)))
|
|
|
+#define USSR (*((volatile Word *) SA1101_p2v (_USSR)))
|
|
|
+
|
|
|
+
|
|
|
+#define USBStatus_IrqHciRmtWkp (1<<7)
|
|
|
+#define USBStatus_IrqHciBuffAcc (1<<8)
|
|
|
+#define USBStatus_nIrqHciM (1<<9)
|
|
|
+#define USBStatus_nHciMFClr (1<<10)
|
|
|
+
|
|
|
+#define USBReset_ForceIfReset 0x01
|
|
|
+#define USBReset_ForceHcReset 0x02
|
|
|
+#define USBReset_ClkGenReset 0x04
|
|
|
+
|
|
|
+#define USTCR_RdBstCntrl Fld(3,0)
|
|
|
+#define USTCR_ByteEnable Fld(4,3)
|
|
|
+#define USTCR_WriteEn (1<<7)
|
|
|
+#define USTCR_FifoCir (1<<8)
|
|
|
+#define USTCR_TestXferSel (1<<9)
|
|
|
+#define USTCR_FifoCirAtEnd (1<<10)
|
|
|
+#define USTCR_nSimScaleDownClk (1<<11)
|
|
|
+
|
|
|
+#define USSR_nAppMDEmpty 0x01
|
|
|
+#define USSR_nAppMDFirst 0x02
|
|
|
+#define USSR_nAppMDLast 0x04
|
|
|
+#define USSR_nAppMDFull 0x08
|
|
|
+#define USSR_nAppMAFull 0x10
|
|
|
+#define USSR_XferReq 0x20
|
|
|
+#define USSR_XferEnd 0x40
|
|
|
+
|
|
|
+#endif /* LANGUAGE == C */
|
|
|
+
|
|
|
+
|
|
|
+/*
|
|
|
+ * Interrupt Controller
|
|
|
+ *
|
|
|
+ * Registers
|
|
|
+ * INTTEST0 Test register 0
|
|
|
+ * INTTEST1 Test register 1
|
|
|
+ * INTENABLE0 Interrupt Enable register 0
|
|
|
+ * INTENABLE1 Interrupt Enable register 1
|
|
|
+ * INTPOL0 Interrupt Polarity selection 0
|
|
|
+ * INTPOL1 Interrupt Polarity selection 1
|
|
|
+ * INTTSTSEL Interrupt source selection
|
|
|
+ * INTSTATCLR0 Interrupt Status 0
|
|
|
+ * INTSTATCLR1 Interrupt Status 1
|
|
|
+ * INTSET0 Interrupt Set 0
|
|
|
+ * INTSET1 Interrupt Set 1
|
|
|
+ */
|
|
|
+
|
|
|
+#define _INT( x ) _SA1101( ( x ) + __INTERRUPT_CONTROL)
|
|
|
+
|
|
|
+#define _INTTEST0 _INT( 0x1000 )
|
|
|
+#define _INTTEST1 _INT( 0x1400 )
|
|
|
+#define _INTENABLE0 _INT( 0x2000 )
|
|
|
+#define _INTENABLE1 _INT( 0x2400 )
|
|
|
+#define _INTPOL0 _INT( 0x3000 )
|
|
|
+#define _INTPOL1 _INT( 0x3400 )
|
|
|
+#define _INTTSTSEL _INT( 0x5000 )
|
|
|
+#define _INTSTATCLR0 _INT( 0x6000 )
|
|
|
+#define _INTSTATCLR1 _INT( 0x6400 )
|
|
|
+#define _INTSET0 _INT( 0x7000 )
|
|
|
+#define _INTSET1 _INT( 0x7400 )
|
|
|
+
|
|
|
+#if ( LANGUAGE == C )
|
|
|
+#define INTTEST0 (*((volatile Word *) SA1101_p2v (_INTTEST0)))
|
|
|
+#define INTTEST1 (*((volatile Word *) SA1101_p2v (_INTTEST1)))
|
|
|
+#define INTENABLE0 (*((volatile Word *) SA1101_p2v (_INTENABLE0)))
|
|
|
+#define INTENABLE1 (*((volatile Word *) SA1101_p2v (_INTENABLE1)))
|
|
|
+#define INTPOL0 (*((volatile Word *) SA1101_p2v (_INTPOL0)))
|
|
|
+#define INTPOL1 (*((volatile Word *) SA1101_p2v (_INTPOL1)))
|
|
|
+#define INTTSTSEL (*((volatile Word *) SA1101_p2v (_INTTSTSEL)))
|
|
|
+#define INTSTATCLR0 (*((volatile Word *) SA1101_p2v (_INTSTATCLR0)))
|
|
|
+#define INTSTATCLR1 (*((volatile Word *) SA1101_p2v (_INTSTATCLR1)))
|
|
|
+#define INTSET0 (*((volatile Word *) SA1101_p2v (_INTSET0)))
|
|
|
+#define INTSET1 (*((volatile Word *) SA1101_p2v (_INTSET1)))
|
|
|
+
|
|
|
+#endif /* LANGUAGE == C */
|
|
|
+
|
|
|
+/*
|
|
|
+ * PS/2 Trackpad and Mouse Interfaces
|
|
|
+ *
|
|
|
+ * Registers (prefix kbd applies to trackpad interface, mse to mouse)
|
|
|
+ * KBDCR Control Register
|
|
|
+ * KBDSTAT Status Register
|
|
|
+ * KBDDATA Transmit/Receive Data register
|
|
|
+ * KBDCLKDIV Clock Division Register
|
|
|
+ * KBDPRECNT Clock Precount Register
|
|
|
+ * KBDTEST1 Test register 1
|
|
|
+ * KBDTEST2 Test register 2
|
|
|
+ * KBDTEST3 Test register 3
|
|
|
+ * KBDTEST4 Test register 4
|
|
|
+ * MSECR
|
|
|
+ * MSESTAT
|
|
|
+ * MSEDATA
|
|
|
+ * MSECLKDIV
|
|
|
+ * MSEPRECNT
|
|
|
+ * MSETEST1
|
|
|
+ * MSETEST2
|
|
|
+ * MSETEST3
|
|
|
+ * MSETEST4
|