diff options
Diffstat (limited to 'include/asm-arm/arch-s3c2410')
-rw-r--r-- | include/asm-arm/arch-s3c2410/dma.h | 36 | ||||
-rw-r--r-- | include/asm-arm/arch-s3c2410/irqs.h | 74 | ||||
-rw-r--r-- | include/asm-arm/arch-s3c2410/regs-adc.h | 2 | ||||
-rw-r--r-- | include/asm-arm/arch-s3c2410/regs-gpio.h | 32 | ||||
-rw-r--r-- | include/asm-arm/arch-s3c2410/regs-s3c2443-clock.h | 194 | ||||
-rw-r--r-- | include/asm-arm/arch-s3c2410/regs-serial.h | 13 | ||||
-rw-r--r-- | include/asm-arm/arch-s3c2410/reset.h | 22 | ||||
-rw-r--r-- | include/asm-arm/arch-s3c2410/system.h | 15 | ||||
-rw-r--r-- | include/asm-arm/arch-s3c2410/udc.h | 36 |
9 files changed, 393 insertions, 31 deletions
diff --git a/include/asm-arm/arch-s3c2410/dma.h b/include/asm-arm/arch-s3c2410/dma.h index 58ffa7ba3c88..c6e8d8f64938 100644 --- a/include/asm-arm/arch-s3c2410/dma.h +++ b/include/asm-arm/arch-s3c2410/dma.h | |||
@@ -51,13 +51,19 @@ enum dma_ch { | |||
51 | DMACH_UART0_SRC2, /* s3c2412 second uart sources */ | 51 | DMACH_UART0_SRC2, /* s3c2412 second uart sources */ |
52 | DMACH_UART1_SRC2, | 52 | DMACH_UART1_SRC2, |
53 | DMACH_UART2_SRC2, | 53 | DMACH_UART2_SRC2, |
54 | DMACH_UART3, /* s3c2443 has extra uart */ | ||
55 | DMACH_UART3_SRC2, | ||
54 | DMACH_MAX, /* the end entry */ | 56 | DMACH_MAX, /* the end entry */ |
55 | }; | 57 | }; |
56 | 58 | ||
57 | #define DMACH_LOW_LEVEL (1<<28) /* use this to specifiy hardware ch no */ | 59 | #define DMACH_LOW_LEVEL (1<<28) /* use this to specifiy hardware ch no */ |
58 | 60 | ||
59 | /* we have 4 dma channels */ | 61 | /* we have 4 dma channels */ |
60 | #define S3C2410_DMA_CHANNELS (4) | 62 | #ifndef CONFIG_CPU_S3C2443 |
63 | #define S3C2410_DMA_CHANNELS (4) | ||
64 | #else | ||
65 | #define S3C2410_DMA_CHANNELS (6) | ||
66 | #endif | ||
61 | 67 | ||
62 | /* types */ | 68 | /* types */ |
63 | 69 | ||
@@ -321,6 +327,7 @@ extern int s3c2410_dma_set_buffdone_fn(dmach_t, s3c2410_dma_cbfn_t rtn); | |||
321 | #define S3C2410_DMA_DCDST (0x1C) | 327 | #define S3C2410_DMA_DCDST (0x1C) |
322 | #define S3C2410_DMA_DMASKTRIG (0x20) | 328 | #define S3C2410_DMA_DMASKTRIG (0x20) |
323 | #define S3C2412_DMA_DMAREQSEL (0x24) | 329 | #define S3C2412_DMA_DMAREQSEL (0x24) |
330 | #define S3C2443_DMA_DMAREQSEL (0x24) | ||
324 | 331 | ||
325 | #define S3C2410_DISRCC_INC (1<<0) | 332 | #define S3C2410_DISRCC_INC (1<<0) |
326 | #define S3C2410_DISRCC_APB (1<<1) | 333 | #define S3C2410_DISRCC_APB (1<<1) |
@@ -415,4 +422,31 @@ extern int s3c2410_dma_set_buffdone_fn(dmach_t, s3c2410_dma_cbfn_t rtn); | |||
415 | #define S3C2412_DMAREQSEL_UART2_1 S3C2412_DMAREQSEL_SRC(24) | 422 | #define S3C2412_DMAREQSEL_UART2_1 S3C2412_DMAREQSEL_SRC(24) |
416 | 423 | ||
417 | #endif | 424 | #endif |
425 | |||
426 | #define S3C2443_DMAREQSEL_SRC(x) ((x)<<1) | ||
427 | |||
428 | #define S3C2443_DMAREQSEL_HW (1) | ||
429 | |||
430 | #define S3C2443_DMAREQSEL_SPI0TX S3C2443_DMAREQSEL_SRC(0) | ||
431 | #define S3C2443_DMAREQSEL_SPI0RX S3C2443_DMAREQSEL_SRC(1) | ||
432 | #define S3C2443_DMAREQSEL_SPI1TX S3C2443_DMAREQSEL_SRC(2) | ||
433 | #define S3C2443_DMAREQSEL_SPI1RX S3C2443_DMAREQSEL_SRC(3) | ||
434 | #define S3C2443_DMAREQSEL_I2STX S3C2443_DMAREQSEL_SRC(4) | ||
435 | #define S3C2443_DMAREQSEL_I2SRX S3C2443_DMAREQSEL_SRC(5) | ||
436 | #define S3C2443_DMAREQSEL_TIMER S3C2443_DMAREQSEL_SRC(9) | ||
437 | #define S3C2443_DMAREQSEL_SDI S3C2443_DMAREQSEL_SRC(10) | ||
438 | #define S3C2443_DMAREQSEL_XDREQ0 S3C2443_DMAREQSEL_SRC(17) | ||
439 | #define S3C2443_DMAREQSEL_XDREQ1 S3C2443_DMAREQSEL_SRC(18) | ||
440 | #define S3C2443_DMAREQSEL_UART0_0 S3C2443_DMAREQSEL_SRC(19) | ||
441 | #define S3C2443_DMAREQSEL_UART0_1 S3C2443_DMAREQSEL_SRC(20) | ||
442 | #define S3C2443_DMAREQSEL_UART1_0 S3C2443_DMAREQSEL_SRC(21) | ||
443 | #define S3C2443_DMAREQSEL_UART1_1 S3C2443_DMAREQSEL_SRC(22) | ||
444 | #define S3C2443_DMAREQSEL_UART2_0 S3C2443_DMAREQSEL_SRC(23) | ||
445 | #define S3C2443_DMAREQSEL_UART2_1 S3C2443_DMAREQSEL_SRC(24) | ||
446 | #define S3C2443_DMAREQSEL_UART3_0 S3C2443_DMAREQSEL_SRC(25) | ||
447 | #define S3C2443_DMAREQSEL_UART3_1 S3C2443_DMAREQSEL_SRC(26) | ||
448 | #define S3C2443_DMAREQSEL_PCMOUT S3C2443_DMAREQSEL_SRC(27) | ||
449 | #define S3C2443_DMAREQSEL_PCMIN S3C2443_DMAREQSEL_SRC(28) | ||
450 | #define S3C2443_DMAREQSEL_MICIN S3C2443_DMAREQSEL_SRC(29) | ||
451 | |||
418 | #endif /* __ASM_ARCH_DMA_H */ | 452 | #endif /* __ASM_ARCH_DMA_H */ |
diff --git a/include/asm-arm/arch-s3c2410/irqs.h b/include/asm-arm/arch-s3c2410/irqs.h index 4b7cff456c4e..c79cb1819913 100644 --- a/include/asm-arm/arch-s3c2410/irqs.h +++ b/include/asm-arm/arch-s3c2410/irqs.h | |||
@@ -34,10 +34,10 @@ | |||
34 | #define IRQ_EINT4t7 S3C2410_IRQ(4) /* 20 */ | 34 | #define IRQ_EINT4t7 S3C2410_IRQ(4) /* 20 */ |
35 | #define IRQ_EINT8t23 S3C2410_IRQ(5) | 35 | #define IRQ_EINT8t23 S3C2410_IRQ(5) |
36 | #define IRQ_RESERVED6 S3C2410_IRQ(6) /* for s3c2410 */ | 36 | #define IRQ_RESERVED6 S3C2410_IRQ(6) /* for s3c2410 */ |
37 | #define IRQ_CAM S3C2410_IRQ(6) /* for s3c2440 */ | 37 | #define IRQ_CAM S3C2410_IRQ(6) /* for s3c2440,s3c2443 */ |
38 | #define IRQ_BATT_FLT S3C2410_IRQ(7) | 38 | #define IRQ_BATT_FLT S3C2410_IRQ(7) |
39 | #define IRQ_TICK S3C2410_IRQ(8) /* 24 */ | 39 | #define IRQ_TICK S3C2410_IRQ(8) /* 24 */ |
40 | #define IRQ_WDT S3C2410_IRQ(9) | 40 | #define IRQ_WDT S3C2410_IRQ(9) /* WDT/AC97 for s3c2443 */ |
41 | #define IRQ_TIMER0 S3C2410_IRQ(10) | 41 | #define IRQ_TIMER0 S3C2410_IRQ(10) |
42 | #define IRQ_TIMER1 S3C2410_IRQ(11) | 42 | #define IRQ_TIMER1 S3C2410_IRQ(11) |
43 | #define IRQ_TIMER2 S3C2410_IRQ(12) | 43 | #define IRQ_TIMER2 S3C2410_IRQ(12) |
@@ -45,7 +45,7 @@ | |||
45 | #define IRQ_TIMER4 S3C2410_IRQ(14) | 45 | #define IRQ_TIMER4 S3C2410_IRQ(14) |
46 | #define IRQ_UART2 S3C2410_IRQ(15) | 46 | #define IRQ_UART2 S3C2410_IRQ(15) |
47 | #define IRQ_LCD S3C2410_IRQ(16) /* 32 */ | 47 | #define IRQ_LCD S3C2410_IRQ(16) /* 32 */ |
48 | #define IRQ_DMA0 S3C2410_IRQ(17) | 48 | #define IRQ_DMA0 S3C2410_IRQ(17) /* IRQ_DMA for s3c2443 */ |
49 | #define IRQ_DMA1 S3C2410_IRQ(18) | 49 | #define IRQ_DMA1 S3C2410_IRQ(18) |
50 | #define IRQ_DMA2 S3C2410_IRQ(19) | 50 | #define IRQ_DMA2 S3C2410_IRQ(19) |
51 | #define IRQ_DMA3 S3C2410_IRQ(20) | 51 | #define IRQ_DMA3 S3C2410_IRQ(20) |
@@ -94,29 +94,63 @@ | |||
94 | * these need to be ordered in number of appearance in the | 94 | * these need to be ordered in number of appearance in the |
95 | * SUBSRC mask register | 95 | * SUBSRC mask register |
96 | */ | 96 | */ |
97 | #define IRQ_S3CUART_RX0 S3C2410_IRQ(54) /* 70 */ | ||
98 | #define IRQ_S3CUART_TX0 S3C2410_IRQ(55) /* 71 */ | ||
99 | #define IRQ_S3CUART_ERR0 S3C2410_IRQ(56) | ||
100 | 97 | ||
101 | #define IRQ_S3CUART_RX1 S3C2410_IRQ(57) | 98 | #define S3C2410_IRQSUB(x) S3C2410_IRQ((x)+54) |
102 | #define IRQ_S3CUART_TX1 S3C2410_IRQ(58) | ||
103 | #define IRQ_S3CUART_ERR1 S3C2410_IRQ(59) | ||
104 | 99 | ||
105 | #define IRQ_S3CUART_RX2 S3C2410_IRQ(60) | 100 | #define IRQ_S3CUART_RX0 S3C2410_IRQSUB(0) /* 70 */ |
106 | #define IRQ_S3CUART_TX2 S3C2410_IRQ(61) | 101 | #define IRQ_S3CUART_TX0 S3C2410_IRQSUB(1) |
107 | #define IRQ_S3CUART_ERR2 S3C2410_IRQ(62) | 102 | #define IRQ_S3CUART_ERR0 S3C2410_IRQSUB(2) |
108 | 103 | ||
109 | #define IRQ_TC S3C2410_IRQ(63) | 104 | #define IRQ_S3CUART_RX1 S3C2410_IRQSUB(3) /* 73 */ |
110 | #define IRQ_ADC S3C2410_IRQ(64) | 105 | #define IRQ_S3CUART_TX1 S3C2410_IRQSUB(4) |
106 | #define IRQ_S3CUART_ERR1 S3C2410_IRQSUB(5) | ||
111 | 107 | ||
112 | /* extra irqs for s3c2440 */ | 108 | #define IRQ_S3CUART_RX2 S3C2410_IRQSUB(6) /* 76 */ |
109 | #define IRQ_S3CUART_TX2 S3C2410_IRQSUB(7) | ||
110 | #define IRQ_S3CUART_ERR2 S3C2410_IRQSUB(8) | ||
113 | 111 | ||
114 | #define IRQ_S3C2440_CAM_C S3C2410_IRQ(65) | 112 | #define IRQ_TC S3C2410_IRQSUB(9) |
115 | #define IRQ_S3C2440_CAM_P S3C2410_IRQ(66) | 113 | #define IRQ_ADC S3C2410_IRQSUB(10) |
116 | #define IRQ_S3C2440_WDT S3C2410_IRQ(67) | ||
117 | #define IRQ_S3C2440_AC97 S3C2410_IRQ(68) | ||
118 | 114 | ||
119 | #define NR_IRQS (IRQ_S3C2440_AC97+1) | 115 | /* extra irqs for s3c2440 */ |
120 | 116 | ||
117 | #define IRQ_S3C2440_CAM_C S3C2410_IRQSUB(11) /* S3C2443 too */ | ||
118 | #define IRQ_S3C2440_CAM_P S3C2410_IRQSUB(12) /* S3C2443 too */ | ||
119 | #define IRQ_S3C2440_WDT S3C2410_IRQSUB(13) | ||
120 | #define IRQ_S3C2440_AC97 S3C2410_IRQSUB(14) | ||
121 | |||
122 | /* irqs for s3c2443 */ | ||
123 | |||
124 | #define IRQ_S3C2443_DMA S3C2410_IRQ(17) /* IRQ_DMA1 */ | ||
125 | #define IRQ_S3C2443_UART3 S3C2410_IRQ(18) /* IRQ_DMA2 */ | ||
126 | #define IRQ_S3C2443_CFCON S3C2410_IRQ(19) /* IRQ_DMA3 */ | ||
127 | #define IRQ_S3C2443_SDI1 S3C2410_IRQ(20) /* IRQ_SDI */ | ||
128 | #define IRQ_S3C2443_NAND S3C2410_IRQ(24) /* reserved */ | ||
129 | |||
130 | #define IRQ_S3C2443_LCD1 S3C2410_IRQSUB(14) | ||
131 | #define IRQ_S3C2443_LCD2 S3C2410_IRQSUB(15) | ||
132 | #define IRQ_S3C2443_LCD3 S3C2410_IRQSUB(16) | ||
133 | #define IRQ_S3C2443_LCD4 S3C2410_IRQSUB(17) | ||
134 | |||
135 | #define IRQ_S3C2443_DMA0 S3C2410_IRQSUB(18) | ||
136 | #define IRQ_S3C2443_DMA1 S3C2410_IRQSUB(19) | ||
137 | #define IRQ_S3C2443_DMA2 S3C2410_IRQSUB(20) | ||
138 | #define IRQ_S3C2443_DMA3 S3C2410_IRQSUB(21) | ||
139 | #define IRQ_S3C2443_DMA4 S3C2410_IRQSUB(22) | ||
140 | #define IRQ_S3C2443_DMA5 S3C2410_IRQSUB(23) | ||
141 | |||
142 | /* UART3 */ | ||
143 | #define IRQ_S3C2443_RX3 S3C2410_IRQSUB(24) | ||
144 | #define IRQ_S3C2443_TX3 S3C2410_IRQSUB(25) | ||
145 | #define IRQ_S3C2443_ERR3 S3C2410_IRQSUB(26) | ||
146 | |||
147 | #define IRQ_S3C2443_WDT S3C2410_IRQSUB(27) | ||
148 | #define IRQ_S3C2443_AC97 S3C2410_IRQSUB(28) | ||
149 | |||
150 | #ifdef CONFIG_CPU_S3C2443 | ||
151 | #define NR_IRQS (IRQ_S3C2443_AC97+1) | ||
152 | #else | ||
153 | #define NR_IRQS (IRQ_S3C2440_AC97+1) | ||
154 | #endif | ||
121 | 155 | ||
122 | #endif /* __ASM_ARCH_IRQ_H */ | 156 | #endif /* __ASM_ARCH_IRQ_H */ |
diff --git a/include/asm-arm/arch-s3c2410/regs-adc.h b/include/asm-arm/arch-s3c2410/regs-adc.h index 3196a2849e8a..c7f231963e76 100644 --- a/include/asm-arm/arch-s3c2410/regs-adc.h +++ b/include/asm-arm/arch-s3c2410/regs-adc.h | |||
@@ -41,7 +41,7 @@ | |||
41 | #define S3C2410_ADCTSC_XP_SEN (1<<4) | 41 | #define S3C2410_ADCTSC_XP_SEN (1<<4) |
42 | #define S3C2410_ADCTSC_PULL_UP_DISABLE (1<<3) | 42 | #define S3C2410_ADCTSC_PULL_UP_DISABLE (1<<3) |
43 | #define S3C2410_ADCTSC_AUTO_PST (1<<2) | 43 | #define S3C2410_ADCTSC_AUTO_PST (1<<2) |
44 | #define S3C2410_ADCTSC_XY_PST (0x3<<0) | 44 | #define S3C2410_ADCTSC_XY_PST(x) (((x)&0x3)<<0) |
45 | 45 | ||
46 | /* ADCDAT0 Bits */ | 46 | /* ADCDAT0 Bits */ |
47 | #define S3C2410_ADCDAT0_UPDOWN (1<<15) | 47 | #define S3C2410_ADCDAT0_UPDOWN (1<<15) |
diff --git a/include/asm-arm/arch-s3c2410/regs-gpio.h b/include/asm-arm/arch-s3c2410/regs-gpio.h index eae91694edcd..dea578b8f7f6 100644 --- a/include/asm-arm/arch-s3c2410/regs-gpio.h +++ b/include/asm-arm/arch-s3c2410/regs-gpio.h | |||
@@ -201,7 +201,7 @@ | |||
201 | #define S3C2400_GPBDAT S3C2410_GPIOREG(0x0C) | 201 | #define S3C2400_GPBDAT S3C2410_GPIOREG(0x0C) |
202 | #define S3C2400_GPBUP S3C2410_GPIOREG(0x10) | 202 | #define S3C2400_GPBUP S3C2410_GPIOREG(0x10) |
203 | 203 | ||
204 | /* no i/o pin in port b can have value 3! */ | 204 | /* no i/o pin in port b can have value 3 (unless it is a s3c2443) ! */ |
205 | 205 | ||
206 | #define S3C2410_GPB0 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 0) | 206 | #define S3C2410_GPB0 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 0) |
207 | #define S3C2410_GPB0_INP (0x00 << 0) | 207 | #define S3C2410_GPB0_INP (0x00 << 0) |
@@ -242,6 +242,7 @@ | |||
242 | #define S3C2410_GPB5_INP (0x00 << 10) | 242 | #define S3C2410_GPB5_INP (0x00 << 10) |
243 | #define S3C2410_GPB5_OUTP (0x01 << 10) | 243 | #define S3C2410_GPB5_OUTP (0x01 << 10) |
244 | #define S3C2410_GPB5_nXBACK (0x02 << 10) | 244 | #define S3C2410_GPB5_nXBACK (0x02 << 10) |
245 | #define S3C2443_GPB5_XBACK (0x03 << 10) | ||
245 | #define S3C2400_GPB5_DATA21 (0x02 << 10) | 246 | #define S3C2400_GPB5_DATA21 (0x02 << 10) |
246 | #define S3C2400_GPB5_nCTS1 (0x03 << 10) | 247 | #define S3C2400_GPB5_nCTS1 (0x03 << 10) |
247 | 248 | ||
@@ -249,6 +250,7 @@ | |||
249 | #define S3C2410_GPB6_INP (0x00 << 12) | 250 | #define S3C2410_GPB6_INP (0x00 << 12) |
250 | #define S3C2410_GPB6_OUTP (0x01 << 12) | 251 | #define S3C2410_GPB6_OUTP (0x01 << 12) |
251 | #define S3C2410_GPB6_nXBREQ (0x02 << 12) | 252 | #define S3C2410_GPB6_nXBREQ (0x02 << 12) |
253 | #define S3C2443_GPB6_XBREQ (0x03 << 12) | ||
252 | #define S3C2400_GPB6_DATA22 (0x02 << 12) | 254 | #define S3C2400_GPB6_DATA22 (0x02 << 12) |
253 | #define S3C2400_GPB6_nRTS1 (0x03 << 12) | 255 | #define S3C2400_GPB6_nRTS1 (0x03 << 12) |
254 | 256 | ||
@@ -256,6 +258,7 @@ | |||
256 | #define S3C2410_GPB7_INP (0x00 << 14) | 258 | #define S3C2410_GPB7_INP (0x00 << 14) |
257 | #define S3C2410_GPB7_OUTP (0x01 << 14) | 259 | #define S3C2410_GPB7_OUTP (0x01 << 14) |
258 | #define S3C2410_GPB7_nXDACK1 (0x02 << 14) | 260 | #define S3C2410_GPB7_nXDACK1 (0x02 << 14) |
261 | #define S3C2443_GPB7_XDACK1 (0x03 << 14) | ||
259 | #define S3C2400_GPB7_DATA23 (0x02 << 14) | 262 | #define S3C2400_GPB7_DATA23 (0x02 << 14) |
260 | 263 | ||
261 | #define S3C2410_GPB8 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 8) | 264 | #define S3C2410_GPB8 S3C2410_GPIONO(S3C2410_GPIO_BANKB, 8) |
@@ -268,6 +271,7 @@ | |||
268 | #define S3C2410_GPB9_INP (0x00 << 18) | 271 | #define S3C2410_GPB9_INP (0x00 << 18) |
269 | #define S3C2410_GPB9_OUTP (0x01 << 18) | 272 | #define S3C2410_GPB9_OUTP (0x01 << 18) |
270 | #define S3C2410_GPB9_nXDACK0 (0x02 << 18) | 273 | #define S3C2410_GPB9_nXDACK0 (0x02 << 18) |
274 | #define S3C2443_GPB9_XDACK0 (0x03 << 18) | ||
271 | #define S3C2400_GPB9_DATA25 (0x02 << 18) | 275 | #define S3C2400_GPB9_DATA25 (0x02 << 18) |
272 | #define S3C2400_GPB9_I2SSDI (0x03 << 18) | 276 | #define S3C2400_GPB9_I2SSDI (0x03 << 18) |
273 | 277 | ||
@@ -275,6 +279,7 @@ | |||
275 | #define S3C2410_GPB10_INP (0x00 << 20) | 279 | #define S3C2410_GPB10_INP (0x00 << 20) |
276 | #define S3C2410_GPB10_OUTP (0x01 << 20) | 280 | #define S3C2410_GPB10_OUTP (0x01 << 20) |
277 | #define S3C2410_GPB10_nXDRE0 (0x02 << 20) | 281 | #define S3C2410_GPB10_nXDRE0 (0x02 << 20) |
282 | #define S3C2443_GPB10_XDREQ0 (0x03 << 20) | ||
278 | #define S3C2400_GPB10_DATA26 (0x02 << 20) | 283 | #define S3C2400_GPB10_DATA26 (0x02 << 20) |
279 | #define S3C2400_GPB10_nSS (0x03 << 20) | 284 | #define S3C2400_GPB10_nSS (0x03 << 20) |
280 | 285 | ||
@@ -556,6 +561,7 @@ | |||
556 | #define S3C2410_GPE0_INP (0x00 << 0) | 561 | #define S3C2410_GPE0_INP (0x00 << 0) |
557 | #define S3C2410_GPE0_OUTP (0x01 << 0) | 562 | #define S3C2410_GPE0_OUTP (0x01 << 0) |
558 | #define S3C2410_GPE0_I2SLRCK (0x02 << 0) | 563 | #define S3C2410_GPE0_I2SLRCK (0x02 << 0) |
564 | #define S3C2443_GPE0_AC_nRESET (0x03 << 0) | ||
559 | #define S3C2400_GPE0_EINT0 (0x02 << 0) | 565 | #define S3C2400_GPE0_EINT0 (0x02 << 0) |
560 | #define S3C2410_GPE0_MASK (0x03 << 0) | 566 | #define S3C2410_GPE0_MASK (0x03 << 0) |
561 | 567 | ||
@@ -563,6 +569,7 @@ | |||
563 | #define S3C2410_GPE1_INP (0x00 << 2) | 569 | #define S3C2410_GPE1_INP (0x00 << 2) |
564 | #define S3C2410_GPE1_OUTP (0x01 << 2) | 570 | #define S3C2410_GPE1_OUTP (0x01 << 2) |
565 | #define S3C2410_GPE1_I2SSCLK (0x02 << 2) | 571 | #define S3C2410_GPE1_I2SSCLK (0x02 << 2) |
572 | #define S3C2443_GPE1_AC_SYNC (0x03 << 2) | ||
566 | #define S3C2400_GPE1_EINT1 (0x02 << 2) | 573 | #define S3C2400_GPE1_EINT1 (0x02 << 2) |
567 | #define S3C2400_GPE1_nSS (0x03 << 2) | 574 | #define S3C2400_GPE1_nSS (0x03 << 2) |
568 | #define S3C2410_GPE1_MASK (0x03 << 2) | 575 | #define S3C2410_GPE1_MASK (0x03 << 2) |
@@ -571,6 +578,7 @@ | |||
571 | #define S3C2410_GPE2_INP (0x00 << 4) | 578 | #define S3C2410_GPE2_INP (0x00 << 4) |
572 | #define S3C2410_GPE2_OUTP (0x01 << 4) | 579 | #define S3C2410_GPE2_OUTP (0x01 << 4) |
573 | #define S3C2410_GPE2_CDCLK (0x02 << 4) | 580 | #define S3C2410_GPE2_CDCLK (0x02 << 4) |
581 | #define S3C2443_GPE2_AC_BITCLK (0x03 << 4) | ||
574 | #define S3C2400_GPE2_EINT2 (0x02 << 4) | 582 | #define S3C2400_GPE2_EINT2 (0x02 << 4) |
575 | #define S3C2400_GPE2_I2SSDI (0x03 << 4) | 583 | #define S3C2400_GPE2_I2SSDI (0x03 << 4) |
576 | 584 | ||
@@ -578,6 +586,7 @@ | |||
578 | #define S3C2410_GPE3_INP (0x00 << 6) | 586 | #define S3C2410_GPE3_INP (0x00 << 6) |
579 | #define S3C2410_GPE3_OUTP (0x01 << 6) | 587 | #define S3C2410_GPE3_OUTP (0x01 << 6) |
580 | #define S3C2410_GPE3_I2SSDI (0x02 << 6) | 588 | #define S3C2410_GPE3_I2SSDI (0x02 << 6) |
589 | #define S3C2443_GPE3_AC_SDI (0x03 << 6) | ||
581 | #define S3C2400_GPE3_EINT3 (0x02 << 6) | 590 | #define S3C2400_GPE3_EINT3 (0x02 << 6) |
582 | #define S3C2400_GPE3_nCTS1 (0x03 << 6) | 591 | #define S3C2400_GPE3_nCTS1 (0x03 << 6) |
583 | #define S3C2410_GPE3_nSS0 (0x03 << 6) | 592 | #define S3C2410_GPE3_nSS0 (0x03 << 6) |
@@ -587,6 +596,7 @@ | |||
587 | #define S3C2410_GPE4_INP (0x00 << 8) | 596 | #define S3C2410_GPE4_INP (0x00 << 8) |
588 | #define S3C2410_GPE4_OUTP (0x01 << 8) | 597 | #define S3C2410_GPE4_OUTP (0x01 << 8) |
589 | #define S3C2410_GPE4_I2SSDO (0x02 << 8) | 598 | #define S3C2410_GPE4_I2SSDO (0x02 << 8) |
599 | #define S3C2443_GPE4_AC_SDO (0x03 << 8) | ||
590 | #define S3C2400_GPE4_EINT4 (0x02 << 8) | 600 | #define S3C2400_GPE4_EINT4 (0x02 << 8) |
591 | #define S3C2400_GPE4_nRTS1 (0x03 << 8) | 601 | #define S3C2400_GPE4_nRTS1 (0x03 << 8) |
592 | #define S3C2410_GPE4_I2SSDI (0x03 << 8) | 602 | #define S3C2410_GPE4_I2SSDI (0x03 << 8) |
@@ -596,6 +606,7 @@ | |||
596 | #define S3C2410_GPE5_INP (0x00 << 10) | 606 | #define S3C2410_GPE5_INP (0x00 << 10) |
597 | #define S3C2410_GPE5_OUTP (0x01 << 10) | 607 | #define S3C2410_GPE5_OUTP (0x01 << 10) |
598 | #define S3C2410_GPE5_SDCLK (0x02 << 10) | 608 | #define S3C2410_GPE5_SDCLK (0x02 << 10) |
609 | #define S3C2443_GPE5_SD1_CLK (0x02 << 10) | ||
599 | #define S3C2400_GPE5_EINT5 (0x02 << 10) | 610 | #define S3C2400_GPE5_EINT5 (0x02 << 10) |
600 | #define S3C2400_GPE5_TCLK1 (0x03 << 10) | 611 | #define S3C2400_GPE5_TCLK1 (0x03 << 10) |
601 | 612 | ||
@@ -603,24 +614,32 @@ | |||
603 | #define S3C2410_GPE6_INP (0x00 << 12) | 614 | #define S3C2410_GPE6_INP (0x00 << 12) |
604 | #define S3C2410_GPE6_OUTP (0x01 << 12) | 615 | #define S3C2410_GPE6_OUTP (0x01 << 12) |
605 | #define S3C2410_GPE6_SDCMD (0x02 << 12) | 616 | #define S3C2410_GPE6_SDCMD (0x02 << 12) |
617 | #define S3C2443_GPE6_SD1_CMD (0x02 << 12) | ||
618 | #define S3C2443_GPE6_AC_BITCLK (0x03 << 12) | ||
606 | #define S3C2400_GPE6_EINT6 (0x02 << 12) | 619 | #define S3C2400_GPE6_EINT6 (0x02 << 12) |
607 | 620 | ||
608 | #define S3C2410_GPE7 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 7) | 621 | #define S3C2410_GPE7 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 7) |
609 | #define S3C2410_GPE7_INP (0x00 << 14) | 622 | #define S3C2410_GPE7_INP (0x00 << 14) |
610 | #define S3C2410_GPE7_OUTP (0x01 << 14) | 623 | #define S3C2410_GPE7_OUTP (0x01 << 14) |
611 | #define S3C2410_GPE7_SDDAT0 (0x02 << 14) | 624 | #define S3C2410_GPE7_SDDAT0 (0x02 << 14) |
625 | #define S3C2443_GPE5_SD1_DAT0 (0x02 << 14) | ||
626 | #define S3C2443_GPE7_AC_SDI (0x03 << 14) | ||
612 | #define S3C2400_GPE7_EINT7 (0x02 << 14) | 627 | #define S3C2400_GPE7_EINT7 (0x02 << 14) |
613 | 628 | ||
614 | #define S3C2410_GPE8 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 8) | 629 | #define S3C2410_GPE8 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 8) |
615 | #define S3C2410_GPE8_INP (0x00 << 16) | 630 | #define S3C2410_GPE8_INP (0x00 << 16) |
616 | #define S3C2410_GPE8_OUTP (0x01 << 16) | 631 | #define S3C2410_GPE8_OUTP (0x01 << 16) |
617 | #define S3C2410_GPE8_SDDAT1 (0x02 << 16) | 632 | #define S3C2410_GPE8_SDDAT1 (0x02 << 16) |
633 | #define S3C2443_GPE8_SD1_DAT1 (0x02 << 16) | ||
634 | #define S3C2443_GPE8_AC_SDO (0x03 << 16) | ||
618 | #define S3C2400_GPE8_nXDACK0 (0x02 << 16) | 635 | #define S3C2400_GPE8_nXDACK0 (0x02 << 16) |
619 | 636 | ||
620 | #define S3C2410_GPE9 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 9) | 637 | #define S3C2410_GPE9 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 9) |
621 | #define S3C2410_GPE9_INP (0x00 << 18) | 638 | #define S3C2410_GPE9_INP (0x00 << 18) |
622 | #define S3C2410_GPE9_OUTP (0x01 << 18) | 639 | #define S3C2410_GPE9_OUTP (0x01 << 18) |
623 | #define S3C2410_GPE9_SDDAT2 (0x02 << 18) | 640 | #define S3C2410_GPE9_SDDAT2 (0x02 << 18) |
641 | #define S3C2443_GPE9_SD1_DAT2 (0x02 << 18) | ||
642 | #define S3C2443_GPE9_AC_SYNC (0x03 << 18) | ||
624 | #define S3C2400_GPE9_nXDACK1 (0x02 << 18) | 643 | #define S3C2400_GPE9_nXDACK1 (0x02 << 18) |
625 | #define S3C2400_GPE9_nXBACK (0x03 << 18) | 644 | #define S3C2400_GPE9_nXBACK (0x03 << 18) |
626 | 645 | ||
@@ -628,6 +647,8 @@ | |||
628 | #define S3C2410_GPE10_INP (0x00 << 20) | 647 | #define S3C2410_GPE10_INP (0x00 << 20) |
629 | #define S3C2410_GPE10_OUTP (0x01 << 20) | 648 | #define S3C2410_GPE10_OUTP (0x01 << 20) |
630 | #define S3C2410_GPE10_SDDAT3 (0x02 << 20) | 649 | #define S3C2410_GPE10_SDDAT3 (0x02 << 20) |
650 | #define S3C2443_GPE10_SD1_DAT3 (0x02 << 20) | ||
651 | #define S3C2443_GPE10_AC_nRESET (0x03 << 20) | ||
631 | #define S3C2400_GPE10_nXDREQ0 (0x02 << 20) | 652 | #define S3C2400_GPE10_nXDREQ0 (0x02 << 20) |
632 | 653 | ||
633 | #define S3C2410_GPE11 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 11) | 654 | #define S3C2410_GPE11 S3C2410_GPIONO(S3C2410_GPIO_BANKE, 11) |
@@ -796,6 +817,7 @@ | |||
796 | #define S3C2400_GPG4_MMCCLK (0x02 << 8) | 817 | #define S3C2400_GPG4_MMCCLK (0x02 << 8) |
797 | #define S3C2400_GPG4_I2SSDI (0x03 << 8) | 818 | #define S3C2400_GPG4_I2SSDI (0x03 << 8) |
798 | #define S3C2410_GPG4_LCDPWREN (0x03 << 8) | 819 | #define S3C2410_GPG4_LCDPWREN (0x03 << 8) |
820 | #define S3C2443_GPG4_LCDPWRDN (0x03 << 8) | ||
799 | 821 | ||
800 | #define S3C2410_GPG5 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 5) | 822 | #define S3C2410_GPG5 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 5) |
801 | #define S3C2410_GPG5_INP (0x00 << 10) | 823 | #define S3C2410_GPG5_INP (0x00 << 10) |
@@ -803,7 +825,7 @@ | |||
803 | #define S3C2410_GPG5_EINT13 (0x02 << 10) | 825 | #define S3C2410_GPG5_EINT13 (0x02 << 10) |
804 | #define S3C2400_GPG5_MMCCMD (0x02 << 10) | 826 | #define S3C2400_GPG5_MMCCMD (0x02 << 10) |
805 | #define S3C2400_GPG5_IICSDA (0x03 << 10) | 827 | #define S3C2400_GPG5_IICSDA (0x03 << 10) |
806 | #define S3C2410_GPG5_SPIMISO1 (0x03 << 10) | 828 | #define S3C2410_GPG5_SPIMISO1 (0x03 << 10) /* not s3c2443 */ |
807 | 829 | ||
808 | #define S3C2410_GPG6 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 6) | 830 | #define S3C2410_GPG6 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 6) |
809 | #define S3C2410_GPG6_INP (0x00 << 12) | 831 | #define S3C2410_GPG6_INP (0x00 << 12) |
@@ -845,6 +867,7 @@ | |||
845 | #define S3C2410_GPG11_OUTP (0x01 << 22) | 867 | #define S3C2410_GPG11_OUTP (0x01 << 22) |
846 | #define S3C2410_GPG11_EINT19 (0x02 << 22) | 868 | #define S3C2410_GPG11_EINT19 (0x02 << 22) |
847 | #define S3C2410_GPG11_TCLK1 (0x03 << 22) | 869 | #define S3C2410_GPG11_TCLK1 (0x03 << 22) |
870 | #define S3C2443_GPG11_CF_nIREQ (0x03 << 22) | ||
848 | 871 | ||
849 | #define S3C2410_GPG12 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 12) | 872 | #define S3C2410_GPG12 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 12) |
850 | #define S3C2410_GPG12_INP (0x00 << 24) | 873 | #define S3C2410_GPG12_INP (0x00 << 24) |
@@ -852,25 +875,28 @@ | |||
852 | #define S3C2410_GPG12_EINT20 (0x02 << 24) | 875 | #define S3C2410_GPG12_EINT20 (0x02 << 24) |
853 | #define S3C2410_GPG12_XMON (0x03 << 24) | 876 | #define S3C2410_GPG12_XMON (0x03 << 24) |
854 | #define S3C2442_GPG12_nSPICS0 (0x03 << 24) | 877 | #define S3C2442_GPG12_nSPICS0 (0x03 << 24) |
878 | #define S3C2443_GPG12_nINPACK (0x03 << 24) | ||
855 | 879 | ||
856 | #define S3C2410_GPG13 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 13) | 880 | #define S3C2410_GPG13 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 13) |
857 | #define S3C2410_GPG13_INP (0x00 << 26) | 881 | #define S3C2410_GPG13_INP (0x00 << 26) |
858 | #define S3C2410_GPG13_OUTP (0x01 << 26) | 882 | #define S3C2410_GPG13_OUTP (0x01 << 26) |
859 | #define S3C2410_GPG13_EINT21 (0x02 << 26) | 883 | #define S3C2410_GPG13_EINT21 (0x02 << 26) |
860 | #define S3C2410_GPG13_nXPON (0x03 << 26) | 884 | #define S3C2410_GPG13_nXPON (0x03 << 26) |
885 | #define S3C2443_GPG13_CF_nREG (0x03 << 26) | ||
861 | 886 | ||
862 | #define S3C2410_GPG14 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 14) | 887 | #define S3C2410_GPG14 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 14) |
863 | #define S3C2410_GPG14_INP (0x00 << 28) | 888 | #define S3C2410_GPG14_INP (0x00 << 28) |
864 | #define S3C2410_GPG14_OUTP (0x01 << 28) | 889 | #define S3C2410_GPG14_OUTP (0x01 << 28) |
865 | #define S3C2410_GPG14_EINT22 (0x02 << 28) | 890 | #define S3C2410_GPG14_EINT22 (0x02 << 28) |
866 | #define S3C2410_GPG14_YMON (0x03 << 28) | 891 | #define S3C2410_GPG14_YMON (0x03 << 28) |
892 | #define S3C2443_GPG14_CF_RESET (0x03 << 28) | ||
867 | 893 | ||
868 | #define S3C2410_GPG15 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 15) | 894 | #define S3C2410_GPG15 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 15) |
869 | #define S3C2410_GPG15_INP (0x00 << 30) | 895 | #define S3C2410_GPG15_INP (0x00 << 30) |
870 | #define S3C2410_GPG15_OUTP (0x01 << 30) | 896 | #define S3C2410_GPG15_OUTP (0x01 << 30) |
871 | #define S3C2410_GPG15_EINT23 (0x02 << 30) | 897 | #define S3C2410_GPG15_EINT23 (0x02 << 30) |
872 | #define S3C2410_GPG15_nYPON (0x03 << 30) | 898 | #define S3C2410_GPG15_nYPON (0x03 << 30) |
873 | 899 | #define S3C2443_GPG15_CF_PWR (0x03 << 30) | |
874 | 900 | ||
875 | #define S3C2410_GPG_PUPDIS(x) (1<<(x)) | 901 | #define S3C2410_GPG_PUPDIS(x) (1<<(x)) |
876 | 902 | ||
diff --git a/include/asm-arm/arch-s3c2410/regs-s3c2443-clock.h b/include/asm-arm/arch-s3c2410/regs-s3c2443-clock.h new file mode 100644 index 000000000000..ff0536d2de42 --- /dev/null +++ b/include/asm-arm/arch-s3c2410/regs-s3c2443-clock.h | |||
@@ -0,0 +1,194 @@ | |||
1 | /* linux/include/asm-arm/arch-s3c2410/regs-clock.h | ||
2 | * | ||
3 | * Copyright (c) 2007 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | * S3C2443 clock register definitions | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASM_ARM_REGS_S3C2443_CLOCK | ||
15 | #define __ASM_ARM_REGS_S3C2443_CLOCK | ||
16 | |||
17 | #define S3C2443_CLKREG(x) ((x) + S3C24XX_VA_CLKPWR) | ||
18 | |||
19 | #define S3C2443_PLLCON_MDIVSHIFT 16 | ||
20 | #define S3C2443_PLLCON_PDIVSHIFT 8 | ||
21 | #define S3C2443_PLLCON_SDIVSHIFT 0 | ||
22 | #define S3C2443_PLLCON_MDIVMASK ((1<<(1+(23-16)))-1) | ||
23 | #define S3C2443_PLLCON_PDIVMASK ((1<<(1+(9-8)))-1) | ||
24 | #define S3C2443_PLLCON_SDIVMASK (3) | ||
25 | |||
26 | #define S3C2443_MPLLCON S3C2443_CLKREG(0x10) | ||
27 | #define S3C2443_EPLLCON S3C2443_CLKREG(0x18) | ||
28 | #define S3C2443_CLKSRC S3C2443_CLKREG(0x20) | ||
29 | #define S3C2443_CLKDIV0 S3C2443_CLKREG(0x24) | ||
30 | #define S3C2443_CLKDIV1 S3C2443_CLKREG(0x28) | ||
31 | #define S3C2443_HCLKCON S3C2443_CLKREG(0x30) | ||
32 | #define S3C2443_PCLKCON S3C2443_CLKREG(0x34) | ||
33 | #define S3C2443_SCLKCON S3C2443_CLKREG(0x38) | ||
34 | #define S3C2443_PWRMODE S3C2443_CLKREG(0x40) | ||
35 | #define S3C2443_SWRST S3C2443_CLKREG(0x44) | ||
36 | #define S3C2443_BUSPRI0 S3C2443_CLKREG(0x50) | ||
37 | #define S3C2443_SYSID S3C2443_CLKREG(0x5C) | ||
38 | #define S3C2443_PWRCFG S3C2443_CLKREG(0x60) | ||
39 | #define S3C2443_RSTCON S3C2443_CLKREG(0x64) | ||
40 | |||
41 | #define S3C2443_SWRST_RESET (0x533c2443) | ||
42 | |||
43 | #define S3C2443_PLLCON_OFF (1<<24) | ||
44 | |||
45 | #define S3C2443_CLKSRC_I2S_EXT (1<<14) | ||
46 | #define S3C2443_CLKSRC_I2S_EPLLDIV (0<<14) | ||
47 | #define S3C2443_CLKSRC_I2S_EPLLREF (2<<14) | ||
48 | #define S3C2443_CLKSRC_I2S_EPLLREF3 (3<<14) | ||
49 | #define S3C2443_CLKSRC_I2S_MASK (3<<14) | ||
50 | |||
51 | #define S3C2443_CLKSRC_EPLLREF_XTAL (2<<8) | ||
52 | #define S3C2443_CLKSRC_EPLLREF_EXTCLK (3<<8) | ||
53 | #define S3C2443_CLKSRC_EPLLREF_MPLLREF (0<<8) | ||
54 | #define S3C2443_CLKSRC_EPLLREF_MPLLREF2 (1<<8) | ||
55 | #define S3C2443_CLKSRC_EPLLREF_MASK (3<<8) | ||
56 | |||
57 | #define S3C2443_CLKSRC_ESYSCLK_EPLL (1<<6) | ||
58 | #define S3C2443_CLKSRC_MSYSCLK_MPLL (1<<4) | ||
59 | #define S3C2443_CLKSRC_EXTCLK_DIV (1<<3) | ||
60 | |||
61 | #define S3C2443_CLKDIV0_DVS (1<<13) | ||
62 | #define S3C2443_CLKDIV0_HALF_HCLK (1<<3) | ||
63 | #define S3C2443_CLKDIV0_HALF_PCLK (1<<2) | ||
64 | |||
65 | #define S3C2443_CLKDIV0_HCLKDIV_MASK (3<<0) | ||
66 | |||
67 | #define S3C2443_CLKDIV0_EXTDIV_MASK (3<<6) | ||
68 | #define S3C2443_CLKDIV0_EXTDIV_SHIFT (6) | ||
69 | |||
70 | #define S3C2443_CLKDIV0_PREDIV_MASK (3<<4) | ||
71 | #define S3C2443_CLKDIV0_PREDIV_SHIFT (4) | ||
72 | |||
73 | #define S3C2443_CLKDIV0_ARMDIV_MASK (15<<9) | ||
74 | #define S3C2443_CLKDIV0_ARMDIV_SHIFT (9) | ||
75 | #define S3C2443_CLKDIV0_ARMDIV_1 (0<<9) | ||
76 | #define S3C2443_CLKDIV0_ARMDIV_2 (8<<9) | ||
77 | #define S3C2443_CLKDIV0_ARMDIV_3 (2<<9) | ||
78 | #define S3C2443_CLKDIV0_ARMDIV_4 (9<<9) | ||
79 | #define S3C2443_CLKDIV0_ARMDIV_6 (10<<9) | ||
80 | #define S3C2443_CLKDIV0_ARMDIV_8 (11<<9) | ||
81 | #define S3C2443_CLKDIV0_ARMDIV_12 (13<<9) | ||
82 | #define S3C2443_CLKDIV0_ARMDIV_16 (15<<9) | ||
83 | |||
84 | /* S3C2443_CLKDIV1 */ | ||
85 | |||
86 | #define S3C2443_CLKDIV1_CAMDIV_MASK (15<<26) | ||
87 | #define S3C2443_CLKDIV1_CAMDIV_SHIFT (26) | ||
88 | |||
89 | #define S3C2443_CLKDIV1_HSSPIDIV_MASK (3<<24) | ||
90 | #define S3C2443_CLKDIV1_HSSPIDIV_SHIFT (24) | ||
91 | |||
92 | #define S3C2443_CLKDIV1_DISPDIV_MASK (0xff<<16) | ||
93 | #define S3C2443_CLKDIV1_DISPDIV_SHIFT (16) | ||
94 | |||
95 | #define S3C2443_CLKDIV1_I2SDIV_MASK (15<<12) | ||
96 | #define S3C2443_CLKDIV1_I2SDIV_SHIFT (12) | ||
97 | |||
98 | #define S3C2443_CLKDIV1_UARTDIV_MASK (15<<8) | ||
99 | #define S3C2443_CLKDIV1_UARTDIV_SHIFT (8) | ||
100 | |||
101 | #define S3C2443_CLKDIV1_HSMMCDIV_MASK (3<<6) | ||
102 | #define S3C2443_CLKDIV1_HSMMCDIV_SHIFT (6) | ||
103 | |||
104 | #define S3C2443_CLKDIV1_USBHOSTDIV_MASK (3<<4) | ||
105 | #define S3C2443_CLKDIV1_USBHOSTDIV_SHIFT (4) | ||
106 | |||
107 | #define S3C2443_CLKCON_NAND | ||
108 | |||
109 | #define S3C2443_HCLKCON_DMA0 (1<<0) | ||
110 | #define S3C2443_HCLKCON_DMA1 (1<<1) | ||
111 | #define S3C2443_HCLKCON_DMA2 (1<<2) | ||
112 | #define S3C2443_HCLKCON_DMA3 (1<<3) | ||
113 | #define S3C2443_HCLKCON_DMA4 (1<<4) | ||
114 | #define S3C2443_HCLKCON_DMA5 (1<<5) | ||
115 | #define S3C2443_HCLKCON_CAMIF (1<<8) | ||
116 | #define S3C2443_HCLKCON_DISP (1<<9) | ||
117 | #define S3C2443_HCLKCON_LCDC (1<<10) | ||
118 | #define S3C2443_HCLKCON_USBH (1<<11) | ||
119 | #define S3C2443_HCLKCON_USBD (1<<12) | ||
120 | #define S3C2443_HCLKCON_HSMMC (1<<16) | ||
121 | #define S3C2443_HCLKCON_CFC (1<<17) | ||
122 | #define S3C2443_HCLKCON_SSMC (1<<18) | ||
123 | #define S3C2443_HCLKCON_DRAMC (1<<19) | ||
124 | |||
125 | #define S3C2443_PCLKCON_UART0 (1<<0) | ||
126 | #define S3C2443_PCLKCON_UART1 (1<<1) | ||
127 | #define S3C2443_PCLKCON_UART2 (1<<2) | ||
128 | #define S3C2443_PCLKCON_UART3 (1<<3) | ||
129 | #define S3C2443_PCLKCON_IIC (1<<4) | ||
130 | #define S3C2443_PCLKCON_SDI (1<<5) | ||
131 | #define S3C2443_PCLKCON_ADC (1<<7) | ||
132 | #define S3C2443_PCLKCON_IIS (1<<9) | ||
133 | #define S3C2443_PCLKCON_PWMT (1<<10) | ||
134 | #define S3C2443_PCLKCON_WDT (1<<11) | ||
135 | #define S3C2443_PCLKCON_RTC (1<<12) | ||
136 | #define S3C2443_PCLKCON_GPIO (1<<13) | ||
137 | #define S3C2443_PCLKCON_SPI0 (1<<14) | ||
138 | #define S3C2443_PCLKCON_SPI1 (1<<15) | ||
139 | |||
140 | #define S3C2443_SCLKCON_DDRCLK (1<<16) | ||
141 | #define S3C2443_SCLKCON_SSMCCLK (1<<15) | ||
142 | #define S3C2443_SCLKCON_HSSPICLK (1<<14) | ||
143 | #define S3C2443_SCLKCON_HSMMCCLK_EXT (1<<13) | ||
144 | #define S3C2443_SCLKCON_HSMMCCLK_EPLL (1<<12) | ||
145 | #define S3C2443_SCLKCON_CAMCLK (1<<11) | ||
146 | #define S3C2443_SCLKCON_DISPCLK (1<<10) | ||
147 | #define S3C2443_SCLKCON_I2SCLK (1<<9) | ||
148 | #define S3C2443_SCLKCON_UARTCLK (1<<8) | ||
149 | #define S3C2443_SCLKCON_USBHOST (1<<1) | ||
150 | |||
151 | #include <asm/div64.h> | ||
152 | |||
153 | static inline unsigned int | ||
154 | s3c2443_get_mpll(unsigned int pllval, unsigned int baseclk) | ||
155 | { | ||
156 | unsigned int mdiv, pdiv, sdiv; | ||
157 | uint64_t fvco; | ||
158 | |||
159 | mdiv = pllval >> S3C2443_PLLCON_MDIVSHIFT; | ||
160 | pdiv = pllval >> S3C2443_PLLCON_PDIVSHIFT; | ||
161 | sdiv = pllval >> S3C2443_PLLCON_SDIVSHIFT; | ||
162 | |||
163 | mdiv &= S3C2443_PLLCON_MDIVMASK; | ||
164 | pdiv &= S3C2443_PLLCON_PDIVMASK; | ||
165 | sdiv &= S3C2443_PLLCON_SDIVMASK; | ||
166 | |||
167 | fvco = (uint64_t)baseclk * (2 * (mdiv + 8)); | ||
168 | do_div(fvco, pdiv << sdiv); | ||
169 | |||
170 | return (unsigned int)fvco; | ||
171 | } | ||
172 | |||
173 | static inline unsigned int | ||
174 | s3c2443_get_epll(unsigned int pllval, unsigned int baseclk) | ||
175 | { | ||
176 | unsigned int mdiv, pdiv, sdiv; | ||
177 | uint64_t fvco; | ||
178 | |||
179 | mdiv = pllval >> S3C2443_PLLCON_MDIVSHIFT; | ||
180 | pdiv = pllval >> S3C2443_PLLCON_PDIVSHIFT; | ||
181 | sdiv = pllval >> S3C2443_PLLCON_SDIVSHIFT; | ||
182 | |||
183 | mdiv &= S3C2443_PLLCON_MDIVMASK; | ||
184 | pdiv &= S3C2443_PLLCON_PDIVMASK; | ||
185 | sdiv &= S3C2443_PLLCON_SDIVMASK; | ||
186 | |||
187 | fvco = (uint64_t)baseclk * (mdiv + 8); | ||
188 | do_div(fvco, (pdiv + 2) << sdiv); | ||
189 | |||
190 | return (unsigned int)fvco; | ||
191 | } | ||
192 | |||
193 | #endif /* __ASM_ARM_REGS_S3C2443_CLOCK */ | ||
194 | |||
diff --git a/include/asm-arm/arch-s3c2410/regs-serial.h b/include/asm-arm/arch-s3c2410/regs-serial.h index 46f52401d132..8946702a87f5 100644 --- a/include/asm-arm/arch-s3c2410/regs-serial.h +++ b/include/asm-arm/arch-s3c2410/regs-serial.h | |||
@@ -35,10 +35,12 @@ | |||
35 | #define S3C24XX_VA_UART0 (S3C24XX_VA_UART) | 35 | #define S3C24XX_VA_UART0 (S3C24XX_VA_UART) |
36 | #define S3C24XX_VA_UART1 (S3C24XX_VA_UART + 0x4000 ) | 36 | #define S3C24XX_VA_UART1 (S3C24XX_VA_UART + 0x4000 ) |
37 | #define S3C24XX_VA_UART2 (S3C24XX_VA_UART + 0x8000 ) | 37 | #define S3C24XX_VA_UART2 (S3C24XX_VA_UART + 0x8000 ) |
38 | #define S3C24XX_VA_UART3 (S3C24XX_VA_UART + 0xC000 ) | ||
38 | 39 | ||
39 | #define S3C2410_PA_UART0 (S3C24XX_PA_UART) | 40 | #define S3C2410_PA_UART0 (S3C24XX_PA_UART) |
40 | #define S3C2410_PA_UART1 (S3C24XX_PA_UART + 0x4000 ) | 41 | #define S3C2410_PA_UART1 (S3C24XX_PA_UART + 0x4000 ) |
41 | #define S3C2410_PA_UART2 (S3C24XX_PA_UART + 0x8000 ) | 42 | #define S3C2410_PA_UART2 (S3C24XX_PA_UART + 0x8000 ) |
43 | #define S3C2443_PA_UART3 (S3C24XX_PA_UART + 0xC000 ) | ||
42 | 44 | ||
43 | #define S3C2410_URXH (0x24) | 45 | #define S3C2410_URXH (0x24) |
44 | #define S3C2410_UTXH (0x20) | 46 | #define S3C2410_UTXH (0x20) |
@@ -73,6 +75,8 @@ | |||
73 | #define S3C2440_UCON_UCLK (1<<10) | 75 | #define S3C2440_UCON_UCLK (1<<10) |
74 | #define S3C2440_UCON_PCLK2 (2<<10) | 76 | #define S3C2440_UCON_PCLK2 (2<<10) |
75 | #define S3C2440_UCON_FCLK (3<<10) | 77 | #define S3C2440_UCON_FCLK (3<<10) |
78 | #define S3C2443_UCON_EPLL (3<<10) | ||
79 | |||
76 | #define S3C2440_UCON2_FCLK_EN (1<<15) | 80 | #define S3C2440_UCON2_FCLK_EN (1<<15) |
77 | #define S3C2440_UCON0_DIVMASK (15 << 12) | 81 | #define S3C2440_UCON0_DIVMASK (15 << 12) |
78 | #define S3C2440_UCON1_DIVMASK (15 << 12) | 82 | #define S3C2440_UCON1_DIVMASK (15 << 12) |
@@ -93,6 +97,8 @@ | |||
93 | #define S3C2410_UCON_TXIRQMODE (1<<2) | 97 | #define S3C2410_UCON_TXIRQMODE (1<<2) |
94 | #define S3C2410_UCON_RXIRQMODE (1<<0) | 98 | #define S3C2410_UCON_RXIRQMODE (1<<0) |
95 | #define S3C2410_UCON_RXFIFO_TOI (1<<7) | 99 | #define S3C2410_UCON_RXFIFO_TOI (1<<7) |
100 | #define S3C2443_UCON_RXERR_IRQEN (1<<6) | ||
101 | #define S3C2443_UCON_LOOPBACK (1<<5) | ||
96 | 102 | ||
97 | #define S3C2410_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ | 103 | #define S3C2410_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ |
98 | S3C2410_UCON_RXILEVEL | \ | 104 | S3C2410_UCON_RXILEVEL | \ |
@@ -127,7 +133,7 @@ | |||
127 | #define S3C2410_UMCOM_AFC (1<<4) | 133 | #define S3C2410_UMCOM_AFC (1<<4) |
128 | #define S3C2410_UMCOM_RTS_LOW (1<<0) | 134 | #define S3C2410_UMCOM_RTS_LOW (1<<0) |
129 | 135 | ||
130 | #define S3C2412_UMCON_AFC_63 (0<<5) | 136 | #define S3C2412_UMCON_AFC_63 (0<<5) /* same as s3c2443 */ |
131 | #define S3C2412_UMCON_AFC_56 (1<<5) | 137 | #define S3C2412_UMCON_AFC_56 (1<<5) |
132 | #define S3C2412_UMCON_AFC_48 (2<<5) | 138 | #define S3C2412_UMCON_AFC_48 (2<<5) |
133 | #define S3C2412_UMCON_AFC_40 (3<<5) | 139 | #define S3C2412_UMCON_AFC_40 (3<<5) |
@@ -143,6 +149,7 @@ | |||
143 | #define S3C2410_UFSTAT_RXMASK (15<<0) | 149 | #define S3C2410_UFSTAT_RXMASK (15<<0) |
144 | #define S3C2410_UFSTAT_RXSHIFT (0) | 150 | #define S3C2410_UFSTAT_RXSHIFT (0) |
145 | 151 | ||
152 | /* UFSTAT S3C2443 same as S3C2440 */ | ||
146 | #define S3C2440_UFSTAT_TXFULL (1<<14) | 153 | #define S3C2440_UFSTAT_TXFULL (1<<14) |
147 | #define S3C2440_UFSTAT_RXFULL (1<<6) | 154 | #define S3C2440_UFSTAT_RXFULL (1<<6) |
148 | #define S3C2440_UFSTAT_TXSHIFT (8) | 155 | #define S3C2440_UFSTAT_TXSHIFT (8) |
@@ -157,6 +164,8 @@ | |||
157 | #define S3C2410_UERSTAT_OVERRUN (1<<0) | 164 | #define S3C2410_UERSTAT_OVERRUN (1<<0) |
158 | #define S3C2410_UERSTAT_FRAME (1<<2) | 165 | #define S3C2410_UERSTAT_FRAME (1<<2) |
159 | #define S3C2410_UERSTAT_BREAK (1<<3) | 166 | #define S3C2410_UERSTAT_BREAK (1<<3) |
167 | #define S3C2443_UERSTAT_PARITY (1<<1) | ||
168 | |||
160 | #define S3C2410_UERSTAT_ANY (S3C2410_UERSTAT_OVERRUN | \ | 169 | #define S3C2410_UERSTAT_ANY (S3C2410_UERSTAT_OVERRUN | \ |
161 | S3C2410_UERSTAT_FRAME | \ | 170 | S3C2410_UERSTAT_FRAME | \ |
162 | S3C2410_UERSTAT_BREAK) | 171 | S3C2410_UERSTAT_BREAK) |
@@ -164,6 +173,8 @@ | |||
164 | #define S3C2410_UMSTAT_CTS (1<<0) | 173 | #define S3C2410_UMSTAT_CTS (1<<0) |
165 | #define S3C2410_UMSTAT_DeltaCTS (1<<2) | 174 | #define S3C2410_UMSTAT_DeltaCTS (1<<2) |
166 | 175 | ||
176 | #define S3C2443_DIVSLOT (0x2C) | ||
177 | |||
167 | #ifndef __ASSEMBLY__ | 178 | #ifndef __ASSEMBLY__ |
168 | 179 | ||
169 | /* struct s3c24xx_uart_clksrc | 180 | /* struct s3c24xx_uart_clksrc |
diff --git a/include/asm-arm/arch-s3c2410/reset.h b/include/asm-arm/arch-s3c2410/reset.h new file mode 100644 index 000000000000..4f866cdecab0 --- /dev/null +++ b/include/asm-arm/arch-s3c2410/reset.h | |||
@@ -0,0 +1,22 @@ | |||
1 | /* linux/include/asm-arm/arch-s3c2410/reset.h | ||
2 | * | ||
3 | * Copyright (c) 2007 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | * S3C2410 CPU reset controls | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASM_ARCH_RESET_H | ||
15 | #define __ASM_ARCH_RESET_H __FILE__ | ||
16 | |||
17 | /* This allows the over-ride of the default reset code | ||
18 | */ | ||
19 | |||
20 | extern void (*s3c24xx_reset_hook)(void); | ||
21 | |||
22 | #endif /* __ASM_ARCH_RESET_H */ | ||
diff --git a/include/asm-arm/arch-s3c2410/system.h b/include/asm-arm/arch-s3c2410/system.h index ecf250db45fb..1c74ef17da33 100644 --- a/include/asm-arm/arch-s3c2410/system.h +++ b/include/asm-arm/arch-s3c2410/system.h | |||
@@ -15,15 +15,16 @@ | |||
15 | 15 | ||
16 | #include <asm/arch/map.h> | 16 | #include <asm/arch/map.h> |
17 | #include <asm/arch/idle.h> | 17 | #include <asm/arch/idle.h> |
18 | #include <asm/arch/reset.h> | ||
18 | 19 | ||
19 | #include <asm/arch/regs-watchdog.h> | 20 | #include <asm/arch/regs-watchdog.h> |
20 | #include <asm/arch/regs-clock.h> | 21 | #include <asm/arch/regs-clock.h> |
21 | 22 | ||
22 | void (*s3c24xx_idle)(void); | 23 | void (*s3c24xx_idle)(void); |
24 | void (*s3c24xx_reset_hook)(void); | ||
23 | 25 | ||
24 | void s3c24xx_default_idle(void) | 26 | void s3c24xx_default_idle(void) |
25 | { | 27 | { |
26 | void __iomem *reg = S3C2410_CLKCON; | ||
27 | unsigned long tmp; | 28 | unsigned long tmp; |
28 | int i; | 29 | int i; |
29 | 30 | ||
@@ -33,16 +34,18 @@ void s3c24xx_default_idle(void) | |||
33 | 34 | ||
34 | /* Warning: going into idle state upsets jtag scanning */ | 35 | /* Warning: going into idle state upsets jtag scanning */ |
35 | 36 | ||
36 | __raw_writel(__raw_readl(reg) | (1<<2), reg); | 37 | __raw_writel(__raw_readl(S3C2410_CLKCON) | S3C2410_CLKCON_IDLE, |
38 | S3C2410_CLKCON); | ||
37 | 39 | ||
38 | /* the samsung port seems to do a loop and then unset idle.. */ | 40 | /* the samsung port seems to do a loop and then unset idle.. */ |
39 | for (i = 0; i < 50; i++) { | 41 | for (i = 0; i < 50; i++) { |
40 | tmp += __raw_readl(reg); /* ensure loop not optimised out */ | 42 | tmp += __raw_readl(S3C2410_CLKCON); /* ensure loop not optimised out */ |
41 | } | 43 | } |
42 | 44 | ||
43 | /* this bit is not cleared on re-start... */ | 45 | /* this bit is not cleared on re-start... */ |
44 | 46 | ||
45 | __raw_writel(__raw_readl(reg) & ~(1<<2), reg); | 47 | __raw_writel(__raw_readl(S3C2410_CLKCON) & ~S3C2410_CLKCON_IDLE, |
48 | S3C2410_CLKCON); | ||
46 | } | 49 | } |
47 | 50 | ||
48 | static void arch_idle(void) | 51 | static void arch_idle(void) |
@@ -53,7 +56,6 @@ static void arch_idle(void) | |||
53 | s3c24xx_default_idle(); | 56 | s3c24xx_default_idle(); |
54 | } | 57 | } |
55 | 58 | ||
56 | |||
57 | static void | 59 | static void |
58 | arch_reset(char mode) | 60 | arch_reset(char mode) |
59 | { | 61 | { |
@@ -61,6 +63,9 @@ arch_reset(char mode) | |||
61 | cpu_reset(0); | 63 | cpu_reset(0); |
62 | } | 64 | } |
63 | 65 | ||
66 | if (s3c24xx_reset_hook) | ||
67 | s3c24xx_reset_hook(); | ||
68 | |||
64 | printk("arch_reset: attempting watchdog reset\n"); | 69 | printk("arch_reset: attempting watchdog reset\n"); |
65 | 70 | ||
66 | __raw_writel(0, S3C2410_WTCON); /* disable watchdog, to be safe */ | 71 | __raw_writel(0, S3C2410_WTCON); /* disable watchdog, to be safe */ |
diff --git a/include/asm-arm/arch-s3c2410/udc.h b/include/asm-arm/arch-s3c2410/udc.h new file mode 100644 index 000000000000..e59ec339d614 --- /dev/null +++ b/include/asm-arm/arch-s3c2410/udc.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* linux/include/asm/arch-s3c2410/udc.h | ||
2 | * | ||
3 | * Copyright (c) 2005 Arnaud Patard <arnaud.patard@rtp-net.org> | ||
4 | * | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | * | ||
11 | * Changelog: | ||
12 | * 14-Mar-2005 RTP Created file | ||
13 | * 02-Aug-2005 RTP File rename | ||
14 | * 07-Sep-2005 BJD Minor cleanups, changed cmd to enum | ||
15 | * 18-Jan-2007 HMW Add per-platform vbus_draw function | ||
16 | */ | ||
17 | |||
18 | #ifndef __ASM_ARM_ARCH_UDC_H | ||
19 | #define __ASM_ARM_ARCH_UDC_H | ||
20 | |||
21 | enum s3c2410_udc_cmd_e { | ||
22 | S3C2410_UDC_P_ENABLE = 1, /* Pull-up enable */ | ||
23 | S3C2410_UDC_P_DISABLE = 2, /* Pull-up disable */ | ||
24 | S3C2410_UDC_P_RESET = 3, /* UDC reset, in case of */ | ||
25 | }; | ||
26 | |||
27 | struct s3c2410_udc_mach_info { | ||
28 | void (*udc_command)(enum s3c2410_udc_cmd_e); | ||
29 | void (*vbus_draw)(unsigned int ma); | ||
30 | unsigned int vbus_pin; | ||
31 | unsigned char vbus_pin_inverted; | ||
32 | }; | ||
33 | |||
34 | extern void __init s3c24xx_udc_set_platdata(struct s3c2410_udc_mach_info *); | ||
35 | |||
36 | #endif /* __ASM_ARM_ARCH_UDC_H */ | ||