upgrade to fedora-2.6.12-1.1398.FC4 + vserver 2.0.rc7
[linux-2.6.git] / include / asm-arm / arch-pxa / pxa-regs.h
index c43cafe..b5e54a9 100644 (file)
 #define DCMD_WIDTH4    (3 << 14)       /* 4 byte width (Word) */
 #define DCMD_LENGTH    0x01fff         /* length mask (max = 8K - 1) */
 
-/* default combinations */
-#define DCMD_RXPCDR    (DCMD_INCTRGADDR|DCMD_FLOWSRC|DCMD_BURST32|DCMD_WIDTH4)
-#define DCMD_RXMCDR    (DCMD_INCTRGADDR|DCMD_FLOWSRC|DCMD_BURST32|DCMD_WIDTH4)
-#define DCMD_TXPCDR    (DCMD_INCSRCADDR|DCMD_FLOWTRG|DCMD_BURST32|DCMD_WIDTH4)
-
 
 /*
  * UARTs
  */
 
 /* FIXME: This clash with SA1111 defines */
-#ifndef CONFIG_SA1111
+#ifndef _ASM_ARCH_SA1111
+
 #define SACR0          __REG(0x40400000)  /* Global Control Register */
 #define SACR1          __REG(0x40400004)  /* Serial Audio I 2 S/MSB-Justified Control Register */
 #define SASR0          __REG(0x4040000C)  /* Serial Audio I 2 S/MSB-Justified Interface and FIFO Status Register */
 #define SAICR          __REG(0x40400018)  /* Serial Audio Interrupt Clear Register */
 #define SADIV          __REG(0x40400060)  /* Audio Clock Divider Register. */
 #define SADR           __REG(0x40400080)  /* Serial Audio Data Register (TX and RX FIFO access Register). */
-#endif
 
