diff options
Diffstat (limited to 'include/asm-arm')
129 files changed, 2479 insertions, 1069 deletions
diff --git a/include/asm-arm/arch-aaec2000/param.h b/include/asm-arm/arch-aaec2000/param.h deleted file mode 100644 index 139936c2faf2..000000000000 --- a/include/asm-arm/arch-aaec2000/param.h +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-aaec2000/param.h | ||
3 | * | ||
4 | * Copyright (c) 2005 Nicolas Bellido Y Ortega | ||
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 | #ifndef __ASM_ARCH_PARAM_H | ||
12 | #define __ASM_ARCH_PARAM_H | ||
13 | |||
14 | #endif /* __ASM_ARCH_PARAM_H */ | ||
15 | |||
diff --git a/include/asm-arm/arch-aaec2000/uncompress.h b/include/asm-arm/arch-aaec2000/uncompress.h index fff0c94b75c4..300f4bf3bc74 100644 --- a/include/asm-arm/arch-aaec2000/uncompress.h +++ b/include/asm-arm/arch-aaec2000/uncompress.h | |||
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | #define UART(x) (*(volatile unsigned long *)(serial_port + (x))) | 16 | #define UART(x) (*(volatile unsigned long *)(serial_port + (x))) |
17 | 17 | ||
18 | static void putstr( const char *s ) | 18 | static void putc(int c) |
19 | { | 19 | { |
20 | unsigned long serial_port; | 20 | unsigned long serial_port; |
21 | do { | 21 | do { |
@@ -28,17 +28,16 @@ static void putstr( const char *s ) | |||
28 | return; | 28 | return; |
29 | } while (0); | 29 | } while (0); |
30 | 30 | ||
31 | for (; *s; s++) { | 31 | /* wait for space in the UART's transmitter */ |
32 | /* wait for space in the UART's transmitter */ | 32 | while ((UART(UART_SR) & UART_SR_TxFF)) |
33 | while ((UART(UART_SR) & UART_SR_TxFF)); | 33 | barrier(); |
34 | /* send the character out. */ | 34 | |
35 | UART(UART_DR) = *s; | 35 | /* send the character out. */ |
36 | /* if a LF, also do CR... */ | 36 | UART(UART_DR) = c; |
37 | if (*s == 10) { | 37 | } |
38 | while ((UART(UART_SR) & UART_SR_TxFF)); | 38 | |
39 | UART(UART_DR) = 13; | 39 | static inline void flush(void) |
40 | } | 40 | { |
41 | } | ||
42 | } | 41 | } |
43 | 42 | ||
44 | #define arch_decomp_setup() | 43 | #define arch_decomp_setup() |
diff --git a/include/asm-arm/arch-at91rm9200/at91rm9200_emac.h b/include/asm-arm/arch-at91rm9200/at91rm9200_emac.h new file mode 100644 index 000000000000..fbc091e61e2f --- /dev/null +++ b/include/asm-arm/arch-at91rm9200/at91rm9200_emac.h | |||
@@ -0,0 +1,138 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91rm9200/at91rm9200_emac.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Ivan Kokshaysky | ||
5 | * Copyright (C) SAN People | ||
6 | * | ||
7 | * Ethernet MAC registers. | ||
8 | * Based on AT91RM9200 datasheet revision E. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or | ||
13 | * (at your option) any later version. | ||
14 | */ | ||
15 | |||
16 | #ifndef AT91RM9200_EMAC_H | ||
17 | #define AT91RM9200_EMAC_H | ||
18 | |||
19 | #define AT91_EMAC_CTL 0x00 /* Control Register */ | ||
20 | #define AT91_EMAC_LB (1 << 0) /* Loopback */ | ||
21 | #define AT91_EMAC_LBL (1 << 1) /* Loopback Local */ | ||
22 | #define AT91_EMAC_RE (1 << 2) /* Receive Enable */ | ||
23 | #define AT91_EMAC_TE (1 << 3) /* Transmit Enable */ | ||
24 | #define AT91_EMAC_MPE (1 << 4) /* Management Port Enable */ | ||
25 | #define AT91_EMAC_CSR (1 << 5) /* Clear Statistics Registers */ | ||
26 | #define AT91_EMAC_INCSTAT (1 << 6) /* Increment Statistics Registers */ | ||
27 | #define AT91_EMAC_WES (1 << 7) /* Write Enable for Statistics Registers */ | ||
28 | #define AT91_EMAC_BP (1 << 8) /* Back Pressure */ | ||
29 | |||
30 | #define AT91_EMAC_CFG 0x04 /* Configuration Register */ | ||
31 | #define AT91_EMAC_SPD (1 << 0) /* Speed */ | ||
32 | #define AT91_EMAC_FD (1 << 1) /* Full Duplex */ | ||
33 | #define AT91_EMAC_BR (1 << 2) /* Bit Rate */ | ||
34 | #define AT91_EMAC_CAF (1 << 4) /* Copy All Frames */ | ||
35 | #define AT91_EMAC_NBC (1 << 5) /* No Broadcast */ | ||
36 | #define AT91_EMAC_MTI (1 << 6) /* Multicast Hash Enable */ | ||
37 | #define AT91_EMAC_UNI (1 << 7) /* Unicast Hash Enable */ | ||
38 | #define AT91_EMAC_BIG (1 << 8) /* Receive 1522 Bytes */ | ||
39 | #define AT91_EMAC_EAE (1 << 9) /* External Address Match Enable */ | ||
40 | #define AT91_EMAC_CLK (3 << 10) /* MDC Clock Divisor */ | ||
41 | #define AT91_EMAC_CLK_DIV8 (0 << 10) | ||
42 | #define AT91_EMAC_CLK_DIV16 (1 << 10) | ||
43 | #define AT91_EMAC_CLK_DIV32 (2 << 10) | ||
44 | #define AT91_EMAC_CLK_DIV64 (3 << 10) | ||
45 | #define AT91_EMAC_RTY (1 << 12) /* Retry Test */ | ||
46 | #define AT91_EMAC_RMII (1 << 13) /* Reduce MII (RMII) */ | ||
47 | |||
48 | #define AT91_EMAC_SR 0x08 /* Status Register */ | ||
49 | #define AT91_EMAC_SR_LINK (1 << 0) /* Link */ | ||
50 | #define AT91_EMAC_SR_MDIO (1 << 1) /* MDIO pin */ | ||
51 | #define AT91_EMAC_SR_IDLE (1 << 2) /* PHY idle */ | ||
52 | |||
53 | #define AT91_EMAC_TAR 0x0c /* Transmit Address Register */ | ||
54 | |||
55 | #define AT91_EMAC_TCR 0x10 /* Transmit Control Register */ | ||
56 | #define AT91_EMAC_LEN (0x7ff << 0) /* Transmit Frame Length */ | ||
57 | #define AT91_EMAC_NCRC (1 << 15) /* No CRC */ | ||
58 | |||
59 | #define AT91_EMAC_TSR 0x14 /* Transmit Status Register */ | ||
60 | #define AT91_EMAC_TSR_OVR (1 << 0) /* Transmit Buffer Overrun */ | ||
61 | #define AT91_EMAC_TSR_COL (1 << 1) /* Collision Occurred */ | ||
62 | #define AT91_EMAC_TSR_RLE (1 << 2) /* Retry Limit Exceeded */ | ||
63 | #define AT91_EMAC_TSR_IDLE (1 << 3) /* Transmitter Idle */ | ||
64 | #define AT91_EMAC_TSR_BNQ (1 << 4) /* Transmit Buffer not Queued */ | ||
65 | #define AT91_EMAC_TSR_COMP (1 << 5) /* Transmit Complete */ | ||
66 | #define AT91_EMAC_TSR_UND (1 << 6) /* Transmit Underrun */ | ||
67 | |||
68 | #define AT91_EMAC_RBQP 0x18 /* Receive Buffer Queue Pointer */ | ||
69 | |||
70 | #define AT91_EMAC_RSR 0x20 /* Receive Status Register */ | ||
71 | #define AT91_EMAC_RSR_BNA (1 << 0) /* Buffer Not Available */ | ||
72 | #define AT91_EMAC_RSR_REC (1 << 1) /* Frame Received */ | ||
73 | #define AT91_EMAC_RSR_OVR (1 << 2) /* RX Overrun */ | ||
74 | |||
75 | #define AT91_EMAC_ISR 0x24 /* Interrupt Status Register */ | ||
76 | #define AT91_EMAC_DONE (1 << 0) /* Management Done */ | ||
77 | #define AT91_EMAC_RCOM (1 << 1) /* Receive Complete */ | ||
78 | #define AT91_EMAC_RBNA (1 << 2) /* Receive Buffer Not Available */ | ||
79 | #define AT91_EMAC_TOVR (1 << 3) /* Transmit Buffer Overrun */ | ||
80 | #define AT91_EMAC_TUND (1 << 4) /* Transmit Buffer Underrun */ | ||
81 | #define AT91_EMAC_RTRY (1 << 5) /* Retry Limit */ | ||
82 | #define AT91_EMAC_TBRE (1 << 6) /* Transmit Buffer Register Empty */ | ||
83 | #define AT91_EMAC_TCOM (1 << 7) /* Transmit Complete */ | ||
84 | #define AT91_EMAC_TIDLE (1 << 8) /* Transmit Idle */ | ||
85 | #define AT91_EMAC_LINK (1 << 9) /* Link */ | ||
86 | #define AT91_EMAC_ROVR (1 << 10) /* RX Overrun */ | ||
87 | #define AT91_EMAC_ABT (1 << 11) /* Abort */ | ||
88 | |||
89 | #define AT91_EMAC_IER 0x28 /* Interrupt Enable Register */ | ||
90 | #define AT91_EMAC_IDR 0x2c /* Interrupt Disable Register */ | ||
91 | #define AT91_EMAC_IMR 0x30 /* Interrupt Mask Register */ | ||
92 | |||
93 | #define AT91_EMAC_MAN 0x34 /* PHY Maintenance Register */ | ||
94 | #define AT91_EMAC_DATA (0xffff << 0) /* MDIO Data */ | ||
95 | #define AT91_EMAC_REGA (0x1f << 18) /* MDIO Register */ | ||
96 | #define AT91_EMAC_PHYA (0x1f << 23) /* MDIO PHY Address */ | ||
97 | #define AT91_EMAC_RW (3 << 28) /* Read/Write operation */ | ||
98 | #define AT91_EMAC_RW_W (1 << 28) | ||
99 | #define AT91_EMAC_RW_R (2 << 28) | ||
100 | #define AT91_EMAC_MAN_802_3 0x40020000 /* IEEE 802.3 value */ | ||
101 | |||
102 | /* | ||
103 | * Statistics Registers. | ||
104 | */ | ||
105 | #define AT91_EMAC_FRA 0x40 /* Frames Transmitted OK */ | ||
106 | #define AT91_EMAC_SCOL 0x44 /* Single Collision Frame */ | ||
107 | #define AT91_EMAC_MCOL 0x48 /* Multiple Collision Frame */ | ||
108 | #define AT91_EMAC_OK 0x4c /* Frames Received OK */ | ||
109 | #define AT91_EMAC_SEQE 0x50 /* Frame Check Sequence Error */ | ||
110 | #define AT91_EMAC_ALE 0x54 /* Alignmemt Error */ | ||
111 | #define AT91_EMAC_DTE 0x58 /* Deffered Transmission Frame */ | ||
112 | #define AT91_EMAC_LCOL 0x5c /* Late Collision */ | ||
113 | #define AT91_EMAC_ECOL 0x60 /* Excessive Collision */ | ||
114 | #define AT91_EMAC_TUE 0x64 /* Transmit Underrun Error */ | ||
115 | #define AT91_EMAC_CSE 0x68 /* Carrier Sense Error */ | ||
116 | #define AT91_EMAC_DRFC 0x6c /* Discard RX Frame */ | ||
117 | #define AT91_EMAC_ROV 0x70 /* Receive Overrun */ | ||
118 | #define AT91_EMAC_CDE 0x74 /* Code Error */ | ||
119 | #define AT91_EMAC_ELR 0x78 /* Excessive Length Error */ | ||
120 | #define AT91_EMAC_RJB 0x7c /* Receive Jabber */ | ||
121 | #define AT91_EMAC_USF 0x80 /* Undersize Frame */ | ||
122 | #define AT91_EMAC_SQEE 0x84 /* SQE Test Error */ | ||
123 | |||
124 | /* | ||
125 | * Address Registers. | ||
126 | */ | ||
127 | #define AT91_EMAC_HSL 0x90 /* Hash Address Low [31:0] */ | ||
128 | #define AT91_EMAC_HSH 0x94 /* Hash Address High [63:32] */ | ||
129 | #define AT91_EMAC_SA1L 0x98 /* Specific Address 1 Low, bytes 0-3 */ | ||
130 | #define AT91_EMAC_SA1H 0x9c /* Specific Address 1 High, bytes 4-5 */ | ||
131 | #define AT91_EMAC_SA2L 0xa0 /* Specific Address 2 Low, bytes 0-3 */ | ||
132 | #define AT91_EMAC_SA2H 0xa4 /* Specific Address 2 High, bytes 4-5 */ | ||
133 | #define AT91_EMAC_SA3L 0xa8 /* Specific Address 3 Low, bytes 0-3 */ | ||
134 | #define AT91_EMAC_SA3H 0xac /* Specific Address 3 High, bytes 4-5 */ | ||
135 | #define AT91_EMAC_SA4L 0xb0 /* Specific Address 4 Low, bytes 0-3 */ | ||
136 | #define AT91_EMAC_SA4H 0xb4 /* Specific Address 4 High, bytes 4-5 */ | ||
137 | |||
138 | #endif | ||
diff --git a/include/asm-arm/arch-at91rm9200/at91rm9200_sys.h b/include/asm-arm/arch-at91rm9200/at91rm9200_sys.h index 9bfffdbf1e0b..2910d359f919 100644 --- a/include/asm-arm/arch-at91rm9200/at91rm9200_sys.h +++ b/include/asm-arm/arch-at91rm9200/at91rm9200_sys.h | |||
@@ -172,6 +172,7 @@ | |||
172 | #define AT91_PMC_MDIV_4 (3 << 8) | 172 | #define AT91_PMC_MDIV_4 (3 << 8) |
173 | 173 | ||
174 | #define AT91_PMC_PCKR(n) (AT91_PMC + 0x40 + ((n) * 4)) /* Programmable Clock 0-3 Registers */ | 174 | #define AT91_PMC_PCKR(n) (AT91_PMC + 0x40 + ((n) * 4)) /* Programmable Clock 0-3 Registers */ |
175 | |||
175 | #define AT91_PMC_IER (AT91_PMC + 0x60) /* Interrupt Enable Register */ | 176 | #define AT91_PMC_IER (AT91_PMC + 0x60) /* Interrupt Enable Register */ |
176 | #define AT91_PMC_IDR (AT91_PMC + 0x64) /* Interrupt Disable Register */ | 177 | #define AT91_PMC_IDR (AT91_PMC + 0x64) /* Interrupt Disable Register */ |
177 | #define AT91_PMC_SR (AT91_PMC + 0x68) /* Status Register */ | 178 | #define AT91_PMC_SR (AT91_PMC + 0x68) /* Status Register */ |
@@ -286,8 +287,32 @@ | |||
286 | #define AT91_MC_RCB (1 << 0) /* Remap Command Bit */ | 287 | #define AT91_MC_RCB (1 << 0) /* Remap Command Bit */ |
287 | 288 | ||
288 | #define AT91_MC_ASR (AT91_MC + 0x04) /* MC Abort Status Register */ | 289 | #define AT91_MC_ASR (AT91_MC + 0x04) /* MC Abort Status Register */ |
290 | #define AT91_MC_UNADD (1 << 0) /* Undefined Address Abort Status */ | ||
291 | #define AT91_MC_MISADD (1 << 1) /* Misaligned Address Abort Status */ | ||
292 | #define AT91_MC_ABTSZ (3 << 8) /* Abort Size Status */ | ||
293 | #define AT91_MC_ABTSZ_BYTE (0 << 8) | ||
294 | #define AT91_MC_ABTSZ_HALFWORD (1 << 8) | ||
295 | #define AT91_MC_ABTSZ_WORD (2 << 8) | ||
296 | #define AT91_MC_ABTTYP (3 << 10) /* Abort Type Status */ | ||
297 | #define AT91_MC_ABTTYP_DATAREAD (0 << 10) | ||
298 | #define AT91_MC_ABTTYP_DATAWRITE (1 << 10) | ||
299 | #define AT91_MC_ABTTYP_FETCH (2 << 10) | ||
300 | #define AT91_MC_MST0 (1 << 16) /* ARM920T Abort Source */ | ||
301 | #define AT91_MC_MST1 (1 << 17) /* PDC Abort Source */ | ||
302 | #define AT91_MC_MST2 (1 << 18) /* UHP Abort Source */ | ||
303 | #define AT91_MC_MST3 (1 << 19) /* EMAC Abort Source */ | ||
304 | #define AT91_MC_SVMST0 (1 << 24) /* Saved ARM920T Abort Source */ | ||
305 | #define AT91_MC_SVMST1 (1 << 25) /* Saved PDC Abort Source */ | ||
306 | #define AT91_MC_SVMST2 (1 << 26) /* Saved UHP Abort Source */ | ||
307 | #define AT91_MC_SVMST3 (1 << 27) /* Saved EMAC Abort Source */ | ||
308 | |||
289 | #define AT91_MC_AASR (AT91_MC + 0x08) /* MC Abort Address Status Register */ | 309 | #define AT91_MC_AASR (AT91_MC + 0x08) /* MC Abort Address Status Register */ |
310 | |||
290 | #define AT91_MC_MPR (AT91_MC + 0x0c) /* MC Master Priority Register */ | 311 | #define AT91_MC_MPR (AT91_MC + 0x0c) /* MC Master Priority Register */ |
312 | #define AT91_MPR_MSTP0 (7 << 0) /* ARM920T Priority */ | ||
313 | #define AT91_MPR_MSTP1 (7 << 4) /* PDC Priority */ | ||
314 | #define AT91_MPR_MSTP2 (7 << 8) /* UHP Priority */ | ||
315 | #define AT91_MPR_MSTP3 (7 << 12) /* EMAC Priority */ | ||
291 | 316 | ||
292 | /* External Bus Interface (EBI) registers */ | 317 | /* External Bus Interface (EBI) registers */ |
293 | #define AT91_EBI_CSA (AT91_MC + 0x60) /* Chip Select Assignment Register */ | 318 | #define AT91_EBI_CSA (AT91_MC + 0x60) /* Chip Select Assignment Register */ |
@@ -309,8 +334,10 @@ | |||
309 | /* Static Memory Controller (SMC) registers */ | 334 | /* Static Memory Controller (SMC) registers */ |
310 | #define AT91_SMC_CSR(n) (AT91_MC + 0x70 + ((n) * 4))/* SMC Chip Select Register */ | 335 | #define AT91_SMC_CSR(n) (AT91_MC + 0x70 + ((n) * 4))/* SMC Chip Select Register */ |
311 | #define AT91_SMC_NWS (0x7f << 0) /* Number of Wait States */ | 336 | #define AT91_SMC_NWS (0x7f << 0) /* Number of Wait States */ |
337 | #define AT91_SMC_NWS_(x) ((x) << 0) | ||
312 | #define AT91_SMC_WSEN (1 << 7) /* Wait State Enable */ | 338 | #define AT91_SMC_WSEN (1 << 7) /* Wait State Enable */ |
313 | #define AT91_SMC_TDF (0xf << 8) /* Data Float Time */ | 339 | #define AT91_SMC_TDF (0xf << 8) /* Data Float Time */ |
340 | #define AT91_SMC_TDF_(x) ((x) << 8) | ||
314 | #define AT91_SMC_BAT (1 << 12) /* Byte Access Type */ | 341 | #define AT91_SMC_BAT (1 << 12) /* Byte Access Type */ |
315 | #define AT91_SMC_DBW (3 << 13) /* Data Bus Width */ | 342 | #define AT91_SMC_DBW (3 << 13) /* Data Bus Width */ |
316 | #define AT91_SMC_DBW_16 (1 << 13) | 343 | #define AT91_SMC_DBW_16 (1 << 13) |
@@ -322,7 +349,78 @@ | |||
322 | #define AT91_SMC_ACSS_2 (2 << 16) | 349 | #define AT91_SMC_ACSS_2 (2 << 16) |
323 | #define AT91_SMC_ACSS_3 (3 << 16) | 350 | #define AT91_SMC_ACSS_3 (3 << 16) |
324 | #define AT91_SMC_RWSETUP (7 << 24) /* Read & Write Signal Time Setup */ | 351 | #define AT91_SMC_RWSETUP (7 << 24) /* Read & Write Signal Time Setup */ |
352 | #define AT91_SMC_RWSETUP_(x) ((x) << 24) | ||
325 | #define AT91_SMC_RWHOLD (7 << 28) /* Read & Write Signal Hold Time */ | 353 | #define AT91_SMC_RWHOLD (7 << 28) /* Read & Write Signal Hold Time */ |
326 | 354 | #define AT91_SMC_RWHOLD_(x) ((x) << 28) | |
355 | |||
356 | /* SDRAM Controller registers */ | ||
357 | #define AT91_SDRAMC_MR (AT91_MC + 0x90) /* Mode Register */ | ||
358 | #define AT91_SDRAMC_MODE (0xf << 0) /* Command Mode */ | ||
359 | #define AT91_SDRAMC_MODE_NORMAL (0 << 0) | ||
360 | #define AT91_SDRAMC_MODE_NOP (1 << 0) | ||
361 | #define AT91_SDRAMC_MODE_PRECHARGE (2 << 0) | ||
362 | #define AT91_SDRAMC_MODE_LMR (3 << 0) | ||
363 | #define AT91_SDRAMC_MODE_REFRESH (4 << 0) | ||
364 | #define AT91_SDRAMC_DBW (1 << 4) /* Data Bus Width */ | ||
365 | #define AT91_SDRAMC_DBW_32 (0 << 4) | ||
366 | #define AT91_SDRAMC_DBW_16 (1 << 4) | ||
367 | |||
368 | #define AT91_SDRAMC_TR (AT91_MC + 0x94) /* Refresh Timer Register */ | ||
369 | #define AT91_SDRAMC_COUNT (0xfff << 0) /* Refresh Timer Count */ | ||
370 | |||
371 | #define AT91_SDRAMC_CR (AT91_MC + 0x98) /* Configuration Register */ | ||
372 | #define AT91_SDRAMC_NC (3 << 0) /* Number of Column Bits */ | ||
373 | #define AT91_SDRAMC_NC_8 (0 << 0) | ||
374 | #define AT91_SDRAMC_NC_9 (1 << 0) | ||
375 | #define AT91_SDRAMC_NC_10 (2 << 0) | ||
376 | #define AT91_SDRAMC_NC_11 (3 << 0) | ||
377 | #define AT91_SDRAMC_NR (3 << 2) /* Number of Row Bits */ | ||
378 | #define AT91_SDRAMC_NR_11 (0 << 2) | ||
379 | #define AT91_SDRAMC_NR_12 (1 << 2) | ||
380 | #define AT91_SDRAMC_NR_13 (2 << 2) | ||
381 | #define AT91_SDRAMC_NB (1 << 4) /* Number of Banks */ | ||
382 | #define AT91_SDRAMC_NB_2 (0 << 4) | ||
383 | #define AT91_SDRAMC_NB_4 (1 << 4) | ||
384 | #define AT91_SDRAMC_CAS (3 << 5) /* CAS Latency */ | ||
385 | #define AT91_SDRAMC_CAS_2 (2 << 5) | ||
386 | #define AT91_SDRAMC_TWR (0xf << 7) /* Write Recovery Delay */ | ||
387 | #define AT91_SDRAMC_TRC (0xf << 11) /* Row Cycle Delay */ | ||
388 | #define AT91_SDRAMC_TRP (0xf << 15) /* Row Precharge Delay */ | ||
389 | #define AT91_SDRAMC_TRCD (0xf << 19) /* Row to Column Delay */ | ||
390 | #define AT91_SDRAMC_TRAS (0xf << 23) /* Active to Precharge Delay */ | ||
391 | #define AT91_SDRAMC_TXSR (0xf << 27) /* Exit Self Refresh to Active Delay */ | ||
392 | |||
393 | #define AT91_SDRAMC_SRR (AT91_MC + 0x9c) /* Self Refresh Register */ | ||
394 | #define AT91_SDRAMC_LPR (AT91_MC + 0xa0) /* Low Power Register */ | ||
395 | #define AT91_SDRAMC_IER (AT91_MC + 0xa4) /* Interrupt Enable Register */ | ||
396 | #define AT91_SDRAMC_IDR (AT91_MC + 0xa8) /* Interrupt Disable Register */ | ||
397 | #define AT91_SDRAMC_IMR (AT91_MC + 0xac) /* Interrupt Mask Register */ | ||
398 | #define AT91_SDRAMC_ISR (AT91_MC + 0xb0) /* Interrupt Status Register */ | ||
399 | |||
400 | /* Burst Flash Controller register */ | ||
401 | #define AT91_BFC_MR (AT91_MC + 0xc0) /* Mode Register */ | ||
402 | #define AT91_BFC_BFCOM (3 << 0) /* Burst Flash Controller Operating Mode */ | ||
403 | #define AT91_BFC_BFCOM_DISABLED (0 << 0) | ||
404 | #define AT91_BFC_BFCOM_ASYNC (1 << 0) | ||
405 | #define AT91_BFC_BFCOM_BURST (2 << 0) | ||
406 | #define AT91_BFC_BFCC (3 << 2) /* Burst Flash Controller Clock */ | ||
407 | #define AT91_BFC_BFCC_MCK (1 << 2) | ||
408 | #define AT91_BFC_BFCC_DIV2 (2 << 2) | ||
409 | #define AT91_BFC_BFCC_DIV4 (3 << 2) | ||
410 | #define AT91_BFC_AVL (0xf << 4) /* Address Valid Latency */ | ||
411 | #define AT91_BFC_PAGES (7 << 8) /* Page Size */ | ||
412 | #define AT91_BFC_PAGES_NO_PAGE (0 << 8) | ||
413 | #define AT91_BFC_PAGES_16 (1 << 8) | ||
414 | #define AT91_BFC_PAGES_32 (2 << 8) | ||
415 | #define AT91_BFC_PAGES_64 (3 << 8) | ||
416 | #define AT91_BFC_PAGES_128 (4 << 8) | ||
417 | #define AT91_BFC_PAGES_256 (5 << 8) | ||
418 | #define AT91_BFC_PAGES_512 (6 << 8) | ||
419 | #define AT91_BFC_PAGES_1024 (7 << 8) | ||
420 | #define AT91_BFC_OEL (3 << 12) /* Output Enable Latency */ | ||
421 | #define AT91_BFC_BAAEN (1 << 16) /* Burst Address Advance Enable */ | ||
422 | #define AT91_BFC_BFOEH (1 << 17) /* Burst Flash Output Enable Handling */ | ||
423 | #define AT91_BFC_MUXEN (1 << 18) /* Multiplexed Bus Enable */ | ||
424 | #define AT91_BFC_RDYEN (1 << 19) /* Ready Enable Mode */ | ||
327 | 425 | ||
328 | #endif | 426 | #endif |
diff --git a/include/asm-arm/arch-at91rm9200/param.h b/include/asm-arm/arch-at91rm9200/param.h deleted file mode 100644 index 9480f8446852..000000000000 --- a/include/asm-arm/arch-at91rm9200/param.h +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91rm9200/param.h | ||
3 | * | ||
4 | * Copyright (C) 2003 SAN People | ||
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 as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | |||
21 | #ifndef __ASM_ARCH_PARAM_H | ||
22 | #define __ASM_ARCH_PARAM_H | ||
23 | |||
24 | /* | ||
25 | * We use default params | ||
26 | */ | ||
27 | |||
28 | #endif | ||
diff --git a/include/asm-arm/arch-at91rm9200/uncompress.h b/include/asm-arm/arch-at91rm9200/uncompress.h index b30dd5520713..7b38497c24b5 100644 --- a/include/asm-arm/arch-at91rm9200/uncompress.h +++ b/include/asm-arm/arch-at91rm9200/uncompress.h | |||
@@ -31,21 +31,22 @@ | |||
31 | * | 31 | * |
32 | * This does not append a newline | 32 | * This does not append a newline |
33 | */ | 33 | */ |
34 | static void putstr(const char *s) | 34 | static void putc(int c) |
35 | { | ||
36 | void __iomem *sys = (void __iomem *) AT91_BASE_SYS; /* physical address */ | ||
37 | |||
38 | while (!(__raw_readl(sys + AT91_DBGU_SR) & AT91_DBGU_TXRDY)) | ||
39 | barrier(); | ||
40 | __raw_writel(c, sys + AT91_DBGU_THR); | ||
41 | } | ||
42 | |||
43 | static inline void flush(void) | ||
35 | { | 44 | { |
36 | void __iomem *sys = (void __iomem *) AT91_BASE_SYS; /* physical address */ | 45 | void __iomem *sys = (void __iomem *) AT91_BASE_SYS; /* physical address */ |
37 | 46 | ||
38 | while (*s) { | ||
39 | while (!(__raw_readl(sys + AT91_DBGU_SR) & AT91_DBGU_TXRDY)) { barrier(); } | ||
40 | __raw_writel(*s, sys + AT91_DBGU_THR); | ||
41 | if (*s == '\n') { | ||
42 | while (!(__raw_readl(sys + AT91_DBGU_SR) & AT91_DBGU_TXRDY)) { barrier(); } | ||
43 | __raw_writel('\r', sys + AT91_DBGU_THR); | ||
44 | } | ||
45 | s++; | ||
46 | } | ||
47 | /* wait for transmission to complete */ | 47 | /* wait for transmission to complete */ |
48 | while (!(__raw_readl(sys + AT91_DBGU_SR) & AT91_DBGU_TXEMPTY)) { barrier(); } | 48 | while (!(__raw_readl(sys + AT91_DBGU_SR) & AT91_DBGU_TXEMPTY)) |
49 | barrier(); | ||
49 | } | 50 | } |
50 | 51 | ||
51 | #define arch_decomp_setup() | 52 | #define arch_decomp_setup() |
diff --git a/include/asm-arm/arch-cl7500/debug-macro.S b/include/asm-arm/arch-cl7500/debug-macro.S index a5d489d7955a..9a2b67d24098 100644 --- a/include/asm-arm/arch-cl7500/debug-macro.S +++ b/include/asm-arm/arch-cl7500/debug-macro.S | |||
@@ -17,15 +17,5 @@ | |||
17 | orr \rx, \rx, #0x00000be0 | 17 | orr \rx, \rx, #0x00000be0 |
18 | .endm | 18 | .endm |
19 | 19 | ||
20 | .macro senduart,rd,rx | 20 | #define UART_SHIFT 2 |
21 | strb \rd, [\rx] | 21 | #include <asm/hardware/debug-8250.S> |
22 | .endm | ||
23 | |||
24 | .macro busyuart,rd,rx | ||
25 | .endm | ||
26 | |||
27 | .macro waituart,rd,rx | ||
28 | 1001: ldrb \rd, [\rx, #0x14] | ||
29 | tst \rd, #0x20 | ||
30 | beq 1001b | ||
31 | .endm | ||
diff --git a/include/asm-arm/arch-cl7500/param.h b/include/asm-arm/arch-cl7500/param.h deleted file mode 100644 index 974bf69fbb1a..000000000000 --- a/include/asm-arm/arch-cl7500/param.h +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-cl7500/param.h | ||
3 | * | ||
4 | * Copyright (C) 1999 Nexus Electronics Ltd | ||
5 | */ | ||
diff --git a/include/asm-arm/arch-cl7500/uncompress.h b/include/asm-arm/arch-cl7500/uncompress.h index 68601b3e3b95..c437e0c88c3f 100644 --- a/include/asm-arm/arch-cl7500/uncompress.h +++ b/include/asm-arm/arch-cl7500/uncompress.h | |||
@@ -3,27 +3,19 @@ | |||
3 | * | 3 | * |
4 | * Copyright (C) 1999, 2000 Nexus Electronics Ltd. | 4 | * Copyright (C) 1999, 2000 Nexus Electronics Ltd. |
5 | */ | 5 | */ |
6 | |||
7 | #define BASE 0x03010000 | 6 | #define BASE 0x03010000 |
8 | #define SERBASE (BASE + (0x2f8 << 2)) | 7 | #define SERBASE (BASE + (0x2f8 << 2)) |
9 | 8 | ||
10 | static __inline__ void putc(char c) | 9 | static inline void putc(char c) |
11 | { | 10 | { |
12 | while (!(*((volatile unsigned int *)(SERBASE + 0x14)) & 0x20)); | 11 | while (!(*((volatile unsigned int *)(SERBASE + 0x14)) & 0x20)) |
12 | barrier(); | ||
13 | |||
13 | *((volatile unsigned int *)(SERBASE)) = c; | 14 | *((volatile unsigned int *)(SERBASE)) = c; |
14 | } | 15 | } |
15 | 16 | ||
16 | /* | 17 | static inline void flush(void) |
17 | * This does not append a newline | ||
18 | */ | ||
19 | static void putstr(const char *s) | ||
20 | { | 18 | { |
21 | while (*s) { | ||
22 | putc(*s); | ||
23 | if (*s == '\n') | ||
24 | putc('\r'); | ||
25 | s++; | ||
26 | } | ||
27 | } | 19 | } |
28 | 20 | ||
29 | static __inline__ void arch_decomp_setup(void) | 21 | static __inline__ void arch_decomp_setup(void) |
diff --git a/include/asm-arm/arch-clps711x/param.h b/include/asm-arm/arch-clps711x/param.h deleted file mode 100644 index 86f6bd29623d..000000000000 --- a/include/asm-arm/arch-clps711x/param.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-clps711x/param.h | ||
3 | * | ||
4 | * Copyright (C) 2000 Deep Blue Solutions Ltd. | ||
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 as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
diff --git a/include/asm-arm/arch-clps711x/uncompress.h b/include/asm-arm/arch-clps711x/uncompress.h index 9fc4bcfa1681..07157b7e4b20 100644 --- a/include/asm-arm/arch-clps711x/uncompress.h +++ b/include/asm-arm/arch-clps711x/uncompress.h | |||
@@ -25,7 +25,6 @@ | |||
25 | #undef CLPS7111_BASE | 25 | #undef CLPS7111_BASE |
26 | #define CLPS7111_BASE CLPS7111_PHYS_BASE | 26 | #define CLPS7111_BASE CLPS7111_PHYS_BASE |
27 | 27 | ||
28 | #define barrier() __asm__ __volatile__("": : :"memory") | ||
29 | #define __raw_readl(p) (*(unsigned long *)(p)) | 28 | #define __raw_readl(p) (*(unsigned long *)(p)) |
30 | #define __raw_writel(v,p) (*(unsigned long *)(p) = (v)) | 29 | #define __raw_writel(v,p) (*(unsigned long *)(p) = (v)) |
31 | 30 | ||
@@ -40,21 +39,15 @@ | |||
40 | /* | 39 | /* |
41 | * This does not append a newline | 40 | * This does not append a newline |
42 | */ | 41 | */ |
43 | static void putstr(const char *s) | 42 | static inline void putc(int c) |
44 | { | 43 | { |
45 | char c; | 44 | while (clps_readl(SYSFLGx) & SYSFLG_UTXFF) |
46 | 45 | barrier(); | |
47 | while ((c = *s++) != '\0') { | 46 | clps_writel(c, UARTDRx); |
48 | while (clps_readl(SYSFLGx) & SYSFLG_UTXFF) | 47 | } |
49 | barrier(); | ||
50 | clps_writel(c, UARTDRx); | ||
51 | 48 | ||
52 | if (c == '\n') { | 49 | static inline void flush(void) |
53 | while (clps_readl(SYSFLGx) & SYSFLG_UTXFF) | 50 | { |
54 | barrier(); | ||
55 | clps_writel('\r', UARTDRx); | ||
56 | } | ||
57 | } | ||
58 | while (clps_readl(SYSFLGx) & SYSFLG_UBUSY) | 51 | while (clps_readl(SYSFLGx) & SYSFLG_UBUSY) |
59 | barrier(); | 52 | barrier(); |
60 | } | 53 | } |
diff --git a/include/asm-arm/arch-ebsa110/debug-macro.S b/include/asm-arm/arch-ebsa110/debug-macro.S index dcd03a40c502..f61cadabe0ec 100644 --- a/include/asm-arm/arch-ebsa110/debug-macro.S +++ b/include/asm-arm/arch-ebsa110/debug-macro.S | |||
@@ -16,19 +16,6 @@ | |||
16 | orr \rx, \rx, #0x00000be0 | 16 | orr \rx, \rx, #0x00000be0 |
17 | .endm | 17 | .endm |
18 | 18 | ||
19 | .macro senduart,rd,rx | 19 | #define UART_SHIFT 2 |
20 | strb \rd, [\rx] | 20 | #define FLOW_CONTROL |
21 | .endm | 21 | #include <asm/hardware/debug-8250.h> |
22 | |||
23 | .macro busyuart,rd,rx | ||
24 | 1002: ldrb \rd, [\rx, #0x14] | ||
25 | and \rd, \rd, #0x60 | ||
26 | teq \rd, #0x60 | ||
27 | bne 1002b | ||
28 | .endm | ||
29 | |||
30 | .macro waituart,rd,rx | ||
31 | 1001: ldrb \rd, [\rx, #0x18] | ||
32 | tst \rd, #0x10 | ||
33 | beq 1001b | ||
34 | .endm | ||
diff --git a/include/asm-arm/arch-ebsa110/param.h b/include/asm-arm/arch-ebsa110/param.h deleted file mode 100644 index be19b08d1c75..000000000000 --- a/include/asm-arm/arch-ebsa110/param.h +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-ebsa110/param.h | ||
3 | */ | ||
4 | #define HZ 200 | ||
diff --git a/include/asm-arm/arch-ebsa110/uncompress.h b/include/asm-arm/arch-ebsa110/uncompress.h index eee95581a923..66b19c7fd908 100644 --- a/include/asm-arm/arch-ebsa110/uncompress.h +++ b/include/asm-arm/arch-ebsa110/uncompress.h | |||
@@ -8,33 +8,34 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/serial_reg.h> | ||
12 | |||
13 | #define SERIAL_BASE ((unsigned char *)0xfe000be0) | ||
14 | |||
11 | /* | 15 | /* |
12 | * This does not append a newline | 16 | * This does not append a newline |
13 | */ | 17 | */ |
14 | static void putstr(const char *s) | 18 | static inline void putc(int c) |
19 | { | ||
20 | unsigned char v, *base = SERIAL_BASE; | ||
21 | |||
22 | do { | ||
23 | v = base[UART_LSR << 2]; | ||
24 | barrier(); | ||
25 | } while (!(v & UART_LSR_THRE)); | ||
26 | |||
27 | base[UART_TX << 2] = c; | ||
28 | } | ||
29 | |||
30 | static inline void flush(void) | ||
15 | { | 31 | { |
16 | unsigned long tmp1, tmp2; | 32 | unsigned char v, *base = SERIAL_BASE; |
17 | __asm__ __volatile__( | 33 | |
18 | "ldrb %0, [%2], #1\n" | 34 | do { |
19 | " teq %0, #0\n" | 35 | v = base[UART_LSR << 2]; |
20 | " beq 3f\n" | 36 | barrier(); |
21 | "1: strb %0, [%3]\n" | 37 | } while ((v & (UART_LSR_TEMT|UART_LSR_THRE)) != |
22 | "2: ldrb %1, [%3, #0x14]\n" | 38 | (UART_LSR_TEMT|UART_LSR_THRE)); |
23 | " and %1, %1, #0x60\n" | ||
24 | " teq %1, #0x60\n" | ||
25 | " bne 2b\n" | ||
26 | " teq %0, #'\n'\n" | ||
27 | " moveq %0, #'\r'\n" | ||
28 | " beq 1b\n" | ||
29 | " ldrb %0, [%2], #1\n" | ||
30 | " teq %0, #0\n" | ||
31 | " bne 1b\n" | ||
32 | "3: ldrb %1, [%3, #0x14]\n" | ||
33 | " and %1, %1, #0x60\n" | ||
34 | " teq %1, #0x60\n" | ||
35 | " bne 3b" | ||
36 | : "=&r" (tmp1), "=&r" (tmp2) | ||
37 | : "r" (s), "r" (0xf0000be0) : "cc"); | ||
38 | } | 39 | } |
39 | 40 | ||
40 | /* | 41 | /* |
diff --git a/include/asm-arm/arch-ebsa285/debug-macro.S b/include/asm-arm/arch-ebsa285/debug-macro.S index 97d15fc629af..b48cec4a0c45 100644 --- a/include/asm-arm/arch-ebsa285/debug-macro.S +++ b/include/asm-arm/arch-ebsa285/debug-macro.S | |||
@@ -23,22 +23,10 @@ | |||
23 | orr \rx, \rx, #0x000003f8 | 23 | orr \rx, \rx, #0x000003f8 |
24 | .endm | 24 | .endm |
25 | 25 | ||
26 | .macro senduart,rd,rx | 26 | #define UART_SHIFT 0 |
27 | strb \rd, [\rx] | 27 | #define FLOW_CONTROL |
28 | .endm | 28 | #include <asm/hardware/debug-8250.S> |
29 | 29 | ||
30 | .macro busyuart,rd,rx | ||
31 | 1002: ldrb \rd, [\rx, #0x5] | ||
32 | and \rd, \rd, #0x60 | ||
33 | teq \rd, #0x60 | ||
34 | bne 1002b | ||
35 | .endm | ||
36 | |||
37 | .macro waituart,rd,rx | ||
38 | 1001: ldrb \rd, [\rx, #0x6] | ||
39 | tst \rd, #0x10 | ||
40 | beq 1001b | ||
41 | .endm | ||
42 | #else | 30 | #else |
43 | /* For EBSA285 debugging */ | 31 | /* For EBSA285 debugging */ |
44 | .equ dc21285_high, ARMCSR_BASE & 0xff000000 | 32 | .equ dc21285_high, ARMCSR_BASE & 0xff000000 |
diff --git a/include/asm-arm/arch-ebsa285/param.h b/include/asm-arm/arch-ebsa285/param.h deleted file mode 100644 index 3827103b27a0..000000000000 --- a/include/asm-arm/arch-ebsa285/param.h +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-ebsa285/param.h | ||
3 | */ | ||
diff --git a/include/asm-arm/arch-ebsa285/uncompress.h b/include/asm-arm/arch-ebsa285/uncompress.h index c2fd84e2d90e..86142c882b3a 100644 --- a/include/asm-arm/arch-ebsa285/uncompress.h +++ b/include/asm-arm/arch-ebsa285/uncompress.h | |||
@@ -15,10 +15,11 @@ | |||
15 | #define DC21285_BASE ((volatile unsigned int *)0x42000160) | 15 | #define DC21285_BASE ((volatile unsigned int *)0x42000160) |
16 | #define SER0_BASE ((volatile unsigned char *)0x7c0003f8) | 16 | #define SER0_BASE ((volatile unsigned char *)0x7c0003f8) |
17 | 17 | ||
18 | static __inline__ void putc(char c) | 18 | static inline void putc(char c) |
19 | { | 19 | { |
20 | if (machine_is_netwinder()) { | 20 | if (machine_is_netwinder()) { |
21 | while ((SER0_BASE[5] & 0x60) != 0x60); | 21 | while ((SER0_BASE[5] & 0x60) != 0x60) |
22 | barrier(); | ||
22 | SER0_BASE[0] = c; | 23 | SER0_BASE[0] = c; |
23 | } else { | 24 | } else { |
24 | while (DC21285_BASE[6] & 8); | 25 | while (DC21285_BASE[6] & 8); |
@@ -26,17 +27,8 @@ static __inline__ void putc(char c) | |||
26 | } | 27 | } |
27 | } | 28 | } |
28 | 29 | ||
29 | /* | 30 | static inline void flush(void) |
30 | * This does not append a newline | ||
31 | */ | ||
32 | static void putstr(const char *s) | ||
33 | { | 31 | { |
34 | while (*s) { | ||
35 | putc(*s); | ||
36 | if (*s == '\n') | ||
37 | putc('\r'); | ||
38 | s++; | ||
39 | } | ||
40 | } | 32 | } |
41 | 33 | ||
42 | /* | 34 | /* |
diff --git a/include/asm-arm/arch-ep93xx/debug-macro.S b/include/asm-arm/arch-ep93xx/debug-macro.S new file mode 100644 index 000000000000..397565a0c671 --- /dev/null +++ b/include/asm-arm/arch-ep93xx/debug-macro.S | |||
@@ -0,0 +1,22 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-ep93xx/debug-macro.S | ||
3 | * Debugging macro include header | ||
4 | * | ||
5 | * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org> | ||
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 as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or (at | ||
10 | * your option) any later version. | ||
11 | */ | ||
12 | #include <asm/arch/ep93xx-regs.h> | ||
13 | |||
14 | .macro addruart,rx | ||
15 | mrc p15, 0, \rx, c1, c0 | ||
16 | tst \rx, #1 @ MMU enabled? | ||
17 | ldreq \rx, =EP93XX_APB_PHYS_BASE @ Physical base | ||
18 | ldrne \rx, =EP93XX_APB_VIRT_BASE @ virtual base | ||
19 | orr \rx, \rx, #0x000c0000 | ||
20 | .endm | ||
21 | |||
22 | #include <asm/hardware/debug-pl01x.S> | ||
diff --git a/include/asm-arm/arch-ep93xx/dma.h b/include/asm-arm/arch-ep93xx/dma.h new file mode 100644 index 000000000000..898b3ab7fd46 --- /dev/null +++ b/include/asm-arm/arch-ep93xx/dma.h | |||
@@ -0,0 +1,3 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-ep93xx/dma.h | ||
3 | */ | ||
diff --git a/include/asm-arm/arch-ep93xx/entry-macro.S b/include/asm-arm/arch-ep93xx/entry-macro.S new file mode 100644 index 000000000000..84140a28dfcf --- /dev/null +++ b/include/asm-arm/arch-ep93xx/entry-macro.S | |||
@@ -0,0 +1,53 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-ep93xx/entry-macro.S | ||
3 | * IRQ demultiplexing for EP93xx | ||
4 | * | ||
5 | * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org> | ||
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 as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or (at | ||
10 | * your option) any later version. | ||
11 | */ | ||
12 | #include <asm/arch/ep93xx-regs.h> | ||
13 | |||
14 | .macro disable_fiq | ||
15 | .endm | ||
16 | |||
17 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
18 | ldr \base, =(EP93XX_AHB_VIRT_BASE) | ||
19 | orr \base, \base, #0x000b0000 | ||
20 | mov \irqnr, #0 | ||
21 | ldr \irqstat, [\base] @ lower 32 interrupts | ||
22 | cmp \irqstat, #0 | ||
23 | bne 1001f | ||
24 | |||
25 | eor \base, \base, #0x00070000 | ||
26 | ldr \irqstat, [\base] @ upper 32 interrupts | ||
27 | cmp \irqstat, #0 | ||
28 | beq 1002f | ||
29 | mov \irqnr, #0x20 | ||
30 | |||
31 | 1001: | ||
32 | movs \tmp, \irqstat, lsl #16 | ||
33 | movne \irqstat, \tmp | ||
34 | addeq \irqnr, \irqnr, #16 | ||
35 | |||
36 | movs \tmp, \irqstat, lsl #8 | ||
37 | movne \irqstat, \tmp | ||
38 | addeq \irqnr, \irqnr, #8 | ||
39 | |||
40 | movs \tmp, \irqstat, lsl #4 | ||
41 | movne \irqstat, \tmp | ||
42 | addeq \irqnr, \irqnr, #4 | ||
43 | |||
44 | movs \tmp, \irqstat, lsl #2 | ||
45 | movne \irqstat, \tmp | ||
46 | addeq \irqnr, \irqnr, #2 | ||
47 | |||
48 | movs \tmp, \irqstat, lsl #1 | ||
49 | addeq \irqnr, \irqnr, #1 | ||
50 | orrs \base, \base, #1 | ||
51 | |||
52 | 1002: | ||
53 | .endm | ||
diff --git a/include/asm-arm/arch-ep93xx/ep93xx-regs.h b/include/asm-arm/arch-ep93xx/ep93xx-regs.h new file mode 100644 index 000000000000..71cea0b5841b --- /dev/null +++ b/include/asm-arm/arch-ep93xx/ep93xx-regs.h | |||
@@ -0,0 +1,125 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-ep93xx/ep93xx-regs.h | ||
3 | */ | ||
4 | |||
5 | #ifndef __ASM_ARCH_EP93XX_REGS_H | ||
6 | #define __ASM_ARCH_EP93XX_REGS_H | ||
7 | |||
8 | /* | ||
9 | * EP93xx linux memory map: | ||
10 | * | ||
11 | * virt phys size | ||
12 | * fe800000 5M per-platform mappings | ||
13 | * fed00000 80800000 2M APB | ||
14 | * fef00000 80000000 1M AHB | ||
15 | */ | ||
16 | |||
17 | #define EP93XX_AHB_PHYS_BASE 0x80000000 | ||
18 | #define EP93XX_AHB_VIRT_BASE 0xfef00000 | ||
19 | #define EP93XX_AHB_SIZE 0x00100000 | ||
20 | |||
21 | #define EP93XX_APB_PHYS_BASE 0x80800000 | ||
22 | #define EP93XX_APB_VIRT_BASE 0xfed00000 | ||
23 | #define EP93XX_APB_SIZE 0x00200000 | ||
24 | |||
25 | |||
26 | /* AHB peripherals */ | ||
27 | #define EP93XX_DMA_BASE (EP93XX_AHB_VIRT_BASE + 0x00000000) | ||
28 | |||
29 | #define EP93XX_ETHERNET_BASE (EP93XX_AHB_VIRT_BASE + 0x00010000) | ||
30 | |||
31 | #define EP93XX_USB_BASE (EP93XX_AHB_VIRT_BASE + 0x00020000) | ||
32 | #define EP93XX_USB_PHYS_BASE (EP93XX_AHB_PHYS_BASE + 0x00020000) | ||
33 | |||
34 | #define EP93XX_RASTER_BASE (EP93XX_AHB_VIRT_BASE + 0x00030000) | ||
35 | |||
36 | #define EP93XX_GRAPHICS_ACCEL_BASE (EP93XX_AHB_VIRT_BASE + 0x00040000) | ||
37 | |||
38 | #define EP93XX_SDRAM_CONTROLLER_BASE (EP93XX_AHB_VIRT_BASE + 0x00060000) | ||
39 | |||
40 | #define EP93XX_PCMCIA_CONTROLLER_BASE (EP93XX_AHB_VIRT_BASE + 0x00080000) | ||
41 | |||
42 | #define EP93XX_BOOT_ROM_BASE (EP93XX_AHB_VIRT_BASE + 0x00090000) | ||
43 | |||
44 | #define EP93XX_IDE_BASE (EP93XX_AHB_VIRT_BASE + 0x000a0000) | ||
45 | |||
46 | #define EP93XX_VIC1_BASE (EP93XX_AHB_VIRT_BASE + 0x000b0000) | ||
47 | |||
48 | #define EP93XX_VIC2_BASE (EP93XX_AHB_VIRT_BASE + 0x000c0000) | ||
49 | |||
50 | |||
51 | /* APB peripherals */ | ||
52 | #define EP93XX_TIMER_BASE (EP93XX_APB_VIRT_BASE + 0x00010000) | ||
53 | #define EP93XX_TIMER_REG(x) (EP93XX_TIMER_BASE + (x)) | ||
54 | #define EP93XX_TIMER1_LOAD EP93XX_TIMER_REG(0x00) | ||
55 | #define EP93XX_TIMER1_VALUE EP93XX_TIMER_REG(0x04) | ||
56 | #define EP93XX_TIMER1_CONTROL EP93XX_TIMER_REG(0x08) | ||
57 | #define EP93XX_TIMER1_CLEAR EP93XX_TIMER_REG(0x0c) | ||
58 | #define EP93XX_TIMER2_LOAD EP93XX_TIMER_REG(0x20) | ||
59 | #define EP93XX_TIMER2_VALUE EP93XX_TIMER_REG(0x24) | ||
60 | #define EP93XX_TIMER2_CONTROL EP93XX_TIMER_REG(0x28) | ||
61 | #define EP93XX_TIMER2_CLEAR EP93XX_TIMER_REG(0x2c) | ||
62 | #define EP93XX_TIMER4_VALUE_LOW EP93XX_TIMER_REG(0x60) | ||
63 | #define EP93XX_TIMER4_VALUE_HIGH EP93XX_TIMER_REG(0x64) | ||
64 | #define EP93XX_TIMER3_LOAD EP93XX_TIMER_REG(0x80) | ||
65 | #define EP93XX_TIMER3_VALUE EP93XX_TIMER_REG(0x84) | ||
66 | #define EP93XX_TIMER3_CONTROL EP93XX_TIMER_REG(0x88) | ||
67 | #define EP93XX_TIMER3_CLEAR EP93XX_TIMER_REG(0x8c) | ||
68 | |||
69 | #define EP93XX_I2S_BASE (EP93XX_APB_VIRT_BASE + 0x00020000) | ||
70 | |||
71 | #define EP93XX_SECURITY_BASE (EP93XX_APB_VIRT_BASE + 0x00030000) | ||
72 | |||
73 | #define EP93XX_GPIO_BASE (EP93XX_APB_VIRT_BASE + 0x00040000) | ||
74 | #define EP93XX_GPIO_REG(x) (EP93XX_GPIO_BASE + (x)) | ||
75 | #define EP93XX_GPIO_A_INT_TYPE1 EP93XX_GPIO_REG(0x90) | ||
76 | #define EP93XX_GPIO_A_INT_TYPE2 EP93XX_GPIO_REG(0x94) | ||
77 | #define EP93XX_GPIO_A_INT_ACK EP93XX_GPIO_REG(0x98) | ||
78 | #define EP93XX_GPIO_A_INT_ENABLE EP93XX_GPIO_REG(0x9c) | ||
79 | #define EP93XX_GPIO_A_INT_STATUS EP93XX_GPIO_REG(0xa0) | ||
80 | #define EP93XX_GPIO_B_INT_TYPE1 EP93XX_GPIO_REG(0xac) | ||
81 | #define EP93XX_GPIO_B_INT_TYPE2 EP93XX_GPIO_REG(0xb0) | ||
82 | #define EP93XX_GPIO_B_INT_ACK EP93XX_GPIO_REG(0xb4) | ||
83 | #define EP93XX_GPIO_B_INT_ENABLE EP93XX_GPIO_REG(0xb8) | ||
84 | #define EP93XX_GPIO_B_INT_STATUS EP93XX_GPIO_REG(0xbc) | ||
85 | |||
86 | #define EP93XX_AAC_BASE (EP93XX_APB_VIRT_BASE + 0x00080000) | ||
87 | |||
88 | #define EP93XX_SPI_BASE (EP93XX_APB_VIRT_BASE + 0x000a0000) | ||
89 | |||
90 | #define EP93XX_IRDA_BASE (EP93XX_APB_VIRT_BASE + 0x000b0000) | ||
91 | |||
92 | #define EP93XX_UART1_BASE (EP93XX_APB_VIRT_BASE + 0x000c0000) | ||
93 | #define EP93XX_UART1_PHYS_BASE (EP93XX_APB_PHYS_BASE + 0x000c0000) | ||
94 | |||
95 | #define EP93XX_UART2_BASE (EP93XX_APB_VIRT_BASE + 0x000d0000) | ||
96 | #define EP93XX_UART2_PHYS_BASE (EP93XX_APB_PHYS_BASE + 0x000d0000) | ||
97 | |||
98 | #define EP93XX_UART3_BASE (EP93XX_APB_VIRT_BASE + 0x000e0000) | ||
99 | #define EP93XX_UART3_PHYS_BASE (EP93XX_APB_PHYS_BASE + 0x000e0000) | ||
100 | |||
101 | #define EP93XX_KEY_MATRIX_BASE (EP93XX_APB_VIRT_BASE + 0x000f0000) | ||
102 | |||
103 | #define EP93XX_ADC_BASE (EP93XX_APB_VIRT_BASE + 0x00100000) | ||
104 | #define EP93XX_TOUCHSCREEN_BASE (EP93XX_APB_VIRT_BASE + 0x00100000) | ||
105 | |||
106 | #define EP93XX_PWM_BASE (EP93XX_APB_VIRT_BASE + 0x00110000) | ||
107 | |||
108 | #define EP93XX_RTC_BASE (EP93XX_APB_VIRT_BASE + 0x00120000) | ||
109 | |||
110 | #define EP93XX_SYSCON_BASE (EP93XX_APB_VIRT_BASE + 0x00130000) | ||
111 | #define EP93XX_SYSCON_REG(x) (EP93XX_SYSCON_BASE + (x)) | ||
112 | #define EP93XX_SYSCON_POWER_STATE EP93XX_SYSCON_REG(0x00) | ||
113 | #define EP93XX_SYSCON_CLOCK_CONTROL EP93XX_SYSCON_REG(0x04) | ||
114 | #define EP93XX_SYSCON_CLOCK_UARTBAUD 0x20000000 | ||
115 | #define EP93XX_SYSCON_CLOCK_USH_EN 0x10000000 | ||
116 | #define EP93XX_SYSCON_HALT EP93XX_SYSCON_REG(0x08) | ||
117 | #define EP93XX_SYSCON_STANDBY EP93XX_SYSCON_REG(0x0c) | ||
118 | #define EP93XX_SYSCON_DEVICE_CONFIG EP93XX_SYSCON_REG(0x80) | ||
119 | #define EP93XX_SYSCON_DEVICE_CONFIG_CRUNCH_ENABLE 0x00800000 | ||
120 | #define EP93XX_SYSCON_SWLOCK EP93XX_SYSCON_REG(0xc0) | ||
121 | |||
122 | #define EP93XX_WATCHDOG_BASE (EP93XX_APB_VIRT_BASE + 0x00140000) | ||
123 | |||
124 | |||
125 | #endif | ||
diff --git a/include/asm-arm/arch-ep93xx/gesbc9312.h b/include/asm-arm/arch-ep93xx/gesbc9312.h new file mode 100644 index 000000000000..4d0b3023bff7 --- /dev/null +++ b/include/asm-arm/arch-ep93xx/gesbc9312.h | |||
@@ -0,0 +1,3 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-ep93xx/gesbc9312.h | ||
3 | */ | ||
diff --git a/include/asm-arm/arch-ep93xx/gpio.h b/include/asm-arm/arch-ep93xx/gpio.h new file mode 100644 index 000000000000..1ee14a14cba0 --- /dev/null +++ b/include/asm-arm/arch-ep93xx/gpio.h | |||
@@ -0,0 +1,107 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-ep93xx/gpio.h | ||
3 | */ | ||
4 | |||
5 | #ifndef __ASM_ARCH_GPIO_H | ||
6 | #define __ASM_ARCH_GPIO_H | ||
7 | |||
8 | #define GPIO_IN 0 | ||
9 | #define GPIO_OUT 1 | ||
10 | |||
11 | #define EP93XX_GPIO_LOW 0 | ||
12 | #define EP93XX_GPIO_HIGH 1 | ||
13 | |||
14 | extern void gpio_line_config(int line, int direction); | ||
15 | extern int gpio_line_get(int line); | ||
16 | extern void gpio_line_set(int line, int value); | ||
17 | |||
18 | /* GPIO port A. */ | ||
19 | #define EP93XX_GPIO_LINE_A(x) ((x) + 0) | ||
20 | #define EP93XX_GPIO_LINE_EGPIO0 EP93XX_GPIO_LINE_A(0) | ||
21 | #define EP93XX_GPIO_LINE_EGPIO1 EP93XX_GPIO_LINE_A(1) | ||
22 | #define EP93XX_GPIO_LINE_EGPIO2 EP93XX_GPIO_LINE_A(2) | ||
23 | #define EP93XX_GPIO_LINE_EGPIO3 EP93XX_GPIO_LINE_A(3) | ||
24 | #define EP93XX_GPIO_LINE_EGPIO4 EP93XX_GPIO_LINE_A(4) | ||
25 | #define EP93XX_GPIO_LINE_EGPIO5 EP93XX_GPIO_LINE_A(5) | ||
26 | #define EP93XX_GPIO_LINE_EGPIO6 EP93XX_GPIO_LINE_A(6) | ||
27 | #define EP93XX_GPIO_LINE_EGPIO7 EP93XX_GPIO_LINE_A(7) | ||
28 | |||
29 | /* GPIO port B. */ | ||
30 | #define EP93XX_GPIO_LINE_B(x) ((x) + 8) | ||
31 | #define EP93XX_GPIO_LINE_EGPIO8 EP93XX_GPIO_LINE_B(0) | ||
32 | #define EP93XX_GPIO_LINE_EGPIO9 EP93XX_GPIO_LINE_B(1) | ||
33 | #define EP93XX_GPIO_LINE_EGPIO10 EP93XX_GPIO_LINE_B(2) | ||
34 | #define EP93XX_GPIO_LINE_EGPIO11 EP93XX_GPIO_LINE_B(3) | ||
35 | #define EP93XX_GPIO_LINE_EGPIO12 EP93XX_GPIO_LINE_B(4) | ||
36 | #define EP93XX_GPIO_LINE_EGPIO13 EP93XX_GPIO_LINE_B(5) | ||
37 | #define EP93XX_GPIO_LINE_EGPIO14 EP93XX_GPIO_LINE_B(6) | ||
38 | #define EP93XX_GPIO_LINE_EGPIO15 EP93XX_GPIO_LINE_B(7) | ||
39 | |||
40 | /* GPIO port C. */ | ||
41 | #define EP93XX_GPIO_LINE_C(x) ((x) + 16) | ||
42 | #define EP93XX_GPIO_LINE_ROW0 EP93XX_GPIO_LINE_C(0) | ||
43 | #define EP93XX_GPIO_LINE_ROW1 EP93XX_GPIO_LINE_C(1) | ||
44 | #define EP93XX_GPIO_LINE_ROW2 EP93XX_GPIO_LINE_C(2) | ||
45 | #define EP93XX_GPIO_LINE_ROW3 EP93XX_GPIO_LINE_C(3) | ||
46 | #define EP93XX_GPIO_LINE_ROW4 EP93XX_GPIO_LINE_C(4) | ||
47 | #define EP93XX_GPIO_LINE_ROW5 EP93XX_GPIO_LINE_C(5) | ||
48 | #define EP93XX_GPIO_LINE_ROW6 EP93XX_GPIO_LINE_C(6) | ||
49 | #define EP93XX_GPIO_LINE_ROW7 EP93XX_GPIO_LINE_C(7) | ||
50 | |||
51 | /* GPIO port D. */ | ||
52 | #define EP93XX_GPIO_LINE_D(x) ((x) + 24) | ||
53 | #define EP93XX_GPIO_LINE_COL0 EP93XX_GPIO_LINE_D(0) | ||
54 | #define EP93XX_GPIO_LINE_COL1 EP93XX_GPIO_LINE_D(1) | ||
55 | #define EP93XX_GPIO_LINE_COL2 EP93XX_GPIO_LINE_D(2) | ||
56 | #define EP93XX_GPIO_LINE_COL3 EP93XX_GPIO_LINE_D(3) | ||
57 | #define EP93XX_GPIO_LINE_COL4 EP93XX_GPIO_LINE_D(4) | ||
58 | #define EP93XX_GPIO_LINE_COL5 EP93XX_GPIO_LINE_D(5) | ||
59 | #define EP93XX_GPIO_LINE_COL6 EP93XX_GPIO_LINE_D(6) | ||
60 | #define EP93XX_GPIO_LINE_COL7 EP93XX_GPIO_LINE_D(7) | ||
61 | |||
62 | /* GPIO port E. */ | ||
63 | #define EP93XX_GPIO_LINE_E(x) ((x) + 32) | ||
64 | #define EP93XX_GPIO_LINE_GRLED EP93XX_GPIO_LINE_E(0) | ||
65 | #define EP93XX_GPIO_LINE_RDLED EP93XX_GPIO_LINE_E(1) | ||
66 | #define EP93XX_GPIO_LINE_DIORn EP93XX_GPIO_LINE_E(2) | ||
67 | #define EP93XX_GPIO_LINE_IDECS1n EP93XX_GPIO_LINE_E(3) | ||
68 | #define EP93XX_GPIO_LINE_IDECS2n EP93XX_GPIO_LINE_E(4) | ||
69 | #define EP93XX_GPIO_LINE_IDEDA0 EP93XX_GPIO_LINE_E(5) | ||
70 | #define EP93XX_GPIO_LINE_IDEDA1 EP93XX_GPIO_LINE_E(6) | ||
71 | #define EP93XX_GPIO_LINE_IDEDA2 EP93XX_GPIO_LINE_E(7) | ||
72 | |||
73 | /* GPIO port F. */ | ||
74 | #define EP93XX_GPIO_LINE_F(x) ((x) + 40) | ||
75 | #define EP93XX_GPIO_LINE_WP EP93XX_GPIO_LINE_F(0) | ||
76 | #define EP93XX_GPIO_LINE_MCCD1 EP93XX_GPIO_LINE_F(1) | ||
77 | #define EP93XX_GPIO_LINE_MCCD2 EP93XX_GPIO_LINE_F(2) | ||
78 | #define EP93XX_GPIO_LINE_MCBVD1 EP93XX_GPIO_LINE_F(3) | ||
79 | #define EP93XX_GPIO_LINE_MCBVD2 EP93XX_GPIO_LINE_F(4) | ||
80 | #define EP93XX_GPIO_LINE_VS1 EP93XX_GPIO_LINE_F(5) | ||
81 | #define EP93XX_GPIO_LINE_READY EP93XX_GPIO_LINE_F(6) | ||
82 | #define EP93XX_GPIO_LINE_VS2 EP93XX_GPIO_LINE_F(7) | ||
83 | |||
84 | /* GPIO port G. */ | ||
85 | #define EP93XX_GPIO_LINE_G(x) ((x) + 48) | ||
86 | #define EP93XX_GPIO_LINE_EECLK EP93XX_GPIO_LINE_G(0) | ||
87 | #define EP93XX_GPIO_LINE_EEDAT EP93XX_GPIO_LINE_G(1) | ||
88 | #define EP93XX_GPIO_LINE_SLA0 EP93XX_GPIO_LINE_G(2) | ||
89 | #define EP93XX_GPIO_LINE_SLA1 EP93XX_GPIO_LINE_G(3) | ||
90 | #define EP93XX_GPIO_LINE_DD12 EP93XX_GPIO_LINE_G(4) | ||
91 | #define EP93XX_GPIO_LINE_DD13 EP93XX_GPIO_LINE_G(5) | ||
92 | #define EP93XX_GPIO_LINE_DD14 EP93XX_GPIO_LINE_G(6) | ||
93 | #define EP93XX_GPIO_LINE_DD15 EP93XX_GPIO_LINE_G(7) | ||
94 | |||
95 | /* GPIO port H. */ | ||
96 | #define EP93XX_GPIO_LINE_H(x) ((x) + 56) | ||
97 | #define EP93XX_GPIO_LINE_DD0 EP93XX_GPIO_LINE_H(0) | ||
98 | #define EP93XX_GPIO_LINE_DD1 EP93XX_GPIO_LINE_H(1) | ||
99 | #define EP93XX_GPIO_LINE_DD2 EP93XX_GPIO_LINE_H(2) | ||
100 | #define EP93XX_GPIO_LINE_DD3 EP93XX_GPIO_LINE_H(3) | ||
101 | #define EP93XX_GPIO_LINE_DD4 EP93XX_GPIO_LINE_H(4) | ||
102 | #define EP93XX_GPIO_LINE_DD5 EP93XX_GPIO_LINE_H(5) | ||
103 | #define EP93XX_GPIO_LINE_DD6 EP93XX_GPIO_LINE_H(6) | ||
104 | #define EP93XX_GPIO_LINE_DD7 EP93XX_GPIO_LINE_H(7) | ||
105 | |||
106 | |||
107 | #endif | ||
diff --git a/include/asm-arm/arch-ep93xx/hardware.h b/include/asm-arm/arch-ep93xx/hardware.h new file mode 100644 index 000000000000..9b69f454065d --- /dev/null +++ b/include/asm-arm/arch-ep93xx/hardware.h | |||
@@ -0,0 +1,12 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-ep93xx/hardware.h | ||
3 | */ | ||
4 | |||
5 | #include "ep93xx-regs.h" | ||
6 | |||
7 | #define pcibios_assign_all_busses() 0 | ||
8 | |||
9 | #include "platform.h" | ||
10 | |||
11 | #include "gesbc9312.h" | ||
12 | #include "ts72xx.h" | ||
diff --git a/include/asm-arm/arch-ep93xx/io.h b/include/asm-arm/arch-ep93xx/io.h new file mode 100644 index 000000000000..7b4d25e29060 --- /dev/null +++ b/include/asm-arm/arch-ep93xx/io.h | |||
@@ -0,0 +1,8 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-ep93xx/io.h | ||
3 | */ | ||
4 | |||
5 | #define IO_SPACE_LIMIT 0xffffffff | ||
6 | |||
7 | #define __io(p) ((void __iomem *)(p)) | ||
8 | #define __mem_pci(p) (p) | ||
diff --git a/include/asm-arm/arch-ep93xx/irqs.h b/include/asm-arm/arch-ep93xx/irqs.h new file mode 100644 index 000000000000..9a42f5de9e57 --- /dev/null +++ b/include/asm-arm/arch-ep93xx/irqs.h | |||
@@ -0,0 +1,80 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-ep93xx/irqs.h | ||
3 | */ | ||
4 | |||
5 | #ifndef __ASM_ARCH_IRQS_H | ||
6 | #define __ASM_ARCH_IRQS_H | ||
7 | |||
8 | #define IRQ_EP93XX_COMMRX 2 | ||
9 | #define IRQ_EP93XX_COMMTX 3 | ||
10 | #define IRQ_EP93XX_TIMER1 4 | ||
11 | #define IRQ_EP93XX_TIMER2 5 | ||
12 | #define IRQ_EP93XX_AACINTR 6 | ||
13 | #define IRQ_EP93XX_DMAM2P0 7 | ||
14 | #define IRQ_EP93XX_DMAM2P1 8 | ||
15 | #define IRQ_EP93XX_DMAM2P2 9 | ||
16 | #define IRQ_EP93XX_DMAM2P3 10 | ||
17 | #define IRQ_EP93XX_DMAM2P4 11 | ||
18 | #define IRQ_EP93XX_DMAM2P5 12 | ||
19 | #define IRQ_EP93XX_DMAM2P6 13 | ||
20 | #define IRQ_EP93XX_DMAM2P7 14 | ||
21 | #define IRQ_EP93XX_DMAM2P8 15 | ||
22 | #define IRQ_EP93XX_DMAM2P9 16 | ||
23 | #define IRQ_EP93XX_DMAM2M0 17 | ||
24 | #define IRQ_EP93XX_DMAM2M1 18 | ||
25 | #define IRQ_EP93XX_GPIO0MUX 20 | ||
26 | #define IRQ_EP93XX_GPIO1MUX 21 | ||
27 | #define IRQ_EP93XX_GPIO2MUX 22 | ||
28 | #define IRQ_EP93XX_GPIO3MUX 22 | ||
29 | #define IRQ_EP93XX_UART1RX 23 | ||
30 | #define IRQ_EP93XX_UART1TX 24 | ||
31 | #define IRQ_EP93XX_UART2RX 25 | ||
32 | #define IRQ_EP93XX_UART2TX 26 | ||
33 | #define IRQ_EP93XX_UART3RX 27 | ||
34 | #define IRQ_EP93XX_UART3TX 28 | ||
35 | #define IRQ_EP93XX_KEY 29 | ||
36 | #define IRQ_EP93XX_TOUCH 30 | ||
37 | #define EP93XX_VIC1_VALID_IRQ_MASK 0x7ffffffc | ||
38 | |||
39 | #define IRQ_EP93XX_EXT0 32 | ||
40 | #define IRQ_EP93XX_EXT1 33 | ||
41 | #define IRQ_EP93XX_EXT2 34 | ||
42 | #define IRQ_EP93XX_64HZ 35 | ||
43 | #define IRQ_EP93XX_WATCHDOG 36 | ||
44 | #define IRQ_EP93XX_RTC 37 | ||
45 | #define IRQ_EP93XX_IRDA 38 | ||
46 | #define IRQ_EP93XX_ETHERNET 39 | ||
47 | #define IRQ_EP93XX_EXT3 40 | ||
48 | #define IRQ_EP93XX_PROG 41 | ||
49 | #define IRQ_EP93XX_1HZ 42 | ||
50 | #define IRQ_EP93XX_VSYNC 43 | ||
51 | #define IRQ_EP93XX_VIDEO_FIFO 44 | ||
52 | #define IRQ_EP93XX_SSP1RX 45 | ||
53 | #define IRQ_EP93XX_SSP1TX 46 | ||
54 | #define IRQ_EP93XX_GPIO4MUX 47 | ||
55 | #define IRQ_EP93XX_GPIO5MUX 48 | ||
56 | #define IRQ_EP93XX_GPIO6MUX 49 | ||
57 | #define IRQ_EP93XX_GPIO7MUX 50 | ||
58 | #define IRQ_EP93XX_TIMER3 51 | ||
59 | #define IRQ_EP93XX_UART1 52 | ||
60 | #define IRQ_EP93XX_SSP 53 | ||
61 | #define IRQ_EP93XX_UART2 54 | ||
62 | #define IRQ_EP93XX_UART3 55 | ||
63 | #define IRQ_EP93XX_USB 56 | ||
64 | #define IRQ_EP93XX_ETHERNET_PME 57 | ||
65 | #define IRQ_EP93XX_DSP 58 | ||
66 | #define IRQ_EP93XX_GPIO_AB 59 | ||
67 | #define IRQ_EP93XX_SAI 60 | ||
68 | #define EP93XX_VIC2_VALID_IRQ_MASK 0x1fffffff | ||
69 | |||
70 | #define IRQ_EP93XX_GPIO(x) (64 + (x)) | ||
71 | |||
72 | #define NR_EP93XX_IRQS IRQ_EP93XX_GPIO(16) | ||
73 | |||
74 | #define EP93XX_BOARD_IRQ(x) (NR_EP93XX_IRQS + (x)) | ||
75 | #define EP93XX_BOARD_IRQS 32 | ||
76 | |||
77 | #define NR_IRQS (NR_EP93XX_IRQS + EP93XX_BOARD_IRQS) | ||
78 | |||
79 | |||
80 | #endif | ||
diff --git a/include/asm-arm/arch-ep93xx/memory.h b/include/asm-arm/arch-ep93xx/memory.h new file mode 100644 index 000000000000..4b1a5c7c8363 --- /dev/null +++ b/include/asm-arm/arch-ep93xx/memory.h | |||
@@ -0,0 +1,14 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-ep93xx/memory.h | ||
3 | */ | ||
4 | |||
5 | #ifndef __ASM_ARCH_MEMORY_H | ||
6 | #define __ASM_ARCH_MEMORY_H | ||
7 | |||
8 | #define PHYS_OFFSET UL(0x00000000) | ||
9 | |||
10 | #define __bus_to_virt(x) __phys_to_virt(x) | ||
11 | #define __virt_to_bus(x) __virt_to_phys(x) | ||
12 | |||
13 | |||
14 | #endif | ||
diff --git a/include/asm-arm/arch-ep93xx/platform.h b/include/asm-arm/arch-ep93xx/platform.h new file mode 100644 index 000000000000..df9cbb6ef660 --- /dev/null +++ b/include/asm-arm/arch-ep93xx/platform.h | |||
@@ -0,0 +1,14 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-ep93xx/platform.h | ||
3 | */ | ||
4 | |||
5 | #ifndef __ASSEMBLY__ | ||
6 | |||
7 | void ep93xx_map_io(void); | ||
8 | void ep93xx_init_irq(void); | ||
9 | void ep93xx_init_time(unsigned long); | ||
10 | void ep93xx_init_devices(void); | ||
11 | extern struct sys_timer ep93xx_timer; | ||
12 | |||
13 | |||
14 | #endif | ||
diff --git a/include/asm-arm/arch-ep93xx/system.h b/include/asm-arm/arch-ep93xx/system.h new file mode 100644 index 000000000000..79b718586746 --- /dev/null +++ b/include/asm-arm/arch-ep93xx/system.h | |||
@@ -0,0 +1,26 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-ep93xx/system.h | ||
3 | */ | ||
4 | |||
5 | #include <asm/hardware.h> | ||
6 | |||
7 | static inline void arch_idle(void) | ||
8 | { | ||
9 | cpu_do_idle(); | ||
10 | } | ||
11 | |||
12 | static inline void arch_reset(char mode) | ||
13 | { | ||
14 | u32 devicecfg; | ||
15 | |||
16 | local_irq_disable(); | ||
17 | |||
18 | devicecfg = __raw_readl(EP93XX_SYSCON_DEVICE_CONFIG); | ||
19 | __raw_writel(0xaa, EP93XX_SYSCON_SWLOCK); | ||
20 | __raw_writel(devicecfg | 0x80000000, EP93XX_SYSCON_DEVICE_CONFIG); | ||
21 | __raw_writel(0xaa, EP93XX_SYSCON_SWLOCK); | ||
22 | __raw_writel(devicecfg & ~0x80000000, EP93XX_SYSCON_DEVICE_CONFIG); | ||
23 | |||
24 | while (1) | ||
25 | ; | ||
26 | } | ||
diff --git a/include/asm-arm/arch-ep93xx/timex.h b/include/asm-arm/arch-ep93xx/timex.h new file mode 100644 index 000000000000..4140bddc97e2 --- /dev/null +++ b/include/asm-arm/arch-ep93xx/timex.h | |||
@@ -0,0 +1,5 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-ep93xx/timex.h | ||
3 | */ | ||
4 | |||
5 | #define CLOCK_TICK_RATE 983040 | ||
diff --git a/include/asm-arm/arch-ep93xx/ts72xx.h b/include/asm-arm/arch-ep93xx/ts72xx.h new file mode 100644 index 000000000000..412215e77f44 --- /dev/null +++ b/include/asm-arm/arch-ep93xx/ts72xx.h | |||
@@ -0,0 +1,90 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-ep93xx/ts72xx.h | ||
3 | */ | ||
4 | |||
5 | /* | ||
6 | * TS72xx memory map: | ||
7 | * | ||
8 | * virt phys size | ||
9 | * febff000 22000000 4K model number register | ||
10 | * febfe000 22400000 4K options register | ||
11 | * febfd000 22800000 4K options register #2 | ||
12 | * febfc000 [67]0000000 4K NAND data register | ||
13 | * febfb000 [67]0400000 4K NAND control register | ||
14 | * febfa000 [67]0800000 4K NAND busy register | ||
15 | */ | ||
16 | |||
17 | #define TS72XX_MODEL_PHYS_BASE 0x22000000 | ||
18 | #define TS72XX_MODEL_VIRT_BASE 0xfebff000 | ||
19 | #define TS72XX_MODEL_SIZE 0x00001000 | ||
20 | |||
21 | #define TS72XX_MODEL_TS7200 0x00 | ||
22 | #define TS72XX_MODEL_TS7250 0x01 | ||
23 | #define TS72XX_MODEL_TS7260 0x02 | ||
24 | |||
25 | |||
26 | #define TS72XX_OPTIONS_PHYS_BASE 0x22400000 | ||
27 | #define TS72XX_OPTIONS_VIRT_BASE 0xfebfe000 | ||
28 | #define TS72XX_OPTIONS_SIZE 0x00001000 | ||
29 | |||
30 | #define TS72XX_OPTIONS_COM2_RS485 0x02 | ||
31 | #define TS72XX_OPTIONS_MAX197 0x01 | ||
32 | |||
33 | |||
34 | #define TS72XX_OPTIONS2_PHYS_BASE 0x22800000 | ||
35 | #define TS72XX_OPTIONS2_VIRT_BASE 0xfebfd000 | ||
36 | #define TS72XX_OPTIONS2_SIZE 0x00001000 | ||
37 | |||
38 | #define TS72XX_OPTIONS2_TS9420 0x04 | ||
39 | #define TS72XX_OPTIONS2_TS9420_BOOT 0x02 | ||
40 | |||
41 | |||
42 | #define TS72XX_NOR_PHYS_BASE 0x60000000 | ||
43 | #define TS72XX_NOR2_PHYS_BASE 0x62000000 | ||
44 | |||
45 | #define TS72XX_NAND1_DATA_PHYS_BASE 0x60000000 | ||
46 | #define TS72XX_NAND2_DATA_PHYS_BASE 0x70000000 | ||
47 | #define TS72XX_NAND_DATA_VIRT_BASE 0xfebfc000 | ||
48 | #define TS72XX_NAND_DATA_SIZE 0x00001000 | ||
49 | |||
50 | #define TS72XX_NAND1_CONTROL_PHYS_BASE 0x60400000 | ||
51 | #define TS72XX_NAND2_CONTROL_PHYS_BASE 0x70400000 | ||
52 | #define TS72XX_NAND_CONTROL_VIRT_BASE 0xfebfb000 | ||
53 | #define TS72XX_NAND_CONTROL_SIZE 0x00001000 | ||
54 | |||
55 | #define TS72XX_NAND1_BUSY_PHYS_BASE 0x60800000 | ||
56 | #define TS72XX_NAND2_BUSY_PHYS_BASE 0x70800000 | ||
57 | #define TS72XX_NAND_BUSY_VIRT_BASE 0xfebfa000 | ||
58 | #define TS72XX_NAND_BUSY_SIZE 0x00001000 | ||
59 | |||
60 | |||
61 | #ifndef __ASSEMBLY__ | ||
62 | #include <asm/io.h> | ||
63 | |||
64 | static inline int board_is_ts7200(void) | ||
65 | { | ||
66 | return __raw_readb(TS72XX_MODEL_VIRT_BASE) == TS72XX_MODEL_TS7200; | ||
67 | } | ||
68 | |||
69 | static inline int board_is_ts7250(void) | ||
70 | { | ||
71 | return __raw_readb(TS72XX_MODEL_VIRT_BASE) == TS72XX_MODEL_TS7250; | ||
72 | } | ||
73 | |||
74 | static inline int board_is_ts7260(void) | ||
75 | { | ||
76 | return __raw_readb(TS72XX_MODEL_VIRT_BASE) == TS72XX_MODEL_TS7260; | ||
77 | } | ||
78 | |||
79 | static inline int is_max197_installed(void) | ||
80 | { | ||
81 | return !!(__raw_readb(TS72XX_OPTIONS_VIRT_BASE) & | ||
82 | TS72XX_OPTIONS_MAX197); | ||
83 | } | ||
84 | |||
85 | static inline int is_ts9420_installed(void) | ||
86 | { | ||
87 | return !!(__raw_readb(TS72XX_OPTIONS2_VIRT_BASE) & | ||
88 | TS72XX_OPTIONS2_TS9420); | ||
89 | } | ||
90 | #endif | ||
diff --git a/include/asm-arm/arch-ep93xx/uncompress.h b/include/asm-arm/arch-ep93xx/uncompress.h new file mode 100644 index 000000000000..c15274c85d5d --- /dev/null +++ b/include/asm-arm/arch-ep93xx/uncompress.h | |||
@@ -0,0 +1,85 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-ep93xx/uncompress.h | ||
3 | * | ||
4 | * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org> | ||
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 as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or (at | ||
9 | * your option) any later version. | ||
10 | */ | ||
11 | |||
12 | #include <asm/arch/ep93xx-regs.h> | ||
13 | |||
14 | static unsigned char __raw_readb(unsigned int ptr) | ||
15 | { | ||
16 | return *((volatile unsigned char *)ptr); | ||
17 | } | ||
18 | |||
19 | static unsigned int __raw_readl(unsigned int ptr) | ||
20 | { | ||
21 | return *((volatile unsigned int *)ptr); | ||
22 | } | ||
23 | |||
24 | static void __raw_writeb(unsigned char value, unsigned int ptr) | ||
25 | { | ||
26 | *((volatile unsigned char *)ptr) = value; | ||
27 | } | ||
28 | |||
29 | static void __raw_writel(unsigned int value, unsigned int ptr) | ||
30 | { | ||
31 | *((volatile unsigned int *)ptr) = value; | ||
32 | } | ||
33 | |||
34 | |||
35 | #define PHYS_UART1_DATA 0x808c0000 | ||
36 | #define PHYS_UART1_FLAG 0x808c0018 | ||
37 | #define UART1_FLAG_TXFF 0x20 | ||
38 | |||
39 | static inline void putc(int c) | ||
40 | { | ||
41 | int i; | ||
42 | |||
43 | for (i = 0; i < 1000; i++) { | ||
44 | /* Transmit fifo not full? */ | ||
45 | if (!(__raw_readb(PHYS_UART1_FLAG) & UART1_FLAG_TXFF)) | ||
46 | break; | ||
47 | } | ||
48 | |||
49 | __raw_writeb(c, PHYS_UART1_DATA); | ||
50 | } | ||
51 | |||
52 | static inline void flush(void) | ||
53 | { | ||
54 | } | ||
55 | |||
56 | |||
57 | /* | ||
58 | * Some bootloaders don't turn off DMA from the ethernet MAC before | ||
59 | * jumping to linux, which means that we might end up with bits of RX | ||
60 | * status and packet data scribbled over the uncompressed kernel image. | ||
61 | * Work around this by resetting the ethernet MAC before we uncompress. | ||
62 | */ | ||
63 | #define PHYS_ETH_SELF_CTL 0x80010020 | ||
64 | #define ETH_SELF_CTL_RESET 0x00000001 | ||
65 | |||
66 | static void ethernet_reset(void) | ||
67 | { | ||
68 | unsigned int v; | ||
69 | |||
70 | /* Reset the ethernet MAC. */ | ||
71 | v = __raw_readl(PHYS_ETH_SELF_CTL); | ||
72 | __raw_writel(v | ETH_SELF_CTL_RESET, PHYS_ETH_SELF_CTL); | ||
73 | |||
74 | /* Wait for reset to finish. */ | ||
75 | while (__raw_readl(PHYS_ETH_SELF_CTL) & ETH_SELF_CTL_RESET) | ||
76 | ; | ||
77 | } | ||
78 | |||
79 | |||
80 | static void arch_decomp_setup(void) | ||
81 | { | ||
82 | ethernet_reset(); | ||
83 | } | ||
84 | |||
85 | #define arch_decomp_wdog() | ||
diff --git a/include/asm-arm/arch-ep93xx/vmalloc.h b/include/asm-arm/arch-ep93xx/vmalloc.h new file mode 100644 index 000000000000..205ea6b1cf5e --- /dev/null +++ b/include/asm-arm/arch-ep93xx/vmalloc.h | |||
@@ -0,0 +1,5 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-ep93xx/vmalloc.h | ||
3 | */ | ||
4 | |||
5 | #define VMALLOC_END 0xfe800000 | ||
diff --git a/include/asm-arm/arch-h720x/irq.h b/include/asm-arm/arch-h720x/irq.h deleted file mode 100644 index b3821e957aa4..000000000000 --- a/include/asm-arm/arch-h720x/irq.h +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-h720x/irq.h | ||
3 | * | ||
4 | * Copyright (C) 2000-2002 Jungjun Kim | ||
5 | * (C) 2003 Robert Schwebel <r.schwebel@pengutronix.de> | ||
6 | * (C) 2003 Thomas Gleixner <tglx@linutronix.de> | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASM_ARCH_IRQ_H | ||
10 | #define __ASM_ARCH_IRQ_H | ||
11 | |||
12 | extern void __init h720x_init_irq (void); | ||
13 | |||
14 | #endif /* __ASM_ARCH_IRQ_H */ | ||
diff --git a/include/asm-arm/arch-h720x/param.h b/include/asm-arm/arch-h720x/param.h deleted file mode 100644 index 2b80235f9847..000000000000 --- a/include/asm-arm/arch-h720x/param.h +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-h720x/param.h | ||
3 | * | ||
4 | * Copyright (C) 2000 Jungjun Kim | ||
5 | */ | ||
6 | |||
7 | #ifndef __ASM_ARCH_PARAM_H | ||
8 | #define __ASM_ARCH_PARAM_H | ||
9 | |||
10 | #endif | ||
diff --git a/include/asm-arm/arch-h720x/uncompress.h b/include/asm-arm/arch-h720x/uncompress.h index 9535764bcc71..18c69e0f3585 100644 --- a/include/asm-arm/arch-h720x/uncompress.h +++ b/include/asm-arm/arch-h720x/uncompress.h | |||
@@ -12,22 +12,20 @@ | |||
12 | #define LSR 0x14 | 12 | #define LSR 0x14 |
13 | #define TEMPTY 0x40 | 13 | #define TEMPTY 0x40 |
14 | 14 | ||
15 | static void putstr(const char *s) | 15 | static inline void putc(int c) |
16 | { | 16 | { |
17 | char c; | ||
18 | volatile unsigned char *p = (volatile unsigned char *)(IO_PHYS+0x20000); | 17 | volatile unsigned char *p = (volatile unsigned char *)(IO_PHYS+0x20000); |
19 | 18 | ||
20 | while ( (c = *s++) != '\0') { | 19 | /* wait until transmit buffer is empty */ |
21 | /* wait until transmit buffer is empty */ | 20 | while((p[LSR] & TEMPTY) == 0x0) |
22 | while((p[LSR] & TEMPTY) == 0x0); | 21 | barrier(); |
23 | /* write next character */ | 22 | |
24 | *p = c; | 23 | /* write next character */ |
25 | 24 | *p = c; | |
26 | if(c == '\n') { | 25 | } |
27 | while((p[LSR] & TEMPTY) == 0x0); | 26 | |
28 | *p = '\r'; | 27 | static inline void flush(void) |
29 | } | 28 | { |
30 | } | ||
31 | } | 29 | } |
32 | 30 | ||
33 | /* | 31 | /* |
diff --git a/include/asm-arm/arch-imx/irq.h b/include/asm-arm/arch-imx/irq.h deleted file mode 100644 index 545e065d2325..000000000000 --- a/include/asm-arm/arch-imx/irq.h +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-imxads/irq.h | ||
3 | * | ||
4 | * Copyright (C) 1999 ARM Limited | ||
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 as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #define fixup_irq(i) (i) | ||
diff --git a/include/asm-arm/arch-imx/param.h b/include/asm-arm/arch-imx/param.h deleted file mode 100644 index 7c724f03333e..000000000000 --- a/include/asm-arm/arch-imx/param.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-imx/param.h | ||
3 | * | ||
4 | * Copyright (C) 1999 ARM Limited | ||
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 as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
diff --git a/include/asm-arm/arch-imx/uncompress.h b/include/asm-arm/arch-imx/uncompress.h index 096077f2750b..da333f69136f 100644 --- a/include/asm-arm/arch-imx/uncompress.h +++ b/include/asm-arm/arch-imx/uncompress.h | |||
@@ -39,8 +39,7 @@ | |||
39 | * | 39 | * |
40 | * This does not append a newline | 40 | * This does not append a newline |
41 | */ | 41 | */ |
42 | static void | 42 | static void putc(int c) |
43 | putstr(const char *s) | ||
44 | { | 43 | { |
45 | unsigned long serial_port; | 44 | unsigned long serial_port; |
46 | 45 | ||
@@ -54,20 +53,14 @@ putstr(const char *s) | |||
54 | return; | 53 | return; |
55 | } while(0); | 54 | } while(0); |
56 | 55 | ||
57 | while (*s) { | 56 | while (!(UART(USR2) & USR2_TXFE)) |
58 | while ( !(UART(USR2) & USR2_TXFE) ) | 57 | barrier(); |
59 | barrier(); | ||
60 | 58 | ||
61 | UART(TXR) = *s; | 59 | UART(TXR) = c; |
62 | 60 | } | |
63 | if (*s == '\n') { | ||
64 | while ( !(UART(USR2) & USR2_TXFE) ) | ||
65 | barrier(); | ||
66 | 61 | ||
67 | UART(TXR) = '\r'; | 62 | static inline void flush(void) |
68 | } | 63 | { |
69 | s++; | ||
70 | } | ||
71 | } | 64 | } |
72 | 65 | ||
73 | /* | 66 | /* |
diff --git a/include/asm-arm/arch-integrator/debug-macro.S b/include/asm-arm/arch-integrator/debug-macro.S index 031d30941791..85b327c352df 100644 --- a/include/asm-arm/arch-integrator/debug-macro.S +++ b/include/asm-arm/arch-integrator/debug-macro.S | |||
@@ -11,8 +11,6 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/amba/serial.h> | ||
15 | |||
16 | .macro addruart,rx | 14 | .macro addruart,rx |
17 | mrc p15, 0, \rx, c1, c0 | 15 | mrc p15, 0, \rx, c1, c0 |
18 | tst \rx, #1 @ MMU enabled? | 16 | tst \rx, #1 @ MMU enabled? |
@@ -21,18 +19,4 @@ | |||
21 | addne \rx, \rx, #0x16000000 >> 4 | 19 | addne \rx, \rx, #0x16000000 >> 4 |
22 | .endm | 20 | .endm |
23 | 21 | ||
24 | .macro senduart,rd,rx | 22 | #include <asm/hardware/debug-pl01x.S> |
25 | strb \rd, [\rx, #UART01x_DR] | ||
26 | .endm | ||
27 | |||
28 | .macro waituart,rd,rx | ||
29 | 1001: ldr \rd, [\rx, #0x18] @ UARTFLG | ||
30 | tst \rd, #1 << 5 @ UARTFLGUTXFF - 1 when full | ||
31 | bne 1001b | ||
32 | .endm | ||
33 | |||
34 | .macro busyuart,rd,rx | ||
35 | 1001: ldr \rd, [\rx, #0x18] @ UARTFLG | ||
36 | tst \rd, #1 << 3 @ UARTFLGUBUSY - 1 when busy | ||
37 | bne 1001b | ||
38 | .endm | ||
diff --git a/include/asm-arm/arch-integrator/param.h b/include/asm-arm/arch-integrator/param.h deleted file mode 100644 index afa582ff3717..000000000000 --- a/include/asm-arm/arch-integrator/param.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-integrator/param.h | ||
3 | * | ||
4 | * Copyright (C) 1999 ARM Limited | ||
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 as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
diff --git a/include/asm-arm/arch-integrator/uncompress.h b/include/asm-arm/arch-integrator/uncompress.h index 3957402741d3..f61825c4d901 100644 --- a/include/asm-arm/arch-integrator/uncompress.h +++ b/include/asm-arm/arch-integrator/uncompress.h | |||
@@ -28,21 +28,18 @@ | |||
28 | /* | 28 | /* |
29 | * This does not append a newline | 29 | * This does not append a newline |
30 | */ | 30 | */ |
31 | static void putstr(const char *s) | 31 | static void putc(int c) |
32 | { | 32 | { |
33 | while (*s) { | 33 | while (AMBA_UART_FR & (1 << 5)) |
34 | while (AMBA_UART_FR & (1 << 5)); | 34 | barrier(); |
35 | 35 | ||
36 | AMBA_UART_DR = *s; | 36 | AMBA_UART_DR = c; |
37 | 37 | } | |
38 | if (*s == '\n') { | ||
39 | while (AMBA_UART_FR & (1 << 5)); | ||
40 | 38 | ||
41 | AMBA_UART_DR = '\r'; | 39 | static inline void flush(void) |
42 | } | 40 | { |
43 | s++; | 41 | while (AMBA_UART_FR & (1 << 3)) |
44 | } | 42 | barrier(); |
45 | while (AMBA_UART_FR & (1 << 3)); | ||
46 | } | 43 | } |
47 | 44 | ||
48 | /* | 45 | /* |
diff --git a/include/asm-arm/arch-iop3xx/debug-macro.S b/include/asm-arm/arch-iop3xx/debug-macro.S index cc15f80ebd9a..ce007e531994 100644 --- a/include/asm-arm/arch-iop3xx/debug-macro.S +++ b/include/asm-arm/arch-iop3xx/debug-macro.S | |||
@@ -28,21 +28,8 @@ | |||
28 | #endif | 28 | #endif |
29 | .endm | 29 | .endm |
30 | 30 | ||
31 | .macro senduart,rd,rx | ||
32 | strb \rd, [\rx] | ||
33 | .endm | ||
34 | |||
35 | .macro busyuart,rd,rx | ||
36 | 1002: ldrb \rd, [\rx, #0x5] | ||
37 | and \rd, \rd, #0x60 | ||
38 | teq \rd, #0x60 | ||
39 | bne 1002b | ||
40 | .endm | ||
41 | |||
42 | .macro waituart,rd,rx | ||
43 | #if !defined(CONFIG_ARCH_IQ80321) || !defined(CONFIG_ARCH_IQ31244) || !defined(CONFIG_ARCH_IQ80331) | 31 | #if !defined(CONFIG_ARCH_IQ80321) || !defined(CONFIG_ARCH_IQ31244) || !defined(CONFIG_ARCH_IQ80331) |
44 | 1001: ldrb \rd, [\rx, #0x6] | 32 | #define FLOW_CONTROL |
45 | tst \rd, #0x10 | ||
46 | beq 1001b | ||
47 | #endif | 33 | #endif |
48 | .endm | 34 | #define UART_SHIFT 0 |
35 | #include <asm/hardware/debug-8250.S> | ||
diff --git a/include/asm-arm/arch-iop3xx/param.h b/include/asm-arm/arch-iop3xx/param.h deleted file mode 100644 index acf404e87358..000000000000 --- a/include/asm-arm/arch-iop3xx/param.h +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-iop3xx/param.h | ||
3 | */ | ||
diff --git a/include/asm-arm/arch-iop3xx/uncompress.h b/include/asm-arm/arch-iop3xx/uncompress.h index 82b88762c3cc..c98eb6254b1f 100644 --- a/include/asm-arm/arch-iop3xx/uncompress.h +++ b/include/asm-arm/arch-iop3xx/uncompress.h | |||
@@ -19,23 +19,15 @@ static volatile UTYPE uart_base; | |||
19 | 19 | ||
20 | #define TX_DONE (UART_LSR_TEMT|UART_LSR_THRE) | 20 | #define TX_DONE (UART_LSR_TEMT|UART_LSR_THRE) |
21 | 21 | ||
22 | static __inline__ void putc(char c) | 22 | static inline void putc(char c) |
23 | { | 23 | { |
24 | while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE); | 24 | while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE) |
25 | barrier(); | ||
25 | *uart_base = c; | 26 | *uart_base = c; |
26 | } | 27 | } |
27 | 28 | ||
28 | /* | 29 | static inline void flush(void) |
29 | * This does not append a newline | ||
30 | */ | ||
31 | static void putstr(const char *s) | ||
32 | { | 30 | { |
33 | while (*s) { | ||
34 | putc(*s); | ||
35 | if (*s == '\n') | ||
36 | putc('\r'); | ||
37 | s++; | ||
38 | } | ||
39 | } | 31 | } |
40 | 32 | ||
41 | static __inline__ void __arch_decomp_setup(unsigned long arch_id) | 33 | static __inline__ void __arch_decomp_setup(unsigned long arch_id) |
diff --git a/include/asm-arm/arch-ixp2000/debug-macro.S b/include/asm-arm/arch-ixp2000/debug-macro.S index 5631e0889861..bc8b39654793 100644 --- a/include/asm-arm/arch-ixp2000/debug-macro.S +++ b/include/asm-arm/arch-ixp2000/debug-macro.S | |||
@@ -23,18 +23,5 @@ | |||
23 | #endif | 23 | #endif |
24 | .endm | 24 | .endm |
25 | 25 | ||
26 | .macro senduart,rd,rx | 26 | #define UART_SHIFT 2 |
27 | strb \rd, [\rx] | 27 | #include <asm/hardware/debug-8250.S> |
28 | .endm | ||
29 | |||
30 | .macro busyuart,rd,rx | ||
31 | 1002: ldrb \rd, [\rx, #0x14] | ||
32 | tst \rd, #0x20 | ||
33 | beq 1002b | ||
34 | .endm | ||
35 | |||
36 | .macro waituart,rd,rx | ||
37 | nop | ||
38 | nop | ||
39 | nop | ||
40 | .endm | ||
diff --git a/include/asm-arm/arch-ixp2000/irq.h b/include/asm-arm/arch-ixp2000/irq.h deleted file mode 100644 index ba00b23f9828..000000000000 --- a/include/asm-arm/arch-ixp2000/irq.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-ixp2000/irq.h | ||
3 | * | ||
4 | * Copyright (C) 2002 Intel Corp. | ||
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 | #define fixup_irq(irq) (irq) | ||
12 | |||
13 | |||
diff --git a/include/asm-arm/arch-ixp2000/ixdp2x00.h b/include/asm-arm/arch-ixp2000/ixdp2x00.h index 229381c64283..546e2e8e27b8 100644 --- a/include/asm-arm/arch-ixp2000/ixdp2x00.h +++ b/include/asm-arm/arch-ixp2000/ixdp2x00.h | |||
@@ -72,12 +72,11 @@ | |||
72 | 72 | ||
73 | #ifndef __ASSEMBLY__ | 73 | #ifndef __ASSEMBLY__ |
74 | /* | 74 | /* |
75 | * Master NPU will always have flash and be PCI master. | 75 | * The master NPU is always PCI master. |
76 | * Slave NPU may or may not have flash but will never be PCI master. | ||
77 | */ | 76 | */ |
78 | static inline unsigned int ixdp2x00_master_npu(void) | 77 | static inline unsigned int ixdp2x00_master_npu(void) |
79 | { | 78 | { |
80 | return ((ixp2000_has_flash()) && (ixp2000_is_pcimaster())); | 79 | return !!ixp2000_is_pcimaster(); |
81 | } | 80 | } |
82 | 81 | ||
83 | /* | 82 | /* |
diff --git a/include/asm-arm/arch-ixp2000/ixp2000-regs.h b/include/asm-arm/arch-ixp2000/ixp2000-regs.h index 2b57f91b4ebd..ccae4bec92c5 100644 --- a/include/asm-arm/arch-ixp2000/ixp2000-regs.h +++ b/include/asm-arm/arch-ixp2000/ixp2000-regs.h | |||
@@ -353,8 +353,8 @@ | |||
353 | * Masks and shifts for various fields in the WTC and RTC registers. | 353 | * Masks and shifts for various fields in the WTC and RTC registers. |
354 | */ | 354 | */ |
355 | #define SLOWPORT_WRTC_MASK_HD 0x0003 | 355 | #define SLOWPORT_WRTC_MASK_HD 0x0003 |
356 | #define SLOWPORT_WRTC_MASK_SU 0x003c | 356 | #define SLOWPORT_WRTC_MASK_PW 0x003c |
357 | #define SLOWPORT_WRTC_MASK_PW 0x03c0 | 357 | #define SLOWPORT_WRTC_MASK_SU 0x03c0 |
358 | 358 | ||
359 | #define SLOWPORT_WRTC_SHIFT_HD 0x00 | 359 | #define SLOWPORT_WRTC_SHIFT_HD 0x00 |
360 | #define SLOWPORT_WRTC_SHIFT_SU 0x02 | 360 | #define SLOWPORT_WRTC_SHIFT_SU 0x02 |
diff --git a/include/asm-arm/arch-ixp2000/param.h b/include/asm-arm/arch-ixp2000/param.h deleted file mode 100644 index 2646d9e5919d..000000000000 --- a/include/asm-arm/arch-ixp2000/param.h +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-ixp2000/param.h | ||
3 | */ | ||
diff --git a/include/asm-arm/arch-ixp2000/system.h b/include/asm-arm/arch-ixp2000/system.h index ddbbb34b5f95..3cc9a04f68cb 100644 --- a/include/asm-arm/arch-ixp2000/system.h +++ b/include/asm-arm/arch-ixp2000/system.h | |||
@@ -37,7 +37,7 @@ static inline void arch_reset(char mode) | |||
37 | * to cause a complete reset of the CPU and all external devices | 37 | * to cause a complete reset of the CPU and all external devices |
38 | * and move the flash bank register back to 0. | 38 | * and move the flash bank register back to 0. |
39 | */ | 39 | */ |
40 | if (machine_is_ixdp2801()) { | 40 | if (machine_is_ixdp2801() || machine_is_ixdp28x5()) { |
41 | unsigned long reset_reg = *IXDP2X01_CPLD_RESET_REG; | 41 | unsigned long reset_reg = *IXDP2X01_CPLD_RESET_REG; |
42 | 42 | ||
43 | reset_reg = 0x55AA0000 | (reset_reg & 0x0000FFFF); | 43 | reset_reg = 0x55AA0000 | (reset_reg & 0x0000FFFF); |
diff --git a/include/asm-arm/arch-ixp2000/uncompress.h b/include/asm-arm/arch-ixp2000/uncompress.h index 3d3d5b2ed6e9..f66b408f363e 100644 --- a/include/asm-arm/arch-ixp2000/uncompress.h +++ b/include/asm-arm/arch-ixp2000/uncompress.h | |||
@@ -29,23 +29,18 @@ | |||
29 | #define UARTSR PHYS(0x14) /* Status reg */ | 29 | #define UARTSR PHYS(0x14) /* Status reg */ |
30 | 30 | ||
31 | 31 | ||
32 | static __inline__ void putc(char c) | 32 | static inline void putc(int c) |
33 | { | 33 | { |
34 | int j = 0x1000; | 34 | int j = 0x1000; |
35 | 35 | ||
36 | while (--j && !(*UARTSR & UART_LSR_THRE)); | 36 | while (--j && !(*UARTSR & UART_LSR_THRE)) |
37 | barrier(); | ||
38 | |||
37 | *UARTDR = c; | 39 | *UARTDR = c; |
38 | } | 40 | } |
39 | 41 | ||
40 | static void putstr(const char *s) | 42 | static inline void flush(void) |
41 | { | 43 | { |
42 | while (*s) | ||
43 | { | ||
44 | putc(*s); | ||
45 | if (*s == '\n') | ||
46 | putc('\r'); | ||
47 | s++; | ||
48 | } | ||
49 | } | 44 | } |
50 | 45 | ||
51 | #define arch_decomp_setup() | 46 | #define arch_decomp_setup() |
diff --git a/include/asm-arm/arch-ixp23xx/debug-macro.S b/include/asm-arm/arch-ixp23xx/debug-macro.S new file mode 100644 index 000000000000..eb99fd69fd24 --- /dev/null +++ b/include/asm-arm/arch-ixp23xx/debug-macro.S | |||
@@ -0,0 +1,23 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ixp23xx/debug-macro.S | ||
3 | * | ||
4 | * Debugging macro include header | ||
5 | * | ||
6 | * Copyright (C) 1994-1999 Russell King | ||
7 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | #include <asm/arch/ixp23xx.h> | ||
14 | |||
15 | .macro addruart,rx | ||
16 | mrc p15, 0, \rx, c1, c0 | ||
17 | tst \rx, #1 @ mmu enabled? | ||
18 | ldreq \rx, =IXP23XX_PERIPHERAL_PHYS @ physical | ||
19 | ldrne \rx, =IXP23XX_PERIPHERAL_VIRT @ virtual | ||
20 | .endm | ||
21 | |||
22 | #define UART_SHIFT 2 | ||
23 | #include <asm/hardware/debug-8250.S> | ||
diff --git a/include/asm-arm/arch-ixp23xx/dma.h b/include/asm-arm/arch-ixp23xx/dma.h new file mode 100644 index 000000000000..2f4335e3b836 --- /dev/null +++ b/include/asm-arm/arch-ixp23xx/dma.h | |||
@@ -0,0 +1,3 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ixp23xx/dma.h | ||
3 | */ | ||
diff --git a/include/asm-arm/arch-ixp23xx/entry-macro.S b/include/asm-arm/arch-ixp23xx/entry-macro.S new file mode 100644 index 000000000000..0ef4e6016ac4 --- /dev/null +++ b/include/asm-arm/arch-ixp23xx/entry-macro.S | |||
@@ -0,0 +1,31 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ixp23xx/entry-macro.S | ||
3 | */ | ||
4 | |||
5 | .macro disable_fiq | ||
6 | .endm | ||
7 | |||
8 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
9 | ldr \irqnr, =(IXP23XX_INTC_VIRT + IXP23XX_INTR_IRQ_ENC_ST_OFFSET) | ||
10 | ldr \irqnr, [\irqnr] @ get interrupt number | ||
11 | cmp \irqnr, #0x0 @ suprious interrupt ? | ||
12 | movne \irqnr, \irqnr, lsr #2 @ skip unwanted low order bits | ||
13 | subne \irqnr, \irqnr, #1 @ convert to 0 based | ||
14 | |||
15 | #if 0 | ||
16 | cmp \irqnr, #IRQ_IXP23XX_PCI_INT_RPH | ||
17 | bne 1001f | ||
18 | mov \irqnr, #IRQ_IXP23XX_INTA | ||
19 | |||
20 | ldr \irqnr, =0xf5000030 | ||
21 | |||
22 | mov \tmp, #(1<<26) | ||
23 | tst \irqnr, \tmp | ||
24 | movne \irqnr, #IRQ_IXP23XX_INTB | ||
25 | |||
26 | mov \tmp, #(1<<27) | ||
27 | tst \irqnr, \tmp | ||
28 | movne \irqnr, #IRQ_IXP23XX_INTA | ||
29 | 1001: | ||
30 | #endif | ||
31 | .endm | ||
diff --git a/include/asm-arm/arch-ixp23xx/hardware.h b/include/asm-arm/arch-ixp23xx/hardware.h new file mode 100644 index 000000000000..c0010d21a684 --- /dev/null +++ b/include/asm-arm/arch-ixp23xx/hardware.h | |||
@@ -0,0 +1,37 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ixp23xx/hardware.h | ||
3 | * | ||
4 | * Copyright (C) 2002-2004 Intel Corporation. | ||
5 | * Copyricht (C) 2005 MontaVista Software, Inc. | ||
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 | * Hardware definitions for IXP23XX based systems | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASM_ARCH_HARDWARE_H | ||
15 | #define __ASM_ARCH_HARDWARE_H | ||
16 | |||
17 | /* PCI IO info */ | ||
18 | #define PCIO_BASE IXP23XX_PCI_IO_VIRT | ||
19 | #define PCIBIOS_MIN_IO 0x00000000 | ||
20 | #define PCIBIOS_MIN_MEM 0xe0000000 | ||
21 | |||
22 | #include "ixp23xx.h" | ||
23 | |||
24 | #define pcibios_assign_all_busses() 0 | ||
25 | |||
26 | /* | ||
27 | * Platform helper functions | ||
28 | */ | ||
29 | #include "platform.h" | ||
30 | |||
31 | /* | ||
32 | * Platform-specific headers | ||
33 | */ | ||
34 | #include "ixdp2351.h" | ||
35 | |||
36 | |||
37 | #endif | ||
diff --git a/include/asm-arm/arch-ixp23xx/io.h b/include/asm-arm/arch-ixp23xx/io.h new file mode 100644 index 000000000000..18415a81ac74 --- /dev/null +++ b/include/asm-arm/arch-ixp23xx/io.h | |||
@@ -0,0 +1,54 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ixp23xx/io.h | ||
3 | * | ||
4 | * Original Author: Naeem M Afzal <naeem.m.afzal@intel.com> | ||
5 | * Maintainer: Deepak Saxena <dsaxena@plexity.net> | ||
6 | * | ||
7 | * Copyright (C) 2003-2005 Intel Corp. | ||
8 | * Copyright (C) 2005 MontaVista Software, Inc | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #ifndef __ASM_ARCH_IO_H | ||
16 | #define __ASM_ARCH_IO_H | ||
17 | |||
18 | #define IO_SPACE_LIMIT 0xffffffff | ||
19 | |||
20 | #define __io(p) ((void __iomem*)((p) + IXP23XX_PCI_IO_VIRT)) | ||
21 | #define __mem_pci(a) (a) | ||
22 | |||
23 | #include <linux/kernel.h> /* For BUG */ | ||
24 | |||
25 | static inline void __iomem * | ||
26 | ixp23xx_ioremap(unsigned long addr, unsigned long size, unsigned long flags) | ||
27 | { | ||
28 | if (addr >= IXP23XX_PCI_MEM_START && | ||
29 | addr <= IXP23XX_PCI_MEM_START + IXP23XX_PCI_MEM_SIZE) { | ||
30 | if (addr + size > IXP23XX_PCI_MEM_START + IXP23XX_PCI_MEM_SIZE) | ||
31 | return NULL; | ||
32 | |||
33 | return (void __iomem *) | ||
34 | ((addr - IXP23XX_PCI_MEM_START) + IXP23XX_PCI_MEM_VIRT); | ||
35 | } | ||
36 | |||
37 | return __ioremap(addr, size, flags); | ||
38 | } | ||
39 | |||
40 | static inline void | ||
41 | ixp23xx_iounmap(void __iomem *addr) | ||
42 | { | ||
43 | if ((((u32)addr) >= IXP23XX_PCI_MEM_VIRT) && | ||
44 | (((u32)addr) < IXP23XX_PCI_MEM_VIRT + IXP23XX_PCI_MEM_SIZE)) | ||
45 | return; | ||
46 | |||
47 | __iounmap(addr); | ||
48 | } | ||
49 | |||
50 | #define __arch_ioremap(a,s,f) ixp23xx_ioremap(a,s,f) | ||
51 | #define __arch_iounmap(a) ixp23xx_iounmap(a) | ||
52 | |||
53 | |||
54 | #endif | ||
diff --git a/include/asm-arm/arch-ixp23xx/irqs.h b/include/asm-arm/arch-ixp23xx/irqs.h new file mode 100644 index 000000000000..e69639585721 --- /dev/null +++ b/include/asm-arm/arch-ixp23xx/irqs.h | |||
@@ -0,0 +1,223 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ixp23xx/irqs.h | ||
3 | * | ||
4 | * IRQ definitions for IXP23XX based systems | ||
5 | * | ||
6 | * Author: Naeem Afzal <naeem.m.afzal@intel.com> | ||
7 | * | ||
8 | * Copyright (C) 2003-2004 Intel Corporation. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License version 2 as | ||
12 | * published by the Free Software Foundation. | ||
13 | */ | ||
14 | |||
15 | #ifndef __ASM_ARCH_IRQS_H | ||
16 | #define __ASM_ARCH_IRQS_H | ||
17 | |||
18 | #define NR_IXP23XX_IRQS IRQ_IXP23XX_INTB+1 | ||
19 | #define IRQ_IXP23XX_EXTIRQS NR_IXP23XX_IRQS | ||
20 | |||
21 | |||
22 | #define IRQ_IXP23XX_DBG0 0 /* Debug/Execution/MBox */ | ||
23 | #define IRQ_IXP23XX_DBG1 1 /* Debug/Execution/MBox */ | ||
24 | #define IRQ_IXP23XX_NPE_TRG 2 /* npe_trigger */ | ||
25 | #define IRQ_IXP23XX_TIMER1 3 /* Timer[0] */ | ||
26 | #define IRQ_IXP23XX_TIMER2 4 /* Timer[1] */ | ||
27 | #define IRQ_IXP23XX_TIMESTAMP 5 /* Timer[2], Time-stamp */ | ||
28 | #define IRQ_IXP23XX_WDOG 6 /* Time[3], Watchdog Timer */ | ||
29 | #define IRQ_IXP23XX_PCI_DBELL 7 /* PCI Doorbell */ | ||
30 | #define IRQ_IXP23XX_PCI_DMA1 8 /* PCI DMA Channel 1 */ | ||
31 | #define IRQ_IXP23XX_PCI_DMA2 9 /* PCI DMA Channel 2 */ | ||
32 | #define IRQ_IXP23XX_PCI_DMA3 10 /* PCI DMA Channel 3 */ | ||
33 | #define IRQ_IXP23XX_PCI_INT_RPH 11 /* pcxg_pci_int_rph */ | ||
34 | #define IRQ_IXP23XX_CPP_PMU 12 /* xpxg_pm_int_rpl */ | ||
35 | #define IRQ_IXP23XX_SWINT0 13 /* S/W Interrupt0 */ | ||
36 | #define IRQ_IXP23XX_SWINT1 14 /* S/W Interrupt1 */ | ||
37 | #define IRQ_IXP23XX_UART2 15 /* UART1 Interrupt */ | ||
38 | #define IRQ_IXP23XX_UART1 16 /* UART0 Interrupt */ | ||
39 | #define IRQ_IXP23XX_XSI_PMU_ROLLOVER 17 /* AHB Performance M. Unit counter rollover */ | ||
40 | #define IRQ_IXP23XX_XSI_AHB_PM0 18 /* intr_pm_o */ | ||
41 | #define IRQ_IXP23XX_XSI_AHB_ECE0 19 /* intr_ece_o */ | ||
42 | #define IRQ_IXP23XX_XSI_AHB_GASKET 20 /* gas_intr_o */ | ||
43 | #define IRQ_IXP23XX_XSI_CPP 21 /* xsi2cpp_int */ | ||
44 | #define IRQ_IXP23XX_CPP_XSI 22 /* cpp2xsi_int */ | ||
45 | #define IRQ_IXP23XX_ME_ATTN0 23 /* ME_ATTN */ | ||
46 | #define IRQ_IXP23XX_ME_ATTN1 24 /* ME_ATTN */ | ||
47 | #define IRQ_IXP23XX_ME_ATTN2 25 /* ME_ATTN */ | ||
48 | #define IRQ_IXP23XX_ME_ATTN3 26 /* ME_ATTN */ | ||
49 | #define IRQ_IXP23XX_PCI_ERR_RPH 27 /* PCXG_PCI_ERR_RPH */ | ||
50 | #define IRQ_IXP23XX_D0XG_ECC_CORR 28 /* D0XG_DRAM_ECC_CORR */ | ||
51 | #define IRQ_IXP23XX_D0XG_ECC_UNCORR 29 /* D0XG_DRAM_ECC_UNCORR */ | ||
52 | #define IRQ_IXP23XX_SRAM_ERR1 30 /* SRAM1_ERR */ | ||
53 | #define IRQ_IXP23XX_SRAM_ERR0 31 /* SRAM0_ERR */ | ||
54 | #define IRQ_IXP23XX_MEDIA_ERR 32 /* MEDIA_ERR */ | ||
55 | #define IRQ_IXP23XX_STH_DRAM_ECC_MAJ 33 /* STH_DRAM0_ECC_MAJ */ | ||
56 | #define IRQ_IXP23XX_GPIO6 34 /* GPIO0 interrupts */ | ||
57 | #define IRQ_IXP23XX_GPIO7 35 /* GPIO1 interrupts */ | ||
58 | #define IRQ_IXP23XX_GPIO8 36 /* GPIO2 interrupts */ | ||
59 | #define IRQ_IXP23XX_GPIO9 37 /* GPIO3 interrupts */ | ||
60 | #define IRQ_IXP23XX_GPIO10 38 /* GPIO4 interrupts */ | ||
61 | #define IRQ_IXP23XX_GPIO11 39 /* GPIO5 interrupts */ | ||
62 | #define IRQ_IXP23XX_GPIO12 40 /* GPIO6 interrupts */ | ||
63 | #define IRQ_IXP23XX_GPIO13 41 /* GPIO7 interrupts */ | ||
64 | #define IRQ_IXP23XX_GPIO14 42 /* GPIO8 interrupts */ | ||
65 | #define IRQ_IXP23XX_GPIO15 43 /* GPIO9 interrupts */ | ||
66 | #define IRQ_IXP23XX_SHAC_RING0 44 /* SHAC Ring Full */ | ||
67 | #define IRQ_IXP23XX_SHAC_RING1 45 /* SHAC Ring Full */ | ||
68 | #define IRQ_IXP23XX_SHAC_RING2 46 /* SHAC Ring Full */ | ||
69 | #define IRQ_IXP23XX_SHAC_RING3 47 /* SHAC Ring Full */ | ||
70 | #define IRQ_IXP23XX_SHAC_RING4 48 /* SHAC Ring Full */ | ||
71 | #define IRQ_IXP23XX_SHAC_RING5 49 /* SHAC Ring Full */ | ||
72 | #define IRQ_IXP23XX_SHAC_RING6 50 /* SHAC RING Full */ | ||
73 | #define IRQ_IXP23XX_SHAC_RING7 51 /* SHAC Ring Full */ | ||
74 | #define IRQ_IXP23XX_SHAC_RING8 52 /* SHAC Ring Full */ | ||
75 | #define IRQ_IXP23XX_SHAC_RING9 53 /* SHAC Ring Full */ | ||
76 | #define IRQ_IXP23XX_SHAC_RING10 54 /* SHAC Ring Full */ | ||
77 | #define IRQ_IXP23XX_SHAC_RING11 55 /* SHAC Ring Full */ | ||
78 | #define IRQ_IXP23XX_ME_THREAD_A0_ME0 56 /* ME_THREAD_A */ | ||
79 | #define IRQ_IXP23XX_ME_THREAD_A1_ME0 57 /* ME_THREAD_A */ | ||
80 | #define IRQ_IXP23XX_ME_THREAD_A2_ME0 58 /* ME_THREAD_A */ | ||
81 | #define IRQ_IXP23XX_ME_THREAD_A3_ME0 59 /* ME_THREAD_A */ | ||
82 | #define IRQ_IXP23XX_ME_THREAD_A4_ME0 60 /* ME_THREAD_A */ | ||
83 | #define IRQ_IXP23XX_ME_THREAD_A5_ME0 61 /* ME_THREAD_A */ | ||
84 | #define IRQ_IXP23XX_ME_THREAD_A6_ME0 62 /* ME_THREAD_A */ | ||
85 | #define IRQ_IXP23XX_ME_THREAD_A7_ME0 63 /* ME_THREAD_A */ | ||
86 | #define IRQ_IXP23XX_ME_THREAD_A8_ME1 64 /* ME_THREAD_A */ | ||
87 | #define IRQ_IXP23XX_ME_THREAD_A9_ME1 65 /* ME_THREAD_A */ | ||
88 | #define IRQ_IXP23XX_ME_THREAD_A10_ME1 66 /* ME_THREAD_A */ | ||
89 | #define IRQ_IXP23XX_ME_THREAD_A11_ME1 67 /* ME_THREAD_A */ | ||
90 | #define IRQ_IXP23XX_ME_THREAD_A12_ME1 68 /* ME_THREAD_A */ | ||
91 | #define IRQ_IXP23XX_ME_THREAD_A13_ME1 69 /* ME_THREAD_A */ | ||
92 | #define IRQ_IXP23XX_ME_THREAD_A14_ME1 70 /* ME_THREAD_A */ | ||
93 | #define IRQ_IXP23XX_ME_THREAD_A15_ME1 71 /* ME_THREAD_A */ | ||
94 | #define IRQ_IXP23XX_ME_THREAD_A16_ME2 72 /* ME_THREAD_A */ | ||
95 | #define IRQ_IXP23XX_ME_THREAD_A17_ME2 73 /* ME_THREAD_A */ | ||
96 | #define IRQ_IXP23XX_ME_THREAD_A18_ME2 74 /* ME_THREAD_A */ | ||
97 | #define IRQ_IXP23XX_ME_THREAD_A19_ME2 75 /* ME_THREAD_A */ | ||
98 | #define IRQ_IXP23XX_ME_THREAD_A20_ME2 76 /* ME_THREAD_A */ | ||
99 | #define IRQ_IXP23XX_ME_THREAD_A21_ME2 77 /* ME_THREAD_A */ | ||
100 | #define IRQ_IXP23XX_ME_THREAD_A22_ME2 78 /* ME_THREAD_A */ | ||
101 | #define IRQ_IXP23XX_ME_THREAD_A23_ME2 79 /* ME_THREAD_A */ | ||
102 | #define IRQ_IXP23XX_ME_THREAD_A24_ME3 80 /* ME_THREAD_A */ | ||
103 | #define IRQ_IXP23XX_ME_THREAD_A25_ME3 81 /* ME_THREAD_A */ | ||
104 | #define IRQ_IXP23XX_ME_THREAD_A26_ME3 82 /* ME_THREAD_A */ | ||
105 | #define IRQ_IXP23XX_ME_THREAD_A27_ME3 83 /* ME_THREAD_A */ | ||
106 | #define IRQ_IXP23XX_ME_THREAD_A28_ME3 84 /* ME_THREAD_A */ | ||
107 | #define IRQ_IXP23XX_ME_THREAD_A29_ME3 85 /* ME_THREAD_A */ | ||
108 | #define IRQ_IXP23XX_ME_THREAD_A30_ME3 86 /* ME_THREAD_A */ | ||
109 | #define IRQ_IXP23XX_ME_THREAD_A31_ME3 87 /* ME_THREAD_A */ | ||
110 | #define IRQ_IXP23XX_ME_THREAD_B0_ME0 88 /* ME_THREAD_B */ | ||
111 | #define IRQ_IXP23XX_ME_THREAD_B1_ME0 89 /* ME_THREAD_B */ | ||
112 | #define IRQ_IXP23XX_ME_THREAD_B2_ME0 90 /* ME_THREAD_B */ | ||
113 | #define IRQ_IXP23XX_ME_THREAD_B3_ME0 91 /* ME_THREAD_B */ | ||
114 | #define IRQ_IXP23XX_ME_THREAD_B4_ME0 92 /* ME_THREAD_B */ | ||
115 | #define IRQ_IXP23XX_ME_THREAD_B5_ME0 93 /* ME_THREAD_B */ | ||
116 | #define IRQ_IXP23XX_ME_THREAD_B6_ME0 94 /* ME_THREAD_B */ | ||
117 | #define IRQ_IXP23XX_ME_THREAD_B7_ME0 95 /* ME_THREAD_B */ | ||
118 | #define IRQ_IXP23XX_ME_THREAD_B8_ME1 96 /* ME_THREAD_B */ | ||
119 | #define IRQ_IXP23XX_ME_THREAD_B9_ME1 97 /* ME_THREAD_B */ | ||
120 | #define IRQ_IXP23XX_ME_THREAD_B10_ME1 98 /* ME_THREAD_B */ | ||
121 | #define IRQ_IXP23XX_ME_THREAD_B11_ME1 99 /* ME_THREAD_B */ | ||
122 | #define IRQ_IXP23XX_ME_THREAD_B12_ME1 100 /* ME_THREAD_B */ | ||
123 | #define IRQ_IXP23XX_ME_THREAD_B13_ME1 101 /* ME_THREAD_B */ | ||
124 | #define IRQ_IXP23XX_ME_THREAD_B14_ME1 102 /* ME_THREAD_B */ | ||
125 | #define IRQ_IXP23XX_ME_THREAD_B15_ME1 103 /* ME_THREAD_B */ | ||
126 | #define IRQ_IXP23XX_ME_THREAD_B16_ME2 104 /* ME_THREAD_B */ | ||
127 | #define IRQ_IXP23XX_ME_THREAD_B17_ME2 105 /* ME_THREAD_B */ | ||
128 | #define IRQ_IXP23XX_ME_THREAD_B18_ME2 106 /* ME_THREAD_B */ | ||
129 | #define IRQ_IXP23XX_ME_THREAD_B19_ME2 107 /* ME_THREAD_B */ | ||
130 | #define IRQ_IXP23XX_ME_THREAD_B20_ME2 108 /* ME_THREAD_B */ | ||
131 | #define IRQ_IXP23XX_ME_THREAD_B21_ME2 109 /* ME_THREAD_B */ | ||
132 | #define IRQ_IXP23XX_ME_THREAD_B22_ME2 110 /* ME_THREAD_B */ | ||
133 | #define IRQ_IXP23XX_ME_THREAD_B23_ME2 111 /* ME_THREAD_B */ | ||
134 | #define IRQ_IXP23XX_ME_THREAD_B24_ME3 112 /* ME_THREAD_B */ | ||
135 | #define IRQ_IXP23XX_ME_THREAD_B25_ME3 113 /* ME_THREAD_B */ | ||
136 | #define IRQ_IXP23XX_ME_THREAD_B26_ME3 114 /* ME_THREAD_B */ | ||
137 | #define IRQ_IXP23XX_ME_THREAD_B27_ME3 115 /* ME_THREAD_B */ | ||
138 | #define IRQ_IXP23XX_ME_THREAD_B28_ME3 116 /* ME_THREAD_B */ | ||
139 | #define IRQ_IXP23XX_ME_THREAD_B29_ME3 117 /* ME_THREAD_B */ | ||
140 | #define IRQ_IXP23XX_ME_THREAD_B30_ME3 118 /* ME_THREAD_B */ | ||
141 | #define IRQ_IXP23XX_ME_THREAD_B31_ME3 119 /* ME_THREAD_B */ | ||
142 | |||
143 | #define NUM_IXP23XX_RAW_IRQS 120 | ||
144 | |||
145 | #define IRQ_IXP23XX_INTA 120 /* Indirect pcxg_pci_int_rph */ | ||
146 | #define IRQ_IXP23XX_INTB 121 /* Indirect pcxg_pci_int_rph */ | ||
147 | |||
148 | #define NR_IXP23XX_IRQ (IRQ_IXP23XX_INTB + 1) | ||
149 | |||
150 | /* | ||
151 | * We default to 32 per-board IRQs. Increase this number if you need | ||
152 | * more, but keep it realistic. | ||
153 | */ | ||
154 | #define NR_IXP23XX_MACH_IRQS 32 | ||
155 | |||
156 | #define NR_IRQS NR_IXP23XX_IRQS + NR_IXP23XX_MACH_IRQS | ||
157 | |||
158 | #define IXP23XX_MACH_IRQ(irq) (NR_IXP23XX_IRQ + (irq)) | ||
159 | |||
160 | |||
161 | /* | ||
162 | * IXDP2351-specific interrupts | ||
163 | */ | ||
164 | |||
165 | /* | ||
166 | * External PCI interrupts signaled through INTB | ||
167 | * | ||
168 | */ | ||
169 | #define IXDP2351_INTB_IRQ_BASE 0 | ||
170 | #define IRQ_IXDP2351_INTA_82546 IXP23XX_MACH_IRQ(0) | ||
171 | #define IRQ_IXDP2351_INTB_82546 IXP23XX_MACH_IRQ(1) | ||
172 | #define IRQ_IXDP2351_SPCI_DB_0 IXP23XX_MACH_IRQ(2) | ||
173 | #define IRQ_IXDP2351_SPCI_DB_1 IXP23XX_MACH_IRQ(3) | ||
174 | #define IRQ_IXDP2351_SPCI_PMC_INTA IXP23XX_MACH_IRQ(4) | ||
175 | #define IRQ_IXDP2351_SPCI_PMC_INTB IXP23XX_MACH_IRQ(5) | ||
176 | #define IRQ_IXDP2351_SPCI_PMC_INTC IXP23XX_MACH_IRQ(6) | ||
177 | #define IRQ_IXDP2351_SPCI_PMC_INTD IXP23XX_MACH_IRQ(7) | ||
178 | #define IRQ_IXDP2351_SPCI_FIC IXP23XX_MACH_IRQ(8) | ||
179 | |||
180 | #define IXDP2351_INTB_IRQ_BIT(irq) (irq - IXP23XX_MACH_IRQ(0)) | ||
181 | #define IXDP2351_INTB_IRQ_MASK(irq) (1 << IXDP2351_INTB_IRQ_BIT(irq)) | ||
182 | #define IXDP2351_INTB_IRQ_VALID 0x01FF | ||
183 | #define IXDP2351_INTB_IRQ_NUM 16 | ||
184 | |||
185 | /* | ||
186 | * Other external interrupts signaled through INTA | ||
187 | */ | ||
188 | #define IXDP2351_INTA_IRQ_BASE 16 | ||
189 | #define IRQ_IXDP2351_IPMI_FROM IXP23XX_MACH_IRQ(16) | ||
190 | #define IRQ_IXDP2351_125US IXP23XX_MACH_IRQ(17) | ||
191 | #define IRQ_IXDP2351_DB_0_ADD IXP23XX_MACH_IRQ(18) | ||
192 | #define IRQ_IXDP2351_DB_1_ADD IXP23XX_MACH_IRQ(19) | ||
193 | #define IRQ_IXDP2351_DEBUG1 IXP23XX_MACH_IRQ(20) | ||
194 | #define IRQ_IXDP2351_ADD_UART IXP23XX_MACH_IRQ(21) | ||
195 | #define IRQ_IXDP2351_FIC_ADD IXP23XX_MACH_IRQ(24) | ||
196 | #define IRQ_IXDP2351_CS8900 IXP23XX_MACH_IRQ(25) | ||
197 | #define IRQ_IXDP2351_BBSRAM IXP23XX_MACH_IRQ(26) | ||
198 | #define IRQ_IXDP2351_CONFIG_MEDIA IXP23XX_MACH_IRQ(27) | ||
199 | #define IRQ_IXDP2351_CLOCK_REF IXP23XX_MACH_IRQ(28) | ||
200 | #define IRQ_IXDP2351_A10_NP IXP23XX_MACH_IRQ(29) | ||
201 | #define IRQ_IXDP2351_A11_NP IXP23XX_MACH_IRQ(30) | ||
202 | #define IRQ_IXDP2351_DEBUG_NP IXP23XX_MACH_IRQ(31) | ||
203 | |||
204 | #define IXDP2351_INTA_IRQ_BIT(irq) (irq - IXP23XX_MACH_IRQ(16)) | ||
205 | #define IXDP2351_INTA_IRQ_MASK(irq) (1 << IXDP2351_INTA_IRQ_BIT(irq)) | ||
206 | #define IXDP2351_INTA_IRQ_VALID 0xFF3F | ||
207 | #define IXDP2351_INTA_IRQ_NUM 16 | ||
208 | |||
209 | |||
210 | /* | ||
211 | * ADI RoadRunner IRQs | ||
212 | */ | ||
213 | #define IRQ_ROADRUNNER_PCI_INTA IRQ_IXP23XX_INTA | ||
214 | #define IRQ_ROADRUNNER_PCI_INTB IRQ_IXP23XX_INTB | ||
215 | #define IRQ_ROADRUNNER_PCI_INTC IRQ_IXP23XX_GPIO11 | ||
216 | #define IRQ_ROADRUNNER_PCI_INTD IRQ_IXP23XX_GPIO12 | ||
217 | |||
218 | /* | ||
219 | * Put new board definitions here | ||
220 | */ | ||
221 | |||
222 | |||
223 | #endif | ||
diff --git a/include/asm-arm/arch-ixp23xx/ixdp2351.h b/include/asm-arm/arch-ixp23xx/ixdp2351.h new file mode 100644 index 000000000000..4a24f8f15655 --- /dev/null +++ b/include/asm-arm/arch-ixp23xx/ixdp2351.h | |||
@@ -0,0 +1,89 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ixp23xx/ixdp2351.h | ||
3 | * | ||
4 | * Register and other defines for IXDP2351 | ||
5 | * | ||
6 | * Copyright (c) 2002-2004 Intel Corp. | ||
7 | * Copytight (c) 2005 MontaVista Software, Inc. | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify it | ||
10 | * under the terms of the GNU General Public License as published by the | ||
11 | * Free Software Foundation; either version 2 of the License, or (at your | ||
12 | * option) any later version. | ||
13 | */ | ||
14 | |||
15 | #ifndef __ASM_ARCH_IXDP2351_H | ||
16 | #define __ASM_ARCH_IXDP2351_H | ||
17 | |||
18 | /* | ||
19 | * NP module memory map | ||
20 | */ | ||
21 | #define IXDP2351_NP_PHYS_BASE (IXP23XX_EXP_BUS_CS4_BASE) | ||
22 | #define IXDP2351_NP_PHYS_SIZE 0x00100000 | ||
23 | #define IXDP2351_NP_VIRT_BASE 0xeff00000 | ||
24 | |||
25 | #define IXDP2351_VIRT_CS8900_BASE (IXDP2351_NP_VIRT_BASE) | ||
26 | #define IXDP2351_VIRT_CS8900_END (IXDP2351_VIRT_CS8900_BASE + 16) | ||
27 | |||
28 | #define IXDP2351_VIRT_NP_CPLD_BASE (IXP23XX_EXP_BUS_CS4_BASE_VIRT + 0x00010000) | ||
29 | |||
30 | #define IXDP2351_NP_CPLD_REG(reg) ((volatile u16 *)(IXDP2351_VIRT_NP_CPLD_BASE + reg)) | ||
31 | |||
32 | #define IXDP2351_NP_CPLD_RESET1_REG IXDP2351_NP_CPLD_REG(0x00) | ||
33 | #define IXDP2351_NP_CPLD_LED_REG IXDP2351_NP_CPLD_REG(0x02) | ||
34 | #define IXDP2351_NP_CPLD_VERSION_REG IXDP2351_NP_CPLD_REG(0x04) | ||
35 | |||
36 | /* | ||
37 | * Base board module memory map | ||
38 | */ | ||
39 | |||
40 | #define IXDP2351_BB_BASE_PHYS (IXP23XX_EXP_BUS_CS5_BASE) | ||
41 | #define IXDP2351_BB_SIZE 0x01000000 | ||
42 | #define IXDP2351_BB_BASE_VIRT (0xee000000) | ||
43 | |||
44 | #define IXDP2351_BB_AREA_BASE(offset) (IXDP2351_BB_BASE_VIRT + offset) | ||
45 | |||
46 | #define IXDP2351_VIRT_NVRAM_BASE IXDP2351_BB_AREA_BASE(0x0) | ||
47 | #define IXDP2351_NVRAM_SIZE (0x20000) | ||
48 | |||
49 | #define IXDP2351_VIRT_MB_IXF1104_BASE IXDP3251_BB_AREA_BASE(0x00020000) | ||
50 | #define IXDP2351_VIRT_ADD_UART_BASE IXDP2351_BB_AREA_BASE(0x000240C0) | ||
51 | #define IXDP2351_VIRT_FIC_BASE IXDP2351_BB_AREA_BASE(0x00200000) | ||
52 | #define IXDP2351_VIRT_DB0_BASE IXDP2351_BB_AREA_BASE(0x00400000) | ||
53 | #define IXDP2351_VIRT_DB1_BASE IXDP2351_BB_AREA_BASE(0x00600000) | ||
54 | #define IXDP2351_VIRT_CPLD_BASE IXDP2351_BB_AREA_BASE(0x00024000) | ||
55 | |||
56 | /* | ||
57 | * On board CPLD registers | ||
58 | */ | ||
59 | #define IXDP2351_CPLD_BB_REG(reg) ((volatile u16 *)(IXDP2351_VIRT_CPLD_BASE + reg)) | ||
60 | |||
61 | #define IXDP2351_CPLD_RESET0_REG IXDP2351_CPLD_BB_REG(0x00) | ||
62 | #define IXDP2351_CPLD_RESET1_REG IXDP2351_CPLD_BB_REG(0x04) | ||
63 | |||
64 | #define IXDP2351_CPLD_RESET1_MAGIC 0x55AA | ||
65 | #define IXDP2351_CPLD_RESET1_ENABLE 0x8000 | ||
66 | |||
67 | #define IXDP2351_CPLD_FPGA_CONFIG_REG IXDP2351_CPLD_BB_REG(0x08) | ||
68 | #define IXDP2351_CPLD_INTB_MASK_SET_REG IXDP2351_CPLD_BB_REG(0x10) | ||
69 | #define IXDP2351_CPLD_INTA_MASK_SET_REG IXDP2351_CPLD_BB_REG(0x14) | ||
70 | #define IXDP2351_CPLD_INTB_STAT_REG IXDP2351_CPLD_BB_REG(0x18) | ||
71 | #define IXDP2351_CPLD_INTA_STAT_REG IXDP2351_CPLD_BB_REG(0x1C) | ||
72 | #define IXDP2351_CPLD_INTB_RAW_REG IXDP2351_CPLD_BB_REG(0x20) /* read */ | ||
73 | #define IXDP2351_CPLD_INTA_RAW_REG IXDP2351_CPLD_BB_REG(0x24) /* read */ | ||
74 | #define IXDP2351_CPLD_INTB_MASK_CLR_REG IXDP2351_CPLD_INTB_RAW_REG /* write */ | ||
75 | #define IXDP2351_CPLD_INTA_MASK_CLR_REG IXDP2351_CPLD_INTA_RAW_REG /* write */ | ||
76 | #define IXDP2351_CPLD_INTB_SIM_REG IXDP2351_CPLD_BB_REG(0x28) | ||
77 | #define IXDP2351_CPLD_INTA_SIM_REG IXDP2351_CPLD_BB_REG(0x2C) | ||
78 | /* Interrupt bits are defined in irqs.h */ | ||
79 | #define IXDP2351_CPLD_BB_GBE0_REG IXDP2351_CPLD_BB_REG(0x30) | ||
80 | #define IXDP2351_CPLD_BB_GBE1_REG IXDP2351_CPLD_BB_REG(0x34) | ||
81 | |||
82 | /* #define IXDP2351_CPLD_BB_MISC_REG IXDP2351_CPLD_REG(0x1C) */ | ||
83 | /* #define IXDP2351_CPLD_BB_MISC_REV_MASK 0xFF */ | ||
84 | /* #define IXDP2351_CPLD_BB_GDXCS0_REG IXDP2351_CPLD_REG(0x24) */ | ||
85 | /* #define IXDP2351_CPLD_BB_GDXCS1_REG IXDP2351_CPLD_REG(0x28) */ | ||
86 | /* #define IXDP2351_CPLD_BB_CLOCK_REG IXDP2351_CPLD_REG(0x04) */ | ||
87 | |||
88 | |||
89 | #endif | ||
diff --git a/include/asm-arm/arch-ixp23xx/ixp23xx.h b/include/asm-arm/arch-ixp23xx/ixp23xx.h new file mode 100644 index 000000000000..e49e1ca61b1a --- /dev/null +++ b/include/asm-arm/arch-ixp23xx/ixp23xx.h | |||
@@ -0,0 +1,306 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ixp23xx/ixp23xx.h | ||
3 | * | ||
4 | * Register definitions for IXP23XX | ||
5 | * | ||
6 | * Copyright (C) 2003-2005 Intel Corporation. | ||
7 | * Copyright (C) 2005 MontaVista Software, Inc. | ||
8 | * | ||
9 | * Maintainer: Deepak Saxena <dsaxena@plexity.net> | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify | ||
12 | * it under the terms of the GNU General Public License version 2 as | ||
13 | * published by the Free Software Foundation. | ||
14 | */ | ||
15 | |||
16 | #ifndef __ASM_ARCH_IXP23XX_H | ||
17 | #define __ASM_ARCH_IXP23XX_H | ||
18 | |||
19 | /* | ||
20 | * IXP2300 linux memory map: | ||
21 | * | ||
22 | * virt phys size | ||
23 | * fffd0000 a0000000 64K XSI2CPP_CSR | ||
24 | * fffc0000 c4000000 4K EXP_CFG | ||
25 | * fff00000 c8000000 64K PERIPHERAL | ||
26 | * fe000000 1c0000000 16M CAP_CSR | ||
27 | * fd000000 1c8000000 16M MSF_CSR | ||
28 | * fb000000 16M --- | ||
29 | * fa000000 1d8000000 32M PCI_IO | ||
30 | * f8000000 1da000000 32M PCI_CFG | ||
31 | * f6000000 1de000000 32M PCI_CREG | ||
32 | * f4000000 32M --- | ||
33 | * f0000000 1e0000000 64M PCI_MEM | ||
34 | * e[c-f]000000 per-platform mappings | ||
35 | */ | ||
36 | |||
37 | |||
38 | /**************************************************************************** | ||
39 | * Static mappings. | ||
40 | ****************************************************************************/ | ||
41 | #define IXP23XX_XSI2CPP_CSR_PHYS 0xa0000000 | ||
42 | #define IXP23XX_XSI2CPP_CSR_VIRT 0xfffd0000 | ||
43 | #define IXP23XX_XSI2CPP_CSR_SIZE 0x00010000 | ||
44 | |||
45 | #define IXP23XX_EXP_CFG_PHYS 0xc4000000 | ||
46 | #define IXP23XX_EXP_CFG_VIRT 0xfffc0000 | ||
47 | #define IXP23XX_EXP_CFG_SIZE 0x00001000 | ||
48 | |||
49 | #define IXP23XX_PERIPHERAL_PHYS 0xc8000000 | ||
50 | #define IXP23XX_PERIPHERAL_VIRT 0xfff00000 | ||
51 | #define IXP23XX_PERIPHERAL_SIZE 0x00010000 | ||
52 | |||
53 | #define IXP23XX_CAP_CSR_PHYS 0x1c0000000ULL | ||
54 | #define IXP23XX_CAP_CSR_VIRT 0xfe000000 | ||
55 | #define IXP23XX_CAP_CSR_SIZE 0x01000000 | ||
56 | |||
57 | #define IXP23XX_MSF_CSR_PHYS 0x1c8000000ULL | ||
58 | #define IXP23XX_MSF_CSR_VIRT 0xfd000000 | ||
59 | #define IXP23XX_MSF_CSR_SIZE 0x01000000 | ||
60 | |||
61 | #define IXP23XX_PCI_IO_PHYS 0x1d8000000ULL | ||
62 | #define IXP23XX_PCI_IO_VIRT 0xfa000000 | ||
63 | #define IXP23XX_PCI_IO_SIZE 0x02000000 | ||
64 | |||
65 | #define IXP23XX_PCI_CFG_PHYS 0x1da000000ULL | ||
66 | #define IXP23XX_PCI_CFG_VIRT 0xf8000000 | ||
67 | #define IXP23XX_PCI_CFG_SIZE 0x02000000 | ||
68 | #define IXP23XX_PCI_CFG0_VIRT IXP23XX_PCI_CFG_VIRT | ||
69 | #define IXP23XX_PCI_CFG1_VIRT (IXP23XX_PCI_CFG_VIRT + 0x01000000) | ||
70 | |||
71 | #define IXP23XX_PCI_CREG_PHYS 0x1de000000ULL | ||
72 | #define IXP23XX_PCI_CREG_VIRT 0xf6000000 | ||
73 | #define IXP23XX_PCI_CREG_SIZE 0x02000000 | ||
74 | #define IXP23XX_PCI_CSR_VIRT (IXP23XX_PCI_CREG_VIRT + 0x01000000) | ||
75 | |||
76 | #define IXP23XX_PCI_MEM_START 0xe0000000 | ||
77 | #define IXP23XX_PCI_MEM_PHYS 0x1e0000000ULL | ||
78 | #define IXP23XX_PCI_MEM_VIRT 0xf0000000 | ||
79 | #define IXP23XX_PCI_MEM_SIZE 0x04000000 | ||
80 | |||
81 | |||
82 | /**************************************************************************** | ||
83 | * XSI2CPP CSRs. | ||
84 | ****************************************************************************/ | ||
85 | #define IXP23XX_XSI2CPP_REG(x) ((volatile unsigned long *)(IXP23XX_XSI2CPP_CSR_VIRT + (x))) | ||
86 | #define IXP23XX_CPP2XSI_CURR_XFER_REG3 IXP23XX_XSI2CPP_REG(0xf8) | ||
87 | #define IXP23XX_CPP2XSI_ADDR_31 (1 << 19) | ||
88 | #define IXP23XX_CPP2XSI_PSH_OFF (1 << 20) | ||
89 | #define IXP23XX_CPP2XSI_COH_OFF (1 << 21) | ||
90 | |||
91 | |||
92 | /**************************************************************************** | ||
93 | * Expansion Bus Config. | ||
94 | ****************************************************************************/ | ||
95 | #define IXP23XX_EXP_CFG_REG(x) ((volatile unsigned long *)(IXP23XX_EXP_CFG_VIRT + (x))) | ||
96 | #define IXP23XX_EXP_CS0 IXP23XX_EXP_CFG_REG(0x00) | ||
97 | #define IXP23XX_EXP_CS1 IXP23XX_EXP_CFG_REG(0x04) | ||
98 | #define IXP23XX_EXP_CS2 IXP23XX_EXP_CFG_REG(0x08) | ||
99 | #define IXP23XX_EXP_CS3 IXP23XX_EXP_CFG_REG(0x0c) | ||
100 | #define IXP23XX_EXP_CS4 IXP23XX_EXP_CFG_REG(0x10) | ||
101 | #define IXP23XX_EXP_CS5 IXP23XX_EXP_CFG_REG(0x14) | ||
102 | #define IXP23XX_EXP_CS6 IXP23XX_EXP_CFG_REG(0x18) | ||
103 | #define IXP23XX_EXP_CS7 IXP23XX_EXP_CFG_REG(0x1c) | ||
104 | #define IXP23XX_FLASH_WRITABLE (0x2) | ||
105 | #define IXP23XX_FLASH_BUS8 (0x1) | ||
106 | |||
107 | #define IXP23XX_EXP_CFG0 IXP23XX_EXP_CFG_REG(0x20) | ||
108 | #define IXP23XX_EXP_CFG1 IXP23XX_EXP_CFG_REG(0x24) | ||
109 | #define IXP23XX_EXP_CFG0_MEM_MAP (1 << 31) | ||
110 | #define IXP23XX_EXP_CFG0_XSCALE_SPEED_SEL (3 << 22) | ||
111 | #define IXP23XX_EXP_CFG0_XSCALE_SPEED_EN (1 << 21) | ||
112 | #define IXP23XX_EXP_CFG0_CPP_SPEED_SEL (3 << 19) | ||
113 | #define IXP23XX_EXP_CFG0_CPP_SPEED_EN (1 << 18) | ||
114 | #define IXP23XX_EXP_CFG0_PCI_SWIN (3 << 16) | ||
115 | #define IXP23XX_EXP_CFG0_PCI_DWIN (3 << 14) | ||
116 | #define IXP23XX_EXP_CFG0_PCI33_MODE (1 << 13) | ||
117 | #define IXP23XX_EXP_CFG0_QDR_SPEED_SEL (1 << 12) | ||
118 | #define IXP23XX_EXP_CFG0_CPP_DIV_SEL (1 << 5) | ||
119 | #define IXP23XX_EXP_CFG0_XSI_NOT_PRES (1 << 4) | ||
120 | #define IXP23XX_EXP_CFG0_PROM_BOOT (1 << 3) | ||
121 | #define IXP23XX_EXP_CFG0_PCI_ARB (1 << 2) | ||
122 | #define IXP23XX_EXP_CFG0_PCI_HOST (1 << 1) | ||
123 | #define IXP23XX_EXP_CFG0_FLASH_WIDTH (1 << 0) | ||
124 | |||
125 | #define IXP23XX_EXP_UNIT_FUSE IXP23XX_EXP_CFG_REG(0x28) | ||
126 | #define IXP23XX_EXP_MSF_MUX IXP23XX_EXP_CFG_REG(0x30) | ||
127 | |||
128 | #define IXP23XX_EXP_BUS_PHYS 0x90000000 | ||
129 | #define IXP23XX_EXP_BUS_WINDOW_SIZE 0x01000000 | ||
130 | |||
131 | #define IXP23XX_EXP_BUS_CS0_BASE (IXP23XX_EXP_BUS_PHYS + 0x00000000) | ||
132 | #define IXP23XX_EXP_BUS_CS1_BASE (IXP23XX_EXP_BUS_PHYS + 0x01000000) | ||
133 | #define IXP23XX_EXP_BUS_CS2_BASE (IXP23XX_EXP_BUS_PHYS + 0x02000000) | ||
134 | #define IXP23XX_EXP_BUS_CS3_BASE (IXP23XX_EXP_BUS_PHYS + 0x03000000) | ||
135 | #define IXP23XX_EXP_BUS_CS4_BASE (IXP23XX_EXP_BUS_PHYS + 0x04000000) | ||
136 | #define IXP23XX_EXP_BUS_CS5_BASE (IXP23XX_EXP_BUS_PHYS + 0x05000000) | ||
137 | #define IXP23XX_EXP_BUS_CS6_BASE (IXP23XX_EXP_BUS_PHYS + 0x06000000) | ||
138 | #define IXP23XX_EXP_BUS_CS7_BASE (IXP23XX_EXP_BUS_PHYS + 0x07000000) | ||
139 | |||
140 | |||
141 | /**************************************************************************** | ||
142 | * Peripherals. | ||
143 | ****************************************************************************/ | ||
144 | #define IXP23XX_UART1_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x0000) | ||
145 | #define IXP23XX_UART2_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x1000) | ||
146 | #define IXP23XX_PMU_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x2000) | ||
147 | #define IXP23XX_INTC_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x3000) | ||
148 | #define IXP23XX_GPIO_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x4000) | ||
149 | #define IXP23XX_TIMER_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x5000) | ||
150 | #define IXP23XX_NPE0_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x6000) | ||
151 | #define IXP23XX_DSR_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x7000) | ||
152 | #define IXP23XX_NPE1_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x8000) | ||
153 | #define IXP23XX_ETH0_VIRT (IXP23XX_PERIPHERAL_VIRT + 0x9000) | ||
154 | #define IXP23XX_ETH1_VIRT (IXP23XX_PERIPHERAL_VIRT + 0xA000) | ||
155 | #define IXP23XX_GIG0_VIRT (IXP23XX_PERIPHERAL_VIRT + 0xB000) | ||
156 | #define IXP23XX_GIG1_VIRT (IXP23XX_PERIPHERAL_VIRT + 0xC000) | ||
157 | #define IXP23XX_DDRS_VIRT (IXP23XX_PERIPHERAL_VIRT + 0xD000) | ||
158 | |||
159 | #define IXP23XX_UART1_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x0000) | ||
160 | #define IXP23XX_UART2_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x1000) | ||
161 | #define IXP23XX_PMU_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x2000) | ||
162 | #define IXP23XX_INTC_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x3000) | ||
163 | #define IXP23XX_GPIO_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x4000) | ||
164 | #define IXP23XX_TIMER_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x5000) | ||
165 | #define IXP23XX_NPE0_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x6000) | ||
166 | #define IXP23XX_DSR_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x7000) | ||
167 | #define IXP23XX_NPE1_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x8000) | ||
168 | #define IXP23XX_ETH0_PHYS (IXP23XX_PERIPHERAL_PHYS + 0x9000) | ||
169 | #define IXP23XX_ETH1_PHYS (IXP23XX_PERIPHERAL_PHYS + 0xA000) | ||
170 | #define IXP23XX_GIG0_PHYS (IXP23XX_PERIPHERAL_PHYS + 0xB000) | ||
171 | #define IXP23XX_GIG1_PHYS (IXP23XX_PERIPHERAL_PHYS + 0xC000) | ||
172 | #define IXP23XX_DDRS_PHYS (IXP23XX_PERIPHERAL_PHYS + 0xD000) | ||
173 | |||
174 | |||
175 | /**************************************************************************** | ||
176 | * Interrupt controller. | ||
177 | ****************************************************************************/ | ||
178 | #define IXP23XX_INTC_REG(x) ((volatile unsigned long *)(IXP23XX_INTC_VIRT + (x))) | ||
179 | #define IXP23XX_INTR_ST1 IXP23XX_INTC_REG(0x00) | ||
180 | #define IXP23XX_INTR_ST2 IXP23XX_INTC_REG(0x04) | ||
181 | #define IXP23XX_INTR_ST3 IXP23XX_INTC_REG(0x08) | ||
182 | #define IXP23XX_INTR_ST4 IXP23XX_INTC_REG(0x0c) | ||
183 | #define IXP23XX_INTR_EN1 IXP23XX_INTC_REG(0x10) | ||
184 | #define IXP23XX_INTR_EN2 IXP23XX_INTC_REG(0x14) | ||
185 | #define IXP23XX_INTR_EN3 IXP23XX_INTC_REG(0x18) | ||
186 | #define IXP23XX_INTR_EN4 IXP23XX_INTC_REG(0x1c) | ||
187 | #define IXP23XX_INTR_SEL1 IXP23XX_INTC_REG(0x20) | ||
188 | #define IXP23XX_INTR_SEL2 IXP23XX_INTC_REG(0x24) | ||
189 | #define IXP23XX_INTR_SEL3 IXP23XX_INTC_REG(0x28) | ||
190 | #define IXP23XX_INTR_SEL4 IXP23XX_INTC_REG(0x2c) | ||
191 | #define IXP23XX_INTR_IRQ_ST1 IXP23XX_INTC_REG(0x30) | ||
192 | #define IXP23XX_INTR_IRQ_ST2 IXP23XX_INTC_REG(0x34) | ||
193 | #define IXP23XX_INTR_IRQ_ST3 IXP23XX_INTC_REG(0x38) | ||
194 | #define IXP23XX_INTR_IRQ_ST4 IXP23XX_INTC_REG(0x3c) | ||
195 | #define IXP23XX_INTR_IRQ_ENC_ST_OFFSET 0x54 | ||
196 | |||
197 | |||
198 | /**************************************************************************** | ||
199 | * GPIO. | ||
200 | ****************************************************************************/ | ||
201 | #define IXP23XX_GPIO_REG(x) ((volatile unsigned long *)(IXP23XX_GPIO_VIRT + (x))) | ||
202 | #define IXP23XX_GPIO_GPOUTR IXP23XX_GPIO_REG(0x00) | ||
203 | #define IXP23XX_GPIO_GPOER IXP23XX_GPIO_REG(0x04) | ||
204 | #define IXP23XX_GPIO_GPINR IXP23XX_GPIO_REG(0x08) | ||
205 | #define IXP23XX_GPIO_GPISR IXP23XX_GPIO_REG(0x0c) | ||
206 | #define IXP23XX_GPIO_GPIT1R IXP23XX_GPIO_REG(0x10) | ||
207 | #define IXP23XX_GPIO_GPIT2R IXP23XX_GPIO_REG(0x14) | ||
208 | #define IXP23XX_GPIO_GPCLKR IXP23XX_GPIO_REG(0x18) | ||
209 | #define IXP23XX_GPIO_GPDBSELR IXP23XX_GPIO_REG(0x1c) | ||
210 | |||
211 | #define IXP23XX_GPIO_STYLE_MASK 0x7 | ||
212 | #define IXP23XX_GPIO_STYLE_ACTIVE_HIGH 0x0 | ||
213 | #define IXP23XX_GPIO_STYLE_ACTIVE_LOW 0x1 | ||
214 | #define IXP23XX_GPIO_STYLE_RISING_EDGE 0x2 | ||
215 | #define IXP23XX_GPIO_STYLE_FALLING_EDGE 0x3 | ||
216 | #define IXP23XX_GPIO_STYLE_TRANSITIONAL 0x4 | ||
217 | |||
218 | #define IXP23XX_GPIO_STYLE_SIZE 3 | ||
219 | |||
220 | |||
221 | /**************************************************************************** | ||
222 | * Timer. | ||
223 | ****************************************************************************/ | ||
224 | #define IXP23XX_TIMER_REG(x) ((volatile unsigned long *)(IXP23XX_TIMER_VIRT + (x))) | ||
225 | #define IXP23XX_TIMER_CONT IXP23XX_TIMER_REG(0x00) | ||
226 | #define IXP23XX_TIMER1_TIMESTAMP IXP23XX_TIMER_REG(0x04) | ||
227 | #define IXP23XX_TIMER1_RELOAD IXP23XX_TIMER_REG(0x08) | ||
228 | #define IXP23XX_TIMER2_TIMESTAMP IXP23XX_TIMER_REG(0x0c) | ||
229 | #define IXP23XX_TIMER2_RELOAD IXP23XX_TIMER_REG(0x10) | ||
230 | #define IXP23XX_TIMER_WDOG IXP23XX_TIMER_REG(0x14) | ||
231 | #define IXP23XX_TIMER_WDOG_EN IXP23XX_TIMER_REG(0x18) | ||
232 | #define IXP23XX_TIMER_WDOG_KEY IXP23XX_TIMER_REG(0x1c) | ||
233 | #define IXP23XX_TIMER_WDOG_KEY_MAGIC 0x482e | ||
234 | #define IXP23XX_TIMER_STATUS IXP23XX_TIMER_REG(0x20) | ||
235 | #define IXP23XX_TIMER_SOFT_RESET IXP23XX_TIMER_REG(0x24) | ||
236 | #define IXP23XX_TIMER_SOFT_RESET_EN IXP23XX_TIMER_REG(0x28) | ||
237 | |||
238 | #define IXP23XX_TIMER_ENABLE (1 << 0) | ||
239 | #define IXP23XX_TIMER_ONE_SHOT (1 << 1) | ||
240 | /* Low order bits of reload value ignored */ | ||
241 | #define IXP23XX_TIMER_RELOAD_MASK (0x3) | ||
242 | #define IXP23XX_TIMER_DISABLED (0x0) | ||
243 | #define IXP23XX_TIMER1_INT_PEND (1 << 0) | ||
244 | #define IXP23XX_TIMER2_INT_PEND (1 << 1) | ||
245 | #define IXP23XX_TIMER_STATUS_TS_PEND (1 << 2) | ||
246 | #define IXP23XX_TIMER_STATUS_WDOG_PEND (1 << 3) | ||
247 | #define IXP23XX_TIMER_STATUS_WARM_RESET (1 << 4) | ||
248 | |||
249 | |||
250 | /**************************************************************************** | ||
251 | * CAP CSRs. | ||
252 | ****************************************************************************/ | ||
253 | #define IXP23XX_GLOBAL_REG(x) ((volatile unsigned long *)(IXP23XX_CAP_CSR_VIRT + 0x4a00 + (x))) | ||
254 | #define IXP23XX_PROD_IDG IXP23XX_GLOBAL_REG(0x00) | ||
255 | #define IXP23XX_MISC_CONTROL IXP23XX_GLOBAL_REG(0x04) | ||
256 | #define IXP23XX_MSF_CLK_CNTRL IXP23XX_GLOBAL_REG(0x08) | ||
257 | #define IXP23XX_RESET0 IXP23XX_GLOBAL_REG(0x0c) | ||
258 | #define IXP23XX_RESET1 IXP23XX_GLOBAL_REG(0x10) | ||
259 | #define IXP23XX_STRAP_OPTIONS IXP23XX_GLOBAL_REG(0x18) | ||
260 | |||
261 | #define IXP23XX_ENABLE_WATCHDOG (1 << 24) | ||
262 | #define IXP23XX_SHPC_INIT_COMP (1 << 21) | ||
263 | #define IXP23XX_RST_ALL (1 << 16) | ||
264 | #define IXP23XX_RESET_PCI (1 << 2) | ||
265 | #define IXP23XX_PCI_UNIT_RESET (1 << 1) | ||
266 | #define IXP23XX_XSCALE_RESET (1 << 0) | ||
267 | |||
268 | |||
269 | /**************************************************************************** | ||
270 | * PCI CSRs. | ||
271 | ****************************************************************************/ | ||
272 | #define IXP23XX_PCI_CREG(x) ((volatile unsigned long *)(IXP23XX_PCI_CREG_VIRT + (x))) | ||
273 | #define IXP23XX_PCI_CMDSTAT IXP23XX_PCI_CREG(0x04) | ||
274 | #define IXP23XX_PCI_SRAM_BAR IXP23XX_PCI_CREG(0x14) | ||
275 | #define IXP23XX_PCI_SDRAM_BAR IXP23XX_PCI_CREG(0x18) | ||
276 | |||
277 | |||
278 | #define IXP23XX_PCI_CSR(x) ((volatile unsigned long *)(IXP23XX_PCI_CREG_VIRT + 0x01000000 + (x))) | ||
279 | #define IXP23XX_PCI_OUT_INT_STATUS IXP23XX_PCI_CSR(0x0030) | ||
280 | #define IXP23XX_PCI_OUT_INT_MASK IXP23XX_PCI_CSR(0x0034) | ||
281 | #define IXP23XX_PCI_SRAM_BASE_ADDR_MASK IXP23XX_PCI_CSR(0x00fc) | ||
282 | #define IXP23XX_PCI_DRAM_BASE_ADDR_MASK IXP23XX_PCI_CSR(0x0100) | ||
283 | #define IXP23XX_PCI_CONTROL IXP23XX_PCI_CSR(0x013c) | ||
284 | #define IXP23XX_PCI_ADDR_EXT IXP23XX_PCI_CSR(0x0140) | ||
285 | #define IXP23XX_PCI_ME_PUSH_STATUS IXP23XX_PCI_CSR(0x0148) | ||
286 | #define IXP23XX_PCI_ME_PUSH_EN IXP23XX_PCI_CSR(0x014c) | ||
287 | #define IXP23XX_PCI_ERR_STATUS IXP23XX_PCI_CSR(0x0150) | ||
288 | #define IXP23XX_PCI_ERROR_STATUS IXP23XX_PCI_CSR(0x0150) | ||
289 | #define IXP23XX_PCI_ERR_ENABLE IXP23XX_PCI_CSR(0x0154) | ||
290 | #define IXP23XX_PCI_XSCALE_INT_STATUS IXP23XX_PCI_CSR(0x0158) | ||
291 | #define IXP23XX_PCI_XSCALE_INT_ENABLE IXP23XX_PCI_CSR(0x015c) | ||
292 | #define IXP23XX_PCI_CPP_ADDR_BITS IXP23XX_PCI_CSR(0x0160) | ||
293 | |||
294 | |||
295 | #ifndef __ASSEMBLY__ | ||
296 | /* | ||
297 | * Is system memory on the XSI or CPP bus? | ||
298 | */ | ||
299 | static inline unsigned ixp23xx_cpp_boot(void) | ||
300 | { | ||
301 | return (*IXP23XX_EXP_CFG0 & IXP23XX_EXP_CFG0_XSI_NOT_PRES); | ||
302 | } | ||
303 | #endif | ||
304 | |||
305 | |||
306 | #endif | ||
diff --git a/include/asm-arm/arch-ixp23xx/memory.h b/include/asm-arm/arch-ixp23xx/memory.h new file mode 100644 index 000000000000..bebcf0aa0d72 --- /dev/null +++ b/include/asm-arm/arch-ixp23xx/memory.h | |||
@@ -0,0 +1,46 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ixp23xx/memory.h | ||
3 | * | ||
4 | * Copyright (c) 2003-2004 Intel Corp. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the | ||
8 | * Free Software Foundation; either version 2 of the License, or (at your | ||
9 | * option) any later version. | ||
10 | */ | ||
11 | |||
12 | #ifndef __ASM_ARCH_MEMORY_H | ||
13 | #define __ASM_ARCH_MEMORY_H | ||
14 | |||
15 | #include <asm/hardware.h> | ||
16 | |||
17 | /* | ||
18 | * Physical DRAM offset. | ||
19 | */ | ||
20 | #define PHYS_OFFSET (0x00000000) | ||
21 | |||
22 | |||
23 | /* | ||
24 | * Virtual view <-> DMA view memory address translations | ||
25 | * virt_to_bus: Used to translate the virtual address to an | ||
26 | * address suitable to be passed to set_dma_addr | ||
27 | * bus_to_virt: Used to convert an address for DMA operations | ||
28 | * to an address that the kernel can use. | ||
29 | */ | ||
30 | #ifndef __ASSEMBLY__ | ||
31 | |||
32 | #define __virt_to_bus(v) \ | ||
33 | ({ unsigned int ret; \ | ||
34 | ret = ((__virt_to_phys(v) - 0x00000000) + \ | ||
35 | (*((volatile int *)IXP23XX_PCI_SDRAM_BAR) & 0xfffffff0)); \ | ||
36 | ret; }) | ||
37 | |||
38 | #define __bus_to_virt(b) \ | ||
39 | ({ unsigned int data; \ | ||
40 | data = *((volatile int *)IXP23XX_PCI_SDRAM_BAR); \ | ||
41 | __phys_to_virt((((b - (data & 0xfffffff0)) + 0x00000000))); }) | ||
42 | |||
43 | #endif | ||
44 | |||
45 | |||
46 | #endif | ||
diff --git a/include/asm-arm/arch-ixp23xx/platform.h b/include/asm-arm/arch-ixp23xx/platform.h new file mode 100644 index 000000000000..f85b4685a491 --- /dev/null +++ b/include/asm-arm/arch-ixp23xx/platform.h | |||
@@ -0,0 +1,31 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ixp23xx/platform.h | ||
3 | * | ||
4 | * Various bits of code used by platform-level code. | ||
5 | * | ||
6 | * Author: Deepak Saxena <dsaxena@plexity.net> | ||
7 | * | ||
8 | * Copyright 2005 (c) MontaVista Software, Inc. | ||
9 | * | ||
10 | * This file is licensed under the terms of the GNU General Public | ||
11 | * License version 2. This program is licensed "as is" without any | ||
12 | * warranty of any kind, whether express or implied. | ||
13 | */ | ||
14 | |||
15 | #ifndef __ASSEMBLY__ | ||
16 | |||
17 | struct pci_sys_data; | ||
18 | |||
19 | void ixp23xx_map_io(void); | ||
20 | void ixp23xx_init_irq(void); | ||
21 | void ixp23xx_sys_init(void); | ||
22 | int ixp23xx_pci_setup(int, struct pci_sys_data *); | ||
23 | void ixp23xx_pci_preinit(void); | ||
24 | struct pci_bus *ixp23xx_pci_scan_bus(int, struct pci_sys_data*); | ||
25 | |||
26 | extern struct sys_timer ixp23xx_timer; | ||
27 | |||
28 | #define IXP23XX_UART_XTAL 14745600 | ||
29 | |||
30 | |||
31 | #endif | ||
diff --git a/include/asm-arm/arch-ixp23xx/system.h b/include/asm-arm/arch-ixp23xx/system.h new file mode 100644 index 000000000000..925e6b0c338b --- /dev/null +++ b/include/asm-arm/arch-ixp23xx/system.h | |||
@@ -0,0 +1,33 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ixp23xx/system.h | ||
3 | * | ||
4 | * Copyright (C) 2003 Intel Corporation. | ||
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 | #include <asm/hardware.h> | ||
12 | #include <asm/mach-types.h> | ||
13 | |||
14 | static inline void arch_idle(void) | ||
15 | { | ||
16 | #if 0 | ||
17 | if (!hlt_counter) | ||
18 | cpu_do_idle(); | ||
19 | #endif | ||
20 | } | ||
21 | |||
22 | static inline void arch_reset(char mode) | ||
23 | { | ||
24 | /* First try machine specific support */ | ||
25 | if (machine_is_ixdp2351()) { | ||
26 | *IXDP2351_CPLD_RESET1_REG = IXDP2351_CPLD_RESET1_MAGIC; | ||
27 | (void) *IXDP2351_CPLD_RESET1_REG; | ||
28 | *IXDP2351_CPLD_RESET1_REG = IXDP2351_CPLD_RESET1_ENABLE; | ||
29 | } | ||
30 | |||
31 | /* Use on-chip reset capability */ | ||
32 | *IXP23XX_RESET0 |= IXP23XX_RST_ALL; | ||
33 | } | ||
diff --git a/include/asm-arm/arch-ixp23xx/time.h b/include/asm-arm/arch-ixp23xx/time.h new file mode 100644 index 000000000000..f6828fdd2883 --- /dev/null +++ b/include/asm-arm/arch-ixp23xx/time.h | |||
@@ -0,0 +1,3 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ixp23xx/time.h | ||
3 | */ | ||
diff --git a/include/asm-arm/arch-ixp23xx/timex.h b/include/asm-arm/arch-ixp23xx/timex.h new file mode 100644 index 000000000000..516f72fe6082 --- /dev/null +++ b/include/asm-arm/arch-ixp23xx/timex.h | |||
@@ -0,0 +1,7 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ixp23xx/timex.h | ||
3 | * | ||
4 | * XScale architecture timex specifications | ||
5 | */ | ||
6 | |||
7 | #define CLOCK_TICK_RATE 75000000 | ||
diff --git a/include/asm-arm/arch-ixp23xx/uncompress.h b/include/asm-arm/arch-ixp23xx/uncompress.h new file mode 100644 index 000000000000..62623fa9b2f7 --- /dev/null +++ b/include/asm-arm/arch-ixp23xx/uncompress.h | |||
@@ -0,0 +1,45 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ixp23xx/uncompress.h | ||
3 | * | ||
4 | * Copyright (C) 2002-2004 Intel Corporation. | ||
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 | #ifndef __ASM_ARCH_UNCOMPRESS_H | ||
12 | #define __ASM_ARCH_UNCOMPRESS_H | ||
13 | |||
14 | #include <asm/hardware.h> | ||
15 | #include <linux/serial_reg.h> | ||
16 | |||
17 | #define UART_BASE ((volatile u32 *)IXP23XX_UART1_PHYS) | ||
18 | |||
19 | static __inline__ void putc(char c) | ||
20 | { | ||
21 | int j; | ||
22 | |||
23 | for (j = 0; j < 0x1000; j++) { | ||
24 | if (UART_BASE[UART_LSR] & UART_LSR_THRE) | ||
25 | break; | ||
26 | } | ||
27 | |||
28 | UART_BASE[UART_TX] = c; | ||
29 | } | ||
30 | |||
31 | static void putstr(const char *s) | ||
32 | { | ||
33 | while (*s) { | ||
34 | putc(*s); | ||
35 | if (*s == '\n') | ||
36 | putc('\r'); | ||
37 | s++; | ||
38 | } | ||
39 | } | ||
40 | |||
41 | #define arch_decomp_setup() | ||
42 | #define arch_decomp_wdog() | ||
43 | |||
44 | |||
45 | #endif | ||
diff --git a/include/asm-arm/arch-ixp23xx/vmalloc.h b/include/asm-arm/arch-ixp23xx/vmalloc.h new file mode 100644 index 000000000000..9f2566658541 --- /dev/null +++ b/include/asm-arm/arch-ixp23xx/vmalloc.h | |||
@@ -0,0 +1,10 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ixp23xx/vmalloc.h | ||
3 | * | ||
4 | * Copyright (c) 2005 MontaVista Software, Inc. | ||
5 | * | ||
6 | * NPU mappings end at 0xf0000000 and we allocate 64MB for board | ||
7 | * specific static I/O. | ||
8 | */ | ||
9 | |||
10 | #define VMALLOC_END (0xec000000) | ||
diff --git a/include/asm-arm/arch-ixp4xx/debug-macro.S b/include/asm-arm/arch-ixp4xx/debug-macro.S index 2e23651e217f..37bc8ef23e67 100644 --- a/include/asm-arm/arch-ixp4xx/debug-macro.S +++ b/include/asm-arm/arch-ixp4xx/debug-macro.S | |||
@@ -20,16 +20,5 @@ | |||
20 | @ byte writes used - Big Endian. | 20 | @ byte writes used - Big Endian. |
21 | .endm | 21 | .endm |
22 | 22 | ||
23 | .macro senduart,rd,rx | 23 | #define UART_SHIFT 2 |
24 | strb \rd, [\rx] | 24 | #include <asm/hardware/debug-8250.S> |
25 | .endm | ||
26 | |||
27 | .macro waituart,rd,rx | ||
28 | 1002: ldrb \rd, [\rx, #0x14] | ||
29 | and \rd, \rd, #0x60 @ check THRE and TEMT bits | ||
30 | teq \rd, #0x60 | ||
31 | bne 1002b | ||
32 | .endm | ||
33 | |||
34 | .macro busyuart,rd,rx | ||
35 | .endm | ||
diff --git a/include/asm-arm/arch-ixp4xx/irq.h b/include/asm-arm/arch-ixp4xx/irq.h deleted file mode 100644 index 87da70695f0a..000000000000 --- a/include/asm-arm/arch-ixp4xx/irq.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | /* | ||
2 | * irq.h | ||
3 | * | ||
4 | * Copyright (C) 2002 Intel Corporation. | ||
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 | |||
12 | #define fixup_irq(irq) (irq) | ||
13 | |||
diff --git a/include/asm-arm/arch-ixp4xx/param.h b/include/asm-arm/arch-ixp4xx/param.h deleted file mode 100644 index 8a757125e5e7..000000000000 --- a/include/asm-arm/arch-ixp4xx/param.h +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-ixp4xx/param.h | ||
3 | */ | ||
diff --git a/include/asm-arm/arch-ixp4xx/platform.h b/include/asm-arm/arch-ixp4xx/platform.h index daf9790645ca..13aee17b0475 100644 --- a/include/asm-arm/arch-ixp4xx/platform.h +++ b/include/asm-arm/arch-ixp4xx/platform.h | |||
@@ -38,6 +38,33 @@ extern unsigned long ixp4xx_exp_bus_size; | |||
38 | #define IXP4XX_EXP_BUS_BASE(region)\ | 38 | #define IXP4XX_EXP_BUS_BASE(region)\ |
39 | (IXP4XX_EXP_BUS_BASE_PHYS + ((region) * ixp4xx_exp_bus_size)) | 39 | (IXP4XX_EXP_BUS_BASE_PHYS + ((region) * ixp4xx_exp_bus_size)) |
40 | 40 | ||
41 | #define IXP4XX_EXP_BUS_END(region)\ | ||
42 | (IXP4XX_EXP_BUS_BASE(region) + ixp4xx_exp_bus_size - 1) | ||
43 | |||
44 | /* Those macros can be used to adjust timing and configure | ||
45 | * other features for each region. | ||
46 | */ | ||
47 | |||
48 | #define IXP4XX_EXP_BUS_RECOVERY_T(x) (((x) & 0x0f) << 16) | ||
49 | #define IXP4XX_EXP_BUS_HOLD_T(x) (((x) & 0x03) << 20) | ||
50 | #define IXP4XX_EXP_BUS_STROBE_T(x) (((x) & 0x0f) << 22) | ||
51 | #define IXP4XX_EXP_BUS_SETUP_T(x) (((x) & 0x03) << 26) | ||
52 | #define IXP4XX_EXP_BUS_ADDR_T(x) (((x) & 0x03) << 28) | ||
53 | #define IXP4XX_EXP_BUS_SIZE(x) (((x) & 0x0f) << 10) | ||
54 | #define IXP4XX_EXP_BUS_CYCLES(x) (((x) & 0x03) << 14) | ||
55 | |||
56 | #define IXP4XX_EXP_BUS_CS_EN (1L << 31) | ||
57 | #define IXP4XX_EXP_BUS_BYTE_RD16 (1L << 6) | ||
58 | #define IXP4XX_EXP_BUS_HRDY_POL (1L << 5) | ||
59 | #define IXP4XX_EXP_BUS_MUX_EN (1L << 4) | ||
60 | #define IXP4XX_EXP_BUS_SPLT_EN (1L << 3) | ||
61 | #define IXP4XX_EXP_BUS_WR_EN (1L << 1) | ||
62 | #define IXP4XX_EXP_BUS_BYTE_EN (1L << 0) | ||
63 | |||
64 | #define IXP4XX_EXP_BUS_CYCLES_INTEL 0x00 | ||
65 | #define IXP4XX_EXP_BUS_CYCLES_MOTOROLA 0x01 | ||
66 | #define IXP4XX_EXP_BUS_CYCLES_HPI 0x02 | ||
67 | |||
41 | #define IXP4XX_FLASH_WRITABLE (0x2) | 68 | #define IXP4XX_FLASH_WRITABLE (0x2) |
42 | #define IXP4XX_FLASH_DEFAULT (0xbcd23c40) | 69 | #define IXP4XX_FLASH_DEFAULT (0xbcd23c40) |
43 | #define IXP4XX_FLASH_WRITE (0xbcd23c42) | 70 | #define IXP4XX_FLASH_WRITE (0xbcd23c42) |
diff --git a/include/asm-arm/arch-ixp4xx/uncompress.h b/include/asm-arm/arch-ixp4xx/uncompress.h index 960c35810a22..09ae6c91be60 100644 --- a/include/asm-arm/arch-ixp4xx/uncompress.h +++ b/include/asm-arm/arch-ixp4xx/uncompress.h | |||
@@ -21,26 +21,18 @@ | |||
21 | 21 | ||
22 | static volatile u32* uart_base; | 22 | static volatile u32* uart_base; |
23 | 23 | ||
24 | static __inline__ void putc(char c) | 24 | static inline void putc(int c) |
25 | { | 25 | { |
26 | /* Check THRE and TEMT bits before we transmit the character. | 26 | /* Check THRE and TEMT bits before we transmit the character. |
27 | */ | 27 | */ |
28 | while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE); | 28 | while ((uart_base[UART_LSR] & TX_DONE) != TX_DONE) |
29 | barrier(); | ||
30 | |||
29 | *uart_base = c; | 31 | *uart_base = c; |
30 | } | 32 | } |
31 | 33 | ||
32 | /* | 34 | static void flush(void) |
33 | * This does not append a newline | ||
34 | */ | ||
35 | static void putstr(const char *s) | ||
36 | { | 35 | { |
37 | while (*s) | ||
38 | { | ||
39 | putc(*s); | ||
40 | if (*s == '\n') | ||
41 | putc('\r'); | ||
42 | s++; | ||
43 | } | ||
44 | } | 36 | } |
45 | 37 | ||
46 | static __inline__ void __arch_decomp_setup(unsigned long arch_id) | 38 | static __inline__ void __arch_decomp_setup(unsigned long arch_id) |
diff --git a/include/asm-arm/arch-l7200/param.h b/include/asm-arm/arch-l7200/param.h deleted file mode 100644 index 9962a12ab158..000000000000 --- a/include/asm-arm/arch-l7200/param.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-l7200/param.h | ||
3 | * | ||
4 | * Copyright (C) 2000 Rob Scott (rscott@mtrob.fdns.net) | ||
5 | * Steve Hill (sjhill@cotw.com) | ||
6 | * | ||
7 | * This file contains the hardware definitions for the | ||
8 | * LinkUp Systems L7200 SOC development board. | ||
9 | * | ||
10 | * Changelog: | ||
11 | * 04-21-2000 RS Created L7200 version | ||
12 | * 04-25-2000 SJH Cleaned up file | ||
13 | * 05-03-2000 SJH Change comments and rate | ||
14 | */ | ||
15 | |||
16 | /* | ||
17 | * See 'time.h' for how the RTC HZ rate is set | ||
18 | */ | ||
19 | #define HZ 128 | ||
diff --git a/include/asm-arm/arch-l7200/uncompress.h b/include/asm-arm/arch-l7200/uncompress.h index 1caa2b560f53..9fcd40aee3e3 100644 --- a/include/asm-arm/arch-l7200/uncompress.h +++ b/include/asm-arm/arch-l7200/uncompress.h | |||
@@ -16,22 +16,17 @@ | |||
16 | #define __raw_writeb(v,p) (*(volatile unsigned char *)(p) = (v)) | 16 | #define __raw_writeb(v,p) (*(volatile unsigned char *)(p) = (v)) |
17 | #define __raw_readb(p) (*(volatile unsigned char *)(p)) | 17 | #define __raw_readb(p) (*(volatile unsigned char *)(p)) |
18 | 18 | ||
19 | static __inline__ void putc(char c) | 19 | static inline void putc(int c) |
20 | { | 20 | { |
21 | while(__raw_readb(IO_UART + 0x18) & 0x20 || | 21 | while(__raw_readb(IO_UART + 0x18) & 0x20 || |
22 | __raw_readb(IO_UART + 0x18) & 0x08); | 22 | __raw_readb(IO_UART + 0x18) & 0x08) |
23 | barrier(); | ||
24 | |||
23 | __raw_writeb(c, IO_UART + 0x00); | 25 | __raw_writeb(c, IO_UART + 0x00); |
24 | } | 26 | } |
25 | 27 | ||
26 | static void putstr(const char *s) | 28 | static inline void flush(void) |
27 | { | 29 | { |
28 | while (*s) { | ||
29 | if (*s == 10) { /* If a LF, add CR */ | ||
30 | putc(10); | ||
31 | putc(13); | ||
32 | } | ||
33 | putc(*(s++)); | ||
34 | } | ||
35 | } | 30 | } |
36 | 31 | ||
37 | static __inline__ void arch_decomp_setup(void) | 32 | static __inline__ void arch_decomp_setup(void) |
diff --git a/include/asm-arm/arch-lh7a40x/irq.h b/include/asm-arm/arch-lh7a40x/irq.h deleted file mode 100644 index 0f5f0b10f6ca..000000000000 --- a/include/asm-arm/arch-lh7a40x/irq.h +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | /* include/asm-arm/arch-lh7a40x/irq.h | ||
2 | * | ||
3 | * Copyright (C) 2004 Logic Product Development | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU General Public License | ||
7 | * version 2 as published by the Free Software Foundation. | ||
8 | * | ||
9 | */ | ||
10 | |||
11 | void __init lh7a40x_init_board_irq (void); | ||
diff --git a/include/asm-arm/arch-lh7a40x/param.h b/include/asm-arm/arch-lh7a40x/param.h deleted file mode 100644 index acad0bc5deba..000000000000 --- a/include/asm-arm/arch-lh7a40x/param.h +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | /* include/asm-arm/arch-lh7a40x/param.h | ||
2 | * | ||
3 | * Copyright (C) 2004 Coastal Environmental Systems | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or | ||
6 | * modify it under the terms of the GNU General Public License | ||
7 | * version 2 as published by the Free Software Foundation. | ||
8 | * | ||
9 | */ | ||
diff --git a/include/asm-arm/arch-lh7a40x/uncompress.h b/include/asm-arm/arch-lh7a40x/uncompress.h index ec8ab67122f3..f8053346f608 100644 --- a/include/asm-arm/arch-lh7a40x/uncompress.h +++ b/include/asm-arm/arch-lh7a40x/uncompress.h | |||
@@ -22,20 +22,15 @@ | |||
22 | #define UART_STATUS (*(volatile unsigned long*) (UART2_PHYS + UART_R_STATUS)) | 22 | #define UART_STATUS (*(volatile unsigned long*) (UART2_PHYS + UART_R_STATUS)) |
23 | #define UART_DATA (*(volatile unsigned long*) (UART2_PHYS + UART_R_DATA)) | 23 | #define UART_DATA (*(volatile unsigned long*) (UART2_PHYS + UART_R_DATA)) |
24 | 24 | ||
25 | static __inline__ void putc (char ch) | 25 | static inline void putc(int ch) |
26 | { | 26 | { |
27 | while (UART_STATUS & nTxRdy) | 27 | while (UART_STATUS & nTxRdy) |
28 | ; | 28 | barrier(); |
29 | UART_DATA = ch; | 29 | UART_DATA = ch; |
30 | } | 30 | } |
31 | 31 | ||
32 | static void putstr (const char* sz) | 32 | static inline void flush(void) |
33 | { | 33 | { |
34 | for (; *sz; ++sz) { | ||
35 | putc (*sz); | ||
36 | if (*sz == '\n') | ||
37 | putc ('\r'); | ||
38 | } | ||
39 | } | 34 | } |
40 | 35 | ||
41 | /* NULL functions; we don't presently need them */ | 36 | /* NULL functions; we don't presently need them */ |
diff --git a/include/asm-arm/arch-omap/param.h b/include/asm-arm/arch-omap/param.h deleted file mode 100644 index face9ad41e97..000000000000 --- a/include/asm-arm/arch-omap/param.h +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-omap/param.h | ||
3 | * | ||
4 | */ | ||
5 | |||
6 | #ifdef CONFIG_OMAP_32K_TIMER_HZ | ||
7 | #define HZ CONFIG_OMAP_32K_TIMER_HZ | ||
8 | #endif | ||
diff --git a/include/asm-arm/arch-omap/uncompress.h b/include/asm-arm/arch-omap/uncompress.h index c718264affbd..ca2c8bec82e7 100644 --- a/include/asm-arm/arch-omap/uncompress.h +++ b/include/asm-arm/arch-omap/uncompress.h | |||
@@ -30,8 +30,7 @@ unsigned int system_rev; | |||
30 | #define check_port(base, shift) ((base[UART_OMAP_MDR1 << shift] & 7) == 0) | 30 | #define check_port(base, shift) ((base[UART_OMAP_MDR1 << shift] & 7) == 0) |
31 | #define omap_get_id() ((*(volatile unsigned int *)(0xfffed404)) >> 12) & ID_MASK | 31 | #define omap_get_id() ((*(volatile unsigned int *)(0xfffed404)) >> 12) & ID_MASK |
32 | 32 | ||
33 | static void | 33 | static void putc(int c) |
34 | putstr(const char *s) | ||
35 | { | 34 | { |
36 | volatile u8 * uart = 0; | 35 | volatile u8 * uart = 0; |
37 | int shift = 2; | 36 | int shift = 2; |
@@ -69,16 +68,13 @@ putstr(const char *s) | |||
69 | /* | 68 | /* |
70 | * Now, xmit each character | 69 | * Now, xmit each character |
71 | */ | 70 | */ |
72 | while (*s) { | 71 | while (!(uart[UART_LSR << shift] & UART_LSR_THRE)) |
73 | while (!(uart[UART_LSR << shift] & UART_LSR_THRE)) | 72 | barrier(); |
74 | barrier(); | 73 | uart[UART_TX << shift] = c; |
75 | uart[UART_TX << shift] = *s; | 74 | } |
76 | if (*s++ == '\n') { | 75 | |
77 | while (!(uart[UART_LSR << shift] & UART_LSR_THRE)) | 76 | static inline void flush(void) |
78 | barrier(); | 77 | { |
79 | uart[UART_TX << shift] = '\r'; | ||
80 | } | ||
81 | } | ||
82 | } | 78 | } |
83 | 79 | ||
84 | /* | 80 | /* |
diff --git a/include/asm-arm/arch-pxa/audio.h b/include/asm-arm/arch-pxa/audio.h index 60976f830e3f..17eccd720136 100644 --- a/include/asm-arm/arch-pxa/audio.h +++ b/include/asm-arm/arch-pxa/audio.h | |||
@@ -6,8 +6,8 @@ | |||
6 | #include <sound/pcm.h> | 6 | #include <sound/pcm.h> |
7 | 7 | ||
8 | typedef struct { | 8 | typedef struct { |
9 | int (*startup)(snd_pcm_substream_t *, void *); | 9 | int (*startup)(struct snd_pcm_substream *, void *); |
10 | void (*shutdown)(snd_pcm_substream_t *, void *); | 10 | void (*shutdown)(struct snd_pcm_substream *, void *); |
11 | void (*suspend)(void *); | 11 | void (*suspend)(void *); |
12 | void (*resume)(void *); | 12 | void (*resume)(void *); |
13 | void *priv; | 13 | void *priv; |
diff --git a/include/asm-arm/arch-pxa/debug-macro.S b/include/asm-arm/arch-pxa/debug-macro.S index b6ec68879176..9012cbc0ad8b 100644 --- a/include/asm-arm/arch-pxa/debug-macro.S +++ b/include/asm-arm/arch-pxa/debug-macro.S | |||
@@ -21,18 +21,5 @@ | |||
21 | orr \rx, \rx, #0x00100000 | 21 | orr \rx, \rx, #0x00100000 |
22 | .endm | 22 | .endm |
23 | 23 | ||
24 | .macro senduart,rd,rx | 24 | #define UART_SHIFT 2 |
25 | str \rd, [\rx, #0] | 25 | #include <asm/hardware/debug-8250.S> |
26 | .endm | ||
27 | |||
28 | .macro busyuart,rd,rx | ||
29 | 1002: ldr \rd, [\rx, #0x14] | ||
30 | tst \rd, #(1 << 6) | ||
31 | beq 1002b | ||
32 | .endm | ||
33 | |||
34 | .macro waituart,rd,rx | ||
35 | 1001: ldr \rd, [\rx, #0x14] | ||
36 | tst \rd, #(1 << 5) | ||
37 | beq 1001b | ||
38 | .endm | ||
diff --git a/include/asm-arm/arch-pxa/irq.h b/include/asm-arm/arch-pxa/irq.h deleted file mode 100644 index 48c60f5eff6a..000000000000 --- a/include/asm-arm/arch-pxa/irq.h +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-pxa/irq.h | ||
3 | * | ||
4 | * Author: Nicolas Pitre | ||
5 | * Created: Jun 15, 2001 | ||
6 | * Copyright: MontaVista Software Inc. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #define fixup_irq(x) (x) | ||
14 | |||
diff --git a/include/asm-arm/arch-pxa/irqs.h b/include/asm-arm/arch-pxa/irqs.h index 05c4b7027592..67af238a8f8e 100644 --- a/include/asm-arm/arch-pxa/irqs.h +++ b/include/asm-arm/arch-pxa/irqs.h | |||
@@ -176,6 +176,7 @@ | |||
176 | #elif defined(CONFIG_SHARP_LOCOMO) | 176 | #elif defined(CONFIG_SHARP_LOCOMO) |
177 | #define NR_IRQS (IRQ_LOCOMO_SPI_TEND + 1) | 177 | #define NR_IRQS (IRQ_LOCOMO_SPI_TEND + 1) |
178 | #elif defined(CONFIG_ARCH_LUBBOCK) || \ | 178 | #elif defined(CONFIG_ARCH_LUBBOCK) || \ |
179 | defined(CONFIG_MACH_LOGICPD_PXA270) || \ | ||
179 | defined(CONFIG_MACH_MAINSTONE) | 180 | defined(CONFIG_MACH_MAINSTONE) |
180 | #define NR_IRQS (IRQ_BOARD_END) | 181 | #define NR_IRQS (IRQ_BOARD_END) |
181 | #else | 182 | #else |
@@ -196,6 +197,11 @@ | |||
196 | #define LUBBOCK_USB_DISC_IRQ LUBBOCK_IRQ(6) /* usb disconnect */ | 197 | #define LUBBOCK_USB_DISC_IRQ LUBBOCK_IRQ(6) /* usb disconnect */ |
197 | #define LUBBOCK_LAST_IRQ LUBBOCK_IRQ(6) | 198 | #define LUBBOCK_LAST_IRQ LUBBOCK_IRQ(6) |
198 | 199 | ||
200 | #define LPD270_IRQ(x) (IRQ_BOARD_START + (x)) | ||
201 | #define LPD270_USBC_IRQ LPD270_IRQ(2) | ||
202 | #define LPD270_ETHERNET_IRQ LPD270_IRQ(3) | ||
203 | #define LPD270_AC97_IRQ LPD270_IRQ(4) | ||
204 | |||
199 | #define MAINSTONE_IRQ(x) (IRQ_BOARD_START + (x)) | 205 | #define MAINSTONE_IRQ(x) (IRQ_BOARD_START + (x)) |
200 | #define MAINSTONE_MMC_IRQ MAINSTONE_IRQ(0) | 206 | #define MAINSTONE_MMC_IRQ MAINSTONE_IRQ(0) |
201 | #define MAINSTONE_USIM_IRQ MAINSTONE_IRQ(1) | 207 | #define MAINSTONE_USIM_IRQ MAINSTONE_IRQ(1) |
diff --git a/include/asm-arm/arch-pxa/lpd270.h b/include/asm-arm/arch-pxa/lpd270.h new file mode 100644 index 000000000000..501d240ac120 --- /dev/null +++ b/include/asm-arm/arch-pxa/lpd270.h | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-pxa/lpd270.h | ||
3 | * | ||
4 | * Author: Lennert Buytenhek | ||
5 | * Created: Feb 10, 2006 | ||
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 | |||
12 | #ifndef __ASM_ARCH_LPD270_H | ||
13 | #define __ASM_ARCH_LPD270_H | ||
14 | |||
15 | #define LPD270_CPLD_PHYS PXA_CS2_PHYS | ||
16 | #define LPD270_CPLD_VIRT 0xf0000000 | ||
17 | #define LPD270_CPLD_SIZE 0x00100000 | ||
18 | |||
19 | #define LPD270_ETH_PHYS (PXA_CS2_PHYS + 0x01000000) | ||
20 | |||
21 | /* CPLD registers */ | ||
22 | #define LPD270_CPLD_REG(x) ((unsigned long)(LPD270_CPLD_VIRT + (x))) | ||
23 | #define LPD270_CONTROL LPD270_CPLD_REG(0x00) | ||
24 | #define LPD270_PERIPHERAL0 LPD270_CPLD_REG(0x04) | ||
25 | #define LPD270_PERIPHERAL1 LPD270_CPLD_REG(0x08) | ||
26 | #define LPD270_CPLD_REVISION LPD270_CPLD_REG(0x14) | ||
27 | #define LPD270_EEPROM_SPI_ITF LPD270_CPLD_REG(0x20) | ||
28 | #define LPD270_MODE_PINS LPD270_CPLD_REG(0x24) | ||
29 | #define LPD270_EGPIO LPD270_CPLD_REG(0x30) | ||
30 | #define LPD270_INT_MASK LPD270_CPLD_REG(0x40) | ||
31 | #define LPD270_INT_STATUS LPD270_CPLD_REG(0x50) | ||
32 | |||
33 | #define LPD270_INT_AC97 (1 << 4) /* AC'97 CODEC IRQ */ | ||
34 | #define LPD270_INT_ETHERNET (1 << 3) /* Ethernet controller IRQ */ | ||
35 | #define LPD270_INT_USBC (1 << 2) /* USB client cable detection IRQ */ | ||
36 | |||
37 | |||
38 | #endif | ||
diff --git a/include/asm-arm/arch-pxa/param.h b/include/asm-arm/arch-pxa/param.h deleted file mode 100644 index 3197d82d7573..000000000000 --- a/include/asm-arm/arch-pxa/param.h +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-pxa/param.h | ||
3 | */ | ||
diff --git a/include/asm-arm/arch-pxa/uncompress.h b/include/asm-arm/arch-pxa/uncompress.h index fe38090444e0..178aa2e073ac 100644 --- a/include/asm-arm/arch-pxa/uncompress.h +++ b/include/asm-arm/arch-pxa/uncompress.h | |||
@@ -17,23 +17,18 @@ | |||
17 | #define UART FFUART | 17 | #define UART FFUART |
18 | 18 | ||
19 | 19 | ||
20 | static __inline__ void putc(char c) | 20 | static inline void putc(char c) |
21 | { | 21 | { |
22 | while (!(UART[5] & 0x20)); | 22 | while (!(UART[5] & 0x20)) |
23 | barrier(); | ||
23 | UART[0] = c; | 24 | UART[0] = c; |
24 | } | 25 | } |
25 | 26 | ||
26 | /* | 27 | /* |
27 | * This does not append a newline | 28 | * This does not append a newline |
28 | */ | 29 | */ |
29 | static void putstr(const char *s) | 30 | static inline void flush(void) |
30 | { | 31 | { |
31 | while (*s) { | ||
32 | putc(*s); | ||
33 | if (*s == '\n') | ||
34 | putc('\r'); | ||
35 | s++; | ||
36 | } | ||
37 | } | 32 | } |
38 | 33 | ||
39 | /* | 34 | /* |
diff --git a/include/asm-arm/arch-realview/debug-macro.S b/include/asm-arm/arch-realview/debug-macro.S index 017ad996848d..f17efc65518a 100644 --- a/include/asm-arm/arch-realview/debug-macro.S +++ b/include/asm-arm/arch-realview/debug-macro.S | |||
@@ -11,8 +11,6 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/amba/serial.h> | ||
15 | |||
16 | .macro addruart,rx | 14 | .macro addruart,rx |
17 | mrc p15, 0, \rx, c1, c0 | 15 | mrc p15, 0, \rx, c1, c0 |
18 | tst \rx, #1 @ MMU enabled? | 16 | tst \rx, #1 @ MMU enabled? |
@@ -21,18 +19,4 @@ | |||
21 | orr \rx, \rx, #0x00009000 | 19 | orr \rx, \rx, #0x00009000 |
22 | .endm | 20 | .endm |
23 | 21 | ||
24 | .macro senduart,rd,rx | 22 | #include <asm/hardware/debug-pl01x.S> |
25 | strb \rd, [\rx, #UART01x_DR] | ||
26 | .endm | ||
27 | |||
28 | .macro waituart,rd,rx | ||
29 | 1001: ldr \rd, [\rx, #0x18] @ UARTFLG | ||
30 | tst \rd, #1 << 5 @ UARTFLGUTXFF - 1 when full | ||
31 | bne 1001b | ||
32 | .endm | ||
33 | |||
34 | .macro busyuart,rd,rx | ||
35 | 1001: ldr \rd, [\rx, #0x18] @ UARTFLG | ||
36 | tst \rd, #1 << 3 @ UARTFLGUBUSY - 1 when busy | ||
37 | bne 1001b | ||
38 | .endm | ||
diff --git a/include/asm-arm/arch-realview/param.h b/include/asm-arm/arch-realview/param.h deleted file mode 100644 index 89b1235d32bd..000000000000 --- a/include/asm-arm/arch-realview/param.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-realview/param.h | ||
3 | * | ||
4 | * Copyright (C) 2002 ARM Limited | ||
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 as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
diff --git a/include/asm-arm/arch-realview/uncompress.h b/include/asm-arm/arch-realview/uncompress.h index b5e4d360665b..f05631d76743 100644 --- a/include/asm-arm/arch-realview/uncompress.h +++ b/include/asm-arm/arch-realview/uncompress.h | |||
@@ -27,22 +27,16 @@ | |||
27 | /* | 27 | /* |
28 | * This does not append a newline | 28 | * This does not append a newline |
29 | */ | 29 | */ |
30 | static void putstr(const char *s) | 30 | static inline void putc(int c) |
31 | { | 31 | { |
32 | while (*s) { | 32 | while (AMBA_UART_FR & (1 << 5)) |
33 | while (AMBA_UART_FR & (1 << 5)) | 33 | barrier(); |
34 | barrier(); | ||
35 | |||
36 | AMBA_UART_DR = *s; | ||
37 | 34 | ||
38 | if (*s == '\n') { | 35 | AMBA_UART_DR = c; |
39 | while (AMBA_UART_FR & (1 << 5)) | 36 | } |
40 | barrier(); | ||
41 | 37 | ||
42 | AMBA_UART_DR = '\r'; | 38 | static inline void flush(void) |
43 | } | 39 | { |
44 | s++; | ||
45 | } | ||
46 | while (AMBA_UART_FR & (1 << 3)) | 40 | while (AMBA_UART_FR & (1 << 3)) |
47 | barrier(); | 41 | barrier(); |
48 | } | 42 | } |
diff --git a/include/asm-arm/arch-rpc/debug-macro.S b/include/asm-arm/arch-rpc/debug-macro.S index 456d3d754c3d..c634c8d8f4a1 100644 --- a/include/asm-arm/arch-rpc/debug-macro.S +++ b/include/asm-arm/arch-rpc/debug-macro.S | |||
@@ -20,19 +20,6 @@ | |||
20 | orr \rx, \rx, #0x00000fe0 | 20 | orr \rx, \rx, #0x00000fe0 |
21 | .endm | 21 | .endm |
22 | 22 | ||
23 | .macro senduart,rd,rx | 23 | #define UART_SHIFT 2 |
24 | strb \rd, [\rx] | 24 | #define FLOW_CONTROL |
25 | .endm | 25 | #include <asm/hardware/debug-8250.S> |
26 | |||
27 | .macro busyuart,rd,rx | ||
28 | 1001: ldrb \rd, [\rx, #0x14] | ||
29 | and \rd, \rd, #0x60 | ||
30 | teq \rd, #0x60 | ||
31 | bne 1001b | ||
32 | .endm | ||
33 | |||
34 | .macro waituart,rd,rx | ||
35 | 1001: ldrb \rd, [\rx, #0x18] | ||
36 | tst \rd, #0x10 | ||
37 | beq 1001b | ||
38 | .endm | ||
diff --git a/include/asm-arm/arch-rpc/param.h b/include/asm-arm/arch-rpc/param.h deleted file mode 100644 index 721dcd658858..000000000000 --- a/include/asm-arm/arch-rpc/param.h +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-rpc/param.h | ||
3 | */ | ||
diff --git a/include/asm-arm/arch-rpc/uncompress.h b/include/asm-arm/arch-rpc/uncompress.h index 43035fec64d2..06231ede54e5 100644 --- a/include/asm-arm/arch-rpc/uncompress.h +++ b/include/asm-arm/arch-rpc/uncompress.h | |||
@@ -67,31 +67,28 @@ extern __attribute__((pure)) struct param_struct *params(void); | |||
67 | /* | 67 | /* |
68 | * This does not append a newline | 68 | * This does not append a newline |
69 | */ | 69 | */ |
70 | static void putstr(const char *s) | 70 | static void putc(int c) |
71 | { | 71 | { |
72 | extern void ll_write_char(char *, char c, char white); | 72 | extern void ll_write_char(char *, char c, char white); |
73 | int x,y; | 73 | int x,y; |
74 | unsigned char c; | ||
75 | char *ptr; | 74 | char *ptr; |
76 | 75 | ||
77 | x = params->video_x; | 76 | x = params->video_x; |
78 | y = params->video_y; | 77 | y = params->video_y; |
79 | 78 | ||
80 | while ( ( c = *(unsigned char *)s++ ) != '\0' ) { | 79 | if (c == '\n') { |
81 | if ( c == '\n' ) { | 80 | if (++y >= video_num_lines) |
81 | y--; | ||
82 | } else if (c == '\r') { | ||
83 | x = 0; | ||
84 | } else { | ||
85 | ptr = VIDMEM + ((y*video_num_columns*params->bytes_per_char_v+x)*bytes_per_char_h); | ||
86 | ll_write_char(ptr, c, white); | ||
87 | if (++x >= video_num_columns) { | ||
82 | x = 0; | 88 | x = 0; |
83 | if ( ++y >= video_num_lines ) { | 89 | if ( ++y >= video_num_lines ) { |
84 | y--; | 90 | y--; |
85 | } | 91 | } |
86 | } else { | ||
87 | ptr = VIDMEM + ((y*video_num_columns*params->bytes_per_char_v+x)*bytes_per_char_h); | ||
88 | ll_write_char(ptr, c, white); | ||
89 | if ( ++x >= video_num_columns ) { | ||
90 | x = 0; | ||
91 | if ( ++y >= video_num_lines ) { | ||
92 | y--; | ||
93 | } | ||
94 | } | ||
95 | } | 92 | } |
96 | } | 93 | } |
97 | 94 | ||
@@ -99,6 +96,10 @@ static void putstr(const char *s) | |||
99 | params->video_y = y; | 96 | params->video_y = y; |
100 | } | 97 | } |
101 | 98 | ||
99 | static inline void flush(void) | ||
100 | { | ||
101 | } | ||
102 | |||
102 | static void error(char *x); | 103 | static void error(char *x); |
103 | 104 | ||
104 | /* | 105 | /* |
diff --git a/include/asm-arm/arch-s3c2410/osiris-cpld.h b/include/asm-arm/arch-s3c2410/osiris-cpld.h new file mode 100644 index 000000000000..e9d1ae1f354f --- /dev/null +++ b/include/asm-arm/arch-s3c2410/osiris-cpld.h | |||
@@ -0,0 +1,25 @@ | |||
1 | /* linux/include/asm-arm/arch-s3c2410/osiris-cpld.h | ||
2 | * | ||
3 | * (c) 2005 Simtec Electronics | ||
4 | * http://www.simtec.co.uk/products/ | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * | ||
7 | * OSIRIS - CPLD control constants | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASM_ARCH_OSIRISCPLD_H | ||
15 | #define __ASM_ARCH_OSIRISCPLD_H | ||
16 | |||
17 | /* CTRL1 - NAND WP control */ | ||
18 | |||
19 | #define OSIRIS_CTRL1_NANDSEL (0x3) | ||
20 | #define OSIRIS_CTRL1_BOOT_INT (1<<3) | ||
21 | #define OSIRIS_CTRL1_PCMCIA (1<<4) | ||
22 | #define OSIRIS_CTRL1_PCMCIA_nWAIT (1<<6) | ||
23 | #define OSIRIS_CTRL1_PCMCIA_nIOIS16 (1<<7) | ||
24 | |||
25 | #endif /* __ASM_ARCH_OSIRISCPLD_H */ | ||
diff --git a/include/asm-arm/arch-s3c2410/osiris-map.h b/include/asm-arm/arch-s3c2410/osiris-map.h new file mode 100644 index 000000000000..7c4b0cd2d14d --- /dev/null +++ b/include/asm-arm/arch-s3c2410/osiris-map.h | |||
@@ -0,0 +1,41 @@ | |||
1 | /* linux/include/asm-arm/arch-s3c2410/osiris-map.h | ||
2 | * | ||
3 | * (c) 2005 Simtec Electronics | ||
4 | * http://www.simtec.co.uk/products/ | ||
5 | * Ben Dooks <ben@simtec.co.uk> | ||
6 | * | ||
7 | * OSIRIS - Memory map definitions | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License version 2 as | ||
11 | * published by the Free Software Foundation. | ||
12 | * | ||
13 | * Changelog: | ||
14 | */ | ||
15 | |||
16 | /* needs arch/map.h including with this */ | ||
17 | |||
18 | #ifndef __ASM_ARCH_OSIRISMAP_H | ||
19 | #define __ASM_ARCH_OSIRISMAP_H | ||
20 | |||
21 | /* start peripherals off after the S3C2410 */ | ||
22 | |||
23 | #define OSIRIS_IOADDR(x) (S3C2410_ADDR((x) + 0x05000000)) | ||
24 | |||
25 | #define OSIRIS_PA_CPLD (S3C2410_CS1 | (3<<25)) | ||
26 | |||
27 | /* we put the CPLD registers next, to get them out of the way */ | ||
28 | |||
29 | #define OSIRIS_VA_CTRL1 OSIRIS_IOADDR(0x00000000) /* 0x01300000 */ | ||
30 | #define OSIRIS_PA_CTRL1 (OSIRIS_PA_CPLD) | ||
31 | |||
32 | #define OSIRIS_VA_CTRL2 OSIRIS_IOADDR(0x00100000) /* 0x01400000 */ | ||
33 | #define OSIRIS_PA_CTRL2 (OSIRIS_PA_CPLD + (1<<24)) | ||
34 | |||
35 | #define OSIRIS_VA_CTRL3 OSIRIS_IOADDR(0x00200000) /* 0x01500000 */ | ||
36 | #define OSIRIS_PA_CTRL3 (OSIRIS_PA_CPLD + (2<<24)) | ||
37 | |||
38 | #define OSIRIS_VA_CTRL4 OSIRIS_IOADDR(0x00300000) /* 0x01600000 */ | ||
39 | #define OSIRIS_PA_CTRL4 (OSIRIS_PA_CPLD + (3<<24)) | ||
40 | |||
41 | #endif /* __ASM_ARCH_OSIRISMAP_H */ | ||
diff --git a/include/asm-arm/arch-s3c2410/param.h b/include/asm-arm/arch-s3c2410/param.h deleted file mode 100644 index 483d3f149883..000000000000 --- a/include/asm-arm/arch-s3c2410/param.h +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | /* linux/include/asm-arm/arch-s3c2410/param.h | ||
2 | * | ||
3 | * (c) 2003 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * S3C2410 - Machine parameters | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | * | ||
12 | * Changelog: | ||
13 | * 02-Sep-2003 BJD Created file | ||
14 | * 12-Mar-2004 BJD Added include protection | ||
15 | */ | ||
16 | |||
17 | #ifndef __ASM_ARCH_PARAM_H | ||
18 | #define __ASM_ARCH_PARAM_H | ||
19 | |||
20 | /* we cannot get our timer down to 100Hz with the setup as is, but we can | ||
21 | * manage 200 clock ticks per second... if this is a problem, we can always | ||
22 | * add a software pre-scaler to the evil timer systems. | ||
23 | */ | ||
24 | |||
25 | #define HZ 200 | ||
26 | |||
27 | #endif /* __ASM_ARCH_PARAM_H */ | ||
diff --git a/include/asm-arm/arch-s3c2410/regs-gpio.h b/include/asm-arm/arch-s3c2410/regs-gpio.h index 9697f93afe74..d2574084697f 100644 --- a/include/asm-arm/arch-s3c2410/regs-gpio.h +++ b/include/asm-arm/arch-s3c2410/regs-gpio.h | |||
@@ -979,6 +979,7 @@ | |||
979 | #define S3C2410_MISCCR_CLK0_HCLK (3<<4) | 979 | #define S3C2410_MISCCR_CLK0_HCLK (3<<4) |
980 | #define S3C2410_MISCCR_CLK0_PCLK (4<<4) | 980 | #define S3C2410_MISCCR_CLK0_PCLK (4<<4) |
981 | #define S3C2410_MISCCR_CLK0_DCLK0 (5<<4) | 981 | #define S3C2410_MISCCR_CLK0_DCLK0 (5<<4) |
982 | #define S3C2410_MISCCR_CLK0_MASK (7<<4) | ||
982 | 983 | ||
983 | #define S3C2410_MISCCR_CLK1_MPLL (0<<8) | 984 | #define S3C2410_MISCCR_CLK1_MPLL (0<<8) |
984 | #define S3C2410_MISCCR_CLK1_UPLL (1<<8) | 985 | #define S3C2410_MISCCR_CLK1_UPLL (1<<8) |
@@ -986,6 +987,7 @@ | |||
986 | #define S3C2410_MISCCR_CLK1_HCLK (3<<8) | 987 | #define S3C2410_MISCCR_CLK1_HCLK (3<<8) |
987 | #define S3C2410_MISCCR_CLK1_PCLK (4<<8) | 988 | #define S3C2410_MISCCR_CLK1_PCLK (4<<8) |
988 | #define S3C2410_MISCCR_CLK1_DCLK1 (5<<8) | 989 | #define S3C2410_MISCCR_CLK1_DCLK1 (5<<8) |
990 | #define S3C2410_MISCCR_CLK1_MASK (7<<8) | ||
989 | 991 | ||
990 | #define S3C2410_MISCCR_USBSUSPND0 (1<<12) | 992 | #define S3C2410_MISCCR_USBSUSPND0 (1<<12) |
991 | #define S3C2410_MISCCR_USBSUSPND1 (1<<13) | 993 | #define S3C2410_MISCCR_USBSUSPND1 (1<<13) |
diff --git a/include/asm-arm/arch-s3c2410/uncompress.h b/include/asm-arm/arch-s3c2410/uncompress.h index 4367ec054b51..a6f6a0e44afa 100644 --- a/include/asm-arm/arch-s3c2410/uncompress.h +++ b/include/asm-arm/arch-s3c2410/uncompress.h | |||
@@ -67,8 +67,7 @@ uart_rd(unsigned int reg) | |||
67 | * waiting for tx to happen... | 67 | * waiting for tx to happen... |
68 | */ | 68 | */ |
69 | 69 | ||
70 | static void | 70 | static void putc(int ch) |
71 | putc(char ch) | ||
72 | { | 71 | { |
73 | int cpuid = S3C2410_GSTATUS1_2410; | 72 | int cpuid = S3C2410_GSTATUS1_2410; |
74 | 73 | ||
@@ -77,9 +76,6 @@ putc(char ch) | |||
77 | cpuid &= S3C2410_GSTATUS1_IDMASK; | 76 | cpuid &= S3C2410_GSTATUS1_IDMASK; |
78 | #endif | 77 | #endif |
79 | 78 | ||
80 | if (ch == '\n') | ||
81 | putc('\r'); /* expand newline to \r\n */ | ||
82 | |||
83 | if (uart_rd(S3C2410_UFCON) & S3C2410_UFCON_FIFOMODE) { | 79 | if (uart_rd(S3C2410_UFCON) & S3C2410_UFCON_FIFOMODE) { |
84 | int level; | 80 | int level; |
85 | 81 | ||
@@ -101,19 +97,16 @@ putc(char ch) | |||
101 | } else { | 97 | } else { |
102 | /* not using fifos */ | 98 | /* not using fifos */ |
103 | 99 | ||
104 | while ((uart_rd(S3C2410_UTRSTAT) & S3C2410_UTRSTAT_TXE) != S3C2410_UTRSTAT_TXE); | 100 | while ((uart_rd(S3C2410_UTRSTAT) & S3C2410_UTRSTAT_TXE) != S3C2410_UTRSTAT_TXE) |
101 | barrier(); | ||
105 | } | 102 | } |
106 | 103 | ||
107 | /* write byte to transmission register */ | 104 | /* write byte to transmission register */ |
108 | uart_wr(S3C2410_UTXH, ch); | 105 | uart_wr(S3C2410_UTXH, ch); |
109 | } | 106 | } |
110 | 107 | ||
111 | static void | 108 | static inline void flush(void) |
112 | putstr(const char *ptr) | ||
113 | { | 109 | { |
114 | for (; *ptr != '\0'; ptr++) { | ||
115 | putc(*ptr); | ||
116 | } | ||
117 | } | 110 | } |
118 | 111 | ||
119 | #define __raw_writel(d,ad) do { *((volatile unsigned int *)(ad)) = (d); } while(0) | 112 | #define __raw_writel(d,ad) do { *((volatile unsigned int *)(ad)) = (d); } while(0) |
diff --git a/include/asm-arm/arch-sa1100/debug-macro.S b/include/asm-arm/arch-sa1100/debug-macro.S index 755fa3453862..267c317a7408 100644 --- a/include/asm-arm/arch-sa1100/debug-macro.S +++ b/include/asm-arm/arch-sa1100/debug-macro.S | |||
@@ -10,6 +10,7 @@ | |||
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | #include <asm/hardware.h> | ||
13 | 14 | ||
14 | .macro addruart,rx | 15 | .macro addruart,rx |
15 | mrc p15, 0, \rx, c1, c0 | 16 | mrc p15, 0, \rx, c1, c0 |
diff --git a/include/asm-arm/arch-sa1100/param.h b/include/asm-arm/arch-sa1100/param.h deleted file mode 100644 index 867488909ecd..000000000000 --- a/include/asm-arm/arch-sa1100/param.h +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-sa1100/param.h | ||
3 | */ | ||
diff --git a/include/asm-arm/arch-sa1100/uncompress.h b/include/asm-arm/arch-sa1100/uncompress.h index 43453501ee66..2601a77a6dda 100644 --- a/include/asm-arm/arch-sa1100/uncompress.h +++ b/include/asm-arm/arch-sa1100/uncompress.h | |||
@@ -17,7 +17,7 @@ | |||
17 | 17 | ||
18 | #define UART(x) (*(volatile unsigned long *)(serial_port + (x))) | 18 | #define UART(x) (*(volatile unsigned long *)(serial_port + (x))) |
19 | 19 | ||
20 | static void putstr( const char *s ) | 20 | static void putc(int c) |
21 | { | 21 | { |
22 | unsigned long serial_port; | 22 | unsigned long serial_port; |
23 | 23 | ||
@@ -31,19 +31,16 @@ static void putstr( const char *s ) | |||
31 | return; | 31 | return; |
32 | } while (0); | 32 | } while (0); |
33 | 33 | ||
34 | for (; *s; s++) { | 34 | /* wait for space in the UART's transmitter */ |
35 | /* wait for space in the UART's transmitter */ | 35 | while (!(UART(UTSR1) & UTSR1_TNF)) |
36 | while (!(UART(UTSR1) & UTSR1_TNF)); | 36 | barrier(); |
37 | 37 | ||
38 | /* send the character out. */ | 38 | /* send the character out. */ |
39 | UART(UTDR) = *s; | 39 | UART(UTDR) = c; |
40 | } | ||
40 | 41 | ||
41 | /* if a LF, also do CR... */ | 42 | static inline void flush(void) |
42 | if (*s == 10) { | 43 | { |
43 | while (!(UART(UTSR1) & UTSR1_TNF)); | ||
44 | UART(UTDR) = 13; | ||
45 | } | ||
46 | } | ||
47 | } | 44 | } |
48 | 45 | ||
49 | /* | 46 | /* |
diff --git a/include/asm-arm/arch-shark/param.h b/include/asm-arm/arch-shark/param.h deleted file mode 100644 index 997eeb71de00..000000000000 --- a/include/asm-arm/arch-shark/param.h +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-shark/param.h | ||
3 | * | ||
4 | * by Alexander Schulz | ||
5 | */ | ||
diff --git a/include/asm-arm/arch-shark/uncompress.h b/include/asm-arm/arch-shark/uncompress.h index 910a8e0a0ca5..7eca6534f1bb 100644 --- a/include/asm-arm/arch-shark/uncompress.h +++ b/include/asm-arm/arch-shark/uncompress.h | |||
@@ -9,7 +9,7 @@ | |||
9 | 9 | ||
10 | #define SERIAL_BASE ((volatile unsigned char *)0x400003f8) | 10 | #define SERIAL_BASE ((volatile unsigned char *)0x400003f8) |
11 | 11 | ||
12 | static __inline__ void putc(char c) | 12 | static inline void putc(int c) |
13 | { | 13 | { |
14 | int t; | 14 | int t; |
15 | 15 | ||
@@ -18,17 +18,8 @@ static __inline__ void putc(char c) | |||
18 | while (t--); | 18 | while (t--); |
19 | } | 19 | } |
20 | 20 | ||
21 | /* | 21 | static inline void flush(void) |
22 | * This does not append a newline | ||
23 | */ | ||
24 | static void putstr(const char *s) | ||
25 | { | 22 | { |
26 | while (*s) { | ||
27 | putc(*s); | ||
28 | if (*s == '\n') | ||
29 | putc('\r'); | ||
30 | s++; | ||
31 | } | ||
32 | } | 23 | } |
33 | 24 | ||
34 | #ifdef DEBUG | 25 | #ifdef DEBUG |
diff --git a/include/asm-arm/arch-versatile/debug-macro.S b/include/asm-arm/arch-versatile/debug-macro.S index ef6167116dbb..fe106d184e62 100644 --- a/include/asm-arm/arch-versatile/debug-macro.S +++ b/include/asm-arm/arch-versatile/debug-macro.S | |||
@@ -11,8 +11,6 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/amba/serial.h> | ||
15 | |||
16 | .macro addruart,rx | 14 | .macro addruart,rx |
17 | mrc p15, 0, \rx, c1, c0 | 15 | mrc p15, 0, \rx, c1, c0 |
18 | tst \rx, #1 @ MMU enabled? | 16 | tst \rx, #1 @ MMU enabled? |
@@ -22,18 +20,4 @@ | |||
22 | orr \rx, \rx, #0x00001000 | 20 | orr \rx, \rx, #0x00001000 |
23 | .endm | 21 | .endm |
24 | 22 | ||
25 | .macro senduart,rd,rx | 23 | #include <asm/hardware/debug-pl01x.S> |
26 | strb \rd, [\rx, #UART01x_DR] | ||
27 | .endm | ||
28 | |||
29 | .macro waituart,rd,rx | ||
30 | 1001: ldr \rd, [\rx, #0x18] @ UARTFLG | ||
31 | tst \rd, #1 << 5 @ UARTFLGUTXFF - 1 when full | ||
32 | bne 1001b | ||
33 | .endm | ||
34 | |||
35 | .macro busyuart,rd,rx | ||
36 | 1001: ldr \rd, [\rx, #0x18] @ UARTFLG | ||
37 | tst \rd, #1 << 3 @ UARTFLGUBUSY - 1 when busy | ||
38 | bne 1001b | ||
39 | .endm | ||
diff --git a/include/asm-arm/arch-versatile/param.h b/include/asm-arm/arch-versatile/param.h deleted file mode 100644 index 34b897335f87..000000000000 --- a/include/asm-arm/arch-versatile/param.h +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-versatile/param.h | ||
3 | * | ||
4 | * Copyright (C) 2002 ARM Limited | ||
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 as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
diff --git a/include/asm-arm/arch-versatile/uncompress.h b/include/asm-arm/arch-versatile/uncompress.h index 2f57499c7b92..7215133d0514 100644 --- a/include/asm-arm/arch-versatile/uncompress.h +++ b/include/asm-arm/arch-versatile/uncompress.h | |||
@@ -25,22 +25,16 @@ | |||
25 | /* | 25 | /* |
26 | * This does not append a newline | 26 | * This does not append a newline |
27 | */ | 27 | */ |
28 | static void putstr(const char *s) | 28 | static inline void putc(int c) |
29 | { | 29 | { |
30 | while (*s) { | 30 | while (AMBA_UART_FR & (1 << 5)) |
31 | while (AMBA_UART_FR & (1 << 5)) | 31 | barrier(); |
32 | barrier(); | ||
33 | |||
34 | AMBA_UART_DR = *s; | ||
35 | 32 | ||
36 | if (*s == '\n') { | 33 | AMBA_UART_DR = c; |
37 | while (AMBA_UART_FR & (1 << 5)) | 34 | } |
38 | barrier(); | ||
39 | 35 | ||
40 | AMBA_UART_DR = '\r'; | 36 | static inline void flush(void) |
41 | } | 37 | { |
42 | s++; | ||
43 | } | ||
44 | while (AMBA_UART_FR & (1 << 3)) | 38 | while (AMBA_UART_FR & (1 << 3)) |
45 | barrier(); | 39 | barrier(); |
46 | } | 40 | } |
diff --git a/include/asm-arm/assembler.h b/include/asm-arm/assembler.h index f31ac92b6c7f..d53bafa9bf1c 100644 --- a/include/asm-arm/assembler.h +++ b/include/asm-arm/assembler.h | |||
@@ -80,16 +80,33 @@ | |||
80 | instr regs | 80 | instr regs |
81 | 81 | ||
82 | /* | 82 | /* |
83 | * Save the current IRQ state and disable IRQs. Note that this macro | 83 | * Enable and disable interrupts |
84 | * assumes FIQs are enabled, and that the processor is in SVC mode. | ||
85 | */ | 84 | */ |
86 | .macro save_and_disable_irqs, oldcpsr | ||
87 | mrs \oldcpsr, cpsr | ||
88 | #if __LINUX_ARM_ARCH__ >= 6 | 85 | #if __LINUX_ARM_ARCH__ >= 6 |
86 | .macro disable_irq | ||
89 | cpsid i | 87 | cpsid i |
88 | .endm | ||
89 | |||
90 | .macro enable_irq | ||
91 | cpsie i | ||
92 | .endm | ||
90 | #else | 93 | #else |
91 | msr cpsr_c, #PSR_I_BIT | MODE_SVC | 94 | .macro disable_irq |
95 | msr cpsr_c, #PSR_I_BIT | SVC_MODE | ||
96 | .endm | ||
97 | |||
98 | .macro enable_irq | ||
99 | msr cpsr_c, #SVC_MODE | ||
100 | .endm | ||
92 | #endif | 101 | #endif |
102 | |||
103 | /* | ||
104 | * Save the current IRQ state and disable IRQs. Note that this macro | ||
105 | * assumes FIQs are enabled, and that the processor is in SVC mode. | ||
106 | */ | ||
107 | .macro save_and_disable_irqs, oldcpsr | ||
108 | mrs \oldcpsr, cpsr | ||
109 | disable_irq | ||
93 | .endm | 110 | .endm |
94 | 111 | ||
95 | /* | 112 | /* |
diff --git a/include/asm-arm/bitops.h b/include/asm-arm/bitops.h index d02de721ecc1..0ac54b1a8bad 100644 --- a/include/asm-arm/bitops.h +++ b/include/asm-arm/bitops.h | |||
@@ -117,65 +117,7 @@ ____atomic_test_and_change_bit(unsigned int bit, volatile unsigned long *p) | |||
117 | return res & mask; | 117 | return res & mask; |
118 | } | 118 | } |
119 | 119 | ||
120 | /* | 120 | #include <asm-generic/bitops/non-atomic.h> |
121 | * Now the non-atomic variants. We let the compiler handle all | ||
122 | * optimisations for these. These are all _native_ endian. | ||
123 | */ | ||
124 | static inline void __set_bit(int nr, volatile unsigned long *p) | ||
125 | { | ||
126 | p[nr >> 5] |= (1UL << (nr & 31)); | ||
127 | } | ||
128 | |||
129 | static inline void __clear_bit(int nr, volatile unsigned long *p) | ||
130 | { | ||
131 | p[nr >> 5] &= ~(1UL << (nr & 31)); | ||
132 | } | ||
133 | |||
134 | static inline void __change_bit(int nr, volatile unsigned long *p) | ||
135 | { | ||
136 | p[nr >> 5] ^= (1UL << (nr & 31)); | ||
137 | } | ||
138 | |||
139 | static inline int __test_and_set_bit(int nr, volatile unsigned long *p) | ||
140 | { | ||
141 | unsigned long oldval, mask = 1UL << (nr & 31); | ||
142 | |||
143 | p += nr >> 5; | ||
144 | |||
145 | oldval = *p; | ||
146 | *p = oldval | mask; | ||
147 | return oldval & mask; | ||
148 | } | ||
149 | |||
150 | static inline int __test_and_clear_bit(int nr, volatile unsigned long *p) | ||
151 | { | ||
152 | unsigned long oldval, mask = 1UL << (nr & 31); | ||
153 | |||
154 | p += nr >> 5; | ||
155 | |||
156 | oldval = *p; | ||
157 | *p = oldval & ~mask; | ||
158 | return oldval & mask; | ||
159 | } | ||
160 | |||
161 | static inline int __test_and_change_bit(int nr, volatile unsigned long *p) | ||
162 | { | ||
163 | unsigned long oldval, mask = 1UL << (nr & 31); | ||
164 | |||
165 | p += nr >> 5; | ||
166 | |||
167 | oldval = *p; | ||
168 | *p = oldval ^ mask; | ||
169 | return oldval & mask; | ||
170 | } | ||
171 | |||
172 | /* | ||
173 | * This routine doesn't need to be atomic. | ||
174 | */ | ||
175 | static inline int __test_bit(int nr, const volatile unsigned long * p) | ||
176 | { | ||
177 | return (p[nr >> 5] >> (nr & 31)) & 1UL; | ||
178 | } | ||
179 | 121 | ||
180 | /* | 122 | /* |
181 | * A note about Endian-ness. | 123 | * A note about Endian-ness. |
@@ -261,7 +203,6 @@ extern int _find_next_bit_be(const unsigned long *p, int size, int offset); | |||
261 | #define test_and_set_bit(nr,p) ATOMIC_BITOP_LE(test_and_set_bit,nr,p) | 203 | #define test_and_set_bit(nr,p) ATOMIC_BITOP_LE(test_and_set_bit,nr,p) |
262 | #define test_and_clear_bit(nr,p) ATOMIC_BITOP_LE(test_and_clear_bit,nr,p) | 204 | #define test_and_clear_bit(nr,p) ATOMIC_BITOP_LE(test_and_clear_bit,nr,p) |
263 | #define test_and_change_bit(nr,p) ATOMIC_BITOP_LE(test_and_change_bit,nr,p) | 205 | #define test_and_change_bit(nr,p) ATOMIC_BITOP_LE(test_and_change_bit,nr,p) |
264 | #define test_bit(nr,p) __test_bit(nr,p) | ||
265 | #define find_first_zero_bit(p,sz) _find_first_zero_bit_le(p,sz) | 206 | #define find_first_zero_bit(p,sz) _find_first_zero_bit_le(p,sz) |
266 | #define find_next_zero_bit(p,sz,off) _find_next_zero_bit_le(p,sz,off) | 207 | #define find_next_zero_bit(p,sz,off) _find_next_zero_bit_le(p,sz,off) |
267 | #define find_first_bit(p,sz) _find_first_bit_le(p,sz) | 208 | #define find_first_bit(p,sz) _find_first_bit_le(p,sz) |
@@ -280,7 +221,6 @@ extern int _find_next_bit_be(const unsigned long *p, int size, int offset); | |||
280 | #define test_and_set_bit(nr,p) ATOMIC_BITOP_BE(test_and_set_bit,nr,p) | 221 | #define test_and_set_bit(nr,p) ATOMIC_BITOP_BE(test_and_set_bit,nr,p) |
281 | #define test_and_clear_bit(nr,p) ATOMIC_BITOP_BE(test_and_clear_bit,nr,p) | 222 | #define test_and_clear_bit(nr,p) ATOMIC_BITOP_BE(test_and_clear_bit,nr,p) |
282 | #define test_and_change_bit(nr,p) ATOMIC_BITOP_BE(test_and_change_bit,nr,p) | 223 | #define test_and_change_bit(nr,p) ATOMIC_BITOP_BE(test_and_change_bit,nr,p) |
283 | #define test_bit(nr,p) __test_bit(nr,p) | ||
284 | #define find_first_zero_bit(p,sz) _find_first_zero_bit_be(p,sz) | 224 | #define find_first_zero_bit(p,sz) _find_first_zero_bit_be(p,sz) |
285 | #define find_next_zero_bit(p,sz,off) _find_next_zero_bit_be(p,sz,off) | 225 | #define find_next_zero_bit(p,sz,off) _find_next_zero_bit_be(p,sz,off) |
286 | #define find_first_bit(p,sz) _find_first_bit_be(p,sz) | 226 | #define find_first_bit(p,sz) _find_first_bit_be(p,sz) |
@@ -292,57 +232,41 @@ extern int _find_next_bit_be(const unsigned long *p, int size, int offset); | |||
292 | 232 | ||
293 | #if __LINUX_ARM_ARCH__ < 5 | 233 | #if __LINUX_ARM_ARCH__ < 5 |
294 | 234 | ||
295 | /* | 235 | #include <asm-generic/bitops/ffz.h> |
296 | * ffz = Find First Zero in word. Undefined if no zero exists, | 236 | #include <asm-generic/bitops/__ffs.h> |
297 | * so code should check against ~0UL first.. | 237 | #include <asm-generic/bitops/fls.h> |
298 | */ | 238 | #include <asm-generic/bitops/ffs.h> |
299 | static inline unsigned long ffz(unsigned long word) | ||
300 | { | ||
301 | int k; | ||
302 | |||
303 | word = ~word; | ||
304 | k = 31; | ||
305 | if (word & 0x0000ffff) { k -= 16; word <<= 16; } | ||
306 | if (word & 0x00ff0000) { k -= 8; word <<= 8; } | ||
307 | if (word & 0x0f000000) { k -= 4; word <<= 4; } | ||
308 | if (word & 0x30000000) { k -= 2; word <<= 2; } | ||
309 | if (word & 0x40000000) { k -= 1; } | ||
310 | return k; | ||
311 | } | ||
312 | |||
313 | /* | ||
314 | * ffz = Find First Zero in word. Undefined if no zero exists, | ||
315 | * so code should check against ~0UL first.. | ||
316 | */ | ||
317 | static inline unsigned long __ffs(unsigned long word) | ||
318 | { | ||
319 | int k; | ||
320 | |||
321 | k = 31; | ||
322 | if (word & 0x0000ffff) { k -= 16; word <<= 16; } | ||
323 | if (word & 0x00ff0000) { k -= 8; word <<= 8; } | ||
324 | if (word & 0x0f000000) { k -= 4; word <<= 4; } | ||
325 | if (word & 0x30000000) { k -= 2; word <<= 2; } | ||
326 | if (word & 0x40000000) { k -= 1; } | ||
327 | return k; | ||
328 | } | ||
329 | |||
330 | /* | ||
331 | * fls: find last bit set. | ||
332 | */ | ||
333 | 239 | ||
334 | #define fls(x) generic_fls(x) | 240 | #else |
335 | #define fls64(x) generic_fls64(x) | ||
336 | |||
337 | /* | ||
338 | * ffs: find first bit set. This is defined the same way as | ||
339 | * the libc and compiler builtin ffs routines, therefore | ||
340 | * differs in spirit from the above ffz (man ffs). | ||
341 | */ | ||
342 | 241 | ||
343 | #define ffs(x) generic_ffs(x) | 242 | static inline int constant_fls(int x) |
243 | { | ||
244 | int r = 32; | ||
344 | 245 | ||
345 | #else | 246 | if (!x) |
247 | return 0; | ||
248 | if (!(x & 0xffff0000u)) { | ||
249 | x <<= 16; | ||
250 | r -= 16; | ||
251 | } | ||
252 | if (!(x & 0xff000000u)) { | ||
253 | x <<= 8; | ||
254 | r -= 8; | ||
255 | } | ||
256 | if (!(x & 0xf0000000u)) { | ||
257 | x <<= 4; | ||
258 | r -= 4; | ||
259 | } | ||
260 | if (!(x & 0xc0000000u)) { | ||
261 | x <<= 2; | ||
262 | r -= 2; | ||
263 | } | ||
264 | if (!(x & 0x80000000u)) { | ||
265 | x <<= 1; | ||
266 | r -= 1; | ||
267 | } | ||
268 | return r; | ||
269 | } | ||
346 | 270 | ||
347 | /* | 271 | /* |
348 | * On ARMv5 and above those functions can be implemented around | 272 | * On ARMv5 and above those functions can be implemented around |
@@ -350,39 +274,18 @@ static inline unsigned long __ffs(unsigned long word) | |||
350 | */ | 274 | */ |
351 | 275 | ||
352 | #define fls(x) \ | 276 | #define fls(x) \ |
353 | ( __builtin_constant_p(x) ? generic_fls(x) : \ | 277 | ( __builtin_constant_p(x) ? constant_fls(x) : \ |
354 | ({ int __r; asm("clz\t%0, %1" : "=r"(__r) : "r"(x) : "cc"); 32-__r; }) ) | 278 | ({ int __r; asm("clz\t%0, %1" : "=r"(__r) : "r"(x) : "cc"); 32-__r; }) ) |
355 | #define fls64(x) generic_fls64(x) | ||
356 | #define ffs(x) ({ unsigned long __t = (x); fls(__t & -__t); }) | 279 | #define ffs(x) ({ unsigned long __t = (x); fls(__t & -__t); }) |
357 | #define __ffs(x) (ffs(x) - 1) | 280 | #define __ffs(x) (ffs(x) - 1) |
358 | #define ffz(x) __ffs( ~(x) ) | 281 | #define ffz(x) __ffs( ~(x) ) |
359 | 282 | ||
360 | #endif | 283 | #endif |
361 | 284 | ||
362 | /* | 285 | #include <asm-generic/bitops/fls64.h> |
363 | * Find first bit set in a 168-bit bitmap, where the first | ||
364 | * 128 bits are unlikely to be set. | ||
365 | */ | ||
366 | static inline int sched_find_first_bit(const unsigned long *b) | ||
367 | { | ||
368 | unsigned long v; | ||
369 | unsigned int off; | ||
370 | |||
371 | for (off = 0; v = b[off], off < 4; off++) { | ||
372 | if (unlikely(v)) | ||
373 | break; | ||
374 | } | ||
375 | return __ffs(v) + off * 32; | ||
376 | } | ||
377 | |||
378 | /* | ||
379 | * hweightN: returns the hamming weight (i.e. the number | ||
380 | * of bits set) of a N-bit word | ||
381 | */ | ||
382 | 286 | ||
383 | #define hweight32(x) generic_hweight32(x) | 287 | #include <asm-generic/bitops/sched.h> |
384 | #define hweight16(x) generic_hweight16(x) | 288 | #include <asm-generic/bitops/hweight.h> |
385 | #define hweight8(x) generic_hweight8(x) | ||
386 | 289 | ||
387 | /* | 290 | /* |
388 | * Ext2 is defined to use little-endian byte ordering. | 291 | * Ext2 is defined to use little-endian byte ordering. |
@@ -397,7 +300,7 @@ static inline int sched_find_first_bit(const unsigned long *b) | |||
397 | #define ext2_clear_bit_atomic(lock,nr,p) \ | 300 | #define ext2_clear_bit_atomic(lock,nr,p) \ |
398 | test_and_clear_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p)) | 301 | test_and_clear_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p)) |
399 | #define ext2_test_bit(nr,p) \ | 302 | #define ext2_test_bit(nr,p) \ |
400 | __test_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p)) | 303 | test_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p)) |
401 | #define ext2_find_first_zero_bit(p,sz) \ | 304 | #define ext2_find_first_zero_bit(p,sz) \ |
402 | _find_first_zero_bit_le(p,sz) | 305 | _find_first_zero_bit_le(p,sz) |
403 | #define ext2_find_next_zero_bit(p,sz,off) \ | 306 | #define ext2_find_next_zero_bit(p,sz,off) \ |
@@ -410,7 +313,7 @@ static inline int sched_find_first_bit(const unsigned long *b) | |||
410 | #define minix_set_bit(nr,p) \ | 313 | #define minix_set_bit(nr,p) \ |
411 | __set_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p)) | 314 | __set_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p)) |
412 | #define minix_test_bit(nr,p) \ | 315 | #define minix_test_bit(nr,p) \ |
413 | __test_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p)) | 316 | test_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p)) |
414 | #define minix_test_and_set_bit(nr,p) \ | 317 | #define minix_test_and_set_bit(nr,p) \ |
415 | __test_and_set_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p)) | 318 | __test_and_set_bit(WORD_BITOFF_TO_LE(nr), (unsigned long *)(p)) |
416 | #define minix_test_and_clear_bit(nr,p) \ | 319 | #define minix_test_and_clear_bit(nr,p) \ |
diff --git a/include/asm-arm/cacheflush.h b/include/asm-arm/cacheflush.h index 09e19a783a51..746be56b1b70 100644 --- a/include/asm-arm/cacheflush.h +++ b/include/asm-arm/cacheflush.h | |||
@@ -71,6 +71,14 @@ | |||
71 | # endif | 71 | # endif |
72 | #endif | 72 | #endif |
73 | 73 | ||
74 | #if defined(CONFIG_CPU_XSC3) | ||
75 | # ifdef _CACHE | ||
76 | # define MULTI_CACHE 1 | ||
77 | # else | ||
78 | # define _CACHE xsc3 | ||
79 | # endif | ||
80 | #endif | ||
81 | |||
74 | #if defined(CONFIG_CPU_V6) | 82 | #if defined(CONFIG_CPU_V6) |
75 | //# ifdef _CACHE | 83 | //# ifdef _CACHE |
76 | # define MULTI_CACHE 1 | 84 | # define MULTI_CACHE 1 |
diff --git a/include/asm-arm/delay.h b/include/asm-arm/delay.h index 1704360e9699..b2deda181549 100644 --- a/include/asm-arm/delay.h +++ b/include/asm-arm/delay.h | |||
@@ -6,6 +6,8 @@ | |||
6 | #ifndef __ASM_ARM_DELAY_H | 6 | #ifndef __ASM_ARM_DELAY_H |
7 | #define __ASM_ARM_DELAY_H | 7 | #define __ASM_ARM_DELAY_H |
8 | 8 | ||
9 | #include <asm/param.h> /* HZ */ | ||
10 | |||
9 | extern void __delay(int loops); | 11 | extern void __delay(int loops); |
10 | 12 | ||
11 | /* | 13 | /* |
@@ -13,7 +15,7 @@ extern void __delay(int loops); | |||
13 | * it, it means that you're calling udelay() with an out of range value. | 15 | * it, it means that you're calling udelay() with an out of range value. |
14 | * | 16 | * |
15 | * With currently imposed limits, this means that we support a max delay | 17 | * With currently imposed limits, this means that we support a max delay |
16 | * of 2000us and 671 bogomips | 18 | * of 2000us. Further limits: HZ<=1000 and bogomips<=3355 |
17 | */ | 19 | */ |
18 | extern void __bad_udelay(void); | 20 | extern void __bad_udelay(void); |
19 | 21 | ||
@@ -32,10 +34,10 @@ extern void __const_udelay(unsigned long); | |||
32 | 34 | ||
33 | #define MAX_UDELAY_MS 2 | 35 | #define MAX_UDELAY_MS 2 |
34 | 36 | ||
35 | #define udelay(n) \ | 37 | #define udelay(n) \ |
36 | (__builtin_constant_p(n) ? \ | 38 | (__builtin_constant_p(n) ? \ |
37 | ((n) > (MAX_UDELAY_MS * 1000) ? __bad_udelay() : \ | 39 | ((n) > (MAX_UDELAY_MS * 1000) ? __bad_udelay() : \ |
38 | __const_udelay((n) * 0x68dbul)) : \ | 40 | __const_udelay((n) * ((2199023U*HZ)>>11))) : \ |
39 | __udelay(n)) | 41 | __udelay(n)) |
40 | 42 | ||
41 | #endif /* defined(_ARM_DELAY_H) */ | 43 | #endif /* defined(_ARM_DELAY_H) */ |
diff --git a/include/asm-arm/domain.h b/include/asm-arm/domain.h index da1d960387d9..f8ea2de4848e 100644 --- a/include/asm-arm/domain.h +++ b/include/asm-arm/domain.h | |||
@@ -16,11 +16,29 @@ | |||
16 | * DOMAIN_IO - domain 2 includes all IO only | 16 | * DOMAIN_IO - domain 2 includes all IO only |
17 | * DOMAIN_USER - domain 1 includes all user memory only | 17 | * DOMAIN_USER - domain 1 includes all user memory only |
18 | * DOMAIN_KERNEL - domain 0 includes all kernel memory only | 18 | * DOMAIN_KERNEL - domain 0 includes all kernel memory only |
19 | * | ||
20 | * The domain numbering depends on whether we support 36 physical | ||
21 | * address for I/O or not. Addresses above the 32 bit boundary can | ||
22 | * only be mapped using supersections and supersections can only | ||
23 | * be set for domain 0. We could just default to DOMAIN_IO as zero, | ||
24 | * but there may be systems with supersection support and no 36-bit | ||
25 | * addressing. In such cases, we want to map system memory with | ||
26 | * supersections to reduce TLB misses and footprint. | ||
27 | * | ||
28 | * 36-bit addressing and supersections are only available on | ||
29 | * CPUs based on ARMv6+ or the Intel XSC3 core. | ||
19 | */ | 30 | */ |
31 | #ifndef CONFIG_IO_36 | ||
20 | #define DOMAIN_KERNEL 0 | 32 | #define DOMAIN_KERNEL 0 |
21 | #define DOMAIN_TABLE 0 | 33 | #define DOMAIN_TABLE 0 |
22 | #define DOMAIN_USER 1 | 34 | #define DOMAIN_USER 1 |
23 | #define DOMAIN_IO 2 | 35 | #define DOMAIN_IO 2 |
36 | #else | ||
37 | #define DOMAIN_KERNEL 2 | ||
38 | #define DOMAIN_TABLE 2 | ||
39 | #define DOMAIN_USER 1 | ||
40 | #define DOMAIN_IO 0 | ||
41 | #endif | ||
24 | 42 | ||
25 | /* | 43 | /* |
26 | * Domain types | 44 | * Domain types |
diff --git a/include/asm-arm/hardware/debug-8250.S b/include/asm-arm/hardware/debug-8250.S new file mode 100644 index 000000000000..4594fea91ec1 --- /dev/null +++ b/include/asm-arm/hardware/debug-8250.S | |||
@@ -0,0 +1,29 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/hardware/debug-8250.h | ||
3 | * | ||
4 | * Copyright (C) 1994-1999 Russell King | ||
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 | #include <linux/serial_reg.h> | ||
11 | |||
12 | .macro senduart,rd,rx | ||
13 | strb \rd, [\rx, #UART_TX << UART_SHIFT] | ||
14 | .endm | ||
15 | |||
16 | .macro busyuart,rd,rx | ||
17 | 1002: ldrb \rd, [\rx, #UART_LSR << UART_SHIFT] | ||
18 | and \rd, \rd, #UART_LSR_TEMT | UART_LSR_THRE | ||
19 | teq \rd, #UART_LSR_TEMT | UART_LSR_THRE | ||
20 | bne 1002b | ||
21 | .endm | ||
22 | |||
23 | .macro waituart,rd,rx | ||
24 | #ifdef FLOW_CONTROL | ||
25 | 1001: ldrb \rd, [\rx, #UART_MSR << UART_SHIFT] | ||
26 | tst \rd, #UART_MSR_CTS | ||
27 | beq 1001b | ||
28 | #endif | ||
29 | .endm | ||
diff --git a/include/asm-arm/hardware/debug-pl01x.S b/include/asm-arm/hardware/debug-pl01x.S new file mode 100644 index 000000000000..db0d0f7de5e9 --- /dev/null +++ b/include/asm-arm/hardware/debug-pl01x.S | |||
@@ -0,0 +1,29 @@ | |||
1 | /* linux/include/asm-arm/arch-integrator/debug-macro.S | ||
2 | * | ||
3 | * Debugging macro include header | ||
4 | * | ||
5 | * Copyright (C) 1994-1999 Russell King | ||
6 | * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | * | ||
12 | */ | ||
13 | #include <linux/amba/serial.h> | ||
14 | |||
15 | .macro senduart,rd,rx | ||
16 | strb \rd, [\rx, #UART01x_DR] | ||
17 | .endm | ||
18 | |||
19 | .macro waituart,rd,rx | ||
20 | 1001: ldr \rd, [\rx, #UART01x_FR] | ||
21 | tst \rd, #UART01x_FR_TXFF | ||
22 | bne 1001b | ||
23 | .endm | ||
24 | |||
25 | .macro busyuart,rd,rx | ||
26 | 1001: ldr \rd, [\rx, #UART01x_FR] | ||
27 | tst \rd, #UART01x_FR_BUSY | ||
28 | bne 1001b | ||
29 | .endm | ||
diff --git a/include/asm-arm/arch-ixp2000/uengine.h b/include/asm-arm/hardware/uengine.h index b442d65c6593..b442d65c6593 100644 --- a/include/asm-arm/arch-ixp2000/uengine.h +++ b/include/asm-arm/hardware/uengine.h | |||
diff --git a/include/asm-arm/hardware/vic.h b/include/asm-arm/hardware/vic.h index 81825eb54c9e..ed9ca3736a0b 100644 --- a/include/asm-arm/hardware/vic.h +++ b/include/asm-arm/hardware/vic.h | |||
@@ -39,7 +39,7 @@ | |||
39 | #define VIC_VECT_CNTL_ENABLE (1 << 5) | 39 | #define VIC_VECT_CNTL_ENABLE (1 << 5) |
40 | 40 | ||
41 | #ifndef __ASSEMBLY__ | 41 | #ifndef __ASSEMBLY__ |
42 | void vic_init(void __iomem *base, u32 vic_sources); | 42 | void vic_init(void __iomem *base, unsigned int irq_start, u32 vic_sources); |
43 | #endif | 43 | #endif |
44 | 44 | ||
45 | #endif | 45 | #endif |
diff --git a/include/asm-arm/io.h b/include/asm-arm/io.h index fd0147e52dbb..b3479fc1cc8f 100644 --- a/include/asm-arm/io.h +++ b/include/asm-arm/io.h | |||
@@ -226,42 +226,6 @@ out: | |||
226 | #endif /* __mem_pci */ | 226 | #endif /* __mem_pci */ |
227 | 227 | ||
228 | /* | 228 | /* |
229 | * If this architecture has ISA IO, then define the isa_read/isa_write | ||
230 | * macros. | ||
231 | */ | ||
232 | #ifdef __mem_isa | ||
233 | |||
234 | #define isa_readb(addr) __raw_readb(__mem_isa(addr)) | ||
235 | #define isa_readw(addr) __raw_readw(__mem_isa(addr)) | ||
236 | #define isa_readl(addr) __raw_readl(__mem_isa(addr)) | ||
237 | #define isa_writeb(val,addr) __raw_writeb(val,__mem_isa(addr)) | ||
238 | #define isa_writew(val,addr) __raw_writew(val,__mem_isa(addr)) | ||
239 | #define isa_writel(val,addr) __raw_writel(val,__mem_isa(addr)) | ||
240 | #define isa_memset_io(a,b,c) _memset_io(__mem_isa(a),(b),(c)) | ||
241 | #define isa_memcpy_fromio(a,b,c) _memcpy_fromio((a),__mem_isa(b),(c)) | ||
242 | #define isa_memcpy_toio(a,b,c) _memcpy_toio(__mem_isa((a)),(b),(c)) | ||
243 | |||
244 | #define isa_eth_io_copy_and_sum(a,b,c,d) \ | ||
245 | eth_copy_and_sum((a),__mem_isa(b),(c),(d)) | ||
246 | |||
247 | #else /* __mem_isa */ | ||
248 | |||
249 | #define isa_readb(addr) (__readwrite_bug("isa_readb"),0) | ||
250 | #define isa_readw(addr) (__readwrite_bug("isa_readw"),0) | ||
251 | #define isa_readl(addr) (__readwrite_bug("isa_readl"),0) | ||
252 | #define isa_writeb(val,addr) __readwrite_bug("isa_writeb") | ||
253 | #define isa_writew(val,addr) __readwrite_bug("isa_writew") | ||
254 | #define isa_writel(val,addr) __readwrite_bug("isa_writel") | ||
255 | #define isa_memset_io(a,b,c) __readwrite_bug("isa_memset_io") | ||
256 | #define isa_memcpy_fromio(a,b,c) __readwrite_bug("isa_memcpy_fromio") | ||
257 | #define isa_memcpy_toio(a,b,c) __readwrite_bug("isa_memcpy_toio") | ||
258 | |||
259 | #define isa_eth_io_copy_and_sum(a,b,c,d) \ | ||
260 | __readwrite_bug("isa_eth_io_copy_and_sum") | ||
261 | |||
262 | #endif /* __mem_isa */ | ||
263 | |||
264 | /* | ||
265 | * ioremap and friends. | 229 | * ioremap and friends. |
266 | * | 230 | * |
267 | * ioremap takes a PCI memory address, as specified in | 231 | * ioremap takes a PCI memory address, as specified in |
diff --git a/include/asm-arm/mach/arch.h b/include/asm-arm/mach/arch.h index 2cd57b4d64d9..fd2f9bf4dcc6 100644 --- a/include/asm-arm/mach/arch.h +++ b/include/asm-arm/mach/arch.h | |||
@@ -10,19 +10,16 @@ | |||
10 | 10 | ||
11 | #ifndef __ASSEMBLY__ | 11 | #ifndef __ASSEMBLY__ |
12 | 12 | ||
13 | #include <linux/compiler.h> | ||
14 | |||
15 | struct tag; | 13 | struct tag; |
16 | struct meminfo; | 14 | struct meminfo; |
17 | struct sys_timer; | 15 | struct sys_timer; |
18 | 16 | ||
19 | struct machine_desc { | 17 | struct machine_desc { |
20 | /* | 18 | /* |
21 | * Note! The first five elements are used | 19 | * Note! The first four elements are used |
22 | * by assembler code in head-armv.S | 20 | * by assembler code in head-armv.S |
23 | */ | 21 | */ |
24 | unsigned int nr; /* architecture number */ | 22 | unsigned int nr; /* architecture number */ |
25 | unsigned int __deprecated phys_ram; /* start of physical ram */ | ||
26 | unsigned int phys_io; /* start of physical io */ | 23 | unsigned int phys_io; /* start of physical io */ |
27 | unsigned int io_pg_offst; /* byte offset for io | 24 | unsigned int io_pg_offst; /* byte offset for io |
28 | * page tabe entry */ | 25 | * page tabe entry */ |
diff --git a/include/asm-arm/mach/irq.h b/include/asm-arm/mach/irq.h index 0ce6ca588d8c..d4d420ecf3a8 100644 --- a/include/asm-arm/mach/irq.h +++ b/include/asm-arm/mach/irq.h | |||
@@ -61,7 +61,7 @@ struct irqdesc { | |||
61 | struct irqchip *chip; | 61 | struct irqchip *chip; |
62 | struct irqaction *action; | 62 | struct irqaction *action; |
63 | struct list_head pend; | 63 | struct list_head pend; |
64 | void *chipdata; | 64 | void __iomem *base; |
65 | void *data; | 65 | void *data; |
66 | unsigned int disable_depth; | 66 | unsigned int disable_depth; |
67 | 67 | ||
@@ -74,6 +74,7 @@ struct irqdesc { | |||
74 | unsigned int noautoenable : 1; /* don't automatically enable IRQ */ | 74 | unsigned int noautoenable : 1; /* don't automatically enable IRQ */ |
75 | unsigned int unused :25; | 75 | unsigned int unused :25; |
76 | 76 | ||
77 | unsigned int irqs_unhandled; | ||
77 | struct proc_dir_entry *procdir; | 78 | struct proc_dir_entry *procdir; |
78 | 79 | ||
79 | #ifdef CONFIG_SMP | 80 | #ifdef CONFIG_SMP |
@@ -113,8 +114,8 @@ void __set_irq_handler(unsigned int irq, irq_handler_t, int); | |||
113 | #define set_irq_handler(irq,handler) __set_irq_handler(irq,handler,0) | 114 | #define set_irq_handler(irq,handler) __set_irq_handler(irq,handler,0) |
114 | #define set_irq_chained_handler(irq,handler) __set_irq_handler(irq,handler,1) | 115 | #define set_irq_chained_handler(irq,handler) __set_irq_handler(irq,handler,1) |
115 | #define set_irq_data(irq,d) do { irq_desc[irq].data = d; } while (0) | 116 | #define set_irq_data(irq,d) do { irq_desc[irq].data = d; } while (0) |
116 | #define set_irq_chipdata(irq,d) do { irq_desc[irq].chipdata = d; } while (0) | 117 | #define set_irq_chipdata(irq,d) do { irq_desc[irq].base = d; } while (0) |
117 | #define get_irq_chipdata(irq) (irq_desc[irq].chipdata) | 118 | #define get_irq_chipdata(irq) (irq_desc[irq].base) |
118 | 119 | ||
119 | void set_irq_chip(unsigned int irq, struct irqchip *); | 120 | void set_irq_chip(unsigned int irq, struct irqchip *); |
120 | void set_irq_flags(unsigned int irq, unsigned int flags); | 121 | void set_irq_flags(unsigned int irq, unsigned int flags); |
diff --git a/include/asm-arm/memory.h b/include/asm-arm/memory.h index b4e1146ab682..afa5c3ea077c 100644 --- a/include/asm-arm/memory.h +++ b/include/asm-arm/memory.h | |||
@@ -172,9 +172,7 @@ static inline __deprecated void *bus_to_virt(unsigned long x) | |||
172 | * virt_addr_valid(k) indicates whether a virtual address is valid | 172 | * virt_addr_valid(k) indicates whether a virtual address is valid |
173 | */ | 173 | */ |
174 | #ifndef CONFIG_DISCONTIGMEM | 174 | #ifndef CONFIG_DISCONTIGMEM |
175 | 175 | #define ARCH_PFN_OFFSET (PHYS_PFN_OFFSET) | |
176 | #define page_to_pfn(page) (((page) - mem_map) + PHYS_PFN_OFFSET) | ||
177 | #define pfn_to_page(pfn) ((mem_map + (pfn)) - PHYS_PFN_OFFSET) | ||
178 | #define pfn_valid(pfn) ((pfn) >= PHYS_PFN_OFFSET && (pfn) < (PHYS_PFN_OFFSET + max_mapnr)) | 176 | #define pfn_valid(pfn) ((pfn) >= PHYS_PFN_OFFSET && (pfn) < (PHYS_PFN_OFFSET + max_mapnr)) |
179 | 177 | ||
180 | #define virt_to_page(kaddr) (pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)) | 178 | #define virt_to_page(kaddr) (pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)) |
@@ -189,13 +187,8 @@ static inline __deprecated void *bus_to_virt(unsigned long x) | |||
189 | * around in memory. | 187 | * around in memory. |
190 | */ | 188 | */ |
191 | #include <linux/numa.h> | 189 | #include <linux/numa.h> |
192 | 190 | #define arch_pfn_to_nid(pfn) (PFN_TO_NID(pfn)) | |
193 | #define page_to_pfn(page) \ | 191 | #define arch_local_page_offset(pfn, nid) (LOCAL_MAP_NR((pfn) << PAGE_OFFSET)) |
194 | (( (page) - page_zone(page)->zone_mem_map) \ | ||
195 | + page_zone(page)->zone_start_pfn) | ||
196 | |||
197 | #define pfn_to_page(pfn) \ | ||
198 | (PFN_TO_MAPBASE(pfn) + LOCAL_MAP_NR((pfn) << PAGE_SHIFT)) | ||
199 | 192 | ||
200 | #define pfn_valid(pfn) \ | 193 | #define pfn_valid(pfn) \ |
201 | ({ \ | 194 | ({ \ |
@@ -243,4 +236,6 @@ static inline __deprecated void *bus_to_virt(unsigned long x) | |||
243 | 236 | ||
244 | #endif | 237 | #endif |
245 | 238 | ||
239 | #include <asm-generic/memory_model.h> | ||
240 | |||
246 | #endif | 241 | #endif |
diff --git a/include/asm-arm/page.h b/include/asm-arm/page.h index 416320d95419..a404d2bf0c68 100644 --- a/include/asm-arm/page.h +++ b/include/asm-arm/page.h | |||
@@ -40,6 +40,7 @@ | |||
40 | * v4wb - ARMv4 with writeback cache, without minicache | 40 | * v4wb - ARMv4 with writeback cache, without minicache |
41 | * v4_mc - ARMv4 with minicache | 41 | * v4_mc - ARMv4 with minicache |
42 | * xscale - Xscale | 42 | * xscale - Xscale |
43 | * xsc3 - XScalev3 | ||
43 | */ | 44 | */ |
44 | #undef _USER | 45 | #undef _USER |
45 | #undef MULTI_USER | 46 | #undef MULTI_USER |
@@ -84,6 +85,14 @@ | |||
84 | # endif | 85 | # endif |
85 | #endif | 86 | #endif |
86 | 87 | ||
88 | #ifdef CONFIG_CPU_XSC3 | ||
89 | # ifdef _USER | ||
90 | # define MULTI_USER 1 | ||
91 | # else | ||
92 | # define _USER xsc3_mc | ||
93 | # endif | ||
94 | #endif | ||
95 | |||
87 | #ifdef CONFIG_CPU_COPY_V6 | 96 | #ifdef CONFIG_CPU_COPY_V6 |
88 | # define MULTI_USER 1 | 97 | # define MULTI_USER 1 |
89 | #endif | 98 | #endif |
diff --git a/include/asm-arm/param.h b/include/asm-arm/param.h index 94223d4d7e88..15806468ba72 100644 --- a/include/asm-arm/param.h +++ b/include/asm-arm/param.h | |||
@@ -11,12 +11,7 @@ | |||
11 | #define __ASM_PARAM_H | 11 | #define __ASM_PARAM_H |
12 | 12 | ||
13 | #ifdef __KERNEL__ | 13 | #ifdef __KERNEL__ |
14 | # include <asm/arch/param.h> /* for kernel version of HZ */ | 14 | # define HZ CONFIG_HZ /* Internal kernel timer frequency */ |
15 | |||
16 | # ifndef HZ | ||
17 | # define HZ 100 /* Internal kernel timer frequency */ | ||
18 | # endif | ||
19 | |||
20 | # define USER_HZ 100 /* User interfaces are in "ticks" */ | 15 | # define USER_HZ 100 /* User interfaces are in "ticks" */ |
21 | # define CLOCKS_PER_SEC (USER_HZ) /* like times() */ | 16 | # define CLOCKS_PER_SEC (USER_HZ) /* like times() */ |
22 | #else | 17 | #else |
diff --git a/include/asm-arm/pgalloc.h b/include/asm-arm/pgalloc.h index bc18ff405181..c4ac2e67768d 100644 --- a/include/asm-arm/pgalloc.h +++ b/include/asm-arm/pgalloc.h | |||
@@ -10,10 +10,15 @@ | |||
10 | #ifndef _ASMARM_PGALLOC_H | 10 | #ifndef _ASMARM_PGALLOC_H |
11 | #define _ASMARM_PGALLOC_H | 11 | #define _ASMARM_PGALLOC_H |
12 | 12 | ||
13 | #include <asm/domain.h> | ||
14 | #include <asm/pgtable-hwdef.h> | ||
13 | #include <asm/processor.h> | 15 | #include <asm/processor.h> |
14 | #include <asm/cacheflush.h> | 16 | #include <asm/cacheflush.h> |
15 | #include <asm/tlbflush.h> | 17 | #include <asm/tlbflush.h> |
16 | 18 | ||
19 | #define _PAGE_USER_TABLE (PMD_TYPE_TABLE | PMD_BIT4 | PMD_DOMAIN(DOMAIN_USER)) | ||
20 | #define _PAGE_KERNEL_TABLE (PMD_TYPE_TABLE | PMD_BIT4 | PMD_DOMAIN(DOMAIN_KERNEL)) | ||
21 | |||
17 | /* | 22 | /* |
18 | * Since we have only two-level page tables, these are trivial | 23 | * Since we have only two-level page tables, these are trivial |
19 | */ | 24 | */ |
diff --git a/include/asm-arm/pgtable-hwdef.h b/include/asm-arm/pgtable-hwdef.h new file mode 100644 index 000000000000..1d033495cc75 --- /dev/null +++ b/include/asm-arm/pgtable-hwdef.h | |||
@@ -0,0 +1,88 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/pgtable-hwdef.h | ||
3 | * | ||
4 | * Copyright (C) 1995-2002 Russell King | ||
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 | #ifndef _ASMARM_PGTABLE_HWDEF_H | ||
11 | #define _ASMARM_PGTABLE_HWDEF_H | ||
12 | |||
13 | /* | ||
14 | * Hardware page table definitions. | ||
15 | * | ||
16 | * + Level 1 descriptor (PMD) | ||
17 | * - common | ||
18 | */ | ||
19 | #define PMD_TYPE_MASK (3 << 0) | ||
20 | #define PMD_TYPE_FAULT (0 << 0) | ||
21 | #define PMD_TYPE_TABLE (1 << 0) | ||
22 | #define PMD_TYPE_SECT (2 << 0) | ||
23 | #define PMD_BIT4 (1 << 4) | ||
24 | #define PMD_DOMAIN(x) ((x) << 5) | ||
25 | #define PMD_PROTECTION (1 << 9) /* v5 */ | ||
26 | /* | ||
27 | * - section | ||
28 | */ | ||
29 | #define PMD_SECT_BUFFERABLE (1 << 2) | ||
30 | #define PMD_SECT_CACHEABLE (1 << 3) | ||
31 | #define PMD_SECT_AP_WRITE (1 << 10) | ||
32 | #define PMD_SECT_AP_READ (1 << 11) | ||
33 | #define PMD_SECT_TEX(x) ((x) << 12) /* v5 */ | ||
34 | #define PMD_SECT_APX (1 << 15) /* v6 */ | ||
35 | #define PMD_SECT_S (1 << 16) /* v6 */ | ||
36 | #define PMD_SECT_nG (1 << 17) /* v6 */ | ||
37 | #define PMD_SECT_SUPER (1 << 18) /* v6 */ | ||
38 | |||
39 | #define PMD_SECT_UNCACHED (0) | ||
40 | #define PMD_SECT_BUFFERED (PMD_SECT_BUFFERABLE) | ||
41 | #define PMD_SECT_WT (PMD_SECT_CACHEABLE) | ||
42 | #define PMD_SECT_WB (PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE) | ||
43 | #define PMD_SECT_MINICACHE (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE) | ||
44 | #define PMD_SECT_WBWA (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE) | ||
45 | #define PMD_SECT_NONSHARED_DEV (PMD_SECT_TEX(2)) | ||
46 | |||
47 | /* | ||
48 | * - coarse table (not used) | ||
49 | */ | ||
50 | |||
51 | /* | ||
52 | * + Level 2 descriptor (PTE) | ||
53 | * - common | ||
54 | */ | ||
55 | #define PTE_TYPE_MASK (3 << 0) | ||
56 | #define PTE_TYPE_FAULT (0 << 0) | ||
57 | #define PTE_TYPE_LARGE (1 << 0) | ||
58 | #define PTE_TYPE_SMALL (2 << 0) | ||
59 | #define PTE_TYPE_EXT (3 << 0) /* v5 */ | ||
60 | #define PTE_BUFFERABLE (1 << 2) | ||
61 | #define PTE_CACHEABLE (1 << 3) | ||
62 | |||
63 | /* | ||
64 | * - extended small page/tiny page | ||
65 | */ | ||
66 | #define PTE_EXT_XN (1 << 0) /* v6 */ | ||
67 | #define PTE_EXT_AP_MASK (3 << 4) | ||
68 | #define PTE_EXT_AP0 (1 << 4) | ||
69 | #define PTE_EXT_AP1 (2 << 4) | ||
70 | #define PTE_EXT_AP_UNO_SRO (0 << 4) | ||
71 | #define PTE_EXT_AP_UNO_SRW (PTE_EXT_AP0) | ||
72 | #define PTE_EXT_AP_URO_SRW (PTE_EXT_AP1) | ||
73 | #define PTE_EXT_AP_URW_SRW (PTE_EXT_AP1|PTE_EXT_AP0) | ||
74 | #define PTE_EXT_TEX(x) ((x) << 6) /* v5 */ | ||
75 | #define PTE_EXT_APX (1 << 9) /* v6 */ | ||
76 | #define PTE_EXT_SHARED (1 << 10) /* v6 */ | ||
77 | #define PTE_EXT_NG (1 << 11) /* v6 */ | ||
78 | |||
79 | /* | ||
80 | * - small page | ||
81 | */ | ||
82 | #define PTE_SMALL_AP_MASK (0xff << 4) | ||
83 | #define PTE_SMALL_AP_UNO_SRO (0x00 << 4) | ||
84 | #define PTE_SMALL_AP_UNO_SRW (0x55 << 4) | ||
85 | #define PTE_SMALL_AP_URO_SRW (0xaa << 4) | ||
86 | #define PTE_SMALL_AP_URW_SRW (0xff << 4) | ||
87 | |||
88 | #endif | ||
diff --git a/include/asm-arm/pgtable.h b/include/asm-arm/pgtable.h index 70e00d08345e..e595ae24efe2 100644 --- a/include/asm-arm/pgtable.h +++ b/include/asm-arm/pgtable.h | |||
@@ -137,81 +137,6 @@ extern void __pgd_error(const char *file, int line, unsigned long val); | |||
137 | #define SUPERSECTION_MASK (~(SUPERSECTION_SIZE-1)) | 137 | #define SUPERSECTION_MASK (~(SUPERSECTION_SIZE-1)) |
138 | 138 | ||
139 | /* | 139 | /* |
140 | * Hardware page table definitions. | ||
141 | * | ||
142 | * + Level 1 descriptor (PMD) | ||
143 | * - common | ||
144 | */ | ||
145 | #define PMD_TYPE_MASK (3 << 0) | ||
146 | #define PMD_TYPE_FAULT (0 << 0) | ||
147 | #define PMD_TYPE_TABLE (1 << 0) | ||
148 | #define PMD_TYPE_SECT (2 << 0) | ||
149 | #define PMD_BIT4 (1 << 4) | ||
150 | #define PMD_DOMAIN(x) ((x) << 5) | ||
151 | #define PMD_PROTECTION (1 << 9) /* v5 */ | ||
152 | /* | ||
153 | * - section | ||
154 | */ | ||
155 | #define PMD_SECT_BUFFERABLE (1 << 2) | ||
156 | #define PMD_SECT_CACHEABLE (1 << 3) | ||
157 | #define PMD_SECT_AP_WRITE (1 << 10) | ||
158 | #define PMD_SECT_AP_READ (1 << 11) | ||
159 | #define PMD_SECT_TEX(x) ((x) << 12) /* v5 */ | ||
160 | #define PMD_SECT_APX (1 << 15) /* v6 */ | ||
161 | #define PMD_SECT_S (1 << 16) /* v6 */ | ||
162 | #define PMD_SECT_nG (1 << 17) /* v6 */ | ||
163 | #define PMD_SECT_SUPER (1 << 18) /* v6 */ | ||
164 | |||
165 | #define PMD_SECT_UNCACHED (0) | ||
166 | #define PMD_SECT_BUFFERED (PMD_SECT_BUFFERABLE) | ||
167 | #define PMD_SECT_WT (PMD_SECT_CACHEABLE) | ||
168 | #define PMD_SECT_WB (PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE) | ||
169 | #define PMD_SECT_MINICACHE (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE) | ||
170 | #define PMD_SECT_WBWA (PMD_SECT_TEX(1) | PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE) | ||
171 | #define PMD_SECT_NONSHARED_DEV (PMD_SECT_TEX(2)) | ||
172 | |||
173 | /* | ||
174 | * - coarse table (not used) | ||
175 | */ | ||
176 | |||
177 | /* | ||
178 | * + Level 2 descriptor (PTE) | ||
179 | * - common | ||
180 | */ | ||
181 | #define PTE_TYPE_MASK (3 << 0) | ||
182 | #define PTE_TYPE_FAULT (0 << 0) | ||
183 | #define PTE_TYPE_LARGE (1 << 0) | ||
184 | #define PTE_TYPE_SMALL (2 << 0) | ||
185 | #define PTE_TYPE_EXT (3 << 0) /* v5 */ | ||
186 | #define PTE_BUFFERABLE (1 << 2) | ||
187 | #define PTE_CACHEABLE (1 << 3) | ||
188 | |||
189 | /* | ||
190 | * - extended small page/tiny page | ||
191 | */ | ||
192 | #define PTE_EXT_XN (1 << 0) /* v6 */ | ||
193 | #define PTE_EXT_AP_MASK (3 << 4) | ||
194 | #define PTE_EXT_AP0 (1 << 4) | ||
195 | #define PTE_EXT_AP1 (2 << 4) | ||
196 | #define PTE_EXT_AP_UNO_SRO (0 << 4) | ||
197 | #define PTE_EXT_AP_UNO_SRW (PTE_EXT_AP0) | ||
198 | #define PTE_EXT_AP_URO_SRW (PTE_EXT_AP1) | ||
199 | #define PTE_EXT_AP_URW_SRW (PTE_EXT_AP1|PTE_EXT_AP0) | ||
200 | #define PTE_EXT_TEX(x) ((x) << 6) /* v5 */ | ||
201 | #define PTE_EXT_APX (1 << 9) /* v6 */ | ||
202 | #define PTE_EXT_SHARED (1 << 10) /* v6 */ | ||
203 | #define PTE_EXT_NG (1 << 11) /* v6 */ | ||
204 | |||
205 | /* | ||
206 | * - small page | ||
207 | */ | ||
208 | #define PTE_SMALL_AP_MASK (0xff << 4) | ||
209 | #define PTE_SMALL_AP_UNO_SRO (0x00 << 4) | ||
210 | #define PTE_SMALL_AP_UNO_SRW (0x55 << 4) | ||
211 | #define PTE_SMALL_AP_URO_SRW (0xaa << 4) | ||
212 | #define PTE_SMALL_AP_URW_SRW (0xff << 4) | ||
213 | |||
214 | /* | ||
215 | * "Linux" PTE definitions. | 140 | * "Linux" PTE definitions. |
216 | * | 141 | * |
217 | * We keep two sets of PTEs - the hardware and the linux version. | 142 | * We keep two sets of PTEs - the hardware and the linux version. |
@@ -236,11 +161,6 @@ extern void __pgd_error(const char *file, int line, unsigned long val); | |||
236 | 161 | ||
237 | #ifndef __ASSEMBLY__ | 162 | #ifndef __ASSEMBLY__ |
238 | 163 | ||
239 | #include <asm/domain.h> | ||
240 | |||
241 | #define _PAGE_USER_TABLE (PMD_TYPE_TABLE | PMD_BIT4 | PMD_DOMAIN(DOMAIN_USER)) | ||
242 | #define _PAGE_KERNEL_TABLE (PMD_TYPE_TABLE | PMD_BIT4 | PMD_DOMAIN(DOMAIN_KERNEL)) | ||
243 | |||
244 | /* | 164 | /* |
245 | * The following macros handle the cache and bufferable bits... | 165 | * The following macros handle the cache and bufferable bits... |
246 | */ | 166 | */ |
diff --git a/include/asm-arm/poll.h b/include/asm-arm/poll.h index 2744ca831f5d..5030b2b232a3 100644 --- a/include/asm-arm/poll.h +++ b/include/asm-arm/poll.h | |||
@@ -16,6 +16,7 @@ | |||
16 | #define POLLWRBAND 0x0200 | 16 | #define POLLWRBAND 0x0200 |
17 | #define POLLMSG 0x0400 | 17 | #define POLLMSG 0x0400 |
18 | #define POLLREMOVE 0x1000 | 18 | #define POLLREMOVE 0x1000 |
19 | #define POLLRDHUP 0x2000 | ||
19 | 20 | ||
20 | struct pollfd { | 21 | struct pollfd { |
21 | int fd; | 22 | int fd; |
diff --git a/include/asm-arm/proc-fns.h b/include/asm-arm/proc-fns.h index 7bef2bf6be51..106045edb862 100644 --- a/include/asm-arm/proc-fns.h +++ b/include/asm-arm/proc-fns.h | |||
@@ -138,6 +138,14 @@ | |||
138 | # define CPU_NAME cpu_xscale | 138 | # define CPU_NAME cpu_xscale |
139 | # endif | 139 | # endif |
140 | # endif | 140 | # endif |
141 | # ifdef CONFIG_CPU_XSC3 | ||
142 | # ifdef CPU_NAME | ||
143 | # undef MULTI_CPU | ||
144 | # define MULTI_CPU | ||
145 | # else | ||
146 | # define CPU_NAME cpu_xsc3 | ||
147 | # endif | ||
148 | # endif | ||
141 | # ifdef CONFIG_CPU_V6 | 149 | # ifdef CONFIG_CPU_V6 |
142 | # ifdef CPU_NAME | 150 | # ifdef CPU_NAME |
143 | # undef MULTI_CPU | 151 | # undef MULTI_CPU |
diff --git a/include/asm-arm/rtc.h b/include/asm-arm/rtc.h index 370dfe77589d..1a5c9232a91e 100644 --- a/include/asm-arm/rtc.h +++ b/include/asm-arm/rtc.h | |||
@@ -25,9 +25,6 @@ struct rtc_ops { | |||
25 | int (*proc)(char *buf); | 25 | int (*proc)(char *buf); |
26 | }; | 26 | }; |
27 | 27 | ||
28 | void rtc_time_to_tm(unsigned long, struct rtc_time *); | ||
29 | int rtc_tm_to_time(struct rtc_time *, unsigned long *); | ||
30 | int rtc_valid_tm(struct rtc_time *); | ||
31 | void rtc_next_alarm_time(struct rtc_time *, struct rtc_time *, struct rtc_time *); | 28 | void rtc_next_alarm_time(struct rtc_time *, struct rtc_time *, struct rtc_time *); |
32 | void rtc_update(unsigned long, unsigned long); | 29 | void rtc_update(unsigned long, unsigned long); |
33 | int register_rtc(struct rtc_ops *); | 30 | int register_rtc(struct rtc_ops *); |
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h index ec91d1ff032a..95b3abf4851b 100644 --- a/include/asm-arm/system.h +++ b/include/asm-arm/system.h | |||
@@ -108,6 +108,25 @@ extern void __show_regs(struct pt_regs *); | |||
108 | extern int cpu_architecture(void); | 108 | extern int cpu_architecture(void); |
109 | extern void cpu_init(void); | 109 | extern void cpu_init(void); |
110 | 110 | ||
111 | /* | ||
112 | * Intel's XScale3 core supports some v6 features (supersections, L2) | ||
113 | * but advertises itself as v5 as it does not support the v6 ISA. For | ||
114 | * this reason, we need a way to explicitly test for this type of CPU. | ||
115 | */ | ||
116 | #ifndef CONFIG_CPU_XSC3 | ||
117 | #define cpu_is_xsc3() 0 | ||
118 | #else | ||
119 | static inline int cpu_is_xsc3(void) | ||
120 | { | ||
121 | extern unsigned int processor_id; | ||
122 | |||
123 | if ((processor_id & 0xffffe000) == 0x69056000) | ||
124 | return 1; | ||
125 | |||
126 | return 0; | ||
127 | } | ||
128 | #endif | ||
129 | |||
111 | #define set_cr(x) \ | 130 | #define set_cr(x) \ |
112 | __asm__ __volatile__( \ | 131 | __asm__ __volatile__( \ |
113 | "mcr p15, 0, %0, c1, c0, 0 @ set CR" \ | 132 | "mcr p15, 0, %0, c1, c0, 0 @ set CR" \ |
diff --git a/include/asm-arm/tlb.h b/include/asm-arm/tlb.h index f49bfb78c221..cb740025d413 100644 --- a/include/asm-arm/tlb.h +++ b/include/asm-arm/tlb.h | |||
@@ -19,6 +19,14 @@ | |||
19 | 19 | ||
20 | #include <asm/cacheflush.h> | 20 | #include <asm/cacheflush.h> |
21 | #include <asm/tlbflush.h> | 21 | #include <asm/tlbflush.h> |
22 | |||
23 | #ifndef CONFIG_MMU | ||
24 | |||
25 | #include <linux/pagemap.h> | ||
26 | #include <asm-generic/tlb.h> | ||
27 | |||
28 | #else /* !CONFIG_MMU */ | ||
29 | |||
22 | #include <asm/pgalloc.h> | 30 | #include <asm/pgalloc.h> |
23 | 31 | ||
24 | /* | 32 | /* |
@@ -82,4 +90,5 @@ tlb_end_vma(struct mmu_gather *tlb, struct vm_area_struct *vma) | |||
82 | 90 | ||
83 | #define tlb_migrate_finish(mm) do { } while (0) | 91 | #define tlb_migrate_finish(mm) do { } while (0) |
84 | 92 | ||
93 | #endif /* CONFIG_MMU */ | ||
85 | #endif | 94 | #endif |
diff --git a/include/asm-arm/tlbflush.h b/include/asm-arm/tlbflush.h index 0c2acc944a0a..728992451dd1 100644 --- a/include/asm-arm/tlbflush.h +++ b/include/asm-arm/tlbflush.h | |||
@@ -11,6 +11,13 @@ | |||
11 | #define _ASMARM_TLBFLUSH_H | 11 | #define _ASMARM_TLBFLUSH_H |
12 | 12 | ||
13 | #include <linux/config.h> | 13 | #include <linux/config.h> |
14 | |||
15 | #ifndef CONFIG_MMU | ||
16 | |||
17 | #define tlb_flush(tlb) ((void) tlb) | ||
18 | |||
19 | #else /* CONFIG_MMU */ | ||
20 | |||
14 | #include <asm/glue.h> | 21 | #include <asm/glue.h> |
15 | 22 | ||
16 | #define TLB_V3_PAGE (1 << 0) | 23 | #define TLB_V3_PAGE (1 << 0) |
@@ -423,4 +430,6 @@ extern void update_mmu_cache(struct vm_area_struct *vma, unsigned long addr, pte | |||
423 | 430 | ||
424 | #endif | 431 | #endif |
425 | 432 | ||
433 | #endif /* CONFIG_MMU */ | ||
434 | |||
426 | #endif | 435 | #endif |