diff options
Diffstat (limited to 'include/asm-arm')
152 files changed, 3309 insertions, 310 deletions
diff --git a/include/asm-arm/apm.h b/include/asm-arm/apm.h index 3a50eb759c28..d09113b37e4a 100644 --- a/include/asm-arm/apm.h +++ b/include/asm-arm/apm.h | |||
@@ -13,7 +13,6 @@ | |||
13 | #ifndef ARM_ASM_SA1100_APM_H | 13 | #ifndef ARM_ASM_SA1100_APM_H |
14 | #define ARM_ASM_SA1100_APM_H | 14 | #define ARM_ASM_SA1100_APM_H |
15 | 15 | ||
16 | #include <linux/config.h> | ||
17 | #include <linux/apm_bios.h> | 16 | #include <linux/apm_bios.h> |
18 | 17 | ||
19 | /* | 18 | /* |
diff --git a/include/asm-arm/arch-aaec2000/io.h b/include/asm-arm/arch-aaec2000/io.h index 8d67907fd4f0..d710204ac747 100644 --- a/include/asm-arm/arch-aaec2000/io.h +++ b/include/asm-arm/arch-aaec2000/io.h | |||
@@ -16,6 +16,5 @@ | |||
16 | */ | 16 | */ |
17 | #define __io(a) ((void __iomem *)(a)) | 17 | #define __io(a) ((void __iomem *)(a)) |
18 | #define __mem_pci(a) (a) | 18 | #define __mem_pci(a) (a) |
19 | #define __mem_isa(a) (a) | ||
20 | 19 | ||
21 | #endif | 20 | #endif |
diff --git a/include/asm-arm/arch-aaec2000/memory.h b/include/asm-arm/arch-aaec2000/memory.h index d8209f8911d6..24b51cccde8f 100644 --- a/include/asm-arm/arch-aaec2000/memory.h +++ b/include/asm-arm/arch-aaec2000/memory.h | |||
@@ -11,7 +11,6 @@ | |||
11 | #ifndef __ASM_ARCH_MEMORY_H | 11 | #ifndef __ASM_ARCH_MEMORY_H |
12 | #define __ASM_ARCH_MEMORY_H | 12 | #define __ASM_ARCH_MEMORY_H |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | 14 | ||
16 | #define PHYS_OFFSET UL(0xf0000000) | 15 | #define PHYS_OFFSET UL(0xf0000000) |
17 | 16 | ||
diff --git a/include/asm-arm/arch-at91rm9200/at91rm9200_spi.h b/include/asm-arm/arch-at91rm9200/at91rm9200_spi.h new file mode 100644 index 000000000000..bff5ea45f604 --- /dev/null +++ b/include/asm-arm/arch-at91rm9200/at91rm9200_spi.h | |||
@@ -0,0 +1,81 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91rm9200/at91rm9200_spi.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Ivan Kokshaysky | ||
5 | * Copyright (C) SAN People | ||
6 | * | ||
7 | * Serial Peripheral Interface (SPI) 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_SPI_H | ||
17 | #define AT91RM9200_SPI_H | ||
18 | |||
19 | #define AT91_SPI_CR 0x00 /* Control Register */ | ||
20 | #define AT91_SPI_SPIEN (1 << 0) /* SPI Enable */ | ||
21 | #define AT91_SPI_SPIDIS (1 << 1) /* SPI Disable */ | ||
22 | #define AT91_SPI_SWRST (1 << 7) /* SPI Software Reset */ | ||
23 | #define AT91_SPI_LASTXFER (1 << 24) /* Last Transfer [SAM9261 only] */ | ||
24 | |||
25 | #define AT91_SPI_MR 0x04 /* Mode Register */ | ||
26 | #define AT91_SPI_MSTR (1 << 0) /* Master/Slave Mode */ | ||
27 | #define AT91_SPI_PS (1 << 1) /* Peripheral Select */ | ||
28 | #define AT91_SPI_PS_FIXED (0 << 1) | ||
29 | #define AT91_SPI_PS_VARIABLE (1 << 1) | ||
30 | #define AT91_SPI_PCSDEC (1 << 2) /* Chip Select Decode */ | ||
31 | #define AT91_SPI_DIV32 (1 << 3) /* Clock Selection */ | ||
32 | #define AT91_SPI_MODFDIS (1 << 4) /* Mode Fault Detection */ | ||
33 | #define AT91_SPI_LLB (1 << 7) /* Local Loopback Enable */ | ||
34 | #define AT91_SPI_PCS (0xf << 16) /* Peripheral Chip Select */ | ||
35 | #define AT91_SPI_DLYBCS (0xff << 24) /* Delay Between Chip Selects */ | ||
36 | |||
37 | #define AT91_SPI_RDR 0x08 /* Receive Data Register */ | ||
38 | #define AT91_SPI_RD (0xffff << 0) /* Receive Data */ | ||
39 | #define AT91_SPI_PCS (0xf << 16) /* Peripheral Chip Select */ | ||
40 | |||
41 | #define AT91_SPI_TDR 0x0c /* Transmit Data Register */ | ||
42 | #define AT91_SPI_TD (0xffff << 0) /* Transmit Data */ | ||
43 | #define AT91_SPI_PCS (0xf << 16) /* Peripheral Chip Select */ | ||
44 | #define AT91_SPI_LASTXFER (1 << 24) /* Last Transfer [SAM9261 only] */ | ||
45 | |||
46 | #define AT91_SPI_SR 0x10 /* Status Register */ | ||
47 | #define AT91_SPI_RDRF (1 << 0) /* Receive Data Register Full */ | ||
48 | #define AT91_SPI_TDRE (1 << 1) /* Transmit Data Register Full */ | ||
49 | #define AT91_SPI_MODF (1 << 2) /* Mode Fault Error */ | ||
50 | #define AT91_SPI_OVRES (1 << 3) /* Overrun Error Status */ | ||
51 | #define AT91_SPI_ENDRX (1 << 4) /* End of RX buffer */ | ||
52 | #define AT91_SPI_ENDTX (1 << 5) /* End of TX buffer */ | ||
53 | #define AT91_SPI_RXBUFF (1 << 6) /* RX Buffer Full */ | ||
54 | #define AT91_SPI_TXBUFE (1 << 7) /* TX Buffer Empty */ | ||
55 | #define AT91_SPI_NSSR (1 << 8) /* NSS Rising [SAM9261 only] */ | ||
56 | #define AT91_SPI_TXEMPTY (1 << 9) /* Transmission Register Empty [SAM9261 only] */ | ||
57 | #define AT91_SPI_SPIENS (1 << 16) /* SPI Enable Status */ | ||
58 | |||
59 | #define AT91_SPI_IER 0x14 /* Interrupt Enable Register */ | ||
60 | #define AT91_SPI_IDR 0x18 /* Interrupt Disable Register */ | ||
61 | #define AT91_SPI_IMR 0x1c /* Interrupt Mask Register */ | ||
62 | |||
63 | #define AT91_SPI_CSR(n) (0x30 + ((n) * 4)) /* Chip Select Registers 0-3 */ | ||
64 | #define AT91_SPI_CPOL (1 << 0) /* Clock Polarity */ | ||
65 | #define AT91_SPI_NCPHA (1 << 1) /* Clock Phase */ | ||
66 | #define AT91_SPI_CSAAT (1 << 3) /* Chip Select Active After Transfer [SAM9261 only] */ | ||
67 | #define AT91_SPI_BITS (0xf << 4) /* Bits Per Transfer */ | ||
68 | #define AT91_SPI_BITS_8 (0 << 4) | ||
69 | #define AT91_SPI_BITS_9 (1 << 4) | ||
70 | #define AT91_SPI_BITS_10 (2 << 4) | ||
71 | #define AT91_SPI_BITS_11 (3 << 4) | ||
72 | #define AT91_SPI_BITS_12 (4 << 4) | ||
73 | #define AT91_SPI_BITS_13 (5 << 4) | ||
74 | #define AT91_SPI_BITS_14 (6 << 4) | ||
75 | #define AT91_SPI_BITS_15 (7 << 4) | ||
76 | #define AT91_SPI_BITS_16 (8 << 4) | ||
77 | #define AT91_SPI_SCBR (0xff << 8) /* Serial Clock Baud Rate */ | ||
78 | #define AT91_SPI_DLYBS (0xff << 16) /* Delay before SPCK */ | ||
79 | #define AT91_SPI_DLYBCT (0xff << 24) /* Delay between Consecutive Transfers */ | ||
80 | |||
81 | #endif | ||
diff --git a/include/asm-arm/arch-at91rm9200/at91rm9200_ssc.h b/include/asm-arm/arch-at91rm9200/at91rm9200_ssc.h new file mode 100644 index 000000000000..ac880227147f --- /dev/null +++ b/include/asm-arm/arch-at91rm9200/at91rm9200_ssc.h | |||
@@ -0,0 +1,96 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91rm9200/at91rm9200_ssc.h | ||
3 | * | ||
4 | * Copyright (C) SAN People | ||
5 | * | ||
6 | * Serial Synchronous Controller (SSC) registers. | ||
7 | * Based on AT91RM9200 datasheet revision E. | ||
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 as published by | ||
11 | * the Free Software Foundation; either version 2 of the License, or | ||
12 | * (at your option) any later version. | ||
13 | */ | ||
14 | |||
15 | #ifndef AT91RM9200_SSC_H | ||
16 | #define AT91RM9200_SSC_H | ||
17 | |||
18 | #define AT91_SSC_CR 0x00 /* Control Register */ | ||
19 | #define AT91_SSC_RXEN (1 << 0) /* Receive Enable */ | ||
20 | #define AT91_SSC_RXDIS (1 << 1) /* Receive Disable */ | ||
21 | #define AT91_SSC_TXEN (1 << 8) /* Transmit Enable */ | ||
22 | #define AT91_SSC_TXDIS (1 << 9) /* Transmit Disable */ | ||
23 | #define AT91_SSC_SWRST (1 << 15) /* Software Reset */ | ||
24 | |||
25 | #define AT91_SSC_CMR 0x04 /* Clock Mode Register */ | ||
26 | #define AT91_SSC_CMR_DIV (0xfff << 0) /* Clock Divider */ | ||
27 | |||
28 | #define AT91_SSC_RCMR 0x10 /* Receive Clock Mode Register */ | ||
29 | #define AT91_SSC_CKS (3 << 0) /* Clock Selection */ | ||
30 | #define AT91_SSC_CKS_DIV (0 << 0) | ||
31 | #define AT91_SSC_CKS_CLOCK (1 << 0) | ||
32 | #define AT91_SSC_CKS_PIN (2 << 0) | ||
33 | #define AT91_SSC_CKO (7 << 2) /* Clock Output Mode Selection */ | ||
34 | #define AT91_SSC_CKO_NONE (0 << 2) | ||
35 | #define AT91_SSC_CKO_CONTINUOUS (1 << 2) | ||
36 | #define AT91_SSC_CKI (1 << 5) /* Clock Inversion */ | ||
37 | #define AT91_SSC_CKI_FALLING (0 << 5) | ||
38 | #define AT91_SSC_CK_RISING (1 << 5) | ||
39 | #define AT91_SSC_START (0xf << 8) /* Start Selection */ | ||
40 | #define AT91_SSC_START_CONTINUOUS (0 << 8) | ||
41 | #define AT91_SSC_START_TX_RX (1 << 8) | ||
42 | #define AT91_SSC_START_LOW_RF (2 << 8) | ||
43 | #define AT91_SSC_START_HIGH_RF (3 << 8) | ||
44 | #define AT91_SSC_START_FALLING_RF (4 << 8) | ||
45 | #define AT91_SSC_START_RISING_RF (5 << 8) | ||
46 | #define AT91_SSC_START_LEVEL_RF (6 << 8) | ||
47 | #define AT91_SSC_START_EDGE_RF (7 << 8) | ||
48 | #define AT91_SSC_STTDLY (0xff << 16) /* Start Delay */ | ||
49 | #define AT91_SSC_PERIOD (0xff << 24) /* Period Divider Selection */ | ||
50 | |||
51 | #define AT91_SSC_RFMR 0x14 /* Receive Frame Mode Register */ | ||
52 | #define AT91_SSC_DATALEN (0x1f << 0) /* Data Length */ | ||
53 | #define AT91_SSC_LOOP (1 << 5) /* Loop Mode */ | ||
54 | #define AT91_SSC_MSBF (1 << 7) /* Most Significant Bit First */ | ||
55 | #define AT91_SSC_DATNB (0xf << 8) /* Data Number per Frame */ | ||
56 | #define AT91_SSC_FSLEN (0xf << 16) /* Frame Sync Length */ | ||
57 | #define AT91_SSC_FSOS (7 << 20) /* Frame Sync Output Selection */ | ||
58 | #define AT91_SSC_FSOS_NONE (0 << 20) | ||
59 | #define AT91_SSC_FSOS_NEGATIVE (1 << 20) | ||
60 | #define AT91_SSC_FSOS_POSITIVE (2 << 20) | ||
61 | #define AT91_SSC_FSOS_LOW (3 << 20) | ||
62 | #define AT91_SSC_FSOS_HIGH (4 << 20) | ||
63 | #define AT91_SSC_FSOS_TOGGLE (5 << 20) | ||
64 | #define AT91_SSC_FSEDGE (1 << 24) /* Frame Sync Edge Detection */ | ||
65 | #define AT91_SSC_FSEDGE_POSITIVE (0 << 24) | ||
66 | #define AT91_SSC_FSEDGE_NEGATIVE (1 << 24) | ||
67 | |||
68 | #define AT91_SSC_TCMR 0x18 /* Transmit Clock Mode Register */ | ||
69 | #define AT91_SSC_TFMR 0x1c /* Transmit Fram Mode Register */ | ||
70 | #define AT91_SSC_DATDEF (1 << 5) /* Data Default Value */ | ||
71 | #define AT91_SSC_FSDEN (1 << 23) /* Frame Sync Data Enable */ | ||
72 | |||
73 | #define AT91_SSC_RHR 0x20 /* Receive Holding Register */ | ||
74 | #define AT91_SSC_THR 0x24 /* Transmit Holding Register */ | ||
75 | #define AT91_SSC_RSHR 0x30 /* Receive Sync Holding Register */ | ||
76 | #define AT91_SSC_TSHR 0x34 /* Transmit Sync Holding Register */ | ||
77 | |||
78 | #define AT91_SSC_SR 0x40 /* Status Register */ | ||
79 | #define AT91_SSC_TXRDY (1 << 0) /* Transmit Ready */ | ||
80 | #define AT91_SSC_TXEMPTY (1 << 1) /* Transmit Empty */ | ||
81 | #define AT91_SSC_ENDTX (1 << 2) /* End of Transmission */ | ||
82 | #define AT91_SSC_TXBUFE (1 << 3) /* Transmit Buffer Empty */ | ||
83 | #define AT91_SSC_RXRDY (1 << 4) /* Receive Ready */ | ||
84 | #define AT91_SSC_OVRUN (1 << 5) /* Receive Overrun */ | ||
85 | #define AT91_SSC_ENDRX (1 << 6) /* End of Reception */ | ||
86 | #define AT91_SSC_RXBUFF (1 << 7) /* Receive Buffer Full */ | ||
87 | #define AT91_SSC_TXSYN (1 << 10) /* Transmit Sync */ | ||
88 | #define AT91_SSC_RXSYN (1 << 11) /* Receive Sync */ | ||
89 | #define AT91_SSC_TXENA (1 << 16) /* Transmit Enable */ | ||
90 | #define AT91_SSC_RXENA (1 << 17) /* Receive Enable */ | ||
91 | |||
92 | #define AT91_SSC_IER 0x44 /* Interrupt Enable Register */ | ||
93 | #define AT91_SSC_IDR 0x48 /* Interrupt Disable Register */ | ||
94 | #define AT91_SSC_IMR 0x4c /* Interrupt Mask Register */ | ||
95 | |||
96 | #endif | ||
diff --git a/include/asm-arm/arch-at91rm9200/at91rm9200_sys.h b/include/asm-arm/arch-at91rm9200/at91rm9200_sys.h index 2910d359f919..0f4c12d5f0cd 100644 --- a/include/asm-arm/arch-at91rm9200/at91rm9200_sys.h +++ b/include/asm-arm/arch-at91rm9200/at91rm9200_sys.h | |||
@@ -68,8 +68,17 @@ | |||
68 | #define AT91_DBGU_RHR (AT91_DBGU + 0x18) /* Receiver Holding Register */ | 68 | #define AT91_DBGU_RHR (AT91_DBGU + 0x18) /* Receiver Holding Register */ |
69 | #define AT91_DBGU_THR (AT91_DBGU + 0x1c) /* Transmitter Holding Register */ | 69 | #define AT91_DBGU_THR (AT91_DBGU + 0x1c) /* Transmitter Holding Register */ |
70 | #define AT91_DBGU_BRGR (AT91_DBGU + 0x20) /* Baud Rate Generator Register */ | 70 | #define AT91_DBGU_BRGR (AT91_DBGU + 0x20) /* Baud Rate Generator Register */ |
71 | |||
71 | #define AT91_DBGU_CIDR (AT91_DBGU + 0x40) /* Chip ID Register */ | 72 | #define AT91_DBGU_CIDR (AT91_DBGU + 0x40) /* Chip ID Register */ |
72 | #define AT91_DBGU_EXID (AT91_DBGU + 0x44) /* Chip ID Extension Register */ | 73 | #define AT91_DBGU_EXID (AT91_DBGU + 0x44) /* Chip ID Extension Register */ |
74 | #define AT91_CIDR_VERSION (0x1f << 0) /* Version of the Device */ | ||
75 | #define AT91_CIDR_EPROC (7 << 5) /* Embedded Processor */ | ||
76 | #define AT91_CIDR_NVPSIZ (0xf << 8) /* Nonvolatile Program Memory Size */ | ||
77 | #define AT91_CIDR_NVPSIZ2 (0xf << 12) /* Second Nonvolatile Program Memory Size */ | ||
78 | #define AT91_CIDR_SRAMSIZ (0xf << 16) /* Internal SRAM Size */ | ||
79 | #define AT91_CIDR_ARCH (0xff << 20) /* Architecture Identifier */ | ||
80 | #define AT91_CIDR_NVPTYP (7 << 28) /* Nonvolatile Program Memory Type */ | ||
81 | #define AT91_CIDR_EXT (1 << 31) /* Extension Flag */ | ||
73 | 82 | ||
74 | 83 | ||
75 | /* | 84 | /* |
@@ -241,7 +250,7 @@ | |||
241 | #define AT91_RTC_SEC (0x7f << 0) /* Current Second */ | 250 | #define AT91_RTC_SEC (0x7f << 0) /* Current Second */ |
242 | #define AT91_RTC_MIN (0x7f << 8) /* Current Minute */ | 251 | #define AT91_RTC_MIN (0x7f << 8) /* Current Minute */ |
243 | #define AT91_RTC_HOUR (0x3f << 16) /* Current Hour */ | 252 | #define AT91_RTC_HOUR (0x3f << 16) /* Current Hour */ |
244 | #define At91_RTC_AMPM (1 << 22) /* Ante Meridiem Post Meridiem Indicator */ | 253 | #define AT91_RTC_AMPM (1 << 22) /* Ante Meridiem Post Meridiem Indicator */ |
245 | 254 | ||
246 | #define AT91_RTC_CALR (AT91_RTC + 0x0c) /* Calendar Register */ | 255 | #define AT91_RTC_CALR (AT91_RTC + 0x0c) /* Calendar Register */ |
247 | #define AT91_RTC_CENT (0x7f << 0) /* Current Century */ | 256 | #define AT91_RTC_CENT (0x7f << 0) /* Current Century */ |
diff --git a/include/asm-arm/arch-at91rm9200/at91rm9200_tc.h b/include/asm-arm/arch-at91rm9200/at91rm9200_tc.h new file mode 100644 index 000000000000..f4da752bb0c8 --- /dev/null +++ b/include/asm-arm/arch-at91rm9200/at91rm9200_tc.h | |||
@@ -0,0 +1,146 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91rm9200/at91rm9200_tc.h | ||
3 | * | ||
4 | * Copyright (C) SAN People | ||
5 | * | ||
6 | * Timer/Counter Unit (TC) registers. | ||
7 | * Based on AT91RM9200 datasheet revision E. | ||
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 as published by | ||
11 | * the Free Software Foundation; either version 2 of the License, or | ||
12 | * (at your option) any later version. | ||
13 | */ | ||
14 | |||
15 | #ifndef AT91RM9200_TC_H | ||
16 | #define AT91RM9200_TC_H | ||
17 | |||
18 | #define AT91_TC_BCR 0xc0 /* TC Block Control Register */ | ||
19 | #define AT91_TC_SYNC (1 << 0) /* Synchro Command */ | ||
20 | |||
21 | #define AT91_TC_BMR 0xc4 /* TC Block Mode Register */ | ||
22 | #define AT91_TC_TC0XC0S (3 << 0) /* External Clock Signal 0 Selection */ | ||
23 | #define AT91_TC_TC0XC0S_TCLK0 (0 << 0) | ||
24 | #define AT91_TC_TC0XC0S_NONE (1 << 0) | ||
25 | #define AT91_TC_TC0XC0S_TIOA1 (2 << 0) | ||
26 | #define AT91_TC_TC0XC0S_TIOA2 (3 << 0) | ||
27 | #define AT91_TC_TC1XC1S (3 << 2) /* External Clock Signal 1 Selection */ | ||
28 | #define AT91_TC_TC1XC1S_TCLK1 (0 << 2) | ||
29 | #define AT91_TC_TC1XC1S_NONE (1 << 2) | ||
30 | #define AT91_TC_TC1XC1S_TIOA0 (2 << 2) | ||
31 | #define AT91_TC_TC1XC1S_TIOA2 (3 << 2) | ||
32 | #define AT91_TC_TC2XC2S (3 << 4) /* External Clock Signal 2 Selection */ | ||
33 | #define AT91_TC_TC2XC2S_TCLK2 (0 << 4) | ||
34 | #define AT91_TC_TC2XC2S_NONE (1 << 4) | ||
35 | #define AT91_TC_TC2XC2S_TIOA0 (2 << 4) | ||
36 | #define AT91_TC_TC2XC2S_TIOA1 (3 << 4) | ||
37 | |||
38 | |||
39 | #define AT91_TC_CCR 0x00 /* Channel Control Register */ | ||
40 | #define AT91_TC_CLKEN (1 << 0) /* Counter Clock Enable Command */ | ||
41 | #define AT91_TC_CLKDIS (1 << 1) /* Counter CLock Disable Command */ | ||
42 | #define AT91_TC_SWTRG (1 << 2) /* Software Trigger Command */ | ||
43 | |||
44 | #define AT91_TC_CMR 0x04 /* Channel Mode Register */ | ||
45 | #define AT91_TC_TCCLKS (7 << 0) /* Capture/Waveform Mode: Clock Selection */ | ||
46 | #define AT91_TC_TIMER_CLOCK1 (0 << 0) | ||
47 | #define AT91_TC_TIMER_CLOCK2 (1 << 0) | ||
48 | #define AT91_TC_TIMER_CLOCK3 (2 << 0) | ||
49 | #define AT91_TC_TIMER_CLOCK4 (3 << 0) | ||
50 | #define AT91_TC_TIMER_CLOCK5 (4 << 0) | ||
51 | #define AT91_TC_XC0 (5 << 0) | ||
52 | #define AT91_TC_XC1 (6 << 0) | ||
53 | #define AT91_TC_XC2 (7 << 0) | ||
54 | #define AT91_TC_CLKI (1 << 3) /* Capture/Waveform Mode: Clock Invert */ | ||
55 | #define AT91_TC_BURST (3 << 4) /* Capture/Waveform Mode: Burst Signal Selection */ | ||
56 | #define AT91_TC_LDBSTOP (1 << 6) /* Capture Mode: Counter Clock Stopped with TB Loading */ | ||
57 | #define AT91_TC_LDBDIS (1 << 7) /* Capture Mode: Counter Clock Disable with RB Loading */ | ||
58 | #define AT91_TC_ETRGEDG (3 << 8) /* Capture Mode: External Trigger Edge Selection */ | ||
59 | #define AT91_TC_ABETRG (1 << 10) /* Capture Mode: TIOA or TIOB External Trigger Selection */ | ||
60 | #define AT91_TC_CPCTRG (1 << 14) /* Capture Mode: RC Compare Trigger Enable */ | ||
61 | #define AT91_TC_WAVE (1 << 15) /* Capture/Waveform mode */ | ||
62 | #define AT91_TC_LDRA (3 << 16) /* Capture Mode: RA Loading Selection */ | ||
63 | #define AT91_TC_LDRB (3 << 18) /* Capture Mode: RB Loading Selection */ | ||
64 | |||
65 | #define AT91_TC_CPCSTOP (1 << 6) /* Waveform Mode: Counter Clock Stopped with RC Compare */ | ||
66 | #define AT91_TC_CPCDIS (1 << 7) /* Waveform Mode: Counter Clock Disable with RC Compare */ | ||
67 | #define AT91_TC_EEVTEDG (3 << 8) /* Waveform Mode: External Event Edge Selection */ | ||
68 | #define AT91_TC_EEVTEDG_NONE (0 << 8) | ||
69 | #define AT91_TC_EEVTEDG_RISING (1 << 8) | ||
70 | #define AT91_TC_EEVTEDG_FALLING (2 << 8) | ||
71 | #define AT91_TC_EEVTEDG_BOTH (3 << 8) | ||
72 | #define AT91_TC_EEVT (3 << 10) /* Waveform Mode: External Event Selection */ | ||
73 | #define AT91_TC_EEVT_TIOB (0 << 10) | ||
74 | #define AT91_TC_EEVT_XC0 (1 << 10) | ||
75 | #define AT91_TC_EEVT_XC1 (2 << 10) | ||
76 | #define AT91_TC_EEVT_XC2 (3 << 10) | ||
77 | #define AT91_TC_ENETRG (1 << 12) /* Waveform Mode: External Event Trigger Enable */ | ||
78 | #define AT91_TC_WAVESEL (3 << 13) /* Waveform Mode: Waveform Selection */ | ||
79 | #define AT91_TC_WAVESEL_UP (0 << 13) | ||
80 | #define AT91_TC_WAVESEL_UP_AUTO (2 << 13) | ||
81 | #define AT91_TC_WAVESEL_UPDOWN (1 << 13) | ||
82 | #define AT91_TC_WAVESEL_UPDOWN_AUTO (3 << 13) | ||
83 | #define AT91_TC_ACPA (3 << 16) /* Waveform Mode: RA Compare Effect on TIOA */ | ||
84 | #define AT91_TC_ACPA_NONE (0 << 16) | ||
85 | #define AT91_TC_ACPA_SET (1 << 16) | ||
86 | #define AT91_TC_ACPA_CLEAR (2 << 16) | ||
87 | #define AT91_TC_ACPA_TOGGLE (3 << 16) | ||
88 | #define AT91_TC_ACPC (3 << 18) /* Waveform Mode: RC Compre Effect on TIOA */ | ||
89 | #define AT91_TC_ACPC_NONE (0 << 18) | ||
90 | #define AT91_TC_ACPC_SET (1 << 18) | ||
91 | #define AT91_TC_ACPC_CLEAR (2 << 18) | ||
92 | #define AT91_TC_ACPC_TOGGLE (3 << 18) | ||
93 | #define AT91_TC_AEEVT (3 << 20) /* Waveform Mode: External Event Effect on TIOA */ | ||
94 | #define AT91_TC_AEEVT_NONE (0 << 20) | ||
95 | #define AT91_TC_AEEVT_SET (1 << 20) | ||
96 | #define AT91_TC_AEEVT_CLEAR (2 << 20) | ||
97 | #define AT91_TC_AEEVT_TOGGLE (3 << 20) | ||
98 | #define AT91_TC_ASWTRG (3 << 22) /* Waveform Mode: Software Trigger Effect on TIOA */ | ||
99 | #define AT91_TC_ASWTRG_NONE (0 << 22) | ||
100 | #define AT91_TC_ASWTRG_SET (1 << 22) | ||
101 | #define AT91_TC_ASWTRG_CLEAR (2 << 22) | ||
102 | #define AT91_TC_ASWTRG_TOGGLE (3 << 22) | ||
103 | #define AT91_TC_BCPB (3 << 24) /* Waveform Mode: RB Compare Effect on TIOB */ | ||
104 | #define AT91_TC_BCPB_NONE (0 << 24) | ||
105 | #define AT91_TC_BCPB_SET (1 << 24) | ||
106 | #define AT91_TC_BCPB_CLEAR (2 << 24) | ||
107 | #define AT91_TC_BCPB_TOGGLE (3 << 24) | ||
108 | #define AT91_TC_BCPC (3 << 26) /* Waveform Mode: RC Compare Effect on TIOB */ | ||
109 | #define AT91_TC_BCPC_NONE (0 << 26) | ||
110 | #define AT91_TC_BCPC_SET (1 << 26) | ||
111 | #define AT91_TC_BCPC_CLEAR (2 << 26) | ||
112 | #define AT91_TC_BCPC_TOGGLE (3 << 26) | ||
113 | #define AT91_TC_BEEVT (3 << 28) /* Waveform Mode: External Event Effect on TIOB */ | ||
114 | #define AT91_TC_BEEVT_NONE (0 << 28) | ||
115 | #define AT91_TC_BEEVT_SET (1 << 28) | ||
116 | #define AT91_TC_BEEVT_CLEAR (2 << 28) | ||
117 | #define AT91_TC_BEEVT_TOGGLE (3 << 28) | ||
118 | #define AT91_TC_BSWTRG (3 << 30) /* Waveform Mode: Software Trigger Effect on TIOB */ | ||
119 | #define AT91_TC_BSWTRG_NONE (0 << 30) | ||
120 | #define AT91_TC_BSWTRG_SET (1 << 30) | ||
121 | #define AT91_TC_BSWTRG_CLEAR (2 << 30) | ||
122 | #define AT91_TC_BSWTRG_TOGGLE (3 << 30) | ||
123 | |||
124 | #define AT91_TC_CV 0x10 /* Counter Value */ | ||
125 | #define AT91_TC_RA 0x14 /* Register A */ | ||
126 | #define AT91_TC_RB 0x18 /* Register B */ | ||
127 | #define AT91_TC_RC 0x1c /* Register C */ | ||
128 | |||
129 | #define AT91_TC_SR 0x20 /* Status Register */ | ||
130 | #define AT91_TC_COVFS (1 << 0) /* Counter Overflow Status */ | ||
131 | #define AT91_TC_LOVRS (1 << 1) /* Load Overrun Status */ | ||
132 | #define AT91_TC_CPAS (1 << 2) /* RA Compare Status */ | ||
133 | #define AT91_TC_CPBS (1 << 3) /* RB Compare Status */ | ||
134 | #define AT91_TC_CPCS (1 << 4) /* RC Compare Status */ | ||
135 | #define AT91_TC_LDRAS (1 << 5) /* RA Loading Status */ | ||
136 | #define AT91_TC_LDRBS (1 << 6) /* RB Loading Status */ | ||
137 | #define AT91_TC_ETRGS (1 << 7) /* External Trigger Status */ | ||
138 | #define AT91_TC_CLKSTA (1 << 16) /* Clock Enabling Status */ | ||
139 | #define AT91_TC_MTIOA (1 << 17) /* TIOA Mirror */ | ||
140 | #define AT91_TC_MTIOB (1 << 18) /* TIOB Mirror */ | ||
141 | |||
142 | #define AT91_TC_IER 0x24 /* Interrupt Enable Register */ | ||
143 | #define AT91_TC_IDR 0x28 /* Interrupt Disable Register */ | ||
144 | #define AT91_TC_IMR 0x2c /* Interrupt Mask Register */ | ||
145 | |||
146 | #endif | ||
diff --git a/include/asm-arm/arch-at91rm9200/at91rm9200_udp.h b/include/asm-arm/arch-at91rm9200/at91rm9200_udp.h new file mode 100644 index 000000000000..951e3f61cef4 --- /dev/null +++ b/include/asm-arm/arch-at91rm9200/at91rm9200_udp.h | |||
@@ -0,0 +1,77 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91rm9200/at91rm9200_udp.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Ivan Kokshaysky | ||
5 | * Copyright (C) SAN People | ||
6 | * | ||
7 | * USB Device Port (UDP) 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_UDP_H | ||
17 | #define AT91RM9200_UDP_H | ||
18 | |||
19 | #define AT91_UDP_FRM_NUM 0x00 /* Frame Number Register */ | ||
20 | #define AT91_UDP_NUM (0x7ff << 0) /* Frame Number */ | ||
21 | #define AT91_UDP_FRM_ERR (1 << 16) /* Frame Error */ | ||
22 | #define AT91_UDP_FRM_OK (1 << 17) /* Frame OK */ | ||
23 | |||
24 | #define AT91_UDP_GLB_STAT 0x04 /* Global State Register */ | ||
25 | #define AT91_UDP_FADDEN (1 << 0) /* Function Address Enable */ | ||
26 | #define AT91_UDP_CONFG (1 << 1) /* Configured */ | ||
27 | #define AT91_UDP_ESR (1 << 2) /* Enable Send Resume */ | ||
28 | #define AT91_UDP_RSMINPR (1 << 3) /* Resume has been sent */ | ||
29 | #define AT91_UDP_RMWUPE (1 << 4) /* Remote Wake Up Enable */ | ||
30 | |||
31 | #define AT91_UDP_FADDR 0x08 /* Function Address Register */ | ||
32 | #define AT91_UDP_FADD (0x7f << 0) /* Function Address Value */ | ||
33 | #define AT91_UDP_FEN (1 << 8) /* Function Enable */ | ||
34 | |||
35 | #define AT91_UDP_IER 0x10 /* Interrupt Enable Register */ | ||
36 | #define AT91_UDP_IDR 0x14 /* Interrupt Disable Register */ | ||
37 | #define AT91_UDP_IMR 0x18 /* Interrupt Mask Register */ | ||
38 | |||
39 | #define AT91_UDP_ISR 0x1c /* Interrupt Status Register */ | ||
40 | #define AT91_UDP_EP(n) (1 << (n)) /* Endpoint Interrupt Status */ | ||
41 | #define AT91_UDP_RXSUSP (1 << 8) /* USB Suspend Interrupt Status */ | ||
42 | #define AT91_UDP_RXRSM (1 << 9) /* USB Resume Interrupt Status */ | ||
43 | #define AT91_UDP_EXTRSM (1 << 10) /* External Resume Interrupt Status */ | ||
44 | #define AT91_UDP_SOFINT (1 << 11) /* Start of Frame Interrupt Status */ | ||
45 | #define AT91_UDP_ENDBUSRES (1 << 12) /* End of Bus Reset Interrpt Status */ | ||
46 | #define AT91_UDP_WAKEUP (1 << 13) /* USB Wakeup Interrupt Status */ | ||
47 | |||
48 | #define AT91_UDP_ICR 0x20 /* Interrupt Clear Register */ | ||
49 | #define AT91_UDP_RST_EP 0x28 /* Reset Endpoint Register */ | ||
50 | |||
51 | #define AT91_UDP_CSR(n) (0x30 + ((n) * 4)) /* Endpoint Control/Status Registers 0-7 */ | ||
52 | #define AT91_UDP_TXCOMP (1 << 0) /* Generates IN packet with data previously written in DPR */ | ||
53 | #define AT91_UDP_RX_DATA_BK0 (1 << 1) /* Receive Data Bank 0 */ | ||
54 | #define AT91_UDP_RXSETUP (1 << 2) /* Send STALL to the host */ | ||
55 | #define AT91_UDP_STALLSENT (1 << 3) /* Stall Sent / Isochronous error (Isochronous endpoints) */ | ||
56 | #define AT91_UDP_TXPKTRDY (1 << 4) /* Transmit Packet Ready */ | ||
57 | #define AT91_UDP_FORCESTALL (1 << 5) /* Force Stall */ | ||
58 | #define AT91_UDP_RX_DATA_BK1 (1 << 6) /* Receive Data Bank 1 */ | ||
59 | #define AT91_UDP_DIR (1 << 7) /* Transfer Direction */ | ||
60 | #define AT91_UDP_EPTYPE (7 << 8) /* Endpoint Type */ | ||
61 | #define AT91_UDP_EPTYPE_CTRL (0 << 8) | ||
62 | #define AT91_UDP_EPTYPE_ISO_OUT (1 << 8) | ||
63 | #define AT91_UDP_EPTYPE_BULK_OUT (2 << 8) | ||
64 | #define AT91_UDP_EPTYPE_INT_OUT (3 << 8) | ||
65 | #define AT91_UDP_EPTYPE_ISO_IN (5 << 8) | ||
66 | #define AT91_UDP_EPTYPE_BULK_IN (6 << 8) | ||
67 | #define AT91_UDP_EPTYPE_INT_IN (7 << 8) | ||
68 | #define AT91_UDP_DTGLE (1 << 11) /* Data Toggle */ | ||
69 | #define AT91_UDP_EPEDS (1 << 15) /* Endpoint Enable/Disable */ | ||
70 | #define AT91_UDP_RXBYTECNT (0x7ff << 16) /* Number of bytes in FIFO */ | ||
71 | |||
72 | #define AT91_UDP_FDR(n) (0x50 + ((n) * 4)) /* Endpoint FIFO Data Registers 0-7 */ | ||
73 | |||
74 | #define AT91_UDP_TXVC 0x74 /* Transceiver Control Register */ | ||
75 | #define AT91_UDP_TXVC_TXVDIS (1 << 8) /* Transceiver Disable */ | ||
76 | |||
77 | #endif | ||
diff --git a/include/asm-arm/arch-at91rm9200/board.h b/include/asm-arm/arch-at91rm9200/board.h index 4fdef13d01d4..1fdd70b23809 100644 --- a/include/asm-arm/arch-at91rm9200/board.h +++ b/include/asm-arm/arch-at91rm9200/board.h | |||
@@ -31,14 +31,9 @@ | |||
31 | #ifndef __ASM_ARCH_BOARD_H | 31 | #ifndef __ASM_ARCH_BOARD_H |
32 | #define __ASM_ARCH_BOARD_H | 32 | #define __ASM_ARCH_BOARD_H |
33 | 33 | ||
34 | /* Clocks */ | ||
35 | extern unsigned long at91_master_clock; | ||
36 | |||
37 | /* Serial Port */ | ||
38 | extern int at91_serial_map[AT91_NR_UART]; | ||
39 | extern int at91_console_port; | ||
40 | |||
41 | #include <linux/mtd/partitions.h> | 34 | #include <linux/mtd/partitions.h> |
35 | #include <linux/device.h> | ||
36 | #include <linux/spi/spi.h> | ||
42 | 37 | ||
43 | /* USB Device */ | 38 | /* USB Device */ |
44 | struct at91_udc_data { | 39 | struct at91_udc_data { |
@@ -91,10 +86,25 @@ struct at91_nand_data { | |||
91 | extern void __init at91_add_device_nand(struct at91_nand_data *data); | 86 | extern void __init at91_add_device_nand(struct at91_nand_data *data); |
92 | 87 | ||
93 | /* I2C*/ | 88 | /* I2C*/ |
94 | void __init at91_add_device_i2c(void); | 89 | extern void __init at91_add_device_i2c(void); |
90 | |||
91 | /* SPI */ | ||
92 | extern void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices); | ||
95 | 93 | ||
96 | /* RTC */ | 94 | /* Serial */ |
97 | void __init at91_add_device_rtc(void); | 95 | struct at91_uart_config { |
96 | unsigned short console_tty; /* tty number of serial console */ | ||
97 | unsigned short nr_tty; /* number of serial tty's */ | ||
98 | short tty_map[]; /* map UART to tty number */ | ||
99 | }; | ||
100 | extern struct platform_device *at91_default_console_device; | ||
101 | extern void __init at91_init_serial(struct at91_uart_config *config); | ||
102 | |||
103 | struct at91_uart_data { | ||
104 | short use_dma_tx; /* use transmit DMA? */ | ||
105 | short use_dma_rx; /* use receive DMA? */ | ||
106 | }; | ||
107 | extern void __init at91_add_device_serial(void); | ||
98 | 108 | ||
99 | /* LEDs */ | 109 | /* LEDs */ |
100 | extern u8 at91_leds_cpu; | 110 | extern u8 at91_leds_cpu; |
diff --git a/include/asm-arm/arch-at91rm9200/gpio.h b/include/asm-arm/arch-at91rm9200/gpio.h index 6176ab2dc417..dbde1baaf251 100644 --- a/include/asm-arm/arch-at91rm9200/gpio.h +++ b/include/asm-arm/arch-at91rm9200/gpio.h | |||
@@ -13,6 +13,8 @@ | |||
13 | #ifndef __ASM_ARCH_AT91RM9200_GPIO_H | 13 | #ifndef __ASM_ARCH_AT91RM9200_GPIO_H |
14 | #define __ASM_ARCH_AT91RM9200_GPIO_H | 14 | #define __ASM_ARCH_AT91RM9200_GPIO_H |
15 | 15 | ||
16 | #include <asm/irq.h> | ||
17 | |||
16 | #define PIN_BASE NR_AIC_IRQS | 18 | #define PIN_BASE NR_AIC_IRQS |
17 | 19 | ||
18 | #define PQFP_GPIO_BANKS 3 /* PQFP package has 3 banks */ | 20 | #define PQFP_GPIO_BANKS 3 /* PQFP package has 3 banks */ |
@@ -188,6 +190,9 @@ extern int at91_set_multi_drive(unsigned pin, int is_on); | |||
188 | /* callable at any time */ | 190 | /* callable at any time */ |
189 | extern int at91_set_gpio_value(unsigned pin, int value); | 191 | extern int at91_set_gpio_value(unsigned pin, int value); |
190 | extern int at91_get_gpio_value(unsigned pin); | 192 | extern int at91_get_gpio_value(unsigned pin); |
193 | |||
194 | extern void at91_gpio_suspend(void); | ||
195 | extern void at91_gpio_resume(void); | ||
191 | #endif | 196 | #endif |
192 | 197 | ||
193 | #endif | 198 | #endif |
diff --git a/include/asm-arm/arch-at91rm9200/hardware.h b/include/asm-arm/arch-at91rm9200/hardware.h index 59e6f44d3a0d..235d39d91107 100644 --- a/include/asm-arm/arch-at91rm9200/hardware.h +++ b/include/asm-arm/arch-at91rm9200/hardware.h | |||
@@ -50,9 +50,12 @@ | |||
50 | #define AT91_VA_BASE_TCB0 AT91_IO_P2V(AT91_BASE_TCB0) | 50 | #define AT91_VA_BASE_TCB0 AT91_IO_P2V(AT91_BASE_TCB0) |
51 | 51 | ||
52 | /* Internal SRAM */ | 52 | /* Internal SRAM */ |
53 | #define AT91_BASE_SRAM 0x00200000 /* Internal SRAM base address */ | 53 | #define AT91_SRAM_BASE 0x00200000 /* Internal SRAM base address */ |
54 | #define AT91_SRAM_SIZE 0x00004000 /* Internal SRAM SIZE (16Kb) */ | 54 | #define AT91_SRAM_SIZE 0x00004000 /* Internal SRAM SIZE (16Kb) */ |
55 | 55 | ||
56 | /* Internal SRAM is mapped below the IO devices */ | ||
57 | #define AT91_SRAM_VIRT_BASE (AT91_IO_VIRT_BASE - AT91_SRAM_SIZE) | ||
58 | |||
56 | /* Serial ports */ | 59 | /* Serial ports */ |
57 | #define AT91_NR_UART 5 /* 4 USART3's and one DBGU port */ | 60 | #define AT91_NR_UART 5 /* 4 USART3's and one DBGU port */ |
58 | 61 | ||
@@ -81,14 +84,14 @@ static inline unsigned int at91_sys_read(unsigned int reg_offset) | |||
81 | { | 84 | { |
82 | void __iomem *addr = (void __iomem *)AT91_VA_BASE_SYS; | 85 | void __iomem *addr = (void __iomem *)AT91_VA_BASE_SYS; |
83 | 86 | ||
84 | return readl(addr + reg_offset); | 87 | return __raw_readl(addr + reg_offset); |
85 | } | 88 | } |
86 | 89 | ||
87 | static inline void at91_sys_write(unsigned int reg_offset, unsigned long value) | 90 | static inline void at91_sys_write(unsigned int reg_offset, unsigned long value) |
88 | { | 91 | { |
89 | void __iomem *addr = (void __iomem *)AT91_VA_BASE_SYS; | 92 | void __iomem *addr = (void __iomem *)AT91_VA_BASE_SYS; |
90 | 93 | ||
91 | writel(value, addr + reg_offset); | 94 | __raw_writel(value, addr + reg_offset); |
92 | } | 95 | } |
93 | #endif | 96 | #endif |
94 | 97 | ||
diff --git a/include/asm-arm/arch-at91rm9200/io.h b/include/asm-arm/arch-at91rm9200/io.h index 23e670d85c9d..88fd1bebcef3 100644 --- a/include/asm-arm/arch-at91rm9200/io.h +++ b/include/asm-arm/arch-at91rm9200/io.h | |||
@@ -21,7 +21,6 @@ | |||
21 | #ifndef __ASM_ARCH_IO_H | 21 | #ifndef __ASM_ARCH_IO_H |
22 | #define __ASM_ARCH_IO_H | 22 | #define __ASM_ARCH_IO_H |
23 | 23 | ||
24 | #include <asm/arch/at91rm9200.h> | ||
25 | #include <asm/io.h> | 24 | #include <asm/io.h> |
26 | 25 | ||
27 | #define IO_SPACE_LIMIT 0xFFFFFFFF | 26 | #define IO_SPACE_LIMIT 0xFFFFFFFF |
diff --git a/include/asm-arm/arch-at91rm9200/irqs.h b/include/asm-arm/arch-at91rm9200/irqs.h index 27b0497f1b36..2dc93b174a8f 100644 --- a/include/asm-arm/arch-at91rm9200/irqs.h +++ b/include/asm-arm/arch-at91rm9200/irqs.h | |||
@@ -37,8 +37,6 @@ | |||
37 | * symbols in gpio.h for ones handled indirectly as GPIOs. | 37 | * symbols in gpio.h for ones handled indirectly as GPIOs. |
38 | * We make provision for 4 banks of GPIO. | 38 | * We make provision for 4 banks of GPIO. |
39 | */ | 39 | */ |
40 | #include <asm/arch/gpio.h> | ||
41 | |||
42 | #define NR_IRQS (NR_AIC_IRQS + (4 * 32)) | 40 | #define NR_IRQS (NR_AIC_IRQS + (4 * 32)) |
43 | 41 | ||
44 | 42 | ||
diff --git a/include/asm-arm/arch-at91rm9200/memory.h b/include/asm-arm/arch-at91rm9200/memory.h index 462f1f0ad67c..3c327c404373 100644 --- a/include/asm-arm/arch-at91rm9200/memory.h +++ b/include/asm-arm/arch-at91rm9200/memory.h | |||
@@ -21,7 +21,7 @@ | |||
21 | #ifndef __ASM_ARCH_MEMORY_H | 21 | #ifndef __ASM_ARCH_MEMORY_H |
22 | #define __ASM_ARCH_MEMORY_H | 22 | #define __ASM_ARCH_MEMORY_H |
23 | 23 | ||
24 | #include <asm/arch/hardware.h> | 24 | #include <asm/hardware.h> |
25 | 25 | ||
26 | #define PHYS_OFFSET (AT91_SDRAM_BASE) | 26 | #define PHYS_OFFSET (AT91_SDRAM_BASE) |
27 | 27 | ||
diff --git a/include/asm-arm/arch-at91rm9200/pio.h b/include/asm-arm/arch-at91rm9200/pio.h deleted file mode 100644 index a89501b4a703..000000000000 --- a/include/asm-arm/arch-at91rm9200/pio.h +++ /dev/null | |||
@@ -1,115 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91rm9200/pio.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 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_PIO_H | ||
14 | #define __ASM_ARCH_PIO_H | ||
15 | |||
16 | #include <asm/arch/hardware.h> | ||
17 | |||
18 | static inline void AT91_CfgPIO_USART0(void) { | ||
19 | at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA17_TXD0 | AT91_PA18_RXD0 | AT91_PA20_CTS0); | ||
20 | |||
21 | /* | ||
22 | * Errata #39 - RTS0 is not internally connected to PA21. We need to drive | ||
23 | * the pin manually. Default is off (RTS is active low). | ||
24 | */ | ||
25 | at91_sys_write(AT91_PIOA + PIO_PER, AT91_PA21_RTS0); | ||
26 | at91_sys_write(AT91_PIOA + PIO_OER, AT91_PA21_RTS0); | ||
27 | at91_sys_write(AT91_PIOA + PIO_SODR, AT91_PA21_RTS0); | ||
28 | } | ||
29 | |||
30 | static inline void AT91_CfgPIO_USART1(void) { | ||
31 | at91_sys_write(AT91_PIOB + PIO_PDR, AT91_PB18_RI1 | AT91_PB19_DTR1 | ||
32 | | AT91_PB20_TXD1 | AT91_PB21_RXD1 | AT91_PB23_DCD1 | ||
33 | | AT91_PB24_CTS1 | AT91_PB25_DSR1 | AT91_PB26_RTS1); | ||
34 | } | ||
35 | |||
36 | static inline void AT91_CfgPIO_USART2(void) { | ||
37 | at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA22_RXD2 | AT91_PA23_TXD2); | ||
38 | } | ||
39 | |||
40 | static inline void AT91_CfgPIO_USART3(void) { | ||
41 | at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA5_TXD3 | AT91_PA6_RXD3); | ||
42 | at91_sys_write(AT91_PIOA + PIO_BSR, AT91_PA5_TXD3 | AT91_PA6_RXD3); | ||
43 | } | ||
44 | |||
45 | static inline void AT91_CfgPIO_DBGU(void) { | ||
46 | at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA31_DTXD | AT91_PA30_DRXD); | ||
47 | } | ||
48 | |||
49 | /* | ||
50 | * Enable the Two-Wire interface. | ||
51 | */ | ||
52 | static inline void AT91_CfgPIO_TWI(void) { | ||
53 | at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA25_TWD | AT91_PA26_TWCK); | ||
54 | at91_sys_write(AT91_PIOA + PIO_ASR, AT91_PA25_TWD | AT91_PA26_TWCK); | ||
55 | at91_sys_write(AT91_PIOA + PIO_MDER, AT91_PA25_TWD | AT91_PA26_TWCK); /* open drain */ | ||
56 | } | ||
57 | |||
58 | /* | ||
59 | * Enable the Serial Peripheral Interface. | ||
60 | */ | ||
61 | static inline void AT91_CfgPIO_SPI(void) { | ||
62 | at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA0_MISO | AT91_PA1_MOSI | AT91_PA2_SPCK); | ||
63 | } | ||
64 | |||
65 | static inline void AT91_CfgPIO_SPI_CS0(void) { | ||
66 | at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA3_NPCS0); | ||
67 | } | ||
68 | |||
69 | static inline void AT91_CfgPIO_SPI_CS1(void) { | ||
70 | at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA4_NPCS1); | ||
71 | } | ||
72 | |||
73 | static inline void AT91_CfgPIO_SPI_CS2(void) { | ||
74 | at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA5_NPCS2); | ||
75 | } | ||
76 | |||
77 | static inline void AT91_CfgPIO_SPI_CS3(void) { | ||
78 | at91_sys_write(AT91_PIOA + PIO_PDR, AT91_PA6_NPCS3); | ||
79 | } | ||
80 | |||
81 | /* | ||
82 | * Select the DataFlash card. | ||
83 | */ | ||
84 | static inline void AT91_CfgPIO_DataFlashCard(void) { | ||
85 | at91_sys_write(AT91_PIOB + PIO_PER, AT91_PIO_P(7)); | ||
86 | at91_sys_write(AT91_PIOB + PIO_OER, AT91_PIO_P(7)); | ||
87 | at91_sys_write(AT91_PIOB + PIO_CODR, AT91_PIO_P(7)); | ||
88 | } | ||
89 | |||
90 | /* | ||
91 | * Enable NAND Flash (SmartMedia) interface. | ||
92 | */ | ||
93 | static inline void AT91_CfgPIO_SmartMedia(void) { | ||
94 | /* enable PC0=SMCE, PC1=SMOE, PC3=SMWE, A21=CLE, A22=ALE */ | ||
95 | at91_sys_write(AT91_PIOC + PIO_ASR, AT91_PC0_BFCK | AT91_PC1_BFRDY_SMOE | AT91_PC3_BFBAA_SMWE); | ||
96 | at91_sys_write(AT91_PIOC + PIO_PDR, AT91_PC0_BFCK | AT91_PC1_BFRDY_SMOE | AT91_PC3_BFBAA_SMWE); | ||
97 | |||
98 | /* Configure PC2 as input (signal READY of the SmartMedia) */ | ||
99 | at91_sys_write(AT91_PIOC + PIO_PER, AT91_PC2_BFAVD); /* enable direct output enable */ | ||
100 | at91_sys_write(AT91_PIOC + PIO_ODR, AT91_PC2_BFAVD); /* disable output */ | ||
101 | |||
102 | /* Configure PB1 as input (signal Card Detect of the SmartMedia) */ | ||
103 | at91_sys_write(AT91_PIOB + PIO_PER, AT91_PIO_P(1)); /* enable direct output enable */ | ||
104 | at91_sys_write(AT91_PIOB + PIO_ODR, AT91_PIO_P(1)); /* disable output */ | ||
105 | } | ||
106 | |||
107 | static inline int AT91_PIO_SmartMedia_RDY(void) { | ||
108 | return (at91_sys_read(AT91_PIOC + PIO_PDSR) & AT91_PIO_P(2)) ? 1 : 0; | ||
109 | } | ||
110 | |||
111 | static inline int AT91_PIO_SmartMedia_CardDetect(void) { | ||
112 | return (at91_sys_read(AT91_PIOB + PIO_PDSR) & AT91_PIO_P(1)) ? 1 : 0; | ||
113 | } | ||
114 | |||
115 | #endif | ||
diff --git a/include/asm-arm/arch-at91rm9200/system.h b/include/asm-arm/arch-at91rm9200/system.h index 29c42655f05c..8a2ff472e4cf 100644 --- a/include/asm-arm/arch-at91rm9200/system.h +++ b/include/asm-arm/arch-at91rm9200/system.h | |||
@@ -21,7 +21,7 @@ | |||
21 | #ifndef __ASM_ARCH_SYSTEM_H | 21 | #ifndef __ASM_ARCH_SYSTEM_H |
22 | #define __ASM_ARCH_SYSTEM_H | 22 | #define __ASM_ARCH_SYSTEM_H |
23 | 23 | ||
24 | #include <asm/arch/hardware.h> | 24 | #include <asm/hardware.h> |
25 | 25 | ||
26 | static inline void arch_idle(void) | 26 | static inline void arch_idle(void) |
27 | { | 27 | { |
@@ -48,4 +48,12 @@ static inline void arch_reset(char mode) | |||
48 | at91_sys_write(AT91_ST_CR, AT91_ST_WDRST); | 48 | at91_sys_write(AT91_ST_CR, AT91_ST_WDRST); |
49 | } | 49 | } |
50 | 50 | ||
51 | #define ARCH_ID_AT91RM9200 0x09200080 | ||
52 | #define ARCH_ID_AT91SAM9261 0x019000a0 | ||
53 | |||
54 | static inline unsigned long arch_identify(void) | ||
55 | { | ||
56 | return at91_sys_read(AT91_DBGU_CIDR) & (AT91_CIDR_EPROC | AT91_CIDR_ARCH); | ||
57 | } | ||
58 | |||
51 | #endif | 59 | #endif |
diff --git a/include/asm-arm/arch-at91rm9200/timex.h b/include/asm-arm/arch-at91rm9200/timex.h index 3f112dd12587..88687cefe6eb 100644 --- a/include/asm-arm/arch-at91rm9200/timex.h +++ b/include/asm-arm/arch-at91rm9200/timex.h | |||
@@ -21,7 +21,7 @@ | |||
21 | #ifndef __ASM_ARCH_TIMEX_H | 21 | #ifndef __ASM_ARCH_TIMEX_H |
22 | #define __ASM_ARCH_TIMEX_H | 22 | #define __ASM_ARCH_TIMEX_H |
23 | 23 | ||
24 | #include <asm/arch/hardware.h> | 24 | #include <asm/hardware.h> |
25 | 25 | ||
26 | #define CLOCK_TICK_RATE (AT91_SLOW_CLOCK) | 26 | #define CLOCK_TICK_RATE (AT91_SLOW_CLOCK) |
27 | 27 | ||
diff --git a/include/asm-arm/arch-at91rm9200/uncompress.h b/include/asm-arm/arch-at91rm9200/uncompress.h index 7b38497c24b5..ec7811ab0a52 100644 --- a/include/asm-arm/arch-at91rm9200/uncompress.h +++ b/include/asm-arm/arch-at91rm9200/uncompress.h | |||
@@ -21,7 +21,7 @@ | |||
21 | #ifndef __ASM_ARCH_UNCOMPRESS_H | 21 | #ifndef __ASM_ARCH_UNCOMPRESS_H |
22 | #define __ASM_ARCH_UNCOMPRESS_H | 22 | #define __ASM_ARCH_UNCOMPRESS_H |
23 | 23 | ||
24 | #include <asm/arch/hardware.h> | 24 | #include <asm/hardware.h> |
25 | 25 | ||
26 | /* | 26 | /* |
27 | * The following code assumes the serial port has already been | 27 | * The following code assumes the serial port has already been |
diff --git a/include/asm-arm/arch-at91rm9200/vmalloc.h b/include/asm-arm/arch-at91rm9200/vmalloc.h index 34d9718feb90..4c367eb57f47 100644 --- a/include/asm-arm/arch-at91rm9200/vmalloc.h +++ b/include/asm-arm/arch-at91rm9200/vmalloc.h | |||
@@ -21,6 +21,6 @@ | |||
21 | #ifndef __ASM_ARCH_VMALLOC_H | 21 | #ifndef __ASM_ARCH_VMALLOC_H |
22 | #define __ASM_ARCH_VMALLOC_H | 22 | #define __ASM_ARCH_VMALLOC_H |
23 | 23 | ||
24 | #define VMALLOC_END (AT91_IO_VIRT_BASE & PGDIR_MASK) | 24 | #define VMALLOC_END (AT91_SRAM_VIRT_BASE & PGDIR_MASK) |
25 | 25 | ||
26 | #endif | 26 | #endif |
diff --git a/include/asm-arm/arch-cl7500/acornfb.h b/include/asm-arm/arch-cl7500/acornfb.h index 3867231a4470..aea6330c9745 100644 --- a/include/asm-arm/arch-cl7500/acornfb.h +++ b/include/asm-arm/arch-cl7500/acornfb.h | |||
@@ -1,4 +1,3 @@ | |||
1 | #include <linux/config.h> | ||
2 | #define acornfb_valid_pixrate(var) (var->pixclock >= 39325 && var->pixclock <= 40119) | 1 | #define acornfb_valid_pixrate(var) (var->pixclock >= 39325 && var->pixclock <= 40119) |
3 | 2 | ||
4 | static inline void | 3 | static inline void |
diff --git a/include/asm-arm/arch-clps711x/hardware.h b/include/asm-arm/arch-clps711x/hardware.h index 1386871e1a5a..0fdbe72fff2a 100644 --- a/include/asm-arm/arch-clps711x/hardware.h +++ b/include/asm-arm/arch-clps711x/hardware.h | |||
@@ -22,7 +22,6 @@ | |||
22 | #ifndef __ASM_ARCH_HARDWARE_H | 22 | #ifndef __ASM_ARCH_HARDWARE_H |
23 | #define __ASM_ARCH_HARDWARE_H | 23 | #define __ASM_ARCH_HARDWARE_H |
24 | 24 | ||
25 | #include <linux/config.h> | ||
26 | 25 | ||
27 | #define CLPS7111_VIRT_BASE 0xff000000 | 26 | #define CLPS7111_VIRT_BASE 0xff000000 |
28 | #define CLPS7111_BASE CLPS7111_VIRT_BASE | 27 | #define CLPS7111_BASE CLPS7111_VIRT_BASE |
diff --git a/include/asm-arm/arch-clps711x/io.h b/include/asm-arm/arch-clps711x/io.h index 62613b0e2d96..53d790202c19 100644 --- a/include/asm-arm/arch-clps711x/io.h +++ b/include/asm-arm/arch-clps711x/io.h | |||
@@ -26,7 +26,6 @@ | |||
26 | 26 | ||
27 | #define __io(a) ((void __iomem *)(a)) | 27 | #define __io(a) ((void __iomem *)(a)) |
28 | #define __mem_pci(a) (a) | 28 | #define __mem_pci(a) (a) |
29 | #define __mem_isa(a) (a) | ||
30 | 29 | ||
31 | /* | 30 | /* |
32 | * We don't support ins[lb]/outs[lb]. Make them fault. | 31 | * We don't support ins[lb]/outs[lb]. Make them fault. |
diff --git a/include/asm-arm/arch-clps711x/memory.h b/include/asm-arm/arch-clps711x/memory.h index 61d8717406ce..c6e8dcf674de 100644 --- a/include/asm-arm/arch-clps711x/memory.h +++ b/include/asm-arm/arch-clps711x/memory.h | |||
@@ -20,7 +20,6 @@ | |||
20 | #ifndef __ASM_ARCH_MEMORY_H | 20 | #ifndef __ASM_ARCH_MEMORY_H |
21 | #define __ASM_ARCH_MEMORY_H | 21 | #define __ASM_ARCH_MEMORY_H |
22 | 22 | ||
23 | #include <linux/config.h> | ||
24 | 23 | ||
25 | /* | 24 | /* |
26 | * Physical DRAM offset. | 25 | * Physical DRAM offset. |
diff --git a/include/asm-arm/arch-clps711x/uncompress.h b/include/asm-arm/arch-clps711x/uncompress.h index 07157b7e4b20..03d233ae87ce 100644 --- a/include/asm-arm/arch-clps711x/uncompress.h +++ b/include/asm-arm/arch-clps711x/uncompress.h | |||
@@ -17,7 +17,6 @@ | |||
17 | * along with this program; if not, write to the Free Software | 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 | 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 | */ | 19 | */ |
20 | #include <linux/config.h> | ||
21 | #include <asm/arch/io.h> | 20 | #include <asm/arch/io.h> |
22 | #include <asm/hardware.h> | 21 | #include <asm/hardware.h> |
23 | #include <asm/hardware/clps7111.h> | 22 | #include <asm/hardware/clps7111.h> |
diff --git a/include/asm-arm/arch-ebsa285/hardware.h b/include/asm-arm/arch-ebsa285/hardware.h index ec51fe92483b..daad8ee2d194 100644 --- a/include/asm-arm/arch-ebsa285/hardware.h +++ b/include/asm-arm/arch-ebsa285/hardware.h | |||
@@ -12,7 +12,6 @@ | |||
12 | #ifndef __ASM_ARCH_HARDWARE_H | 12 | #ifndef __ASM_ARCH_HARDWARE_H |
13 | #define __ASM_ARCH_HARDWARE_H | 13 | #define __ASM_ARCH_HARDWARE_H |
14 | 14 | ||
15 | #include <linux/config.h> | ||
16 | #include <asm/arch/memory.h> | 15 | #include <asm/arch/memory.h> |
17 | 16 | ||
18 | #ifdef CONFIG_ARCH_FOOTBRIDGE | 17 | #ifdef CONFIG_ARCH_FOOTBRIDGE |
diff --git a/include/asm-arm/arch-ebsa285/io.h b/include/asm-arm/arch-ebsa285/io.h index 776f9d377057..f9c729141860 100644 --- a/include/asm-arm/arch-ebsa285/io.h +++ b/include/asm-arm/arch-ebsa285/io.h | |||
@@ -24,7 +24,6 @@ | |||
24 | #define __io(a) ((void __iomem *)(PCIO_BASE + (a))) | 24 | #define __io(a) ((void __iomem *)(PCIO_BASE + (a))) |
25 | #if 1 | 25 | #if 1 |
26 | #define __mem_pci(a) (a) | 26 | #define __mem_pci(a) (a) |
27 | #define __mem_isa(a) ((a) + PCIMEM_BASE) | ||
28 | #else | 27 | #else |
29 | 28 | ||
30 | static inline void __iomem *___mem_pci(void __iomem *p) | 29 | static inline void __iomem *___mem_pci(void __iomem *p) |
@@ -34,14 +33,7 @@ static inline void __iomem *___mem_pci(void __iomem *p) | |||
34 | return p; | 33 | return p; |
35 | } | 34 | } |
36 | 35 | ||
37 | static inline void __iomem *___mem_isa(void __iomem *p) | ||
38 | { | ||
39 | unsigned long a = (unsigned long)p; | ||
40 | BUG_ON(a >= 16*1048576); | ||
41 | return p + PCIMEM_BASE; | ||
42 | } | ||
43 | #define __mem_pci(a) ___mem_pci(a) | 36 | #define __mem_pci(a) ___mem_pci(a) |
44 | #define __mem_isa(a) ___mem_isa(a) | ||
45 | #endif | 37 | #endif |
46 | 38 | ||
47 | #endif | 39 | #endif |
diff --git a/include/asm-arm/arch-ebsa285/memory.h b/include/asm-arm/arch-ebsa285/memory.h index 99181ffc7e27..cbd7ae64bcc9 100644 --- a/include/asm-arm/arch-ebsa285/memory.h +++ b/include/asm-arm/arch-ebsa285/memory.h | |||
@@ -19,7 +19,6 @@ | |||
19 | #ifndef __ASM_ARCH_MEMORY_H | 19 | #ifndef __ASM_ARCH_MEMORY_H |
20 | #define __ASM_ARCH_MEMORY_H | 20 | #define __ASM_ARCH_MEMORY_H |
21 | 21 | ||
22 | #include <linux/config.h> | ||
23 | 22 | ||
24 | #if defined(CONFIG_FOOTBRIDGE_ADDIN) | 23 | #if defined(CONFIG_FOOTBRIDGE_ADDIN) |
25 | /* | 24 | /* |
diff --git a/include/asm-arm/arch-ebsa285/vmalloc.h b/include/asm-arm/arch-ebsa285/vmalloc.h index d1ca955ce434..02598200997d 100644 --- a/include/asm-arm/arch-ebsa285/vmalloc.h +++ b/include/asm-arm/arch-ebsa285/vmalloc.h | |||
@@ -6,7 +6,6 @@ | |||
6 | * published by the Free Software Foundation. | 6 | * published by the Free Software Foundation. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <linux/config.h> | ||
10 | 9 | ||
11 | #ifdef CONFIG_ARCH_FOOTBRIDGE | 10 | #ifdef CONFIG_ARCH_FOOTBRIDGE |
12 | #define VMALLOC_END (PAGE_OFFSET + 0x30000000) | 11 | #define VMALLOC_END (PAGE_OFFSET + 0x30000000) |
diff --git a/include/asm-arm/arch-ep93xx/ep93xx-regs.h b/include/asm-arm/arch-ep93xx/ep93xx-regs.h index 71cea0b5841b..8c322975f96e 100644 --- a/include/asm-arm/arch-ep93xx/ep93xx-regs.h +++ b/include/asm-arm/arch-ep93xx/ep93xx-regs.h | |||
@@ -115,6 +115,8 @@ | |||
115 | #define EP93XX_SYSCON_CLOCK_USH_EN 0x10000000 | 115 | #define EP93XX_SYSCON_CLOCK_USH_EN 0x10000000 |
116 | #define EP93XX_SYSCON_HALT EP93XX_SYSCON_REG(0x08) | 116 | #define EP93XX_SYSCON_HALT EP93XX_SYSCON_REG(0x08) |
117 | #define EP93XX_SYSCON_STANDBY EP93XX_SYSCON_REG(0x0c) | 117 | #define EP93XX_SYSCON_STANDBY EP93XX_SYSCON_REG(0x0c) |
118 | #define EP93XX_SYSCON_CLOCK_SET1 EP93XX_SYSCON_REG(0x20) | ||
119 | #define EP93XX_SYSCON_CLOCK_SET2 EP93XX_SYSCON_REG(0x24) | ||
118 | #define EP93XX_SYSCON_DEVICE_CONFIG EP93XX_SYSCON_REG(0x80) | 120 | #define EP93XX_SYSCON_DEVICE_CONFIG EP93XX_SYSCON_REG(0x80) |
119 | #define EP93XX_SYSCON_DEVICE_CONFIG_CRUNCH_ENABLE 0x00800000 | 121 | #define EP93XX_SYSCON_DEVICE_CONFIG_CRUNCH_ENABLE 0x00800000 |
120 | #define EP93XX_SYSCON_SWLOCK EP93XX_SYSCON_REG(0xc0) | 122 | #define EP93XX_SYSCON_SWLOCK EP93XX_SYSCON_REG(0xc0) |
diff --git a/include/asm-arm/arch-ep93xx/platform.h b/include/asm-arm/arch-ep93xx/platform.h index df9cbb6ef660..d7a34ce20293 100644 --- a/include/asm-arm/arch-ep93xx/platform.h +++ b/include/asm-arm/arch-ep93xx/platform.h | |||
@@ -8,6 +8,7 @@ void ep93xx_map_io(void); | |||
8 | void ep93xx_init_irq(void); | 8 | void ep93xx_init_irq(void); |
9 | void ep93xx_init_time(unsigned long); | 9 | void ep93xx_init_time(unsigned long); |
10 | void ep93xx_init_devices(void); | 10 | void ep93xx_init_devices(void); |
11 | void ep93xx_clock_init(void); | ||
11 | extern struct sys_timer ep93xx_timer; | 12 | extern struct sys_timer ep93xx_timer; |
12 | 13 | ||
13 | 14 | ||
diff --git a/include/asm-arm/arch-imx/imx-dma.h b/include/asm-arm/arch-imx/imx-dma.h index f2063c1d610d..599f03e5a9ef 100644 --- a/include/asm-arm/arch-imx/imx-dma.h +++ b/include/asm-arm/arch-imx/imx-dma.h | |||
@@ -46,7 +46,7 @@ | |||
46 | struct imx_dma_channel { | 46 | struct imx_dma_channel { |
47 | const char *name; | 47 | const char *name; |
48 | void (*irq_handler) (int, void *, struct pt_regs *); | 48 | void (*irq_handler) (int, void *, struct pt_regs *); |
49 | void (*err_handler) (int, void *, struct pt_regs *); | 49 | void (*err_handler) (int, void *, struct pt_regs *, int errcode); |
50 | void *data; | 50 | void *data; |
51 | dmamode_t dma_mode; | 51 | dmamode_t dma_mode; |
52 | struct scatterlist *sg; | 52 | struct scatterlist *sg; |
@@ -58,6 +58,10 @@ struct imx_dma_channel { | |||
58 | 58 | ||
59 | extern struct imx_dma_channel imx_dma_channels[IMX_DMA_CHANNELS]; | 59 | extern struct imx_dma_channel imx_dma_channels[IMX_DMA_CHANNELS]; |
60 | 60 | ||
61 | #define IMX_DMA_ERR_BURST 1 | ||
62 | #define IMX_DMA_ERR_REQUEST 2 | ||
63 | #define IMX_DMA_ERR_TRANSFER 4 | ||
64 | #define IMX_DMA_ERR_BUFFER 8 | ||
61 | 65 | ||
62 | /* The type to distinguish channel numbers parameter from ordinal int type */ | 66 | /* The type to distinguish channel numbers parameter from ordinal int type */ |
63 | typedef int imx_dmach_t; | 67 | typedef int imx_dmach_t; |
@@ -74,7 +78,7 @@ imx_dma_setup_sg(imx_dmach_t dma_ch, | |||
74 | int | 78 | int |
75 | imx_dma_setup_handlers(imx_dmach_t dma_ch, | 79 | imx_dma_setup_handlers(imx_dmach_t dma_ch, |
76 | void (*irq_handler) (int, void *, struct pt_regs *), | 80 | void (*irq_handler) (int, void *, struct pt_regs *), |
77 | void (*err_handler) (int, void *, struct pt_regs *), void *data); | 81 | void (*err_handler) (int, void *, struct pt_regs *, int), void *data); |
78 | 82 | ||
79 | void imx_dma_enable(imx_dmach_t dma_ch); | 83 | void imx_dma_enable(imx_dmach_t dma_ch); |
80 | 84 | ||
diff --git a/include/asm-arm/arch-integrator/io.h b/include/asm-arm/arch-integrator/io.h index 31f2deab51b0..c8f2175948bd 100644 --- a/include/asm-arm/arch-integrator/io.h +++ b/include/asm-arm/arch-integrator/io.h | |||
@@ -32,6 +32,5 @@ | |||
32 | 32 | ||
33 | #define __io(a) ((void __iomem *)(PCI_IO_VADDR + (a))) | 33 | #define __io(a) ((void __iomem *)(PCI_IO_VADDR + (a))) |
34 | #define __mem_pci(a) (a) | 34 | #define __mem_pci(a) (a) |
35 | #define __mem_isa(a) ((a) + PCI_MEMORY_VADDR) | ||
36 | 35 | ||
37 | #endif | 36 | #endif |
diff --git a/include/asm-arm/arch-integrator/smp.h b/include/asm-arm/arch-integrator/smp.h index da6981efdc39..ab2c79bb9505 100644 --- a/include/asm-arm/arch-integrator/smp.h +++ b/include/asm-arm/arch-integrator/smp.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef ASMARM_ARCH_SMP_H | 1 | #ifndef ASMARM_ARCH_SMP_H |
2 | #define ASMARM_ARCH_SMP_H | 2 | #define ASMARM_ARCH_SMP_H |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | 4 | ||
6 | #include <asm/hardware.h> | 5 | #include <asm/hardware.h> |
7 | #include <asm/io.h> | 6 | #include <asm/io.h> |
diff --git a/include/asm-arm/arch-iop3xx/io.h b/include/asm-arm/arch-iop3xx/io.h index f39046a6ab14..36adbdf5055a 100644 --- a/include/asm-arm/arch-iop3xx/io.h +++ b/include/asm-arm/arch-iop3xx/io.h | |||
@@ -17,6 +17,5 @@ | |||
17 | 17 | ||
18 | #define __io(p) ((void __iomem *)(p)) | 18 | #define __io(p) ((void __iomem *)(p)) |
19 | #define __mem_pci(a) (a) | 19 | #define __mem_pci(a) (a) |
20 | #define __mem_isa(a) (a) | ||
21 | 20 | ||
22 | #endif | 21 | #endif |
diff --git a/include/asm-arm/arch-iop3xx/memory.h b/include/asm-arm/arch-iop3xx/memory.h index bc62f4b13235..e43ebd984745 100644 --- a/include/asm-arm/arch-iop3xx/memory.h +++ b/include/asm-arm/arch-iop3xx/memory.h | |||
@@ -5,7 +5,6 @@ | |||
5 | #ifndef __ASM_ARCH_MEMORY_H | 5 | #ifndef __ASM_ARCH_MEMORY_H |
6 | #define __ASM_ARCH_MEMORY_H | 6 | #define __ASM_ARCH_MEMORY_H |
7 | 7 | ||
8 | #include <linux/config.h> | ||
9 | #include <asm/hardware.h> | 8 | #include <asm/hardware.h> |
10 | 9 | ||
11 | /* | 10 | /* |
diff --git a/include/asm-arm/arch-iop3xx/timex.h b/include/asm-arm/arch-iop3xx/timex.h index 472badb451c4..14ca8d0f7b29 100644 --- a/include/asm-arm/arch-iop3xx/timex.h +++ b/include/asm-arm/arch-iop3xx/timex.h | |||
@@ -3,7 +3,6 @@ | |||
3 | * | 3 | * |
4 | * IOP3xx architecture timex specifications | 4 | * IOP3xx architecture timex specifications |
5 | */ | 5 | */ |
6 | #include <linux/config.h> | ||
7 | #include <asm/hardware.h> | 6 | #include <asm/hardware.h> |
8 | 7 | ||
9 | #if defined(CONFIG_ARCH_IQ80321) || defined(CONFIG_ARCH_IQ31244) | 8 | #if defined(CONFIG_ARCH_IQ80321) || defined(CONFIG_ARCH_IQ31244) |
diff --git a/include/asm-arm/arch-iop3xx/uncompress.h b/include/asm-arm/arch-iop3xx/uncompress.h index c98eb6254b1f..fbdd5af644fe 100644 --- a/include/asm-arm/arch-iop3xx/uncompress.h +++ b/include/asm-arm/arch-iop3xx/uncompress.h | |||
@@ -1,7 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/arch-iop3xx/uncompress.h | 2 | * linux/include/asm-arm/arch-iop3xx/uncompress.h |
3 | */ | 3 | */ |
4 | #include <linux/config.h> | ||
5 | #include <asm/types.h> | 4 | #include <asm/types.h> |
6 | #include <asm/mach-types.h> | 5 | #include <asm/mach-types.h> |
7 | #include <linux/serial_reg.h> | 6 | #include <linux/serial_reg.h> |
diff --git a/include/asm-arm/arch-ixp23xx/entry-macro.S b/include/asm-arm/arch-ixp23xx/entry-macro.S index 0ef4e6016ac4..867761677b57 100644 --- a/include/asm-arm/arch-ixp23xx/entry-macro.S +++ b/include/asm-arm/arch-ixp23xx/entry-macro.S | |||
@@ -8,7 +8,7 @@ | |||
8 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 8 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
9 | ldr \irqnr, =(IXP23XX_INTC_VIRT + IXP23XX_INTR_IRQ_ENC_ST_OFFSET) | 9 | ldr \irqnr, =(IXP23XX_INTC_VIRT + IXP23XX_INTR_IRQ_ENC_ST_OFFSET) |
10 | ldr \irqnr, [\irqnr] @ get interrupt number | 10 | ldr \irqnr, [\irqnr] @ get interrupt number |
11 | cmp \irqnr, #0x0 @ suprious interrupt ? | 11 | cmp \irqnr, #0x0 @ spurious interrupt ? |
12 | movne \irqnr, \irqnr, lsr #2 @ skip unwanted low order bits | 12 | movne \irqnr, \irqnr, lsr #2 @ skip unwanted low order bits |
13 | subne \irqnr, \irqnr, #1 @ convert to 0 based | 13 | subne \irqnr, \irqnr, #1 @ convert to 0 based |
14 | 14 | ||
diff --git a/include/asm-arm/arch-ixp23xx/ixp23xx.h b/include/asm-arm/arch-ixp23xx/ixp23xx.h index e49e1ca61b1a..d0a72201ee96 100644 --- a/include/asm-arm/arch-ixp23xx/ixp23xx.h +++ b/include/asm-arm/arch-ixp23xx/ixp23xx.h | |||
@@ -124,6 +124,7 @@ | |||
124 | 124 | ||
125 | #define IXP23XX_EXP_UNIT_FUSE IXP23XX_EXP_CFG_REG(0x28) | 125 | #define IXP23XX_EXP_UNIT_FUSE IXP23XX_EXP_CFG_REG(0x28) |
126 | #define IXP23XX_EXP_MSF_MUX IXP23XX_EXP_CFG_REG(0x30) | 126 | #define IXP23XX_EXP_MSF_MUX IXP23XX_EXP_CFG_REG(0x30) |
127 | #define IXP23XX_EXP_CFG_FUSE IXP23XX_EXP_CFG_REG(0x34) | ||
127 | 128 | ||
128 | #define IXP23XX_EXP_BUS_PHYS 0x90000000 | 129 | #define IXP23XX_EXP_BUS_PHYS 0x90000000 |
129 | #define IXP23XX_EXP_BUS_WINDOW_SIZE 0x01000000 | 130 | #define IXP23XX_EXP_BUS_WINDOW_SIZE 0x01000000 |
@@ -251,7 +252,7 @@ | |||
251 | * CAP CSRs. | 252 | * CAP CSRs. |
252 | ****************************************************************************/ | 253 | ****************************************************************************/ |
253 | #define IXP23XX_GLOBAL_REG(x) ((volatile unsigned long *)(IXP23XX_CAP_CSR_VIRT + 0x4a00 + (x))) | 254 | #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_PRODUCT_ID IXP23XX_GLOBAL_REG(0x00) |
255 | #define IXP23XX_MISC_CONTROL IXP23XX_GLOBAL_REG(0x04) | 256 | #define IXP23XX_MISC_CONTROL IXP23XX_GLOBAL_REG(0x04) |
256 | #define IXP23XX_MSF_CLK_CNTRL IXP23XX_GLOBAL_REG(0x08) | 257 | #define IXP23XX_MSF_CLK_CNTRL IXP23XX_GLOBAL_REG(0x08) |
257 | #define IXP23XX_RESET0 IXP23XX_GLOBAL_REG(0x0c) | 258 | #define IXP23XX_RESET0 IXP23XX_GLOBAL_REG(0x0c) |
@@ -265,6 +266,8 @@ | |||
265 | #define IXP23XX_PCI_UNIT_RESET (1 << 1) | 266 | #define IXP23XX_PCI_UNIT_RESET (1 << 1) |
266 | #define IXP23XX_XSCALE_RESET (1 << 0) | 267 | #define IXP23XX_XSCALE_RESET (1 << 0) |
267 | 268 | ||
269 | #define IXP23XX_UENGINE_CSR_VIRT_BASE (IXP23XX_CAP_CSR_VIRT + 0x18000) | ||
270 | |||
268 | 271 | ||
269 | /**************************************************************************** | 272 | /**************************************************************************** |
270 | * PCI CSRs. | 273 | * PCI CSRs. |
diff --git a/include/asm-arm/arch-ixp23xx/platform.h b/include/asm-arm/arch-ixp23xx/platform.h index e4d99060a049..19a73b39c864 100644 --- a/include/asm-arm/arch-ixp23xx/platform.h +++ b/include/asm-arm/arch-ixp23xx/platform.h | |||
@@ -14,6 +14,21 @@ | |||
14 | 14 | ||
15 | #ifndef __ASSEMBLY__ | 15 | #ifndef __ASSEMBLY__ |
16 | 16 | ||
17 | extern inline unsigned long ixp2000_reg_read(volatile void *reg) | ||
18 | { | ||
19 | return *((volatile unsigned long *)reg); | ||
20 | } | ||
21 | |||
22 | extern inline void ixp2000_reg_write(volatile void *reg, unsigned long val) | ||
23 | { | ||
24 | *((volatile unsigned long *)reg) = val; | ||
25 | } | ||
26 | |||
27 | extern inline void ixp2000_reg_wrb(volatile void *reg, unsigned long val) | ||
28 | { | ||
29 | *((volatile unsigned long *)reg) = val; | ||
30 | } | ||
31 | |||
17 | struct pci_sys_data; | 32 | struct pci_sys_data; |
18 | 33 | ||
19 | void ixp23xx_map_io(void); | 34 | void ixp23xx_map_io(void); |
diff --git a/include/asm-arm/arch-ixp4xx/dma.h b/include/asm-arm/arch-ixp4xx/dma.h index b1a071ecebc8..789f7f53c357 100644 --- a/include/asm-arm/arch-ixp4xx/dma.h +++ b/include/asm-arm/arch-ixp4xx/dma.h | |||
@@ -11,7 +11,6 @@ | |||
11 | #ifndef __ASM_ARCH_DMA_H | 11 | #ifndef __ASM_ARCH_DMA_H |
12 | #define __ASM_ARCH_DMA_H | 12 | #define __ASM_ARCH_DMA_H |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/device.h> | 14 | #include <linux/device.h> |
16 | #include <linux/pci.h> | 15 | #include <linux/pci.h> |
17 | #include <asm/page.h> | 16 | #include <asm/page.h> |
diff --git a/include/asm-arm/arch-l7200/io.h b/include/asm-arm/arch-l7200/io.h index cab8ad0adf09..cd080d8384d9 100644 --- a/include/asm-arm/arch-l7200/io.h +++ b/include/asm-arm/arch-l7200/io.h | |||
@@ -19,7 +19,6 @@ | |||
19 | */ | 19 | */ |
20 | #define __io_pci(a) ((void __iomem *)(PCIO_BASE + (a))) | 20 | #define __io_pci(a) ((void __iomem *)(PCIO_BASE + (a))) |
21 | #define __mem_pci(a) (a) | 21 | #define __mem_pci(a) (a) |
22 | #define __mem_isa(a) (a) | ||
23 | 22 | ||
24 | #define __ioaddr(p) __io_pci(p) | 23 | #define __ioaddr(p) __io_pci(p) |
25 | 24 | ||
diff --git a/include/asm-arm/arch-lh7a40x/clocks.h b/include/asm-arm/arch-lh7a40x/clocks.h new file mode 100644 index 000000000000..bee02fd8dab1 --- /dev/null +++ b/include/asm-arm/arch-lh7a40x/clocks.h | |||
@@ -0,0 +1,20 @@ | |||
1 | /* include/asm-arm/arch-lh7a40x/clocks.h | ||
2 | * | ||
3 | * Copyright (C) 2004 Marc Singer | ||
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 | #include <linux/config.h> | ||
12 | |||
13 | #ifndef __ASM_ARCH_CLOCKS_H | ||
14 | #define __ASM_ARCH_CLOCKS_H | ||
15 | |||
16 | unsigned int fclkfreq_get (void); | ||
17 | unsigned int hclkfreq_get (void); | ||
18 | unsigned int pclkfreq_get (void); | ||
19 | |||
20 | #endif /* _ASM_ARCH_CLOCKS_H */ | ||
diff --git a/include/asm-arm/arch-lh7a40x/constants.h b/include/asm-arm/arch-lh7a40x/constants.h index 52c1cb9c39c6..51de96e87faf 100644 --- a/include/asm-arm/arch-lh7a40x/constants.h +++ b/include/asm-arm/arch-lh7a40x/constants.h | |||
@@ -12,7 +12,6 @@ | |||
12 | #ifndef __ASM_ARCH_CONSTANTS_H | 12 | #ifndef __ASM_ARCH_CONSTANTS_H |
13 | #define __ASM_ARCH_CONSTANTS_H | 13 | #define __ASM_ARCH_CONSTANTS_H |
14 | 14 | ||
15 | #include <linux/config.h> | ||
16 | 15 | ||
17 | /* Addressing constants */ | 16 | /* Addressing constants */ |
18 | 17 | ||
@@ -29,8 +28,7 @@ | |||
29 | 28 | ||
30 | #if defined (CONFIG_MACH_LPD7A400) || defined (CONFIG_MACH_LPD7A404) | 29 | #if defined (CONFIG_MACH_LPD7A400) || defined (CONFIG_MACH_LPD7A404) |
31 | 30 | ||
32 | # define IOBARRIER_PHYS 0xc0000000 /* Start of SDRAM */ | 31 | # define IOBARRIER_PHYS 0x10000000 /* Second bank, fastest timing */ |
33 | /*# define IOBARRIER_PHYS 0x00000000 */ /* Start of flash */ | ||
34 | # define IOBARRIER_VIRT 0xf0000000 | 32 | # define IOBARRIER_VIRT 0xf0000000 |
35 | # define IOBARRIER_SIZE PAGE_SIZE | 33 | # define IOBARRIER_SIZE PAGE_SIZE |
36 | 34 | ||
@@ -53,6 +51,9 @@ | |||
53 | # define CPLD08_PHYS CPLDX_PHYS (0x08) | 51 | # define CPLD08_PHYS CPLDX_PHYS (0x08) |
54 | # define CPLD08_VIRT CPLDX_VIRT (0x08) | 52 | # define CPLD08_VIRT CPLDX_VIRT (0x08) |
55 | # define CPLD08_SIZE PAGE_SIZE | 53 | # define CPLD08_SIZE PAGE_SIZE |
54 | # define CPLD0A_PHYS CPLDX_PHYS (0x0a) | ||
55 | # define CPLD0A_VIRT CPLDX_VIRT (0x0a) | ||
56 | # define CPLD0A_SIZE PAGE_SIZE | ||
56 | # define CPLD0C_PHYS CPLDX_PHYS (0x0c) | 57 | # define CPLD0C_PHYS CPLDX_PHYS (0x0c) |
57 | # define CPLD0C_VIRT CPLDX_VIRT (0x0c) | 58 | # define CPLD0C_VIRT CPLDX_VIRT (0x0c) |
58 | # define CPLD0C_SIZE PAGE_SIZE | 59 | # define CPLD0C_SIZE PAGE_SIZE |
@@ -84,5 +85,7 @@ | |||
84 | #define XTAL_IN 14745600 /* 14.7456 MHz crystal */ | 85 | #define XTAL_IN 14745600 /* 14.7456 MHz crystal */ |
85 | #define PLL_CLOCK (XTAL_IN * 21) /* 309 MHz PLL clock */ | 86 | #define PLL_CLOCK (XTAL_IN * 21) /* 309 MHz PLL clock */ |
86 | #define MAX_HCLK_KHZ 100000 /* HCLK max limit ~100MHz */ | 87 | #define MAX_HCLK_KHZ 100000 /* HCLK max limit ~100MHz */ |
88 | #define HCLK (99993600) | ||
89 | //#define HCLK (119808000) | ||
87 | 90 | ||
88 | #endif /* __ASM_ARCH_CONSTANTS_H */ | 91 | #endif /* __ASM_ARCH_CONSTANTS_H */ |
diff --git a/include/asm-arm/arch-lh7a40x/dma.h b/include/asm-arm/arch-lh7a40x/dma.h index 15492e3253f6..a8cbd14bbf9d 100644 --- a/include/asm-arm/arch-lh7a40x/dma.h +++ b/include/asm-arm/arch-lh7a40x/dma.h | |||
@@ -1,9 +1,86 @@ | |||
1 | /* include/asm-arm/arch-lh7a40x/dma.h | 1 | /* include/asm-arm/arch-lh7a40x/dma.h |
2 | * | 2 | * |
3 | * Copyright (C) 2003 Coastal Environmental Systems | 3 | * Copyright (C) 2005 Marc Singer |
4 | * | 4 | * |
5 | * This program is free software; you can redistribute it and/or | 5 | * This program is free software; you can redistribute it and/or |
6 | * modify it under the terms of the GNU General Public License | 6 | * modify it under the terms of the GNU General Public License |
7 | * version 2 as published by the Free Software Foundation. | 7 | * version 2 as published by the Free Software Foundation. |
8 | * | 8 | * |
9 | */ | 9 | */ |
10 | |||
11 | typedef enum { | ||
12 | DMA_M2M0 = 0, | ||
13 | DMA_M2M1 = 1, | ||
14 | DMA_M2P0 = 2, /* Tx */ | ||
15 | DMA_M2P1 = 3, /* Rx */ | ||
16 | DMA_M2P2 = 4, /* Tx */ | ||
17 | DMA_M2P3 = 5, /* Rx */ | ||
18 | DMA_M2P4 = 6, /* Tx - AC97 */ | ||
19 | DMA_M2P5 = 7, /* Rx - AC97 */ | ||
20 | DMA_M2P6 = 8, /* Tx */ | ||
21 | DMA_M2P7 = 9, /* Rx */ | ||
22 | } dma_device_t; | ||
23 | |||
24 | #define DMA_LENGTH_MAX ((64*1024) - 4) /* bytes */ | ||
25 | |||
26 | #define DMAC_GCA __REG(DMAC_PHYS + 0x2b80) | ||
27 | #define DMAC_GIR __REG(DMAC_PHYS + 0x2bc0) | ||
28 | |||
29 | #define DMAC_GIR_MMI1 (1<<11) | ||
30 | #define DMAC_GIR_MMI0 (1<<10) | ||
31 | #define DMAC_GIR_MPI8 (1<<9) | ||
32 | #define DMAC_GIR_MPI9 (1<<8) | ||
33 | #define DMAC_GIR_MPI6 (1<<7) | ||
34 | #define DMAC_GIR_MPI7 (1<<6) | ||
35 | #define DMAC_GIR_MPI4 (1<<5) | ||
36 | #define DMAC_GIR_MPI5 (1<<4) | ||
37 | #define DMAC_GIR_MPI2 (1<<3) | ||
38 | #define DMAC_GIR_MPI3 (1<<2) | ||
39 | #define DMAC_GIR_MPI0 (1<<1) | ||
40 | #define DMAC_GIR_MPI1 (1<<0) | ||
41 | |||
42 | #define DMAC_M2P0 0x0000 | ||
43 | #define DMAC_M2P1 0x0040 | ||
44 | #define DMAC_M2P2 0x0080 | ||
45 | #define DMAC_M2P3 0x00c0 | ||
46 | #define DMAC_M2P4 0x0240 | ||
47 | #define DMAC_M2P5 0x0200 | ||
48 | #define DMAC_M2P6 0x02c0 | ||
49 | #define DMAC_M2P7 0x0280 | ||
50 | #define DMAC_M2P8 0x0340 | ||
51 | #define DMAC_M2P9 0x0300 | ||
52 | #define DMAC_M2M0 0x0100 | ||
53 | #define DMAC_M2M1 0x0140 | ||
54 | |||
55 | #define DMAC_P_PCONTROL(c) __REG(DMAC_PHYS + (c) + 0x00) | ||
56 | #define DMAC_P_PINTERRUPT(c) __REG(DMAC_PHYS + (c) + 0x04) | ||
57 | #define DMAC_P_PPALLOC(c) __REG(DMAC_PHYS + (c) + 0x08) | ||
58 | #define DMAC_P_PSTATUS(c) __REG(DMAC_PHYS + (c) + 0x0c) | ||
59 | #define DMAC_P_REMAIN(c) __REG(DMAC_PHYS + (c) + 0x14) | ||
60 | #define DMAC_P_MAXCNT0(c) __REG(DMAC_PHYS + (c) + 0x20) | ||
61 | #define DMAC_P_BASE0(c) __REG(DMAC_PHYS + (c) + 0x24) | ||
62 | #define DMAC_P_CURRENT0(c) __REG(DMAC_PHYS + (c) + 0x28) | ||
63 | #define DMAC_P_MAXCNT1(c) __REG(DMAC_PHYS + (c) + 0x30) | ||
64 | #define DMAC_P_BASE1(c) __REG(DMAC_PHYS + (c) + 0x34) | ||
65 | #define DMAC_P_CURRENT1(c) __REG(DMAC_PHYS + (c) + 0x38) | ||
66 | |||
67 | #define DMAC_PCONTROL_ENABLE (1<<4) | ||
68 | |||
69 | #define DMAC_PORT_USB 0 | ||
70 | #define DMAC_PORT_SDMMC 1 | ||
71 | #define DMAC_PORT_AC97_1 2 | ||
72 | #define DMAC_PORT_AC97_2 3 | ||
73 | #define DMAC_PORT_AC97_3 4 | ||
74 | #define DMAC_PORT_UART1 6 | ||
75 | #define DMAC_PORT_UART2 7 | ||
76 | #define DMAC_PORT_UART3 8 | ||
77 | |||
78 | #define DMAC_PSTATUS_CURRSTATE_SHIFT 4 | ||
79 | #define DMAC_PSTATUS_CURRSTATE_MASK 0x3 | ||
80 | |||
81 | #define DMAC_PSTATUS_NEXTBUF (1<<6) | ||
82 | #define DMAC_PSTATUS_STALLRINT (1<<0) | ||
83 | |||
84 | #define DMAC_INT_CHE (1<<3) | ||
85 | #define DMAC_INT_NFB (1<<1) | ||
86 | #define DMAC_INT_STALL (1<<0) | ||
diff --git a/include/asm-arm/arch-lh7a40x/entry-macro.S b/include/asm-arm/arch-lh7a40x/entry-macro.S index a2f67c06d9c9..9fc7f4988124 100644 --- a/include/asm-arm/arch-lh7a40x/entry-macro.S +++ b/include/asm-arm/arch-lh7a40x/entry-macro.S | |||
@@ -10,11 +10,73 @@ | |||
10 | #include <asm/hardware.h> | 10 | #include <asm/hardware.h> |
11 | #include <asm/arch/irqs.h> | 11 | #include <asm/arch/irqs.h> |
12 | 12 | ||
13 | # if defined (CONFIG_ARCH_LH7A400) && defined (CONFIG_ARCH_LH7A404) | 13 | /* In order to allow there to be support for both of the processor |
14 | # error "LH7A400 and LH7A404 are mutually exclusive" | 14 | classes at the same time, we make a hack here that isn't very |
15 | # endif | 15 | pretty. At startup, the link pointed to with the |
16 | branch_irq_lh7a400 symbol is replaced with a NOP when the CPU is | ||
17 | detected as a lh7a404. | ||
16 | 18 | ||
17 | # if defined (CONFIG_ARCH_LH7A400) | 19 | *** FIXME: we should clean this up so that there is only one |
20 | implementation for each CPU's design. | ||
21 | |||
22 | */ | ||
23 | |||
24 | #if defined (CONFIG_ARCH_LH7A400) && defined (CONFIG_ARCH_LH7A404) | ||
25 | |||
26 | .macro disable_fiq | ||
27 | .endm | ||
28 | |||
29 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
30 | |||
31 | branch_irq_lh7a400: b 1000f | ||
32 | |||
33 | @ Implementation of the LH7A404 get_irqnr_and_base. | ||
34 | |||
35 | mov \irqnr, #0 @ VIC1 irq base | ||
36 | mov \base, #io_p2v(0x80000000) @ APB registers | ||
37 | add \base, \base, #0x8000 | ||
38 | ldr \tmp, [\base, #0x0030] @ VIC1_VECTADDR | ||
39 | tst \tmp, #VA_VECTORED @ Direct vectored | ||
40 | bne 1002f | ||
41 | tst \tmp, #VA_VIC1DEFAULT @ Default vectored VIC1 | ||
42 | ldrne \irqstat, [\base, #0] @ VIC1_IRQSTATUS | ||
43 | bne 1001f | ||
44 | add \base, \base, #(0xa000 - 0x8000) | ||
45 | ldr \tmp, [\base, #0x0030] @ VIC2_VECTADDR | ||
46 | tst \tmp, #VA_VECTORED @ Direct vectored | ||
47 | bne 1002f | ||
48 | ldr \irqstat, [\base, #0] @ VIC2_IRQSTATUS | ||
49 | mov \irqnr, #32 @ VIC2 irq base | ||
50 | |||
51 | 1001: movs \irqstat, \irqstat, lsr #1 @ Shift into carry | ||
52 | bcs 1008f @ Bit set; irq found | ||
53 | add \irqnr, \irqnr, #1 | ||
54 | bne 1001b @ Until no bits | ||
55 | b 1009f @ Nothing? Hmm. | ||
56 | 1002: and \irqnr, \tmp, #0x3f @ Mask for valid bits | ||
57 | 1008: movs \irqstat, #1 @ Force !Z | ||
58 | str \tmp, [\base, #0x0030] @ Clear vector | ||
59 | b 1009f | ||
60 | |||
61 | @ Implementation of the LH7A400 get_irqnr_and_base. | ||
62 | |||
63 | 1000: mov \irqnr, #0 | ||
64 | mov \base, #io_p2v(0x80000000) @ APB registers | ||
65 | ldr \irqstat, [\base, #0x500] @ PIC INTSR | ||
66 | |||
67 | 1001: movs \irqstat, \irqstat, lsr #1 @ Shift into carry | ||
68 | bcs 1008f @ Bit set; irq found | ||
69 | add \irqnr, \irqnr, #1 | ||
70 | bne 1001b @ Until no bits | ||
71 | b 1009f @ Nothing? Hmm. | ||
72 | 1008: movs \irqstat, #1 @ Force !Z | ||
73 | |||
74 | 1009: | ||
75 | .endm | ||
76 | |||
77 | |||
78 | |||
79 | #elif defined (CONFIG_ARCH_LH7A400) | ||
18 | .macro disable_fiq | 80 | .macro disable_fiq |
19 | .endm | 81 | .endm |
20 | 82 | ||
diff --git a/include/asm-arm/arch-lh7a40x/hardware.h b/include/asm-arm/arch-lh7a40x/hardware.h index aeb07c162e25..e9ff74fd7939 100644 --- a/include/asm-arm/arch-lh7a40x/hardware.h +++ b/include/asm-arm/arch-lh7a40x/hardware.h | |||
@@ -13,6 +13,8 @@ | |||
13 | #ifndef __ASM_ARCH_HARDWARE_H | 13 | #ifndef __ASM_ARCH_HARDWARE_H |
14 | #define __ASM_ARCH_HARDWARE_H | 14 | #define __ASM_ARCH_HARDWARE_H |
15 | 15 | ||
16 | #include <asm/sizes.h> /* Added for the sake of amba-clcd driver */ | ||
17 | |||
16 | #define io_p2v(x) (0xf0000000 | (((x) & 0xfff00000) >> 4) | ((x) & 0x0000ffff)) | 18 | #define io_p2v(x) (0xf0000000 | (((x) & 0xfff00000) >> 4) | ((x) & 0x0000ffff)) |
17 | #define io_v2p(x) ( (((x) & 0x0fff0000) << 4) | ((x) & 0x0000ffff)) | 19 | #define io_v2p(x) ( (((x) & 0x0fff0000) << 4) | ((x) & 0x0000ffff)) |
18 | 20 | ||
@@ -53,6 +55,8 @@ typedef struct { volatile u8 offset[4096]; } __regbase8; | |||
53 | 55 | ||
54 | #endif | 56 | #endif |
55 | 57 | ||
58 | #define MASK_AND_SET(v,m,s) (v) = ((v)&~(m))|(s) | ||
59 | |||
56 | #include "registers.h" | 60 | #include "registers.h" |
57 | 61 | ||
58 | #endif /* _ASM_ARCH_HARDWARE_H */ | 62 | #endif /* _ASM_ARCH_HARDWARE_H */ |
diff --git a/include/asm-arm/arch-lh7a40x/io.h b/include/asm-arm/arch-lh7a40x/io.h index bbcd4335f441..17bc94097481 100644 --- a/include/asm-arm/arch-lh7a40x/io.h +++ b/include/asm-arm/arch-lh7a40x/io.h | |||
@@ -18,6 +18,5 @@ | |||
18 | /* No ISA or PCI bus on this machine. */ | 18 | /* No ISA or PCI bus on this machine. */ |
19 | #define __io(a) ((void __iomem *)(a)) | 19 | #define __io(a) ((void __iomem *)(a)) |
20 | #define __mem_pci(a) (a) | 20 | #define __mem_pci(a) (a) |
21 | #define __mem_isa(a) (a) | ||
22 | 21 | ||
23 | #endif /* __ASM_ARCH_IO_H */ | 22 | #endif /* __ASM_ARCH_IO_H */ |
diff --git a/include/asm-arm/arch-lh7a40x/irqs.h b/include/asm-arm/arch-lh7a40x/irqs.h index f91f3e59f3ab..afe8c7cbad6a 100644 --- a/include/asm-arm/arch-lh7a40x/irqs.h +++ b/include/asm-arm/arch-lh7a40x/irqs.h | |||
@@ -18,7 +18,6 @@ | |||
18 | #ifndef __ASM_ARCH_IRQS_H | 18 | #ifndef __ASM_ARCH_IRQS_H |
19 | #define __ASM_ARCH_IRQS_H | 19 | #define __ASM_ARCH_IRQS_H |
20 | 20 | ||
21 | #include <linux/config.h> | ||
22 | 21 | ||
23 | #define FIQ_START 80 | 22 | #define FIQ_START 80 |
24 | 23 | ||
@@ -154,9 +153,10 @@ | |||
154 | #if !defined (IRQ_GPIO0INTR) | 153 | #if !defined (IRQ_GPIO0INTR) |
155 | # define IRQ_GPIO0INTR IRQ_GPIO0FIQ | 154 | # define IRQ_GPIO0INTR IRQ_GPIO0FIQ |
156 | #endif | 155 | #endif |
157 | #define IRQ_TICK IRQ_TINTR | 156 | #define IRQ_TICK IRQ_TINTR |
158 | #define IRQ_PCC1_RDY IRQ_GPIO6INTR /* PCCard 1 ready */ | 157 | #define IRQ_PCC1_RDY IRQ_GPIO6INTR /* PCCard 1 ready */ |
159 | #define IRQ_PCC2_RDY IRQ_GPIO7INTR /* PCCard 2 ready */ | 158 | #define IRQ_PCC2_RDY IRQ_GPIO7INTR /* PCCard 2 ready */ |
159 | #define IRQ_USB IRQ_USBINTR /* USB device */ | ||
160 | 160 | ||
161 | #ifdef CONFIG_MACH_KEV7A400 | 161 | #ifdef CONFIG_MACH_KEV7A400 |
162 | # define IRQ_TS IRQ_GPIOFIQ /* Touchscreen */ | 162 | # define IRQ_TS IRQ_GPIOFIQ /* Touchscreen */ |
@@ -191,6 +191,10 @@ | |||
191 | # define IRQ_LPD7A400_TS IRQ_LPD7A40X_CPLD + 1 /* Touch screen */ | 191 | # define IRQ_LPD7A400_TS IRQ_LPD7A40X_CPLD + 1 /* Touch screen */ |
192 | #endif | 192 | #endif |
193 | 193 | ||
194 | #if defined (CONFIG_MACH_LPD7A400) | ||
195 | # define IRQ_TOUCH IRQ_LPD7A400_TS | ||
196 | #endif | ||
197 | |||
194 | #define NR_IRQS (NR_IRQ_CPU + NR_IRQ_BOARD) | 198 | #define NR_IRQS (NR_IRQ_CPU + NR_IRQ_BOARD) |
195 | 199 | ||
196 | #endif | 200 | #endif |
diff --git a/include/asm-arm/arch-lh7a40x/registers.h b/include/asm-arm/arch-lh7a40x/registers.h index 2edb22e35450..b4f09b3e2d03 100644 --- a/include/asm-arm/arch-lh7a40x/registers.h +++ b/include/asm-arm/arch-lh7a40x/registers.h | |||
@@ -9,7 +9,6 @@ | |||
9 | * | 9 | * |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <asm/arch/constants.h> | 12 | #include <asm/arch/constants.h> |
14 | 13 | ||
15 | #ifndef __ASM_ARCH_REGISTERS_H | 14 | #ifndef __ASM_ARCH_REGISTERS_H |
@@ -18,7 +17,7 @@ | |||
18 | 17 | ||
19 | /* Physical register base addresses */ | 18 | /* Physical register base addresses */ |
20 | 19 | ||
21 | #define AC97_PHYS (0x80000000) /* AC97 Controller */ | 20 | #define AC97C_PHYS (0x80000000) /* AC97 Controller */ |
22 | #define MMC_PHYS (0x80000100) /* Multimedia Card Controller */ | 21 | #define MMC_PHYS (0x80000100) /* Multimedia Card Controller */ |
23 | #define USB_PHYS (0x80000200) /* USB Client */ | 22 | #define USB_PHYS (0x80000200) /* USB Client */ |
24 | #define SCI_PHYS (0x80000300) /* Secure Card Interface */ | 23 | #define SCI_PHYS (0x80000300) /* Secure Card Interface */ |
@@ -35,6 +34,8 @@ | |||
35 | #define RTC_PHYS (0x80000d00) /* Real-time Clock */ | 34 | #define RTC_PHYS (0x80000d00) /* Real-time Clock */ |
36 | #define GPIO_PHYS (0x80000e00) /* General Purpose IO */ | 35 | #define GPIO_PHYS (0x80000e00) /* General Purpose IO */ |
37 | #define BMI_PHYS (0x80000f00) /* Battery Monitor Interface */ | 36 | #define BMI_PHYS (0x80000f00) /* Battery Monitor Interface */ |
37 | #define HRTFTC_PHYS (0x80001000) /* High-res TFT Controller (LH7A400) */ | ||
38 | #define ALI_PHYS (0x80001000) /* Advanced LCD Interface (LH7A404) */ | ||
38 | #define WDT_PHYS (0x80001400) /* Watchdog Timer */ | 39 | #define WDT_PHYS (0x80001400) /* Watchdog Timer */ |
39 | #define SMC_PHYS (0x80002000) /* Static Memory Controller */ | 40 | #define SMC_PHYS (0x80002000) /* Static Memory Controller */ |
40 | #define SDRC_PHYS (0x80002400) /* SDRAM Controller */ | 41 | #define SDRC_PHYS (0x80002400) /* SDRAM Controller */ |
@@ -43,6 +44,7 @@ | |||
43 | 44 | ||
44 | /* Physical registers of the LH7A404 */ | 45 | /* Physical registers of the LH7A404 */ |
45 | 46 | ||
47 | #define ADC_PHYS (0x80001300) /* A/D & Touchscreen Controller */ | ||
46 | #define VIC1_PHYS (0x80008000) /* Vectored Interrupt Controller 1 */ | 48 | #define VIC1_PHYS (0x80008000) /* Vectored Interrupt Controller 1 */ |
47 | #define USBH_PHYS (0x80009000) /* USB OHCI host controller */ | 49 | #define USBH_PHYS (0x80009000) /* USB OHCI host controller */ |
48 | #define VIC2_PHYS (0x8000a000) /* Vectored Interrupt Controller 2 */ | 50 | #define VIC2_PHYS (0x8000a000) /* Vectored Interrupt Controller 2 */ |
@@ -53,10 +55,32 @@ | |||
53 | 55 | ||
54 | /* Clock/State Controller register */ | 56 | /* Clock/State Controller register */ |
55 | 57 | ||
58 | #define CSC_PWRSR __REG(CSC_PHYS + 0x00) /* Reset register & ID */ | ||
56 | #define CSC_PWRCNT __REG(CSC_PHYS + 0x04) /* Power control */ | 59 | #define CSC_PWRCNT __REG(CSC_PHYS + 0x04) /* Power control */ |
60 | #define CSC_CLKSET __REG(CSC_PHYS + 0x20) /* Clock speed control */ | ||
61 | #define CSC_USBDRESET __REG(CSC_PHYS + 0x4c) /* USB Device resets */ | ||
57 | 62 | ||
58 | #define CSC_PWRCNT_USBH_EN (1<<28) /* USB Host power enable */ | 63 | #define CSC_PWRCNT_USBH_EN (1<<28) /* USB Host power enable */ |
59 | 64 | #define CSC_PWRCNT_DMAC_M2M1_EN (1<<27) | |
65 | #define CSC_PWRCNT_DMAC_M2M0_EN (1<<26) | ||
66 | #define CSC_PWRCNT_DMAC_M2P8_EN (1<<25) | ||
67 | #define CSC_PWRCNT_DMAC_M2P9_EN (1<<24) | ||
68 | #define CSC_PWRCNT_DMAC_M2P6_EN (1<<23) | ||
69 | #define CSC_PWRCNT_DMAC_M2P7_EN (1<<22) | ||
70 | #define CSC_PWRCNT_DMAC_M2P4_EN (1<<21) | ||
71 | #define CSC_PWRCNT_DMAC_M2P5_EN (1<<20) | ||
72 | #define CSC_PWRCNT_DMAC_M2P2_EN (1<<19) | ||
73 | #define CSC_PWRCNT_DMAC_M2P3_EN (1<<18) | ||
74 | #define CSC_PWRCNT_DMAC_M2P0_EN (1<<17) | ||
75 | #define CSC_PWRCNT_DMAC_M2P1_EN (1<<16) | ||
76 | |||
77 | #define CSC_PWRSR_CHIPMAN_SHIFT (24) | ||
78 | #define CSC_PWRSR_CHIPMAN_MASK (0xff) | ||
79 | #define CSC_PWRSR_CHIPID_SHIFT (16) | ||
80 | #define CSC_PWRSR_CHIPID_MASK (0xff) | ||
81 | |||
82 | #define CSC_USBDRESET_APBRESETREG (1<<1) | ||
83 | #define CSC_USBDRESET_IORESETREG (1<<0) | ||
60 | 84 | ||
61 | /* Interrupt Controller registers */ | 85 | /* Interrupt Controller registers */ |
62 | 86 | ||
@@ -109,6 +133,13 @@ | |||
109 | #define GPIO_GPIOFEOI __REG(GPIO_PHYS + 0x54) /* GPIO End-of-Interrupt */ | 133 | #define GPIO_GPIOFEOI __REG(GPIO_PHYS + 0x54) /* GPIO End-of-Interrupt */ |
110 | #define GPIO_GPIOINTEN __REG(GPIO_PHYS + 0x58) /* GPIO Interrupt Enable */ | 134 | #define GPIO_GPIOINTEN __REG(GPIO_PHYS + 0x58) /* GPIO Interrupt Enable */ |
111 | #define GPIO_INTSTATUS __REG(GPIO_PHYS + 0x5c) /* GPIO Interrupt Status */ | 135 | #define GPIO_INTSTATUS __REG(GPIO_PHYS + 0x5c) /* GPIO Interrupt Status */ |
136 | #define GPIO_PINMUX __REG(GPIO_PHYS + 0x2c) | ||
137 | #define GPIO_PADD __REG(GPIO_PHYS + 0x10) | ||
138 | #define GPIO_PAD __REG(GPIO_PHYS + 0x00) | ||
139 | #define GPIO_PCD __REG(GPIO_PHYS + 0x08) | ||
140 | #define GPIO_PCDD __REG(GPIO_PHYS + 0x18) | ||
141 | #define GPIO_PEDD __REG(GPIO_PHYS + 0x24) | ||
142 | #define GPIO_PED __REG(GPIO_PHYS + 0x20) | ||
112 | 143 | ||
113 | 144 | ||
114 | /* Static Memory Controller registers */ | 145 | /* Static Memory Controller registers */ |
@@ -138,20 +169,21 @@ | |||
138 | #endif | 169 | #endif |
139 | 170 | ||
140 | #if defined (CONFIG_MACH_LPD7A400) || defined (CONFIG_MACH_LPD7A404) | 171 | #if defined (CONFIG_MACH_LPD7A400) || defined (CONFIG_MACH_LPD7A404) |
141 | # define CPLD_CONTROL __REG8(CPLD02_PHYS) | ||
142 | # define CPLD_SPI_DATA __REG8(CPLD06_PHYS) | ||
143 | # define CPLD_SPI_CONTROL __REG8(CPLD08_PHYS) | ||
144 | # define CPLD_SPI_EEPROM __REG8(CPLD0A_PHYS) | ||
145 | # define CPLD_INTERRUPTS __REG8(CPLD0C_PHYS) /* IRQ mask/status */ | ||
146 | # define CPLD_BOOT_MODE __REG8(CPLD0E_PHYS) | ||
147 | # define CPLD_FLASH __REG8(CPLD10_PHYS) | ||
148 | # define CPLD_POWER_MGMT __REG8(CPLD12_PHYS) | ||
149 | # define CPLD_REVISION __REG8(CPLD14_PHYS) | ||
150 | # define CPLD_GPIO_EXT __REG8(CPLD16_PHYS) | ||
151 | # define CPLD_GPIO_DATA __REG8(CPLD18_PHYS) | ||
152 | # define CPLD_GPIO_DIR __REG8(CPLD1A_PHYS) | ||
153 | #endif | ||
154 | 172 | ||
173 | # define CPLD_CONTROL __REG16(CPLD02_PHYS) | ||
174 | # define CPLD_SPI_DATA __REG16(CPLD06_PHYS) | ||
175 | # define CPLD_SPI_CONTROL __REG16(CPLD08_PHYS) | ||
176 | # define CPLD_SPI_EEPROM __REG16(CPLD0A_PHYS) | ||
177 | # define CPLD_INTERRUPTS __REG16(CPLD0C_PHYS) /* IRQ mask/status */ | ||
178 | # define CPLD_BOOT_MODE __REG16(CPLD0E_PHYS) | ||
179 | # define CPLD_FLASH __REG16(CPLD10_PHYS) | ||
180 | # define CPLD_POWER_MGMT __REG16(CPLD12_PHYS) | ||
181 | # define CPLD_REVISION __REG16(CPLD14_PHYS) | ||
182 | # define CPLD_GPIO_EXT __REG16(CPLD16_PHYS) | ||
183 | # define CPLD_GPIO_DATA __REG16(CPLD18_PHYS) | ||
184 | # define CPLD_GPIO_DIR __REG16(CPLD1A_PHYS) | ||
185 | |||
186 | #endif | ||
155 | 187 | ||
156 | /* Timer registers */ | 188 | /* Timer registers */ |
157 | 189 | ||
@@ -190,4 +222,3 @@ | |||
190 | 222 | ||
191 | 223 | ||
192 | #endif /* _ASM_ARCH_REGISTERS_H */ | 224 | #endif /* _ASM_ARCH_REGISTERS_H */ |
193 | |||
diff --git a/include/asm-arm/arch-lh7a40x/ssp.h b/include/asm-arm/arch-lh7a40x/ssp.h new file mode 100644 index 000000000000..132b1c4d5ce6 --- /dev/null +++ b/include/asm-arm/arch-lh7a40x/ssp.h | |||
@@ -0,0 +1,71 @@ | |||
1 | /* ssp.h | ||
2 | $Id$ | ||
3 | |||
4 | written by Marc Singer | ||
5 | 6 Dec 2004 | ||
6 | |||
7 | Copyright (C) 2004 Marc Singer | ||
8 | |||
9 | ----------- | ||
10 | DESCRIPTION | ||
11 | ----------- | ||
12 | |||
13 | This SSP header is available throughout the kernel, for this | ||
14 | machine/architecture, because drivers that use it may be dispersed. | ||
15 | |||
16 | This file was cloned from the 7952x implementation. It would be | ||
17 | better to share them, but we're taking an easier approach for the | ||
18 | time being. | ||
19 | |||
20 | */ | ||
21 | |||
22 | #if !defined (__SSP_H__) | ||
23 | # define __SSP_H__ | ||
24 | |||
25 | /* ----- Includes */ | ||
26 | |||
27 | /* ----- Types */ | ||
28 | |||
29 | struct ssp_driver { | ||
30 | int (*init) (void); | ||
31 | void (*exit) (void); | ||
32 | void (*acquire) (void); | ||
33 | void (*release) (void); | ||
34 | int (*configure) (int device, int mode, int speed, | ||
35 | int frame_size_write, int frame_size_read); | ||
36 | void (*chip_select) (int enable); | ||
37 | void (*set_callbacks) (void* handle, | ||
38 | irqreturn_t (*callback_tx)(void*), | ||
39 | irqreturn_t (*callback_rx)(void*)); | ||
40 | void (*enable) (void); | ||
41 | void (*disable) (void); | ||
42 | // int (*save_state) (void*); | ||
43 | // void (*restore_state) (void*); | ||
44 | int (*read) (void); | ||
45 | int (*write) (u16 data); | ||
46 | int (*write_read) (u16 data); | ||
47 | void (*flush) (void); | ||
48 | void (*write_async) (void* pv, size_t cb); | ||
49 | size_t (*write_pos) (void); | ||
50 | }; | ||
51 | |||
52 | /* These modes are only available on the LH79524 */ | ||
53 | #define SSP_MODE_SPI (1) | ||
54 | #define SSP_MODE_SSI (2) | ||
55 | #define SSP_MODE_MICROWIRE (3) | ||
56 | #define SSP_MODE_I2S (4) | ||
57 | |||
58 | /* CPLD SPI devices */ | ||
59 | #define DEVICE_EEPROM 0 /* Configuration eeprom */ | ||
60 | #define DEVICE_MAC 1 /* MAC eeprom (LPD79524) */ | ||
61 | #define DEVICE_CODEC 2 /* Audio codec */ | ||
62 | #define DEVICE_TOUCH 3 /* Touch screen (LPD79520) */ | ||
63 | |||
64 | /* ----- Globals */ | ||
65 | |||
66 | /* ----- Prototypes */ | ||
67 | |||
68 | //extern struct ssp_driver lh79520_i2s_driver; | ||
69 | extern struct ssp_driver lh7a400_cpld_ssp_driver; | ||
70 | |||
71 | #endif /* __SSP_H__ */ | ||
diff --git a/include/asm-arm/arch-lh7a40x/uncompress.h b/include/asm-arm/arch-lh7a40x/uncompress.h index f8053346f608..3d1ce0426a33 100644 --- a/include/asm-arm/arch-lh7a40x/uncompress.h +++ b/include/asm-arm/arch-lh7a40x/uncompress.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #ifndef UART_R_STATUS | 16 | #ifndef UART_R_STATUS |
17 | # define UART_R_STATUS (0x10) | 17 | # define UART_R_STATUS (0x10) |
18 | #endif | 18 | #endif |
19 | #define nTxRdy (0x20) /* Not TxReady (literally Tx FIFO full) */ | 19 | #define nTxRdy (0x20) /* Not TxReady (literally Tx FIFO full) */ |
20 | 20 | ||
21 | /* Access UART with physical addresses before MMU is setup */ | 21 | /* Access UART with physical addresses before MMU is setup */ |
22 | #define UART_STATUS (*(volatile unsigned long*) (UART2_PHYS + UART_R_STATUS)) | 22 | #define UART_STATUS (*(volatile unsigned long*) (UART2_PHYS + UART_R_STATUS)) |
diff --git a/include/asm-arm/arch-netx/debug-macro.S b/include/asm-arm/arch-netx/debug-macro.S new file mode 100644 index 000000000000..a940d0e80cb2 --- /dev/null +++ b/include/asm-arm/arch-netx/debug-macro.S | |||
@@ -0,0 +1,38 @@ | |||
1 | /* linux/include/asm-arm/arch-netx/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 | |||
14 | #include "hardware.h" | ||
15 | |||
16 | .macro addruart,rx | ||
17 | mrc p15, 0, \rx, c1, c0 | ||
18 | tst \rx, #1 @ MMU enabled? | ||
19 | moveq \rx, #0x00100000 @ physical | ||
20 | movne \rx, #io_p2v(0x00100000) @ virtual | ||
21 | orr \rx, \rx, #0x00000a00 | ||
22 | .endm | ||
23 | |||
24 | .macro senduart,rd,rx | ||
25 | str \rd, [\rx, #0] | ||
26 | .endm | ||
27 | |||
28 | .macro busyuart,rd,rx | ||
29 | 1002: ldr \rd, [\rx, #0x18] | ||
30 | tst \rd, #(1 << 3) | ||
31 | bne 1002b | ||
32 | .endm | ||
33 | |||
34 | .macro waituart,rd,rx | ||
35 | 1001: ldr \rd, [\rx, #0x18] | ||
36 | tst \rd, #(1 << 3) | ||
37 | bne 1001b | ||
38 | .endm | ||
diff --git a/include/asm-arm/arch-netx/dma.h b/include/asm-arm/arch-netx/dma.h new file mode 100644 index 000000000000..4eda5feed81c --- /dev/null +++ b/include/asm-arm/arch-netx/dma.h | |||
@@ -0,0 +1,21 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-netx/dma.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
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 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | #define MAX_DMA_CHANNELS 0 | ||
21 | #define MAX_DMA_ADDRESS ~0 | ||
diff --git a/include/asm-arm/arch-netx/entry-macro.S b/include/asm-arm/arch-netx/entry-macro.S new file mode 100644 index 000000000000..658df4d60ff3 --- /dev/null +++ b/include/asm-arm/arch-netx/entry-macro.S | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-netx/entry-macro.S | ||
3 | * | ||
4 | * Low-level IRQ helper macros for Hilscher netX based platforms | ||
5 | * | ||
6 | * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
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 | ||
10 | * as published by the Free Software Foundation. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | */ | ||
21 | #include <asm/hardware.h> | ||
22 | |||
23 | .macro disable_fiq | ||
24 | .endm | ||
25 | |||
26 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
27 | mov \base, #io_p2v(0x00100000) | ||
28 | add \base, \base, #0x000ff000 | ||
29 | |||
30 | ldr \irqstat, [\base, #0] | ||
31 | clz \irqnr, \irqstat | ||
32 | rsb \irqnr, \irqnr, #31 | ||
33 | cmp \irqstat, #0 | ||
34 | .endm | ||
35 | |||
diff --git a/include/asm-arm/arch-netx/eth.h b/include/asm-arm/arch-netx/eth.h new file mode 100644 index 000000000000..643c90ef8b72 --- /dev/null +++ b/include/asm-arm/arch-netx/eth.h | |||
@@ -0,0 +1,27 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-netx/eth.h | ||
3 | * | ||
4 | * Copyright (c) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
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 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | #ifndef ASMARM_ARCH_ETH_H | ||
21 | #define ASMARM_ARCH_ETH_H | ||
22 | |||
23 | struct netxeth_platform_data { | ||
24 | unsigned int xcno; /* number of xmac/xpec engine this eth uses */ | ||
25 | }; | ||
26 | |||
27 | #endif | ||
diff --git a/include/asm-arm/arch-netx/hardware.h b/include/asm-arm/arch-netx/hardware.h new file mode 100644 index 000000000000..7786c45455cd --- /dev/null +++ b/include/asm-arm/arch-netx/hardware.h | |||
@@ -0,0 +1,39 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-netx/hardware.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
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 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | #ifndef __ASM_ARCH_HARDWARE_H | ||
20 | #define __ASM_ARCH_HARDWARE_H | ||
21 | |||
22 | #define NETX_IO_PHYS 0x00100000 | ||
23 | #define NETX_IO_VIRT 0xe0000000 | ||
24 | #define NETX_IO_SIZE 0x00100000 | ||
25 | |||
26 | #define SRAM_INTERNAL_PHYS_0 0x00000 | ||
27 | #define SRAM_INTERNAL_PHYS_1 0x08000 | ||
28 | #define SRAM_INTERNAL_PHYS_2 0x10000 | ||
29 | #define SRAM_INTERNAL_PHYS_3 0x18000 | ||
30 | #define SRAM_INTERNAL_PHYS(no) ((no) * 0x8000) | ||
31 | |||
32 | #define XPEC_MEM_SIZE 0x4000 | ||
33 | #define XMAC_MEM_SIZE 0x1000 | ||
34 | #define SRAM_MEM_SIZE 0x8000 | ||
35 | |||
36 | #define io_p2v(x) ((x) - NETX_IO_PHYS + NETX_IO_VIRT) | ||
37 | #define io_v2p(x) ((x) - NETX_IO_VIRT + NETX_IO_PHYS) | ||
38 | |||
39 | #endif | ||
diff --git a/include/asm-arm/arch-netx/io.h b/include/asm-arm/arch-netx/io.h new file mode 100644 index 000000000000..a7a53f80165d --- /dev/null +++ b/include/asm-arm/arch-netx/io.h | |||
@@ -0,0 +1,28 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-netx/io.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
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 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | #ifndef __ASM_ARM_ARCH_IO_H | ||
21 | #define __ASM_ARM_ARCH_IO_H | ||
22 | |||
23 | #define IO_SPACE_LIMIT 0xffffffff | ||
24 | |||
25 | #define __io(a) ((void __iomem *)(a)) | ||
26 | #define __mem_pci(a) (a) | ||
27 | |||
28 | #endif | ||
diff --git a/include/asm-arm/arch-netx/irqs.h b/include/asm-arm/arch-netx/irqs.h new file mode 100644 index 000000000000..a487dc6e2661 --- /dev/null +++ b/include/asm-arm/arch-netx/irqs.h | |||
@@ -0,0 +1,70 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-netx/irqs.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
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 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | #define NETX_IRQ_VIC_START 0 | ||
21 | #define NETX_IRQ_SOFTINT 0 | ||
22 | #define NETX_IRQ_TIMER0 1 | ||
23 | #define NETX_IRQ_TIMER1 2 | ||
24 | #define NETX_IRQ_TIMER2 3 | ||
25 | #define NETX_IRQ_SYSTIME_NS 4 | ||
26 | #define NETX_IRQ_SYSTIME_S 5 | ||
27 | #define NETX_IRQ_GPIO_15 6 | ||
28 | #define NETX_IRQ_WATCHDOG 7 | ||
29 | #define NETX_IRQ_UART0 8 | ||
30 | #define NETX_IRQ_UART1 9 | ||
31 | #define NETX_IRQ_UART2 10 | ||
32 | #define NETX_IRQ_USB 11 | ||
33 | #define NETX_IRQ_SPI 12 | ||
34 | #define NETX_IRQ_I2C 13 | ||
35 | #define NETX_IRQ_LCD 14 | ||
36 | #define NETX_IRQ_HIF 15 | ||
37 | #define NETX_IRQ_GPIO_0_14 16 | ||
38 | #define NETX_IRQ_XPEC0 17 | ||
39 | #define NETX_IRQ_XPEC1 18 | ||
40 | #define NETX_IRQ_XPEC2 19 | ||
41 | #define NETX_IRQ_XPEC3 20 | ||
42 | #define NETX_IRQ_XPEC(no) (17 + (no)) | ||
43 | #define NETX_IRQ_MSYNC0 21 | ||
44 | #define NETX_IRQ_MSYNC1 22 | ||
45 | #define NETX_IRQ_MSYNC2 23 | ||
46 | #define NETX_IRQ_MSYNC3 24 | ||
47 | #define NETX_IRQ_IRQ_PHY 25 | ||
48 | #define NETX_IRQ_ISO_AREA 26 | ||
49 | /* int 27 is reserved */ | ||
50 | /* int 28 is reserved */ | ||
51 | #define NETX_IRQ_TIMER3 29 | ||
52 | #define NETX_IRQ_TIMER4 30 | ||
53 | /* int 31 is reserved */ | ||
54 | |||
55 | #define NETX_IRQS 32 | ||
56 | |||
57 | /* for multiplexed irqs on gpio 0..14 */ | ||
58 | #define NETX_IRQ_GPIO(x) (NETX_IRQS + (x)) | ||
59 | #define NETX_IRQ_GPIO_LAST NETX_IRQ_GPIO(14) | ||
60 | |||
61 | /* Host interface interrupts */ | ||
62 | #define NETX_IRQ_HIF_CHAINED(x) (NETX_IRQ_GPIO_LAST + 1 + (x)) | ||
63 | #define NETX_IRQ_HIF_PIO35 NETX_IRQ_HIF_CHAINED(0) | ||
64 | #define NETX_IRQ_HIF_PIO36 NETX_IRQ_HIF_CHAINED(1) | ||
65 | #define NETX_IRQ_HIF_PIO40 NETX_IRQ_HIF_CHAINED(2) | ||
66 | #define NETX_IRQ_HIF_PIO47 NETX_IRQ_HIF_CHAINED(3) | ||
67 | #define NETX_IRQ_HIF_PIO72 NETX_IRQ_HIF_CHAINED(4) | ||
68 | #define NETX_IRQ_HIF_LAST NETX_IRQ_HIF_CHAINED(4) | ||
69 | |||
70 | #define NR_IRQS (NETX_IRQ_HIF_LAST + 1) | ||
diff --git a/include/asm-arm/arch-netx/memory.h b/include/asm-arm/arch-netx/memory.h new file mode 100644 index 000000000000..6d8d2df3e99d --- /dev/null +++ b/include/asm-arm/arch-netx/memory.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-netx/memory.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
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 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | #ifndef __ASM_ARCH_MEMORY_H | ||
21 | #define __ASM_ARCH_MEMORY_H | ||
22 | |||
23 | #define PHYS_OFFSET UL(0x80000000) | ||
24 | |||
25 | /* | ||
26 | * Virtual view <-> DMA view memory address translations | ||
27 | * virt_to_bus: Used to translate the virtual address to an | ||
28 | * address suitable to be passed to set_dma_addr | ||
29 | * bus_to_virt: Used to convert an address for DMA operations | ||
30 | * to an address that the kernel can use. | ||
31 | */ | ||
32 | #define __virt_to_bus(x) __virt_to_phys(x) | ||
33 | #define __bus_to_virt(x) __phys_to_virt(x) | ||
34 | |||
35 | #endif | ||
36 | |||
diff --git a/include/asm-arm/arch-netx/netx-regs.h b/include/asm-arm/arch-netx/netx-regs.h new file mode 100644 index 000000000000..8ab45bea83ca --- /dev/null +++ b/include/asm-arm/arch-netx/netx-regs.h | |||
@@ -0,0 +1,410 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-netx/netx-regs.h | ||
3 | * | ||
4 | * Copyright (c) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
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 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | #ifndef __ASM_ARCH_NETX_REGS_H | ||
21 | #define __ASM_ARCH_NETX_REGS_H | ||
22 | |||
23 | /* offsets relative to the beginning of the io space */ | ||
24 | #define NETX_OFS_SYSTEM 0x00000 | ||
25 | #define NETX_OFS_MEMCR 0x00100 | ||
26 | #define NETX_OFS_DPMAS 0x03000 | ||
27 | #define NETX_OFS_GPIO 0x00800 | ||
28 | #define NETX_OFS_PIO 0x00900 | ||
29 | #define NETX_OFS_UART0 0x00a00 | ||
30 | #define NETX_OFS_UART1 0x00a40 | ||
31 | #define NETX_OFS_UART2 0x00a80 | ||
32 | #define NETX_OF_MIIMU 0x00b00 | ||
33 | #define NETX_OFS_SPI 0x00c00 | ||
34 | #define NETX_OFS_I2C 0x00d00 | ||
35 | #define NETX_OFS_SYSTIME 0x01100 | ||
36 | #define NETX_OFS_RTC 0x01200 | ||
37 | #define NETX_OFS_EXTBUS 0x03600 | ||
38 | #define NETX_OFS_LCD 0x04000 | ||
39 | #define NETX_OFS_USB 0x20000 | ||
40 | #define NETX_OFS_XMAC0 0x60000 | ||
41 | #define NETX_OFS_XMAC1 0x61000 | ||
42 | #define NETX_OFS_XMAC2 0x62000 | ||
43 | #define NETX_OFS_XMAC3 0x63000 | ||
44 | #define NETX_OFS_XMAC(no) (0x60000 + (no) * 0x1000) | ||
45 | #define NETX_OFS_PFIFO 0x64000 | ||
46 | #define NETX_OFS_XPEC0 0x70000 | ||
47 | #define NETX_OFS_XPEC1 0x74000 | ||
48 | #define NETX_OFS_XPEC2 0x78000 | ||
49 | #define NETX_OFS_XPEC3 0x7c000 | ||
50 | #define NETX_OFS_XPEC(no) (0x70000 + (no) * 0x4000) | ||
51 | #define NETX_OFS_VIC 0xff000 | ||
52 | |||
53 | /* physical addresses */ | ||
54 | #define NETX_PA_SYSTEM (NETX_IO_PHYS + NETX_OFS_SYSTEM) | ||
55 | #define NETX_PA_MEMCR (NETX_IO_PHYS + NETX_OFS_MEMCR) | ||
56 | #define NETX_PA_DPMAS (NETX_IO_PHYS + NETX_OFS_DPMAS) | ||
57 | #define NETX_PA_GPIO (NETX_IO_PHYS + NETX_OFS_GPIO) | ||
58 | #define NETX_PA_PIO (NETX_IO_PHYS + NETX_OFS_PIO) | ||
59 | #define NETX_PA_UART0 (NETX_IO_PHYS + NETX_OFS_UART0) | ||
60 | #define NETX_PA_UART1 (NETX_IO_PHYS + NETX_OFS_UART1) | ||
61 | #define NETX_PA_UART2 (NETX_IO_PHYS + NETX_OFS_UART2) | ||
62 | #define NETX_PA_MIIMU (NETX_IO_PHYS + NETX_OF_MIIMU) | ||
63 | #define NETX_PA_SPI (NETX_IO_PHYS + NETX_OFS_SPI) | ||
64 | #define NETX_PA_I2C (NETX_IO_PHYS + NETX_OFS_I2C) | ||
65 | #define NETX_PA_SYSTIME (NETX_IO_PHYS + NETX_OFS_SYSTIME) | ||
66 | #define NETX_PA_RTC (NETX_IO_PHYS + NETX_OFS_RTC) | ||
67 | #define NETX_PA_EXTBUS (NETX_IO_PHYS + NETX_OFS_EXTBUS) | ||
68 | #define NETX_PA_LCD (NETX_IO_PHYS + NETX_OFS_LCD) | ||
69 | #define NETX_PA_USB (NETX_IO_PHYS + NETX_OFS_USB) | ||
70 | #define NETX_PA_XMAC0 (NETX_IO_PHYS + NETX_OFS_XMAC0) | ||
71 | #define NETX_PA_XMAC1 (NETX_IO_PHYS + NETX_OFS_XMAC1) | ||
72 | #define NETX_PA_XMAC2 (NETX_IO_PHYS + NETX_OFS_XMAC2) | ||
73 | #define NETX_PA_XMAC3 (NETX_IO_PHYS + NETX_OFS_XMAC3) | ||
74 | #define NETX_PA_XMAC(no) (NETX_IO_PHYS + NETX_OFS_XMAC(no)) | ||
75 | #define NETX_PA_PFIFO (NETX_IO_PHYS + NETX_OFS_PFIFO) | ||
76 | #define NETX_PA_XPEC0 (NETX_IO_PHYS + NETX_OFS_XPEC0) | ||
77 | #define NETX_PA_XPEC1 (NETX_IO_PHYS + NETX_OFS_XPEC1) | ||
78 | #define NETX_PA_XPEC2 (NETX_IO_PHYS + NETX_OFS_XPEC2) | ||
79 | #define NETX_PA_XPEC3 (NETX_IO_PHYS + NETX_OFS_XPEC3) | ||
80 | #define NETX_PA_XPEC(no) (NETX_IO_PHYS + NETX_OFS_XPEC(no)) | ||
81 | #define NETX_PA_VIC (NETX_IO_PHYS + NETX_OFS_VIC) | ||
82 | |||
83 | /* virual addresses */ | ||
84 | #define NETX_VA_SYSTEM (NETX_IO_VIRT + NETX_OFS_SYSTEM) | ||
85 | #define NETX_VA_MEMCR (NETX_IO_VIRT + NETX_OFS_MEMCR) | ||
86 | #define NETX_VA_DPMAS (NETX_IO_VIRT + NETX_OFS_DPMAS) | ||
87 | #define NETX_VA_GPIO (NETX_IO_VIRT + NETX_OFS_GPIO) | ||
88 | #define NETX_VA_PIO (NETX_IO_VIRT + NETX_OFS_PIO) | ||
89 | #define NETX_VA_UART0 (NETX_IO_VIRT + NETX_OFS_UART0) | ||
90 | #define NETX_VA_UART1 (NETX_IO_VIRT + NETX_OFS_UART1) | ||
91 | #define NETX_VA_UART2 (NETX_IO_VIRT + NETX_OFS_UART2) | ||
92 | #define NETX_VA_MIIMU (NETX_IO_VIRT + NETX_OF_MIIMU) | ||
93 | #define NETX_VA_SPI (NETX_IO_VIRT + NETX_OFS_SPI) | ||
94 | #define NETX_VA_I2C (NETX_IO_VIRT + NETX_OFS_I2C) | ||
95 | #define NETX_VA_SYSTIME (NETX_IO_VIRT + NETX_OFS_SYSTIME) | ||
96 | #define NETX_VA_RTC (NETX_IO_VIRT + NETX_OFS_RTC) | ||
97 | #define NETX_VA_EXTBUS (NETX_IO_VIRT + NETX_OFS_EXTBUS) | ||
98 | #define NETX_VA_LCD (NETX_IO_VIRT + NETX_OFS_LCD) | ||
99 | #define NETX_VA_USB (NETX_IO_VIRT + NETX_OFS_USB) | ||
100 | #define NETX_VA_XMAC0 (NETX_IO_VIRT + NETX_OFS_XMAC0) | ||
101 | #define NETX_VA_XMAC1 (NETX_IO_VIRT + NETX_OFS_XMAC1) | ||
102 | #define NETX_VA_XMAC2 (NETX_IO_VIRT + NETX_OFS_XMAC2) | ||
103 | #define NETX_VA_XMAC3 (NETX_IO_VIRT + NETX_OFS_XMAC3) | ||
104 | #define NETX_VA_XMAC(no) (NETX_IO_VIRT + NETX_OFS_XMAC(no)) | ||
105 | #define NETX_VA_PFIFO (NETX_IO_VIRT + NETX_OFS_PFIFO) | ||
106 | #define NETX_VA_XPEC0 (NETX_IO_VIRT + NETX_OFS_XPEC0) | ||
107 | #define NETX_VA_XPEC1 (NETX_IO_VIRT + NETX_OFS_XPEC1) | ||
108 | #define NETX_VA_XPEC2 (NETX_IO_VIRT + NETX_OFS_XPEC2) | ||
109 | #define NETX_VA_XPEC3 (NETX_IO_VIRT + NETX_OFS_XPEC3) | ||
110 | #define NETX_VA_XPEC(no) (NETX_IO_VIRT + NETX_OFS_XPEC(no)) | ||
111 | #define NETX_VA_VIC (NETX_IO_VIRT + NETX_OFS_VIC) | ||
112 | |||
113 | /********************************* | ||
114 | * System functions * | ||
115 | *********************************/ | ||
116 | |||
117 | /* Registers */ | ||
118 | #define NETX_SYSTEM_REG(ofs) __io(NETX_VA_SYSTEM + (ofs)) | ||
119 | #define NETX_SYSTEM_BOO_SR NETX_SYSTEM_REG(0x00) | ||
120 | #define NETX_SYSTEM_IOC_CR NETX_SYSTEM_REG(0x04) | ||
121 | #define NETX_SYSTEM_IOC_MR NETX_SYSTEM_REG(0x08) | ||
122 | |||
123 | /* FIXME: Docs are not consistent */ | ||
124 | #define NETX_SYSTEM_RES_CR NETX_SYSTEM_REG(0x08) | ||
125 | /* #define NETX_SYSTEM_RES_CR NETX_SYSTEM_REG(0x0c) */ | ||
126 | |||
127 | #define NETX_SYSTEM_PHY_CONTROL NETX_SYSTEM_REG(0x10) | ||
128 | #define NETX_SYSTEM_REV NETX_SYSTEM_REG(0x34) | ||
129 | #define NETX_SYSTEM_IOC_ACCESS_KEY NETX_SYSTEM_REG(0x70) | ||
130 | #define NETX_SYSTEM_WDG_TR NETX_SYSTEM_REG(0x200) | ||
131 | #define NETX_SYSTEM_WDG_CTR NETX_SYSTEM_REG(0x204) | ||
132 | #define NETX_SYSTEM_WDG_IRQ_TIMEOUT NETX_SYSTEM_REG(0x208) | ||
133 | #define NETX_SYSTEM_WDG_RES_TIMEOUT NETX_SYSTEM_REG(0x20c) | ||
134 | |||
135 | /* Bits */ | ||
136 | #define NETX_SYSTEM_RES_CR_RSTIN (1<<0) | ||
137 | #define NETX_SYSTEM_RES_CR_WDG_RES (1<<1) | ||
138 | #define NETX_SYSTEM_RES_CR_HOST_RES (1<<2) | ||
139 | #define NETX_SYSTEM_RES_CR_FIRMW_RES (1<<3) | ||
140 | #define NETX_SYSTEM_RES_CR_XPEC0_RES (1<<4) | ||
141 | #define NETX_SYSTEM_RES_CR_XPEC1_RES (1<<5) | ||
142 | #define NETX_SYSTEM_RES_CR_XPEC2_RES (1<<6) | ||
143 | #define NETX_SYSTEM_RES_CR_XPEC3_RES (1<<7) | ||
144 | #define NETX_SYSTEM_RES_CR_DIS_XPEC0_RES (1<<16) | ||
145 | #define NETX_SYSTEM_RES_CR_DIS_XPEC1_RES (1<<17) | ||
146 | #define NETX_SYSTEM_RES_CR_DIS_XPEC2_RES (1<<18) | ||
147 | #define NETX_SYSTEM_RES_CR_DIS_XPEC3_RES (1<<19) | ||
148 | #define NETX_SYSTEM_RES_CR_FIRMW_FLG0 (1<<20) | ||
149 | #define NETX_SYSTEM_RES_CR_FIRMW_FLG1 (1<<21) | ||
150 | #define NETX_SYSTEM_RES_CR_FIRMW_FLG2 (1<<22) | ||
151 | #define NETX_SYSTEM_RES_CR_FIRMW_FLG3 (1<<23) | ||
152 | #define NETX_SYSTEM_RES_CR_FIRMW_RES_EN (1<<24) | ||
153 | #define NETX_SYSTEM_RES_CR_RSTOUT (1<<25) | ||
154 | #define NETX_SYSTEM_RES_CR_EN_RSTOUT (1<<26) | ||
155 | |||
156 | #define PHY_CONTROL_RESET (1<<31) | ||
157 | #define PHY_CONTROL_SIM_BYP (1<<30) | ||
158 | #define PHY_CONTROL_CLK_XLATIN (1<<29) | ||
159 | #define PHY_CONTROL_PHY1_EN (1<<21) | ||
160 | #define PHY_CONTROL_PHY1_NP_MSG_CODE | ||
161 | #define PHY_CONTROL_PHY1_AUTOMDIX (1<<17) | ||
162 | #define PHY_CONTROL_PHY1_FIXMODE (1<<16) | ||
163 | #define PHY_CONTROL_PHY1_MODE(mode) (((mode) & 0x7) << 13) | ||
164 | #define PHY_CONTROL_PHY0_EN (1<<12) | ||
165 | #define PHY_CONTROL_PHY0_NP_MSG_CODE | ||
166 | #define PHY_CONTROL_PHY0_AUTOMDIX (1<<8) | ||
167 | #define PHY_CONTROL_PHY0_FIXMODE (1<<7) | ||
168 | #define PHY_CONTROL_PHY0_MODE(mode) (((mode) & 0x7) << 4) | ||
169 | #define PHY_CONTROL_PHY_ADDRESS(adr) ((adr) & 0xf) | ||
170 | |||
171 | #define PHY_MODE_10BASE_T_HALF 0 | ||
172 | #define PHY_MODE_10BASE_T_FULL 1 | ||
173 | #define PHY_MODE_100BASE_TX_FX_FULL 2 | ||
174 | #define PHY_MODE_100BASE_TX_FX_HALF 3 | ||
175 | #define PHY_MODE_100BASE_TX_HALF 4 | ||
176 | #define PHY_MODE_REPEATER 5 | ||
177 | #define PHY_MODE_POWER_DOWN 6 | ||
178 | #define PHY_MODE_ALL 7 | ||
179 | |||
180 | /* Bits */ | ||
181 | #define VECT_CNTL_ENABLE (1 << 5) | ||
182 | |||
183 | /******************************* | ||
184 | * GPIO and timer module * | ||
185 | *******************************/ | ||
186 | |||
187 | /* Registers */ | ||
188 | #define NETX_GPIO_REG(ofs) __io(NETX_VA_GPIO + (ofs)) | ||
189 | #define NETX_GPIO_CFG(gpio) NETX_GPIO_REG(0x0 + ((gpio)<<2)) | ||
190 | #define NETX_GPIO_THRESHOLD_CAPTURE(gpio) NETX_GPIO_REG(0x40 + ((gpio)<<2)) | ||
191 | #define NETX_GPIO_COUNTER_CTRL(counter) NETX_GPIO_REG(0x80 + ((counter)<<2)) | ||
192 | #define NETX_GPIO_COUNTER_MAX(counter) NETX_GPIO_REG(0x94 + ((counter)<<2)) | ||
193 | #define NETX_GPIO_COUNTER_CURRENT(counter) NETX_GPIO_REG(0xa8 + ((counter)<<2)) | ||
194 | #define NETX_GPIO_IRQ_ENABLE NETX_GPIO_REG(0xbc) | ||
195 | #define NETX_GPIO_IRQ_DISABLE NETX_GPIO_REG(0xc0) | ||
196 | #define NETX_GPIO_SYSTIME_NS_CMP NETX_GPIO_REG(0xc4) | ||
197 | #define NETX_GPIO_LINE NETX_GPIO_REG(0xc8) | ||
198 | #define NETX_GPIO_IRQ NETX_GPIO_REG(0xd0) | ||
199 | |||
200 | /* Bits */ | ||
201 | #define NETX_GPIO_CFG_IOCFG_GP_INPUT (0x0) | ||
202 | #define NETX_GPIO_CFG_IOCFG_GP_OUTPUT (0x1) | ||
203 | #define NETX_GPIO_CFG_IOCFG_GP_UART (0x2) | ||
204 | #define NETX_GPIO_CFG_INV (1<<2) | ||
205 | #define NETX_GPIO_CFG_MODE_INPUT_READ (0<<3) | ||
206 | #define NETX_GPIO_CFG_MODE_INPUT_CAPTURE_CONT_RISING (1<<3) | ||
207 | #define NETX_GPIO_CFG_MODE_INPUT_CAPTURE_ONCE_RISING (2<<3) | ||
208 | #define NETX_GPIO_CFG_MODE_INPUT_CAPTURE_HIGH_LEVEL (3<<3) | ||
209 | #define NETX_GPIO_CFG_COUNT_REF_COUNTER0 (0<<5) | ||
210 | #define NETX_GPIO_CFG_COUNT_REF_COUNTER1 (1<<5) | ||
211 | #define NETX_GPIO_CFG_COUNT_REF_COUNTER2 (2<<5) | ||
212 | #define NETX_GPIO_CFG_COUNT_REF_COUNTER3 (3<<5) | ||
213 | #define NETX_GPIO_CFG_COUNT_REF_COUNTER4 (4<<5) | ||
214 | #define NETX_GPIO_CFG_COUNT_REF_SYSTIME (7<<5) | ||
215 | |||
216 | #define NETX_GPIO_COUNTER_CTRL_RUN (1<<0) | ||
217 | #define NETX_GPIO_COUNTER_CTRL_SYM (1<<1) | ||
218 | #define NETX_GPIO_COUNTER_CTRL_ONCE (1<<2) | ||
219 | #define NETX_GPIO_COUNTER_CTRL_IRQ_EN (1<<3) | ||
220 | #define NETX_GPIO_COUNTER_CTRL_CNT_EVENT (1<<4) | ||
221 | #define NETX_GPIO_COUNTER_CTRL_RST_EN (1<<5) | ||
222 | #define NETX_GPIO_COUNTER_CTRL_SEL_EVENT (1<<6) | ||
223 | #define NETX_GPIO_COUNTER_CTRL_GPIO_REF /* FIXME */ | ||
224 | |||
225 | #define GPIO_BIT(gpio) (1<<(gpio)) | ||
226 | #define COUNTER_BIT(counter) ((1<<16)<<(counter)) | ||
227 | |||
228 | /******************************* | ||
229 | * PIO * | ||
230 | *******************************/ | ||
231 | |||
232 | /* Registers */ | ||
233 | #define NETX_PIO_REG(ofs) __io(NETX_VA_PIO + (ofs)) | ||
234 | #define NETX_PIO_INPIO NETX_PIO_REG(0x0) | ||
235 | #define NETX_PIO_OUTPIO NETX_PIO_REG(0x4) | ||
236 | #define NETX_PIO_OEPIO NETX_PIO_REG(0x8) | ||
237 | |||
238 | /******************************* | ||
239 | * MII Unit * | ||
240 | *******************************/ | ||
241 | |||
242 | /* Registers */ | ||
243 | #define NETX_MIIMU __io(NETX_VA_MIIMU) | ||
244 | |||
245 | /* Bits */ | ||
246 | #define MIIMU_SNRDY (1<<0) | ||
247 | #define MIIMU_PREAMBLE (1<<1) | ||
248 | #define MIIMU_OPMODE_WRITE (1<<2) | ||
249 | #define MIIMU_MDC_PERIOD (1<<3) | ||
250 | #define MIIMU_PHY_NRES (1<<4) | ||
251 | #define MIIMU_RTA (1<<5) | ||
252 | #define MIIMU_REGADDR(adr) (((adr) & 0x1f) << 6) | ||
253 | #define MIIMU_PHYADDR(adr) (((adr) & 0x1f) << 11) | ||
254 | #define MIIMU_DATA(data) (((data) & 0xffff) << 16) | ||
255 | |||
256 | /******************************* | ||
257 | * xmac / xpec * | ||
258 | *******************************/ | ||
259 | |||
260 | /* XPEC register offsets relative to NETX_VA_XPEC(no) */ | ||
261 | #define NETX_XPEC_R0_OFS 0x00 | ||
262 | #define NETX_XPEC_R1_OFS 0x04 | ||
263 | #define NETX_XPEC_R2_OFS 0x08 | ||
264 | #define NETX_XPEC_R3_OFS 0x0c | ||
265 | #define NETX_XPEC_R4_OFS 0x10 | ||
266 | #define NETX_XPEC_R5_OFS 0x14 | ||
267 | #define NETX_XPEC_R6_OFS 0x18 | ||
268 | #define NETX_XPEC_R7_OFS 0x1c | ||
269 | #define NETX_XPEC_RANGE01_OFS 0x20 | ||
270 | #define NETX_XPEC_RANGE23_OFS 0x24 | ||
271 | #define NETX_XPEC_RANGE45_OFS 0x28 | ||
272 | #define NETX_XPEC_RANGE67_OFS 0x2c | ||
273 | #define NETX_XPEC_PC_OFS 0x48 | ||
274 | #define NETX_XPEC_TIMER_OFS(timer) (0x30 + ((timer)<<2)) | ||
275 | #define NETX_XPEC_IRQ_OFS 0x8c | ||
276 | #define NETX_XPEC_SYSTIME_NS_OFS 0x90 | ||
277 | #define NETX_XPEC_FIFO_DATA_OFS 0x94 | ||
278 | #define NETX_XPEC_SYSTIME_S_OFS 0x98 | ||
279 | #define NETX_XPEC_ADC_OFS 0x9c | ||
280 | #define NETX_XPEC_URX_COUNT_OFS 0x40 | ||
281 | #define NETX_XPEC_UTX_COUNT_OFS 0x44 | ||
282 | #define NETX_XPEC_PC_OFS 0x48 | ||
283 | #define NETX_XPEC_ZERO_OFS 0x4c | ||
284 | #define NETX_XPEC_STATCFG_OFS 0x50 | ||
285 | #define NETX_XPEC_EC_MASKA_OFS 0x54 | ||
286 | #define NETX_XPEC_EC_MASKB_OFS 0x58 | ||
287 | #define NETX_XPEC_EC_MASK0_OFS 0x5c | ||
288 | #define NETX_XPEC_EC_MASK8_OFS 0x7c | ||
289 | #define NETX_XPEC_EC_MASK9_OFS 0x80 | ||
290 | #define NETX_XPEC_XPU_HOLD_PC_OFS 0x100 | ||
291 | #define NETX_XPEC_RAM_START_OFS 0x2000 | ||
292 | |||
293 | /* Bits */ | ||
294 | #define XPU_HOLD_PC (1<<0) | ||
295 | |||
296 | /* XMAC register offsets relative to NETX_VA_XMAC(no) */ | ||
297 | #define NETX_XMAC_RPU_PROGRAM_START_OFS 0x000 | ||
298 | #define NETX_XMAC_RPU_PROGRAM_END_OFS 0x3ff | ||
299 | #define NETX_XMAC_TPU_PROGRAM_START_OFS 0x400 | ||
300 | #define NETX_XMAC_TPU_PROGRAM_END_OFS 0x7ff | ||
301 | #define NETX_XMAC_RPU_HOLD_PC_OFS 0xa00 | ||
302 | #define NETX_XMAC_TPU_HOLD_PC_OFS 0xa04 | ||
303 | #define NETX_XMAC_STATUS_SHARED0_OFS 0x840 | ||
304 | #define NETX_XMAC_CONFIG_SHARED0_OFS 0x844 | ||
305 | #define NETX_XMAC_STATUS_SHARED1_OFS 0x848 | ||
306 | #define NETX_XMAC_CONFIG_SHARED1_OFS 0x84c | ||
307 | #define NETX_XMAC_STATUS_SHARED2_OFS 0x850 | ||
308 | #define NETX_XMAC_CONFIG_SHARED2_OFS 0x854 | ||
309 | #define NETX_XMAC_STATUS_SHARED3_OFS 0x858 | ||
310 | #define NETX_XMAC_CONFIG_SHARED3_OFS 0x85c | ||
311 | |||
312 | #define RPU_HOLD_PC (1<<15) | ||
313 | #define TPU_HOLD_PC (1<<15) | ||
314 | |||
315 | /******************************* | ||
316 | * Pointer FIFO * | ||
317 | *******************************/ | ||
318 | |||
319 | /* Registers */ | ||
320 | #define NETX_PFIFO_REG(ofs) __io(NETX_VA_PFIFO + (ofs)) | ||
321 | #define NETX_PFIFO_BASE(pfifo) NETX_PFIFO_REG(0x00 + ((pfifo)<<2)) | ||
322 | #define NETX_PFIFO_BORDER_BASE(pfifo) NETX_PFIFO_REG(0x80 + ((pfifo)<<2)) | ||
323 | #define NETX_PFIFO_RESET NETX_PFIFO_REG(0x100) | ||
324 | #define NETX_PFIFO_FULL NETX_PFIFO_REG(0x104) | ||
325 | #define NETX_PFIFO_EMPTY NETX_PFIFO_REG(0x108) | ||
326 | #define NETX_PFIFO_OVEFLOW NETX_PFIFO_REG(0x10c) | ||
327 | #define NETX_PFIFO_UNDERRUN NETX_PFIFO_REG(0x110) | ||
328 | #define NETX_PFIFO_FILL_LEVEL(pfifo) NETX_PFIFO_REG(0x180 + ((pfifo)<<2)) | ||
329 | #define NETX_PFIFO_XPEC_ISR(xpec) NETX_PFIFO_REG(0x400 + ((xpec) << 2)) | ||
330 | |||
331 | /******************************* | ||
332 | * Dual Port Memory * | ||
333 | *******************************/ | ||
334 | |||
335 | /* Registers */ | ||
336 | #define NETX_DPMAS_REG(ofs) __io(NETX_VA_DPMAS + (ofs)) | ||
337 | #define NETX_DPMAS_SYS_STAT NETX_DPMAS_REG(0x4d8) | ||
338 | #define NETX_DPMAS_INT_STAT NETX_DPMAS_REG(0x4e0) | ||
339 | #define NETX_DPMAS_INT_EN NETX_DPMAS_REG(0x4f0) | ||
340 | #define NETX_DPMAS_IF_CONF0 NETX_DPMAS_REG(0x608) | ||
341 | #define NETX_DPMAS_IF_CONF1 NETX_DPMAS_REG(0x60c) | ||
342 | #define NETX_DPMAS_EXT_CONFIG(cs) NETX_DPMAS_REG(0x610 + 4 * (cs)) | ||
343 | #define NETX_DPMAS_IO_MODE0 NETX_DPMAS_REG(0x620) /* I/O 32..63 */ | ||
344 | #define NETX_DPMAS_DRV_EN0 NETX_DPMAS_REG(0x624) | ||
345 | #define NETX_DPMAS_DATA0 NETX_DPMAS_REG(0x628) | ||
346 | #define NETX_DPMAS_IO_MODE1 NETX_DPMAS_REG(0x630) /* I/O 64..84 */ | ||
347 | #define NETX_DPMAS_DRV_EN1 NETX_DPMAS_REG(0x634) | ||
348 | #define NETX_DPMAS_DATA1 NETX_DPMAS_REG(0x638) | ||
349 | |||
350 | /* Bits */ | ||
351 | #define NETX_DPMAS_INT_EN_GLB_EN (1<<31) | ||
352 | #define NETX_DPMAS_INT_EN_MEM_LCK (1<<30) | ||
353 | #define NETX_DPMAS_INT_EN_WDG (1<<29) | ||
354 | #define NETX_DPMAS_INT_EN_PIO72 (1<<28) | ||
355 | #define NETX_DPMAS_INT_EN_PIO47 (1<<27) | ||
356 | #define NETX_DPMAS_INT_EN_PIO40 (1<<26) | ||
357 | #define NETX_DPMAS_INT_EN_PIO36 (1<<25) | ||
358 | #define NETX_DPMAS_INT_EN_PIO35 (1<<24) | ||
359 | |||
360 | #define NETX_DPMAS_IF_CONF0_HIF_DISABLED (0<<28) | ||
361 | #define NETX_DPMAS_IF_CONF0_HIF_EXT_BUS (1<<28) | ||
362 | #define NETX_DPMAS_IF_CONF0_HIF_UP_8BIT (2<<28) | ||
363 | #define NETX_DPMAS_IF_CONF0_HIF_UP_16BIT (3<<28) | ||
364 | #define NETX_DPMAS_IF_CONF0_HIF_IO (4<<28) | ||
365 | #define NETX_DPMAS_IF_CONF0_WAIT_DRV_PP (1<<14) | ||
366 | #define NETX_DPMAS_IF_CONF0_WAIT_DRV_OD (2<<14) | ||
367 | #define NETX_DPMAS_IF_CONF0_WAIT_DRV_TRI (3<<14) | ||
368 | |||
369 | #define NETX_DPMAS_IF_CONF1_IRQ_POL_PIO35 (1<<26) | ||
370 | #define NETX_DPMAS_IF_CONF1_IRQ_POL_PIO36 (1<<27) | ||
371 | #define NETX_DPMAS_IF_CONF1_IRQ_POL_PIO40 (1<<28) | ||
372 | #define NETX_DPMAS_IF_CONF1_IRQ_POL_PIO47 (1<<29) | ||
373 | #define NETX_DPMAS_IF_CONF1_IRQ_POL_PIO72 (1<<30) | ||
374 | |||
375 | #define NETX_EXT_CONFIG_TALEWIDTH(x) (((x) & 0x7) << 29) | ||
376 | #define NETX_EXT_CONFIG_TADRHOLD(x) (((x) & 0x7) << 26) | ||
377 | #define NETX_EXT_CONFIG_TCSON(x) (((x) & 0x7) << 23) | ||
378 | #define NETX_EXT_CONFIG_TRDON(x) (((x) & 0x7) << 20) | ||
379 | #define NETX_EXT_CONFIG_TWRON(x) (((x) & 0x7) << 17) | ||
380 | #define NETX_EXT_CONFIG_TWROFF(x) (((x) & 0x1f) << 12) | ||
381 | #define NETX_EXT_CONFIG_TRDWRCYC(x) (((x) & 0x1f) << 7) | ||
382 | #define NETX_EXT_CONFIG_WAIT_POL (1<<6) | ||
383 | #define NETX_EXT_CONFIG_WAIT_EN (1<<5) | ||
384 | #define NETX_EXT_CONFIG_NRD_MODE (1<<4) | ||
385 | #define NETX_EXT_CONFIG_DS_MODE (1<<3) | ||
386 | #define NETX_EXT_CONFIG_NWR_MODE (1<<2) | ||
387 | #define NETX_EXT_CONFIG_16BIT (1<<1) | ||
388 | #define NETX_EXT_CONFIG_CS_ENABLE (1<<0) | ||
389 | |||
390 | #define NETX_DPMAS_IO_MODE0_WRL (1<<13) | ||
391 | #define NETX_DPMAS_IO_MODE0_WAIT (1<<14) | ||
392 | #define NETX_DPMAS_IO_MODE0_READY (1<<15) | ||
393 | #define NETX_DPMAS_IO_MODE0_CS0 (1<<19) | ||
394 | #define NETX_DPMAS_IO_MODE0_EXTRD (1<<20) | ||
395 | |||
396 | #define NETX_DPMAS_IO_MODE1_CS2 (1<<15) | ||
397 | #define NETX_DPMAS_IO_MODE1_CS1 (1<<16) | ||
398 | #define NETX_DPMAS_IO_MODE1_SAMPLE_NPOR (0<<30) | ||
399 | #define NETX_DPMAS_IO_MODE1_SAMPLE_100MHZ (1<<30) | ||
400 | #define NETX_DPMAS_IO_MODE1_SAMPLE_NPIO36 (2<<30) | ||
401 | #define NETX_DPMAS_IO_MODE1_SAMPLE_PIO36 (3<<30) | ||
402 | |||
403 | /******************************* | ||
404 | * I2C * | ||
405 | *******************************/ | ||
406 | #define NETX_I2C_REG(ofs) __io(NETX_VA_I2C, (ofs)) | ||
407 | #define NETX_I2C_CTRL NETX_I2C_REG(0x0) | ||
408 | #define NETX_I2C_DATA NETX_I2C_REG(0x4) | ||
409 | |||
410 | #endif /* __ASM_ARCH_NETX_REGS_H */ | ||
diff --git a/include/asm-arm/arch-netx/param.h b/include/asm-arm/arch-netx/param.h new file mode 100644 index 000000000000..7a80c26178a8 --- /dev/null +++ b/include/asm-arm/arch-netx/param.h | |||
@@ -0,0 +1,18 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-netx/param.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
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 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
diff --git a/include/asm-arm/arch-netx/pfifo.h b/include/asm-arm/arch-netx/pfifo.h new file mode 100644 index 000000000000..4af2ee4a32c1 --- /dev/null +++ b/include/asm-arm/arch-netx/pfifo.h | |||
@@ -0,0 +1,54 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-netx/pfifo.h | ||
3 | * | ||
4 | * Copyright (c) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
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 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | |||
21 | #ifndef ASM_ARCH_PFIFO_H | ||
22 | #define ASM_ARCH_PFIFO_H | ||
23 | |||
24 | static inline int pfifo_push(int no, unsigned int pointer) | ||
25 | { | ||
26 | writel(pointer, NETX_PFIFO_BASE(no)); | ||
27 | return 0; | ||
28 | } | ||
29 | |||
30 | static inline unsigned int pfifo_pop(int no) | ||
31 | { | ||
32 | return readl(NETX_PFIFO_BASE(no)); | ||
33 | } | ||
34 | |||
35 | static inline int pfifo_fill_level(int no) | ||
36 | { | ||
37 | |||
38 | return readl(NETX_PFIFO_FILL_LEVEL(no)); | ||
39 | } | ||
40 | |||
41 | static inline int pfifo_full(int no) | ||
42 | { | ||
43 | return readl(NETX_PFIFO_FULL) & (1<<no) ? 1 : 0; | ||
44 | } | ||
45 | |||
46 | static inline int pfifo_empty(int no) | ||
47 | { | ||
48 | return readl(NETX_PFIFO_EMPTY) & (1<<no) ? 1 : 0; | ||
49 | } | ||
50 | |||
51 | int pfifo_request(unsigned int pfifo_mask); | ||
52 | void pfifo_free(unsigned int pfifo_mask); | ||
53 | |||
54 | #endif /* ASM_ARCH_PFIFO_H */ | ||
diff --git a/include/asm-arm/arch-netx/system.h b/include/asm-arm/arch-netx/system.h new file mode 100644 index 000000000000..52adf368d765 --- /dev/null +++ b/include/asm-arm/arch-netx/system.h | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-netx/system.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
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 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | #ifndef __ASM_ARCH_SYSTEM_H | ||
20 | #define __ASM_ARCH_SYSTEM_H | ||
21 | |||
22 | #include <asm/io.h> | ||
23 | #include <asm/hardware.h> | ||
24 | #include "netx-regs.h" | ||
25 | |||
26 | static inline void arch_idle(void) | ||
27 | { | ||
28 | cpu_do_idle(); | ||
29 | } | ||
30 | |||
31 | static inline void arch_reset(char mode) | ||
32 | { | ||
33 | writel(NETX_SYSTEM_RES_CR_FIRMW_RES_EN | NETX_SYSTEM_RES_CR_FIRMW_RES, | ||
34 | NETX_SYSTEM_RES_CR); | ||
35 | } | ||
36 | |||
37 | #endif | ||
38 | |||
diff --git a/include/asm-arm/arch-netx/timex.h b/include/asm-arm/arch-netx/timex.h new file mode 100644 index 000000000000..7fdb42da0b40 --- /dev/null +++ b/include/asm-arm/arch-netx/timex.h | |||
@@ -0,0 +1,20 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-netx/timex.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
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 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | #define CLOCK_TICK_RATE 100000000 | ||
diff --git a/include/asm-arm/arch-netx/uncompress.h b/include/asm-arm/arch-netx/uncompress.h new file mode 100644 index 000000000000..f89434547102 --- /dev/null +++ b/include/asm-arm/arch-netx/uncompress.h | |||
@@ -0,0 +1,76 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-netx/uncompress.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
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 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | /* | ||
21 | * The following code assumes the serial port has already been | ||
22 | * initialized by the bootloader. We search for the first enabled | ||
23 | * port in the most probable order. If you didn't setup a port in | ||
24 | * your bootloader then nothing will appear (which might be desired). | ||
25 | * | ||
26 | * This does not append a newline | ||
27 | */ | ||
28 | |||
29 | #define REG(x) (*(volatile unsigned long *)(x)) | ||
30 | |||
31 | #define UART1_BASE 0x100a00 | ||
32 | #define UART2_BASE 0x100a80 | ||
33 | |||
34 | #define UART_DR 0x0 | ||
35 | |||
36 | #define UART_CR 0x14 | ||
37 | #define CR_UART_EN (1<<0) | ||
38 | |||
39 | #define UART_FR 0x18 | ||
40 | #define FR_BUSY (1<<3) | ||
41 | #define FR_TXFF (1<<5) | ||
42 | |||
43 | static void putc(char c) | ||
44 | { | ||
45 | unsigned long base; | ||
46 | |||
47 | if (REG(UART1_BASE + UART_CR) & CR_UART_EN) | ||
48 | base = UART1_BASE; | ||
49 | else if (REG(UART2_BASE + UART_CR) & CR_UART_EN) | ||
50 | base = UART2_BASE; | ||
51 | else | ||
52 | return; | ||
53 | |||
54 | while (REG(base + UART_FR) & FR_TXFF); | ||
55 | REG(base + UART_DR) = c; | ||
56 | } | ||
57 | |||
58 | static inline void flush(void) | ||
59 | { | ||
60 | unsigned long base; | ||
61 | |||
62 | if (REG(UART1_BASE + UART_CR) & CR_UART_EN) | ||
63 | base = UART1_BASE; | ||
64 | else if (REG(UART2_BASE + UART_CR) & CR_UART_EN) | ||
65 | base = UART2_BASE; | ||
66 | else | ||
67 | return; | ||
68 | |||
69 | while (REG(base + UART_FR) & FR_BUSY); | ||
70 | } | ||
71 | |||
72 | /* | ||
73 | * nothing to do | ||
74 | */ | ||
75 | #define arch_decomp_setup() | ||
76 | #define arch_decomp_wdog() | ||
diff --git a/include/asm-arm/arch-netx/vmalloc.h b/include/asm-arm/arch-netx/vmalloc.h new file mode 100644 index 000000000000..da2da5a595da --- /dev/null +++ b/include/asm-arm/arch-netx/vmalloc.h | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-netx/vmalloc.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
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 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | #define VMALLOC_END (PAGE_OFFSET + 0x10000000) | ||
diff --git a/include/asm-arm/arch-netx/xc.h b/include/asm-arm/arch-netx/xc.h new file mode 100644 index 000000000000..659af19512a9 --- /dev/null +++ b/include/asm-arm/arch-netx/xc.h | |||
@@ -0,0 +1,42 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-netx/xc.h | ||
3 | * | ||
4 | * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix | ||
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 | ||
8 | * as published by the Free Software Foundation. | ||
9 | * | ||
10 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | ||
19 | |||
20 | #ifndef __ASM_ARCH_XC_H | ||
21 | #define __ASM_ARCH_XC_H | ||
22 | |||
23 | struct xc { | ||
24 | int no; | ||
25 | unsigned int type; | ||
26 | unsigned int version; | ||
27 | void __iomem *xpec_base; | ||
28 | void __iomem *xmac_base; | ||
29 | void __iomem *sram_base; | ||
30 | int irq; | ||
31 | struct device *dev; | ||
32 | }; | ||
33 | |||
34 | int xc_reset(struct xc *x); | ||
35 | int xc_stop(struct xc* x); | ||
36 | int xc_start(struct xc *x); | ||
37 | int xc_running(struct xc *x); | ||
38 | int xc_request_firmware(struct xc* x); | ||
39 | struct xc* request_xc(int xcno, struct device *dev); | ||
40 | void free_xc(struct xc *x); | ||
41 | |||
42 | #endif /* __ASM_ARCH_XC_H */ | ||
diff --git a/include/asm-arm/arch-omap/board.h b/include/asm-arm/arch-omap/board.h index 6d6240a4681c..dfdbf06fd646 100644 --- a/include/asm-arm/arch-omap/board.h +++ b/include/asm-arm/arch-omap/board.h | |||
@@ -10,7 +10,6 @@ | |||
10 | #ifndef _OMAP_BOARD_H | 10 | #ifndef _OMAP_BOARD_H |
11 | #define _OMAP_BOARD_H | 11 | #define _OMAP_BOARD_H |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/types.h> | 13 | #include <linux/types.h> |
15 | 14 | ||
16 | /* Different peripheral ids */ | 15 | /* Different peripheral ids */ |
diff --git a/include/asm-arm/arch-omap/hardware.h b/include/asm-arm/arch-omap/hardware.h index 7909b729826c..c7d9e857795d 100644 --- a/include/asm-arm/arch-omap/hardware.h +++ b/include/asm-arm/arch-omap/hardware.h | |||
@@ -37,7 +37,6 @@ | |||
37 | #define __ASM_ARCH_OMAP_HARDWARE_H | 37 | #define __ASM_ARCH_OMAP_HARDWARE_H |
38 | 38 | ||
39 | #include <asm/sizes.h> | 39 | #include <asm/sizes.h> |
40 | #include <linux/config.h> | ||
41 | #ifndef __ASSEMBLER__ | 40 | #ifndef __ASSEMBLER__ |
42 | #include <asm/types.h> | 41 | #include <asm/types.h> |
43 | #include <asm/arch/cpu.h> | 42 | #include <asm/arch/cpu.h> |
diff --git a/include/asm-arm/arch-omap/io.h b/include/asm-arm/arch-omap/io.h index b726acfcab14..78f68e6a4f0c 100644 --- a/include/asm-arm/arch-omap/io.h +++ b/include/asm-arm/arch-omap/io.h | |||
@@ -44,7 +44,6 @@ | |||
44 | */ | 44 | */ |
45 | #define __io(a) ((void __iomem *)(PCIO_BASE + (a))) | 45 | #define __io(a) ((void __iomem *)(PCIO_BASE + (a))) |
46 | #define __mem_pci(a) (a) | 46 | #define __mem_pci(a) (a) |
47 | #define __mem_isa(a) (a) | ||
48 | 47 | ||
49 | /* | 48 | /* |
50 | * ---------------------------------------------------------------------------- | 49 | * ---------------------------------------------------------------------------- |
diff --git a/include/asm-arm/arch-omap/system.h b/include/asm-arm/arch-omap/system.h index 67970d1a2020..ac2bfa433f06 100644 --- a/include/asm-arm/arch-omap/system.h +++ b/include/asm-arm/arch-omap/system.h | |||
@@ -4,7 +4,6 @@ | |||
4 | */ | 4 | */ |
5 | #ifndef __ASM_ARCH_SYSTEM_H | 5 | #ifndef __ASM_ARCH_SYSTEM_H |
6 | #define __ASM_ARCH_SYSTEM_H | 6 | #define __ASM_ARCH_SYSTEM_H |
7 | #include <linux/config.h> | ||
8 | #include <linux/clk.h> | 7 | #include <linux/clk.h> |
9 | 8 | ||
10 | #include <asm/mach-types.h> | 9 | #include <asm/mach-types.h> |
diff --git a/include/asm-arm/arch-omap/uncompress.h b/include/asm-arm/arch-omap/uncompress.h index ca2c8bec82e7..aca0adfef1b8 100644 --- a/include/asm-arm/arch-omap/uncompress.h +++ b/include/asm-arm/arch-omap/uncompress.h | |||
@@ -17,7 +17,6 @@ | |||
17 | * kind, whether express or implied. | 17 | * kind, whether express or implied. |
18 | */ | 18 | */ |
19 | 19 | ||
20 | #include <linux/config.h> | ||
21 | #include <linux/types.h> | 20 | #include <linux/types.h> |
22 | #include <linux/serial_reg.h> | 21 | #include <linux/serial_reg.h> |
23 | #include <asm/arch/serial.h> | 22 | #include <asm/arch/serial.h> |
diff --git a/include/asm-arm/arch-pnx4008/clock.h b/include/asm-arm/arch-pnx4008/clock.h new file mode 100644 index 000000000000..91ae0030fdf2 --- /dev/null +++ b/include/asm-arm/arch-pnx4008/clock.h | |||
@@ -0,0 +1,61 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-pnx4008/clock.h | ||
3 | * | ||
4 | * Clock control driver for PNX4008 - header file | ||
5 | * | ||
6 | * Authors: Vitaly Wool, Dmitry Chigirev <source@mvista.com> | ||
7 | * | ||
8 | * 2005 (c) MontaVista Software, Inc. This file is licensed under | ||
9 | * the terms of the GNU General Public License version 2. This program | ||
10 | * is licensed "as is" without any warranty of any kind, whether express | ||
11 | * or implied. | ||
12 | */ | ||
13 | #ifndef __PNX4008_CLOCK_H__ | ||
14 | #define __PNX4008_CLOCK_H__ | ||
15 | |||
16 | struct module; | ||
17 | struct clk; | ||
18 | |||
19 | #define PWRMAN_VA_BASE IO_ADDRESS(PNX4008_PWRMAN_BASE) | ||
20 | #define HCLKDIVCTRL_REG (PWRMAN_VA_BASE + 0x40) | ||
21 | #define PWRCTRL_REG (PWRMAN_VA_BASE + 0x44) | ||
22 | #define PLLCTRL_REG (PWRMAN_VA_BASE + 0x48) | ||
23 | #define OSC13CTRL_REG (PWRMAN_VA_BASE + 0x4c) | ||
24 | #define SYSCLKCTRL_REG (PWRMAN_VA_BASE + 0x50) | ||
25 | #define HCLKPLLCTRL_REG (PWRMAN_VA_BASE + 0x58) | ||
26 | #define USBCTRL_REG (PWRMAN_VA_BASE + 0x64) | ||
27 | #define SDRAMCLKCTRL_REG (PWRMAN_VA_BASE + 0x68) | ||
28 | #define MSCTRL_REG (PWRMAN_VA_BASE + 0x80) | ||
29 | #define BTCLKCTRL (PWRMAN_VA_BASE + 0x84) | ||
30 | #define DUMCLKCTRL_REG (PWRMAN_VA_BASE + 0x90) | ||
31 | #define I2CCLKCTRL_REG (PWRMAN_VA_BASE + 0xac) | ||
32 | #define KEYCLKCTRL_REG (PWRMAN_VA_BASE + 0xb0) | ||
33 | #define TSCLKCTRL_REG (PWRMAN_VA_BASE + 0xb4) | ||
34 | #define PWMCLKCTRL_REG (PWRMAN_VA_BASE + 0xb8) | ||
35 | #define SPICTRL_REG (PWRMAN_VA_BASE + 0xc4) | ||
36 | #define FLASHCLKCTRL_REG (PWRMAN_VA_BASE + 0xc8) | ||
37 | #define UART3CLK_REG (PWRMAN_VA_BASE + 0xd0) | ||
38 | #define UARTCLKCTRL_REG (PWRMAN_VA_BASE + 0xe4) | ||
39 | #define DMACLKCTRL_REG (PWRMAN_VA_BASE + 0xe8) | ||
40 | #define AUTOCLK_CTRL (PWRMAN_VA_BASE + 0xec) | ||
41 | #define JPEGCLKCTRL_REG (PWRMAN_VA_BASE + 0xfc) | ||
42 | |||
43 | #define AUDIOCONFIG_VA_BASE IO_ADDRESS(PNX4008_AUDIOCONFIG_BASE) | ||
44 | #define DSPPLLCTRL_REG (AUDIOCONFIG_VA_BASE + 0x60) | ||
45 | #define DSPCLKCTRL_REG (AUDIOCONFIG_VA_BASE + 0x64) | ||
46 | #define AUDIOCLKCTRL_REG (AUDIOCONFIG_VA_BASE + 0x68) | ||
47 | #define AUDIOPLLCTRL_REG (AUDIOCONFIG_VA_BASE + 0x6C) | ||
48 | |||
49 | #define USB_OTG_CLKCTRL_REG IO_ADDRESS(PNX4008_USB_CONFIG_BASE + 0xff4) | ||
50 | |||
51 | #define VFP9CLKCTRL_REG IO_ADDRESS(PNX4008_DEBUG_BASE) | ||
52 | |||
53 | #define CLK_RATE_13MHZ 13000 | ||
54 | #define CLK_RATE_1MHZ 1000 | ||
55 | #define CLK_RATE_208MHZ 208000 | ||
56 | #define CLK_RATE_48MHZ 48000 | ||
57 | #define CLK_RATE_32KHZ 32 | ||
58 | |||
59 | #define PNX4008_UART_CLK CLK_RATE_13MHZ * 1000 /* in MHz */ | ||
60 | |||
61 | #endif | ||
diff --git a/include/asm-arm/arch-pnx4008/debug-macro.S b/include/asm-arm/arch-pnx4008/debug-macro.S new file mode 100644 index 000000000000..67d18a203d23 --- /dev/null +++ b/include/asm-arm/arch-pnx4008/debug-macro.S | |||
@@ -0,0 +1,23 @@ | |||
1 | /* linux/include/asm-arm/arch-pnx4008/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 | |||
14 | .macro addruart,rx | ||
15 | mrc p15, 0, \rx, c1, c0 | ||
16 | tst \rx, #1 @ MMU enabled? | ||
17 | mov \rx, #0x00090000 | ||
18 | addeq \rx, \rx, #0x40000000 | ||
19 | addne \rx, \rx, #0xf4000000 | ||
20 | .endm | ||
21 | |||
22 | #define UART_SHIFT 2 | ||
23 | #include <asm/hardware/debug-8250.S> | ||
diff --git a/include/asm-arm/arch-pnx4008/dma.h b/include/asm-arm/arch-pnx4008/dma.h new file mode 100644 index 000000000000..3aee1204795b --- /dev/null +++ b/include/asm-arm/arch-pnx4008/dma.h | |||
@@ -0,0 +1,162 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-pnx4008/dma.h | ||
3 | * | ||
4 | * PNX4008 DMA header file | ||
5 | * | ||
6 | * Author: Vitaly Wool | ||
7 | * Copyright: MontaVista Software Inc. (c) 2005 | ||
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_DMA_H | ||
15 | #define __ASM_ARCH_DMA_H | ||
16 | |||
17 | #include "platform.h" | ||
18 | |||
19 | #define MAX_DMA_ADDRESS 0xffffffff | ||
20 | |||
21 | #define MAX_DMA_CHANNELS 8 | ||
22 | |||
23 | #define DMAC_BASE IO_ADDRESS(PNX4008_DMA_CONFIG_BASE) | ||
24 | #define DMAC_INT_STAT (DMAC_BASE + 0x0000) | ||
25 | #define DMAC_INT_TC_STAT (DMAC_BASE + 0x0004) | ||
26 | #define DMAC_INT_TC_CLEAR (DMAC_BASE + 0x0008) | ||
27 | #define DMAC_INT_ERR_STAT (DMAC_BASE + 0x000c) | ||
28 | #define DMAC_INT_ERR_CLEAR (DMAC_BASE + 0x0010) | ||
29 | #define DMAC_SOFT_SREQ (DMAC_BASE + 0x0024) | ||
30 | #define DMAC_CONFIG (DMAC_BASE + 0x0030) | ||
31 | #define DMAC_Cx_SRC_ADDR(c) (DMAC_BASE + 0x0100 + (c) * 0x20) | ||
32 | #define DMAC_Cx_DEST_ADDR(c) (DMAC_BASE + 0x0104 + (c) * 0x20) | ||
33 | #define DMAC_Cx_LLI(c) (DMAC_BASE + 0x0108 + (c) * 0x20) | ||
34 | #define DMAC_Cx_CONTROL(c) (DMAC_BASE + 0x010c + (c) * 0x20) | ||
35 | #define DMAC_Cx_CONFIG(c) (DMAC_BASE + 0x0110 + (c) * 0x20) | ||
36 | |||
37 | enum { | ||
38 | WIDTH_BYTE = 0, | ||
39 | WIDTH_HWORD, | ||
40 | WIDTH_WORD | ||
41 | }; | ||
42 | |||
43 | enum { | ||
44 | FC_MEM2MEM_DMA, | ||
45 | FC_MEM2PER_DMA, | ||
46 | FC_PER2MEM_DMA, | ||
47 | FC_PER2PER_DMA, | ||
48 | FC_PER2PER_DPER, | ||
49 | FC_MEM2PER_PER, | ||
50 | FC_PER2MEM_PER, | ||
51 | FC_PER2PER_SPER | ||
52 | }; | ||
53 | |||
54 | enum { | ||
55 | DMA_INT_UNKNOWN = 0, | ||
56 | DMA_ERR_INT = 1, | ||
57 | DMA_TC_INT = 2, | ||
58 | }; | ||
59 | |||
60 | enum { | ||
61 | DMA_BUFFER_ALLOCATED = 1, | ||
62 | DMA_HAS_LL = 2, | ||
63 | }; | ||
64 | |||
65 | enum { | ||
66 | PER_CAM_DMA_1 = 0, | ||
67 | PER_NDF_FLASH = 1, | ||
68 | PER_MBX_SLAVE_FIFO = 2, | ||
69 | PER_SPI2_REC_XMIT = 3, | ||
70 | PER_MS_SD_RX_XMIT = 4, | ||
71 | PER_HS_UART_1_XMIT = 5, | ||
72 | PER_HS_UART_1_RX = 6, | ||
73 | PER_HS_UART_2_XMIT = 7, | ||
74 | PER_HS_UART_2_RX = 8, | ||
75 | PER_HS_UART_7_XMIT = 9, | ||
76 | PER_HS_UART_7_RX = 10, | ||
77 | PER_SPI1_REC_XMIT = 11, | ||
78 | PER_MLC_NDF_SREC = 12, | ||
79 | PER_CAM_DMA_2 = 13, | ||
80 | PER_PRNG_INFIFO = 14, | ||
81 | PER_PRNG_OUTFIFO = 15, | ||
82 | }; | ||
83 | |||
84 | struct pnx4008_dma_ch_ctrl { | ||
85 | int tc_mask; | ||
86 | int cacheable; | ||
87 | int bufferable; | ||
88 | int priv_mode; | ||
89 | int di; | ||
90 | int si; | ||
91 | int dest_ahb1; | ||
92 | int src_ahb1; | ||
93 | int dwidth; | ||
94 | int swidth; | ||
95 | int dbsize; | ||
96 | int sbsize; | ||
97 | int tr_size; | ||
98 | }; | ||
99 | |||
100 | struct pnx4008_dma_ch_config { | ||
101 | int halt; | ||
102 | int active; | ||
103 | int lock; | ||
104 | int itc; | ||
105 | int ie; | ||
106 | int flow_cntrl; | ||
107 | int dest_per; | ||
108 | int src_per; | ||
109 | }; | ||
110 | |||
111 | struct pnx4008_dma_ll { | ||
112 | unsigned long src_addr; | ||
113 | unsigned long dest_addr; | ||
114 | u32 next_dma; | ||
115 | unsigned long ch_ctrl; | ||
116 | struct pnx4008_dma_ll *next; | ||
117 | int flags; | ||
118 | void *alloc_data; | ||
119 | int (*free) (void *); | ||
120 | }; | ||
121 | |||
122 | struct pnx4008_dma_config { | ||
123 | int is_ll; | ||
124 | unsigned long src_addr; | ||
125 | unsigned long dest_addr; | ||
126 | unsigned long ch_ctrl; | ||
127 | unsigned long ch_cfg; | ||
128 | struct pnx4008_dma_ll *ll; | ||
129 | u32 ll_dma; | ||
130 | int flags; | ||
131 | void *alloc_data; | ||
132 | int (*free) (void *); | ||
133 | }; | ||
134 | |||
135 | extern struct pnx4008_dma_ll *pnx4008_alloc_ll_entry(dma_addr_t *); | ||
136 | extern void pnx4008_free_ll_entry(struct pnx4008_dma_ll *, dma_addr_t); | ||
137 | extern void pnx4008_free_ll(u32 ll_dma, struct pnx4008_dma_ll *); | ||
138 | |||
139 | extern int pnx4008_request_channel(char *, int, | ||
140 | void (*)(int, int, void *, struct pt_regs *), | ||
141 | void *); | ||
142 | extern void pnx4008_free_channel(int); | ||
143 | extern int pnx4008_config_dma(int, int, int); | ||
144 | extern int pnx4008_dma_pack_control(const struct pnx4008_dma_ch_ctrl *, | ||
145 | unsigned long *); | ||
146 | extern int pnx4008_dma_parse_control(unsigned long, | ||
147 | struct pnx4008_dma_ch_ctrl *); | ||
148 | extern int pnx4008_dma_pack_config(const struct pnx4008_dma_ch_config *, | ||
149 | unsigned long *); | ||
150 | extern int pnx4008_dma_parse_config(unsigned long, | ||
151 | struct pnx4008_dma_ch_config *); | ||
152 | extern int pnx4008_config_channel(int, struct pnx4008_dma_config *); | ||
153 | extern int pnx4008_channel_get_config(int, struct pnx4008_dma_config *); | ||
154 | extern int pnx4008_dma_ch_enable(int); | ||
155 | extern int pnx4008_dma_ch_disable(int); | ||
156 | extern int pnx4008_dma_ch_enabled(int); | ||
157 | extern void pnx4008_dma_split_head_entry(struct pnx4008_dma_config *, | ||
158 | struct pnx4008_dma_ch_ctrl *); | ||
159 | extern void pnx4008_dma_split_ll_entry(struct pnx4008_dma_ll *, | ||
160 | struct pnx4008_dma_ch_ctrl *); | ||
161 | |||
162 | #endif /* _ASM_ARCH_DMA_H */ | ||
diff --git a/include/asm-arm/arch-pnx4008/entry-macro.S b/include/asm-arm/arch-pnx4008/entry-macro.S new file mode 100644 index 000000000000..c1c198e3680b --- /dev/null +++ b/include/asm-arm/arch-pnx4008/entry-macro.S | |||
@@ -0,0 +1,121 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-pnx4008/entry-macro.S | ||
3 | * | ||
4 | * Low-level IRQ helper macros for PNX4008-based platforms | ||
5 | * | ||
6 | * 2005-2006 (c) MontaVista Software, Inc. | ||
7 | * Author: Vitaly Wool <vwool@ru.mvista.com> | ||
8 | * This file is licensed under the terms of the GNU General Public | ||
9 | * License version 2. This program is licensed "as is" without any | ||
10 | * warranty of any kind, whether express or implied. | ||
11 | */ | ||
12 | |||
13 | #include "platform.h" | ||
14 | |||
15 | #define IO_BASE 0xF0000000 | ||
16 | #define IO_ADDRESS(x) (((((x) & 0xff000000) >> 4) | ((x) & 0xfffff)) | IO_BASE) | ||
17 | |||
18 | #define INTRC_MASK 0x00 | ||
19 | #define INTRC_RAW_STAT 0x04 | ||
20 | #define INTRC_STAT 0x08 | ||
21 | #define INTRC_POLAR 0x0C | ||
22 | #define INTRC_ACT_TYPE 0x10 | ||
23 | #define INTRC_TYPE 0x14 | ||
24 | |||
25 | #define SIC1_BASE_INT 32 | ||
26 | #define SIC2_BASE_INT 64 | ||
27 | |||
28 | .macro disable_fiq | ||
29 | .endm | ||
30 | |||
31 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | ||
32 | /* decode the MIC interrupt numbers */ | ||
33 | ldr \base, =IO_ADDRESS(PNX4008_INTCTRLMIC_BASE) | ||
34 | ldr \irqstat, [\base, #INTRC_STAT] | ||
35 | |||
36 | cmp \irqstat,#1<<16 | ||
37 | movhs \irqnr,#16 | ||
38 | movlo \irqnr,#0 | ||
39 | movhs \irqstat,\irqstat,lsr#16 | ||
40 | cmp \irqstat,#1<<8 | ||
41 | addhs \irqnr,\irqnr,#8 | ||
42 | movhs \irqstat,\irqstat,lsr#8 | ||
43 | cmp \irqstat,#1<<4 | ||
44 | addhs \irqnr,\irqnr,#4 | ||
45 | movhs \irqstat,\irqstat,lsr#4 | ||
46 | cmp \irqstat,#1<<2 | ||
47 | addhs \irqnr,\irqnr,#2 | ||
48 | movhs \irqstat,\irqstat,lsr#2 | ||
49 | cmp \irqstat,#1<<1 | ||
50 | addhs \irqnr,\irqnr,#1 | ||
51 | |||
52 | /* was there an interrupt ? if not then drop out with EQ status */ | ||
53 | teq \irqstat,#0 | ||
54 | beq 1003f | ||
55 | |||
56 | /* and now check for extended IRQ reasons */ | ||
57 | cmp \irqnr,#1 | ||
58 | bls 1003f | ||
59 | cmp \irqnr,#30 | ||
60 | blo 1002f | ||
61 | |||
62 | /* IRQ 31,30 : High priority cascade IRQ handle */ | ||
63 | /* read the correct SIC */ | ||
64 | /* decoding status after compare : eq is 30 (SIC1) , ne is 31 (SIC2) */ | ||
65 | /* set the base IRQ number */ | ||
66 | ldreq \base, =IO_ADDRESS(PNX4008_INTCTRLSIC1_BASE) | ||
67 | moveq \irqnr,#SIC1_BASE_INT | ||
68 | ldrne \base, =IO_ADDRESS(PNX4008_INTCTRLSIC2_BASE) | ||
69 | movne \irqnr,#SIC2_BASE_INT | ||
70 | ldr \irqstat, [\base, #INTRC_STAT] | ||
71 | ldr \tmp, [\base, #INTRC_TYPE] | ||
72 | /* and with inverted mask : low priority interrupts */ | ||
73 | and \irqstat,\irqstat,\tmp | ||
74 | b 1004f | ||
75 | |||
76 | 1003: | ||
77 | /* IRQ 1,0 : Low priority cascade IRQ handle */ | ||
78 | /* read the correct SIC */ | ||
79 | /* decoding status after compare : eq is 1 (SIC2) , ne is 0 (SIC1)*/ | ||
80 | /* read the correct SIC */ | ||
81 | /* set the base IRQ number */ | ||
82 | ldrne \base, =IO_ADDRESS(PNX4008_INTCTRLSIC1_BASE) | ||
83 | movne \irqnr,#SIC1_BASE_INT | ||
84 | ldreq \base, =IO_ADDRESS(PNX4008_INTCTRLSIC2_BASE) | ||
85 | moveq \irqnr,#SIC2_BASE_INT | ||
86 | ldr \irqstat, [\base, #INTRC_STAT] | ||
87 | ldr \tmp, [\base, #INTRC_TYPE] | ||
88 | /* and with inverted mask : low priority interrupts */ | ||
89 | bic \irqstat,\irqstat,\tmp | ||
90 | |||
91 | 1004: | ||
92 | |||
93 | cmp \irqstat,#1<<16 | ||
94 | addhs \irqnr,\irqnr,#16 | ||
95 | movhs \irqstat,\irqstat,lsr#16 | ||
96 | cmp \irqstat,#1<<8 | ||
97 | addhs \irqnr,\irqnr,#8 | ||
98 | movhs \irqstat,\irqstat,lsr#8 | ||
99 | cmp \irqstat,#1<<4 | ||
100 | addhs \irqnr,\irqnr,#4 | ||
101 | movhs \irqstat,\irqstat,lsr#4 | ||
102 | cmp \irqstat,#1<<2 | ||
103 | addhs \irqnr,\irqnr,#2 | ||
104 | movhs \irqstat,\irqstat,lsr#2 | ||
105 | cmp \irqstat,#1<<1 | ||
106 | addhs \irqnr,\irqnr,#1 | ||
107 | |||
108 | |||
109 | /* is irqstat not zero */ | ||
110 | |||
111 | 1002: | ||
112 | /* we assert that irqstat is not equal to zero and return ne status if true*/ | ||
113 | teq \irqstat,#0 | ||
114 | 1003: | ||
115 | .endm | ||
116 | |||
117 | |||
118 | .macro irq_prio_table | ||
119 | .endm | ||
120 | |||
121 | |||
diff --git a/include/asm-arm/arch-pnx4008/gpio.h b/include/asm-arm/arch-pnx4008/gpio.h new file mode 100644 index 000000000000..d01bf83d55c2 --- /dev/null +++ b/include/asm-arm/arch-pnx4008/gpio.h | |||
@@ -0,0 +1,241 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-pnx4008/gpio.h | ||
3 | * | ||
4 | * PNX4008 GPIO driver - header file | ||
5 | * | ||
6 | * Author: Dmitry Chigirev <source@mvista.com> | ||
7 | * | ||
8 | * Based on reference code by Iwo Mergler and Z.Tabaaloute from Philips: | ||
9 | * Copyright (c) 2005 Koninklijke Philips Electronics N.V. | ||
10 | * | ||
11 | * 2005 (c) MontaVista Software, Inc. This file is licensed under | ||
12 | * the terms of the GNU General Public License version 2. This program | ||
13 | * is licensed "as is" without any warranty of any kind, whether express | ||
14 | * or implied. | ||
15 | */ | ||
16 | |||
17 | #ifndef _PNX4008_GPIO_H_ | ||
18 | #define _PNX4008_GPIO_H_ | ||
19 | |||
20 | |||
21 | /* Block numbers */ | ||
22 | #define GPIO_IN (0) | ||
23 | #define GPIO_OUT (0x100) | ||
24 | #define GPIO_BID (0x200) | ||
25 | #define GPIO_RAM (0x300) | ||
26 | #define GPIO_MUX (0x400) | ||
27 | |||
28 | #define GPIO_TYPE_MASK(K) ((K) & 0x700) | ||
29 | |||
30 | /* INPUT GPIOs */ | ||
31 | /* GPI */ | ||
32 | #define GPI_00 (GPIO_IN | 0) | ||
33 | #define GPI_01 (GPIO_IN | 1) | ||
34 | #define GPI_02 (GPIO_IN | 2) | ||
35 | #define GPI_03 (GPIO_IN | 3) | ||
36 | #define GPI_04 (GPIO_IN | 4) | ||
37 | #define GPI_05 (GPIO_IN | 5) | ||
38 | #define GPI_06 (GPIO_IN | 6) | ||
39 | #define GPI_07 (GPIO_IN | 7) | ||
40 | #define GPI_08 (GPIO_IN | 8) | ||
41 | #define GPI_09 (GPIO_IN | 9) | ||
42 | #define U1_RX (GPIO_IN | 15) | ||
43 | #define U2_HTCS (GPIO_IN | 16) | ||
44 | #define U2_RX (GPIO_IN | 17) | ||
45 | #define U3_RX (GPIO_IN | 18) | ||
46 | #define U4_RX (GPIO_IN | 19) | ||
47 | #define U5_RX (GPIO_IN | 20) | ||
48 | #define U6_IRRX (GPIO_IN | 21) | ||
49 | #define U7_HCTS (GPIO_IN | 22) | ||
50 | #define U7_RX (GPIO_IN | 23) | ||
51 | /* MISC IN */ | ||
52 | #define SPI1_DATIN (GPIO_IN | 25) | ||
53 | #define DISP_SYNC (GPIO_IN | 26) | ||
54 | #define SPI2_DATIN (GPIO_IN | 27) | ||
55 | #define GPI_11 (GPIO_IN | 28) | ||
56 | |||
57 | #define GPIO_IN_MASK 0x1eff83ff | ||
58 | |||
59 | /* OUTPUT GPIOs */ | ||
60 | /* GPO */ | ||
61 | #define GPO_00 (GPIO_OUT | 0) | ||
62 | #define GPO_01 (GPIO_OUT | 1) | ||
63 | #define GPO_02 (GPIO_OUT | 2) | ||
64 | #define GPO_03 (GPIO_OUT | 3) | ||
65 | #define GPO_04 (GPIO_OUT | 4) | ||
66 | #define GPO_05 (GPIO_OUT | 5) | ||
67 | #define GPO_06 (GPIO_OUT | 6) | ||
68 | #define GPO_07 (GPIO_OUT | 7) | ||
69 | #define GPO_08 (GPIO_OUT | 8) | ||
70 | #define GPO_09 (GPIO_OUT | 9) | ||
71 | #define GPO_10 (GPIO_OUT | 10) | ||
72 | #define GPO_11 (GPIO_OUT | 11) | ||
73 | #define GPO_12 (GPIO_OUT | 12) | ||
74 | #define GPO_13 (GPIO_OUT | 13) | ||
75 | #define GPO_14 (GPIO_OUT | 14) | ||
76 | #define GPO_15 (GPIO_OUT | 15) | ||
77 | #define GPO_16 (GPIO_OUT | 16) | ||
78 | #define GPO_17 (GPIO_OUT | 17) | ||
79 | #define GPO_18 (GPIO_OUT | 18) | ||
80 | #define GPO_19 (GPIO_OUT | 19) | ||
81 | #define GPO_20 (GPIO_OUT | 20) | ||
82 | #define GPO_21 (GPIO_OUT | 21) | ||
83 | #define GPO_22 (GPIO_OUT | 22) | ||
84 | #define GPO_23 (GPIO_OUT | 23) | ||
85 | |||
86 | #define GPIO_OUT_MASK 0xffffff | ||
87 | |||
88 | /* BIDIRECTIONAL GPIOs */ | ||
89 | /* RAM pins */ | ||
90 | #define RAM_D19 (GPIO_RAM | 0) | ||
91 | #define RAM_D20 (GPIO_RAM | 1) | ||
92 | #define RAM_D21 (GPIO_RAM | 2) | ||
93 | #define RAM_D22 (GPIO_RAM | 3) | ||
94 | #define RAM_D23 (GPIO_RAM | 4) | ||
95 | #define RAM_D24 (GPIO_RAM | 5) | ||
96 | #define RAM_D25 (GPIO_RAM | 6) | ||
97 | #define RAM_D26 (GPIO_RAM | 7) | ||
98 | #define RAM_D27 (GPIO_RAM | 8) | ||
99 | #define RAM_D28 (GPIO_RAM | 9) | ||
100 | #define RAM_D29 (GPIO_RAM | 10) | ||
101 | #define RAM_D30 (GPIO_RAM | 11) | ||
102 | #define RAM_D31 (GPIO_RAM | 12) | ||
103 | |||
104 | #define GPIO_RAM_MASK 0x1fff | ||
105 | |||
106 | /* I/O pins */ | ||
107 | #define GPIO_00 (GPIO_BID | 25) | ||
108 | #define GPIO_01 (GPIO_BID | 26) | ||
109 | #define GPIO_02 (GPIO_BID | 27) | ||
110 | #define GPIO_03 (GPIO_BID | 28) | ||
111 | #define GPIO_04 (GPIO_BID | 29) | ||
112 | #define GPIO_05 (GPIO_BID | 30) | ||
113 | |||
114 | #define GPIO_BID_MASK 0x7e000000 | ||
115 | |||
116 | /* Non-GPIO multiplexed PIOs. For multiplexing with GPIO, please use GPIO macros */ | ||
117 | #define GPIO_SDRAM_SEL (GPIO_MUX | 3) | ||
118 | |||
119 | #define GPIO_MUX_MASK 0x8 | ||
120 | |||
121 | /* Extraction/assembly macros */ | ||
122 | #define GPIO_BIT_MASK(K) ((K) & 0x1F) | ||
123 | #define GPIO_BIT(K) (1 << GPIO_BIT_MASK(K)) | ||
124 | #define GPIO_ISMUX(K) ((GPIO_TYPE_MASK(K) == GPIO_MUX) && (GPIO_BIT(K) & GPIO_MUX_MASK)) | ||
125 | #define GPIO_ISRAM(K) ((GPIO_TYPE_MASK(K) == GPIO_RAM) && (GPIO_BIT(K) & GPIO_RAM_MASK)) | ||
126 | #define GPIO_ISBID(K) ((GPIO_TYPE_MASK(K) == GPIO_BID) && (GPIO_BIT(K) & GPIO_BID_MASK)) | ||
127 | #define GPIO_ISOUT(K) ((GPIO_TYPE_MASK(K) == GPIO_OUT) && (GPIO_BIT(K) & GPIO_OUT_MASK)) | ||
128 | #define GPIO_ISIN(K) ((GPIO_TYPE_MASK(K) == GPIO_IN) && (GPIO_BIT(K) & GPIO_IN_MASK)) | ||
129 | |||
130 | /* Start Enable Pin Interrupts - table 58 page 66 */ | ||
131 | |||
132 | #define SE_PIN_BASE_INT 32 | ||
133 | |||
134 | #define SE_U7_RX_INT 63 | ||
135 | #define SE_U7_HCTS_INT 62 | ||
136 | #define SE_BT_CLKREQ_INT 61 | ||
137 | #define SE_U6_IRRX_INT 60 | ||
138 | /*59 unused*/ | ||
139 | #define SE_U5_RX_INT 58 | ||
140 | #define SE_GPI_11_INT 57 | ||
141 | #define SE_U3_RX_INT 56 | ||
142 | #define SE_U2_HCTS_INT 55 | ||
143 | #define SE_U2_RX_INT 54 | ||
144 | #define SE_U1_RX_INT 53 | ||
145 | #define SE_DISP_SYNC_INT 52 | ||
146 | /*51 unused*/ | ||
147 | #define SE_SDIO_INT_N 50 | ||
148 | #define SE_MSDIO_START_INT 49 | ||
149 | #define SE_GPI_06_INT 48 | ||
150 | #define SE_GPI_05_INT 47 | ||
151 | #define SE_GPI_04_INT 46 | ||
152 | #define SE_GPI_03_INT 45 | ||
153 | #define SE_GPI_02_INT 44 | ||
154 | #define SE_GPI_01_INT 43 | ||
155 | #define SE_GPI_00_INT 42 | ||
156 | #define SE_SYSCLKEN_PIN_INT 41 | ||
157 | #define SE_SPI1_DATAIN_INT 40 | ||
158 | #define SE_GPI_07_INT 39 | ||
159 | #define SE_SPI2_DATAIN_INT 38 | ||
160 | #define SE_GPI_10_INT 37 | ||
161 | #define SE_GPI_09_INT 36 | ||
162 | #define SE_GPI_08_INT 35 | ||
163 | /*34-32 unused*/ | ||
164 | |||
165 | /* Start Enable Internal Interrupts - table 57 page 65 */ | ||
166 | |||
167 | #define SE_INT_BASE_INT 0 | ||
168 | |||
169 | #define SE_TS_IRQ 31 | ||
170 | #define SE_TS_P_INT 30 | ||
171 | #define SE_TS_AUX_INT 29 | ||
172 | /*27-28 unused*/ | ||
173 | #define SE_USB_AHB_NEED_CLK_INT 26 | ||
174 | #define SE_MSTIMER_INT 25 | ||
175 | #define SE_RTC_INT 24 | ||
176 | #define SE_USB_NEED_CLK_INT 23 | ||
177 | #define SE_USB_INT 22 | ||
178 | #define SE_USB_I2C_INT 21 | ||
179 | #define SE_USB_OTG_TIMER_INT 20 | ||
180 | #define SE_USB_OTG_ATX_INT_N 19 | ||
181 | /*18 unused*/ | ||
182 | #define SE_DSP_GPIO4_INT 17 | ||
183 | #define SE_KEY_IRQ 16 | ||
184 | #define SE_DSP_SLAVEPORT_INT 15 | ||
185 | #define SE_DSP_GPIO1_INT 14 | ||
186 | #define SE_DSP_GPIO0_INT 13 | ||
187 | #define SE_DSP_AHB_INT 12 | ||
188 | /*11-6 unused*/ | ||
189 | #define SE_GPIO_05_INT 5 | ||
190 | #define SE_GPIO_04_INT 4 | ||
191 | #define SE_GPIO_03_INT 3 | ||
192 | #define SE_GPIO_02_INT 2 | ||
193 | #define SE_GPIO_01_INT 1 | ||
194 | #define SE_GPIO_00_INT 0 | ||
195 | |||
196 | #define START_INT_REG_BIT(irq) (1<<((irq)&0x1F)) | ||
197 | |||
198 | #define START_INT_ER_REG(irq) IO_ADDRESS((PNX4008_PWRMAN_BASE + 0x20 + (((irq)&(0x1<<5))>>1))) | ||
199 | #define START_INT_RSR_REG(irq) IO_ADDRESS((PNX4008_PWRMAN_BASE + 0x24 + (((irq)&(0x1<<5))>>1))) | ||
200 | #define START_INT_SR_REG(irq) IO_ADDRESS((PNX4008_PWRMAN_BASE + 0x28 + (((irq)&(0x1<<5))>>1))) | ||
201 | #define START_INT_APR_REG(irq) IO_ADDRESS((PNX4008_PWRMAN_BASE + 0x2C + (((irq)&(0x1<<5))>>1))) | ||
202 | |||
203 | extern int pnx4008_gpio_register_pin(unsigned short pin); | ||
204 | extern int pnx4008_gpio_unregister_pin(unsigned short pin); | ||
205 | extern unsigned long pnx4008_gpio_read_pin(unsigned short pin); | ||
206 | extern int pnx4008_gpio_write_pin(unsigned short pin, int output); | ||
207 | extern int pnx4008_gpio_set_pin_direction(unsigned short pin, int output); | ||
208 | extern int pnx4008_gpio_read_pin_direction(unsigned short pin); | ||
209 | extern int pnx4008_gpio_set_pin_mux(unsigned short pin, int output); | ||
210 | extern int pnx4008_gpio_read_pin_mux(unsigned short pin); | ||
211 | |||
212 | static inline void start_int_umask(u8 irq) | ||
213 | { | ||
214 | __raw_writel(__raw_readl(START_INT_ER_REG(irq)) | | ||
215 | START_INT_REG_BIT(irq), START_INT_ER_REG(irq)); | ||
216 | } | ||
217 | |||
218 | static inline void start_int_mask(u8 irq) | ||
219 | { | ||
220 | __raw_writel(__raw_readl(START_INT_ER_REG(irq)) & | ||
221 | ~START_INT_REG_BIT(irq), START_INT_ER_REG(irq)); | ||
222 | } | ||
223 | |||
224 | static inline void start_int_ack(u8 irq) | ||
225 | { | ||
226 | __raw_writel(START_INT_REG_BIT(irq), START_INT_RSR_REG(irq)); | ||
227 | } | ||
228 | |||
229 | static inline void start_int_set_falling_edge(u8 irq) | ||
230 | { | ||
231 | __raw_writel(__raw_readl(START_INT_APR_REG(irq)) & | ||
232 | ~START_INT_REG_BIT(irq), START_INT_APR_REG(irq)); | ||
233 | } | ||
234 | |||
235 | static inline void start_int_set_rising_edge(u8 irq) | ||
236 | { | ||
237 | __raw_writel(__raw_readl(START_INT_APR_REG(irq)) | | ||
238 | START_INT_REG_BIT(irq), START_INT_APR_REG(irq)); | ||
239 | } | ||
240 | |||
241 | #endif /* _PNX4008_GPIO_H_ */ | ||
diff --git a/include/asm-arm/arch-pnx4008/hardware.h b/include/asm-arm/arch-pnx4008/hardware.h new file mode 100644 index 000000000000..a4410397a921 --- /dev/null +++ b/include/asm-arm/arch-pnx4008/hardware.h | |||
@@ -0,0 +1,32 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-pnx4008/hardware.h | ||
3 | * | ||
4 | * Copyright (c) 2005 MontaVista Software, Inc. <source@mvista.com> | ||
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 | #ifndef __ASM_ARCH_HARDWARE_H | ||
21 | #define __ASM_ARCH_HARDWARE_H | ||
22 | |||
23 | #include <asm/sizes.h> | ||
24 | #include <asm/arch/platform.h> | ||
25 | |||
26 | /* Start of virtual addresses for IO devices */ | ||
27 | #define IO_BASE 0xF0000000 | ||
28 | |||
29 | /* This macro relies on fact that for all HW i/o addresses bits 20-23 are 0 */ | ||
30 | #define IO_ADDRESS(x) (((((x) & 0xff000000) >> 4) | ((x) & 0xfffff)) | IO_BASE) | ||
31 | |||
32 | #endif | ||
diff --git a/include/asm-arm/arch-pnx4008/io.h b/include/asm-arm/arch-pnx4008/io.h new file mode 100644 index 000000000000..29ee43955c52 --- /dev/null +++ b/include/asm-arm/arch-pnx4008/io.h | |||
@@ -0,0 +1,21 @@ | |||
1 | |||
2 | /* | ||
3 | * include/asm-arm/arch-pnx4008/io.h | ||
4 | * | ||
5 | * Author: Dmitry Chigirev <chigirev@ru.mvista.com> | ||
6 | * | ||
7 | * 2005 (c) MontaVista Software, Inc. This file is licensed under | ||
8 | * the terms of the GNU General Public License version 2. This program | ||
9 | * is licensed "as is" without any warranty of any kind, whether express | ||
10 | * or implied. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARM_ARCH_IO_H | ||
14 | #define __ASM_ARM_ARCH_IO_H | ||
15 | |||
16 | #define IO_SPACE_LIMIT 0xffffffff | ||
17 | |||
18 | #define __io(a) ((void __iomem *)(a)) | ||
19 | #define __mem_pci(a) (a) | ||
20 | |||
21 | #endif | ||
diff --git a/include/asm-arm/arch-pnx4008/irq.h b/include/asm-arm/arch-pnx4008/irq.h new file mode 100644 index 000000000000..fabff5dc337f --- /dev/null +++ b/include/asm-arm/arch-pnx4008/irq.h | |||
@@ -0,0 +1,42 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-pnx4008/irq.h | ||
3 | * | ||
4 | * PNX4008 IRQ controller driver - header file | ||
5 | * this one is used in entry-arnv.S as well so it cannot contain C code | ||
6 | * | ||
7 | * Copyright (c) 2005 Philips Semiconductors | ||
8 | * Copyright (c) 2005 MontaVista Software, Inc. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify it | ||
11 | * under the terms of the GNU General Public License as published by the | ||
12 | * Free Software Foundation; either version 2 of the License, or (at your | ||
13 | * option) any later version. | ||
14 | */ | ||
15 | #ifndef __PNX4008_IRQ_H__ | ||
16 | #define __PNX4008_IRQ_H__ | ||
17 | |||
18 | #define MIC_VA_BASE IO_ADDRESS(PNX4008_INTCTRLMIC_BASE) | ||
19 | #define SIC1_VA_BASE IO_ADDRESS(PNX4008_INTCTRLSIC1_BASE) | ||
20 | #define SIC2_VA_BASE IO_ADDRESS(PNX4008_INTCTRLSIC2_BASE) | ||
21 | |||
22 | /* Manual: Chapter 20, page 195 */ | ||
23 | |||
24 | #define INTC_BIT(irq) (1<< ((irq) & 0x1F)) | ||
25 | |||
26 | #define INTC_ER(irq) IO_ADDRESS((PNX4008_INTCTRLMIC_BASE + 0x0 + (((irq)&(0x3<<5))<<9))) | ||
27 | #define INTC_RSR(irq) IO_ADDRESS((PNX4008_INTCTRLMIC_BASE + 0x4 + (((irq)&(0x3<<5))<<9))) | ||
28 | #define INTC_SR(irq) IO_ADDRESS((PNX4008_INTCTRLMIC_BASE + 0x8 + (((irq)&(0x3<<5))<<9))) | ||
29 | #define INTC_APR(irq) IO_ADDRESS((PNX4008_INTCTRLMIC_BASE + 0xC + (((irq)&(0x3<<5))<<9))) | ||
30 | #define INTC_ATR(irq) IO_ADDRESS((PNX4008_INTCTRLMIC_BASE + 0x10 + (((irq)&(0x3<<5))<<9))) | ||
31 | #define INTC_ITR(irq) IO_ADDRESS((PNX4008_INTCTRLMIC_BASE + 0x14 + (((irq)&(0x3<<5))<<9))) | ||
32 | |||
33 | #define START_INT_REG_BIT(irq) (1<<((irq)&0x1F)) | ||
34 | |||
35 | #define START_INT_ER_REG(irq) IO_ADDRESS((PNX4008_PWRMAN_BASE + 0x20 + (((irq)&(0x1<<5))>>1))) | ||
36 | #define START_INT_RSR_REG(irq) IO_ADDRESS((PNX4008_PWRMAN_BASE + 0x24 + (((irq)&(0x1<<5))>>1))) | ||
37 | #define START_INT_SR_REG(irq) IO_ADDRESS((PNX4008_PWRMAN_BASE + 0x28 + (((irq)&(0x1<<5))>>1))) | ||
38 | #define START_INT_APR_REG(irq) IO_ADDRESS((PNX4008_PWRMAN_BASE + 0x2C + (((irq)&(0x1<<5))>>1))) | ||
39 | |||
40 | extern void __init pnx4008_init_irq(void); | ||
41 | |||
42 | #endif /* __PNX4008_IRQ_H__ */ | ||
diff --git a/include/asm-arm/arch-pnx4008/irqs.h b/include/asm-arm/arch-pnx4008/irqs.h new file mode 100644 index 000000000000..13ec7ed0f501 --- /dev/null +++ b/include/asm-arm/arch-pnx4008/irqs.h | |||
@@ -0,0 +1,215 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-pnx4008/irqs.h | ||
3 | * | ||
4 | * PNX4008 IRQ controller driver - header file | ||
5 | * | ||
6 | * Author: Dmitry Chigirev <source@mvista.com> | ||
7 | * | ||
8 | * 2005 (c) MontaVista Software, Inc. This file is licensed under | ||
9 | * the terms of the GNU General Public License version 2. This program | ||
10 | * is licensed "as is" without any warranty of any kind, whether express | ||
11 | * or implied. | ||
12 | */ | ||
13 | #ifndef __PNX4008_IRQS_h__ | ||
14 | #define __PNX4008_IRQS_h__ | ||
15 | |||
16 | #define NR_IRQS 96 | ||
17 | |||
18 | /*Manual: table 259, page 199*/ | ||
19 | |||
20 | /*SUB2 Interrupt Routing (SIC2)*/ | ||
21 | |||
22 | #define SIC2_BASE_INT 64 | ||
23 | |||
24 | #define CLK_SWITCH_ARM_INT 95 /*manual: Clkswitch ARM */ | ||
25 | #define CLK_SWITCH_DSP_INT 94 /*manual: ClkSwitch DSP */ | ||
26 | #define CLK_SWITCH_AUD_INT 93 /*manual: Clkswitch AUD */ | ||
27 | #define GPI_06_INT 92 | ||
28 | #define GPI_05_INT 91 | ||
29 | #define GPI_04_INT 90 | ||
30 | #define GPI_03_INT 89 | ||
31 | #define GPI_02_INT 88 | ||
32 | #define GPI_01_INT 87 | ||
33 | #define GPI_00_INT 86 | ||
34 | #define BT_CLKREQ_INT 85 | ||
35 | #define SPI1_DATIN_INT 84 | ||
36 | #define U5_RX_INT 83 | ||
37 | #define SDIO_INT_N 82 | ||
38 | #define CAM_HS_INT 81 | ||
39 | #define CAM_VS_INT 80 | ||
40 | #define GPI_07_INT 79 | ||
41 | #define DISP_SYNC_INT 78 | ||
42 | #define DSP_INT8 77 | ||
43 | #define U7_HCTS_INT 76 | ||
44 | #define GPI_10_INT 75 | ||
45 | #define GPI_09_INT 74 | ||
46 | #define GPI_08_INT 73 | ||
47 | #define DSP_INT7 72 | ||
48 | #define U2_HCTS_INT 71 | ||
49 | #define SPI2_DATIN_INT 70 | ||
50 | #define GPIO_05_INT 69 | ||
51 | #define GPIO_04_INT 68 | ||
52 | #define GPIO_03_INT 67 | ||
53 | #define GPIO_02_INT 66 | ||
54 | #define GPIO_01_INT 65 | ||
55 | #define GPIO_00_INT 64 | ||
56 | |||
57 | /*Manual: table 258, page 198*/ | ||
58 | |||
59 | /*SUB1 Interrupt Routing (SIC1)*/ | ||
60 | |||
61 | #define SIC1_BASE_INT 32 | ||
62 | |||
63 | #define USB_I2C_INT 63 | ||
64 | #define USB_DEV_HP_INT 62 | ||
65 | #define USB_DEV_LP_INT 61 | ||
66 | #define USB_DEV_DMA_INT 60 | ||
67 | #define USB_HOST_INT 59 | ||
68 | #define USB_OTG_ATX_INT_N 58 | ||
69 | #define USB_OTG_TIMER_INT 57 | ||
70 | #define SW_INT 56 | ||
71 | #define SPI1_INT 55 | ||
72 | #define KEY_IRQ 54 | ||
73 | #define DSP_M_INT 53 | ||
74 | #define RTC_INT 52 | ||
75 | #define I2C_1_INT 51 | ||
76 | #define I2C_2_INT 50 | ||
77 | #define PLL1_LOCK_INT 49 | ||
78 | #define PLL2_LOCK_INT 48 | ||
79 | #define PLL3_LOCK_INT 47 | ||
80 | #define PLL4_LOCK_INT 46 | ||
81 | #define PLL5_LOCK_INT 45 | ||
82 | #define SPI2_INT 44 | ||
83 | #define DSP_INT1 43 | ||
84 | #define DSP_INT2 42 | ||
85 | #define DSP_TDM_INT2 41 | ||
86 | #define TS_AUX_INT 40 | ||
87 | #define TS_IRQ 39 | ||
88 | #define TS_P_INT 38 | ||
89 | #define UOUT1_TO_PAD_INT 37 | ||
90 | #define GPI_11_INT 36 | ||
91 | #define DSP_INT4 35 | ||
92 | #define JTAG_COMM_RX_INT 34 | ||
93 | #define JTAG_COMM_TX_INT 33 | ||
94 | #define DSP_INT3 32 | ||
95 | |||
96 | /*Manual: table 257, page 197*/ | ||
97 | |||
98 | /*MAIN Interrupt Routing*/ | ||
99 | |||
100 | #define MAIN_BASE_INT 0 | ||
101 | |||
102 | #define SUB2_FIQ_N 31 /*active low */ | ||
103 | #define SUB1_FIQ_N 30 /*active low */ | ||
104 | #define JPEG_INT 29 | ||
105 | #define DMA_INT 28 | ||
106 | #define MSTIMER_INT 27 | ||
107 | #define IIR1_INT 26 | ||
108 | #define IIR2_INT 25 | ||
109 | #define IIR7_INT 24 | ||
110 | #define DSP_TDM_INT0 23 | ||
111 | #define DSP_TDM_INT1 22 | ||
112 | #define DSP_P_INT 21 | ||
113 | #define DSP_INT0 20 | ||
114 | #define DUM_INT 19 | ||
115 | #define UOUT0_TO_PAD_INT 18 | ||
116 | #define MP4_ENC_INT 17 | ||
117 | #define MP4_DEC_INT 16 | ||
118 | #define SD0_INT 15 | ||
119 | #define MBX_INT 14 | ||
120 | #define SD1_INT 13 | ||
121 | #define MS_INT_N 12 | ||
122 | #define FLASH_INT 11 /*NAND*/ | ||
123 | #define IIR6_INT 10 | ||
124 | #define IIR5_INT 9 | ||
125 | #define IIR4_INT 8 | ||
126 | #define IIR3_INT 7 | ||
127 | #define WATCH_INT 6 | ||
128 | #define HSTIMER_INT 5 | ||
129 | #define ARCH_TIMER_IRQ HSTIMER_INT | ||
130 | #define CAM_INT 4 | ||
131 | #define PRNG_INT 3 | ||
132 | #define CRYPTO_INT 2 | ||
133 | #define SUB2_IRQ_N 1 /*active low */ | ||
134 | #define SUB1_IRQ_N 0 /*active low */ | ||
135 | |||
136 | #define PNX4008_IRQ_TYPES \ | ||
137 | { /*IRQ #'s: */ \ | ||
138 | IRQT_LOW, IRQT_LOW, IRQT_LOW, IRQT_HIGH, /* 0, 1, 2, 3 */ \ | ||
139 | IRQT_LOW, IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, /* 4, 5, 6, 7 */ \ | ||
140 | IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, /* 8, 9,10,11 */ \ | ||
141 | IRQT_LOW, IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, /* 12,13,14,15 */ \ | ||
142 | IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, /* 16,17,18,19 */ \ | ||
143 | IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, /* 20,21,22,23 */ \ | ||
144 | IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, /* 24,25,26,27 */ \ | ||
145 | IRQT_HIGH, IRQT_HIGH, IRQT_LOW, IRQT_LOW, /* 28,29,30,31 */ \ | ||
146 | IRQT_HIGH, IRQT_LOW, IRQT_HIGH, IRQT_HIGH, /* 32,33,34,35 */ \ | ||
147 | IRQT_HIGH, IRQT_HIGH, IRQT_FALLING, IRQT_HIGH, /* 36,37,38,39 */ \ | ||
148 | IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, /* 40,41,42,43 */ \ | ||
149 | IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, /* 44,45,46,47 */ \ | ||
150 | IRQT_HIGH, IRQT_HIGH, IRQT_LOW, IRQT_LOW, /* 48,49,50,51 */ \ | ||
151 | IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, /* 52,53,54,55 */ \ | ||
152 | IRQT_HIGH, IRQT_HIGH, IRQT_LOW, IRQT_HIGH, /* 56,57,58,59 */ \ | ||
153 | IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, /* 60,61,62,63 */ \ | ||
154 | IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, /* 64,65,66,67 */ \ | ||
155 | IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, /* 68,69,70,71 */ \ | ||
156 | IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, /* 72,73,74,75 */ \ | ||
157 | IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, /* 76,77,78,79 */ \ | ||
158 | IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, /* 80,81,82,83 */ \ | ||
159 | IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, /* 84,85,86,87 */ \ | ||
160 | IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, /* 88,89,90,91 */ \ | ||
161 | IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, IRQT_HIGH, /* 92,93,94,95 */ \ | ||
162 | } | ||
163 | |||
164 | /* Start Enable Pin Interrupts - table 58 page 66 */ | ||
165 | |||
166 | #define SE_PIN_BASE_INT 32 | ||
167 | |||
168 | #define SE_U7_RX_INT 63 | ||
169 | #define SE_U7_HCTS_INT 62 | ||
170 | #define SE_BT_CLKREQ_INT 61 | ||
171 | #define SE_U6_IRRX_INT 60 | ||
172 | /*59 unused*/ | ||
173 | #define SE_U5_RX_INT 58 | ||
174 | #define SE_GPI_11_INT 57 | ||
175 | #define SE_U3_RX_INT 56 | ||
176 | #define SE_U2_HCTS_INT 55 | ||
177 | #define SE_U2_RX_INT 54 | ||
178 | #define SE_U1_RX_INT 53 | ||
179 | #define SE_DISP_SYNC_INT 52 | ||
180 | /*51 unused*/ | ||
181 | #define SE_SDIO_INT_N 50 | ||
182 | #define SE_MSDIO_START_INT 49 | ||
183 | #define SE_GPI_06_INT 48 | ||
184 | #define SE_GPI_05_INT 47 | ||
185 | #define SE_GPI_04_INT 46 | ||
186 | #define SE_GPI_03_INT 45 | ||
187 | #define SE_GPI_02_INT 44 | ||
188 | #define SE_GPI_01_INT 43 | ||
189 | #define SE_GPI_00_INT 42 | ||
190 | #define SE_SYSCLKEN_PIN_INT 41 | ||
191 | #define SE_SPI1_DATAIN_INT 40 | ||
192 | #define SE_GPI_07_INT 39 | ||
193 | #define SE_SPI2_DATAIN_INT 38 | ||
194 | #define SE_GPI_10_INT 37 | ||
195 | #define SE_GPI_09_INT 36 | ||
196 | #define SE_GPI_08_INT 35 | ||
197 | /*34-32 unused*/ | ||
198 | |||
199 | /* Start Enable Internal Interrupts - table 57 page 65 */ | ||
200 | |||
201 | #define SE_INT_BASE_INT 0 | ||
202 | |||
203 | #define SE_TS_IRQ 31 | ||
204 | #define SE_TS_P_INT 30 | ||
205 | #define SE_TS_AUX_INT 29 | ||
206 | /*27-28 unused*/ | ||
207 | #define SE_USB_AHB_NEED_CLK_INT 26 | ||
208 | #define SE_MSTIMER_INT 25 | ||
209 | #define SE_RTC_INT 24 | ||
210 | #define SE_USB_NEED_CLK_INT 23 | ||
211 | #define SE_USB_INT 22 | ||
212 | #define SE_USB_I2C_INT 21 | ||
213 | #define SE_USB_OTG_TIMER_INT 20 | ||
214 | |||
215 | #endif /* __PNX4008_IRQS_h__ */ | ||
diff --git a/include/asm-arm/arch-pnx4008/memory.h b/include/asm-arm/arch-pnx4008/memory.h new file mode 100644 index 000000000000..0d8268a95261 --- /dev/null +++ b/include/asm-arm/arch-pnx4008/memory.h | |||
@@ -0,0 +1,24 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-pnx4008/memory.h | ||
3 | * | ||
4 | * Copyright (c) 2005 Philips Semiconductors | ||
5 | * Copyright (c) 2005 MontaVista Software, Inc. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License as published by the | ||
9 | * Free Software Foundation; either version 2 of the License, or (at your | ||
10 | * option) any later version. | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARCH_MEMORY_H | ||
14 | #define __ASM_ARCH_MEMORY_H | ||
15 | |||
16 | /* | ||
17 | * Physical DRAM offset. | ||
18 | */ | ||
19 | #define PHYS_OFFSET (0x80000000) | ||
20 | |||
21 | #define __virt_to_bus(x) ((x) - PAGE_OFFSET + PHYS_OFFSET) | ||
22 | #define __bus_to_virt(x) ((x) + PAGE_OFFSET - PHYS_OFFSET) | ||
23 | |||
24 | #endif | ||
diff --git a/include/asm-arm/arch-pnx4008/param.h b/include/asm-arm/arch-pnx4008/param.h new file mode 100644 index 000000000000..95d5f547b416 --- /dev/null +++ b/include/asm-arm/arch-pnx4008/param.h | |||
@@ -0,0 +1,21 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-pnx4008/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 | */ | ||
20 | |||
21 | #define HZ 100 | ||
diff --git a/include/asm-arm/arch-pnx4008/platform.h b/include/asm-arm/arch-pnx4008/platform.h new file mode 100644 index 000000000000..485a3651b4d7 --- /dev/null +++ b/include/asm-arm/arch-pnx4008/platform.h | |||
@@ -0,0 +1,69 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-pnx4008/platfrom.h | ||
3 | * | ||
4 | * PNX4008 Base addresses - header file | ||
5 | * | ||
6 | * Author: Dmitry Chigirev <source@mvista.com> | ||
7 | * | ||
8 | * Based on reference code received from Philips: | ||
9 | * Copyright (C) 2003 Philips Semiconductors | ||
10 | * | ||
11 | * 2005 (c) MontaVista Software, Inc. This file is licensed under | ||
12 | * the terms of the GNU General Public License version 2. This program | ||
13 | * is licensed "as is" without any warranty of any kind, whether express | ||
14 | * or implied. | ||
15 | */ | ||
16 | |||
17 | |||
18 | #ifndef __ASM_ARCH_PLATFORM_H__ | ||
19 | #define __ASM_ARCH_PLATFORM_H__ | ||
20 | |||
21 | #define PNX4008_IRAM_BASE 0x08000000 | ||
22 | #define PNX4008_IRAM_SIZE 0x00010000 | ||
23 | #define PNX4008_YUV_SLAVE_BASE 0x10000000 | ||
24 | #define PNX4008_DUM_SLAVE_BASE 0x18000000 | ||
25 | #define PNX4008_NDF_FLASH_BASE 0x20020000 | ||
26 | #define PNX4008_SPI1_BASE 0x20088000 | ||
27 | #define PNX4008_SPI2_BASE 0x20090000 | ||
28 | #define PNX4008_SD_CONFIG_BASE 0x20098000 | ||
29 | #define PNX4008_FLASH_DATA 0x200B0000 | ||
30 | #define PNX4008_MLC_FLASH_BASE 0x200B8000 | ||
31 | #define PNX4008_JPEG_CONFIG_BASE 0x300A0000 | ||
32 | #define PNX4008_DMA_CONFIG_BASE 0x31000000 | ||
33 | #define PNX4008_USB_CONFIG_BASE 0x31020000 | ||
34 | #define PNX4008_SDRAM_CFG_BASE 0x31080000 | ||
35 | #define PNX4008_AHB2FAB_BASE 0x40000000 | ||
36 | #define PNX4008_PWRMAN_BASE 0x40004000 | ||
37 | #define PNX4008_INTCTRLMIC_BASE 0x40008000 | ||
38 | #define PNX4008_INTCTRLSIC1_BASE 0x4000C000 | ||
39 | #define PNX4008_INTCTRLSIC2_BASE 0x40010000 | ||
40 | #define PNX4008_HSUART1_BASE 0x40014000 | ||
41 | #define PNX4008_HSUART2_BASE 0x40018000 | ||
42 | #define PNX4008_HSUART7_BASE 0x4001C000 | ||
43 | #define PNX4008_RTC_BASE 0x40024000 | ||
44 | #define PNX4008_PIO_BASE 0x40028000 | ||
45 | #define PNX4008_MSTIMER_BASE 0x40034000 | ||
46 | #define PNX4008_HSTIMER_BASE 0x40038000 | ||
47 | #define PNX4008_WDOG_BASE 0x4003C000 | ||
48 | #define PNX4008_DEBUG_BASE 0x40040000 | ||
49 | #define PNX4008_TOUCH1_BASE 0x40048000 | ||
50 | #define PNX4008_KEYSCAN_BASE 0x40050000 | ||
51 | #define PNX4008_UARTCTRL_BASE 0x40054000 | ||
52 | #define PNX4008_PWM_BASE 0x4005C000 | ||
53 | #define PNX4008_UART3_BASE 0x40080000 | ||
54 | #define PNX4008_UART4_BASE 0x40088000 | ||
55 | #define PNX4008_UART5_BASE 0x40090000 | ||
56 | #define PNX4008_UART6_BASE 0x40098000 | ||
57 | #define PNX4008_I2C1_BASE 0x400A0000 | ||
58 | #define PNX4008_I2C2_BASE 0x400A8000 | ||
59 | #define PNX4008_MAGICGATE_BASE 0x400B0000 | ||
60 | #define PNX4008_DUMCONF_BASE 0x400B8000 | ||
61 | #define PNX4008_DUM_MAINCFG_BASE 0x400BC000 | ||
62 | #define PNX4008_DSP_BASE 0x400C0000 | ||
63 | #define PNX4008_PROFCOUNTER_BASE 0x400C8000 | ||
64 | #define PNX4008_CRYPTO_BASE 0x400D0000 | ||
65 | #define PNX4008_CAMIFCONF_BASE 0x400D8000 | ||
66 | #define PNX4008_YUV2RGB_BASE 0x400E0000 | ||
67 | #define PNX4008_AUDIOCONFIG_BASE 0x400E8000 | ||
68 | |||
69 | #endif | ||
diff --git a/include/asm-arm/arch-pnx4008/pm.h b/include/asm-arm/arch-pnx4008/pm.h new file mode 100644 index 000000000000..bac1634cb3e0 --- /dev/null +++ b/include/asm-arm/arch-pnx4008/pm.h | |||
@@ -0,0 +1,33 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-pnx4008/pm.h | ||
3 | * | ||
4 | * PNX4008 Power Management Routiness - header file | ||
5 | * | ||
6 | * Authors: Vitaly Wool, Dmitry Chigirev <source@mvista.com> | ||
7 | * | ||
8 | * 2005 (c) MontaVista Software, Inc. This file is licensed under | ||
9 | * the terms of the GNU General Public License version 2. This program | ||
10 | * is licensed "as is" without any warranty of any kind, whether express | ||
11 | * or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASM_ARCH_PNX4008_PM_H | ||
15 | #define __ASM_ARCH_PNX4008_PM_H | ||
16 | |||
17 | #ifndef __ASSEMBLER__ | ||
18 | #include "irq.h" | ||
19 | #include "irqs.h" | ||
20 | #include "clock.h" | ||
21 | |||
22 | extern void pnx4008_pm_idle(void); | ||
23 | extern void pnx4008_pm_suspend(void); | ||
24 | extern unsigned int pnx4008_cpu_suspend_sz; | ||
25 | extern void pnx4008_cpu_suspend(void); | ||
26 | extern unsigned int pnx4008_cpu_standby_sz; | ||
27 | extern void pnx4008_cpu_standby(void); | ||
28 | |||
29 | extern int pnx4008_startup_pll(struct clk *); | ||
30 | extern int pnx4008_shutdown_pll(struct clk *); | ||
31 | |||
32 | #endif /* ASSEMBLER */ | ||
33 | #endif /* __ASM_ARCH_PNX4008_PM_H */ | ||
diff --git a/include/asm-arm/arch-pnx4008/system.h b/include/asm-arm/arch-pnx4008/system.h new file mode 100644 index 000000000000..6e3da70ab107 --- /dev/null +++ b/include/asm-arm/arch-pnx4008/system.h | |||
@@ -0,0 +1,38 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-pnx4008/system.h | ||
3 | * | ||
4 | * Copyright (C) 2003 Philips Semiconductors | ||
5 | * Copyright (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 as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | */ | ||
21 | #ifndef __ASM_ARCH_SYSTEM_H | ||
22 | #define __ASM_ARCH_SYSTEM_H | ||
23 | |||
24 | #include <asm/hardware.h> | ||
25 | #include <asm/io.h> | ||
26 | #include <asm/arch/platform.h> | ||
27 | |||
28 | static void arch_idle(void) | ||
29 | { | ||
30 | cpu_do_idle(); | ||
31 | } | ||
32 | |||
33 | static inline void arch_reset(char mode) | ||
34 | { | ||
35 | cpu_reset(0); | ||
36 | } | ||
37 | |||
38 | #endif | ||
diff --git a/include/asm-arm/arch-pnx4008/timex.h b/include/asm-arm/arch-pnx4008/timex.h new file mode 100644 index 000000000000..ee470a39089a --- /dev/null +++ b/include/asm-arm/arch-pnx4008/timex.h | |||
@@ -0,0 +1,73 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-pnx4008/timex.h | ||
3 | * | ||
4 | * PNX4008 timers header file | ||
5 | * | ||
6 | * Author: Dmitry Chigirev <source@mvista.com> | ||
7 | * | ||
8 | * 2005 (c) MontaVista Software, Inc. This file is licensed under | ||
9 | * the terms of the GNU General Public License version 2. This program | ||
10 | * is licensed "as is" without any warranty of any kind, whether express | ||
11 | * or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __PNX4008_TIMEX_H | ||
15 | #define __PNX4008_TIMEX_H | ||
16 | |||
17 | #include <asm/hardware.h> | ||
18 | #include <asm/io.h> | ||
19 | |||
20 | #define CLOCK_TICK_RATE 1000000 | ||
21 | |||
22 | #define TICKS2USECS(x) (x) | ||
23 | |||
24 | /* MilliSecond Timer - Chapter 21 Page 202 */ | ||
25 | |||
26 | #define MSTIM_INT IO_ADDRESS((PNX4008_MSTIMER_BASE + 0x0)) | ||
27 | #define MSTIM_CTRL IO_ADDRESS((PNX4008_MSTIMER_BASE + 0x4)) | ||
28 | #define MSTIM_COUNTER IO_ADDRESS((PNX4008_MSTIMER_BASE + 0x8)) | ||
29 | #define MSTIM_MCTRL IO_ADDRESS((PNX4008_MSTIMER_BASE + 0x14)) | ||
30 | #define MSTIM_MATCH0 IO_ADDRESS((PNX4008_MSTIMER_BASE + 0x18)) | ||
31 | #define MSTIM_MATCH1 IO_ADDRESS((PNX4008_MSTIMER_BASE + 0x1c)) | ||
32 | |||
33 | /* High Speed Timer - Chpater 22, Page 205 */ | ||
34 | |||
35 | #define HSTIM_INT IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x0)) | ||
36 | #define HSTIM_CTRL IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x4)) | ||
37 | #define HSTIM_COUNTER IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x8)) | ||
38 | #define HSTIM_PMATCH IO_ADDRESS((PNX4008_HSTIMER_BASE + 0xC)) | ||
39 | #define HSTIM_PCOUNT IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x10)) | ||
40 | #define HSTIM_MCTRL IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x14)) | ||
41 | #define HSTIM_MATCH0 IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x18)) | ||
42 | #define HSTIM_MATCH1 IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x1c)) | ||
43 | #define HSTIM_MATCH2 IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x20)) | ||
44 | #define HSTIM_CCR IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x28)) | ||
45 | #define HSTIM_CR0 IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x2C)) | ||
46 | #define HSTIM_CR1 IO_ADDRESS((PNX4008_HSTIMER_BASE + 0x30)) | ||
47 | |||
48 | /* IMPORTANT: both timers are UPCOUNTING */ | ||
49 | |||
50 | /* xSTIM_MCTRL bit definitions */ | ||
51 | #define MR0_INT 1 | ||
52 | #define RESET_COUNT0 (1<<1) | ||
53 | #define STOP_COUNT0 (1<<2) | ||
54 | #define MR1_INT (1<<3) | ||
55 | #define RESET_COUNT1 (1<<4) | ||
56 | #define STOP_COUNT1 (1<<5) | ||
57 | #define MR2_INT (1<<6) | ||
58 | #define RESET_COUNT2 (1<<7) | ||
59 | #define STOP_COUNT2 (1<<8) | ||
60 | |||
61 | /* xSTIM_CTRL bit definitions */ | ||
62 | #define COUNT_ENAB 1 | ||
63 | #define RESET_COUNT (1<<1) | ||
64 | #define DEBUG_EN (1<<2) | ||
65 | |||
66 | /* xSTIM_INT bit definitions */ | ||
67 | #define MATCH0_INT 1 | ||
68 | #define MATCH1_INT (1<<1) | ||
69 | #define MATCH2_INT (1<<2) | ||
70 | #define RTC_TICK0 (1<<4) | ||
71 | #define RTC_TICK1 (1<<5) | ||
72 | |||
73 | #endif | ||
diff --git a/include/asm-arm/arch-pnx4008/uncompress.h b/include/asm-arm/arch-pnx4008/uncompress.h new file mode 100644 index 000000000000..8fa4d24b72b4 --- /dev/null +++ b/include/asm-arm/arch-pnx4008/uncompress.h | |||
@@ -0,0 +1,46 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-pnx4008/uncompress.h | ||
3 | * | ||
4 | * Copyright (C) 1999 ARM Limited | ||
5 | * Copyright (C) 2006 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 as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | */ | ||
21 | |||
22 | #define UART5_BASE 0x40090000 | ||
23 | |||
24 | #define UART5_DR (*(volatile unsigned char *) (UART5_BASE)) | ||
25 | #define UART5_FR (*(volatile unsigned char *) (UART5_BASE + 18)) | ||
26 | |||
27 | static __inline__ void putc(char c) | ||
28 | { | ||
29 | while (UART5_FR & (1 << 5)) | ||
30 | barrier(); | ||
31 | |||
32 | UART5_DR = c; | ||
33 | } | ||
34 | |||
35 | /* | ||
36 | * This does not append a newline | ||
37 | */ | ||
38 | static inline void flush(void) | ||
39 | { | ||
40 | } | ||
41 | |||
42 | /* | ||
43 | * nothing to do | ||
44 | */ | ||
45 | #define arch_decomp_setup() | ||
46 | #define arch_decomp_wdog() | ||
diff --git a/include/asm-arm/arch-pnx4008/vmalloc.h b/include/asm-arm/arch-pnx4008/vmalloc.h new file mode 100644 index 000000000000..140d925f6f37 --- /dev/null +++ b/include/asm-arm/arch-pnx4008/vmalloc.h | |||
@@ -0,0 +1,20 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-pnx4008/vmalloc.h | ||
3 | * | ||
4 | * Author: Vitaly Wool <source@mvista.com> | ||
5 | * | ||
6 | * 2006 (c) MontaVista Software, Inc. This file is licensed under | ||
7 | * the terms of the GNU General Public License version 2. This program | ||
8 | * is licensed "as is" without any warranty of any kind, whether express | ||
9 | * or implied. | ||
10 | */ | ||
11 | |||
12 | /* | ||
13 | * Just any arbitrary offset to the start of the vmalloc VM area: the | ||
14 | * current 8MB value just means that there will be a 8MB "hole" after the | ||
15 | * physical memory until the kernel virtual memory starts. That means that | ||
16 | * any out-of-bounds memory accesses will hopefully be caught. | ||
17 | * The vmalloc() routines leaves a hole of 4kB between each vmalloced | ||
18 | * area for the same reason. ;) | ||
19 | */ | ||
20 | #define VMALLOC_END (PAGE_OFFSET + 0x10000000) | ||
diff --git a/include/asm-arm/arch-pxa/idp.h b/include/asm-arm/arch-pxa/idp.h index e7ef497417bb..b6952534a4e1 100644 --- a/include/asm-arm/arch-pxa/idp.h +++ b/include/asm-arm/arch-pxa/idp.h | |||
@@ -15,7 +15,6 @@ | |||
15 | * Changes for 2.6 kernel. | 15 | * Changes for 2.6 kernel. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/config.h> | ||
19 | 18 | ||
20 | /* | 19 | /* |
21 | * Note: this file must be safe to include in assembly files | 20 | * Note: this file must be safe to include in assembly files |
diff --git a/include/asm-arm/arch-pxa/io.h b/include/asm-arm/arch-pxa/io.h index eb2dd58d397f..7f8d817b446f 100644 --- a/include/asm-arm/arch-pxa/io.h +++ b/include/asm-arm/arch-pxa/io.h | |||
@@ -16,6 +16,5 @@ | |||
16 | */ | 16 | */ |
17 | #define __io(a) ((void __iomem *)(a)) | 17 | #define __io(a) ((void __iomem *)(a)) |
18 | #define __mem_pci(a) (a) | 18 | #define __mem_pci(a) (a) |
19 | #define __mem_isa(a) (a) | ||
20 | 19 | ||
21 | #endif | 20 | #endif |
diff --git a/include/asm-arm/arch-pxa/irqs.h b/include/asm-arm/arch-pxa/irqs.h index 67af238a8f8e..f3bc70eee35b 100644 --- a/include/asm-arm/arch-pxa/irqs.h +++ b/include/asm-arm/arch-pxa/irqs.h | |||
@@ -10,7 +10,6 @@ | |||
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | 13 | ||
15 | #ifdef CONFIG_PXA27x | 14 | #ifdef CONFIG_PXA27x |
16 | #define PXA_IRQ_SKIP 0 | 15 | #define PXA_IRQ_SKIP 0 |
diff --git a/include/asm-arm/arch-pxa/poodle.h b/include/asm-arm/arch-pxa/poodle.h index 6b5ac5144e70..4d6a40315764 100644 --- a/include/asm-arm/arch-pxa/poodle.h +++ b/include/asm-arm/arch-pxa/poodle.h | |||
@@ -31,6 +31,7 @@ | |||
31 | #define POODLE_GPIO_CF_CD (14) | 31 | #define POODLE_GPIO_CF_CD (14) |
32 | #define POODLE_GPIO_CF_STSCHG (14) | 32 | #define POODLE_GPIO_CF_STSCHG (14) |
33 | #define POODLE_GPIO_SD_PWR (33) | 33 | #define POODLE_GPIO_SD_PWR (33) |
34 | #define POODLE_GPIO_SD_PWR1 (3) | ||
34 | #define POODLE_GPIO_nSD_CLK (6) | 35 | #define POODLE_GPIO_nSD_CLK (6) |
35 | #define POODLE_GPIO_nSD_WP (7) | 36 | #define POODLE_GPIO_nSD_WP (7) |
36 | #define POODLE_GPIO_nSD_INT (8) | 37 | #define POODLE_GPIO_nSD_INT (8) |
@@ -42,6 +43,7 @@ | |||
42 | #define POODLE_GPIO_BYPASS_ON (36) | 43 | #define POODLE_GPIO_BYPASS_ON (36) |
43 | #define POODLE_GPIO_CHRG_ON (38) | 44 | #define POODLE_GPIO_CHRG_ON (38) |
44 | #define POODLE_GPIO_CHRG_FULL (16) | 45 | #define POODLE_GPIO_CHRG_FULL (16) |
46 | #define POODLE_GPIO_DISCHARGE_ON (42) /* Enable battery discharge */ | ||
45 | 47 | ||
46 | /* PXA GPIOs */ | 48 | /* PXA GPIOs */ |
47 | #define POODLE_IRQ_GPIO_ON_KEY IRQ_GPIO(0) | 49 | #define POODLE_IRQ_GPIO_ON_KEY IRQ_GPIO(0) |
@@ -68,4 +70,6 @@ | |||
68 | #define POODLE_SCOOP_IO_DIR ( POODLE_SCOOP_VPEN | POODLE_SCOOP_HS_OUT ) | 70 | #define POODLE_SCOOP_IO_DIR ( POODLE_SCOOP_VPEN | POODLE_SCOOP_HS_OUT ) |
69 | #define POODLE_SCOOP_IO_OUT ( 0 ) | 71 | #define POODLE_SCOOP_IO_OUT ( 0 ) |
70 | 72 | ||
73 | extern struct platform_device poodle_locomo_device; | ||
74 | |||
71 | #endif /* __ASM_ARCH_POODLE_H */ | 75 | #endif /* __ASM_ARCH_POODLE_H */ |
diff --git a/include/asm-arm/arch-pxa/pxa-regs.h b/include/asm-arm/arch-pxa/pxa-regs.h index c8f53a71c076..9f83f4adfbf3 100644 --- a/include/asm-arm/arch-pxa/pxa-regs.h +++ b/include/asm-arm/arch-pxa/pxa-regs.h | |||
@@ -13,7 +13,6 @@ | |||
13 | #ifndef __PXA_REGS_H | 13 | #ifndef __PXA_REGS_H |
14 | #define __PXA_REGS_H | 14 | #define __PXA_REGS_H |
15 | 15 | ||
16 | #include <linux/config.h> | ||
17 | 16 | ||
18 | /* | 17 | /* |
19 | * PXA Chip selects | 18 | * PXA Chip selects |
@@ -1626,7 +1625,7 @@ | |||
1626 | #define SSCR0_RIM (1 << 22) /* Receive FIFO overrrun interrupt mask */ | 1625 | #define SSCR0_RIM (1 << 22) /* Receive FIFO overrrun interrupt mask */ |
1627 | #define SSCR0_TUM (1 << 23) /* Transmit FIFO underrun interrupt mask */ | 1626 | #define SSCR0_TUM (1 << 23) /* Transmit FIFO underrun interrupt mask */ |
1628 | #define SSCR0_FRDC (0x07000000) /* Frame rate divider control (mask) */ | 1627 | #define SSCR0_FRDC (0x07000000) /* Frame rate divider control (mask) */ |
1629 | #define SSCR0_SlotsPerFrm(c) ((x) - 1) /* Time slots per frame [1..8] */ | 1628 | #define SSCR0_SlotsPerFrm(x) ((x) - 1) /* Time slots per frame [1..8] */ |
1630 | #define SSCR0_ADC (1 << 30) /* Audio clock select */ | 1629 | #define SSCR0_ADC (1 << 30) /* Audio clock select */ |
1631 | #define SSCR0_MOD (1 << 31) /* Mode (normal or network) */ | 1630 | #define SSCR0_MOD (1 << 31) /* Mode (normal or network) */ |
1632 | #endif | 1631 | #endif |
@@ -1707,6 +1706,10 @@ | |||
1707 | #if defined (CONFIG_PXA27x) | 1706 | #if defined (CONFIG_PXA27x) |
1708 | #define SSTO_P1 __REG(0x41000028) /* SSP Port 1 Time Out Register */ | 1707 | #define SSTO_P1 __REG(0x41000028) /* SSP Port 1 Time Out Register */ |
1709 | #define SSPSP_P1 __REG(0x4100002C) /* SSP Port 1 Programmable Serial Protocol */ | 1708 | #define SSPSP_P1 __REG(0x4100002C) /* SSP Port 1 Programmable Serial Protocol */ |
1709 | #define SSTSA_P1 __REG(0x41000030) /* SSP Port 1 Tx Timeslot Active */ | ||
1710 | #define SSRSA_P1 __REG(0x41000034) /* SSP Port 1 Rx Timeslot Active */ | ||
1711 | #define SSTSS_P1 __REG(0x41000038) /* SSP Port 1 Timeslot Status */ | ||
1712 | #define SSACD_P1 __REG(0x4100003C) /* SSP Port 1 Audio Clock Divider */ | ||
1710 | #define SSCR0_P2 __REG(0x41700000) /* SSP Port 2 Control Register 0 */ | 1713 | #define SSCR0_P2 __REG(0x41700000) /* SSP Port 2 Control Register 0 */ |
1711 | #define SSCR1_P2 __REG(0x41700004) /* SSP Port 2 Control Register 1 */ | 1714 | #define SSCR1_P2 __REG(0x41700004) /* SSP Port 2 Control Register 1 */ |
1712 | #define SSSR_P2 __REG(0x41700008) /* SSP Port 2 Status Register */ | 1715 | #define SSSR_P2 __REG(0x41700008) /* SSP Port 2 Status Register */ |
@@ -1714,6 +1717,10 @@ | |||
1714 | #define SSDR_P2 __REG(0x41700010) /* (Write / Read) SSP Port 2 Data Write Register/SSP Data Read Register */ | 1717 | #define SSDR_P2 __REG(0x41700010) /* (Write / Read) SSP Port 2 Data Write Register/SSP Data Read Register */ |
1715 | #define SSTO_P2 __REG(0x41700028) /* SSP Port 2 Time Out Register */ | 1718 | #define SSTO_P2 __REG(0x41700028) /* SSP Port 2 Time Out Register */ |
1716 | #define SSPSP_P2 __REG(0x4170002C) /* SSP Port 2 Programmable Serial Protocol */ | 1719 | #define SSPSP_P2 __REG(0x4170002C) /* SSP Port 2 Programmable Serial Protocol */ |
1720 | #define SSTSA_P2 __REG(0x41700030) /* SSP Port 2 Tx Timeslot Active */ | ||
1721 | #define SSRSA_P2 __REG(0x41700034) /* SSP Port 2 Rx Timeslot Active */ | ||
1722 | #define SSTSS_P2 __REG(0x41700038) /* SSP Port 2 Timeslot Status */ | ||
1723 | #define SSACD_P2 __REG(0x4170003C) /* SSP Port 2 Audio Clock Divider */ | ||
1717 | #define SSCR0_P3 __REG(0x41900000) /* SSP Port 3 Control Register 0 */ | 1724 | #define SSCR0_P3 __REG(0x41900000) /* SSP Port 3 Control Register 0 */ |
1718 | #define SSCR1_P3 __REG(0x41900004) /* SSP Port 3 Control Register 1 */ | 1725 | #define SSCR1_P3 __REG(0x41900004) /* SSP Port 3 Control Register 1 */ |
1719 | #define SSSR_P3 __REG(0x41900008) /* SSP Port 3 Status Register */ | 1726 | #define SSSR_P3 __REG(0x41900008) /* SSP Port 3 Status Register */ |
@@ -1721,6 +1728,10 @@ | |||
1721 | #define SSDR_P3 __REG(0x41900010) /* (Write / Read) SSP Port 3 Data Write Register/SSP Data Read Register */ | 1728 | #define SSDR_P3 __REG(0x41900010) /* (Write / Read) SSP Port 3 Data Write Register/SSP Data Read Register */ |
1722 | #define SSTO_P3 __REG(0x41900028) /* SSP Port 3 Time Out Register */ | 1729 | #define SSTO_P3 __REG(0x41900028) /* SSP Port 3 Time Out Register */ |
1723 | #define SSPSP_P3 __REG(0x4190002C) /* SSP Port 3 Programmable Serial Protocol */ | 1730 | #define SSPSP_P3 __REG(0x4190002C) /* SSP Port 3 Programmable Serial Protocol */ |
1731 | #define SSTSA_P3 __REG(0x41900030) /* SSP Port 3 Tx Timeslot Active */ | ||
1732 | #define SSRSA_P3 __REG(0x41900034) /* SSP Port 3 Rx Timeslot Active */ | ||
1733 | #define SSTSS_P3 __REG(0x41900038) /* SSP Port 3 Timeslot Status */ | ||
1734 | #define SSACD_P3 __REG(0x4190003C) /* SSP Port 3 Audio Clock Divider */ | ||
1724 | #else /* PXA255 (only port 2) and PXA26x ports*/ | 1735 | #else /* PXA255 (only port 2) and PXA26x ports*/ |
1725 | #define SSTO_P1 __REG(0x41000028) /* SSP Port 1 Time Out Register */ | 1736 | #define SSTO_P1 __REG(0x41000028) /* SSP Port 1 Time Out Register */ |
1726 | #define SSPSP_P1 __REG(0x4100002C) /* SSP Port 1 Programmable Serial Protocol */ | 1737 | #define SSPSP_P1 __REG(0x4100002C) /* SSP Port 1 Programmable Serial Protocol */ |
@@ -1747,6 +1758,10 @@ | |||
1747 | #define SSDR_P(x) (*(((x) == 1) ? &SSDR_P1 : ((x) == 2) ? &SSDR_P2 : ((x) == 3) ? &SSDR_P3 : NULL)) | 1758 | #define SSDR_P(x) (*(((x) == 1) ? &SSDR_P1 : ((x) == 2) ? &SSDR_P2 : ((x) == 3) ? &SSDR_P3 : NULL)) |
1748 | #define SSTO_P(x) (*(((x) == 1) ? &SSTO_P1 : ((x) == 2) ? &SSTO_P2 : ((x) == 3) ? &SSTO_P3 : NULL)) | 1759 | #define SSTO_P(x) (*(((x) == 1) ? &SSTO_P1 : ((x) == 2) ? &SSTO_P2 : ((x) == 3) ? &SSTO_P3 : NULL)) |
1749 | #define SSPSP_P(x) (*(((x) == 1) ? &SSPSP_P1 : ((x) == 2) ? &SSPSP_P2 : ((x) == 3) ? &SSPSP_P3 : NULL)) | 1760 | #define SSPSP_P(x) (*(((x) == 1) ? &SSPSP_P1 : ((x) == 2) ? &SSPSP_P2 : ((x) == 3) ? &SSPSP_P3 : NULL)) |
1761 | #define SSTSA_P(x) (*(((x) == 1) ? &SSTSA_P1 : ((x) == 2) ? &SSTSA_P2 : ((x) == 3) ? &SSTSA_P3 : NULL)) | ||
1762 | #define SSRSA_P(x) (*(((x) == 1) ? &SSRSA_P1 : ((x) == 2) ? &SSRSA_P2 : ((x) == 3) ? &SSRSA_P3 : NULL)) | ||
1763 | #define SSTSS_P(x) (*(((x) == 1) ? &SSTSS_P1 : ((x) == 2) ? &SSTSS_P2 : ((x) == 3) ? &SSTSS_P3 : NULL)) | ||
1764 | #define SSACD_P(x) (*(((x) == 1) ? &SSACD_P1 : ((x) == 2) ? &SSACD_P2 : ((x) == 3) ? &SSACD_P3 : NULL)) | ||
1750 | 1765 | ||
1751 | /* | 1766 | /* |
1752 | * MultiMediaCard (MMC) controller | 1767 | * MultiMediaCard (MMC) controller |
diff --git a/include/asm-arm/arch-pxa/system.h b/include/asm-arm/arch-pxa/system.h index 840a46bfbc54..1d56a3ef89fd 100644 --- a/include/asm-arm/arch-pxa/system.h +++ b/include/asm-arm/arch-pxa/system.h | |||
@@ -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/proc-fns.h> | ||
13 | #include "hardware.h" | 14 | #include "hardware.h" |
14 | #include "pxa-regs.h" | 15 | #include "pxa-regs.h" |
15 | 16 | ||
diff --git a/include/asm-arm/arch-pxa/timex.h b/include/asm-arm/arch-pxa/timex.h index aa125ec56a32..2473bb51d0a6 100644 --- a/include/asm-arm/arch-pxa/timex.h +++ b/include/asm-arm/arch-pxa/timex.h | |||
@@ -10,7 +10,6 @@ | |||
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | 13 | ||
15 | #if defined(CONFIG_PXA25x) | 14 | #if defined(CONFIG_PXA25x) |
16 | /* PXA250/210 timer base */ | 15 | /* PXA250/210 timer base */ |
diff --git a/include/asm-arm/arch-realview/io.h b/include/asm-arm/arch-realview/io.h index d444a68ac330..c70f1dfbe135 100644 --- a/include/asm-arm/arch-realview/io.h +++ b/include/asm-arm/arch-realview/io.h | |||
@@ -29,6 +29,5 @@ static inline void __iomem *__io(unsigned long addr) | |||
29 | 29 | ||
30 | #define __io(a) __io(a) | 30 | #define __io(a) __io(a) |
31 | #define __mem_pci(a) (a) | 31 | #define __mem_pci(a) (a) |
32 | #define __mem_isa(a) (a) | ||
33 | 32 | ||
34 | #endif | 33 | #endif |
diff --git a/include/asm-arm/arch-realview/smp.h b/include/asm-arm/arch-realview/smp.h index fc87783e8e8b..515819efd046 100644 --- a/include/asm-arm/arch-realview/smp.h +++ b/include/asm-arm/arch-realview/smp.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef ASMARM_ARCH_SMP_H | 1 | #ifndef ASMARM_ARCH_SMP_H |
2 | #define ASMARM_ARCH_SMP_H | 2 | #define ASMARM_ARCH_SMP_H |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | 4 | ||
6 | #include <asm/hardware/gic.h> | 5 | #include <asm/hardware/gic.h> |
7 | 6 | ||
diff --git a/include/asm-arm/arch-s3c2410/debug-macro.S b/include/asm-arm/arch-s3c2410/debug-macro.S index 5f8223e700d3..b7d15d125458 100644 --- a/include/asm-arm/arch-s3c2410/debug-macro.S +++ b/include/asm-arm/arch-s3c2410/debug-macro.S | |||
@@ -33,7 +33,7 @@ | |||
33 | .endm | 33 | .endm |
34 | 34 | ||
35 | .macro senduart,rd,rx | 35 | .macro senduart,rd,rx |
36 | str \rd, [\rx, # S3C2410_UTXH ] | 36 | strb \rd, [\rx, # S3C2410_UTXH ] |
37 | .endm | 37 | .endm |
38 | 38 | ||
39 | .macro busyuart, rd, rx | 39 | .macro busyuart, rd, rx |
@@ -42,6 +42,12 @@ | |||
42 | beq 1001f @ | 42 | beq 1001f @ |
43 | @ FIFO enabled... | 43 | @ FIFO enabled... |
44 | 1003: | 44 | 1003: |
45 | @ check for arm920 vs arm926. currently assume all arm926 | ||
46 | @ devices have an 64 byte FIFO identical to the s3c2440 | ||
47 | mrc p15, 0, \rd, c0, c0 | ||
48 | and \rd, \rd, #0xff0 | ||
49 | teq \rd, #0x260 | ||
50 | beq 1004f | ||
45 | mrc p15, 0, \rd, c1, c0 | 51 | mrc p15, 0, \rd, c1, c0 |
46 | tst \rd, #1 | 52 | tst \rd, #1 |
47 | addeq \rd, \rx, #(S3C24XX_PA_GPIO - S3C24XX_PA_UART) | 53 | addeq \rd, \rx, #(S3C24XX_PA_GPIO - S3C24XX_PA_UART) |
@@ -50,7 +56,7 @@ | |||
50 | ldr \rd, [ \rd, # S3C2410_GSTATUS1 - S3C2410_GPIOREG(0) ] | 56 | ldr \rd, [ \rd, # S3C2410_GSTATUS1 - S3C2410_GPIOREG(0) ] |
51 | and \rd, \rd, #0x00ff0000 | 57 | and \rd, \rd, #0x00ff0000 |
52 | teq \rd, #0x00440000 @ is it 2440? | 58 | teq \rd, #0x00440000 @ is it 2440? |
53 | 59 | 1004: | |
54 | ldr \rd, [ \rx, # S3C2410_UFSTAT ] | 60 | ldr \rd, [ \rx, # S3C2410_UFSTAT ] |
55 | moveq \rd, \rd, lsr #SHIFT_2440TXF | 61 | moveq \rd, \rd, lsr #SHIFT_2440TXF |
56 | tst \rd, #S3C2410_UFSTAT_TXFULL | 62 | tst \rd, #S3C2410_UFSTAT_TXFULL |
diff --git a/include/asm-arm/arch-s3c2410/dma.h b/include/asm-arm/arch-s3c2410/dma.h index b011e14f3bc6..72964f9b8414 100644 --- a/include/asm-arm/arch-s3c2410/dma.h +++ b/include/asm-arm/arch-s3c2410/dma.h | |||
@@ -18,7 +18,6 @@ | |||
18 | #ifndef __ASM_ARCH_DMA_H | 18 | #ifndef __ASM_ARCH_DMA_H |
19 | #define __ASM_ARCH_DMA_H __FILE__ | 19 | #define __ASM_ARCH_DMA_H __FILE__ |
20 | 20 | ||
21 | #include <linux/config.h> | ||
22 | #include <linux/sysdev.h> | 21 | #include <linux/sysdev.h> |
23 | #include "hardware.h" | 22 | #include "hardware.h" |
24 | 23 | ||
diff --git a/include/asm-arm/arch-s3c2410/entry-macro.S b/include/asm-arm/arch-s3c2410/entry-macro.S index 894c35cf3b1e..e09a6b8ec153 100644 --- a/include/asm-arm/arch-s3c2410/entry-macro.S +++ b/include/asm-arm/arch-s3c2410/entry-macro.S | |||
@@ -18,8 +18,6 @@ | |||
18 | 18 | ||
19 | #define INTPND (0x10) | 19 | #define INTPND (0x10) |
20 | #define INTOFFSET (0x14) | 20 | #define INTOFFSET (0x14) |
21 | #define EXTINTPEND (0xa8) | ||
22 | #define EXTINTMASK (0xa4) | ||
23 | 21 | ||
24 | #include <asm/hardware.h> | 22 | #include <asm/hardware.h> |
25 | #include <asm/arch/irqs.h> | 23 | #include <asm/arch/irqs.h> |
@@ -28,37 +26,23 @@ | |||
28 | 26 | ||
29 | mov \base, #S3C24XX_VA_IRQ | 27 | mov \base, #S3C24XX_VA_IRQ |
30 | 28 | ||
31 | ldr \irqstat, [ \base, #INTPND] | ||
32 | bics \irqnr, \irqstat, #3<<4 @@ only an GPIO IRQ | ||
33 | beq 2000f | ||
34 | |||
35 | @@ try the interrupt offset register, since it is there | 29 | @@ try the interrupt offset register, since it is there |
36 | 30 | ||
31 | ldr \irqstat, [ \base, #INTPND ] | ||
32 | teq \irqstat, #0 | ||
33 | beq 1002f | ||
37 | ldr \irqnr, [ \base, #INTOFFSET ] | 34 | ldr \irqnr, [ \base, #INTOFFSET ] |
38 | mov \tmp, #1 | 35 | mov \tmp, #1 |
39 | tst \irqstat, \tmp, lsl \irqnr | 36 | tst \irqstat, \tmp, lsl \irqnr |
40 | addne \irqnr, \irqnr, #IRQ_EINT0 | ||
41 | bne 1001f | 37 | bne 1001f |
42 | 38 | ||
43 | @@ the number specified is not a valid irq, so try | 39 | @@ the number specified is not a valid irq, so try |
44 | @@ and work it out for ourselves | 40 | @@ and work it out for ourselves |
45 | 41 | ||
46 | mov \irqnr, #IRQ_EINT0 @@ start here | 42 | mov \irqnr, #0 @@ start here |
47 | b 3000f | ||
48 | |||
49 | 2000: | ||
50 | @@ load the GPIO interrupt register, and check it | ||
51 | |||
52 | add \tmp, \base, #S3C24XX_VA_GPIO - S3C24XX_VA_IRQ | ||
53 | ldr \irqstat, [ \tmp, # EXTINTPEND ] | ||
54 | ldr \irqnr, [ \tmp, # EXTINTMASK ] | ||
55 | bics \irqstat, \irqstat, \irqnr | ||
56 | beq 1001f | ||
57 | |||
58 | mov \irqnr, #(IRQ_EINT4 - 4) | ||
59 | 43 | ||
60 | @@ work out which irq (if any) we got | 44 | @@ work out which irq (if any) we got |
61 | 3000: | 45 | |
62 | movs \tmp, \irqstat, lsl#16 | 46 | movs \tmp, \irqstat, lsl#16 |
63 | addeq \irqnr, \irqnr, #16 | 47 | addeq \irqnr, \irqnr, #16 |
64 | moveq \irqstat, \irqstat, lsr#16 | 48 | moveq \irqstat, \irqstat, lsr#16 |
@@ -75,9 +59,9 @@ | |||
75 | addeq \irqnr, \irqnr, #1 | 59 | addeq \irqnr, \irqnr, #1 |
76 | 60 | ||
77 | @@ we have the value | 61 | @@ we have the value |
78 | movs \irqnr, \irqnr | ||
79 | |||
80 | 1001: | 62 | 1001: |
63 | adds \irqnr, \irqnr, #IRQ_EINT0 | ||
64 | 1002: | ||
81 | @@ exit here, Z flag unset if IRQ | 65 | @@ exit here, Z flag unset if IRQ |
82 | 66 | ||
83 | .endm | 67 | .endm |
diff --git a/include/asm-arm/arch-s3c2410/map.h b/include/asm-arm/arch-s3c2410/map.h index c380d264a847..fae2766ff32b 100644 --- a/include/asm-arm/arch-s3c2410/map.h +++ b/include/asm-arm/arch-s3c2410/map.h | |||
@@ -126,9 +126,18 @@ | |||
126 | #define S3C24XX_SZ_IIS SZ_1M | 126 | #define S3C24XX_SZ_IIS SZ_1M |
127 | 127 | ||
128 | /* GPIO ports */ | 128 | /* GPIO ports */ |
129 | #define S3C24XX_VA_GPIO S3C2410_ADDR(0x00E00000) | 129 | |
130 | /* the calculation for the VA of this must ensure that | ||
131 | * it is the same distance apart from the UART in the | ||
132 | * phsyical address space, as the initial mapping for the IO | ||
133 | * is done as a 1:1 maping. This puts it (currently) at | ||
134 | * 0xF6800000, which is not in the way of any current mapping | ||
135 | * by the base system. | ||
136 | */ | ||
137 | |||
130 | #define S3C2400_PA_GPIO (0x15600000) | 138 | #define S3C2400_PA_GPIO (0x15600000) |
131 | #define S3C2410_PA_GPIO (0x56000000) | 139 | #define S3C2410_PA_GPIO (0x56000000) |
140 | #define S3C24XX_VA_GPIO ((S3C2410_PA_GPIO - S3C24XX_PA_UART) + S3C24XX_VA_UART) | ||
132 | #define S3C24XX_SZ_GPIO SZ_1M | 141 | #define S3C24XX_SZ_GPIO SZ_1M |
133 | 142 | ||
134 | /* RTC */ | 143 | /* RTC */ |
@@ -227,4 +236,20 @@ | |||
227 | #define S3C24XX_PA_SPI S3C2410_PA_SPI | 236 | #define S3C24XX_PA_SPI S3C2410_PA_SPI |
228 | #endif | 237 | #endif |
229 | 238 | ||
239 | /* deal with the registers that move under the 2412/2413 */ | ||
240 | |||
241 | #if defined(CONFIG_CPU_S3C2412) || defined(CONFIG_CPU_S3C2413) | ||
242 | #ifndef __ASSEMBLY__ | ||
243 | extern void __iomem *s3c24xx_va_gpio2; | ||
244 | #endif | ||
245 | #ifdef CONFIG_CPU_S3C2412_ONLY | ||
246 | #define S3C24XX_VA_GPIO2 (S3C24XX_VA_GPIO + 0x10) | ||
247 | #else | ||
248 | #define S3C24XX_VA_GPIO2 s3c24xx_va_gpio2 | ||
249 | #endif | ||
250 | #else | ||
251 | #define s3c24xx_va_gpio2 S3C24XX_VA_GPIO | ||
252 | #define S3C24XX_VA_GPIO2 S3C24XX_VA_GPIO | ||
253 | #endif | ||
254 | |||
230 | #endif /* __ASM_ARCH_MAP_H */ | 255 | #endif /* __ASM_ARCH_MAP_H */ |
diff --git a/include/asm-arm/arch-s3c2410/regs-clock.h b/include/asm-arm/arch-s3c2410/regs-clock.h index 34360706e016..a7c61feb8433 100644 --- a/include/asm-arm/arch-s3c2410/regs-clock.h +++ b/include/asm-arm/arch-s3c2410/regs-clock.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* linux/include/asm/arch-s3c2410/regs-clock.h | 1 | /* linux/include/asm/arch-s3c2410/regs-clock.h |
2 | * | 2 | * |
3 | * Copyright (c) 2003,2004,2005 Simtec Electronics <linux@simtec.co.uk> | 3 | * Copyright (c) 2003,2004,2005,2006 Simtec Electronics <linux@simtec.co.uk> |
4 | * http://armlinux.simtec.co.uk/ | 4 | * http://armlinux.simtec.co.uk/ |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
@@ -114,7 +114,7 @@ s3c2410_get_pll(unsigned int pllval, unsigned int baseclk) | |||
114 | 114 | ||
115 | #endif /* __ASSEMBLY__ */ | 115 | #endif /* __ASSEMBLY__ */ |
116 | 116 | ||
117 | #ifdef CONFIG_CPU_S3C2440 | 117 | #if defined(CONFIG_CPU_S3C2440) || defined(CONFIG_CPU_S3C2442) |
118 | 118 | ||
119 | /* extra registers */ | 119 | /* extra registers */ |
120 | #define S3C2440_CAMDIVN S3C2410_CLKREG(0x18) | 120 | #define S3C2440_CAMDIVN S3C2410_CLKREG(0x18) |
@@ -136,7 +136,70 @@ s3c2410_get_pll(unsigned int pllval, unsigned int baseclk) | |||
136 | #define S3C2440_CAMDIVN_HCLK4_HALF (1<<9) | 136 | #define S3C2440_CAMDIVN_HCLK4_HALF (1<<9) |
137 | #define S3C2440_CAMDIVN_DVSEN (1<<12) | 137 | #define S3C2440_CAMDIVN_DVSEN (1<<12) |
138 | 138 | ||
139 | #endif /* CONFIG_CPU_S3C2440 */ | 139 | #define S3C2442_CAMDIVN_CAMCLK_DIV3 (1<<5) |
140 | 140 | ||
141 | #endif /* CONFIG_CPU_S3C2440 or CONFIG_CPU_S3C2442 */ | ||
142 | |||
143 | #if defined(CONFIG_CPU_S3C2412) || defined(CONFIG_CPU_S3C2413) | ||
144 | |||
145 | #define S3C2412_OSCSET S3C2410_CLKREG(0x18) | ||
146 | #define S3C2412_CLKSRC S3C2410_CLKREG(0x1C) | ||
147 | |||
148 | #define S3C2412_PLLCON_OFF (1<<20) | ||
149 | |||
150 | #define S3C2412_CLKDIVN_PDIVN (1<<2) | ||
151 | #define S3C2412_CLKDIVN_HDIVN_MASK (3<<0) | ||
152 | #define S3C2421_CLKDIVN_ARMDIVN (1<<3) | ||
153 | #define S3C2412_CLKDIVN_USB48DIV (1<<6) | ||
154 | #define S3C2412_CLKDIVN_UARTDIV_MASK (15<<8) | ||
155 | #define S3C2412_CLKDIVN_UARTDIV_SHIFT (8) | ||
156 | #define S3C2412_CLKDIVN_I2SDIV_MASK (15<<12) | ||
157 | #define S3C2412_CLKDIVN_I2SDIV_SHIFT (12) | ||
158 | #define S3C2412_CLKDIVN_CAMDIV_MASK (15<<16) | ||
159 | #define S3C2412_CLKDIVN_CAMDIV_SHIFT (16) | ||
160 | |||
161 | #define S3C2412_CLKCON_WDT (1<<28) | ||
162 | #define S3C2412_CLKCON_SPI (1<<27) | ||
163 | #define S3C2412_CLKCON_IIS (1<<26) | ||
164 | #define S3C2412_CLKCON_IIC (1<<25) | ||
165 | #define S3C2412_CLKCON_ADC (1<<24) | ||
166 | #define S3C2412_CLKCON_RTC (1<<23) | ||
167 | #define S3C2412_CLKCON_GPIO (1<<22) | ||
168 | #define S3C2412_CLKCON_UART2 (1<<21) | ||
169 | #define S3C2412_CLKCON_UART1 (1<<20) | ||
170 | #define S3C2412_CLKCON_UART0 (1<<19) | ||
171 | #define S3C2412_CLKCON_SDI (1<<18) | ||
172 | #define S3C2412_CLKCON_PWMT (1<<17) | ||
173 | #define S3C2412_CLKCON_USBD (1<<16) | ||
174 | #define S3C2412_CLKCON_CAMCLK (1<<15) | ||
175 | #define S3C2412_CLKCON_UARTCLK (1<<14) | ||
176 | /* missing 13 */ | ||
177 | #define S3C2412_CLKCON_USB_HOST48 (1<<12) | ||
178 | #define S3C2412_CLKCON_USB_DEV48 (1<<11) | ||
179 | #define S3C2412_CLKCON_HCLKdiv2 (1<<10) | ||
180 | #define S3C2412_CLKCON_HCLKx2 (1<<9) | ||
181 | #define S3C2412_CLKCON_SDRAM (1<<8) | ||
182 | /* missing 7 */ | ||
183 | #define S3C2412_CLKCON_USBH S3C2410_CLKCON_USBH | ||
184 | #define S3C2412_CLKCON_LCDC S3C2410_CLKCON_LCDC | ||
185 | #define S3C2412_CLKCON_NAND S3C2410_CLKCON_NAND | ||
186 | #define S3C2412_CLKCON_DMA3 (1<<3) | ||
187 | #define S3C2412_CLKCON_DMA2 (1<<2) | ||
188 | #define S3C2412_CLKCON_DMA1 (1<<1) | ||
189 | #define S3C2412_CLKCON_DMA0 (1<<0) | ||
190 | |||
191 | /* clock sourec controls */ | ||
192 | |||
193 | #define S3C2412_CLKSRC_EXTCLKDIV_MASK (7 << 0) | ||
194 | #define S3C2412_CLKSRC_EXTCLKDIV_SHIFT (0) | ||
195 | #define S3C2412_CLKSRC_MDIVCLK_EXTCLKDIV (1<<3) | ||
196 | #define S3C2412_CLKSRC_MSYSCLK_MPLL (1<<4) | ||
197 | #define S3C2412_CLKSRC_USYSCLK_UPLL (1<<5) | ||
198 | #define S3C2412_CLKSRC_UARTCLK_MPLL (1<<8) | ||
199 | #define S3C2412_CLKSRC_I2SCLK_MPLL (1<<9) | ||
200 | #define S3C2412_CLKSRC_USBCLK_HCLK (1<<10) | ||
201 | #define S3C2412_CLKSRC_CAMCLK_HCLK (1<<11) | ||
202 | |||
203 | #endif /* CONFIG_CPU_S3C2412 | CONFIG_CPU_S3C2413 */ | ||
141 | 204 | ||
142 | #endif /* __ASM_ARM_REGS_CLOCK */ | 205 | #endif /* __ASM_ARM_REGS_CLOCK */ |
diff --git a/include/asm-arm/arch-s3c2410/regs-dsc.h b/include/asm-arm/arch-s3c2410/regs-dsc.h index a023b0434efe..84aca61cbaa3 100644 --- a/include/asm-arm/arch-s3c2410/regs-dsc.h +++ b/include/asm-arm/arch-s3c2410/regs-dsc.h | |||
@@ -23,6 +23,9 @@ | |||
23 | #define S3C2440_DSC0 S3C2410_GPIOREG(0xc4) | 23 | #define S3C2440_DSC0 S3C2410_GPIOREG(0xc4) |
24 | #define S3C2440_DSC1 S3C2410_GPIOREG(0xc8) | 24 | #define S3C2440_DSC1 S3C2410_GPIOREG(0xc8) |
25 | 25 | ||
26 | #define S3C2412_DSC0 S3C2410_GPIOREG(0xdc) | ||
27 | #define S3C2412_DSC1 S3C2410_GPIOREG(0xe0) | ||
28 | |||
26 | #define S3C2440_SELECT_DSC0 (0) | 29 | #define S3C2440_SELECT_DSC0 (0) |
27 | #define S3C2440_SELECT_DSC1 (1<<31) | 30 | #define S3C2440_SELECT_DSC1 (1<<31) |
28 | 31 | ||
@@ -170,7 +173,7 @@ | |||
170 | #define S3C2440_DSC1_CS1_4mA (3<<2) | 173 | #define S3C2440_DSC1_CS1_4mA (3<<2) |
171 | #define S3C2440_DSC1_CS1_MASK (3<<2) | 174 | #define S3C2440_DSC1_CS1_MASK (3<<2) |
172 | 175 | ||
173 | #define S3C2440_DSC1_CS0 (S3C2440_SELECT_DSC1 | 0 | 176 | #define S3C2440_DSC1_CS0 (S3C2440_SELECT_DSC1 | 0) |
174 | #define S3C2440_DSC1_CS0_10mA (0<<0) | 177 | #define S3C2440_DSC1_CS0_10mA (0<<0) |
175 | #define S3C2440_DSC1_CS0_8mA (1<<0) | 178 | #define S3C2440_DSC1_CS0_8mA (1<<0) |
176 | #define S3C2440_DSC1_CS0_6mA (2<<0) | 179 | #define S3C2440_DSC1_CS0_6mA (2<<0) |
diff --git a/include/asm-arm/arch-s3c2410/regs-gpio.h b/include/asm-arm/arch-s3c2410/regs-gpio.h index d2574084697f..6dd17f0f84e0 100644 --- a/include/asm-arm/arch-s3c2410/regs-gpio.h +++ b/include/asm-arm/arch-s3c2410/regs-gpio.h | |||
@@ -45,7 +45,7 @@ | |||
45 | #define S3C24XX_MISCCR S3C2400_MISCCR | 45 | #define S3C24XX_MISCCR S3C2400_MISCCR |
46 | #else | 46 | #else |
47 | #define S3C24XX_GPIO_BASE(x) S3C2410_GPIO_BASE(x) | 47 | #define S3C24XX_GPIO_BASE(x) S3C2410_GPIO_BASE(x) |
48 | #define S3C24XX_MISCCR S3C2410_MISCCR | 48 | #define S3C24XX_MISCCR S3C24XX_GPIOREG2(0x80) |
49 | #endif /* CONFIG_CPU_S3C2400 */ | 49 | #endif /* CONFIG_CPU_S3C2400 */ |
50 | 50 | ||
51 | 51 | ||
@@ -73,9 +73,15 @@ | |||
73 | #define S3C2410_GPIO_SFN2 (0xFFFFFFF2) /* not available on A */ | 73 | #define S3C2410_GPIO_SFN2 (0xFFFFFFF2) /* not available on A */ |
74 | #define S3C2410_GPIO_SFN3 (0xFFFFFFF3) /* not available on A */ | 74 | #define S3C2410_GPIO_SFN3 (0xFFFFFFF3) /* not available on A */ |
75 | 75 | ||
76 | /* configure GPIO ports A..G */ | 76 | /* register address for the GPIO registers. |
77 | * S3C24XX_GPIOREG2 is for the second set of registers in the | ||
78 | * GPIO which move between s3c2410 and s3c2412 type systems */ | ||
77 | 79 | ||
78 | #define S3C2410_GPIOREG(x) ((x) + S3C24XX_VA_GPIO) | 80 | #define S3C2410_GPIOREG(x) ((x) + S3C24XX_VA_GPIO) |
81 | #define S3C24XX_GPIOREG2(x) ((x) + S3C24XX_VA_GPIO2) | ||
82 | |||
83 | |||
84 | /* configure GPIO ports A..G */ | ||
79 | 85 | ||
80 | /* port A - S3C2410: 22bits, zero in bit X makes pin X output | 86 | /* port A - S3C2410: 22bits, zero in bit X makes pin X output |
81 | * S3C2400: 18bits, zero in bit X makes pin X output | 87 | * S3C2400: 18bits, zero in bit X makes pin X output |
@@ -450,12 +456,14 @@ | |||
450 | #define S3C2410_GPD0_OUTP (0x01 << 0) | 456 | #define S3C2410_GPD0_OUTP (0x01 << 0) |
451 | #define S3C2410_GPD0_VD8 (0x02 << 0) | 457 | #define S3C2410_GPD0_VD8 (0x02 << 0) |
452 | #define S3C2400_GPD0_VFRAME (0x02 << 0) | 458 | #define S3C2400_GPD0_VFRAME (0x02 << 0) |
459 | #define S3C2442_GPD0_nSPICS1 (0x03 << 0) | ||
453 | 460 | ||
454 | #define S3C2410_GPD1 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 1) | 461 | #define S3C2410_GPD1 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 1) |
455 | #define S3C2410_GPD1_INP (0x00 << 2) | 462 | #define S3C2410_GPD1_INP (0x00 << 2) |
456 | #define S3C2410_GPD1_OUTP (0x01 << 2) | 463 | #define S3C2410_GPD1_OUTP (0x01 << 2) |
457 | #define S3C2410_GPD1_VD9 (0x02 << 2) | 464 | #define S3C2410_GPD1_VD9 (0x02 << 2) |
458 | #define S3C2400_GPD1_VM (0x02 << 2) | 465 | #define S3C2400_GPD1_VM (0x02 << 2) |
466 | #define S3C2442_GPD1_SPICLK1 (0x03 << 2) | ||
459 | 467 | ||
460 | #define S3C2410_GPD2 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 2) | 468 | #define S3C2410_GPD2 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 2) |
461 | #define S3C2410_GPD2_INP (0x00 << 4) | 469 | #define S3C2410_GPD2_INP (0x00 << 4) |
@@ -858,6 +866,7 @@ | |||
858 | #define S3C2410_GPG12_OUTP (0x01 << 24) | 866 | #define S3C2410_GPG12_OUTP (0x01 << 24) |
859 | #define S3C2410_GPG12_EINT20 (0x02 << 24) | 867 | #define S3C2410_GPG12_EINT20 (0x02 << 24) |
860 | #define S3C2410_GPG12_XMON (0x03 << 24) | 868 | #define S3C2410_GPG12_XMON (0x03 << 24) |
869 | #define S3C2442_GPG12_nSPICS0 (0x03 << 24) | ||
861 | 870 | ||
862 | #define S3C2410_GPG13 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 13) | 871 | #define S3C2410_GPG13 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 13) |
863 | #define S3C2410_GPG13_INP (0x00 << 26) | 872 | #define S3C2410_GPG13_INP (0x00 << 26) |
@@ -943,17 +952,25 @@ | |||
943 | #define S3C2410_GPH9_INP (0x00 << 18) | 952 | #define S3C2410_GPH9_INP (0x00 << 18) |
944 | #define S3C2410_GPH9_OUTP (0x01 << 18) | 953 | #define S3C2410_GPH9_OUTP (0x01 << 18) |
945 | #define S3C2410_GPH9_CLKOUT0 (0x02 << 18) | 954 | #define S3C2410_GPH9_CLKOUT0 (0x02 << 18) |
955 | #define S3C2442_GPH9_nSPICS0 (0x03 << 18) | ||
946 | 956 | ||
947 | #define S3C2410_GPH10 S3C2410_GPIONO(S3C2410_GPIO_BANKH, 10) | 957 | #define S3C2410_GPH10 S3C2410_GPIONO(S3C2410_GPIO_BANKH, 10) |
948 | #define S3C2410_GPH10_INP (0x00 << 20) | 958 | #define S3C2410_GPH10_INP (0x00 << 20) |
949 | #define S3C2410_GPH10_OUTP (0x01 << 20) | 959 | #define S3C2410_GPH10_OUTP (0x01 << 20) |
950 | #define S3C2410_GPH10_CLKOUT1 (0x02 << 20) | 960 | #define S3C2410_GPH10_CLKOUT1 (0x02 << 20) |
951 | 961 | ||
962 | /* The S3C2412 and S3C2413 move the GPJ register set to after | ||
963 | * GPH, which means all registers after 0x80 are now offset by 0x10 | ||
964 | * for the 2412/2413 from the 2410/2440/2442 | ||
965 | */ | ||
966 | |||
952 | /* miscellaneous control */ | 967 | /* miscellaneous control */ |
953 | #define S3C2400_MISCCR S3C2410_GPIOREG(0x54) | 968 | #define S3C2400_MISCCR S3C2410_GPIOREG(0x54) |
954 | #define S3C2410_MISCCR S3C2410_GPIOREG(0x80) | 969 | #define S3C2410_MISCCR S3C2410_GPIOREG(0x80) |
955 | #define S3C2410_DCLKCON S3C2410_GPIOREG(0x84) | 970 | #define S3C2410_DCLKCON S3C2410_GPIOREG(0x84) |
956 | 971 | ||
972 | #define S3C24XX_DCLKCON S3C24XX_GPIOREG2(0x84) | ||
973 | |||
957 | /* see clock.h for dclk definitions */ | 974 | /* see clock.h for dclk definitions */ |
958 | 975 | ||
959 | /* pullup control on databus */ | 976 | /* pullup control on databus */ |
@@ -981,6 +998,8 @@ | |||
981 | #define S3C2410_MISCCR_CLK0_DCLK0 (5<<4) | 998 | #define S3C2410_MISCCR_CLK0_DCLK0 (5<<4) |
982 | #define S3C2410_MISCCR_CLK0_MASK (7<<4) | 999 | #define S3C2410_MISCCR_CLK0_MASK (7<<4) |
983 | 1000 | ||
1001 | #define S3C2412_MISCCR_CLK0_RTC (2<<4) | ||
1002 | |||
984 | #define S3C2410_MISCCR_CLK1_MPLL (0<<8) | 1003 | #define S3C2410_MISCCR_CLK1_MPLL (0<<8) |
985 | #define S3C2410_MISCCR_CLK1_UPLL (1<<8) | 1004 | #define S3C2410_MISCCR_CLK1_UPLL (1<<8) |
986 | #define S3C2410_MISCCR_CLK1_FCLK (2<<8) | 1005 | #define S3C2410_MISCCR_CLK1_FCLK (2<<8) |
@@ -989,6 +1008,8 @@ | |||
989 | #define S3C2410_MISCCR_CLK1_DCLK1 (5<<8) | 1008 | #define S3C2410_MISCCR_CLK1_DCLK1 (5<<8) |
990 | #define S3C2410_MISCCR_CLK1_MASK (7<<8) | 1009 | #define S3C2410_MISCCR_CLK1_MASK (7<<8) |
991 | 1010 | ||
1011 | #define S3C2412_MISCCR_CLK1_CLKsrc (0<<8) | ||
1012 | |||
992 | #define S3C2410_MISCCR_USBSUSPND0 (1<<12) | 1013 | #define S3C2410_MISCCR_USBSUSPND0 (1<<12) |
993 | #define S3C2410_MISCCR_USBSUSPND1 (1<<13) | 1014 | #define S3C2410_MISCCR_USBSUSPND1 (1<<13) |
994 | 1015 | ||
@@ -996,7 +1017,7 @@ | |||
996 | 1017 | ||
997 | #define S3C2410_MISCCR_nEN_SCLK0 (1<<17) | 1018 | #define S3C2410_MISCCR_nEN_SCLK0 (1<<17) |
998 | #define S3C2410_MISCCR_nEN_SCLK1 (1<<18) | 1019 | #define S3C2410_MISCCR_nEN_SCLK1 (1<<18) |
999 | #define S3C2410_MISCCR_nEN_SCLKE (1<<19) | 1020 | #define S3C2410_MISCCR_nEN_SCLKE (1<<19) /* not 2412 */ |
1000 | #define S3C2410_MISCCR_SDSLEEP (7<<17) | 1021 | #define S3C2410_MISCCR_SDSLEEP (7<<17) |
1001 | 1022 | ||
1002 | /* external interrupt control... */ | 1023 | /* external interrupt control... */ |
@@ -1013,6 +1034,10 @@ | |||
1013 | #define S3C2410_EXTINT1 S3C2410_GPIOREG(0x8C) | 1034 | #define S3C2410_EXTINT1 S3C2410_GPIOREG(0x8C) |
1014 | #define S3C2410_EXTINT2 S3C2410_GPIOREG(0x90) | 1035 | #define S3C2410_EXTINT2 S3C2410_GPIOREG(0x90) |
1015 | 1036 | ||
1037 | #define S3C24XX_EXTINT0 S3C24XX_GPIOREG2(0x88) | ||
1038 | #define S3C24XX_EXTINT1 S3C24XX_GPIOREG2(0x8C) | ||
1039 | #define S3C24XX_EXTINT2 S3C24XX_GPIOREG2(0x90) | ||
1040 | |||
1016 | /* values for S3C2410_EXTINT0/1/2 */ | 1041 | /* values for S3C2410_EXTINT0/1/2 */ |
1017 | #define S3C2410_EXTINT_LOWLEV (0x00) | 1042 | #define S3C2410_EXTINT_LOWLEV (0x00) |
1018 | #define S3C2410_EXTINT_HILEV (0x01) | 1043 | #define S3C2410_EXTINT_HILEV (0x01) |
@@ -1026,6 +1051,11 @@ | |||
1026 | #define S3C2410_EINFLT2 S3C2410_GPIOREG(0x9C) | 1051 | #define S3C2410_EINFLT2 S3C2410_GPIOREG(0x9C) |
1027 | #define S3C2410_EINFLT3 S3C2410_GPIOREG(0xA0) | 1052 | #define S3C2410_EINFLT3 S3C2410_GPIOREG(0xA0) |
1028 | 1053 | ||
1054 | #define S3C24XX_EINFLT0 S3C24XX_GPIOREG2(0x94) | ||
1055 | #define S3C24XX_EINFLT1 S3C24XX_GPIOREG2(0x98) | ||
1056 | #define S3C24XX_EINFLT2 S3C24XX_GPIOREG2(0x9C) | ||
1057 | #define S3C24XX_EINFLT3 S3C24XX_GPIOREG2(0xA0) | ||
1058 | |||
1029 | /* values for interrupt filtering */ | 1059 | /* values for interrupt filtering */ |
1030 | #define S3C2410_EINTFLT_PCLK (0x00) | 1060 | #define S3C2410_EINTFLT_PCLK (0x00) |
1031 | #define S3C2410_EINTFLT_EXTCLK (1<<7) | 1061 | #define S3C2410_EINTFLT_EXTCLK (1<<7) |
@@ -1035,6 +1065,7 @@ | |||
1035 | 1065 | ||
1036 | /* GSTATUS have miscellaneous information in them | 1066 | /* GSTATUS have miscellaneous information in them |
1037 | * | 1067 | * |
1068 | * These move between s3c2410 and s3c2412 style systems. | ||
1038 | */ | 1069 | */ |
1039 | 1070 | ||
1040 | #define S3C2410_GSTATUS0 S3C2410_GPIOREG(0x0AC) | 1071 | #define S3C2410_GSTATUS0 S3C2410_GPIOREG(0x0AC) |
@@ -1043,6 +1074,18 @@ | |||
1043 | #define S3C2410_GSTATUS3 S3C2410_GPIOREG(0x0B8) | 1074 | #define S3C2410_GSTATUS3 S3C2410_GPIOREG(0x0B8) |
1044 | #define S3C2410_GSTATUS4 S3C2410_GPIOREG(0x0BC) | 1075 | #define S3C2410_GSTATUS4 S3C2410_GPIOREG(0x0BC) |
1045 | 1076 | ||
1077 | #define S3C2412_GSTATUS0 S3C2410_GPIOREG(0x0BC) | ||
1078 | #define S3C2412_GSTATUS1 S3C2410_GPIOREG(0x0C0) | ||
1079 | #define S3C2412_GSTATUS2 S3C2410_GPIOREG(0x0C4) | ||
1080 | #define S3C2412_GSTATUS3 S3C2410_GPIOREG(0x0C8) | ||
1081 | #define S3C2412_GSTATUS4 S3C2410_GPIOREG(0x0CC) | ||
1082 | |||
1083 | #define S3C24XX_GSTATUS0 S3C24XX_GPIOREG2(0x0AC) | ||
1084 | #define S3C24XX_GSTATUS1 S3C24XX_GPIOREG2(0x0B0) | ||
1085 | #define S3C24XX_GSTATUS2 S3C24XX_GPIOREG2(0x0B4) | ||
1086 | #define S3C24XX_GSTATUS3 S3C24XX_GPIOREG2(0x0B8) | ||
1087 | #define S3C24XX_GSTATUS4 S3C24XX_GPIOREG2(0x0BC) | ||
1088 | |||
1046 | #define S3C2410_GSTATUS0_nWAIT (1<<3) | 1089 | #define S3C2410_GSTATUS0_nWAIT (1<<3) |
1047 | #define S3C2410_GSTATUS0_NCON (1<<2) | 1090 | #define S3C2410_GSTATUS0_NCON (1<<2) |
1048 | #define S3C2410_GSTATUS0_RnB (1<<1) | 1091 | #define S3C2410_GSTATUS0_RnB (1<<1) |
@@ -1050,7 +1093,9 @@ | |||
1050 | 1093 | ||
1051 | #define S3C2410_GSTATUS1_IDMASK (0xffff0000) | 1094 | #define S3C2410_GSTATUS1_IDMASK (0xffff0000) |
1052 | #define S3C2410_GSTATUS1_2410 (0x32410000) | 1095 | #define S3C2410_GSTATUS1_2410 (0x32410000) |
1096 | #define S3C2410_GSTATUS1_2412 (0x32412001) | ||
1053 | #define S3C2410_GSTATUS1_2440 (0x32440000) | 1097 | #define S3C2410_GSTATUS1_2440 (0x32440000) |
1098 | #define S3C2410_GSTATUS1_2442 (0x32440aaa) | ||
1054 | 1099 | ||
1055 | #define S3C2410_GSTATUS2_WTRESET (1<<2) | 1100 | #define S3C2410_GSTATUS2_WTRESET (1<<2) |
1056 | #define S3C2410_GSTATUS2_OFFRESET (1<<1) | 1101 | #define S3C2410_GSTATUS2_OFFRESET (1<<1) |
@@ -1072,5 +1117,22 @@ | |||
1072 | #define S3C2400_OPENCR_OPC_MOSIDIS (0<<5) | 1117 | #define S3C2400_OPENCR_OPC_MOSIDIS (0<<5) |
1073 | #define S3C2400_OPENCR_OPC_MOSIEN (1<<5) | 1118 | #define S3C2400_OPENCR_OPC_MOSIEN (1<<5) |
1074 | 1119 | ||
1120 | /* 2412/2413 sleep configuration registers */ | ||
1121 | |||
1122 | #define S3C2412_GPBSLPCON S3C2410_GPIOREG(0x1C) | ||
1123 | #define S3C2412_GPCSLPCON S3C2410_GPIOREG(0x2C) | ||
1124 | #define S3C2412_GPDSLPCON S3C2410_GPIOREG(0x3C) | ||
1125 | #define S3C2412_GPESLPCON S3C2410_GPIOREG(0x4C) | ||
1126 | #define S3C2412_GPFSLPCON S3C2410_GPIOREG(0x5C) | ||
1127 | #define S3C2412_GPGSLPCON S3C2410_GPIOREG(0x6C) | ||
1128 | #define S3C2412_GPHSLPCON S3C2410_GPIOREG(0x7C) | ||
1129 | |||
1130 | /* definitions for each pin bit */ | ||
1131 | #define S3C2412_SLPCON_LOW(x) ( 0x00 << ((x) * 2)) | ||
1132 | #define S3C2412_SLPCON_HI(x) ( 0x01 << ((x) * 2)) | ||
1133 | #define S3C2412_SLPCON_IN(x) ( 0x02 << ((x) * 2)) | ||
1134 | #define S3C2412_SLPCON_PDWN(x) ( 0x03 << ((x) * 2)) | ||
1135 | #define S3C2412_SLPCON_MASK(x) ( 0x03 << ((x) * 2)) | ||
1136 | |||
1075 | #endif /* __ASM_ARCH_REGS_GPIO_H */ | 1137 | #endif /* __ASM_ARCH_REGS_GPIO_H */ |
1076 | 1138 | ||
diff --git a/include/asm-arm/arch-s3c2410/regs-gpioj.h b/include/asm-arm/arch-s3c2410/regs-gpioj.h index 3ad2324acc39..18edae50d0b8 100644 --- a/include/asm-arm/arch-s3c2410/regs-gpioj.h +++ b/include/asm-arm/arch-s3c2410/regs-gpioj.h | |||
@@ -32,6 +32,11 @@ | |||
32 | #define S3C2440_GPJDAT S3C2410_GPIOREG(0xd4) | 32 | #define S3C2440_GPJDAT S3C2410_GPIOREG(0xd4) |
33 | #define S3C2440_GPJUP S3C2410_GPIOREG(0xd8) | 33 | #define S3C2440_GPJUP S3C2410_GPIOREG(0xd8) |
34 | 34 | ||
35 | #define S3C2413_GPJCON S3C2410_GPIOREG(0x80) | ||
36 | #define S3C2413_GPJDAT S3C2410_GPIOREG(0x84) | ||
37 | #define S3C2413_GPJUP S3C2410_GPIOREG(0x88) | ||
38 | #define S3C2413_GPJSLPCON S3C2410_GPIOREG(0x8C) | ||
39 | |||
35 | #define S3C2440_GPJ0 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 0) | 40 | #define S3C2440_GPJ0 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 0) |
36 | #define S3C2440_GPJ0_INP (0x00 << 0) | 41 | #define S3C2440_GPJ0_INP (0x00 << 0) |
37 | #define S3C2440_GPJ0_OUTP (0x01 << 0) | 42 | #define S3C2440_GPJ0_OUTP (0x01 << 0) |
diff --git a/include/asm-arm/arch-s3c2410/regs-irq.h b/include/asm-arm/arch-s3c2410/regs-irq.h index 24b7292df79e..572fca5d9acf 100644 --- a/include/asm-arm/arch-s3c2410/regs-irq.h +++ b/include/asm-arm/arch-s3c2410/regs-irq.h | |||
@@ -23,6 +23,7 @@ | |||
23 | 23 | ||
24 | #define S3C2410_IRQREG(x) ((x) + S3C24XX_VA_IRQ) | 24 | #define S3C2410_IRQREG(x) ((x) + S3C24XX_VA_IRQ) |
25 | #define S3C2410_EINTREG(x) ((x) + S3C24XX_VA_GPIO) | 25 | #define S3C2410_EINTREG(x) ((x) + S3C24XX_VA_GPIO) |
26 | #define S3C24XX_EINTREG(x) ((x) + S3C24XX_VA_GPIO2) | ||
26 | 27 | ||
27 | #define S3C2410_SRCPND S3C2410_IRQREG(0x000) | 28 | #define S3C2410_SRCPND S3C2410_IRQREG(0x000) |
28 | #define S3C2410_INTMOD S3C2410_IRQREG(0x004) | 29 | #define S3C2410_INTMOD S3C2410_IRQREG(0x004) |
@@ -40,5 +41,10 @@ | |||
40 | 41 | ||
41 | #define S3C2410_EINTMASK S3C2410_EINTREG(0x0A4) | 42 | #define S3C2410_EINTMASK S3C2410_EINTREG(0x0A4) |
42 | #define S3C2410_EINTPEND S3C2410_EINTREG(0X0A8) | 43 | #define S3C2410_EINTPEND S3C2410_EINTREG(0X0A8) |
44 | #define S3C2412_EINTMASK S3C2410_EINTREG(0x0B4) | ||
45 | #define S3C2412_EINTPEND S3C2410_EINTREG(0X0B8) | ||
46 | |||
47 | #define S3C24XX_EINTMASK S3C24XX_EINTREG(0x0A4) | ||
48 | #define S3C24XX_EINTPEND S3C24XX_EINTREG(0X0A8) | ||
43 | 49 | ||
44 | #endif /* ___ASM_ARCH_REGS_IRQ_H */ | 50 | #endif /* ___ASM_ARCH_REGS_IRQ_H */ |
diff --git a/include/asm-arm/arch-s3c2410/regs-serial.h b/include/asm-arm/arch-s3c2410/regs-serial.h index 83b01254c4ac..93f651ae2967 100644 --- a/include/asm-arm/arch-s3c2410/regs-serial.h +++ b/include/asm-arm/arch-s3c2410/regs-serial.h | |||
@@ -82,6 +82,12 @@ | |||
82 | #define S3C2440_UCON2_DIVMASK (7 << 12) | 82 | #define S3C2440_UCON2_DIVMASK (7 << 12) |
83 | #define S3C2440_UCON_DIVSHIFT (12) | 83 | #define S3C2440_UCON_DIVSHIFT (12) |
84 | 84 | ||
85 | #define S3C2412_UCON_CLKMASK (3<<10) | ||
86 | #define S3C2412_UCON_UCLK (1<<10) | ||
87 | #define S3C2412_UCON_USYSCLK (3<<10) | ||
88 | #define S3C2412_UCON_PCLK (0<<10) | ||
89 | #define S3C2412_UCON_PCLK2 (2<<10) | ||
90 | |||
85 | #define S3C2410_UCON_UCLK (1<<10) | 91 | #define S3C2410_UCON_UCLK (1<<10) |
86 | #define S3C2410_UCON_SBREAK (1<<4) | 92 | #define S3C2410_UCON_SBREAK (1<<4) |
87 | 93 | ||
@@ -124,6 +130,15 @@ | |||
124 | #define S3C2410_UMCOM_AFC (1<<4) | 130 | #define S3C2410_UMCOM_AFC (1<<4) |
125 | #define S3C2410_UMCOM_RTS_LOW (1<<0) | 131 | #define S3C2410_UMCOM_RTS_LOW (1<<0) |
126 | 132 | ||
133 | #define S3C2412_UMCON_AFC_63 (0<<5) | ||
134 | #define S3C2412_UMCON_AFC_56 (1<<5) | ||
135 | #define S3C2412_UMCON_AFC_48 (2<<5) | ||
136 | #define S3C2412_UMCON_AFC_40 (3<<5) | ||
137 | #define S3C2412_UMCON_AFC_32 (4<<5) | ||
138 | #define S3C2412_UMCON_AFC_24 (5<<5) | ||
139 | #define S3C2412_UMCON_AFC_16 (6<<5) | ||
140 | #define S3C2412_UMCON_AFC_8 (7<<5) | ||
141 | |||
127 | #define S3C2410_UFSTAT_TXFULL (1<<9) | 142 | #define S3C2410_UFSTAT_TXFULL (1<<9) |
128 | #define S3C2410_UFSTAT_RXFULL (1<<8) | 143 | #define S3C2410_UFSTAT_RXFULL (1<<8) |
129 | #define S3C2410_UFSTAT_TXMASK (15<<4) | 144 | #define S3C2410_UFSTAT_TXMASK (15<<4) |
diff --git a/include/asm-arm/arch-s3c2410/uncompress.h b/include/asm-arm/arch-s3c2410/uncompress.h index a6f6a0e44afa..8e152a05e533 100644 --- a/include/asm-arm/arch-s3c2410/uncompress.h +++ b/include/asm-arm/arch-s3c2410/uncompress.h | |||
@@ -22,7 +22,6 @@ | |||
22 | #ifndef __ASM_ARCH_UNCOMPRESS_H | 22 | #ifndef __ASM_ARCH_UNCOMPRESS_H |
23 | #define __ASM_ARCH_UNCOMPRESS_H | 23 | #define __ASM_ARCH_UNCOMPRESS_H |
24 | 24 | ||
25 | #include <linux/config.h> | ||
26 | 25 | ||
27 | /* defines for UART registers */ | 26 | /* defines for UART registers */ |
28 | #include "asm/arch/regs-serial.h" | 27 | #include "asm/arch/regs-serial.h" |
@@ -82,7 +81,8 @@ static void putc(int ch) | |||
82 | while (1) { | 81 | while (1) { |
83 | level = uart_rd(S3C2410_UFSTAT); | 82 | level = uart_rd(S3C2410_UFSTAT); |
84 | 83 | ||
85 | if (cpuid == S3C2410_GSTATUS1_2440) { | 84 | if (cpuid == S3C2410_GSTATUS1_2440 || |
85 | cpuid == S3C2410_GSTATUS1_2442) { | ||
86 | level &= S3C2440_UFSTAT_TXMASK; | 86 | level &= S3C2440_UFSTAT_TXMASK; |
87 | level >>= S3C2440_UFSTAT_TXSHIFT; | 87 | level >>= S3C2440_UFSTAT_TXSHIFT; |
88 | } else { | 88 | } else { |
@@ -130,7 +130,7 @@ static void arch_decomp_wdog_start(void) | |||
130 | { | 130 | { |
131 | __raw_writel(WDOG_COUNT, S3C2410_WTDAT); | 131 | __raw_writel(WDOG_COUNT, S3C2410_WTDAT); |
132 | __raw_writel(WDOG_COUNT, S3C2410_WTCNT); | 132 | __raw_writel(WDOG_COUNT, S3C2410_WTCNT); |
133 | __raw_writel(S3C2410_WTCON_ENABLE | S3C2410_WTCON_DIV128 | S3C2410_WTCON_RSTEN | S3C2410_WTCON_PRESCALE(0x40), S3C2410_WTCON); | 133 | __raw_writel(S3C2410_WTCON_ENABLE | S3C2410_WTCON_DIV128 | S3C2410_WTCON_RSTEN | S3C2410_WTCON_PRESCALE(0x80), S3C2410_WTCON); |
134 | } | 134 | } |
135 | 135 | ||
136 | #else | 136 | #else |
diff --git a/include/asm-arm/arch-sa1100/assabet.h b/include/asm-arm/arch-sa1100/assabet.h index 1f59b368c3f6..d6a1bb5b4944 100644 --- a/include/asm-arm/arch-sa1100/assabet.h +++ b/include/asm-arm/arch-sa1100/assabet.h | |||
@@ -12,7 +12,6 @@ | |||
12 | #ifndef __ASM_ARCH_ASSABET_H | 12 | #ifndef __ASM_ARCH_ASSABET_H |
13 | #define __ASM_ARCH_ASSABET_H | 13 | #define __ASM_ARCH_ASSABET_H |
14 | 14 | ||
15 | #include <linux/config.h> | ||
16 | 15 | ||
17 | /* System Configuration Register flags */ | 16 | /* System Configuration Register flags */ |
18 | 17 | ||
diff --git a/include/asm-arm/arch-sa1100/cerf.h b/include/asm-arm/arch-sa1100/cerf.h index 356d5ba88991..9a19c3d07c1e 100644 --- a/include/asm-arm/arch-sa1100/cerf.h +++ b/include/asm-arm/arch-sa1100/cerf.h | |||
@@ -10,7 +10,6 @@ | |||
10 | #ifndef _INCLUDE_CERF_H_ | 10 | #ifndef _INCLUDE_CERF_H_ |
11 | #define _INCLUDE_CERF_H_ | 11 | #define _INCLUDE_CERF_H_ |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | 13 | ||
15 | #define CERF_ETH_IO 0xf0000000 | 14 | #define CERF_ETH_IO 0xf0000000 |
16 | #define CERF_ETH_IRQ IRQ_GPIO26 | 15 | #define CERF_ETH_IRQ IRQ_GPIO26 |
diff --git a/include/asm-arm/arch-sa1100/collie.h b/include/asm-arm/arch-sa1100/collie.h index d49e5ff63ca4..14a344aa3cc7 100644 --- a/include/asm-arm/arch-sa1100/collie.h +++ b/include/asm-arm/arch-sa1100/collie.h | |||
@@ -13,7 +13,6 @@ | |||
13 | #ifndef __ASM_ARCH_COLLIE_H | 13 | #ifndef __ASM_ARCH_COLLIE_H |
14 | #define __ASM_ARCH_COLLIE_H | 14 | #define __ASM_ARCH_COLLIE_H |
15 | 15 | ||
16 | #include <linux/config.h> | ||
17 | 16 | ||
18 | #define COLLIE_SCP_CHARGE_ON SCOOP_GPCR_PA11 | 17 | #define COLLIE_SCP_CHARGE_ON SCOOP_GPCR_PA11 |
19 | #define COLLIE_SCP_DIAG_BOOT1 SCOOP_GPCR_PA12 | 18 | #define COLLIE_SCP_DIAG_BOOT1 SCOOP_GPCR_PA12 |
diff --git a/include/asm-arm/arch-sa1100/dma.h b/include/asm-arm/arch-sa1100/dma.h index 02575d72ac6b..6b7917a2e77a 100644 --- a/include/asm-arm/arch-sa1100/dma.h +++ b/include/asm-arm/arch-sa1100/dma.h | |||
@@ -10,7 +10,6 @@ | |||
10 | #ifndef __ASM_ARCH_DMA_H | 10 | #ifndef __ASM_ARCH_DMA_H |
11 | #define __ASM_ARCH_DMA_H | 11 | #define __ASM_ARCH_DMA_H |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include "hardware.h" | 13 | #include "hardware.h" |
15 | 14 | ||
16 | 15 | ||
diff --git a/include/asm-arm/arch-sa1100/hardware.h b/include/asm-arm/arch-sa1100/hardware.h index ee008a5484f3..1abd7cfc8bce 100644 --- a/include/asm-arm/arch-sa1100/hardware.h +++ b/include/asm-arm/arch-sa1100/hardware.h | |||
@@ -12,7 +12,6 @@ | |||
12 | #ifndef __ASM_ARCH_HARDWARE_H | 12 | #ifndef __ASM_ARCH_HARDWARE_H |
13 | #define __ASM_ARCH_HARDWARE_H | 13 | #define __ASM_ARCH_HARDWARE_H |
14 | 14 | ||
15 | #include <linux/config.h> | ||
16 | 15 | ||
17 | #define UNCACHEABLE_ADDR 0xfa050000 | 16 | #define UNCACHEABLE_ADDR 0xfa050000 |
18 | 17 | ||
diff --git a/include/asm-arm/arch-sa1100/ide.h b/include/asm-arm/arch-sa1100/ide.h index 2153538069c7..98b10bcf9f1b 100644 --- a/include/asm-arm/arch-sa1100/ide.h +++ b/include/asm-arm/arch-sa1100/ide.h | |||
@@ -9,7 +9,6 @@ | |||
9 | * architectures. | 9 | * architectures. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | ||
13 | #include <asm/irq.h> | 12 | #include <asm/irq.h> |
14 | #include <asm/hardware.h> | 13 | #include <asm/hardware.h> |
15 | #include <asm/mach-types.h> | 14 | #include <asm/mach-types.h> |
diff --git a/include/asm-arm/arch-sa1100/io.h b/include/asm-arm/arch-sa1100/io.h index 040ccde7a11e..0756269404b1 100644 --- a/include/asm-arm/arch-sa1100/io.h +++ b/include/asm-arm/arch-sa1100/io.h | |||
@@ -22,6 +22,5 @@ static inline void __iomem *__io(unsigned long addr) | |||
22 | } | 22 | } |
23 | #define __io(a) __io(a) | 23 | #define __io(a) __io(a) |
24 | #define __mem_pci(a) (a) | 24 | #define __mem_pci(a) (a) |
25 | #define __mem_isa(a) (a) | ||
26 | 25 | ||
27 | #endif | 26 | #endif |
diff --git a/include/asm-arm/arch-sa1100/irqs.h b/include/asm-arm/arch-sa1100/irqs.h index eabd3be3d705..d7940683efb1 100644 --- a/include/asm-arm/arch-sa1100/irqs.h +++ b/include/asm-arm/arch-sa1100/irqs.h | |||
@@ -7,7 +7,6 @@ | |||
7 | * | 7 | * |
8 | * 2001/11/14 RMK Cleaned up and standardised a lot of the IRQs. | 8 | * 2001/11/14 RMK Cleaned up and standardised a lot of the IRQs. |
9 | */ | 9 | */ |
10 | #include <linux/config.h> | ||
11 | 10 | ||
12 | #define IRQ_GPIO0 0 | 11 | #define IRQ_GPIO0 0 |
13 | #define IRQ_GPIO1 1 | 12 | #define IRQ_GPIO1 1 |
diff --git a/include/asm-arm/arch-sa1100/memory.h b/include/asm-arm/arch-sa1100/memory.h index a29fac1387ca..1ff172dc8e33 100644 --- a/include/asm-arm/arch-sa1100/memory.h +++ b/include/asm-arm/arch-sa1100/memory.h | |||
@@ -7,7 +7,6 @@ | |||
7 | #ifndef __ASM_ARCH_MEMORY_H | 7 | #ifndef __ASM_ARCH_MEMORY_H |
8 | #define __ASM_ARCH_MEMORY_H | 8 | #define __ASM_ARCH_MEMORY_H |
9 | 9 | ||
10 | #include <linux/config.h> | ||
11 | #include <asm/sizes.h> | 10 | #include <asm/sizes.h> |
12 | 11 | ||
13 | /* | 12 | /* |
diff --git a/include/asm-arm/arch-sa1100/system.h b/include/asm-arm/arch-sa1100/system.h index 0f0612f79b2b..aef91e3b63fe 100644 --- a/include/asm-arm/arch-sa1100/system.h +++ b/include/asm-arm/arch-sa1100/system.h | |||
@@ -3,7 +3,6 @@ | |||
3 | * | 3 | * |
4 | * Copyright (c) 1999 Nicolas Pitre <nico@cam.org> | 4 | * Copyright (c) 1999 Nicolas Pitre <nico@cam.org> |
5 | */ | 5 | */ |
6 | #include <linux/config.h> | ||
7 | #include <asm/hardware.h> | 6 | #include <asm/hardware.h> |
8 | 7 | ||
9 | static inline void arch_idle(void) | 8 | static inline void arch_idle(void) |
diff --git a/include/asm-arm/arch-versatile/io.h b/include/asm-arm/arch-versatile/io.h index 47e904cf25c7..c4d01948e00b 100644 --- a/include/asm-arm/arch-versatile/io.h +++ b/include/asm-arm/arch-versatile/io.h | |||
@@ -28,6 +28,5 @@ static inline void __iomem *__io(unsigned long addr) | |||
28 | } | 28 | } |
29 | #define __io(a) __io(a) | 29 | #define __io(a) __io(a) |
30 | #define __mem_pci(a) (a) | 30 | #define __mem_pci(a) (a) |
31 | #define __mem_isa(a) (a) | ||
32 | 31 | ||
33 | #endif | 32 | #endif |
diff --git a/include/asm-arm/arch-versatile/system.h b/include/asm-arm/arch-versatile/system.h index 8889a189739f..71c6254c0d9b 100644 --- a/include/asm-arm/arch-versatile/system.h +++ b/include/asm-arm/arch-versatile/system.h | |||
@@ -36,16 +36,14 @@ static inline void arch_idle(void) | |||
36 | 36 | ||
37 | static inline void arch_reset(char mode) | 37 | static inline void arch_reset(char mode) |
38 | { | 38 | { |
39 | unsigned int hdr_ctrl = (IO_ADDRESS(VERSATILE_SYS_BASE) + VERSATILE_SYS_RESETCTL_OFFSET); | 39 | u32 val; |
40 | unsigned int val; | ||
41 | 40 | ||
42 | /* | 41 | val = __raw_readl(IO_ADDRESS(VERSATILE_SYS_RESETCTL)) & ~0x7; |
43 | * To reset, we hit the on-board reset register | 42 | val |= 0x105; |
44 | * in the system FPGA | 43 | |
45 | */ | 44 | __raw_writel(0xa05f, IO_ADDRESS(VERSATILE_SYS_LOCK)); |
46 | val = __raw_readl(hdr_ctrl); | 45 | __raw_writel(val, IO_ADDRESS(VERSATILE_SYS_RESETCTL)); |
47 | val |= VERSATILE_SYS_CTRL_RESET_CONFIGCLR; | 46 | __raw_writel(0, IO_ADDRESS(VERSATILE_SYS_LOCK)); |
48 | __raw_writel(val, hdr_ctrl); | ||
49 | } | 47 | } |
50 | 48 | ||
51 | #endif | 49 | #endif |
diff --git a/include/asm-arm/atomic.h b/include/asm-arm/atomic.h index 3d7283d84405..4b0ce3e7de9a 100644 --- a/include/asm-arm/atomic.h +++ b/include/asm-arm/atomic.h | |||
@@ -11,7 +11,6 @@ | |||
11 | #ifndef __ASM_ARM_ATOMIC_H | 11 | #ifndef __ASM_ARM_ATOMIC_H |
12 | #define __ASM_ARM_ATOMIC_H | 12 | #define __ASM_ARM_ATOMIC_H |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | #include <linux/compiler.h> | 14 | #include <linux/compiler.h> |
16 | 15 | ||
17 | typedef struct { volatile int counter; } atomic_t; | 16 | typedef struct { volatile int counter; } atomic_t; |
diff --git a/include/asm-arm/bug.h b/include/asm-arm/bug.h index 5ab8216f5204..7fb02138f585 100644 --- a/include/asm-arm/bug.h +++ b/include/asm-arm/bug.h | |||
@@ -2,7 +2,6 @@ | |||
2 | #define _ASMARM_BUG_H | 2 | #define _ASMARM_BUG_H |
3 | 3 | ||
4 | #include <linux/config.h> | 4 | #include <linux/config.h> |
5 | #include <linux/stddef.h> | ||
6 | 5 | ||
7 | #ifdef CONFIG_BUG | 6 | #ifdef CONFIG_BUG |
8 | #ifdef CONFIG_DEBUG_BUGVERBOSE | 7 | #ifdef CONFIG_DEBUG_BUGVERBOSE |
diff --git a/include/asm-arm/byteorder.h b/include/asm-arm/byteorder.h index 17eaf8bdf092..e6f7fcdc73b0 100644 --- a/include/asm-arm/byteorder.h +++ b/include/asm-arm/byteorder.h | |||
@@ -22,16 +22,18 @@ static inline __attribute_const__ __u32 ___arch__swab32(__u32 x) | |||
22 | { | 22 | { |
23 | __u32 t; | 23 | __u32 t; |
24 | 24 | ||
25 | if (__builtin_constant_p(x)) { | 25 | #ifndef __thumb__ |
26 | t = x ^ ((x << 16) | (x >> 16)); /* eor r1,r0,r0,ror #16 */ | 26 | if (!__builtin_constant_p(x)) { |
27 | } else { | ||
28 | /* | 27 | /* |
29 | * The compiler needs a bit of a hint here to always do the | 28 | * The compiler needs a bit of a hint here to always do the |
30 | * right thing and not screw it up to different degrees | 29 | * right thing and not screw it up to different degrees |
31 | * depending on the gcc version. | 30 | * depending on the gcc version. |
32 | */ | 31 | */ |
33 | asm ("eor\t%0, %1, %1, ror #16" : "=r" (t) : "r" (x)); | 32 | asm ("eor\t%0, %1, %1, ror #16" : "=r" (t) : "r" (x)); |
34 | } | 33 | } else |
34 | #endif | ||
35 | t = x ^ ((x << 16) | (x >> 16)); /* eor r1,r0,r0,ror #16 */ | ||
36 | |||
35 | x = (x << 24) | (x >> 8); /* mov r0,r0,ror #8 */ | 37 | x = (x << 24) | (x >> 8); /* mov r0,r0,ror #8 */ |
36 | t &= ~0x00FF0000; /* bic r1,r1,#0x00FF0000 */ | 38 | t &= ~0x00FF0000; /* bic r1,r1,#0x00FF0000 */ |
37 | x ^= (t >> 8); /* eor r0,r0,r1,lsr #8 */ | 39 | x ^= (t >> 8); /* eor r0,r0,r1,lsr #8 */ |
diff --git a/include/asm-arm/cacheflush.h b/include/asm-arm/cacheflush.h index 746be56b1b70..fe0c744e0266 100644 --- a/include/asm-arm/cacheflush.h +++ b/include/asm-arm/cacheflush.h | |||
@@ -10,7 +10,6 @@ | |||
10 | #ifndef _ASMARM_CACHEFLUSH_H | 10 | #ifndef _ASMARM_CACHEFLUSH_H |
11 | #define _ASMARM_CACHEFLUSH_H | 11 | #define _ASMARM_CACHEFLUSH_H |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/sched.h> | 13 | #include <linux/sched.h> |
15 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
16 | 15 | ||
diff --git a/include/asm-arm/cpu.h b/include/asm-arm/cpu.h index 751bc7462074..715426b9b08e 100644 --- a/include/asm-arm/cpu.h +++ b/include/asm-arm/cpu.h | |||
@@ -10,7 +10,6 @@ | |||
10 | #ifndef __ASM_ARM_CPU_H | 10 | #ifndef __ASM_ARM_CPU_H |
11 | #define __ASM_ARM_CPU_H | 11 | #define __ASM_ARM_CPU_H |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/percpu.h> | 13 | #include <linux/percpu.h> |
15 | 14 | ||
16 | struct cpuinfo_arm { | 15 | struct cpuinfo_arm { |
diff --git a/include/asm-arm/dma-mapping.h b/include/asm-arm/dma-mapping.h index 63ca7412a462..55eb4dc3253d 100644 --- a/include/asm-arm/dma-mapping.h +++ b/include/asm-arm/dma-mapping.h | |||
@@ -3,7 +3,6 @@ | |||
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | 5 | ||
6 | #include <linux/config.h> | ||
7 | #include <linux/mm.h> /* need struct page */ | 6 | #include <linux/mm.h> /* need struct page */ |
8 | 7 | ||
9 | #include <asm/scatterlist.h> | 8 | #include <asm/scatterlist.h> |
diff --git a/include/asm-arm/dma.h b/include/asm-arm/dma.h index 49c01e2bf7c8..9f2c5305c260 100644 --- a/include/asm-arm/dma.h +++ b/include/asm-arm/dma.h | |||
@@ -3,7 +3,6 @@ | |||
3 | 3 | ||
4 | typedef unsigned int dmach_t; | 4 | typedef unsigned int dmach_t; |
5 | 5 | ||
6 | #include <linux/config.h> | ||
7 | #include <linux/spinlock.h> | 6 | #include <linux/spinlock.h> |
8 | #include <asm/system.h> | 7 | #include <asm/system.h> |
9 | #include <asm/scatterlist.h> | 8 | #include <asm/scatterlist.h> |
diff --git a/include/asm-arm/elf.h b/include/asm-arm/elf.h index 2d44b42d1847..71061ca5c5d0 100644 --- a/include/asm-arm/elf.h +++ b/include/asm-arm/elf.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef __ASMARM_ELF_H | 1 | #ifndef __ASMARM_ELF_H |
2 | #define __ASMARM_ELF_H | 2 | #define __ASMARM_ELF_H |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | 4 | ||
6 | /* | 5 | /* |
7 | * ELF register definitions.. | 6 | * ELF register definitions.. |
diff --git a/include/asm-arm/fpstate.h b/include/asm-arm/fpstate.h index 52bae088a185..132c3c5628b2 100644 --- a/include/asm-arm/fpstate.h +++ b/include/asm-arm/fpstate.h | |||
@@ -11,7 +11,6 @@ | |||
11 | #ifndef __ASM_ARM_FPSTATE_H | 11 | #ifndef __ASM_ARM_FPSTATE_H |
12 | #define __ASM_ARM_FPSTATE_H | 12 | #define __ASM_ARM_FPSTATE_H |
13 | 13 | ||
14 | #include <linux/config.h> | ||
15 | 14 | ||
16 | #ifndef __ASSEMBLY__ | 15 | #ifndef __ASSEMBLY__ |
17 | 16 | ||
diff --git a/include/asm-arm/glue.h b/include/asm-arm/glue.h index 223e0d6c41be..0cc5d3b10ce2 100644 --- a/include/asm-arm/glue.h +++ b/include/asm-arm/glue.h | |||
@@ -15,7 +15,6 @@ | |||
15 | */ | 15 | */ |
16 | #ifdef __KERNEL__ | 16 | #ifdef __KERNEL__ |
17 | 17 | ||
18 | #include <linux/config.h> | ||
19 | 18 | ||
20 | #ifdef __STDC__ | 19 | #ifdef __STDC__ |
21 | #define ____glue(name,fn) name##fn | 20 | #define ____glue(name,fn) name##fn |
diff --git a/include/asm-arm/hardirq.h b/include/asm-arm/hardirq.h index 1cbb173bf5b1..182310b99195 100644 --- a/include/asm-arm/hardirq.h +++ b/include/asm-arm/hardirq.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef __ASM_HARDIRQ_H | 1 | #ifndef __ASM_HARDIRQ_H |
2 | #define __ASM_HARDIRQ_H | 2 | #define __ASM_HARDIRQ_H |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | #include <linux/cache.h> | 4 | #include <linux/cache.h> |
6 | #include <linux/threads.h> | 5 | #include <linux/threads.h> |
7 | #include <asm/irq.h> | 6 | #include <asm/irq.h> |
diff --git a/include/asm-arm/hardware/dec21285.h b/include/asm-arm/hardware/dec21285.h index 6685e3fb97b1..546f7077be9c 100644 --- a/include/asm-arm/hardware/dec21285.h +++ b/include/asm-arm/hardware/dec21285.h | |||
@@ -18,7 +18,6 @@ | |||
18 | #define DC21285_PCI_IO 0x7c000000 | 18 | #define DC21285_PCI_IO 0x7c000000 |
19 | #define DC21285_PCI_MEM 0x80000000 | 19 | #define DC21285_PCI_MEM 0x80000000 |
20 | 20 | ||
21 | #include <linux/config.h> | ||
22 | #ifndef __ASSEMBLY__ | 21 | #ifndef __ASSEMBLY__ |
23 | #include <asm/hardware.h> | 22 | #include <asm/hardware.h> |
24 | #define DC21285_IO(x) ((volatile unsigned long *)(ARMCSR_BASE+(x))) | 23 | #define DC21285_IO(x) ((volatile unsigned long *)(ARMCSR_BASE+(x))) |
diff --git a/include/asm-arm/hardware/iomd.h b/include/asm-arm/hardware/iomd.h index 82fa2c279a18..396e55ad06c6 100644 --- a/include/asm-arm/hardware/iomd.h +++ b/include/asm-arm/hardware/iomd.h | |||
@@ -13,7 +13,6 @@ | |||
13 | #ifndef __ASMARM_HARDWARE_IOMD_H | 13 | #ifndef __ASMARM_HARDWARE_IOMD_H |
14 | #define __ASMARM_HARDWARE_IOMD_H | 14 | #define __ASMARM_HARDWARE_IOMD_H |
15 | 15 | ||
16 | #include <linux/config.h> | ||
17 | 16 | ||
18 | #ifndef __ASSEMBLY__ | 17 | #ifndef __ASSEMBLY__ |
19 | 18 | ||
diff --git a/include/asm-arm/hardware/sharpsl_pm.h b/include/asm-arm/hardware/sharpsl_pm.h index 36983e5f3665..ecf15b83956f 100644 --- a/include/asm-arm/hardware/sharpsl_pm.h +++ b/include/asm-arm/hardware/sharpsl_pm.h | |||
@@ -16,6 +16,7 @@ struct sharpsl_charger_machinfo { | |||
16 | void (*exit)(void); | 16 | void (*exit)(void); |
17 | int gpio_acin; | 17 | int gpio_acin; |
18 | int gpio_batfull; | 18 | int gpio_batfull; |
19 | int batfull_irq; | ||
19 | int gpio_batlock; | 20 | int gpio_batlock; |
20 | int gpio_fatal; | 21 | int gpio_fatal; |
21 | void (*discharge)(int); | 22 | void (*discharge)(int); |
@@ -34,9 +35,19 @@ struct sharpsl_charger_machinfo { | |||
34 | #define SHARPSL_STATUS_FATAL 7 | 35 | #define SHARPSL_STATUS_FATAL 7 |
35 | unsigned long (*charger_wakeup)(void); | 36 | unsigned long (*charger_wakeup)(void); |
36 | int (*should_wakeup)(unsigned int resume_on_alarm); | 37 | int (*should_wakeup)(unsigned int resume_on_alarm); |
38 | void (*backlight_limit)(int); | ||
39 | int (*backlight_get_status) (void); | ||
40 | int charge_on_volt; | ||
41 | int charge_on_temp; | ||
42 | int charge_acin_high; | ||
43 | int charge_acin_low; | ||
44 | int fatal_acin_volt; | ||
45 | int fatal_noacin_volt; | ||
37 | int bat_levels; | 46 | int bat_levels; |
38 | struct battery_thresh *bat_levels_noac; | 47 | struct battery_thresh *bat_levels_noac; |
39 | struct battery_thresh *bat_levels_acin; | 48 | struct battery_thresh *bat_levels_acin; |
49 | struct battery_thresh *bat_levels_noac_bl; | ||
50 | struct battery_thresh *bat_levels_acin_bl; | ||
40 | int status_high_acin; | 51 | int status_high_acin; |
41 | int status_low_acin; | 52 | int status_low_acin; |
42 | int status_high_noac; | 53 | int status_high_noac; |
diff --git a/include/asm-arm/irq.h b/include/asm-arm/irq.h index 60b5105c9c93..66e67e60bc56 100644 --- a/include/asm-arm/irq.h +++ b/include/asm-arm/irq.h | |||
@@ -47,10 +47,6 @@ void disable_irq_wake(unsigned int irq); | |||
47 | void enable_irq_wake(unsigned int irq); | 47 | void enable_irq_wake(unsigned int irq); |
48 | int setup_irq(unsigned int, struct irqaction *); | 48 | int setup_irq(unsigned int, struct irqaction *); |
49 | 49 | ||
50 | struct irqaction; | ||
51 | struct pt_regs; | ||
52 | int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *); | ||
53 | |||
54 | extern void migrate_irqs(void); | 50 | extern void migrate_irqs(void); |
55 | #endif | 51 | #endif |
56 | 52 | ||
diff --git a/include/asm-arm/leds.h b/include/asm-arm/leds.h index 88ce4124f854..12290ea55801 100644 --- a/include/asm-arm/leds.h +++ b/include/asm-arm/leds.h | |||
@@ -13,7 +13,6 @@ | |||
13 | #ifndef ASM_ARM_LEDS_H | 13 | #ifndef ASM_ARM_LEDS_H |
14 | #define ASM_ARM_LEDS_H | 14 | #define ASM_ARM_LEDS_H |
15 | 15 | ||
16 | #include <linux/config.h> | ||
17 | 16 | ||
18 | typedef enum { | 17 | typedef enum { |
19 | led_idle_start, | 18 | led_idle_start, |
diff --git a/include/asm-arm/mach/serial_at91rm9200.h b/include/asm-arm/mach/serial_at91.h index 98f4b0cb883c..1290bb32802d 100644 --- a/include/asm-arm/mach/serial_at91rm9200.h +++ b/include/asm-arm/mach/serial_at91.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/mach/serial_at91rm9200.h | 2 | * linux/include/asm-arm/mach/serial_at91.h |
3 | * | 3 | * |
4 | * Based on serial_sa1100.h by Nicolas Pitre | 4 | * Based on serial_sa1100.h by Nicolas Pitre |
5 | * | 5 | * |
@@ -7,7 +7,6 @@ | |||
7 | * | 7 | * |
8 | * Low level machine dependent UART functions. | 8 | * Low level machine dependent UART functions. |
9 | */ | 9 | */ |
10 | #include <linux/config.h> | ||
11 | 10 | ||
12 | struct uart_port; | 11 | struct uart_port; |
13 | 12 | ||
@@ -15,7 +14,7 @@ struct uart_port; | |||
15 | * This is a temporary structure for registering these | 14 | * This is a temporary structure for registering these |
16 | * functions; it is intended to be discarded after boot. | 15 | * functions; it is intended to be discarded after boot. |
17 | */ | 16 | */ |
18 | struct at91rm9200_port_fns { | 17 | struct at91_port_fns { |
19 | void (*set_mctrl)(struct uart_port *, u_int); | 18 | void (*set_mctrl)(struct uart_port *, u_int); |
20 | u_int (*get_mctrl)(struct uart_port *); | 19 | u_int (*get_mctrl)(struct uart_port *); |
21 | void (*enable_ms)(struct uart_port *); | 20 | void (*enable_ms)(struct uart_port *); |
@@ -26,11 +25,9 @@ struct at91rm9200_port_fns { | |||
26 | }; | 25 | }; |
27 | 26 | ||
28 | #if defined(CONFIG_SERIAL_AT91) | 27 | #if defined(CONFIG_SERIAL_AT91) |
29 | void at91_register_uart_fns(struct at91rm9200_port_fns *fns); | 28 | void at91_register_uart_fns(struct at91_port_fns *fns); |
30 | void at91_register_uart(int idx, int port); | ||
31 | #else | 29 | #else |
32 | #define at91_register_uart_fns(fns) do { } while (0) | 30 | #define at91_register_uart_fns(fns) do { } while (0) |
33 | #define at91_register_uart(idx,port) do { } while (0) | ||
34 | #endif | 31 | #endif |
35 | 32 | ||
36 | 33 | ||
diff --git a/include/asm-arm/mach/serial_sa1100.h b/include/asm-arm/mach/serial_sa1100.h index 9162018585df..20c22bb218d9 100644 --- a/include/asm-arm/mach/serial_sa1100.h +++ b/include/asm-arm/mach/serial_sa1100.h | |||
@@ -7,7 +7,6 @@ | |||
7 | * | 7 | * |
8 | * Low level machine dependent UART functions. | 8 | * Low level machine dependent UART functions. |
9 | */ | 9 | */ |
10 | #include <linux/config.h> | ||
11 | 10 | ||
12 | struct uart_port; | 11 | struct uart_port; |
13 | struct uart_info; | 12 | struct uart_info; |
diff --git a/include/asm-arm/mach/time.h b/include/asm-arm/mach/time.h index 96c6db7dd0e1..9f28073559e8 100644 --- a/include/asm-arm/mach/time.h +++ b/include/asm-arm/mach/time.h | |||
@@ -50,6 +50,7 @@ struct sys_timer { | |||
50 | #define DYN_TICK_ENABLED (1 << 1) | 50 | #define DYN_TICK_ENABLED (1 << 1) |
51 | 51 | ||
52 | struct dyn_tick_timer { | 52 | struct dyn_tick_timer { |
53 | spinlock_t lock; | ||
53 | unsigned int state; /* Current state */ | 54 | unsigned int state; /* Current state */ |
54 | int (*enable)(void); /* Enables dynamic tick */ | 55 | int (*enable)(void); /* Enables dynamic tick */ |
55 | int (*disable)(void); /* Disables dynamic tick */ | 56 | int (*disable)(void); /* Disables dynamic tick */ |
diff --git a/include/asm-arm/memory.h b/include/asm-arm/memory.h index 209289407595..731e321a57d1 100644 --- a/include/asm-arm/memory.h +++ b/include/asm-arm/memory.h | |||
@@ -22,7 +22,6 @@ | |||
22 | #define UL(x) (x) | 22 | #define UL(x) (x) |
23 | #endif | 23 | #endif |
24 | 24 | ||
25 | #include <linux/config.h> | ||
26 | #include <linux/compiler.h> | 25 | #include <linux/compiler.h> |
27 | #include <asm/arch/memory.h> | 26 | #include <asm/arch/memory.h> |
28 | #include <asm/sizes.h> | 27 | #include <asm/sizes.h> |
diff --git a/include/asm-arm/page.h b/include/asm-arm/page.h index a404d2bf0c68..66cfeb5290ea 100644 --- a/include/asm-arm/page.h +++ b/include/asm-arm/page.h | |||
@@ -10,7 +10,6 @@ | |||
10 | #ifndef _ASMARM_PAGE_H | 10 | #ifndef _ASMARM_PAGE_H |
11 | #define _ASMARM_PAGE_H | 11 | #define _ASMARM_PAGE_H |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | 13 | ||
15 | /* PAGE_SHIFT determines the page size */ | 14 | /* PAGE_SHIFT determines the page size */ |
16 | #define PAGE_SHIFT 12 | 15 | #define PAGE_SHIFT 12 |
diff --git a/include/asm-arm/pci.h b/include/asm-arm/pci.h index ead3ced38cb8..f21abd4ddac6 100644 --- a/include/asm-arm/pci.h +++ b/include/asm-arm/pci.h | |||
@@ -2,7 +2,6 @@ | |||
2 | #define ASMARM_PCI_H | 2 | #define ASMARM_PCI_H |
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | #include <linux/config.h> | ||
6 | #include <asm-generic/pci-dma-compat.h> | 5 | #include <asm-generic/pci-dma-compat.h> |
7 | 6 | ||
8 | #include <asm/hardware.h> /* for PCIBIOS_MIN_* */ | 7 | #include <asm/hardware.h> /* for PCIBIOS_MIN_* */ |
diff --git a/include/asm-arm/proc-fns.h b/include/asm-arm/proc-fns.h index 106045edb862..e9310895e79d 100644 --- a/include/asm-arm/proc-fns.h +++ b/include/asm-arm/proc-fns.h | |||
@@ -13,7 +13,6 @@ | |||
13 | 13 | ||
14 | #ifdef __KERNEL__ | 14 | #ifdef __KERNEL__ |
15 | 15 | ||
16 | #include <linux/config.h> | ||
17 | 16 | ||
18 | /* | 17 | /* |
19 | * Work out if we need multiple CPU support | 18 | * Work out if we need multiple CPU support |
diff --git a/include/asm-arm/ptrace.h b/include/asm-arm/ptrace.h index 77adb7fa169b..2bebe3dc0a30 100644 --- a/include/asm-arm/ptrace.h +++ b/include/asm-arm/ptrace.h | |||
@@ -10,7 +10,6 @@ | |||
10 | #ifndef __ASM_ARM_PTRACE_H | 10 | #ifndef __ASM_ARM_PTRACE_H |
11 | #define __ASM_ARM_PTRACE_H | 11 | #define __ASM_ARM_PTRACE_H |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | 13 | ||
15 | #define PTRACE_GETREGS 12 | 14 | #define PTRACE_GETREGS 12 |
16 | #define PTRACE_SETREGS 13 | 15 | #define PTRACE_SETREGS 13 |
diff --git a/include/asm-arm/smp.h b/include/asm-arm/smp.h index fe45f7f61223..f67acce387e7 100644 --- a/include/asm-arm/smp.h +++ b/include/asm-arm/smp.h | |||
@@ -10,7 +10,6 @@ | |||
10 | #ifndef __ASM_ARM_SMP_H | 10 | #ifndef __ASM_ARM_SMP_H |
11 | #define __ASM_ARM_SMP_H | 11 | #define __ASM_ARM_SMP_H |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/threads.h> | 13 | #include <linux/threads.h> |
15 | #include <linux/cpumask.h> | 14 | #include <linux/cpumask.h> |
16 | #include <linux/thread_info.h> | 15 | #include <linux/thread_info.h> |
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h index 7c9568d30307..6001febfe63b 100644 --- a/include/asm-arm/system.h +++ b/include/asm-arm/system.h | |||
@@ -3,7 +3,6 @@ | |||
3 | 3 | ||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | 5 | ||
6 | #include <linux/config.h> | ||
7 | 6 | ||
8 | #define CPU_ARCH_UNKNOWN 0 | 7 | #define CPU_ARCH_UNKNOWN 0 |
9 | #define CPU_ARCH_ARMv3 1 | 8 | #define CPU_ARCH_ARMv3 1 |
@@ -108,6 +107,9 @@ extern void __show_regs(struct pt_regs *); | |||
108 | extern int cpu_architecture(void); | 107 | extern int cpu_architecture(void); |
109 | extern void cpu_init(void); | 108 | extern void cpu_init(void); |
110 | 109 | ||
110 | void arm_machine_restart(char mode); | ||
111 | extern void (*arm_pm_restart)(char str); | ||
112 | |||
111 | /* | 113 | /* |
112 | * Intel's XScale3 core supports some v6 features (supersections, L2) | 114 | * 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 | 115 | * but advertises itself as v5 as it does not support the v6 ISA. For |
diff --git a/include/asm-arm/thread_notify.h b/include/asm-arm/thread_notify.h new file mode 100644 index 000000000000..8866e5216840 --- /dev/null +++ b/include/asm-arm/thread_notify.h | |||
@@ -0,0 +1,48 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/thread_notify.h | ||
3 | * | ||
4 | * Copyright (C) 2006 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_THREAD_NOTIFY_H | ||
11 | #define ASMARM_THREAD_NOTIFY_H | ||
12 | |||
13 | #ifdef __KERNEL__ | ||
14 | |||
15 | #ifndef __ASSEMBLY__ | ||
16 | |||
17 | #include <linux/notifier.h> | ||
18 | #include <asm/thread_info.h> | ||
19 | |||
20 | static inline int thread_register_notifier(struct notifier_block *n) | ||
21 | { | ||
22 | extern struct atomic_notifier_head thread_notify_head; | ||
23 | return atomic_notifier_chain_register(&thread_notify_head, n); | ||
24 | } | ||
25 | |||
26 | static inline void thread_unregister_notifier(struct notifier_block *n) | ||
27 | { | ||
28 | extern struct atomic_notifier_head thread_notify_head; | ||
29 | atomic_notifier_chain_unregister(&thread_notify_head, n); | ||
30 | } | ||
31 | |||
32 | static inline void thread_notify(unsigned long rc, struct thread_info *thread) | ||
33 | { | ||
34 | extern struct atomic_notifier_head thread_notify_head; | ||
35 | atomic_notifier_call_chain(&thread_notify_head, rc, thread); | ||
36 | } | ||
37 | |||
38 | #endif | ||
39 | |||
40 | /* | ||
41 | * These are the reason codes for the thread notifier. | ||
42 | */ | ||
43 | #define THREAD_NOTIFY_FLUSH 0 | ||
44 | #define THREAD_NOTIFY_RELEASE 1 | ||
45 | #define THREAD_NOTIFY_SWITCH 2 | ||
46 | |||
47 | #endif | ||
48 | #endif | ||
diff --git a/include/asm-arm/tlbflush.h b/include/asm-arm/tlbflush.h index 728992451dd1..d97fc76189a5 100644 --- a/include/asm-arm/tlbflush.h +++ b/include/asm-arm/tlbflush.h | |||
@@ -10,7 +10,6 @@ | |||
10 | #ifndef _ASMARM_TLBFLUSH_H | 10 | #ifndef _ASMARM_TLBFLUSH_H |
11 | #define _ASMARM_TLBFLUSH_H | 11 | #define _ASMARM_TLBFLUSH_H |
12 | 12 | ||
13 | #include <linux/config.h> | ||
14 | 13 | ||
15 | #ifndef CONFIG_MMU | 14 | #ifndef CONFIG_MMU |
16 | 15 | ||
diff --git a/include/asm-arm/unistd.h b/include/asm-arm/unistd.h index cbf39a56dbe7..1e891f860ef3 100644 --- a/include/asm-arm/unistd.h +++ b/include/asm-arm/unistd.h | |||
@@ -13,8 +13,6 @@ | |||
13 | #ifndef __ASM_ARM_UNISTD_H | 13 | #ifndef __ASM_ARM_UNISTD_H |
14 | #define __ASM_ARM_UNISTD_H | 14 | #define __ASM_ARM_UNISTD_H |
15 | 15 | ||
16 | #include <linux/linkage.h> | ||
17 | |||
18 | #define __NR_OABI_SYSCALL_BASE 0x900000 | 16 | #define __NR_OABI_SYSCALL_BASE 0x900000 |
19 | 17 | ||
20 | #if defined(__thumb__) || defined(__ARM_EABI__) | 18 | #if defined(__thumb__) || defined(__ARM_EABI__) |
@@ -378,6 +376,9 @@ | |||
378 | #undef __NR_ipc | 376 | #undef __NR_ipc |
379 | #endif | 377 | #endif |
380 | 378 | ||
379 | #ifdef __KERNEL__ | ||
380 | #include <linux/linkage.h> | ||
381 | |||
381 | #define __sys2(x) #x | 382 | #define __sys2(x) #x |
382 | #define __sys1(x) __sys2(x) | 383 | #define __sys1(x) __sys2(x) |
383 | 384 | ||
@@ -526,7 +527,6 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6 | |||
526 | __syscall_return(type,__res); \ | 527 | __syscall_return(type,__res); \ |
527 | } | 528 | } |
528 | 529 | ||
529 | #ifdef __KERNEL__ | ||
530 | #define __ARCH_WANT_IPC_PARSE_VERSION | 530 | #define __ARCH_WANT_IPC_PARSE_VERSION |
531 | #define __ARCH_WANT_STAT64 | 531 | #define __ARCH_WANT_STAT64 |
532 | #define __ARCH_WANT_SYS_GETHOSTNAME | 532 | #define __ARCH_WANT_SYS_GETHOSTNAME |
@@ -547,7 +547,6 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6 | |||
547 | #define __ARCH_WANT_OLD_READDIR | 547 | #define __ARCH_WANT_OLD_READDIR |
548 | #define __ARCH_WANT_SYS_SOCKETCALL | 548 | #define __ARCH_WANT_SYS_SOCKETCALL |
549 | #endif | 549 | #endif |
550 | #endif | ||
551 | 550 | ||
552 | #ifdef __KERNEL_SYSCALLS__ | 551 | #ifdef __KERNEL_SYSCALLS__ |
553 | 552 | ||
@@ -571,7 +570,7 @@ asmlinkage long sys_rt_sigaction(int sig, | |||
571 | struct sigaction __user *oact, | 570 | struct sigaction __user *oact, |
572 | size_t sigsetsize); | 571 | size_t sigsetsize); |
573 | 572 | ||
574 | #endif | 573 | #endif /* __KERNEL_SYSCALLS__ */ |
575 | 574 | ||
576 | /* | 575 | /* |
577 | * "Conditional" syscalls | 576 | * "Conditional" syscalls |
@@ -581,4 +580,5 @@ asmlinkage long sys_rt_sigaction(int sig, | |||
581 | */ | 580 | */ |
582 | #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") | 581 | #define cond_syscall(x) asm(".weak\t" #x "\n\t.set\t" #x ",sys_ni_syscall") |
583 | 582 | ||
583 | #endif /* __KERNEL__ */ | ||
584 | #endif /* __ASM_ARM_UNISTD_H */ | 584 | #endif /* __ASM_ARM_UNISTD_H */ |
diff --git a/include/asm-arm/vga.h b/include/asm-arm/vga.h index 926e5ee128e9..1e0b913c3d71 100644 --- a/include/asm-arm/vga.h +++ b/include/asm-arm/vga.h | |||
@@ -4,7 +4,7 @@ | |||
4 | #include <asm/hardware.h> | 4 | #include <asm/hardware.h> |
5 | #include <asm/io.h> | 5 | #include <asm/io.h> |
6 | 6 | ||
7 | #define VGA_MAP_MEM(x) (PCIMEM_BASE + (x)) | 7 | #define VGA_MAP_MEM(x,s) (PCIMEM_BASE + (x)) |
8 | 8 | ||
9 | #define vga_readb(x) (*((volatile unsigned char *)x)) | 9 | #define vga_readb(x) (*((volatile unsigned char *)x)) |
10 | #define vga_writeb(x,y) (*((volatile unsigned char *)y) = (x)) | 10 | #define vga_writeb(x,y) (*((volatile unsigned char *)y) = (x)) |