diff options
author | Jürgen Schindele <linux@schindele.name> | 2008-08-18 16:45:03 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-10-01 17:33:11 -0400 |
commit | 642aa6637e46ae788f1f8916dc9aa5a68917e12e (patch) | |
tree | 9bdcf5ecf1d2086bbb47cb4223b79b043d7188d8 /arch/arm/mach-pxa/include/mach/trizeps4.h | |
parent | b8e6c91c74e9f0279b7c51048779b3d62da60b88 (diff) |
[ARM] 5204/1: Trizeps4 SOM update
- use MFP-API for GPIO
- support TRIZEPS4WL module
- cleanups
Signed-off-by: Jrgen Schindele <linux@schindele.name>
Acked-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-pxa/include/mach/trizeps4.h')
-rw-r--r-- | arch/arm/mach-pxa/include/mach/trizeps4.h | 84 |
1 files changed, 70 insertions, 14 deletions
diff --git a/arch/arm/mach-pxa/include/mach/trizeps4.h b/arch/arm/mach-pxa/include/mach/trizeps4.h index 641d0ec110b..903e1a2e664 100644 --- a/arch/arm/mach-pxa/include/mach/trizeps4.h +++ b/arch/arm/mach-pxa/include/mach/trizeps4.h | |||
@@ -17,11 +17,16 @@ | |||
17 | #define TRIZEPS4_PIC_PHYS (PXA_CS3_PHYS) /* Logic chip on ConXS-Board */ | 17 | #define TRIZEPS4_PIC_PHYS (PXA_CS3_PHYS) /* Logic chip on ConXS-Board */ |
18 | #define TRIZEPS4_SDRAM_BASE 0xa0000000 /* SDRAM region */ | 18 | #define TRIZEPS4_SDRAM_BASE 0xa0000000 /* SDRAM region */ |
19 | 19 | ||
20 | #define TRIZEPS4_CFSR_PHYS (PXA_CS3_PHYS) /* Logic chip on ConXS-Board CSFR register */ | 20 | /* Logic on ConXS-board CSFR register*/ |
21 | #define TRIZEPS4_BOCR_PHYS (PXA_CS3_PHYS+0x02000000) /* Logic chip on ConXS-Board BOCR register */ | 21 | #define TRIZEPS4_CFSR_PHYS (PXA_CS3_PHYS) |
22 | #define TRIZEPS4_IRCR_PHYS (PXA_CS3_PHYS+0x02400000) /* Logic chip on ConXS-Board IRCR register*/ | 22 | /* Logic on ConXS-board BOCR register*/ |
23 | #define TRIZEPS4_UPSR_PHYS (PXA_CS3_PHYS+0x02800000) /* Logic chip on ConXS-Board UPSR register*/ | 23 | #define TRIZEPS4_BOCR_PHYS (PXA_CS3_PHYS+0x02000000) |
24 | #define TRIZEPS4_DICR_PHYS (PXA_CS3_PHYS+0x03800000) /* Logic chip on ConXS-Board DICR register*/ | 24 | /* Logic on ConXS-board IRCR register*/ |
25 | #define TRIZEPS4_IRCR_PHYS (PXA_CS3_PHYS+0x02400000) | ||
26 | /* Logic on ConXS-board UPSR register*/ | ||
27 | #define TRIZEPS4_UPSR_PHYS (PXA_CS3_PHYS+0x02800000) | ||
28 | /* Logic on ConXS-board DICR register*/ | ||
29 | #define TRIZEPS4_DICR_PHYS (PXA_CS3_PHYS+0x03800000) | ||
25 | 30 | ||
26 | /* virtual memory regions */ | 31 | /* virtual memory regions */ |
27 | #define TRIZEPS4_DISK_VIRT 0xF0000000 /* Disk On Chip region */ | 32 | #define TRIZEPS4_DISK_VIRT 0xF0000000 /* Disk On Chip region */ |
@@ -54,6 +59,15 @@ | |||
54 | #define GPIO_MMC_DET 12 | 59 | #define GPIO_MMC_DET 12 |
55 | #define TRIZEPS4_MMC_IRQ IRQ_GPIO(GPIO_MMC_DET) | 60 | #define TRIZEPS4_MMC_IRQ IRQ_GPIO(GPIO_MMC_DET) |
56 | 61 | ||
62 | /* DOC NAND chip */ | ||
63 | #define GPIO_DOC_LOCK 94 | ||
64 | #define GPIO_DOC_IRQ 93 | ||
65 | #define TRIZEPS4_DOC_IRQ IRQ_GPIO(GPIO_DOC_IRQ) | ||
66 | |||
67 | /* SPI interface */ | ||
68 | #define GPIO_SPI 53 | ||
69 | #define TRIZEPS4_SPI_IRQ IRQ_GPIO(GPIO_SPI) | ||
70 | |||
57 | /* LEDS using tx2 / rx2 */ | 71 | /* LEDS using tx2 / rx2 */ |
58 | #define GPIO_SYS_BUSY_LED 46 | 72 | #define GPIO_SYS_BUSY_LED 46 |
59 | #define GPIO_HEARTBEAT_LED 47 | 73 | #define GPIO_HEARTBEAT_LED 47 |
@@ -62,24 +76,66 @@ | |||
62 | #define GPIO_PIC 0 | 76 | #define GPIO_PIC 0 |
63 | #define TRIZEPS4_PIC_IRQ IRQ_GPIO(GPIO_PIC) | 77 | #define TRIZEPS4_PIC_IRQ IRQ_GPIO(GPIO_PIC) |
64 | 78 | ||
65 | #define CFSR_P2V(x) ((x) - TRIZEPS4_CFSR_PHYS + TRIZEPS4_CFSR_VIRT) | 79 | #ifdef CONFIG_MACH_TRIZEPS_CONXS |
66 | #define CFSR_V2P(x) ((x) - TRIZEPS4_CFSR_VIRT + TRIZEPS4_CFSR_PHYS) | 80 | /* for CONXS base board define these registers */ |
81 | #define CFSR_P2V(x) ((x) - TRIZEPS4_CFSR_PHYS + TRIZEPS4_CFSR_VIRT) | ||
82 | #define CFSR_V2P(x) ((x) - TRIZEPS4_CFSR_VIRT + TRIZEPS4_CFSR_PHYS) | ||
67 | 83 | ||
68 | #define BCR_P2V(x) ((x) - TRIZEPS4_BOCR_PHYS + TRIZEPS4_BOCR_VIRT) | 84 | #define BCR_P2V(x) ((x) - TRIZEPS4_BOCR_PHYS + TRIZEPS4_BOCR_VIRT) |
69 | #define BCR_V2P(x) ((x) - TRIZEPS4_BOCR_VIRT + TRIZEPS4_BOCR_PHYS) | 85 | #define BCR_V2P(x) ((x) - TRIZEPS4_BOCR_VIRT + TRIZEPS4_BOCR_PHYS) |
70 | 86 | ||
71 | #define DCR_P2V(x) ((x) - TRIZEPS4_DICR_PHYS + TRIZEPS4_DICR_VIRT) | 87 | #define DCR_P2V(x) ((x) - TRIZEPS4_DICR_PHYS + TRIZEPS4_DICR_VIRT) |
72 | #define DCR_V2P(x) ((x) - TRIZEPS4_DICR_VIRT + TRIZEPS4_DICR_PHYS) | 88 | #define DCR_V2P(x) ((x) - TRIZEPS4_DICR_VIRT + TRIZEPS4_DICR_PHYS) |
89 | |||
90 | #define IRCR_P2V(x) ((x) - TRIZEPS4_IRCR_PHYS + TRIZEPS4_IRCR_VIRT) | ||
91 | #define IRCR_V2P(x) ((x) - TRIZEPS4_IRCR_VIRT + TRIZEPS4_IRCR_PHYS) | ||
73 | 92 | ||
74 | #ifndef __ASSEMBLY__ | 93 | #ifndef __ASSEMBLY__ |
75 | #define ConXS_CFSR (*((volatile unsigned short *)CFSR_P2V(0x0C000000))) | 94 | static inline unsigned short CFSR_readw(void) |
76 | #define ConXS_BCR (*((volatile unsigned short *)BCR_P2V(0x0E000000))) | 95 | { |
77 | #define ConXS_DCR (*((volatile unsigned short *)DCR_P2V(0x0F800000))) | 96 | /* [Compact Flash Status Register] is read only */ |
97 | return *((unsigned short *)CFSR_P2V(0x0C000000)); | ||
98 | } | ||
99 | static inline void BCR_writew(unsigned short value) | ||
100 | { | ||
101 | /* [Board Control Regsiter] is write only */ | ||
102 | *((unsigned short *)BCR_P2V(0x0E000000)) = value; | ||
103 | } | ||
104 | static inline void DCR_writew(unsigned short value) | ||
105 | { | ||
106 | /* [Display Control Register] is write only */ | ||
107 | *((unsigned short *)DCR_P2V(0x0E000000)) = value; | ||
108 | } | ||
109 | static inline void IRCR_writew(unsigned short value) | ||
110 | { | ||
111 | /* [InfraRed data Control Register] is write only */ | ||
112 | *((unsigned short *)IRCR_P2V(0x0E000000)) = value; | ||
113 | } | ||
78 | #else | 114 | #else |
79 | #define ConXS_CFSR CFSR_P2V(0x0C000000) | 115 | #define ConXS_CFSR CFSR_P2V(0x0C000000) |
80 | #define ConXS_BCR BCR_P2V(0x0E000000) | 116 | #define ConXS_BCR BCR_P2V(0x0E000000) |
81 | #define ConXS_DCR DCR_P2V(0x0F800000) | 117 | #define ConXS_DCR DCR_P2V(0x0F800000) |
118 | #define ConXS_IRCR IRCR_P2V(0x0F800000) | ||
82 | #endif | 119 | #endif |
120 | #else | ||
121 | /* for whatever baseboard define function registers */ | ||
122 | static inline unsigned short CFSR_readw(void) | ||
123 | { | ||
124 | return 0; | ||
125 | } | ||
126 | static inline void BCR_writew(unsigned short value) | ||
127 | { | ||
128 | ; | ||
129 | } | ||
130 | static inline void DCR_writew(unsigned short value) | ||
131 | { | ||
132 | ; | ||
133 | } | ||
134 | static inline void IRCR_writew(unsigned short value) | ||
135 | { | ||
136 | ; | ||
137 | } | ||
138 | #endif /* CONFIG_MACH_TRIZEPS_CONXS */ | ||
83 | 139 | ||
84 | #define ConXS_CFSR_BVD_MASK 0x0003 | 140 | #define ConXS_CFSR_BVD_MASK 0x0003 |
85 | #define ConXS_CFSR_BVD1 (1 << 0) | 141 | #define ConXS_CFSR_BVD1 (1 << 0) |