-#define SACR0_RFTH(x)  (x << 12)               /* Rx FIFO Interrupt or DMA Trigger Threshold */
-#define SACR0_TFTH(x)  (x << 8)                /* Tx FIFO Interrupt or DMA Trigger Threshold */
-#define SACR0_STRF             (1 << 5)                /* FIFO Select for EFWR Special Function */
-#define SACR0_EFWR             (1 << 4)                /* Enable EFWR Function  */
-#define SACR0_RST              (1 << 3)                /* FIFO, i2s Register Reset */
-#define SACR0_BCKD             (1 << 2)                /* Bit Clock Direction */
-#define SACR0_ENB              (1 << 0)                /* Enable I2S Link */
-
-#define SACR1_ENLBF            (1 << 5)                /* Enable Loopback */
-#define SACR1_DRPL             (1 << 4)                /* Disable Replaying Function */
-#define SACR1_DREC             (1 << 3)                /* Disable Recording Function */
-#define SACR1_AMSL             (1 << 1)                /* Specify Alternate Mode */
-
-#define SASR0_I2SOFF   (1 << 7)                /* Controller Status */
-#define SASR0_ROR              (1 << 6)                /* Rx FIFO Overrun */
-#define SASR0_TUR              (1 << 5)                /* Tx FIFO Underrun */
-#define SASR0_RFS              (1 << 4)                /* Rx FIFO Service Request */
-#define SASR0_TFS              (1 << 3)                /* Tx FIFO Service Request */
-#define SASR0_BSY              (1 << 2)                /* I2S Busy */
-#define SASR0_RNE              (1 << 1)                /* Rx FIFO Not Empty */
-#define SASR0_TNF              (1 << 0)                /* Tx FIFO Not Empty */
-
-#define SADIV_3_058M   0x0c                    /* Serial Clock Divider 3.058MHz */
-#define SADIV_2_836M   0x0d                    /* 2.836 MHz */
-#define SADIV_1_405M   0x1a                    /* 1.405 MHz */
-#define SADIV_1_026M   0x24                    /* 1.026 MHz */
-#define SADIV_702K             0x34                    /* 702 kHz */
-#define SADIV_513K             0x48                    /* 513 kHz */
-
-#define SAICR_ROR              (1 << 6)                /* Clear Rx FIFO Overrun Interrupt */
-#define SAICR_TUR              (1 << 5)                /* Clear Tx FIFO Underrun Interrupt */
-
-#define SAIMR_ROR              (1 << 6)                /* Enable Rx FIFO Overrun Condition Interrupt */
-#define SAIMR_TUR              (1 << 5)                /* Enable Tx FIFO Underrun Condition Interrupt */
-#define SAIMR_RFS              (1 << 4)                /* Enable Rx FIFO Service Interrupt */
-#define SAIMR_TFS              (1 << 3)                /* Enable Tx FIFO Service Interrupt */
+#define SACR0_RFTH(x)  (x << 12)       /* Rx FIFO Interrupt or DMA Trigger Threshold */
+#define SACR0_TFTH(x)  (x << 8)        /* Tx FIFO Interrupt or DMA Trigger Threshold */
+#define SACR0_STRF     (1 << 5)        /* FIFO Select for EFWR Special Function */
+#define SACR0_EFWR     (1 << 4)        /* Enable EFWR Function  */
+#define SACR0_RST      (1 << 3)        /* FIFO, i2s Register Reset */
+#define SACR0_BCKD     (1 << 2)        /* Bit Clock Direction */
+#define SACR0_ENB      (1 << 0)        /* Enable I2S Link */
+#define SACR1_ENLBF    (1 << 5)        /* Enable Loopback */
+#define SACR1_DRPL     (1 << 4)        /* Disable Replaying Function */
+#define SACR1_DREC     (1 << 3)        /* Disable Recording Function */
+#define SACR1_AMSL     (1 << 1)        /* Specify Alternate Mode */
+
+#define SASR0_I2SOFF   (1 << 7)        /* Controller Status */
+#define SASR0_ROR      (1 << 6)        /* Rx FIFO Overrun */
+#define SASR0_TUR      (1 << 5)        /* Tx FIFO Underrun */
+#define SASR0_RFS      (1 << 4)        /* Rx FIFO Service Request */
+#define SASR0_TFS      (1 << 3)        /* Tx FIFO Service Request */
+#define SASR0_BSY      (1 << 2)        /* I2S Busy */
+#define SASR0_RNE      (1 << 1)        /* Rx FIFO Not Empty */
+#define SASR0_TNF      (1 << 0)        /* Tx FIFO Not Empty */
+
+#define SAICR_ROR      (1 << 6)        /* Clear Rx FIFO Overrun Interrupt */
+#define SAICR_TUR      (1 << 5)        /* Clear Tx FIFO Underrun Interrupt */
+
+#define SAIMR_ROR      (1 << 6)        /* Enable Rx FIFO Overrun Condition Interrupt */
+#define SAIMR_TUR      (1 << 5)        /* Enable Tx FIFO Underrun Condition Interrupt */
+#define SAIMR_RFS      (1 << 4)        /* Enable Rx FIFO Service Interrupt */
+#define SAIMR_TFS      (1 << 3)        /* Enable Tx FIFO Service Interrupt */
 
+#endif
 
 /*
  * AC97 Controller registers
 
 #define POCR           __REG(0x40500000)  /* PCM Out Control Register */
 #define POCR_FEIE      (1 << 3)        /* FIFO Error Interrupt Enable */
+#define POCR_FSRIE     (1 << 1)        /* FIFO Service Request Interrupt Enable */
 
 #define PICR           __REG(0x40500004)  /* PCM In Control Register */
 #define PICR_FEIE      (1 << 3)        /* FIFO Error Interrupt Enable */
+#define PICR_FSRIE     (1 << 1)        /* FIFO Service Request Interrupt Enable */
 
 #define MCCR           __REG(0x40500008)  /* Mic In Control Register */
 #define MCCR_FEIE      (1 << 3)        /* FIFO Error Interrupt Enable */
+#define MCCR_FSRIE     (1 << 1)        /* FIFO Service Request Interrupt Enable */
 
 #define GCR            __REG(0x4050000C)  /* Global Control Register */
+#define GCR_nDMAEN     (1 << 24)       /* non DMA Enable */
 #define GCR_CDONE_IE   (1 << 19)       /* Command Done Interrupt Enable */
 #define GCR_SDONE_IE   (1 << 18)       /* Status Done Interrupt Enable */
 #define GCR_SECRDY_IEN (1 << 9)        /* Secondary Ready Interrupt Enable */
 
 #define POSR           __REG(0x40500010)  /* PCM Out Status Register */
 #define POSR_FIFOE     (1 << 4)        /* FIFO error */
