aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-pxa/include/mach/pxa-regs.h45
-rw-r--r--drivers/net/irda/pxaficp_ir.c42
2 files changed, 43 insertions, 44 deletions
diff --git a/arch/arm/mach-pxa/include/mach/pxa-regs.h b/arch/arm/mach-pxa/include/mach/pxa-regs.h
index 0154e5a07cce..9b44eb93abc8 100644
--- a/arch/arm/mach-pxa/include/mach/pxa-regs.h
+++ b/arch/arm/mach-pxa/include/mach/pxa-regs.h
@@ -369,52 +369,9 @@
369 369
370 370
371/* 371/*
372 * Fast Infrared Communication Port 372 * Fast Infrared Communication Port - moved into drivers/net/irda/pxaficp_ir.c
373 */ 373 */
374 374
375#define FICP __REG(0x40800000) /* Start of FICP area */
376#define ICCR0 __REG(0x40800000) /* ICP Control Register 0 */
377#define ICCR1 __REG(0x40800004) /* ICP Control Register 1 */
378#define ICCR2 __REG(0x40800008) /* ICP Control Register 2 */
379#define ICDR __REG(0x4080000c) /* ICP Data Register */
380#define ICSR0 __REG(0x40800014) /* ICP Status Register 0 */
381#define ICSR1 __REG(0x40800018) /* ICP Status Register 1 */
382
383#define ICCR0_AME (1 << 7) /* Address match enable */
384#define ICCR0_TIE (1 << 6) /* Transmit FIFO interrupt enable */
385#define ICCR0_RIE (1 << 5) /* Recieve FIFO interrupt enable */
386#define ICCR0_RXE (1 << 4) /* Receive enable */
387#define ICCR0_TXE (1 << 3) /* Transmit enable */
388#define ICCR0_TUS (1 << 2) /* Transmit FIFO underrun select */
389#define ICCR0_LBM (1 << 1) /* Loopback mode */
390#define ICCR0_ITR (1 << 0) /* IrDA transmission */
391
392#define ICCR2_RXP (1 << 3) /* Receive Pin Polarity select */
393#define ICCR2_TXP (1 << 2) /* Transmit Pin Polarity select */
394#define ICCR2_TRIG (3 << 0) /* Receive FIFO Trigger threshold */
395#define ICCR2_TRIG_8 (0 << 0) /* >= 8 bytes */
396#define ICCR2_TRIG_16 (1 << 0) /* >= 16 bytes */
397#define ICCR2_TRIG_32 (2 << 0) /* >= 32 bytes */
398
399#ifdef CONFIG_PXA27x
400#define ICSR0_EOC (1 << 6) /* DMA End of Descriptor Chain */
401#endif
402#define ICSR0_FRE (1 << 5) /* Framing error */
403#define ICSR0_RFS (1 << 4) /* Receive FIFO service request */
404#define ICSR0_TFS (1 << 3) /* Transnit FIFO service request */
405#define ICSR0_RAB (1 << 2) /* Receiver abort */
406#define ICSR0_TUR (1 << 1) /* Trunsmit FIFO underun */
407#define ICSR0_EIF (1 << 0) /* End/Error in FIFO */
408
409#define ICSR1_ROR (1 << 6) /* Receiver FIFO underrun */
410#define ICSR1_CRE (1 << 5) /* CRC error */
411#define ICSR1_EOF (1 << 4) /* End of frame */
412#define ICSR1_TNF (1 << 3) /* Transmit FIFO not full */
413#define ICSR1_RNE (1 << 2) /* Receive FIFO not empty */
414#define ICSR1_TBY (1 << 1) /* Tramsmiter busy flag */
415#define ICSR1_RSY (1 << 0) /* Recevier synchronized flag */
416
417
418/* 375/*
419 * Real Time Clock 376 * Real Time Clock
420 */ 377 */
diff --git a/drivers/net/irda/pxaficp_ir.c b/drivers/net/irda/pxaficp_ir.c
index c5b02b66f756..06f448a37ca0 100644
--- a/drivers/net/irda/pxaficp_ir.c
+++ b/drivers/net/irda/pxaficp_ir.c
@@ -26,6 +26,48 @@
26#include <mach/irda.h> 26#include <mach/irda.h>
27#include <mach/pxa-regs.h> 27#include <mach/pxa-regs.h>
28 28
29#define FICP __REG(0x40800000) /* Start of FICP area */
30#define ICCR0 __REG(0x40800000) /* ICP Control Register 0 */
31#define ICCR1 __REG(0x40800004) /* ICP Control Register 1 */
32#define ICCR2 __REG(0x40800008) /* ICP Control Register 2 */
33#define ICDR __REG(0x4080000c) /* ICP Data Register */
34#define ICSR0 __REG(0x40800014) /* ICP Status Register 0 */
35#define ICSR1 __REG(0x40800018) /* ICP Status Register 1 */
36
37#define ICCR0_AME (1 << 7) /* Address match enable */
38#define ICCR0_TIE (1 << 6) /* Transmit FIFO interrupt enable */
39#define ICCR0_RIE (1 << 5) /* Recieve FIFO interrupt enable */
40#define ICCR0_RXE (1 << 4) /* Receive enable */
41#define ICCR0_TXE (1 << 3) /* Transmit enable */
42#define ICCR0_TUS (1 << 2) /* Transmit FIFO underrun select */
43#define ICCR0_LBM (1 << 1) /* Loopback mode */
44#define ICCR0_ITR (1 << 0) /* IrDA transmission */
45
46#define ICCR2_RXP (1 << 3) /* Receive Pin Polarity select */
47#define ICCR2_TXP (1 << 2) /* Transmit Pin Polarity select */
48#define ICCR2_TRIG (3 << 0) /* Receive FIFO Trigger threshold */
49#define ICCR2_TRIG_8 (0 << 0) /* >= 8 bytes */
50#define ICCR2_TRIG_16 (1 << 0) /* >= 16 bytes */
51#define ICCR2_TRIG_32 (2 << 0) /* >= 32 bytes */
52
53#ifdef CONFIG_PXA27x
54#define ICSR0_EOC (1 << 6) /* DMA End of Descriptor Chain */
55#endif
56#define ICSR0_FRE (1 << 5) /* Framing error */
57#define ICSR0_RFS (1 << 4) /* Receive FIFO service request */
58#define ICSR0_TFS (1 << 3) /* Transnit FIFO service request */
59#define ICSR0_RAB (1 << 2) /* Receiver abort */
60#define ICSR0_TUR (1 << 1) /* Trunsmit FIFO underun */
61#define ICSR0_EIF (1 << 0) /* End/Error in FIFO */
62
63#define ICSR1_ROR (1 << 6) /* Receiver FIFO underrun */
64#define ICSR1_CRE (1 << 5) /* CRC error */
65#define ICSR1_EOF (1 << 4) /* End of frame */
66#define ICSR1_TNF (1 << 3) /* Transmit FIFO not full */
67#define ICSR1_RNE (1 << 2) /* Receive FIFO not empty */
68#define ICSR1_TBY (1 << 1) /* Tramsmiter busy flag */
69#define ICSR1_RSY (1 << 0) /* Recevier synchronized flag */
70
29#define IrSR_RXPL_NEG_IS_ZERO (1<<4) 71#define IrSR_RXPL_NEG_IS_ZERO (1<<4)
30#define IrSR_RXPL_POS_IS_ZERO 0x0 72#define IrSR_RXPL_POS_IS_ZERO 0x0
31#define IrSR_TXPL_NEG_IS_ZERO (1<<3) 73#define IrSR_TXPL_NEG_IS_ZERO (1<<3)