+#define POSR_FSR       (1 << 2)        /* FIFO Service Request */
 
 #define PISR           __REG(0x40500014)  /* PCM In Status Register */
 #define PISR_FIFOE     (1 << 4)        /* FIFO error */
+#define PISR_EOC       (1 << 3)        /* DMA End-of-Chain (exclusive clear) */
+#define PISR_FSR       (1 << 2)        /* FIFO Service Request */
 
 #define MCSR           __REG(0x40500018)  /* Mic In Status Register */
 #define MCSR_FIFOE     (1 << 4)        /* FIFO error */
+#define MCSR_EOC       (1 << 3)        /* DMA End-of-Chain (exclusive clear) */
+#define MCSR_FSR       (1 << 2)        /* FIFO Service Request */
 
 #define GSR            __REG(0x4050001C)  /* Global Status Register */
 #define GSR_CDONE      (1 << 19)       /* Command Done */
 #define GSR_PRIRES     (1 << 10)       /* Primary Resume Interrupt */
 #define GSR_SCR                (1 << 9)        /* Secondary Codec Ready */
 #define GSR_PCR                (1 << 8)        /*  Primary Codec Ready */
-#define GSR_MINT       (1 << 7)        /* Mic In Interrupt */
+#define GSR_MCINT      (1 << 7)        /* Mic In Interrupt */
 #define GSR_POINT      (1 << 6)        /* PCM Out Interrupt */
 #define GSR_PIINT      (1 << 5)        /* PCM In Interrupt */
+#define GSR_ACOFFD     (1 << 3)        /* AC-link Shut Off Done */
 #define GSR_MOINT      (1 << 2)        /* Modem Out Interrupt */
 #define GSR_MIINT      (1 << 1)        /* Modem In Interrupt */
 #define GSR_GSCI       (1 << 0)        /* Codec GPI Status Change Interrupt */
 
 #define MOCR           __REG(0x40500100)  /* Modem Out Control Register */
 #define MOCR_FEIE      (1 << 3)        /* FIFO Error */
+#define MOCR_FSRIE     (1 << 1)        /* FIFO Service Request Interrupt Enable */
 
 #define MICR           __REG(0x40500108)  /* Modem In Control Register */
 #define MICR_FEIE      (1 << 3)        /* FIFO Error */
+#define MICR_FSRIE     (1 << 1)        /* FIFO Service Request Interrupt Enable */
 
 #define MOSR           __REG(0x40500110)  /* Modem Out Status Register */
 #define MOSR_FIFOE     (1 << 4)        /* FIFO error */
+#define MOSR_FSR       (1 << 2)        /* FIFO Service Request */
 
 #define MISR           __REG(0x40500118)  /* Modem In Status Register */
 #define MISR_FIFOE     (1 << 4)        /* FIFO error */
+#define MISR_EOC       (1 << 3)        /* DMA End-of-Chain (exclusive clear) */
+#define MISR_FSR       (1 << 2)        /* FIFO Service Request */
 
 #define MODR           __REG(0x40500140)  /* Modem FIFO Data Register */
 
 #define GPIO30_SDATA_OUT       30      /* AC97/I2S Sdata_out */
 #define GPIO31_SYNC            31      /* AC97/I2S sync */
 #define GPIO32_SDATA_IN1       32      /* AC97 Sdata_in1 */
+#define GPIO32_SYSCLK          32      /* I2S System Clock */
 #define GPIO32_MMCCLK          32      /* MMC Clock (PXA270) */
 #define GPIO33_nCS_5           33      /* chip select 5 */
 #define GPIO34_FFRXD           34      /* FFUART receive */
 #define GPIO111_MMCDAT3                111     /* MMC DAT3 (PXA27x) */
 #define GPIO111_MMCCS1         111     /* MMC Chip Select 1 (PXA27x) */
 #define GPIO112_MMCCMD         112     /* MMC CMD (PXA27x) */
+#define GPIO113_I2S_SYSCLK     113     /* I2S System Clock (PXA27x) */
 #define GPIO113_AC97_RESET_N   113     /* AC97 NRESET on (PXA27x) */
 
 /* GPIO alternate function mode & direction */
 #define GPIO18_RDY_MD          (18 | GPIO_ALT_FN_1_IN)
 #define GPIO19_DREQ1_MD                (19 | GPIO_ALT_FN_1_IN)
 #define GPIO20_DREQ0_MD                (20 | GPIO_ALT_FN_1_IN)
-#define GPIO23_SCLK_md         (23 | GPIO_ALT_FN_2_OUT)
+#define GPIO23_SCLK_MD         (23 | GPIO_ALT_FN_2_OUT)
 #define GPIO24_SFRM_MD         (24 | GPIO_ALT_FN_2_OUT)
 #define GPIO25_STXD_MD         (25 | GPIO_ALT_FN_2_OUT)
 #define GPIO26_SRXD_MD         (26 | GPIO_ALT_FN_1_IN)
 #define GPIO27_SEXTCLK_MD      (27 | GPIO_ALT_FN_1_IN)
 #define GPIO28_BITCLK_AC97_MD  (28 | GPIO_ALT_FN_1_IN)
-#define GPIO28_BITCLK_I2S_MD   (28 | GPIO_ALT_FN_2_IN)
+#define GPIO28_BITCLK_IN_I2S_MD        (28 | GPIO_ALT_FN_2_IN)
+#define GPIO28_BITCLK_OUT_I2S_MD       (28 | GPIO_ALT_FN_1_OUT)
 #define GPIO29_SDATA_IN_AC97_MD        (29 | GPIO_ALT_FN_1_IN)
 #define GPIO29_SDATA_IN_I2S_MD (29 | GPIO_ALT_FN_2_IN)
 #define GPIO30_SDATA_OUT_AC97_MD       (30 | GPIO_ALT_FN_2_OUT)
 #define GPIO30_SDATA_OUT_I2S_MD        (30 | GPIO_ALT_FN_1_OUT)
-#define GPIO31_SYNC_AC97_MD    (31 | GPIO_ALT_FN_2_OUT)
 #define GPIO31_SYNC_I2S_MD     (31 | GPIO_ALT_FN_1_OUT)
+#define GPIO31_SYNC_AC97_MD    (31 | GPIO_ALT_FN_2_OUT)
 #define GPIO32_SDATA_IN1_AC97_MD       (32 | GPIO_ALT_FN_1_IN)
+#define GPIO32_SYSCLK_I2S_MD   (32 | GPIO_ALT_FN_1_OUT)
 #define GPIO32_MMCCLK_MD               ( 32 | GPIO_ALT_FN_2_OUT)
 #define GPIO33_nCS_5_MD                (33 | GPIO_ALT_FN_2_OUT)
 #define GPIO34_FFRXD_MD                (34 | GPIO_ALT_FN_1_IN)
 #define GPIO111_MMCDAT3_MD     (111 | GPIO_ALT_FN_1_OUT)
 #define GPIO110_MMCCS1_MD      (111 | GPIO_ALT_FN_1_OUT)
 #define GPIO112_MMCCMD_MD      (112 | GPIO_ALT_FN_1_OUT)
+#define GPIO113_I2S_SYSCLK_MD  (113 | GPIO_ALT_FN_1_OUT)
 #define GPIO113_AC97_RESET_N_MD        (113 | GPIO_ALT_FN_2_OUT)
 #define GPIO117_I2CSCL_MD      (117 | GPIO_ALT_FN_1_OUT)
 #define GPIO118_I2CSDA_MD      (118 | GPIO_ALT_FN_1_IN)
 #define SSCR0_EDSS             (1 << 20)       /* Extended Data Size Select */
 
 /* extra bits in PXA255, PXA26x and PXA27x SSP ports */
+#define SSCR0_PSP              (3 << 4)        /* PSP - Programmable Serial Protocol */
 #define SSCR1_TTELP            (1 << 31)       /* TXD Tristate Enable Last Phase */
 #define SSCR1_TTE              (1 << 30)       /* TXD Tristate Enable */
 #define SSCR1_EBCEI            (1 << 29)       /* Enable Bit Count Error interrupt */