diff options
Diffstat (limited to 'include/asm-arm')
235 files changed, 4520 insertions, 1040 deletions
diff --git a/include/asm-arm/Kbuild b/include/asm-arm/Kbuild new file mode 100644 index 00000000000..c68e1680da0 --- /dev/null +++ b/include/asm-arm/Kbuild | |||
@@ -0,0 +1 @@ | |||
include include/asm-generic/Kbuild.asm | |||
diff --git a/include/asm-arm/apm.h b/include/asm-arm/apm.h index 3a50eb759c2..d09113b37e4 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 8d67907fd4f..d710204ac74 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 d8209f8911d..24b51cccde8 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 00000000000..bff5ea45f60 --- /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 00000000000..ac880227147 --- /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 2910d359f91..0f4c12d5f0c 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 00000000000..f4da752bb0c --- /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 00000000000..951e3f61cef --- /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 4fdef13d01d..c1ca9a4658e 100644 --- a/include/asm-arm/arch-at91rm9200/board.h +++ b/include/asm-arm/arch-at91rm9200/board.h | |||
@@ -20,7 +20,7 @@ | |||
20 | 20 | ||
21 | /* | 21 | /* |
22 | * These are data structures found in platform_device.dev.platform_data, | 22 | * These are data structures found in platform_device.dev.platform_data, |
23 | * and describing board-specfic data needed by drivers. For example, | 23 | * and describing board-specific data needed by drivers. For example, |
24 | * which pin is used for a given GPIO role. | 24 | * which pin is used for a given GPIO role. |
25 | * | 25 | * |
26 | * In 2.6, drivers should strongly avoid board-specific knowledge so | 26 | * In 2.6, drivers should strongly avoid board-specific knowledge so |
@@ -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 6176ab2dc41..dbde1baaf25 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 59e6f44d3a0..235d39d9110 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 23e670d85c9..88fd1bebcef 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 27b0497f1b3..f63842c2c09 100644 --- a/include/asm-arm/arch-at91rm9200/irqs.h +++ b/include/asm-arm/arch-at91rm9200/irqs.h | |||
@@ -37,16 +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 | |||
45 | #ifndef __ASSEMBLY__ | ||
46 | /* | ||
47 | * Initialize the IRQ controller. | ||
48 | */ | ||
49 | extern void at91rm9200_init_irq(unsigned int priority[]); | ||
50 | #endif | ||
51 | |||
52 | #endif | 42 | #endif |
diff --git a/include/asm-arm/arch-at91rm9200/memory.h b/include/asm-arm/arch-at91rm9200/memory.h index 462f1f0ad67..f985069e6d0 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 | ||
@@ -33,9 +33,7 @@ | |||
33 | * bus_to_virt: Used to convert an address for DMA operations | 33 | * bus_to_virt: Used to convert an address for DMA operations |
34 | * to an address that the kernel can use. | 34 | * to an address that the kernel can use. |
35 | */ | 35 | */ |
36 | #define __virt_to_bus__is_a_macro | ||
37 | #define __virt_to_bus(x) __virt_to_phys(x) | 36 | #define __virt_to_bus(x) __virt_to_phys(x) |
38 | #define __bus_to_virt__is_a_macro | ||
39 | #define __bus_to_virt(x) __phys_to_virt(x) | 37 | #define __bus_to_virt(x) __phys_to_virt(x) |
40 | 38 | ||
41 | #endif | 39 | #endif |
diff --git a/include/asm-arm/arch-at91rm9200/pio.h b/include/asm-arm/arch-at91rm9200/pio.h deleted file mode 100644 index a89501b4a70..00000000000 --- 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 29c42655f05..8a2ff472e4c 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 3f112dd1258..88687cefe6e 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 7b38497c24b..ec7811ab0a5 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 34d9718feb9..4c367eb57f4 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 3867231a447..aea6330c974 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 1386871e1a5..0fdbe72fff2 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 62613b0e2d9..53d790202c1 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 61d8717406c..c6e8dcf674d 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 07157b7e4b2..03d233ae87c 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 ec51fe92483..daad8ee2d19 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 776f9d37705..f9c72914186 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 99181ffc7e2..cbd7ae64bcc 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 d1ca955ce43..02598200997 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 71cea0b5841..8c322975f96 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 df9cbb6ef66..d7a34ce2029 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-h720x/memory.h b/include/asm-arm/arch-h720x/memory.h index 4a1bfd78a0f..53e923dba76 100644 --- a/include/asm-arm/arch-h720x/memory.h +++ b/include/asm-arm/arch-h720x/memory.h | |||
@@ -23,9 +23,7 @@ | |||
23 | * There is something to do here later !, Mar 2000, Jungjun Kim | 23 | * There is something to do here later !, Mar 2000, Jungjun Kim |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #define __virt_to_bus__is_a_macro | ||
27 | #define __virt_to_bus(x) __virt_to_phys(x) | 26 | #define __virt_to_bus(x) __virt_to_phys(x) |
28 | #define __bus_to_virt__is_a_macro | ||
29 | #define __bus_to_virt(x) __phys_to_virt(x) | 27 | #define __bus_to_virt(x) __phys_to_virt(x) |
30 | 28 | ||
31 | #endif | 29 | #endif |
diff --git a/include/asm-arm/arch-imx/imx-dma.h b/include/asm-arm/arch-imx/imx-dma.h index f2063c1d610..599f03e5a9e 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-imx/memory.h b/include/asm-arm/arch-imx/memory.h index d09ae32cd2f..5ad90127915 100644 --- a/include/asm-arm/arch-imx/memory.h +++ b/include/asm-arm/arch-imx/memory.h | |||
@@ -30,9 +30,7 @@ | |||
30 | * bus_to_virt: Used to convert an address for DMA operations | 30 | * bus_to_virt: Used to convert an address for DMA operations |
31 | * to an address that the kernel can use. | 31 | * to an address that the kernel can use. |
32 | */ | 32 | */ |
33 | #define __virt_to_bus__is_a_macro | 33 | #define __virt_to_bus(x) (x - PAGE_OFFSET + PHYS_OFFSET) |
34 | #define __virt_to_bus(x) (x - PAGE_OFFSET + PHYS_OFFSET) | 34 | #define __bus_to_virt(x) (x - PHYS_OFFSET + PAGE_OFFSET) |
35 | #define __bus_to_virt__is_a_macro | ||
36 | #define __bus_to_virt(x) (x - PHYS_OFFSET + PAGE_OFFSET) | ||
37 | 35 | ||
38 | #endif | 36 | #endif |
diff --git a/include/asm-arm/arch-integrator/io.h b/include/asm-arm/arch-integrator/io.h index 31f2deab51b..c8f2175948b 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 da6981efdc3..ab2c79bb950 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 f39046a6ab1..36adbdf5055 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/iop331-irqs.h b/include/asm-arm/arch-iop3xx/iop331-irqs.h index 8ff73d48722..7135ad7e335 100644 --- a/include/asm-arm/arch-iop3xx/iop331-irqs.h +++ b/include/asm-arm/arch-iop3xx/iop331-irqs.h | |||
@@ -91,7 +91,6 @@ | |||
91 | #define NR_IRQS NR_IOP331_IRQS | 91 | #define NR_IRQS NR_IOP331_IRQS |
92 | 92 | ||
93 | 93 | ||
94 | #if defined(CONFIG_ARCH_IQ80331) | ||
95 | /* | 94 | /* |
96 | * Interrupts available on the IQ80331 board | 95 | * Interrupts available on the IQ80331 board |
97 | */ | 96 | */ |
@@ -111,7 +110,6 @@ | |||
111 | #define IRQ_IQ80331_INTC IRQ_IOP331_XINT2 | 110 | #define IRQ_IQ80331_INTC IRQ_IOP331_XINT2 |
112 | #define IRQ_IQ80331_INTD IRQ_IOP331_XINT3 | 111 | #define IRQ_IQ80331_INTD IRQ_IOP331_XINT3 |
113 | 112 | ||
114 | #elif defined(CONFIG_MACH_IQ80332) | ||
115 | /* | 113 | /* |
116 | * Interrupts available on the IQ80332 board | 114 | * Interrupts available on the IQ80332 board |
117 | */ | 115 | */ |
@@ -131,6 +129,4 @@ | |||
131 | #define IRQ_IQ80332_INTC IRQ_IOP331_XINT2 | 129 | #define IRQ_IQ80332_INTC IRQ_IOP331_XINT2 |
132 | #define IRQ_IQ80332_INTD IRQ_IOP331_XINT3 | 130 | #define IRQ_IQ80332_INTD IRQ_IOP331_XINT3 |
133 | 131 | ||
134 | #endif | ||
135 | |||
136 | #endif // _IOP331_IRQ_H_ | 132 | #endif // _IOP331_IRQ_H_ |
diff --git a/include/asm-arm/arch-iop3xx/memory.h b/include/asm-arm/arch-iop3xx/memory.h index bc62f4b1323..e43ebd98474 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 472badb451c..14ca8d0f7b2 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 c98eb6254b1..fbdd5af644f 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 0ef4e6016ac..867761677b5 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 e49e1ca61b1..3927b1d61b1 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. |
@@ -292,15 +295,4 @@ | |||
292 | #define IXP23XX_PCI_CPP_ADDR_BITS IXP23XX_PCI_CSR(0x0160) | 295 | #define IXP23XX_PCI_CPP_ADDR_BITS IXP23XX_PCI_CSR(0x0160) |
293 | 296 | ||
294 | 297 | ||
295 | #ifndef __ASSEMBLY__ | ||
296 | /* | ||
297 | * Is system memory on the XSI or CPP bus? | ||
298 | */ | ||
299 | static inline unsigned ixp23xx_cpp_boot(void) | ||
300 | { | ||
301 | return (*IXP23XX_EXP_CFG0 & IXP23XX_EXP_CFG0_XSI_NOT_PRES); | ||
302 | } | ||
303 | #endif | ||
304 | |||
305 | |||
306 | #endif | 298 | #endif |
diff --git a/include/asm-arm/arch-ixp23xx/platform.h b/include/asm-arm/arch-ixp23xx/platform.h index e4d99060a04..56e16d66645 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); |
@@ -28,5 +43,15 @@ extern struct sys_timer ixp23xx_timer; | |||
28 | 43 | ||
29 | #define IXP23XX_UART_XTAL 14745600 | 44 | #define IXP23XX_UART_XTAL 14745600 |
30 | 45 | ||
46 | #ifndef __ASSEMBLY__ | ||
47 | /* | ||
48 | * Is system memory on the XSI or CPP bus? | ||
49 | */ | ||
50 | static inline unsigned ixp23xx_cpp_boot(void) | ||
51 | { | ||
52 | return (*IXP23XX_EXP_CFG0 & IXP23XX_EXP_CFG0_XSI_NOT_PRES); | ||
53 | } | ||
54 | #endif | ||
55 | |||
31 | 56 | ||
32 | #endif | 57 | #endif |
diff --git a/include/asm-arm/arch-ixp23xx/uncompress.h b/include/asm-arm/arch-ixp23xx/uncompress.h index 013575e6a9a..16c1110f230 100644 --- a/include/asm-arm/arch-ixp23xx/uncompress.h +++ b/include/asm-arm/arch-ixp23xx/uncompress.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #ifndef __ASM_ARCH_UNCOMPRESS_H | 11 | #ifndef __ASM_ARCH_UNCOMPRESS_H |
12 | #define __ASM_ARCH_UNCOMPRESS_H | 12 | #define __ASM_ARCH_UNCOMPRESS_H |
13 | 13 | ||
14 | #include <asm/hardware.h> | 14 | #include <asm/arch/ixp23xx.h> |
15 | #include <linux/serial_reg.h> | 15 | #include <linux/serial_reg.h> |
16 | 16 | ||
17 | #define UART_BASE ((volatile u32 *)IXP23XX_UART1_PHYS) | 17 | #define UART_BASE ((volatile u32 *)IXP23XX_UART1_PHYS) |
diff --git a/include/asm-arm/arch-ixp4xx/dma.h b/include/asm-arm/arch-ixp4xx/dma.h index b1a071ecebc..789f7f53c35 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-ixp4xx/io.h b/include/asm-arm/arch-ixp4xx/io.h index b59520e56fc..0d517267fb6 100644 --- a/include/asm-arm/arch-ixp4xx/io.h +++ b/include/asm-arm/arch-ixp4xx/io.h | |||
@@ -38,7 +38,7 @@ extern int ixp4xx_pci_write(u32 addr, u32 cmd, u32 data); | |||
38 | * 2) If > 64MB of memory space is required, the IXP4xx can be configured | 38 | * 2) If > 64MB of memory space is required, the IXP4xx can be configured |
39 | * to use indirect registers to access PCI (as we do below for I/O | 39 | * to use indirect registers to access PCI (as we do below for I/O |
40 | * transactions). This allows for up to 128MB (0x48000000 to 0x4fffffff) | 40 | * transactions). This allows for up to 128MB (0x48000000 to 0x4fffffff) |
41 | * of memory on the bus. The disadvantadge of this is that every | 41 | * of memory on the bus. The disadvantage of this is that every |
42 | * PCI access requires three local register accesses plus a spinlock, | 42 | * PCI access requires three local register accesses plus a spinlock, |
43 | * but in some cases the performance hit is acceptable. In addition, | 43 | * but in some cases the performance hit is acceptable. In addition, |
44 | * you cannot mmap() PCI devices in this case. | 44 | * you cannot mmap() PCI devices in this case. |
diff --git a/include/asm-arm/arch-l7200/io.h b/include/asm-arm/arch-l7200/io.h index cab8ad0adf0..cd080d8384d 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-l7200/serial_l7200.h b/include/asm-arm/arch-l7200/serial_l7200.h index 238c595d97e..b1008a9d23e 100644 --- a/include/asm-arm/arch-l7200/serial_l7200.h +++ b/include/asm-arm/arch-l7200/serial_l7200.h | |||
@@ -28,7 +28,7 @@ | |||
28 | #define UARTDR 0x00 /* Tx/Rx data */ | 28 | #define UARTDR 0x00 /* Tx/Rx data */ |
29 | #define RXSTAT 0x04 /* Rx status */ | 29 | #define RXSTAT 0x04 /* Rx status */ |
30 | #define H_UBRLCR 0x08 /* mode register high */ | 30 | #define H_UBRLCR 0x08 /* mode register high */ |
31 | #define M_UBRLCR 0x0C /* mode reg mid (MSB of buad)*/ | 31 | #define M_UBRLCR 0x0C /* mode reg mid (MSB of baud)*/ |
32 | #define L_UBRLCR 0x10 /* mode reg low (LSB of baud)*/ | 32 | #define L_UBRLCR 0x10 /* mode reg low (LSB of baud)*/ |
33 | #define UARTCON 0x14 /* control register */ | 33 | #define UARTCON 0x14 /* control register */ |
34 | #define UARTFLG 0x18 /* flag register */ | 34 | #define UARTFLG 0x18 /* flag register */ |
diff --git a/include/asm-arm/arch-l7200/uncompress.h b/include/asm-arm/arch-l7200/uncompress.h index 9fcd40aee3e..04be2a08863 100644 --- a/include/asm-arm/arch-l7200/uncompress.h +++ b/include/asm-arm/arch-l7200/uncompress.h | |||
@@ -6,7 +6,7 @@ | |||
6 | * Changelog: | 6 | * Changelog: |
7 | * 05-01-2000 SJH Created | 7 | * 05-01-2000 SJH Created |
8 | * 05-13-2000 SJH Filled in function bodies | 8 | * 05-13-2000 SJH Filled in function bodies |
9 | * 07-26-2000 SJH Removed hard coded buad rate | 9 | * 07-26-2000 SJH Removed hard coded baud rate |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <asm/hardware.h> | 12 | #include <asm/hardware.h> |
diff --git a/include/asm-arm/arch-lh7a40x/clocks.h b/include/asm-arm/arch-lh7a40x/clocks.h new file mode 100644 index 00000000000..bee02fd8dab --- /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 52c1cb9c39c..51de96e87fa 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 15492e3253f..a8cbd14bbf9 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 a2f67c06d9c..9fc7f498812 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 aeb07c162e2..e9ff74fd793 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 bbcd4335f44..17bc9409748 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 f91f3e59f3a..afe8c7cbad6 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 2edb22e3545..b4f09b3e2d0 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 00000000000..132b1c4d5ce --- /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 f8053346f60..3d1ce0426a3 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 00000000000..a940d0e80cb --- /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 00000000000..4eda5feed81 --- /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 00000000000..658df4d60ff --- /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 00000000000..643c90ef8b7 --- /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 00000000000..7786c45455c --- /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 00000000000..a7a53f80165 --- /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 00000000000..a487dc6e266 --- /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 00000000000..6d8d2df3e99 --- /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 00000000000..8ab45bea83c --- /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 00000000000..7a80c26178a --- /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 00000000000..4af2ee4a32c --- /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 00000000000..52adf368d76 --- /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 00000000000..7fdb42da0b4 --- /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 00000000000..f8943454710 --- /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 00000000000..da2da5a595d --- /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 00000000000..659af19512a --- /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-fsample.h b/include/asm-arm/arch-omap/board-fsample.h new file mode 100644 index 00000000000..89a1e529fb6 --- /dev/null +++ b/include/asm-arm/arch-omap/board-fsample.h | |||
@@ -0,0 +1,51 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-omap/board-fsample.h | ||
3 | * | ||
4 | * Board-specific goodies for TI F-Sample. | ||
5 | * | ||
6 | * Copyright (C) 2006 Google, Inc. | ||
7 | * Author: Brian Swetland <swetland@google.com> | ||
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_OMAP_FSAMPLE_H | ||
15 | #define __ASM_ARCH_OMAP_FSAMPLE_H | ||
16 | |||
17 | /* fsample is pretty close to p2-sample */ | ||
18 | #include <asm/arch/board-perseus2.h> | ||
19 | |||
20 | #define fsample_cpld_read(reg) __raw_readb(reg) | ||
21 | #define fsample_cpld_write(val, reg) __raw_writeb(val, reg) | ||
22 | |||
23 | #define FSAMPLE_CPLD_BASE 0xE8100000 | ||
24 | #define FSAMPLE_CPLD_SIZE SZ_4K | ||
25 | #define FSAMPLE_CPLD_START 0x05080000 | ||
26 | |||
27 | #define FSAMPLE_CPLD_REG_A (FSAMPLE_CPLD_BASE + 0x00) | ||
28 | #define FSAMPLE_CPLD_SWITCH (FSAMPLE_CPLD_BASE + 0x02) | ||
29 | #define FSAMPLE_CPLD_UART (FSAMPLE_CPLD_BASE + 0x02) | ||
30 | #define FSAMPLE_CPLD_REG_B (FSAMPLE_CPLD_BASE + 0x04) | ||
31 | #define FSAMPLE_CPLD_VERSION (FSAMPLE_CPLD_BASE + 0x06) | ||
32 | #define FSAMPLE_CPLD_SET_CLR (FSAMPLE_CPLD_BASE + 0x06) | ||
33 | |||
34 | #define FSAMPLE_CPLD_BIT_BT_RESET 0 | ||
35 | #define FSAMPLE_CPLD_BIT_LCD_RESET 1 | ||
36 | #define FSAMPLE_CPLD_BIT_CAM_PWDN 2 | ||
37 | #define FSAMPLE_CPLD_BIT_CHARGER_ENABLE 3 | ||
38 | #define FSAMPLE_CPLD_BIT_SD_MMC_EN 4 | ||
39 | #define FSAMPLE_CPLD_BIT_aGPS_PWREN 5 | ||
40 | #define FSAMPLE_CPLD_BIT_BACKLIGHT 6 | ||
41 | #define FSAMPLE_CPLD_BIT_aGPS_EN_RESET 7 | ||
42 | #define FSAMPLE_CPLD_BIT_aGPS_SLEEPx_N 8 | ||
43 | #define FSAMPLE_CPLD_BIT_OTG_RESET 9 | ||
44 | |||
45 | #define fsample_cpld_set(bit) \ | ||
46 | fsample_cpld_write((((bit) & 15) << 4) | 0x0f, FSAMPLE_CPLD_SET_CLR) | ||
47 | |||
48 | #define fsample_cpld_clear(bit) \ | ||
49 | fsample_cpld_write(0xf0 | ((bit) & 15), FSAMPLE_CPLD_SET_CLR) | ||
50 | |||
51 | #endif | ||
diff --git a/include/asm-arm/arch-omap/board.h b/include/asm-arm/arch-omap/board.h index 6d6240a4681..edf1dc6ad91 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 */ |
@@ -23,6 +22,7 @@ | |||
23 | #define OMAP_TAG_UART 0x4f07 | 22 | #define OMAP_TAG_UART 0x4f07 |
24 | #define OMAP_TAG_FBMEM 0x4f08 | 23 | #define OMAP_TAG_FBMEM 0x4f08 |
25 | #define OMAP_TAG_STI_CONSOLE 0x4f09 | 24 | #define OMAP_TAG_STI_CONSOLE 0x4f09 |
25 | #define OMAP_TAG_CAMERA_SENSOR 0x4f0a | ||
26 | 26 | ||
27 | #define OMAP_TAG_BOOT_REASON 0x4f80 | 27 | #define OMAP_TAG_BOOT_REASON 0x4f80 |
28 | #define OMAP_TAG_FLASH_PART 0x4f81 | 28 | #define OMAP_TAG_FLASH_PART 0x4f81 |
@@ -62,6 +62,12 @@ struct omap_sti_console_config { | |||
62 | u8 channel; | 62 | u8 channel; |
63 | }; | 63 | }; |
64 | 64 | ||
65 | struct omap_camera_sensor_config { | ||
66 | u16 reset_gpio; | ||
67 | int (*power_on)(void * data); | ||
68 | int (*power_off)(void * data); | ||
69 | }; | ||
70 | |||
65 | struct omap_usb_config { | 71 | struct omap_usb_config { |
66 | /* Configure drivers according to the connectors on your board: | 72 | /* Configure drivers according to the connectors on your board: |
67 | * - "A" connector (rectagular) | 73 | * - "A" connector (rectagular) |
diff --git a/include/asm-arm/arch-omap/clock.h b/include/asm-arm/arch-omap/clock.h index 3c4eb9fbe48..f83003f5287 100644 --- a/include/asm-arm/arch-omap/clock.h +++ b/include/asm-arm/arch-omap/clock.h | |||
@@ -48,8 +48,6 @@ struct clk_functions { | |||
48 | }; | 48 | }; |
49 | 49 | ||
50 | extern unsigned int mpurate; | 50 | extern unsigned int mpurate; |
51 | extern struct list_head clocks; | ||
52 | extern spinlock_t clockfw_lock; | ||
53 | 51 | ||
54 | extern int clk_init(struct clk_functions * custom_clocks); | 52 | extern int clk_init(struct clk_functions * custom_clocks); |
55 | extern int clk_register(struct clk *clk); | 53 | extern int clk_register(struct clk *clk); |
diff --git a/include/asm-arm/arch-omap/dma.h b/include/asm-arm/arch-omap/dma.h index ca1202312a4..1b1b02307e7 100644 --- a/include/asm-arm/arch-omap/dma.h +++ b/include/asm-arm/arch-omap/dma.h | |||
@@ -185,8 +185,8 @@ | |||
185 | /* DMA channels for 24xx */ | 185 | /* DMA channels for 24xx */ |
186 | #define OMAP24XX_DMA_NO_DEVICE 0 | 186 | #define OMAP24XX_DMA_NO_DEVICE 0 |
187 | #define OMAP24XX_DMA_XTI_DMA 1 /* S_DMA_0 */ | 187 | #define OMAP24XX_DMA_XTI_DMA 1 /* S_DMA_0 */ |
188 | #define OMAP24XX_DMA_EXT_NDMA_REQ0 2 /* S_DMA_1 */ | 188 | #define OMAP24XX_DMA_EXT_DMAREQ0 2 /* S_DMA_1 */ |
189 | #define OMAP24XX_DMA_EXT_NDMA_REQ1 3 /* S_DMA_2 */ | 189 | #define OMAP24XX_DMA_EXT_DMAREQ1 3 /* S_DMA_2 */ |
190 | #define OMAP24XX_DMA_GPMC 4 /* S_DMA_3 */ | 190 | #define OMAP24XX_DMA_GPMC 4 /* S_DMA_3 */ |
191 | #define OMAP24XX_DMA_GFX 5 /* S_DMA_4 */ | 191 | #define OMAP24XX_DMA_GFX 5 /* S_DMA_4 */ |
192 | #define OMAP24XX_DMA_DSS 6 /* S_DMA_5 */ | 192 | #define OMAP24XX_DMA_DSS 6 /* S_DMA_5 */ |
@@ -197,7 +197,9 @@ | |||
197 | #define OMAP24XX_DMA_DES_TX 11 /* S_DMA_10 */ | 197 | #define OMAP24XX_DMA_DES_TX 11 /* S_DMA_10 */ |
198 | #define OMAP24XX_DMA_DES_RX 12 /* S_DMA_11 */ | 198 | #define OMAP24XX_DMA_DES_RX 12 /* S_DMA_11 */ |
199 | #define OMAP24XX_DMA_SHA1MD5_RX 13 /* S_DMA_12 */ | 199 | #define OMAP24XX_DMA_SHA1MD5_RX 13 /* S_DMA_12 */ |
200 | 200 | #define OMAP24XX_DMA_EXT_DMAREQ2 14 /* S_DMA_13 */ | |
201 | #define OMAP24XX_DMA_EXT_DMAREQ3 15 /* S_DMA_14 */ | ||
202 | #define OMAP24XX_DMA_EXT_DMAREQ4 16 /* S_DMA_15 */ | ||
201 | #define OMAP24XX_DMA_EAC_AC_RD 17 /* S_DMA_16 */ | 203 | #define OMAP24XX_DMA_EAC_AC_RD 17 /* S_DMA_16 */ |
202 | #define OMAP24XX_DMA_EAC_AC_WR 18 /* S_DMA_17 */ | 204 | #define OMAP24XX_DMA_EAC_AC_WR 18 /* S_DMA_17 */ |
203 | #define OMAP24XX_DMA_EAC_MD_UL_RD 19 /* S_DMA_18 */ | 205 | #define OMAP24XX_DMA_EAC_MD_UL_RD 19 /* S_DMA_18 */ |
@@ -244,6 +246,7 @@ | |||
244 | #define OMAP24XX_DMA_MMC1_TX 61 /* SDMA_60 */ | 246 | #define OMAP24XX_DMA_MMC1_TX 61 /* SDMA_60 */ |
245 | #define OMAP24XX_DMA_MMC1_RX 62 /* SDMA_61 */ | 247 | #define OMAP24XX_DMA_MMC1_RX 62 /* SDMA_61 */ |
246 | #define OMAP24XX_DMA_MS 63 /* SDMA_62 */ | 248 | #define OMAP24XX_DMA_MS 63 /* SDMA_62 */ |
249 | #define OMAP24XX_DMA_EXT_DMAREQ5 64 /* S_DMA_63 */ | ||
247 | 250 | ||
248 | /*----------------------------------------------------------------------------*/ | 251 | /*----------------------------------------------------------------------------*/ |
249 | 252 | ||
@@ -274,7 +277,7 @@ | |||
274 | #define OMAP1610_DMA_LCD_LCH_CTRL (OMAP1610_DMA_LCD_BASE + 0xea) | 277 | #define OMAP1610_DMA_LCD_LCH_CTRL (OMAP1610_DMA_LCD_BASE + 0xea) |
275 | #define OMAP1610_DMA_LCD_SRC_FI_B1_U (OMAP1610_DMA_LCD_BASE + 0xf4) | 278 | #define OMAP1610_DMA_LCD_SRC_FI_B1_U (OMAP1610_DMA_LCD_BASE + 0xf4) |
276 | 279 | ||
277 | #define OMAP_DMA_TOUT_IRQ (1 << 0) /* Only on omap1 */ | 280 | #define OMAP1_DMA_TOUT_IRQ (1 << 0) |
278 | #define OMAP_DMA_DROP_IRQ (1 << 1) | 281 | #define OMAP_DMA_DROP_IRQ (1 << 1) |
279 | #define OMAP_DMA_HALF_IRQ (1 << 2) | 282 | #define OMAP_DMA_HALF_IRQ (1 << 2) |
280 | #define OMAP_DMA_FRAME_IRQ (1 << 3) | 283 | #define OMAP_DMA_FRAME_IRQ (1 << 3) |
@@ -315,11 +318,11 @@ enum { | |||
315 | OMAP_LCD_DMA_B2_BOTTOM | 318 | OMAP_LCD_DMA_B2_BOTTOM |
316 | }; | 319 | }; |
317 | 320 | ||
318 | /* REVISIT: Check if BURST_4 is really 1 (or 2) */ | ||
319 | enum omap_dma_burst_mode { | 321 | enum omap_dma_burst_mode { |
320 | OMAP_DMA_DATA_BURST_DIS = 0, | 322 | OMAP_DMA_DATA_BURST_DIS = 0, |
321 | OMAP_DMA_DATA_BURST_4, | 323 | OMAP_DMA_DATA_BURST_4, |
322 | OMAP_DMA_DATA_BURST_8 | 324 | OMAP_DMA_DATA_BURST_8, |
325 | OMAP_DMA_DATA_BURST_16, | ||
323 | }; | 326 | }; |
324 | 327 | ||
325 | enum omap_dma_color_mode { | 328 | enum omap_dma_color_mode { |
diff --git a/include/asm-arm/arch-omap/dmtimer.h b/include/asm-arm/arch-omap/dmtimer.h index e6522e6a383..7a289ff0740 100644 --- a/include/asm-arm/arch-omap/dmtimer.h +++ b/include/asm-arm/arch-omap/dmtimer.h | |||
@@ -5,6 +5,7 @@ | |||
5 | * | 5 | * |
6 | * Copyright (C) 2005 Nokia Corporation | 6 | * Copyright (C) 2005 Nokia Corporation |
7 | * Author: Lauri Leukkunen <lauri.leukkunen@nokia.com> | 7 | * Author: Lauri Leukkunen <lauri.leukkunen@nokia.com> |
8 | * PWM and clock framwork support by Timo Teras. | ||
8 | * | 9 | * |
9 | * This program is free software; you can redistribute it and/or modify it | 10 | * This program is free software; you can redistribute it and/or modify it |
10 | * under the terms of the GNU General Public License as published by the | 11 | * under the terms of the GNU General Public License as published by the |
@@ -25,69 +26,56 @@ | |||
25 | * 675 Mass Ave, Cambridge, MA 02139, USA. | 26 | * 675 Mass Ave, Cambridge, MA 02139, USA. |
26 | */ | 27 | */ |
27 | 28 | ||
28 | #ifndef __ASM_ARCH_TIMER_H | 29 | #ifndef __ASM_ARCH_DMTIMER_H |
29 | #define __ASM_ARCH_TIMER_H | 30 | #define __ASM_ARCH_DMTIMER_H |
30 | |||
31 | #include <linux/list.h> | ||
32 | |||
33 | #define OMAP_TIMER_SRC_ARMXOR 0x00 | ||
34 | #define OMAP_TIMER_SRC_32_KHZ 0x01 | ||
35 | #define OMAP_TIMER_SRC_EXT_CLK 0x02 | ||
36 | |||
37 | /* timer control reg bits */ | ||
38 | #define OMAP_TIMER_CTRL_CAPTMODE (1 << 13) | ||
39 | #define OMAP_TIMER_CTRL_PT (1 << 12) | ||
40 | #define OMAP_TIMER_CTRL_TRG_OVERFLOW (0x1 << 10) | ||
41 | #define OMAP_TIMER_CTRL_TRG_OFANDMATCH (0x2 << 10) | ||
42 | #define OMAP_TIMER_CTRL_TCM_LOWTOHIGH (0x1 << 8) | ||
43 | #define OMAP_TIMER_CTRL_TCM_HIGHTOLOW (0x2 << 8) | ||
44 | #define OMAP_TIMER_CTRL_TCM_BOTHEDGES (0x3 << 8) | ||
45 | #define OMAP_TIMER_CTRL_SCPWM (1 << 7) | ||
46 | #define OMAP_TIMER_CTRL_CE (1 << 6) /* compare enable */ | ||
47 | #define OMAP_TIMER_CTRL_PRE (1 << 5) /* prescaler enable */ | ||
48 | #define OMAP_TIMER_CTRL_PTV_SHIFT 2 /* how much to shift the prescaler value */ | ||
49 | #define OMAP_TIMER_CTRL_AR (1 << 1) /* auto-reload enable */ | ||
50 | #define OMAP_TIMER_CTRL_ST (1 << 0) /* start timer */ | ||
51 | 31 | ||
52 | /* timer interrupt enable bits */ | 32 | /* clock sources */ |
53 | #define OMAP_TIMER_INT_CAPTURE (1 << 2) | 33 | #define OMAP_TIMER_SRC_SYS_CLK 0x00 |
54 | #define OMAP_TIMER_INT_OVERFLOW (1 << 1) | 34 | #define OMAP_TIMER_SRC_32_KHZ 0x01 |
55 | #define OMAP_TIMER_INT_MATCH (1 << 0) | 35 | #define OMAP_TIMER_SRC_EXT_CLK 0x02 |
56 | 36 | ||
37 | /* timer interrupt enable bits */ | ||
38 | #define OMAP_TIMER_INT_CAPTURE (1 << 2) | ||
39 | #define OMAP_TIMER_INT_OVERFLOW (1 << 1) | ||
40 | #define OMAP_TIMER_INT_MATCH (1 << 0) | ||
57 | 41 | ||
58 | struct omap_dm_timer { | 42 | /* trigger types */ |
59 | struct list_head timer_list; | 43 | #define OMAP_TIMER_TRIGGER_NONE 0x00 |
44 | #define OMAP_TIMER_TRIGGER_OVERFLOW 0x01 | ||
45 | #define OMAP_TIMER_TRIGGER_OVERFLOW_AND_COMPARE 0x02 | ||
60 | 46 | ||
61 | u32 base; | 47 | struct omap_dm_timer; |
62 | unsigned int irq; | 48 | struct clk; |
63 | }; | ||
64 | 49 | ||
65 | u32 omap_dm_timer_read_reg(struct omap_dm_timer *timer, int reg); | 50 | int omap_dm_timer_init(void); |
66 | void omap_dm_timer_write_reg(struct omap_dm_timer *timer, int reg, u32 value); | ||
67 | 51 | ||
68 | struct omap_dm_timer * omap_dm_timer_request(void); | 52 | struct omap_dm_timer *omap_dm_timer_request(void); |
53 | struct omap_dm_timer *omap_dm_timer_request_specific(int timer_id); | ||
69 | void omap_dm_timer_free(struct omap_dm_timer *timer); | 54 | void omap_dm_timer_free(struct omap_dm_timer *timer); |
70 | void omap_dm_timer_set_source(struct omap_dm_timer *timer, int source); | ||
71 | 55 | ||
72 | void omap_dm_timer_set_int_enable(struct omap_dm_timer *timer, unsigned int value); | 56 | int omap_dm_timer_get_irq(struct omap_dm_timer *timer); |
73 | void omap_dm_timer_set_trigger(struct omap_dm_timer *timer, unsigned int value); | 57 | |
74 | void omap_dm_timer_enable_compare(struct omap_dm_timer *timer); | 58 | u32 omap_dm_timer_modify_idlect_mask(u32 inputmask); |
75 | void omap_dm_timer_enable_autoreload(struct omap_dm_timer *timer); | 59 | struct clk *omap_dm_timer_get_fclk(struct omap_dm_timer *timer); |
76 | 60 | ||
77 | void omap_dm_timer_trigger(struct omap_dm_timer *timer); | 61 | void omap_dm_timer_trigger(struct omap_dm_timer *timer); |
78 | void omap_dm_timer_start(struct omap_dm_timer *timer); | 62 | void omap_dm_timer_start(struct omap_dm_timer *timer); |
79 | void omap_dm_timer_stop(struct omap_dm_timer *timer); | 63 | void omap_dm_timer_stop(struct omap_dm_timer *timer); |
80 | 64 | ||
81 | void omap_dm_timer_set_load(struct omap_dm_timer *timer, unsigned int load); | 65 | void omap_dm_timer_set_source(struct omap_dm_timer *timer, int source); |
82 | void omap_dm_timer_set_match(struct omap_dm_timer *timer, unsigned int match); | 66 | void omap_dm_timer_set_load(struct omap_dm_timer *timer, int autoreload, unsigned int value); |
67 | void omap_dm_timer_set_match(struct omap_dm_timer *timer, int enable, unsigned int match); | ||
68 | void omap_dm_timer_set_pwm(struct omap_dm_timer *timer, int def_on, int toggle, int trigger); | ||
69 | void omap_dm_timer_set_prescaler(struct omap_dm_timer *timer, int prescaler); | ||
70 | |||
71 | void omap_dm_timer_set_int_enable(struct omap_dm_timer *timer, unsigned int value); | ||
83 | 72 | ||
84 | unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer); | 73 | unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer); |
85 | void omap_dm_timer_write_status(struct omap_dm_timer *timer, unsigned int value); | 74 | void omap_dm_timer_write_status(struct omap_dm_timer *timer, unsigned int value); |
86 | |||
87 | unsigned int omap_dm_timer_read_counter(struct omap_dm_timer *timer); | 75 | unsigned int omap_dm_timer_read_counter(struct omap_dm_timer *timer); |
88 | void omap_dm_timer_reset_counter(struct omap_dm_timer *timer); | 76 | void omap_dm_timer_write_counter(struct omap_dm_timer *timer, unsigned int value); |
89 | 77 | ||
90 | int omap_dm_timers_active(void); | 78 | int omap_dm_timers_active(void); |
91 | u32 omap_dm_timer_modify_idlect_mask(u32 inputmask); | ||
92 | 79 | ||
93 | #endif /* __ASM_ARCH_TIMER_H */ | 80 | |
81 | #endif /* __ASM_ARCH_DMTIMER_H */ | ||
diff --git a/include/asm-arm/arch-omap/gpmc.h b/include/asm-arm/arch-omap/gpmc.h new file mode 100644 index 00000000000..1a0a5207822 --- /dev/null +++ b/include/asm-arm/arch-omap/gpmc.h | |||
@@ -0,0 +1,91 @@ | |||
1 | /* | ||
2 | * General-Purpose Memory Controller for OMAP2 | ||
3 | * | ||
4 | * Copyright (C) 2005-2006 Nokia Corporation | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #ifndef __OMAP2_GPMC_H | ||
12 | #define __OMAP2_GPMC_H | ||
13 | |||
14 | #define GPMC_CS_CONFIG1 0x00 | ||
15 | #define GPMC_CS_CONFIG2 0x04 | ||
16 | #define GPMC_CS_CONFIG3 0x08 | ||
17 | #define GPMC_CS_CONFIG4 0x0c | ||
18 | #define GPMC_CS_CONFIG5 0x10 | ||
19 | #define GPMC_CS_CONFIG6 0x14 | ||
20 | #define GPMC_CS_CONFIG7 0x18 | ||
21 | #define GPMC_CS_NAND_COMMAND 0x1c | ||
22 | #define GPMC_CS_NAND_ADDRESS 0x20 | ||
23 | #define GPMC_CS_NAND_DATA 0x24 | ||
24 | |||
25 | #define GPMC_CONFIG1_WRAPBURST_SUPP (1 << 31) | ||
26 | #define GPMC_CONFIG1_READMULTIPLE_SUPP (1 << 20) | ||
27 | #define GPMC_CONFIG1_READTYPE_ASYNC (0 << 29) | ||
28 | #define GPMC_CONFIG1_READTYPE_SYNC (1 << 29) | ||
29 | #define GPMC_CONFIG1_WRITETYPE_ASYNC (0 << 27) | ||
30 | #define GPMC_CONFIG1_WRITETYPE_SYNC (1 << 27) | ||
31 | #define GPMC_CONFIG1_CLKACTIVATIONTIME(val) ((val & 3) << 25) | ||
32 | #define GPMC_CONFIG1_PAGE_LEN(val) ((val & 3) << 23) | ||
33 | #define GPMC_CONFIG1_WAIT_READ_MON (1 << 22) | ||
34 | #define GPMC_CONFIG1_WAIT_WRITE_MON (1 << 21) | ||
35 | #define GPMC_CONFIG1_WAIT_MON_IIME(val) ((val & 3) << 18) | ||
36 | #define GPMC_CONFIG1_WAIT_PIN_SEL(val) ((val & 3) << 16) | ||
37 | #define GPMC_CONFIG1_DEVICESIZE(val) ((val & 3) << 12) | ||
38 | #define GPMC_CONFIG1_DEVICESIZE_16 GPMC_CONFIG1_DEVICESIZE(1) | ||
39 | #define GPMC_CONFIG1_DEVICETYPE(val) ((val & 3) << 10) | ||
40 | #define GPMC_CONFIG1_DEVICETYPE_NOR GPMC_CONFIG1_DEVICETYPE(0) | ||
41 | #define GPMC_CONFIG1_DEVICETYPE_NAND GPMC_CONFIG1_DEVICETYPE(1) | ||
42 | #define GPMC_CONFIG1_MUXADDDATA (1 << 9) | ||
43 | #define GPMC_CONFIG1_TIME_PARA_GRAN (1 << 4) | ||
44 | #define GPMC_CONFIG1_FCLK_DIV(val) (val & 3) | ||
45 | #define GPMC_CONFIG1_FCLK_DIV2 (GPMC_CONFIG1_FCLK_DIV(1)) | ||
46 | #define GPMC_CONFIG1_FCLK_DIV3 (GPMC_CONFIG1_FCLK_DIV(2)) | ||
47 | #define GPMC_CONFIG1_FCLK_DIV4 (GPMC_CONFIG1_FCLK_DIV(3)) | ||
48 | |||
49 | /* | ||
50 | * Note that all values in this struct are in nanoseconds, while | ||
51 | * the register values are in gpmc_fck cycles. | ||
52 | */ | ||
53 | struct gpmc_timings { | ||
54 | /* Minimum clock period for synchronous mode */ | ||
55 | u16 sync_clk; | ||
56 | |||
57 | /* Chip-select signal timings corresponding to GPMC_CS_CONFIG2 */ | ||
58 | u16 cs_on; /* Assertion time */ | ||
59 | u16 cs_rd_off; /* Read deassertion time */ | ||
60 | u16 cs_wr_off; /* Write deassertion time */ | ||
61 | |||
62 | /* ADV signal timings corresponding to GPMC_CONFIG3 */ | ||
63 | u16 adv_on; /* Assertion time */ | ||
64 | u16 adv_rd_off; /* Read deassertion time */ | ||
65 | u16 adv_wr_off; /* Write deassertion time */ | ||
66 | |||
67 | /* WE signals timings corresponding to GPMC_CONFIG4 */ | ||
68 | u16 we_on; /* WE assertion time */ | ||
69 | u16 we_off; /* WE deassertion time */ | ||
70 | |||
71 | /* OE signals timings corresponding to GPMC_CONFIG4 */ | ||
72 | u16 oe_on; /* OE assertion time */ | ||
73 | u16 oe_off; /* OE deassertion time */ | ||
74 | |||
75 | /* Access time and cycle time timings corresponding to GPMC_CONFIG5 */ | ||
76 | u16 page_burst_access; /* Multiple access word delay */ | ||
77 | u16 access; /* Start-cycle to first data valid delay */ | ||
78 | u16 rd_cycle; /* Total read cycle time */ | ||
79 | u16 wr_cycle; /* Total write cycle time */ | ||
80 | }; | ||
81 | |||
82 | extern unsigned int gpmc_ns_to_ticks(unsigned int time_ns); | ||
83 | |||
84 | extern void gpmc_cs_write_reg(int cs, int idx, u32 val); | ||
85 | extern u32 gpmc_cs_read_reg(int cs, int idx); | ||
86 | extern int gpmc_cs_calc_divider(int cs, unsigned int sync_clk); | ||
87 | extern int gpmc_cs_set_timings(int cs, const struct gpmc_timings *t); | ||
88 | extern unsigned long gpmc_cs_get_base_addr(int cs); | ||
89 | |||
90 | |||
91 | #endif | ||
diff --git a/include/asm-arm/arch-omap/hardware.h b/include/asm-arm/arch-omap/hardware.h index 7909b729826..481048d6521 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> |
@@ -298,6 +297,10 @@ | |||
298 | #include "board-perseus2.h" | 297 | #include "board-perseus2.h" |
299 | #endif | 298 | #endif |
300 | 299 | ||
300 | #ifdef CONFIG_MACH_OMAP_FSAMPLE | ||
301 | #include "board-fsample.h" | ||
302 | #endif | ||
303 | |||
301 | #ifdef CONFIG_MACH_OMAP_H3 | 304 | #ifdef CONFIG_MACH_OMAP_H3 |
302 | #include "board-h3.h" | 305 | #include "board-h3.h" |
303 | #endif | 306 | #endif |
diff --git a/include/asm-arm/arch-omap/io.h b/include/asm-arm/arch-omap/io.h index b726acfcab1..78f68e6a4f0 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/irqs.h b/include/asm-arm/arch-omap/irqs.h index 42098d99f30..2542495d8a4 100644 --- a/include/asm-arm/arch-omap/irqs.h +++ b/include/asm-arm/arch-omap/irqs.h | |||
@@ -242,10 +242,24 @@ | |||
242 | #define INT_24XX_GPIO_BANK2 30 | 242 | #define INT_24XX_GPIO_BANK2 30 |
243 | #define INT_24XX_GPIO_BANK3 31 | 243 | #define INT_24XX_GPIO_BANK3 31 |
244 | #define INT_24XX_GPIO_BANK4 32 | 244 | #define INT_24XX_GPIO_BANK4 32 |
245 | #define INT_24XX_GPTIMER1 37 | ||
246 | #define INT_24XX_GPTIMER2 38 | ||
247 | #define INT_24XX_GPTIMER3 39 | ||
248 | #define INT_24XX_GPTIMER4 40 | ||
249 | #define INT_24XX_GPTIMER5 41 | ||
250 | #define INT_24XX_GPTIMER6 42 | ||
251 | #define INT_24XX_GPTIMER7 43 | ||
252 | #define INT_24XX_GPTIMER8 44 | ||
253 | #define INT_24XX_GPTIMER9 45 | ||
254 | #define INT_24XX_GPTIMER10 46 | ||
255 | #define INT_24XX_GPTIMER11 47 | ||
256 | #define INT_24XX_GPTIMER12 48 | ||
245 | #define INT_24XX_MCBSP1_IRQ_TX 59 | 257 | #define INT_24XX_MCBSP1_IRQ_TX 59 |
246 | #define INT_24XX_MCBSP1_IRQ_RX 60 | 258 | #define INT_24XX_MCBSP1_IRQ_RX 60 |
247 | #define INT_24XX_MCBSP2_IRQ_TX 62 | 259 | #define INT_24XX_MCBSP2_IRQ_TX 62 |
248 | #define INT_24XX_MCBSP2_IRQ_RX 63 | 260 | #define INT_24XX_MCBSP2_IRQ_RX 63 |
261 | #define INT_24XX_UART1_IRQ 72 | ||
262 | #define INT_24XX_UART2_IRQ 73 | ||
249 | #define INT_24XX_UART3_IRQ 74 | 263 | #define INT_24XX_UART3_IRQ 74 |
250 | 264 | ||
251 | /* Max. 128 level 2 IRQs (OMAP1610), 192 GPIOs (OMAP730) and | 265 | /* Max. 128 level 2 IRQs (OMAP1610), 192 GPIOs (OMAP730) and |
diff --git a/include/asm-arm/arch-omap/mux.h b/include/asm-arm/arch-omap/mux.h index 0dc24d4ba59..679869c5e68 100644 --- a/include/asm-arm/arch-omap/mux.h +++ b/include/asm-arm/arch-omap/mux.h | |||
@@ -410,6 +410,12 @@ enum omap24xx_index { | |||
410 | /* 24xx clock */ | 410 | /* 24xx clock */ |
411 | W14_24XX_SYS_CLKOUT, | 411 | W14_24XX_SYS_CLKOUT, |
412 | 412 | ||
413 | /* 24xx GPMC wait pin monitoring */ | ||
414 | L3_GPMC_WAIT0, | ||
415 | N7_GPMC_WAIT1, | ||
416 | M1_GPMC_WAIT2, | ||
417 | P1_GPMC_WAIT3, | ||
418 | |||
413 | /* 242X McBSP */ | 419 | /* 242X McBSP */ |
414 | Y15_24XX_MCBSP2_CLKX, | 420 | Y15_24XX_MCBSP2_CLKX, |
415 | R14_24XX_MCBSP2_FSX, | 421 | R14_24XX_MCBSP2_FSX, |
@@ -429,6 +435,26 @@ enum omap24xx_index { | |||
429 | M15_24XX_GPIO92, | 435 | M15_24XX_GPIO92, |
430 | V14_24XX_GPIO117, | 436 | V14_24XX_GPIO117, |
431 | 437 | ||
438 | /* 242x DBG GPIO */ | ||
439 | V4_242X_GPIO49, | ||
440 | W2_242X_GPIO50, | ||
441 | U4_242X_GPIO51, | ||
442 | V3_242X_GPIO52, | ||
443 | V2_242X_GPIO53, | ||
444 | V6_242X_GPIO53, | ||
445 | T4_242X_GPIO54, | ||
446 | Y4_242X_GPIO54, | ||
447 | T3_242X_GPIO55, | ||
448 | U2_242X_GPIO56, | ||
449 | |||
450 | /* 24xx external DMA requests */ | ||
451 | AA10_242X_DMAREQ0, | ||
452 | AA6_242X_DMAREQ1, | ||
453 | E4_242X_DMAREQ2, | ||
454 | G4_242X_DMAREQ3, | ||
455 | D3_242X_DMAREQ4, | ||
456 | E3_242X_DMAREQ5, | ||
457 | |||
432 | P20_24XX_TSC_IRQ, | 458 | P20_24XX_TSC_IRQ, |
433 | 459 | ||
434 | /* UART3 */ | 460 | /* UART3 */ |
diff --git a/include/asm-arm/arch-omap/pm.h b/include/asm-arm/arch-omap/pm.h index 05b003f3a94..e46623c61a7 100644 --- a/include/asm-arm/arch-omap/pm.h +++ b/include/asm-arm/arch-omap/pm.h | |||
@@ -299,10 +299,43 @@ enum omap24xx_save_state { | |||
299 | OMAP24XX_SLEEP_SAVE_INTC_MIR0, | 299 | OMAP24XX_SLEEP_SAVE_INTC_MIR0, |
300 | OMAP24XX_SLEEP_SAVE_INTC_MIR1, | 300 | OMAP24XX_SLEEP_SAVE_INTC_MIR1, |
301 | OMAP24XX_SLEEP_SAVE_INTC_MIR2, | 301 | OMAP24XX_SLEEP_SAVE_INTC_MIR2, |
302 | |||
303 | OMAP24XX_SLEEP_SAVE_CM_CLKSTCTRL_MPU, | ||
304 | OMAP24XX_SLEEP_SAVE_CM_CLKSTCTRL_CORE, | ||
305 | OMAP24XX_SLEEP_SAVE_CM_CLKSTCTRL_GFX, | ||
306 | OMAP24XX_SLEEP_SAVE_CM_CLKSTCTRL_DSP, | ||
307 | OMAP24XX_SLEEP_SAVE_CM_CLKSTCTRL_MDM, | ||
308 | |||
309 | OMAP24XX_SLEEP_SAVE_PM_PWSTCTRL_MPU, | ||
310 | OMAP24XX_SLEEP_SAVE_PM_PWSTCTRL_CORE, | ||
311 | OMAP24XX_SLEEP_SAVE_PM_PWSTCTRL_GFX, | ||
312 | OMAP24XX_SLEEP_SAVE_PM_PWSTCTRL_DSP, | ||
313 | OMAP24XX_SLEEP_SAVE_PM_PWSTCTRL_MDM, | ||
314 | |||
315 | OMAP24XX_SLEEP_SAVE_CM_IDLEST1_CORE, | ||
316 | OMAP24XX_SLEEP_SAVE_CM_IDLEST2_CORE, | ||
317 | OMAP24XX_SLEEP_SAVE_CM_IDLEST3_CORE, | ||
318 | OMAP24XX_SLEEP_SAVE_CM_IDLEST4_CORE, | ||
319 | OMAP24XX_SLEEP_SAVE_CM_IDLEST_GFX, | ||
320 | OMAP24XX_SLEEP_SAVE_CM_IDLEST_WKUP, | ||
321 | OMAP24XX_SLEEP_SAVE_CM_IDLEST_CKGEN, | ||
322 | OMAP24XX_SLEEP_SAVE_CM_IDLEST_DSP, | ||
323 | OMAP24XX_SLEEP_SAVE_CM_IDLEST_MDM, | ||
324 | |||
325 | OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE1_CORE, | ||
326 | OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE2_CORE, | ||
327 | OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE3_CORE, | ||
328 | OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE4_CORE, | ||
329 | OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE_WKUP, | ||
330 | OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE_PLL, | ||
331 | OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE_DSP, | ||
332 | OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE_MDM, | ||
333 | |||
302 | OMAP24XX_SLEEP_SAVE_CM_FCLKEN1_CORE, | 334 | OMAP24XX_SLEEP_SAVE_CM_FCLKEN1_CORE, |
303 | OMAP24XX_SLEEP_SAVE_CM_FCLKEN2_CORE, | 335 | OMAP24XX_SLEEP_SAVE_CM_FCLKEN2_CORE, |
304 | OMAP24XX_SLEEP_SAVE_CM_ICLKEN1_CORE, | 336 | OMAP24XX_SLEEP_SAVE_CM_ICLKEN1_CORE, |
305 | OMAP24XX_SLEEP_SAVE_CM_ICLKEN2_CORE, | 337 | OMAP24XX_SLEEP_SAVE_CM_ICLKEN2_CORE, |
338 | OMAP24XX_SLEEP_SAVE_CM_ICLKEN3_CORE, | ||
306 | OMAP24XX_SLEEP_SAVE_CM_ICLKEN4_CORE, | 339 | OMAP24XX_SLEEP_SAVE_CM_ICLKEN4_CORE, |
307 | OMAP24XX_SLEEP_SAVE_GPIO1_IRQENABLE1, | 340 | OMAP24XX_SLEEP_SAVE_GPIO1_IRQENABLE1, |
308 | OMAP24XX_SLEEP_SAVE_GPIO2_IRQENABLE1, | 341 | OMAP24XX_SLEEP_SAVE_GPIO2_IRQENABLE1, |
diff --git a/include/asm-arm/arch-omap/system.h b/include/asm-arm/arch-omap/system.h index 67970d1a202..ac2bfa433f0 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 ca2c8bec82e..aca0adfef1b 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 00000000000..91ae0030fdf --- /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 00000000000..67d18a203d2 --- /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 00000000000..3aee1204795 --- /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 00000000000..c1c198e3680 --- /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 00000000000..d01bf83d55c --- /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 00000000000..a4410397a92 --- /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 00000000000..29ee43955c5 --- /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 00000000000..fabff5dc337 --- /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 00000000000..13ec7ed0f50 --- /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 00000000000..0d8268a9526 --- /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 00000000000..95d5f547b41 --- /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 00000000000..485a3651b4d --- /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 00000000000..bac1634cb3e --- /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 00000000000..6e3da70ab10 --- /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 00000000000..ee470a39089 --- /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 00000000000..8fa4d24b72b --- /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 00000000000..140d925f6f3 --- /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 e7ef497417b..b6952534a4e 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 eb2dd58d397..7f8d817b446 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 67af238a8f8..f3bc70eee35 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/ohci.h b/include/asm-arm/arch-pxa/ohci.h index 7da89569061..e848a47128c 100644 --- a/include/asm-arm/arch-pxa/ohci.h +++ b/include/asm-arm/arch-pxa/ohci.h | |||
@@ -11,6 +11,8 @@ struct pxaohci_platform_data { | |||
11 | #define PMM_NPS_MODE 1 | 11 | #define PMM_NPS_MODE 1 |
12 | #define PMM_GLOBAL_MODE 2 | 12 | #define PMM_GLOBAL_MODE 2 |
13 | #define PMM_PERPORT_MODE 3 | 13 | #define PMM_PERPORT_MODE 3 |
14 | |||
15 | int power_budget; | ||
14 | }; | 16 | }; |
15 | 17 | ||
16 | extern void pxa_set_ohci_info(struct pxaohci_platform_data *info); | 18 | extern void pxa_set_ohci_info(struct pxaohci_platform_data *info); |
diff --git a/include/asm-arm/arch-pxa/poodle.h b/include/asm-arm/arch-pxa/poodle.h index 6b5ac5144e7..4d6a4031576 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 c8f53a71c07..f5cc65dd7d0 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 |
@@ -1330,6 +1329,7 @@ | |||
1330 | #define GPIO84_NSRXD 84 /* NSSP receive */ | 1329 | #define GPIO84_NSRXD 84 /* NSSP receive */ |
1331 | #define GPIO85_nPCE_1 85 /* Card Enable for Card Space (PXA27x) */ | 1330 | #define GPIO85_nPCE_1 85 /* Card Enable for Card Space (PXA27x) */ |
1332 | #define GPIO92_MMCDAT0 92 /* MMC DAT0 (PXA27x) */ | 1331 | #define GPIO92_MMCDAT0 92 /* MMC DAT0 (PXA27x) */ |
1332 | #define GPIO102_nPCE_1 102 /* PCMCIA (PXA27x) */ | ||
1333 | #define GPIO109_MMCDAT1 109 /* MMC DAT1 (PXA27x) */ | 1333 | #define GPIO109_MMCDAT1 109 /* MMC DAT1 (PXA27x) */ |
1334 | #define GPIO110_MMCDAT2 110 /* MMC DAT2 (PXA27x) */ | 1334 | #define GPIO110_MMCDAT2 110 /* MMC DAT2 (PXA27x) */ |
1335 | #define GPIO110_MMCCS0 110 /* MMC Chip Select 0 (PXA27x) */ | 1335 | #define GPIO110_MMCCS0 110 /* MMC Chip Select 0 (PXA27x) */ |
@@ -1472,6 +1472,7 @@ | |||
1472 | #define GPIO84_NSSP_RX (84 | GPIO_ALT_FN_2_IN) | 1472 | #define GPIO84_NSSP_RX (84 | GPIO_ALT_FN_2_IN) |
1473 | #define GPIO85_nPCE_1_MD (85 | GPIO_ALT_FN_1_OUT) | 1473 | #define GPIO85_nPCE_1_MD (85 | GPIO_ALT_FN_1_OUT) |
1474 | #define GPIO92_MMCDAT0_MD (92 | GPIO_ALT_FN_1_OUT) | 1474 | #define GPIO92_MMCDAT0_MD (92 | GPIO_ALT_FN_1_OUT) |
1475 | #define GPIO102_nPCE_1_MD (102 | GPIO_ALT_FN_1_OUT) | ||
1475 | #define GPIO104_pSKTSEL_MD (104 | GPIO_ALT_FN_1_OUT) | 1476 | #define GPIO104_pSKTSEL_MD (104 | GPIO_ALT_FN_1_OUT) |
1476 | #define GPIO109_MMCDAT1_MD (109 | GPIO_ALT_FN_1_OUT) | 1477 | #define GPIO109_MMCDAT1_MD (109 | GPIO_ALT_FN_1_OUT) |
1477 | #define GPIO110_MMCDAT2_MD (110 | GPIO_ALT_FN_1_OUT) | 1478 | #define GPIO110_MMCDAT2_MD (110 | GPIO_ALT_FN_1_OUT) |
@@ -1626,7 +1627,7 @@ | |||
1626 | #define SSCR0_RIM (1 << 22) /* Receive FIFO overrrun interrupt mask */ | 1627 | #define SSCR0_RIM (1 << 22) /* Receive FIFO overrrun interrupt mask */ |
1627 | #define SSCR0_TUM (1 << 23) /* Transmit FIFO underrun interrupt mask */ | 1628 | #define SSCR0_TUM (1 << 23) /* Transmit FIFO underrun interrupt mask */ |
1628 | #define SSCR0_FRDC (0x07000000) /* Frame rate divider control (mask) */ | 1629 | #define SSCR0_FRDC (0x07000000) /* Frame rate divider control (mask) */ |
1629 | #define SSCR0_SlotsPerFrm(c) ((x) - 1) /* Time slots per frame [1..8] */ | 1630 | #define SSCR0_SlotsPerFrm(x) ((x) - 1) /* Time slots per frame [1..8] */ |
1630 | #define SSCR0_ADC (1 << 30) /* Audio clock select */ | 1631 | #define SSCR0_ADC (1 << 30) /* Audio clock select */ |
1631 | #define SSCR0_MOD (1 << 31) /* Mode (normal or network) */ | 1632 | #define SSCR0_MOD (1 << 31) /* Mode (normal or network) */ |
1632 | #endif | 1633 | #endif |
@@ -1707,6 +1708,10 @@ | |||
1707 | #if defined (CONFIG_PXA27x) | 1708 | #if defined (CONFIG_PXA27x) |
1708 | #define SSTO_P1 __REG(0x41000028) /* SSP Port 1 Time Out Register */ | 1709 | #define SSTO_P1 __REG(0x41000028) /* SSP Port 1 Time Out Register */ |
1709 | #define SSPSP_P1 __REG(0x4100002C) /* SSP Port 1 Programmable Serial Protocol */ | 1710 | #define SSPSP_P1 __REG(0x4100002C) /* SSP Port 1 Programmable Serial Protocol */ |
1711 | #define SSTSA_P1 __REG(0x41000030) /* SSP Port 1 Tx Timeslot Active */ | ||
1712 | #define SSRSA_P1 __REG(0x41000034) /* SSP Port 1 Rx Timeslot Active */ | ||
1713 | #define SSTSS_P1 __REG(0x41000038) /* SSP Port 1 Timeslot Status */ | ||
1714 | #define SSACD_P1 __REG(0x4100003C) /* SSP Port 1 Audio Clock Divider */ | ||
1710 | #define SSCR0_P2 __REG(0x41700000) /* SSP Port 2 Control Register 0 */ | 1715 | #define SSCR0_P2 __REG(0x41700000) /* SSP Port 2 Control Register 0 */ |
1711 | #define SSCR1_P2 __REG(0x41700004) /* SSP Port 2 Control Register 1 */ | 1716 | #define SSCR1_P2 __REG(0x41700004) /* SSP Port 2 Control Register 1 */ |
1712 | #define SSSR_P2 __REG(0x41700008) /* SSP Port 2 Status Register */ | 1717 | #define SSSR_P2 __REG(0x41700008) /* SSP Port 2 Status Register */ |
@@ -1714,6 +1719,10 @@ | |||
1714 | #define SSDR_P2 __REG(0x41700010) /* (Write / Read) SSP Port 2 Data Write Register/SSP Data Read Register */ | 1719 | #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 */ | 1720 | #define SSTO_P2 __REG(0x41700028) /* SSP Port 2 Time Out Register */ |
1716 | #define SSPSP_P2 __REG(0x4170002C) /* SSP Port 2 Programmable Serial Protocol */ | 1721 | #define SSPSP_P2 __REG(0x4170002C) /* SSP Port 2 Programmable Serial Protocol */ |
1722 | #define SSTSA_P2 __REG(0x41700030) /* SSP Port 2 Tx Timeslot Active */ | ||
1723 | #define SSRSA_P2 __REG(0x41700034) /* SSP Port 2 Rx Timeslot Active */ | ||
1724 | #define SSTSS_P2 __REG(0x41700038) /* SSP Port 2 Timeslot Status */ | ||
1725 | #define SSACD_P2 __REG(0x4170003C) /* SSP Port 2 Audio Clock Divider */ | ||
1717 | #define SSCR0_P3 __REG(0x41900000) /* SSP Port 3 Control Register 0 */ | 1726 | #define SSCR0_P3 __REG(0x41900000) /* SSP Port 3 Control Register 0 */ |
1718 | #define SSCR1_P3 __REG(0x41900004) /* SSP Port 3 Control Register 1 */ | 1727 | #define SSCR1_P3 __REG(0x41900004) /* SSP Port 3 Control Register 1 */ |
1719 | #define SSSR_P3 __REG(0x41900008) /* SSP Port 3 Status Register */ | 1728 | #define SSSR_P3 __REG(0x41900008) /* SSP Port 3 Status Register */ |
@@ -1721,6 +1730,10 @@ | |||
1721 | #define SSDR_P3 __REG(0x41900010) /* (Write / Read) SSP Port 3 Data Write Register/SSP Data Read Register */ | 1730 | #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 */ | 1731 | #define SSTO_P3 __REG(0x41900028) /* SSP Port 3 Time Out Register */ |
1723 | #define SSPSP_P3 __REG(0x4190002C) /* SSP Port 3 Programmable Serial Protocol */ | 1732 | #define SSPSP_P3 __REG(0x4190002C) /* SSP Port 3 Programmable Serial Protocol */ |
1733 | #define SSTSA_P3 __REG(0x41900030) /* SSP Port 3 Tx Timeslot Active */ | ||
1734 | #define SSRSA_P3 __REG(0x41900034) /* SSP Port 3 Rx Timeslot Active */ | ||
1735 | #define SSTSS_P3 __REG(0x41900038) /* SSP Port 3 Timeslot Status */ | ||
1736 | #define SSACD_P3 __REG(0x4190003C) /* SSP Port 3 Audio Clock Divider */ | ||
1724 | #else /* PXA255 (only port 2) and PXA26x ports*/ | 1737 | #else /* PXA255 (only port 2) and PXA26x ports*/ |
1725 | #define SSTO_P1 __REG(0x41000028) /* SSP Port 1 Time Out Register */ | 1738 | #define SSTO_P1 __REG(0x41000028) /* SSP Port 1 Time Out Register */ |
1726 | #define SSPSP_P1 __REG(0x4100002C) /* SSP Port 1 Programmable Serial Protocol */ | 1739 | #define SSPSP_P1 __REG(0x4100002C) /* SSP Port 1 Programmable Serial Protocol */ |
@@ -1747,6 +1760,10 @@ | |||
1747 | #define SSDR_P(x) (*(((x) == 1) ? &SSDR_P1 : ((x) == 2) ? &SSDR_P2 : ((x) == 3) ? &SSDR_P3 : NULL)) | 1760 | #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)) | 1761 | #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)) | 1762 | #define SSPSP_P(x) (*(((x) == 1) ? &SSPSP_P1 : ((x) == 2) ? &SSPSP_P2 : ((x) == 3) ? &SSPSP_P3 : NULL)) |
1763 | #define SSTSA_P(x) (*(((x) == 1) ? &SSTSA_P1 : ((x) == 2) ? &SSTSA_P2 : ((x) == 3) ? &SSTSA_P3 : NULL)) | ||
1764 | #define SSRSA_P(x) (*(((x) == 1) ? &SSRSA_P1 : ((x) == 2) ? &SSRSA_P2 : ((x) == 3) ? &SSRSA_P3 : NULL)) | ||
1765 | #define SSTSS_P(x) (*(((x) == 1) ? &SSTSS_P1 : ((x) == 2) ? &SSTSS_P2 : ((x) == 3) ? &SSTSS_P3 : NULL)) | ||
1766 | #define SSACD_P(x) (*(((x) == 1) ? &SSACD_P1 : ((x) == 2) ? &SSACD_P2 : ((x) == 3) ? &SSACD_P3 : NULL)) | ||
1750 | 1767 | ||
1751 | /* | 1768 | /* |
1752 | * MultiMediaCard (MMC) controller | 1769 | * MultiMediaCard (MMC) controller |
diff --git a/include/asm-arm/arch-pxa/ssp.h b/include/asm-arm/arch-pxa/ssp.h index 949878c0d90..ea200551a75 100644 --- a/include/asm-arm/arch-pxa/ssp.h +++ b/include/asm-arm/arch-pxa/ssp.h | |||
@@ -40,8 +40,8 @@ struct ssp_dev { | |||
40 | }; | 40 | }; |
41 | 41 | ||
42 | int ssp_write_word(struct ssp_dev *dev, u32 data); | 42 | int ssp_write_word(struct ssp_dev *dev, u32 data); |
43 | int ssp_read_word(struct ssp_dev *dev); | 43 | int ssp_read_word(struct ssp_dev *dev, u32 *data); |
44 | void ssp_flush(struct ssp_dev *dev); | 44 | int ssp_flush(struct ssp_dev *dev); |
45 | void ssp_enable(struct ssp_dev *dev); | 45 | void ssp_enable(struct ssp_dev *dev); |
46 | void ssp_disable(struct ssp_dev *dev); | 46 | void ssp_disable(struct ssp_dev *dev); |
47 | void ssp_save_state(struct ssp_dev *dev, struct ssp_state *ssp); | 47 | void ssp_save_state(struct ssp_dev *dev, struct ssp_state *ssp); |
diff --git a/include/asm-arm/arch-pxa/system.h b/include/asm-arm/arch-pxa/system.h index 840a46bfbc5..1d56a3ef89f 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 aa125ec56a3..2473bb51d0a 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-pxa/trizeps4.h b/include/asm-arm/arch-pxa/trizeps4.h new file mode 100644 index 00000000000..641d0ec110b --- /dev/null +++ b/include/asm-arm/arch-pxa/trizeps4.h | |||
@@ -0,0 +1,106 @@ | |||
1 | /************************************************************************ | ||
2 | * Include file for TRIZEPS4 SoM and ConXS eval-board | ||
3 | * Copyright (c) Jürgen Schindele | ||
4 | * 2006 | ||
5 | ************************************************************************/ | ||
6 | |||
7 | /* | ||
8 | * Includes/Defines | ||
9 | */ | ||
10 | #ifndef _TRIPEPS4_H_ | ||
11 | #define _TRIPEPS4_H_ | ||
12 | |||
13 | /* physical memory regions */ | ||
14 | #define TRIZEPS4_FLASH_PHYS (PXA_CS0_PHYS) /* Flash region */ | ||
15 | #define TRIZEPS4_DISK_PHYS (PXA_CS1_PHYS) /* Disk On Chip region */ | ||
16 | #define TRIZEPS4_ETH_PHYS (PXA_CS2_PHYS) /* Ethernet DM9000 region */ | ||
17 | #define TRIZEPS4_PIC_PHYS (PXA_CS3_PHYS) /* Logic chip on ConXS-Board */ | ||
18 | #define TRIZEPS4_SDRAM_BASE 0xa0000000 /* SDRAM region */ | ||
19 | |||
20 | #define TRIZEPS4_CFSR_PHYS (PXA_CS3_PHYS) /* Logic chip on ConXS-Board CSFR register */ | ||
21 | #define TRIZEPS4_BOCR_PHYS (PXA_CS3_PHYS+0x02000000) /* Logic chip on ConXS-Board BOCR register */ | ||
22 | #define TRIZEPS4_IRCR_PHYS (PXA_CS3_PHYS+0x02400000) /* Logic chip on ConXS-Board IRCR register*/ | ||
23 | #define TRIZEPS4_UPSR_PHYS (PXA_CS3_PHYS+0x02800000) /* Logic chip on ConXS-Board UPSR register*/ | ||
24 | #define TRIZEPS4_DICR_PHYS (PXA_CS3_PHYS+0x03800000) /* Logic chip on ConXS-Board DICR register*/ | ||
25 | |||
26 | /* virtual memory regions */ | ||
27 | #define TRIZEPS4_DISK_VIRT 0xF0000000 /* Disk On Chip region */ | ||
28 | |||
29 | #define TRIZEPS4_PIC_VIRT 0xF0100000 /* not used */ | ||
30 | #define TRIZEPS4_CFSR_VIRT 0xF0100000 | ||
31 | #define TRIZEPS4_BOCR_VIRT 0xF0200000 | ||
32 | #define TRIZEPS4_DICR_VIRT 0xF0300000 | ||
33 | #define TRIZEPS4_IRCR_VIRT 0xF0400000 | ||
34 | #define TRIZEPS4_UPSR_VIRT 0xF0500000 | ||
35 | |||
36 | /* size of flash */ | ||
37 | #define TRIZEPS4_FLASH_SIZE 0x02000000 /* Flash size 32 MB */ | ||
38 | |||
39 | /* Ethernet Controller Davicom DM9000 */ | ||
40 | #define GPIO_DM9000 101 | ||
41 | #define TRIZEPS4_ETH_IRQ IRQ_GPIO(GPIO_DM9000) | ||
42 | |||
43 | /* UCB1400 audio / TS-controller */ | ||
44 | #define GPIO_UCB1400 1 | ||
45 | #define TRIZEPS4_UCB1400_IRQ IRQ_GPIO(GPIO_UCB1400) | ||
46 | |||
47 | /* PCMCIA socket Compact Flash */ | ||
48 | #define GPIO_PCD 11 /* PCMCIA Card Detect */ | ||
49 | #define TRIZEPS4_CD_IRQ IRQ_GPIO(GPIO_PCD) | ||
50 | #define GPIO_PRDY 13 /* READY / nINT */ | ||
51 | #define TRIZEPS4_READY_NINT IRQ_GPIO(GPIO_PRDY) | ||
52 | |||
53 | /* MMC socket */ | ||
54 | #define GPIO_MMC_DET 12 | ||
55 | #define TRIZEPS4_MMC_IRQ IRQ_GPIO(GPIO_MMC_DET) | ||
56 | |||
57 | /* LEDS using tx2 / rx2 */ | ||
58 | #define GPIO_SYS_BUSY_LED 46 | ||
59 | #define GPIO_HEARTBEAT_LED 47 | ||
60 | |||
61 | /* Off-module PIC on ConXS board */ | ||
62 | #define GPIO_PIC 0 | ||
63 | #define TRIZEPS4_PIC_IRQ IRQ_GPIO(GPIO_PIC) | ||
64 | |||
65 | #define CFSR_P2V(x) ((x) - TRIZEPS4_CFSR_PHYS + TRIZEPS4_CFSR_VIRT) | ||
66 | #define CFSR_V2P(x) ((x) - TRIZEPS4_CFSR_VIRT + TRIZEPS4_CFSR_PHYS) | ||
67 | |||
68 | #define BCR_P2V(x) ((x) - TRIZEPS4_BOCR_PHYS + TRIZEPS4_BOCR_VIRT) | ||
69 | #define BCR_V2P(x) ((x) - TRIZEPS4_BOCR_VIRT + TRIZEPS4_BOCR_PHYS) | ||
70 | |||
71 | #define DCR_P2V(x) ((x) - TRIZEPS4_DICR_PHYS + TRIZEPS4_DICR_VIRT) | ||
72 | #define DCR_V2P(x) ((x) - TRIZEPS4_DICR_VIRT + TRIZEPS4_DICR_PHYS) | ||
73 | |||
74 | #ifndef __ASSEMBLY__ | ||
75 | #define ConXS_CFSR (*((volatile unsigned short *)CFSR_P2V(0x0C000000))) | ||
76 | #define ConXS_BCR (*((volatile unsigned short *)BCR_P2V(0x0E000000))) | ||
77 | #define ConXS_DCR (*((volatile unsigned short *)DCR_P2V(0x0F800000))) | ||
78 | #else | ||
79 | #define ConXS_CFSR CFSR_P2V(0x0C000000) | ||
80 | #define ConXS_BCR BCR_P2V(0x0E000000) | ||
81 | #define ConXS_DCR DCR_P2V(0x0F800000) | ||
82 | #endif | ||
83 | |||
84 | #define ConXS_CFSR_BVD_MASK 0x0003 | ||
85 | #define ConXS_CFSR_BVD1 (1 << 0) | ||
86 | #define ConXS_CFSR_BVD2 (1 << 1) | ||
87 | #define ConXS_CFSR_VS_MASK 0x000C | ||
88 | #define ConXS_CFSR_VS1 (1 << 2) | ||
89 | #define ConXS_CFSR_VS2 (1 << 3) | ||
90 | #define ConXS_CFSR_VS_5V (0x3 << 2) | ||
91 | #define ConXS_CFSR_VS_3V3 0x0 | ||
92 | |||
93 | #define ConXS_BCR_S0_POW_EN0 (1 << 0) | ||
94 | #define ConXS_BCR_S0_POW_EN1 (1 << 1) | ||
95 | #define ConXS_BCR_L_DISP (1 << 4) | ||
96 | #define ConXS_BCR_CF_BUF_EN (1 << 5) | ||
97 | #define ConXS_BCR_CF_RESET (1 << 7) | ||
98 | #define ConXS_BCR_S0_VCC_3V3 0x1 | ||
99 | #define ConXS_BCR_S0_VCC_5V0 0x2 | ||
100 | #define ConXS_BCR_S0_VPP_12V 0x4 | ||
101 | #define ConXS_BCR_S0_VPP_3V3 0x8 | ||
102 | |||
103 | #define ConXS_IRCR_MODE (1 << 0) | ||
104 | #define ConXS_IRCR_SD (1 << 1) | ||
105 | |||
106 | #endif /* _TRIPEPS4_H_ */ | ||
diff --git a/include/asm-arm/arch-realview/io.h b/include/asm-arm/arch-realview/io.h index d444a68ac33..c70f1dfbe13 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 fc87783e8e8..515819efd04 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/anubis-cpld.h b/include/asm-arm/arch-s3c2410/anubis-cpld.h index 5675b1796b5..40e8e270d33 100644 --- a/include/asm-arm/arch-s3c2410/anubis-cpld.h +++ b/include/asm-arm/arch-s3c2410/anubis-cpld.h | |||
@@ -9,9 +9,6 @@ | |||
9 | * This program is free software; you can redistribute it and/or modify | 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 | 10 | * it under the terms of the GNU General Public License version 2 as |
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
12 | * | ||
13 | * Changelog: | ||
14 | * | ||
15 | */ | 12 | */ |
16 | 13 | ||
17 | #ifndef __ASM_ARCH_ANUBISCPLD_H | 14 | #ifndef __ASM_ARCH_ANUBISCPLD_H |
diff --git a/include/asm-arm/arch-s3c2410/anubis-irq.h b/include/asm-arm/arch-s3c2410/anubis-irq.h index 82f15dbd97e..4b5f423779d 100644 --- a/include/asm-arm/arch-s3c2410/anubis-irq.h +++ b/include/asm-arm/arch-s3c2410/anubis-irq.h | |||
@@ -9,9 +9,7 @@ | |||
9 | * This program is free software; you can redistribute it and/or modify | 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 | 10 | * it under the terms of the GNU General Public License version 2 as |
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
12 | * | 12 | */ |
13 | * Changelog: | ||
14 | */ | ||
15 | 13 | ||
16 | #ifndef __ASM_ARCH_ANUBISIRQ_H | 14 | #ifndef __ASM_ARCH_ANUBISIRQ_H |
17 | #define __ASM_ARCH_ANUBISIRQ_H | 15 | #define __ASM_ARCH_ANUBISIRQ_H |
diff --git a/include/asm-arm/arch-s3c2410/anubis-map.h b/include/asm-arm/arch-s3c2410/anubis-map.h index d529ffda859..058a2104b03 100644 --- a/include/asm-arm/arch-s3c2410/anubis-map.h +++ b/include/asm-arm/arch-s3c2410/anubis-map.h | |||
@@ -9,8 +9,6 @@ | |||
9 | * This program is free software; you can redistribute it and/or modify | 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 | 10 | * it under the terms of the GNU General Public License version 2 as |
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
12 | * | ||
13 | * Changelog: | ||
14 | */ | 12 | */ |
15 | 13 | ||
16 | /* needs arch/map.h including with this */ | 14 | /* needs arch/map.h including with this */ |
diff --git a/include/asm-arm/arch-s3c2410/audio.h b/include/asm-arm/arch-s3c2410/audio.h index 0d276e67f2f..7e0222276c9 100644 --- a/include/asm-arm/arch-s3c2410/audio.h +++ b/include/asm-arm/arch-s3c2410/audio.h | |||
@@ -9,10 +9,6 @@ | |||
9 | * This program is free software; you can redistribute it and/or modify | 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 | 10 | * it under the terms of the GNU General Public License version 2 as |
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
12 | * | ||
13 | * Changelog: | ||
14 | * 20-Nov-2004 BJD Created file | ||
15 | * 07-Mar-2005 BJD Added suspend/resume calls | ||
16 | */ | 12 | */ |
17 | 13 | ||
18 | #ifndef __ASM_ARCH_AUDIO_H | 14 | #ifndef __ASM_ARCH_AUDIO_H |
diff --git a/include/asm-arm/arch-s3c2410/bast-cpld.h b/include/asm-arm/arch-s3c2410/bast-cpld.h index e28ca51a497..8969cffe83f 100644 --- a/include/asm-arm/arch-s3c2410/bast-cpld.h +++ b/include/asm-arm/arch-s3c2410/bast-cpld.h | |||
@@ -8,11 +8,6 @@ | |||
8 | * This program is free software; you can redistribute it and/or modify | 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 | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | ||
12 | * Changelog: | ||
13 | * 25-May-2003 BJD Created file, added CTRL1 registers | ||
14 | * 30-Aug-2004 BJD Updated definitions from 2.4.26 port | ||
15 | * 30-Aug-2004 BJD Added CTRL3 and CTRL4 definitions | ||
16 | */ | 11 | */ |
17 | 12 | ||
18 | #ifndef __ASM_ARCH_BASTCPLD_H | 13 | #ifndef __ASM_ARCH_BASTCPLD_H |
diff --git a/include/asm-arm/arch-s3c2410/bast-irq.h b/include/asm-arm/arch-s3c2410/bast-irq.h index b79b47f0d12..15ffa66f501 100644 --- a/include/asm-arm/arch-s3c2410/bast-irq.h +++ b/include/asm-arm/arch-s3c2410/bast-irq.h | |||
@@ -8,11 +8,7 @@ | |||
8 | * This program is free software; you can redistribute it and/or modify | 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 | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | 11 | */ |
12 | * Changelog: | ||
13 | * 14-Sep-2004 BJD Fixed IRQ_USBOC definition | ||
14 | * 06-Jan-2003 BJD Linux 2.6.0 version | ||
15 | */ | ||
16 | 12 | ||
17 | #ifndef __ASM_ARCH_BASTIRQ_H | 13 | #ifndef __ASM_ARCH_BASTIRQ_H |
18 | #define __ASM_ARCH_BASTIRQ_H | 14 | #define __ASM_ARCH_BASTIRQ_H |
diff --git a/include/asm-arm/arch-s3c2410/bast-map.h b/include/asm-arm/arch-s3c2410/bast-map.h index 29c07e302b0..727cef84c70 100644 --- a/include/asm-arm/arch-s3c2410/bast-map.h +++ b/include/asm-arm/arch-s3c2410/bast-map.h | |||
@@ -8,10 +8,6 @@ | |||
8 | * This program is free software; you can redistribute it and/or modify | 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 | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | ||
12 | * Changelog: | ||
13 | * 06-Jan-2003 BJD Linux 2.6.0 version, moved bast specifics from arch/map.h | ||
14 | * 12-Mar-2004 BJD Fixed header include protection | ||
15 | */ | 11 | */ |
16 | 12 | ||
17 | /* needs arch/map.h including with this */ | 13 | /* needs arch/map.h including with this */ |
diff --git a/include/asm-arm/arch-s3c2410/bast-pmu.h b/include/asm-arm/arch-s3c2410/bast-pmu.h index 758c5c59d4b..82836027f00 100644 --- a/include/asm-arm/arch-s3c2410/bast-pmu.h +++ b/include/asm-arm/arch-s3c2410/bast-pmu.h | |||
@@ -9,9 +9,6 @@ | |||
9 | * This program is free software; you can redistribute it and/or modify | 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 | 10 | * it under the terms of the GNU General Public License version 2 as |
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
12 | * | ||
13 | * Changelog: | ||
14 | * 08-Oct-2003 BJD Initial creation | ||
15 | */ | 12 | */ |
16 | 13 | ||
17 | #ifndef __ASM_ARCH_BASTPMU_H | 14 | #ifndef __ASM_ARCH_BASTPMU_H |
diff --git a/include/asm-arm/arch-s3c2410/debug-macro.S b/include/asm-arm/arch-s3c2410/debug-macro.S index 5f8223e700d..93064860e0e 100644 --- a/include/asm-arm/arch-s3c2410/debug-macro.S +++ b/include/asm-arm/arch-s3c2410/debug-macro.S | |||
@@ -10,9 +10,6 @@ | |||
10 | * This program is free software; you can redistribute it and/or modify | 10 | * This program is free software; you can redistribute it and/or modify |
11 | * it under the terms of the GNU General Public License version 2 as | 11 | * it under the terms of the GNU General Public License version 2 as |
12 | * published by the Free Software Foundation. | 12 | * published by the Free Software Foundation. |
13 | * | ||
14 | * Modifications: | ||
15 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | ||
16 | */ | 13 | */ |
17 | 14 | ||
18 | #include <asm/arch/map.h> | 15 | #include <asm/arch/map.h> |
@@ -33,7 +30,7 @@ | |||
33 | .endm | 30 | .endm |
34 | 31 | ||
35 | .macro senduart,rd,rx | 32 | .macro senduart,rd,rx |
36 | str \rd, [\rx, # S3C2410_UTXH ] | 33 | strb \rd, [\rx, # S3C2410_UTXH ] |
37 | .endm | 34 | .endm |
38 | 35 | ||
39 | .macro busyuart, rd, rx | 36 | .macro busyuart, rd, rx |
@@ -42,6 +39,12 @@ | |||
42 | beq 1001f @ | 39 | beq 1001f @ |
43 | @ FIFO enabled... | 40 | @ FIFO enabled... |
44 | 1003: | 41 | 1003: |
42 | @ check for arm920 vs arm926. currently assume all arm926 | ||
43 | @ devices have an 64 byte FIFO identical to the s3c2440 | ||
44 | mrc p15, 0, \rd, c0, c0 | ||
45 | and \rd, \rd, #0xff0 | ||
46 | teq \rd, #0x260 | ||
47 | beq 1004f | ||
45 | mrc p15, 0, \rd, c1, c0 | 48 | mrc p15, 0, \rd, c1, c0 |
46 | tst \rd, #1 | 49 | tst \rd, #1 |
47 | addeq \rd, \rx, #(S3C24XX_PA_GPIO - S3C24XX_PA_UART) | 50 | addeq \rd, \rx, #(S3C24XX_PA_GPIO - S3C24XX_PA_UART) |
@@ -50,7 +53,7 @@ | |||
50 | ldr \rd, [ \rd, # S3C2410_GSTATUS1 - S3C2410_GPIOREG(0) ] | 53 | ldr \rd, [ \rd, # S3C2410_GSTATUS1 - S3C2410_GPIOREG(0) ] |
51 | and \rd, \rd, #0x00ff0000 | 54 | and \rd, \rd, #0x00ff0000 |
52 | teq \rd, #0x00440000 @ is it 2440? | 55 | teq \rd, #0x00440000 @ is it 2440? |
53 | 56 | 1004: | |
54 | ldr \rd, [ \rx, # S3C2410_UFSTAT ] | 57 | ldr \rd, [ \rx, # S3C2410_UFSTAT ] |
55 | moveq \rd, \rd, lsr #SHIFT_2440TXF | 58 | moveq \rd, \rd, lsr #SHIFT_2440TXF |
56 | tst \rd, #S3C2410_UFSTAT_TXFULL | 59 | tst \rd, #S3C2410_UFSTAT_TXFULL |
diff --git a/include/asm-arm/arch-s3c2410/dma.h b/include/asm-arm/arch-s3c2410/dma.h index b011e14f3bc..3661e465b0a 100644 --- a/include/asm-arm/arch-s3c2410/dma.h +++ b/include/asm-arm/arch-s3c2410/dma.h | |||
@@ -1,49 +1,41 @@ | |||
1 | /* linux/include/asm-arm/arch-bast/dma.h | 1 | /* linux/include/asm-arm/arch-s3c2410/dma.h |
2 | * | 2 | * |
3 | * Copyright (C) 2003,2004 Simtec Electronics | 3 | * Copyright (C) 2003,2004,2006 Simtec Electronics |
4 | * Ben Dooks <ben@simtec.co.uk> | 4 | * Ben Dooks <ben@simtec.co.uk> |
5 | * | 5 | * |
6 | * Samsung S3C2410X DMA support | 6 | * Samsung S3C241XX DMA support |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 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 | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | ||
12 | * Changelog: | ||
13 | * ??-May-2003 BJD Created file | ||
14 | * ??-Jun-2003 BJD Added more dma functionality to go with arch | ||
15 | * 10-Nov-2004 BJD Added sys_device support | ||
16 | */ | 11 | */ |
17 | 12 | ||
18 | #ifndef __ASM_ARCH_DMA_H | 13 | #ifndef __ASM_ARCH_DMA_H |
19 | #define __ASM_ARCH_DMA_H __FILE__ | 14 | #define __ASM_ARCH_DMA_H __FILE__ |
20 | 15 | ||
21 | #include <linux/config.h> | ||
22 | #include <linux/sysdev.h> | 16 | #include <linux/sysdev.h> |
23 | #include "hardware.h" | 17 | #include "hardware.h" |
24 | 18 | ||
25 | |||
26 | /* | 19 | /* |
27 | * This is the maximum DMA address(physical address) that can be DMAd to. | 20 | * This is the maximum DMA address(physical address) that can be DMAd to. |
28 | * | 21 | * |
29 | */ | 22 | */ |
30 | #define MAX_DMA_ADDRESS 0x20000000 | 23 | #define MAX_DMA_ADDRESS 0x40000000 |
31 | #define MAX_DMA_TRANSFER_SIZE 0x100000 /* Data Unit is half word */ | 24 | #define MAX_DMA_TRANSFER_SIZE 0x100000 /* Data Unit is half word */ |
32 | 25 | ||
33 | |||
34 | /* we have 4 dma channels */ | 26 | /* we have 4 dma channels */ |
35 | #define S3C2410_DMA_CHANNELS (4) | 27 | #define S3C2410_DMA_CHANNELS (4) |
36 | 28 | ||
37 | /* types */ | 29 | /* types */ |
38 | 30 | ||
39 | typedef enum { | 31 | enum s3c2410_dma_state { |
40 | S3C2410_DMA_IDLE, | 32 | S3C2410_DMA_IDLE, |
41 | S3C2410_DMA_RUNNING, | 33 | S3C2410_DMA_RUNNING, |
42 | S3C2410_DMA_PAUSED | 34 | S3C2410_DMA_PAUSED |
43 | } s3c2410_dma_state_t; | 35 | }; |
44 | 36 | ||
45 | 37 | ||
46 | /* s3c2410_dma_loadst_t | 38 | /* enum s3c2410_dma_loadst |
47 | * | 39 | * |
48 | * This represents the state of the DMA engine, wrt to the loaded / running | 40 | * This represents the state of the DMA engine, wrt to the loaded / running |
49 | * transfers. Since we don't have any way of knowing exactly the state of | 41 | * transfers. Since we don't have any way of knowing exactly the state of |
@@ -71,44 +63,40 @@ typedef enum { | |||
71 | * currently running. | 63 | * currently running. |
72 | */ | 64 | */ |
73 | 65 | ||
74 | typedef enum { | 66 | enum s3c2410_dma_loadst { |
75 | S3C2410_DMALOAD_NONE, | 67 | S3C2410_DMALOAD_NONE, |
76 | S3C2410_DMALOAD_1LOADED, | 68 | S3C2410_DMALOAD_1LOADED, |
77 | S3C2410_DMALOAD_1RUNNING, | 69 | S3C2410_DMALOAD_1RUNNING, |
78 | S3C2410_DMALOAD_1LOADED_1RUNNING, | 70 | S3C2410_DMALOAD_1LOADED_1RUNNING, |
79 | } s3c2410_dma_loadst_t; | 71 | }; |
80 | 72 | ||
81 | typedef enum { | 73 | enum s3c2410_dma_buffresult { |
82 | S3C2410_RES_OK, | 74 | S3C2410_RES_OK, |
83 | S3C2410_RES_ERR, | 75 | S3C2410_RES_ERR, |
84 | S3C2410_RES_ABORT | 76 | S3C2410_RES_ABORT |
85 | } s3c2410_dma_buffresult_t; | 77 | }; |
86 | |||
87 | |||
88 | typedef enum s3c2410_dmasrc_e s3c2410_dmasrc_t; | ||
89 | 78 | ||
90 | enum s3c2410_dmasrc_e { | 79 | enum s3c2410_dmasrc { |
91 | S3C2410_DMASRC_HW, /* source is memory */ | 80 | S3C2410_DMASRC_HW, /* source is memory */ |
92 | S3C2410_DMASRC_MEM /* source is hardware */ | 81 | S3C2410_DMASRC_MEM /* source is hardware */ |
93 | }; | 82 | }; |
94 | 83 | ||
95 | /* enum s3c2410_chan_op_e | 84 | /* enum s3c2410_chan_op |
96 | * | 85 | * |
97 | * operation codes passed to the DMA code by the user, and also used | 86 | * operation codes passed to the DMA code by the user, and also used |
98 | * to inform the current channel owner of any changes to the system state | 87 | * to inform the current channel owner of any changes to the system state |
99 | */ | 88 | */ |
100 | 89 | ||
101 | enum s3c2410_chan_op_e { | 90 | enum s3c2410_chan_op { |
102 | S3C2410_DMAOP_START, | 91 | S3C2410_DMAOP_START, |
103 | S3C2410_DMAOP_STOP, | 92 | S3C2410_DMAOP_STOP, |
104 | S3C2410_DMAOP_PAUSE, | 93 | S3C2410_DMAOP_PAUSE, |
105 | S3C2410_DMAOP_RESUME, | 94 | S3C2410_DMAOP_RESUME, |
106 | S3C2410_DMAOP_FLUSH, | 95 | S3C2410_DMAOP_FLUSH, |
107 | S3C2410_DMAOP_TIMEOUT, /* internal signal to handler */ | 96 | S3C2410_DMAOP_TIMEOUT, /* internal signal to handler */ |
97 | S3C2410_DMAOP_STARTED, /* indicate channel started */ | ||
108 | }; | 98 | }; |
109 | 99 | ||
110 | typedef enum s3c2410_chan_op_e s3c2410_chan_op_t; | ||
111 | |||
112 | /* flags */ | 100 | /* flags */ |
113 | 101 | ||
114 | #define S3C2410_DMAF_SLOW (1<<0) /* slow, so don't worry about | 102 | #define S3C2410_DMAF_SLOW (1<<0) /* slow, so don't worry about |
@@ -117,104 +105,100 @@ typedef enum s3c2410_chan_op_e s3c2410_chan_op_t; | |||
117 | 105 | ||
118 | /* dma buffer */ | 106 | /* dma buffer */ |
119 | 107 | ||
120 | typedef struct s3c2410_dma_buf_s s3c2410_dma_buf_t; | ||
121 | |||
122 | struct s3c2410_dma_client { | 108 | struct s3c2410_dma_client { |
123 | char *name; | 109 | char *name; |
124 | }; | 110 | }; |
125 | 111 | ||
126 | typedef struct s3c2410_dma_client s3c2410_dma_client_t; | ||
127 | |||
128 | /* s3c2410_dma_buf_s | 112 | /* s3c2410_dma_buf_s |
129 | * | 113 | * |
130 | * internally used buffer structure to describe a queued or running | 114 | * internally used buffer structure to describe a queued or running |
131 | * buffer. | 115 | * buffer. |
132 | */ | 116 | */ |
133 | 117 | ||
134 | struct s3c2410_dma_buf_s { | 118 | struct s3c2410_dma_buf; |
135 | s3c2410_dma_buf_t *next; | 119 | struct s3c2410_dma_buf { |
136 | int magic; /* magic */ | 120 | struct s3c2410_dma_buf *next; |
137 | int size; /* buffer size in bytes */ | 121 | int magic; /* magic */ |
138 | dma_addr_t data; /* start of DMA data */ | 122 | int size; /* buffer size in bytes */ |
139 | dma_addr_t ptr; /* where the DMA got to [1] */ | 123 | dma_addr_t data; /* start of DMA data */ |
140 | void *id; /* client's id */ | 124 | dma_addr_t ptr; /* where the DMA got to [1] */ |
125 | void *id; /* client's id */ | ||
141 | }; | 126 | }; |
142 | 127 | ||
143 | /* [1] is this updated for both recv/send modes? */ | 128 | /* [1] is this updated for both recv/send modes? */ |
144 | 129 | ||
145 | typedef struct s3c2410_dma_chan_s s3c2410_dma_chan_t; | 130 | struct s3c2410_dma_chan; |
146 | 131 | ||
147 | /* s3c2410_dma_cbfn_t | 132 | /* s3c2410_dma_cbfn_t |
148 | * | 133 | * |
149 | * buffer callback routine type | 134 | * buffer callback routine type |
150 | */ | 135 | */ |
151 | 136 | ||
152 | typedef void (*s3c2410_dma_cbfn_t)(s3c2410_dma_chan_t *, void *buf, int size, | 137 | typedef void (*s3c2410_dma_cbfn_t)(struct s3c2410_dma_chan *, |
153 | s3c2410_dma_buffresult_t result); | 138 | void *buf, int size, |
139 | enum s3c2410_dma_buffresult result); | ||
154 | 140 | ||
155 | typedef int (*s3c2410_dma_opfn_t)(s3c2410_dma_chan_t *, | 141 | typedef int (*s3c2410_dma_opfn_t)(struct s3c2410_dma_chan *, |
156 | s3c2410_chan_op_t ); | 142 | enum s3c2410_chan_op ); |
157 | 143 | ||
158 | struct s3c2410_dma_stats_s { | 144 | struct s3c2410_dma_stats { |
159 | unsigned long loads; | 145 | unsigned long loads; |
160 | unsigned long timeout_longest; | 146 | unsigned long timeout_longest; |
161 | unsigned long timeout_shortest; | 147 | unsigned long timeout_shortest; |
162 | unsigned long timeout_avg; | 148 | unsigned long timeout_avg; |
163 | unsigned long timeout_failed; | 149 | unsigned long timeout_failed; |
164 | }; | 150 | }; |
165 | 151 | ||
166 | typedef struct s3c2410_dma_stats_s s3c2410_dma_stats_t; | 152 | /* struct s3c2410_dma_chan |
167 | |||
168 | /* struct s3c2410_dma_chan_s | ||
169 | * | 153 | * |
170 | * full state information for each DMA channel | 154 | * full state information for each DMA channel |
171 | */ | 155 | */ |
172 | 156 | ||
173 | struct s3c2410_dma_chan_s { | 157 | struct s3c2410_dma_chan { |
174 | /* channel state flags and information */ | 158 | /* channel state flags and information */ |
175 | unsigned char number; /* number of this dma channel */ | 159 | unsigned char number; /* number of this dma channel */ |
176 | unsigned char in_use; /* channel allocated */ | 160 | unsigned char in_use; /* channel allocated */ |
177 | unsigned char irq_claimed; /* irq claimed for channel */ | 161 | unsigned char irq_claimed; /* irq claimed for channel */ |
178 | unsigned char irq_enabled; /* irq enabled for channel */ | 162 | unsigned char irq_enabled; /* irq enabled for channel */ |
179 | unsigned char xfer_unit; /* size of an transfer */ | 163 | unsigned char xfer_unit; /* size of an transfer */ |
180 | 164 | ||
181 | /* channel state */ | 165 | /* channel state */ |
182 | 166 | ||
183 | s3c2410_dma_state_t state; | 167 | enum s3c2410_dma_state state; |
184 | s3c2410_dma_loadst_t load_state; | 168 | enum s3c2410_dma_loadst load_state; |
185 | s3c2410_dma_client_t *client; | 169 | struct s3c2410_dma_client *client; |
186 | 170 | ||
187 | /* channel configuration */ | 171 | /* channel configuration */ |
188 | s3c2410_dmasrc_t source; | 172 | enum s3c2410_dmasrc source; |
189 | unsigned long dev_addr; | 173 | unsigned long dev_addr; |
190 | unsigned long load_timeout; | 174 | unsigned long load_timeout; |
191 | unsigned int flags; /* channel flags */ | 175 | unsigned int flags; /* channel flags */ |
192 | 176 | ||
193 | /* channel's hardware position and configuration */ | 177 | /* channel's hardware position and configuration */ |
194 | void __iomem *regs; /* channels registers */ | 178 | void __iomem *regs; /* channels registers */ |
195 | void __iomem *addr_reg; /* data address register */ | 179 | void __iomem *addr_reg; /* data address register */ |
196 | unsigned int irq; /* channel irq */ | 180 | unsigned int irq; /* channel irq */ |
197 | unsigned long dcon; /* default value of DCON */ | 181 | unsigned long dcon; /* default value of DCON */ |
198 | 182 | ||
199 | /* driver handles */ | 183 | /* driver handles */ |
200 | s3c2410_dma_cbfn_t callback_fn; /* buffer done callback */ | 184 | s3c2410_dma_cbfn_t callback_fn; /* buffer done callback */ |
201 | s3c2410_dma_opfn_t op_fn; /* channel operation callback */ | 185 | s3c2410_dma_opfn_t op_fn; /* channel op callback */ |
202 | 186 | ||
203 | /* stats gathering */ | 187 | /* stats gathering */ |
204 | s3c2410_dma_stats_t *stats; | 188 | struct s3c2410_dma_stats *stats; |
205 | s3c2410_dma_stats_t stats_store; | 189 | struct s3c2410_dma_stats stats_store; |
206 | 190 | ||
207 | /* buffer list and information */ | 191 | /* buffer list and information */ |
208 | s3c2410_dma_buf_t *curr; /* current dma buffer */ | 192 | struct s3c2410_dma_buf *curr; /* current dma buffer */ |
209 | s3c2410_dma_buf_t *next; /* next buffer to load */ | 193 | struct s3c2410_dma_buf *next; /* next buffer to load */ |
210 | s3c2410_dma_buf_t *end; /* end of queue */ | 194 | struct s3c2410_dma_buf *end; /* end of queue */ |
211 | 195 | ||
212 | /* system device */ | 196 | /* system device */ |
213 | struct sys_device dev; | 197 | struct sys_device dev; |
214 | }; | 198 | }; |
215 | 199 | ||
216 | /* the currently allocated channel information */ | 200 | /* the currently allocated channel information */ |
217 | extern s3c2410_dma_chan_t s3c2410_chans[]; | 201 | extern struct s3c2410_dma_chan s3c2410_chans[]; |
218 | 202 | ||
219 | /* note, we don't really use dma_device_t at the moment */ | 203 | /* note, we don't really use dma_device_t at the moment */ |
220 | typedef unsigned long dma_device_t; | 204 | typedef unsigned long dma_device_t; |
@@ -227,7 +211,7 @@ typedef unsigned long dma_device_t; | |||
227 | */ | 211 | */ |
228 | 212 | ||
229 | extern int s3c2410_dma_request(dmach_t channel, | 213 | extern int s3c2410_dma_request(dmach_t channel, |
230 | s3c2410_dma_client_t *, void *dev); | 214 | struct s3c2410_dma_client *, void *dev); |
231 | 215 | ||
232 | 216 | ||
233 | /* s3c2410_dma_ctrl | 217 | /* s3c2410_dma_ctrl |
@@ -235,7 +219,7 @@ extern int s3c2410_dma_request(dmach_t channel, | |||
235 | * change the state of the dma channel | 219 | * change the state of the dma channel |
236 | */ | 220 | */ |
237 | 221 | ||
238 | extern int s3c2410_dma_ctrl(dmach_t channel, s3c2410_chan_op_t op); | 222 | extern int s3c2410_dma_ctrl(dmach_t channel, enum s3c2410_chan_op op); |
239 | 223 | ||
240 | /* s3c2410_dma_setflags | 224 | /* s3c2410_dma_setflags |
241 | * | 225 | * |
@@ -250,7 +234,7 @@ extern int s3c2410_dma_setflags(dmach_t channel, | |||
250 | * free the dma channel (will also abort any outstanding operations) | 234 | * free the dma channel (will also abort any outstanding operations) |
251 | */ | 235 | */ |
252 | 236 | ||
253 | extern int s3c2410_dma_free(dmach_t channel, s3c2410_dma_client_t *); | 237 | extern int s3c2410_dma_free(dmach_t channel, struct s3c2410_dma_client *); |
254 | 238 | ||
255 | /* s3c2410_dma_enqueue | 239 | /* s3c2410_dma_enqueue |
256 | * | 240 | * |
@@ -274,7 +258,7 @@ extern int s3c2410_dma_config(dmach_t channel, int xferunit, int dcon); | |||
274 | * configure the device we're talking to | 258 | * configure the device we're talking to |
275 | */ | 259 | */ |
276 | 260 | ||
277 | extern int s3c2410_dma_devconfig(int channel, s3c2410_dmasrc_t source, | 261 | extern int s3c2410_dma_devconfig(int channel, enum s3c2410_dmasrc source, |
278 | int hwcfg, unsigned long devaddr); | 262 | int hwcfg, unsigned long devaddr); |
279 | 263 | ||
280 | /* s3c2410_dma_getposition | 264 | /* s3c2410_dma_getposition |
diff --git a/include/asm-arm/arch-s3c2410/entry-macro.S b/include/asm-arm/arch-s3c2410/entry-macro.S index 894c35cf3b1..e09a6b8ec15 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/fb.h b/include/asm-arm/arch-s3c2410/fb.h index 4790491ba9d..71161797bc8 100644 --- a/include/asm-arm/arch-s3c2410/fb.h +++ b/include/asm-arm/arch-s3c2410/fb.h | |||
@@ -7,13 +7,6 @@ | |||
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License version 2 as | 8 | * it under the terms of the GNU General Public License version 2 as |
9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
10 | * | ||
11 | * | ||
12 | * Changelog: | ||
13 | * 07-Sep-2004 RTP Created file | ||
14 | * 03-Nov-2004 BJD Updated and minor cleanups | ||
15 | * 03-Aug-2005 RTP Renamed to fb.h | ||
16 | * 26-Oct-2005 BJD Changed name of platdata init | ||
17 | */ | 10 | */ |
18 | 11 | ||
19 | #ifndef __ASM_ARM_FB_H | 12 | #ifndef __ASM_ARM_FB_H |
diff --git a/include/asm-arm/arch-s3c2410/hardware.h b/include/asm-arm/arch-s3c2410/hardware.h index a2330bf8369..871f8af09b8 100644 --- a/include/asm-arm/arch-s3c2410/hardware.h +++ b/include/asm-arm/arch-s3c2410/hardware.h | |||
@@ -8,16 +8,6 @@ | |||
8 | * This program is free software; you can redistribute it and/or modify | 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 | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | ||
12 | * Changelog: | ||
13 | * 21-May-2003 BJD Created file | ||
14 | * 06-Jun-2003 BJD Added CPU frequency settings | ||
15 | * 03-Sep-2003 BJD Linux v2.6 support | ||
16 | * 12-Mar-2004 BJD Fixed include protection, fixed type of clock vars | ||
17 | * 14-Sep-2004 BJD Added misccr and getpin to gpio | ||
18 | * 01-Oct-2004 BJD Added the new gpio functions | ||
19 | * 16-Oct-2004 BJD Removed the clock variables | ||
20 | * 15-Jan-2006 LCVR Added s3c2400_gpio_getirq() | ||
21 | */ | 11 | */ |
22 | 12 | ||
23 | #ifndef __ASM_ARCH_HARDWARE_H | 13 | #ifndef __ASM_ARCH_HARDWARE_H |
diff --git a/include/asm-arm/arch-s3c2410/idle.h b/include/asm-arm/arch-s3c2410/idle.h index 749227c0957..eed450608f9 100644 --- a/include/asm-arm/arch-s3c2410/idle.h +++ b/include/asm-arm/arch-s3c2410/idle.h | |||
@@ -8,10 +8,6 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | * | 9 | * |
10 | * S3C2410 CPU Idle controls | 10 | * S3C2410 CPU Idle controls |
11 | * | ||
12 | * Changelog: | ||
13 | * 28-Oct-2004 BJD Initial version | ||
14 | * | ||
15 | */ | 11 | */ |
16 | 12 | ||
17 | #ifndef __ASM_ARCH_IDLE_H | 13 | #ifndef __ASM_ARCH_IDLE_H |
diff --git a/include/asm-arm/arch-s3c2410/iic.h b/include/asm-arm/arch-s3c2410/iic.h index 518547f6d7a..ed3d6c7bf6d 100644 --- a/include/asm-arm/arch-s3c2410/iic.h +++ b/include/asm-arm/arch-s3c2410/iic.h | |||
@@ -8,10 +8,6 @@ | |||
8 | * This program is free software; you can redistribute it and/or modify | 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 | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | ||
12 | * Changelog: | ||
13 | * 05-Oct-2004 BJD Created file | ||
14 | * 19-Oct-2004 BJD Updated for s3c2440 | ||
15 | */ | 11 | */ |
16 | 12 | ||
17 | #ifndef __ASM_ARCH_IIC_H | 13 | #ifndef __ASM_ARCH_IIC_H |
diff --git a/include/asm-arm/arch-s3c2410/io.h b/include/asm-arm/arch-s3c2410/io.h index 16fbc8afffd..6b35a4f2630 100644 --- a/include/asm-arm/arch-s3c2410/io.h +++ b/include/asm-arm/arch-s3c2410/io.h | |||
@@ -4,13 +4,7 @@ | |||
4 | * | 4 | * |
5 | * Copyright (C) 1997 Russell King | 5 | * Copyright (C) 1997 Russell King |
6 | * (C) 2003 Simtec Electronics | 6 | * (C) 2003 Simtec Electronics |
7 | * | 7 | */ |
8 | * Modifications: | ||
9 | * 06-Dec-1997 RMK Created. | ||
10 | * 02-Sep-2003 BJD Modified for S3C2410 | ||
11 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | ||
12 | * 13-Oct-2005 BJD Fixed problems with LDRH/STRH offset range | ||
13 | */ | ||
14 | 8 | ||
15 | #ifndef __ASM_ARM_ARCH_IO_H | 9 | #ifndef __ASM_ARM_ARCH_IO_H |
16 | #define __ASM_ARM_ARCH_IO_H | 10 | #define __ASM_ARM_ARCH_IO_H |
diff --git a/include/asm-arm/arch-s3c2410/irqs.h b/include/asm-arm/arch-s3c2410/irqs.h index d9773d69726..39a69829d16 100644 --- a/include/asm-arm/arch-s3c2410/irqs.h +++ b/include/asm-arm/arch-s3c2410/irqs.h | |||
@@ -6,14 +6,7 @@ | |||
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 |
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | * | 9 | */ |
10 | * Changelog: | ||
11 | * 12-May-2003 BJD Created file | ||
12 | * 08-Jan-2003 BJD Linux 2.6.0 version, moved BAST bits out | ||
13 | * 12-Mar-2004 BJD Fixed bug in header protection | ||
14 | * 10-Feb-2005 BJD Added camera IRQ from guillaume.gourat@nexvision.tv | ||
15 | * 28-Feb-2005 BJD Updated s3c2440 IRQs | ||
16 | */ | ||
17 | 10 | ||
18 | 11 | ||
19 | #ifndef __ASM_ARCH_IRQS_H | 12 | #ifndef __ASM_ARCH_IRQS_H |
diff --git a/include/asm-arm/arch-s3c2410/map.h b/include/asm-arm/arch-s3c2410/map.h index c380d264a84..27ba0ac3fdd 100644 --- a/include/asm-arm/arch-s3c2410/map.h +++ b/include/asm-arm/arch-s3c2410/map.h | |||
@@ -8,13 +8,6 @@ | |||
8 | * This program is free software; you can redistribute it and/or modify | 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 | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | ||
12 | * Changelog: | ||
13 | * 12-May-2003 BJD Created file | ||
14 | * 06-Jan-2003 BJD Linux 2.6.0 version, moved bast specifics out | ||
15 | * 10-Feb-2005 BJD Added CAMIF definition from guillaume.gourat@nexvision.tv | ||
16 | * 10-Mar-2005 LCVR Added support to S3C2400, changed {VA,SZ} names | ||
17 | * 15-Jan-2006 LCVR Added S3C24XX_PA macros for common S3C24XX resources | ||
18 | */ | 11 | */ |
19 | 12 | ||
20 | #ifndef __ASM_ARCH_MAP_H | 13 | #ifndef __ASM_ARCH_MAP_H |
@@ -126,9 +119,18 @@ | |||
126 | #define S3C24XX_SZ_IIS SZ_1M | 119 | #define S3C24XX_SZ_IIS SZ_1M |
127 | 120 | ||
128 | /* GPIO ports */ | 121 | /* GPIO ports */ |
129 | #define S3C24XX_VA_GPIO S3C2410_ADDR(0x00E00000) | 122 | |
123 | /* the calculation for the VA of this must ensure that | ||
124 | * it is the same distance apart from the UART in the | ||
125 | * phsyical address space, as the initial mapping for the IO | ||
126 | * is done as a 1:1 maping. This puts it (currently) at | ||
127 | * 0xF6800000, which is not in the way of any current mapping | ||
128 | * by the base system. | ||
129 | */ | ||
130 | |||
130 | #define S3C2400_PA_GPIO (0x15600000) | 131 | #define S3C2400_PA_GPIO (0x15600000) |
131 | #define S3C2410_PA_GPIO (0x56000000) | 132 | #define S3C2410_PA_GPIO (0x56000000) |
133 | #define S3C24XX_VA_GPIO ((S3C2410_PA_GPIO - S3C24XX_PA_UART) + S3C24XX_VA_UART) | ||
132 | #define S3C24XX_SZ_GPIO SZ_1M | 134 | #define S3C24XX_SZ_GPIO SZ_1M |
133 | 135 | ||
134 | /* RTC */ | 136 | /* RTC */ |
@@ -227,4 +229,20 @@ | |||
227 | #define S3C24XX_PA_SPI S3C2410_PA_SPI | 229 | #define S3C24XX_PA_SPI S3C2410_PA_SPI |
228 | #endif | 230 | #endif |
229 | 231 | ||
232 | /* deal with the registers that move under the 2412/2413 */ | ||
233 | |||
234 | #if defined(CONFIG_CPU_S3C2412) || defined(CONFIG_CPU_S3C2413) | ||
235 | #ifndef __ASSEMBLY__ | ||
236 | extern void __iomem *s3c24xx_va_gpio2; | ||
237 | #endif | ||
238 | #ifdef CONFIG_CPU_S3C2412_ONLY | ||
239 | #define S3C24XX_VA_GPIO2 (S3C24XX_VA_GPIO + 0x10) | ||
240 | #else | ||
241 | #define S3C24XX_VA_GPIO2 s3c24xx_va_gpio2 | ||
242 | #endif | ||
243 | #else | ||
244 | #define s3c24xx_va_gpio2 S3C24XX_VA_GPIO | ||
245 | #define S3C24XX_VA_GPIO2 S3C24XX_VA_GPIO | ||
246 | #endif | ||
247 | |||
230 | #endif /* __ASM_ARCH_MAP_H */ | 248 | #endif /* __ASM_ARCH_MAP_H */ |
diff --git a/include/asm-arm/arch-s3c2410/memory.h b/include/asm-arm/arch-s3c2410/memory.h index 6ab834a14c8..4be6a74c430 100644 --- a/include/asm-arm/arch-s3c2410/memory.h +++ b/include/asm-arm/arch-s3c2410/memory.h | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* linux/include/asm-arm/arch-s3c2410/memory.h |
2 | * linux/include/asm-arm/arch-s3c2410/memory.h | ||
3 | * | ||
4 | * from linux/include/asm-arm/arch-rpc/memory.h | 2 | * from linux/include/asm-arm/arch-rpc/memory.h |
5 | * | 3 | * |
6 | * Copyright (C) 1996,1997,1998 Russell King. | 4 | * Copyright (C) 1996,1997,1998 Russell King. |
@@ -8,16 +6,6 @@ | |||
8 | * 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 |
9 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
11 | * | ||
12 | * Changelog: | ||
13 | * 20-Oct-1996 RMK Created | ||
14 | * 31-Dec-1997 RMK Fixed definitions to reduce warnings | ||
15 | * 11-Jan-1998 RMK Uninlined to reduce hits on cache | ||
16 | * 08-Feb-1998 RMK Added __virt_to_bus and __bus_to_virt | ||
17 | * 21-Mar-1999 RMK Renamed to memory.h | ||
18 | * RMK Added TASK_SIZE and PAGE_OFFSET | ||
19 | * 05-Apr-2004 BJD Copied and altered for arch-s3c2410 | ||
20 | * 17-Mar-2005 LCVR Modified for S3C2400 | ||
21 | */ | 9 | */ |
22 | 10 | ||
23 | #ifndef __ASM_ARCH_MEMORY_H | 11 | #ifndef __ASM_ARCH_MEMORY_H |
diff --git a/include/asm-arm/arch-s3c2410/nand.h b/include/asm-arm/arch-s3c2410/nand.h index 9148ac045b0..e350ae2acfc 100644 --- a/include/asm-arm/arch-s3c2410/nand.h +++ b/include/asm-arm/arch-s3c2410/nand.h | |||
@@ -8,9 +8,6 @@ | |||
8 | * This program is free software; you can redistribute it and/or modify | 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 | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | ||
12 | * Changelog: | ||
13 | * 23-Sep-2004 BJD Created file | ||
14 | */ | 11 | */ |
15 | 12 | ||
16 | /* struct s3c2410_nand_set | 13 | /* struct s3c2410_nand_set |
diff --git a/include/asm-arm/arch-s3c2410/osiris-map.h b/include/asm-arm/arch-s3c2410/osiris-map.h index 7c4b0cd2d14..e2d406218ae 100644 --- a/include/asm-arm/arch-s3c2410/osiris-map.h +++ b/include/asm-arm/arch-s3c2410/osiris-map.h | |||
@@ -9,8 +9,6 @@ | |||
9 | * This program is free software; you can redistribute it and/or modify | 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 | 10 | * it under the terms of the GNU General Public License version 2 as |
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
12 | * | ||
13 | * Changelog: | ||
14 | */ | 12 | */ |
15 | 13 | ||
16 | /* needs arch/map.h including with this */ | 14 | /* needs arch/map.h including with this */ |
diff --git a/include/asm-arm/arch-s3c2410/regs-adc.h b/include/asm-arm/arch-s3c2410/regs-adc.h index 15bfc2f5754..c7b90b3ecc9 100644 --- a/include/asm-arm/arch-s3c2410/regs-adc.h +++ b/include/asm-arm/arch-s3c2410/regs-adc.h | |||
@@ -7,9 +7,6 @@ | |||
7 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
8 | * | 8 | * |
9 | * S3C2410 ADC registers | 9 | * S3C2410 ADC registers |
10 | * | ||
11 | * Changelog: | ||
12 | * 27-09-2004 SAH Created file | ||
13 | */ | 10 | */ |
14 | 11 | ||
15 | #ifndef __ASM_ARCH_REGS_ADC_H | 12 | #ifndef __ASM_ARCH_REGS_ADC_H |
diff --git a/include/asm-arm/arch-s3c2410/regs-clock.h b/include/asm-arm/arch-s3c2410/regs-clock.h index 34360706e01..b2f4690c079 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 |
@@ -8,18 +8,6 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | * | 9 | * |
10 | * S3C2410 clock register definitions | 10 | * S3C2410 clock register definitions |
11 | * | ||
12 | * Changelog: | ||
13 | * 18-Aug-2004 Ben Dooks Added 2440 definitions | ||
14 | * 08-Aug-2004 Herbert Pötzl Added CLKCON definitions | ||
15 | * 19-06-2003 Ben Dooks Created file | ||
16 | * 12-03-2004 Ben Dooks Updated include protection | ||
17 | * 29-Sep-2004 Ben Dooks Fixed usage for assembly inclusion | ||
18 | * 10-Feb-2005 Ben Dooks Fixed CAMDIVN address (Guillaume Gourat) | ||
19 | * 10-Mar-2005 Lucas Villa Real Changed S3C2410_VA to S3C24XX_VA | ||
20 | * 27-Aug-2005 Ben Dooks Add clock-slow info | ||
21 | * 20-Oct-2005 Ben Dooks Fixed overflow in PLL (Guillaume Gourat) | ||
22 | * 20-Oct-2005 Ben Dooks Add masks for DCLK (Guillaume Gourat) | ||
23 | */ | 11 | */ |
24 | 12 | ||
25 | #ifndef __ASM_ARM_REGS_CLOCK | 13 | #ifndef __ASM_ARM_REGS_CLOCK |
@@ -114,7 +102,7 @@ s3c2410_get_pll(unsigned int pllval, unsigned int baseclk) | |||
114 | 102 | ||
115 | #endif /* __ASSEMBLY__ */ | 103 | #endif /* __ASSEMBLY__ */ |
116 | 104 | ||
117 | #ifdef CONFIG_CPU_S3C2440 | 105 | #if defined(CONFIG_CPU_S3C2440) || defined(CONFIG_CPU_S3C2442) |
118 | 106 | ||
119 | /* extra registers */ | 107 | /* extra registers */ |
120 | #define S3C2440_CAMDIVN S3C2410_CLKREG(0x18) | 108 | #define S3C2440_CAMDIVN S3C2410_CLKREG(0x18) |
@@ -136,7 +124,70 @@ s3c2410_get_pll(unsigned int pllval, unsigned int baseclk) | |||
136 | #define S3C2440_CAMDIVN_HCLK4_HALF (1<<9) | 124 | #define S3C2440_CAMDIVN_HCLK4_HALF (1<<9) |
137 | #define S3C2440_CAMDIVN_DVSEN (1<<12) | 125 | #define S3C2440_CAMDIVN_DVSEN (1<<12) |
138 | 126 | ||
139 | #endif /* CONFIG_CPU_S3C2440 */ | 127 | #define S3C2442_CAMDIVN_CAMCLK_DIV3 (1<<5) |
140 | 128 | ||
129 | #endif /* CONFIG_CPU_S3C2440 or CONFIG_CPU_S3C2442 */ | ||
130 | |||
131 | #if defined(CONFIG_CPU_S3C2412) || defined(CONFIG_CPU_S3C2413) | ||
132 | |||
133 | #define S3C2412_OSCSET S3C2410_CLKREG(0x18) | ||
134 | #define S3C2412_CLKSRC S3C2410_CLKREG(0x1C) | ||
135 | |||
136 | #define S3C2412_PLLCON_OFF (1<<20) | ||
137 | |||
138 | #define S3C2412_CLKDIVN_PDIVN (1<<2) | ||
139 | #define S3C2412_CLKDIVN_HDIVN_MASK (3<<0) | ||
140 | #define S3C2421_CLKDIVN_ARMDIVN (1<<3) | ||
141 | #define S3C2412_CLKDIVN_USB48DIV (1<<6) | ||
142 | #define S3C2412_CLKDIVN_UARTDIV_MASK (15<<8) | ||
143 | #define S3C2412_CLKDIVN_UARTDIV_SHIFT (8) | ||
144 | #define S3C2412_CLKDIVN_I2SDIV_MASK (15<<12) | ||
145 | #define S3C2412_CLKDIVN_I2SDIV_SHIFT (12) | ||
146 | #define S3C2412_CLKDIVN_CAMDIV_MASK (15<<16) | ||
147 | #define S3C2412_CLKDIVN_CAMDIV_SHIFT (16) | ||
148 | |||
149 | #define S3C2412_CLKCON_WDT (1<<28) | ||
150 | #define S3C2412_CLKCON_SPI (1<<27) | ||
151 | #define S3C2412_CLKCON_IIS (1<<26) | ||
152 | #define S3C2412_CLKCON_IIC (1<<25) | ||
153 | #define S3C2412_CLKCON_ADC (1<<24) | ||
154 | #define S3C2412_CLKCON_RTC (1<<23) | ||
155 | #define S3C2412_CLKCON_GPIO (1<<22) | ||
156 | #define S3C2412_CLKCON_UART2 (1<<21) | ||
157 | #define S3C2412_CLKCON_UART1 (1<<20) | ||
158 | #define S3C2412_CLKCON_UART0 (1<<19) | ||
159 | #define S3C2412_CLKCON_SDI (1<<18) | ||
160 | #define S3C2412_CLKCON_PWMT (1<<17) | ||
161 | #define S3C2412_CLKCON_USBD (1<<16) | ||
162 | #define S3C2412_CLKCON_CAMCLK (1<<15) | ||
163 | #define S3C2412_CLKCON_UARTCLK (1<<14) | ||
164 | /* missing 13 */ | ||
165 | #define S3C2412_CLKCON_USB_HOST48 (1<<12) | ||
166 | #define S3C2412_CLKCON_USB_DEV48 (1<<11) | ||
167 | #define S3C2412_CLKCON_HCLKdiv2 (1<<10) | ||
168 | #define S3C2412_CLKCON_HCLKx2 (1<<9) | ||
169 | #define S3C2412_CLKCON_SDRAM (1<<8) | ||
170 | /* missing 7 */ | ||
171 | #define S3C2412_CLKCON_USBH S3C2410_CLKCON_USBH | ||
172 | #define S3C2412_CLKCON_LCDC S3C2410_CLKCON_LCDC | ||
173 | #define S3C2412_CLKCON_NAND S3C2410_CLKCON_NAND | ||
174 | #define S3C2412_CLKCON_DMA3 (1<<3) | ||
175 | #define S3C2412_CLKCON_DMA2 (1<<2) | ||
176 | #define S3C2412_CLKCON_DMA1 (1<<1) | ||
177 | #define S3C2412_CLKCON_DMA0 (1<<0) | ||
178 | |||
179 | /* clock sourec controls */ | ||
180 | |||
181 | #define S3C2412_CLKSRC_EXTCLKDIV_MASK (7 << 0) | ||
182 | #define S3C2412_CLKSRC_EXTCLKDIV_SHIFT (0) | ||
183 | #define S3C2412_CLKSRC_MDIVCLK_EXTCLKDIV (1<<3) | ||
184 | #define S3C2412_CLKSRC_MSYSCLK_MPLL (1<<4) | ||
185 | #define S3C2412_CLKSRC_USYSCLK_UPLL (1<<5) | ||
186 | #define S3C2412_CLKSRC_UARTCLK_MPLL (1<<8) | ||
187 | #define S3C2412_CLKSRC_I2SCLK_MPLL (1<<9) | ||
188 | #define S3C2412_CLKSRC_USBCLK_HCLK (1<<10) | ||
189 | #define S3C2412_CLKSRC_CAMCLK_HCLK (1<<11) | ||
190 | |||
191 | #endif /* CONFIG_CPU_S3C2412 | CONFIG_CPU_S3C2413 */ | ||
141 | 192 | ||
142 | #endif /* __ASM_ARM_REGS_CLOCK */ | 193 | #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 a023b0434ef..a0a12487516 100644 --- a/include/asm-arm/arch-s3c2410/regs-dsc.h +++ b/include/asm-arm/arch-s3c2410/regs-dsc.h | |||
@@ -7,18 +7,19 @@ | |||
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | * | 9 | * |
10 | * S3C2440 Signal Drive Strength Control | 10 | * S3C2440/S3C2412 Signal Drive Strength Control |
11 | * | ||
12 | * Changelog: | ||
13 | * 11-Aug-2004 BJD Created file | ||
14 | * 25-Aug-2004 BJD Added the _SELECT_* defs for using with functions | ||
15 | */ | 11 | */ |
16 | 12 | ||
17 | 13 | ||
18 | #ifndef __ASM_ARCH_REGS_DSC_H | 14 | #ifndef __ASM_ARCH_REGS_DSC_H |
19 | #define __ASM_ARCH_REGS_DSC_H "2440-dsc" | 15 | #define __ASM_ARCH_REGS_DSC_H "2440-dsc" |
20 | 16 | ||
21 | #ifdef CONFIG_CPU_S3C2440 | 17 | #if defined(CONFIG_CPU_S3C2412) |
18 | #define S3C2412_DSC0 S3C2410_GPIOREG(0xdc) | ||
19 | #define S3C2412_DSC1 S3C2410_GPIOREG(0xe0) | ||
20 | #endif | ||
21 | |||
22 | #if defined(CONFIG_CPU_S3C2440) | ||
22 | 23 | ||
23 | #define S3C2440_DSC0 S3C2410_GPIOREG(0xc4) | 24 | #define S3C2440_DSC0 S3C2410_GPIOREG(0xc4) |
24 | #define S3C2440_DSC1 S3C2410_GPIOREG(0xc8) | 25 | #define S3C2440_DSC1 S3C2410_GPIOREG(0xc8) |
@@ -170,7 +171,7 @@ | |||
170 | #define S3C2440_DSC1_CS1_4mA (3<<2) | 171 | #define S3C2440_DSC1_CS1_4mA (3<<2) |
171 | #define S3C2440_DSC1_CS1_MASK (3<<2) | 172 | #define S3C2440_DSC1_CS1_MASK (3<<2) |
172 | 173 | ||
173 | #define S3C2440_DSC1_CS0 (S3C2440_SELECT_DSC1 | 0 | 174 | #define S3C2440_DSC1_CS0 (S3C2440_SELECT_DSC1 | 0) |
174 | #define S3C2440_DSC1_CS0_10mA (0<<0) | 175 | #define S3C2440_DSC1_CS0_10mA (0<<0) |
175 | #define S3C2440_DSC1_CS0_8mA (1<<0) | 176 | #define S3C2440_DSC1_CS0_8mA (1<<0) |
176 | #define S3C2440_DSC1_CS0_6mA (2<<0) | 177 | #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 d2574084697..93c49432db9 100644 --- a/include/asm-arm/arch-s3c2410/regs-gpio.h +++ b/include/asm-arm/arch-s3c2410/regs-gpio.h | |||
@@ -8,21 +8,6 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | * | 9 | * |
10 | * S3C2410 GPIO register definitions | 10 | * S3C2410 GPIO register definitions |
11 | * | ||
12 | * Changelog: | ||
13 | * 19-06-2003 BJD Created file | ||
14 | * 23-06-2003 BJD Updated GSTATUS registers | ||
15 | * 12-03-2004 BJD Updated include protection | ||
16 | * 20-07-2004 BJD Added GPIO pin numbers, added Port A definitions | ||
17 | * 04-10-2004 BJD Fixed number of bugs, added EXT IRQ filter defs | ||
18 | * 17-10-2004 BJD Added GSTATUS1 register definitions | ||
19 | * 18-11-2004 BJD Fixed definitions of GPE3, GPE4, GPE5 and GPE6 | ||
20 | * 18-11-2004 BJD Added S3C2440 AC97 controls | ||
21 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | ||
22 | * 28-Mar-2005 LCVR Fixed definition of GPB10 | ||
23 | * 26-Oct-2005 BJD Added generic configuration types | ||
24 | * 27-Nov-2005 LCVR Added definitions to S3C2400 registers | ||
25 | * 15-Jan-2006 LCVR Written S3C24XX_GPIO_BASE() macro | ||
26 | */ | 11 | */ |
27 | 12 | ||
28 | 13 | ||
@@ -45,7 +30,7 @@ | |||
45 | #define S3C24XX_MISCCR S3C2400_MISCCR | 30 | #define S3C24XX_MISCCR S3C2400_MISCCR |
46 | #else | 31 | #else |
47 | #define S3C24XX_GPIO_BASE(x) S3C2410_GPIO_BASE(x) | 32 | #define S3C24XX_GPIO_BASE(x) S3C2410_GPIO_BASE(x) |
48 | #define S3C24XX_MISCCR S3C2410_MISCCR | 33 | #define S3C24XX_MISCCR S3C24XX_GPIOREG2(0x80) |
49 | #endif /* CONFIG_CPU_S3C2400 */ | 34 | #endif /* CONFIG_CPU_S3C2400 */ |
50 | 35 | ||
51 | 36 | ||
@@ -73,9 +58,15 @@ | |||
73 | #define S3C2410_GPIO_SFN2 (0xFFFFFFF2) /* not available on A */ | 58 | #define S3C2410_GPIO_SFN2 (0xFFFFFFF2) /* not available on A */ |
74 | #define S3C2410_GPIO_SFN3 (0xFFFFFFF3) /* not available on A */ | 59 | #define S3C2410_GPIO_SFN3 (0xFFFFFFF3) /* not available on A */ |
75 | 60 | ||
76 | /* configure GPIO ports A..G */ | 61 | /* register address for the GPIO registers. |
62 | * S3C24XX_GPIOREG2 is for the second set of registers in the | ||
63 | * GPIO which move between s3c2410 and s3c2412 type systems */ | ||
77 | 64 | ||
78 | #define S3C2410_GPIOREG(x) ((x) + S3C24XX_VA_GPIO) | 65 | #define S3C2410_GPIOREG(x) ((x) + S3C24XX_VA_GPIO) |
66 | #define S3C24XX_GPIOREG2(x) ((x) + S3C24XX_VA_GPIO2) | ||
67 | |||
68 | |||
69 | /* configure GPIO ports A..G */ | ||
79 | 70 | ||
80 | /* port A - S3C2410: 22bits, zero in bit X makes pin X output | 71 | /* port A - S3C2410: 22bits, zero in bit X makes pin X output |
81 | * S3C2400: 18bits, zero in bit X makes pin X output | 72 | * S3C2400: 18bits, zero in bit X makes pin X output |
@@ -450,12 +441,14 @@ | |||
450 | #define S3C2410_GPD0_OUTP (0x01 << 0) | 441 | #define S3C2410_GPD0_OUTP (0x01 << 0) |
451 | #define S3C2410_GPD0_VD8 (0x02 << 0) | 442 | #define S3C2410_GPD0_VD8 (0x02 << 0) |
452 | #define S3C2400_GPD0_VFRAME (0x02 << 0) | 443 | #define S3C2400_GPD0_VFRAME (0x02 << 0) |
444 | #define S3C2442_GPD0_nSPICS1 (0x03 << 0) | ||
453 | 445 | ||
454 | #define S3C2410_GPD1 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 1) | 446 | #define S3C2410_GPD1 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 1) |
455 | #define S3C2410_GPD1_INP (0x00 << 2) | 447 | #define S3C2410_GPD1_INP (0x00 << 2) |
456 | #define S3C2410_GPD1_OUTP (0x01 << 2) | 448 | #define S3C2410_GPD1_OUTP (0x01 << 2) |
457 | #define S3C2410_GPD1_VD9 (0x02 << 2) | 449 | #define S3C2410_GPD1_VD9 (0x02 << 2) |
458 | #define S3C2400_GPD1_VM (0x02 << 2) | 450 | #define S3C2400_GPD1_VM (0x02 << 2) |
451 | #define S3C2442_GPD1_SPICLK1 (0x03 << 2) | ||
459 | 452 | ||
460 | #define S3C2410_GPD2 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 2) | 453 | #define S3C2410_GPD2 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 2) |
461 | #define S3C2410_GPD2_INP (0x00 << 4) | 454 | #define S3C2410_GPD2_INP (0x00 << 4) |
@@ -858,6 +851,7 @@ | |||
858 | #define S3C2410_GPG12_OUTP (0x01 << 24) | 851 | #define S3C2410_GPG12_OUTP (0x01 << 24) |
859 | #define S3C2410_GPG12_EINT20 (0x02 << 24) | 852 | #define S3C2410_GPG12_EINT20 (0x02 << 24) |
860 | #define S3C2410_GPG12_XMON (0x03 << 24) | 853 | #define S3C2410_GPG12_XMON (0x03 << 24) |
854 | #define S3C2442_GPG12_nSPICS0 (0x03 << 24) | ||
861 | 855 | ||
862 | #define S3C2410_GPG13 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 13) | 856 | #define S3C2410_GPG13 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 13) |
863 | #define S3C2410_GPG13_INP (0x00 << 26) | 857 | #define S3C2410_GPG13_INP (0x00 << 26) |
@@ -943,17 +937,25 @@ | |||
943 | #define S3C2410_GPH9_INP (0x00 << 18) | 937 | #define S3C2410_GPH9_INP (0x00 << 18) |
944 | #define S3C2410_GPH9_OUTP (0x01 << 18) | 938 | #define S3C2410_GPH9_OUTP (0x01 << 18) |
945 | #define S3C2410_GPH9_CLKOUT0 (0x02 << 18) | 939 | #define S3C2410_GPH9_CLKOUT0 (0x02 << 18) |
940 | #define S3C2442_GPH9_nSPICS0 (0x03 << 18) | ||
946 | 941 | ||
947 | #define S3C2410_GPH10 S3C2410_GPIONO(S3C2410_GPIO_BANKH, 10) | 942 | #define S3C2410_GPH10 S3C2410_GPIONO(S3C2410_GPIO_BANKH, 10) |
948 | #define S3C2410_GPH10_INP (0x00 << 20) | 943 | #define S3C2410_GPH10_INP (0x00 << 20) |
949 | #define S3C2410_GPH10_OUTP (0x01 << 20) | 944 | #define S3C2410_GPH10_OUTP (0x01 << 20) |
950 | #define S3C2410_GPH10_CLKOUT1 (0x02 << 20) | 945 | #define S3C2410_GPH10_CLKOUT1 (0x02 << 20) |
951 | 946 | ||
947 | /* The S3C2412 and S3C2413 move the GPJ register set to after | ||
948 | * GPH, which means all registers after 0x80 are now offset by 0x10 | ||
949 | * for the 2412/2413 from the 2410/2440/2442 | ||
950 | */ | ||
951 | |||
952 | /* miscellaneous control */ | 952 | /* miscellaneous control */ |
953 | #define S3C2400_MISCCR S3C2410_GPIOREG(0x54) | 953 | #define S3C2400_MISCCR S3C2410_GPIOREG(0x54) |
954 | #define S3C2410_MISCCR S3C2410_GPIOREG(0x80) | 954 | #define S3C2410_MISCCR S3C2410_GPIOREG(0x80) |
955 | #define S3C2410_DCLKCON S3C2410_GPIOREG(0x84) | 955 | #define S3C2410_DCLKCON S3C2410_GPIOREG(0x84) |
956 | 956 | ||
957 | #define S3C24XX_DCLKCON S3C24XX_GPIOREG2(0x84) | ||
958 | |||
957 | /* see clock.h for dclk definitions */ | 959 | /* see clock.h for dclk definitions */ |
958 | 960 | ||
959 | /* pullup control on databus */ | 961 | /* pullup control on databus */ |
@@ -981,6 +983,8 @@ | |||
981 | #define S3C2410_MISCCR_CLK0_DCLK0 (5<<4) | 983 | #define S3C2410_MISCCR_CLK0_DCLK0 (5<<4) |
982 | #define S3C2410_MISCCR_CLK0_MASK (7<<4) | 984 | #define S3C2410_MISCCR_CLK0_MASK (7<<4) |
983 | 985 | ||
986 | #define S3C2412_MISCCR_CLK0_RTC (2<<4) | ||
987 | |||
984 | #define S3C2410_MISCCR_CLK1_MPLL (0<<8) | 988 | #define S3C2410_MISCCR_CLK1_MPLL (0<<8) |
985 | #define S3C2410_MISCCR_CLK1_UPLL (1<<8) | 989 | #define S3C2410_MISCCR_CLK1_UPLL (1<<8) |
986 | #define S3C2410_MISCCR_CLK1_FCLK (2<<8) | 990 | #define S3C2410_MISCCR_CLK1_FCLK (2<<8) |
@@ -989,6 +993,8 @@ | |||
989 | #define S3C2410_MISCCR_CLK1_DCLK1 (5<<8) | 993 | #define S3C2410_MISCCR_CLK1_DCLK1 (5<<8) |
990 | #define S3C2410_MISCCR_CLK1_MASK (7<<8) | 994 | #define S3C2410_MISCCR_CLK1_MASK (7<<8) |
991 | 995 | ||
996 | #define S3C2412_MISCCR_CLK1_CLKsrc (0<<8) | ||
997 | |||
992 | #define S3C2410_MISCCR_USBSUSPND0 (1<<12) | 998 | #define S3C2410_MISCCR_USBSUSPND0 (1<<12) |
993 | #define S3C2410_MISCCR_USBSUSPND1 (1<<13) | 999 | #define S3C2410_MISCCR_USBSUSPND1 (1<<13) |
994 | 1000 | ||
@@ -996,7 +1002,7 @@ | |||
996 | 1002 | ||
997 | #define S3C2410_MISCCR_nEN_SCLK0 (1<<17) | 1003 | #define S3C2410_MISCCR_nEN_SCLK0 (1<<17) |
998 | #define S3C2410_MISCCR_nEN_SCLK1 (1<<18) | 1004 | #define S3C2410_MISCCR_nEN_SCLK1 (1<<18) |
999 | #define S3C2410_MISCCR_nEN_SCLKE (1<<19) | 1005 | #define S3C2410_MISCCR_nEN_SCLKE (1<<19) /* not 2412 */ |
1000 | #define S3C2410_MISCCR_SDSLEEP (7<<17) | 1006 | #define S3C2410_MISCCR_SDSLEEP (7<<17) |
1001 | 1007 | ||
1002 | /* external interrupt control... */ | 1008 | /* external interrupt control... */ |
@@ -1013,6 +1019,10 @@ | |||
1013 | #define S3C2410_EXTINT1 S3C2410_GPIOREG(0x8C) | 1019 | #define S3C2410_EXTINT1 S3C2410_GPIOREG(0x8C) |
1014 | #define S3C2410_EXTINT2 S3C2410_GPIOREG(0x90) | 1020 | #define S3C2410_EXTINT2 S3C2410_GPIOREG(0x90) |
1015 | 1021 | ||
1022 | #define S3C24XX_EXTINT0 S3C24XX_GPIOREG2(0x88) | ||
1023 | #define S3C24XX_EXTINT1 S3C24XX_GPIOREG2(0x8C) | ||
1024 | #define S3C24XX_EXTINT2 S3C24XX_GPIOREG2(0x90) | ||
1025 | |||
1016 | /* values for S3C2410_EXTINT0/1/2 */ | 1026 | /* values for S3C2410_EXTINT0/1/2 */ |
1017 | #define S3C2410_EXTINT_LOWLEV (0x00) | 1027 | #define S3C2410_EXTINT_LOWLEV (0x00) |
1018 | #define S3C2410_EXTINT_HILEV (0x01) | 1028 | #define S3C2410_EXTINT_HILEV (0x01) |
@@ -1026,6 +1036,11 @@ | |||
1026 | #define S3C2410_EINFLT2 S3C2410_GPIOREG(0x9C) | 1036 | #define S3C2410_EINFLT2 S3C2410_GPIOREG(0x9C) |
1027 | #define S3C2410_EINFLT3 S3C2410_GPIOREG(0xA0) | 1037 | #define S3C2410_EINFLT3 S3C2410_GPIOREG(0xA0) |
1028 | 1038 | ||
1039 | #define S3C24XX_EINFLT0 S3C24XX_GPIOREG2(0x94) | ||
1040 | #define S3C24XX_EINFLT1 S3C24XX_GPIOREG2(0x98) | ||
1041 | #define S3C24XX_EINFLT2 S3C24XX_GPIOREG2(0x9C) | ||
1042 | #define S3C24XX_EINFLT3 S3C24XX_GPIOREG2(0xA0) | ||
1043 | |||
1029 | /* values for interrupt filtering */ | 1044 | /* values for interrupt filtering */ |
1030 | #define S3C2410_EINTFLT_PCLK (0x00) | 1045 | #define S3C2410_EINTFLT_PCLK (0x00) |
1031 | #define S3C2410_EINTFLT_EXTCLK (1<<7) | 1046 | #define S3C2410_EINTFLT_EXTCLK (1<<7) |
@@ -1035,6 +1050,7 @@ | |||
1035 | 1050 | ||
1036 | /* GSTATUS have miscellaneous information in them | 1051 | /* GSTATUS have miscellaneous information in them |
1037 | * | 1052 | * |
1053 | * These move between s3c2410 and s3c2412 style systems. | ||
1038 | */ | 1054 | */ |
1039 | 1055 | ||
1040 | #define S3C2410_GSTATUS0 S3C2410_GPIOREG(0x0AC) | 1056 | #define S3C2410_GSTATUS0 S3C2410_GPIOREG(0x0AC) |
@@ -1043,6 +1059,18 @@ | |||
1043 | #define S3C2410_GSTATUS3 S3C2410_GPIOREG(0x0B8) | 1059 | #define S3C2410_GSTATUS3 S3C2410_GPIOREG(0x0B8) |
1044 | #define S3C2410_GSTATUS4 S3C2410_GPIOREG(0x0BC) | 1060 | #define S3C2410_GSTATUS4 S3C2410_GPIOREG(0x0BC) |
1045 | 1061 | ||
1062 | #define S3C2412_GSTATUS0 S3C2410_GPIOREG(0x0BC) | ||
1063 | #define S3C2412_GSTATUS1 S3C2410_GPIOREG(0x0C0) | ||
1064 | #define S3C2412_GSTATUS2 S3C2410_GPIOREG(0x0C4) | ||
1065 | #define S3C2412_GSTATUS3 S3C2410_GPIOREG(0x0C8) | ||
1066 | #define S3C2412_GSTATUS4 S3C2410_GPIOREG(0x0CC) | ||
1067 | |||
1068 | #define S3C24XX_GSTATUS0 S3C24XX_GPIOREG2(0x0AC) | ||
1069 | #define S3C24XX_GSTATUS1 S3C24XX_GPIOREG2(0x0B0) | ||
1070 | #define S3C24XX_GSTATUS2 S3C24XX_GPIOREG2(0x0B4) | ||
1071 | #define S3C24XX_GSTATUS3 S3C24XX_GPIOREG2(0x0B8) | ||
1072 | #define S3C24XX_GSTATUS4 S3C24XX_GPIOREG2(0x0BC) | ||
1073 | |||
1046 | #define S3C2410_GSTATUS0_nWAIT (1<<3) | 1074 | #define S3C2410_GSTATUS0_nWAIT (1<<3) |
1047 | #define S3C2410_GSTATUS0_NCON (1<<2) | 1075 | #define S3C2410_GSTATUS0_NCON (1<<2) |
1048 | #define S3C2410_GSTATUS0_RnB (1<<1) | 1076 | #define S3C2410_GSTATUS0_RnB (1<<1) |
@@ -1050,7 +1078,9 @@ | |||
1050 | 1078 | ||
1051 | #define S3C2410_GSTATUS1_IDMASK (0xffff0000) | 1079 | #define S3C2410_GSTATUS1_IDMASK (0xffff0000) |
1052 | #define S3C2410_GSTATUS1_2410 (0x32410000) | 1080 | #define S3C2410_GSTATUS1_2410 (0x32410000) |
1081 | #define S3C2410_GSTATUS1_2412 (0x32412001) | ||
1053 | #define S3C2410_GSTATUS1_2440 (0x32440000) | 1082 | #define S3C2410_GSTATUS1_2440 (0x32440000) |
1083 | #define S3C2410_GSTATUS1_2442 (0x32440aaa) | ||
1054 | 1084 | ||
1055 | #define S3C2410_GSTATUS2_WTRESET (1<<2) | 1085 | #define S3C2410_GSTATUS2_WTRESET (1<<2) |
1056 | #define S3C2410_GSTATUS2_OFFRESET (1<<1) | 1086 | #define S3C2410_GSTATUS2_OFFRESET (1<<1) |
@@ -1072,5 +1102,22 @@ | |||
1072 | #define S3C2400_OPENCR_OPC_MOSIDIS (0<<5) | 1102 | #define S3C2400_OPENCR_OPC_MOSIDIS (0<<5) |
1073 | #define S3C2400_OPENCR_OPC_MOSIEN (1<<5) | 1103 | #define S3C2400_OPENCR_OPC_MOSIEN (1<<5) |
1074 | 1104 | ||
1105 | /* 2412/2413 sleep configuration registers */ | ||
1106 | |||
1107 | #define S3C2412_GPBSLPCON S3C2410_GPIOREG(0x1C) | ||
1108 | #define S3C2412_GPCSLPCON S3C2410_GPIOREG(0x2C) | ||
1109 | #define S3C2412_GPDSLPCON S3C2410_GPIOREG(0x3C) | ||
1110 | #define S3C2412_GPESLPCON S3C2410_GPIOREG(0x4C) | ||
1111 | #define S3C2412_GPFSLPCON S3C2410_GPIOREG(0x5C) | ||
1112 | #define S3C2412_GPGSLPCON S3C2410_GPIOREG(0x6C) | ||
1113 | #define S3C2412_GPHSLPCON S3C2410_GPIOREG(0x7C) | ||
1114 | |||
1115 | /* definitions for each pin bit */ | ||
1116 | #define S3C2412_SLPCON_LOW(x) ( 0x00 << ((x) * 2)) | ||
1117 | #define S3C2412_SLPCON_HI(x) ( 0x01 << ((x) * 2)) | ||
1118 | #define S3C2412_SLPCON_IN(x) ( 0x02 << ((x) * 2)) | ||
1119 | #define S3C2412_SLPCON_PDWN(x) ( 0x03 << ((x) * 2)) | ||
1120 | #define S3C2412_SLPCON_MASK(x) ( 0x03 << ((x) * 2)) | ||
1121 | |||
1075 | #endif /* __ASM_ARCH_REGS_GPIO_H */ | 1122 | #endif /* __ASM_ARCH_REGS_GPIO_H */ |
1076 | 1123 | ||
diff --git a/include/asm-arm/arch-s3c2410/regs-gpioj.h b/include/asm-arm/arch-s3c2410/regs-gpioj.h index 3ad2324acc3..91cefa26049 100644 --- a/include/asm-arm/arch-s3c2410/regs-gpioj.h +++ b/include/asm-arm/arch-s3c2410/regs-gpioj.h | |||
@@ -8,10 +8,6 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | * | 9 | * |
10 | * S3C2440 GPIO J register definitions | 10 | * S3C2440 GPIO J register definitions |
11 | * | ||
12 | * Changelog: | ||
13 | * 11-Aug-2004 BJD Created file | ||
14 | * 10-Feb-2005 BJD Fix GPJ12 definition (Guillaume Gourat) | ||
15 | */ | 11 | */ |
16 | 12 | ||
17 | 13 | ||
@@ -32,6 +28,11 @@ | |||
32 | #define S3C2440_GPJDAT S3C2410_GPIOREG(0xd4) | 28 | #define S3C2440_GPJDAT S3C2410_GPIOREG(0xd4) |
33 | #define S3C2440_GPJUP S3C2410_GPIOREG(0xd8) | 29 | #define S3C2440_GPJUP S3C2410_GPIOREG(0xd8) |
34 | 30 | ||
31 | #define S3C2413_GPJCON S3C2410_GPIOREG(0x80) | ||
32 | #define S3C2413_GPJDAT S3C2410_GPIOREG(0x84) | ||
33 | #define S3C2413_GPJUP S3C2410_GPIOREG(0x88) | ||
34 | #define S3C2413_GPJSLPCON S3C2410_GPIOREG(0x8C) | ||
35 | |||
35 | #define S3C2440_GPJ0 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 0) | 36 | #define S3C2440_GPJ0 S3C2410_GPIONO(S3C2440_GPIO_BANKJ, 0) |
36 | #define S3C2440_GPJ0_INP (0x00 << 0) | 37 | #define S3C2440_GPJ0_INP (0x00 << 0) |
37 | #define S3C2440_GPJ0_OUTP (0x01 << 0) | 38 | #define S3C2440_GPJ0_OUTP (0x01 << 0) |
diff --git a/include/asm-arm/arch-s3c2410/regs-iic.h b/include/asm-arm/arch-s3c2410/regs-iic.h index fed3288e204..2ae29522f25 100644 --- a/include/asm-arm/arch-s3c2410/regs-iic.h +++ b/include/asm-arm/arch-s3c2410/regs-iic.h | |||
@@ -8,10 +8,6 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | * | 9 | * |
10 | * S3C2410 I2C Controller | 10 | * S3C2410 I2C Controller |
11 | * | ||
12 | * Changelog: | ||
13 | * 03-Oct-2004 BJD Initial include for Linux | ||
14 | * 08-Nov-2004 BJD Added S3C2440 filter register | ||
15 | */ | 11 | */ |
16 | 12 | ||
17 | #ifndef __ASM_ARCH_REGS_IIC_H | 13 | #ifndef __ASM_ARCH_REGS_IIC_H |
diff --git a/include/asm-arm/arch-s3c2410/regs-iis.h b/include/asm-arm/arch-s3c2410/regs-iis.h index 7fdde9b91cb..72cd2509822 100644 --- a/include/asm-arm/arch-s3c2410/regs-iis.h +++ b/include/asm-arm/arch-s3c2410/regs-iis.h | |||
@@ -8,17 +8,7 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | * | 9 | * |
10 | * S3C2410 IIS register definition | 10 | * S3C2410 IIS register definition |
11 | * | 11 | */ |
12 | * Changelog: | ||
13 | * 19-06-2003 BJD Created file | ||
14 | * 26-06-2003 BJD Finished off definitions for register addresses | ||
15 | * 12-03-2004 BJD Updated include protection | ||
16 | * 07-03-2005 BJD Added FIFO size flags and S3C2440 MPLL | ||
17 | * 05-04-2005 LCVR Added IISFCON definitions for the S3C2400 | ||
18 | * 18-07-2005 DA Change IISCON_MPLL to IISMOD_MPLL | ||
19 | * Correct IISMOD_256FS and IISMOD_384FS | ||
20 | * Add IISCON_PSCEN | ||
21 | */ | ||
22 | 12 | ||
23 | #ifndef __ASM_ARCH_REGS_IIS_H | 13 | #ifndef __ASM_ARCH_REGS_IIS_H |
24 | #define __ASM_ARCH_REGS_IIS_H | 14 | #define __ASM_ARCH_REGS_IIS_H |
diff --git a/include/asm-arm/arch-s3c2410/regs-irq.h b/include/asm-arm/arch-s3c2410/regs-irq.h index 24b7292df79..29fb8ef670f 100644 --- a/include/asm-arm/arch-s3c2410/regs-irq.h +++ b/include/asm-arm/arch-s3c2410/regs-irq.h | |||
@@ -6,14 +6,7 @@ | |||
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 |
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | * | 9 | */ |
10 | * | ||
11 | * | ||
12 | * Changelog: | ||
13 | * 19-06-2003 BJD Created file | ||
14 | * 12-03-2004 BJD Updated include protection | ||
15 | * 10-03-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | ||
16 | */ | ||
17 | 10 | ||
18 | 11 | ||
19 | #ifndef ___ASM_ARCH_REGS_IRQ_H | 12 | #ifndef ___ASM_ARCH_REGS_IRQ_H |
@@ -23,6 +16,7 @@ | |||
23 | 16 | ||
24 | #define S3C2410_IRQREG(x) ((x) + S3C24XX_VA_IRQ) | 17 | #define S3C2410_IRQREG(x) ((x) + S3C24XX_VA_IRQ) |
25 | #define S3C2410_EINTREG(x) ((x) + S3C24XX_VA_GPIO) | 18 | #define S3C2410_EINTREG(x) ((x) + S3C24XX_VA_GPIO) |
19 | #define S3C24XX_EINTREG(x) ((x) + S3C24XX_VA_GPIO2) | ||
26 | 20 | ||
27 | #define S3C2410_SRCPND S3C2410_IRQREG(0x000) | 21 | #define S3C2410_SRCPND S3C2410_IRQREG(0x000) |
28 | #define S3C2410_INTMOD S3C2410_IRQREG(0x004) | 22 | #define S3C2410_INTMOD S3C2410_IRQREG(0x004) |
@@ -40,5 +34,10 @@ | |||
40 | 34 | ||
41 | #define S3C2410_EINTMASK S3C2410_EINTREG(0x0A4) | 35 | #define S3C2410_EINTMASK S3C2410_EINTREG(0x0A4) |
42 | #define S3C2410_EINTPEND S3C2410_EINTREG(0X0A8) | 36 | #define S3C2410_EINTPEND S3C2410_EINTREG(0X0A8) |
37 | #define S3C2412_EINTMASK S3C2410_EINTREG(0x0B4) | ||
38 | #define S3C2412_EINTPEND S3C2410_EINTREG(0X0B8) | ||
39 | |||
40 | #define S3C24XX_EINTMASK S3C24XX_EINTREG(0x0A4) | ||
41 | #define S3C24XX_EINTPEND S3C24XX_EINTREG(0X0A8) | ||
43 | 42 | ||
44 | #endif /* ___ASM_ARCH_REGS_IRQ_H */ | 43 | #endif /* ___ASM_ARCH_REGS_IRQ_H */ |
diff --git a/include/asm-arm/arch-s3c2410/regs-lcd.h b/include/asm-arm/arch-s3c2410/regs-lcd.h index b6b1b4e8bbe..b306d6e3135 100644 --- a/include/asm-arm/arch-s3c2410/regs-lcd.h +++ b/include/asm-arm/arch-s3c2410/regs-lcd.h | |||
@@ -6,14 +6,6 @@ | |||
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 |
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | * | ||
10 | * | ||
11 | * | ||
12 | * Changelog: | ||
13 | * 12-06-2003 BJD Created file | ||
14 | * 26-06-2003 BJD Updated LCDCON register definitions | ||
15 | * 12-03-2004 BJD Updated include protection | ||
16 | * 10-03-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | ||
17 | */ | 9 | */ |
18 | 10 | ||
19 | 11 | ||
diff --git a/include/asm-arm/arch-s3c2410/regs-mem.h b/include/asm-arm/arch-s3c2410/regs-mem.h index a2d7d0cec04..375dca50364 100644 --- a/include/asm-arm/arch-s3c2410/regs-mem.h +++ b/include/asm-arm/arch-s3c2410/regs-mem.h | |||
@@ -8,12 +8,6 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | * | 9 | * |
10 | * S3C2410 Memory Control register definitions | 10 | * S3C2410 Memory Control register definitions |
11 | * | ||
12 | * Changelog: | ||
13 | * 29-Sep-2004 BJD Initial include for Linux | ||
14 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | ||
15 | * 04-Apr-2005 LCVR Added S3C2400 DRAM/BANKSIZE_MASK definitions | ||
16 | * | ||
17 | */ | 11 | */ |
18 | 12 | ||
19 | #ifndef __ASM_ARM_MEMREGS_H | 13 | #ifndef __ASM_ARM_MEMREGS_H |
diff --git a/include/asm-arm/arch-s3c2410/regs-nand.h b/include/asm-arm/arch-s3c2410/regs-nand.h index 7cff235e667..b824d371ae0 100644 --- a/include/asm-arm/arch-s3c2410/regs-nand.h +++ b/include/asm-arm/arch-s3c2410/regs-nand.h | |||
@@ -8,10 +8,6 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | * | 9 | * |
10 | * S3C2410 NAND register definitions | 10 | * S3C2410 NAND register definitions |
11 | * | ||
12 | * Changelog: | ||
13 | * 18-Aug-2004 BJD Copied file from 2.4 and updated | ||
14 | * 01-May-2005 BJD Added definitions for s3c2440 controller | ||
15 | */ | 11 | */ |
16 | 12 | ||
17 | #ifndef __ASM_ARM_REGS_NAND | 13 | #ifndef __ASM_ARM_REGS_NAND |
@@ -39,10 +35,19 @@ | |||
39 | #define S3C2440_NFESTAT1 S3C2410_NFREG(0x28) | 35 | #define S3C2440_NFESTAT1 S3C2410_NFREG(0x28) |
40 | #define S3C2440_NFMECC0 S3C2410_NFREG(0x2C) | 36 | #define S3C2440_NFMECC0 S3C2410_NFREG(0x2C) |
41 | #define S3C2440_NFMECC1 S3C2410_NFREG(0x30) | 37 | #define S3C2440_NFMECC1 S3C2410_NFREG(0x30) |
42 | #define S3C2440_NFSECC S3C2410_NFREG(0x34) | 38 | #define S3C2440_NFSECC S3C24E10_NFREG(0x34) |
43 | #define S3C2440_NFSBLK S3C2410_NFREG(0x38) | 39 | #define S3C2440_NFSBLK S3C2410_NFREG(0x38) |
44 | #define S3C2440_NFEBLK S3C2410_NFREG(0x3C) | 40 | #define S3C2440_NFEBLK S3C2410_NFREG(0x3C) |
45 | 41 | ||
42 | #define S3C2412_NFSBLK S3C2410_NFREG(0x20) | ||
43 | #define S3C2412_NFEBLK S3C2410_NFREG(0x24) | ||
44 | #define S3C2412_NFSTAT S3C2410_NFREG(0x28) | ||
45 | #define S3C2412_NFMECC_ERR0 S3C2410_NFREG(0x2C) | ||
46 | #define S3C2412_NFMECC_ERR1 S3C2410_NFREG(0x30) | ||
47 | #define S3C2412_NFMECC0 S3C2410_NFREG(0x34) | ||
48 | #define S3C2412_NFMECC1 S3C2410_NFREG(0x38) | ||
49 | #define S3C2412_NFSECC S3C2410_NFREG(0x3C) | ||
50 | |||
46 | #define S3C2410_NFCONF_EN (1<<15) | 51 | #define S3C2410_NFCONF_EN (1<<15) |
47 | #define S3C2410_NFCONF_512BYTE (1<<14) | 52 | #define S3C2410_NFCONF_512BYTE (1<<14) |
48 | #define S3C2410_NFCONF_4STEP (1<<13) | 53 | #define S3C2410_NFCONF_4STEP (1<<13) |
@@ -77,5 +82,42 @@ | |||
77 | #define S3C2440_NFSTAT_RnB_CHANGE (1<<2) | 82 | #define S3C2440_NFSTAT_RnB_CHANGE (1<<2) |
78 | #define S3C2440_NFSTAT_ILLEGAL_ACCESS (1<<3) | 83 | #define S3C2440_NFSTAT_ILLEGAL_ACCESS (1<<3) |
79 | 84 | ||
85 | #define S3C2412_NFCONF_NANDBOOT (1<<31) | ||
86 | #define S3C2412_NFCONF_ECCCLKCON (1<<30) | ||
87 | #define S3C2412_NFCONF_ECC_MLC (1<<24) | ||
88 | #define S3C2412_NFCONF_TACLS_MASK (7<<12) /* 1 extra bit of Tacls */ | ||
89 | |||
90 | #define S3C2412_NFCONT_ECC4_DIRWR (1<<18) | ||
91 | #define S3C2412_NFCONT_LOCKTIGHT (1<<17) | ||
92 | #define S3C2412_NFCONT_SOFTLOCK (1<<16) | ||
93 | #define S3C2412_NFCONT_ECC4_ENCINT (1<<13) | ||
94 | #define S3C2412_NFCONT_ECC4_DECINT (1<<12) | ||
95 | #define S3C2412_NFCONT_MAIN_ECC_LOCK (1<<7) | ||
96 | #define S3C2412_NFCONT_INIT_MAIN_ECC (1<<5) | ||
97 | #define S3C2412_NFCONT_nFCE1 (1<<2) | ||
98 | #define S3C2412_NFCONT_nFCE0 (1<<1) | ||
99 | |||
100 | #define S3C2412_NFSTAT_ECC_ENCDONE (1<<7) | ||
101 | #define S3C2412_NFSTAT_ECC_DECDONE (1<<6) | ||
102 | #define S3C2412_NFSTAT_ILLEGAL_ACCESS (1<<5) | ||
103 | #define S3C2412_NFSTAT_RnB_CHANGE (1<<4) | ||
104 | #define S3C2412_NFSTAT_nFCE1 (1<<3) | ||
105 | #define S3C2412_NFSTAT_nFCE0 (1<<2) | ||
106 | #define S3C2412_NFSTAT_Res1 (1<<1) | ||
107 | #define S3C2412_NFSTAT_READY (1<<0) | ||
108 | |||
109 | #define S3C2412_NFECCERR_SERRDATA(x) (((x) >> 21) & 0xf) | ||
110 | #define S3C2412_NFECCERR_SERRBIT(x) (((x) >> 18) & 0x7) | ||
111 | #define S3C2412_NFECCERR_MERRDATA(x) (((x) >> 7) & 0x3ff) | ||
112 | #define S3C2412_NFECCERR_MERRBIT(x) (((x) >> 4) & 0x7) | ||
113 | #define S3C2412_NFECCERR_SPARE_ERR(x) (((x) >> 2) & 0x3) | ||
114 | #define S3C2412_NFECCERR_MAIN_ERR(x) (((x) >> 2) & 0x3) | ||
115 | #define S3C2412_NFECCERR_NONE (0) | ||
116 | #define S3C2412_NFECCERR_1BIT (1) | ||
117 | #define S3C2412_NFECCERR_MULTIBIT (2) | ||
118 | #define S3C2412_NFECCERR_ECCAREA (3) | ||
119 | |||
120 | |||
121 | |||
80 | #endif /* __ASM_ARM_REGS_NAND */ | 122 | #endif /* __ASM_ARM_REGS_NAND */ |
81 | 123 | ||
diff --git a/include/asm-arm/arch-s3c2410/regs-power.h b/include/asm-arm/arch-s3c2410/regs-power.h new file mode 100644 index 00000000000..6c319ea2afa --- /dev/null +++ b/include/asm-arm/arch-s3c2410/regs-power.h | |||
@@ -0,0 +1,34 @@ | |||
1 | /* linux/include/asm/arch-s3c2410/regs-power.h | ||
2 | * | ||
3 | * Copyright (c) 2003,2004,2005,2006 Simtec Electronics <linux@simtec.co.uk> | ||
4 | * http://armlinux.simtec.co.uk/ | ||
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 | * S3C24XX power control register definitions | ||
11 | */ | ||
12 | |||
13 | #ifndef __ASM_ARM_REGS_PWR | ||
14 | #define __ASM_ARM_REGS_PWR __FILE__ | ||
15 | |||
16 | #define S3C24XX_PWRREG(x) ((x) + S3C24XX_VA_CLKPWR) | ||
17 | |||
18 | #define S3C2412_PWRMODECON S3C24XX_PWRREG(0x20) | ||
19 | #define S3C2412_PWRCFG S3C24XX_PWRREG(0x24) | ||
20 | |||
21 | #define S3C2412_PWRCFG_BATF_IGNORE (0<<0) | ||
22 | #define S3C2412_PWRCFG_BATF_SLEEP (3<<0) | ||
23 | #define S3C2412_PWRCFG_BATF_MASK (3<<0) | ||
24 | |||
25 | #define S3C2412_PWRCFG_STANDBYWFI_IGNORE (0<<6) | ||
26 | #define S3C2412_PWRCFG_STANDBYWFI_IDLE (1<<6) | ||
27 | #define S3C2412_PWRCFG_STANDBYWFI_STOP (2<<6) | ||
28 | #define S3C2412_PWRCFG_STANDBYWFI_SLEEP (3<<6) | ||
29 | #define S3C2412_PWRCFG_STANDBYWFI_MASK (3<<6) | ||
30 | |||
31 | #define S3C2412_PWRCFG_RTC_MASKIRQ (1<<8) | ||
32 | #define S3C2412_PWRCFG_NAND_NORST (1<<9) | ||
33 | |||
34 | #endif /* __ASM_ARM_REGS_PWR */ | ||
diff --git a/include/asm-arm/arch-s3c2410/regs-rtc.h b/include/asm-arm/arch-s3c2410/regs-rtc.h index 228983f89bc..cd88fd634d1 100644 --- a/include/asm-arm/arch-s3c2410/regs-rtc.h +++ b/include/asm-arm/arch-s3c2410/regs-rtc.h | |||
@@ -8,17 +8,12 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | * | 9 | * |
10 | * S3C2410 Internal RTC register definition | 10 | * S3C2410 Internal RTC register definition |
11 | * | ||
12 | * Changelog: | ||
13 | * 19-06-2003 BJD Created file | ||
14 | * 12-03-2004 BJD Updated include protection | ||
15 | * 15-01-2005 LCVR Changed S3C2410_VA to S3C24XX_VA (s3c2400 support) | ||
16 | */ | 11 | */ |
17 | 12 | ||
18 | #ifndef __ASM_ARCH_REGS_RTC_H | 13 | #ifndef __ASM_ARCH_REGS_RTC_H |
19 | #define __ASM_ARCH_REGS_RTC_H __FILE__ | 14 | #define __ASM_ARCH_REGS_RTC_H __FILE__ |
20 | 15 | ||
21 | #define S3C2410_RTCREG(x) ((x) + S3C24XX_VA_RTC) | 16 | #define S3C2410_RTCREG(x) (x) |
22 | 17 | ||
23 | #define S3C2410_RTCCON S3C2410_RTCREG(0x40) | 18 | #define S3C2410_RTCCON S3C2410_RTCREG(0x40) |
24 | #define S3C2410_RTCCON_RTCEN (1<<0) | 19 | #define S3C2410_RTCCON_RTCEN (1<<0) |
diff --git a/include/asm-arm/arch-s3c2410/regs-sdi.h b/include/asm-arm/arch-s3c2410/regs-sdi.h index ca9a26fbece..06e716e5b46 100644 --- a/include/asm-arm/arch-s3c2410/regs-sdi.h +++ b/include/asm-arm/arch-s3c2410/regs-sdi.h | |||
@@ -8,11 +8,6 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | * | 9 | * |
10 | * S3C2410 MMC/SDIO register definitions | 10 | * S3C2410 MMC/SDIO register definitions |
11 | * | ||
12 | * Changelog: | ||
13 | * 18-Aug-2004 Ben Dooks Created initial file | ||
14 | * 29-Nov-2004 Koen Martens Added some missing defines, fixed duplicates | ||
15 | * 29-Nov-2004 Ben Dooks Updated Koen's patch | ||
16 | */ | 11 | */ |
17 | 12 | ||
18 | #ifndef __ASM_ARM_REGS_SDI | 13 | #ifndef __ASM_ARM_REGS_SDI |
diff --git a/include/asm-arm/arch-s3c2410/regs-serial.h b/include/asm-arm/arch-s3c2410/regs-serial.h index 83b01254c4a..19c77da9c3f 100644 --- a/include/asm-arm/arch-s3c2410/regs-serial.h +++ b/include/asm-arm/arch-s3c2410/regs-serial.h | |||
@@ -27,10 +27,7 @@ | |||
27 | * You should have received a copy of the GNU General Public License | 27 | * You should have received a copy of the GNU General Public License |
28 | * along with this program; if not, write to the Free Software | 28 | * along with this program; if not, write to the Free Software |
29 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 29 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
30 | * | 30 | */ |
31 | * Modifications: | ||
32 | * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA (s3c2400 support) | ||
33 | */ | ||
34 | 31 | ||
35 | #ifndef __ASM_ARM_REGS_SERIAL_H | 32 | #ifndef __ASM_ARM_REGS_SERIAL_H |
36 | #define __ASM_ARM_REGS_SERIAL_H | 33 | #define __ASM_ARM_REGS_SERIAL_H |
@@ -82,6 +79,12 @@ | |||
82 | #define S3C2440_UCON2_DIVMASK (7 << 12) | 79 | #define S3C2440_UCON2_DIVMASK (7 << 12) |
83 | #define S3C2440_UCON_DIVSHIFT (12) | 80 | #define S3C2440_UCON_DIVSHIFT (12) |
84 | 81 | ||
82 | #define S3C2412_UCON_CLKMASK (3<<10) | ||
83 | #define S3C2412_UCON_UCLK (1<<10) | ||
84 | #define S3C2412_UCON_USYSCLK (3<<10) | ||
85 | #define S3C2412_UCON_PCLK (0<<10) | ||
86 | #define S3C2412_UCON_PCLK2 (2<<10) | ||
87 | |||
85 | #define S3C2410_UCON_UCLK (1<<10) | 88 | #define S3C2410_UCON_UCLK (1<<10) |
86 | #define S3C2410_UCON_SBREAK (1<<4) | 89 | #define S3C2410_UCON_SBREAK (1<<4) |
87 | 90 | ||
@@ -124,6 +127,15 @@ | |||
124 | #define S3C2410_UMCOM_AFC (1<<4) | 127 | #define S3C2410_UMCOM_AFC (1<<4) |
125 | #define S3C2410_UMCOM_RTS_LOW (1<<0) | 128 | #define S3C2410_UMCOM_RTS_LOW (1<<0) |
126 | 129 | ||
130 | #define S3C2412_UMCON_AFC_63 (0<<5) | ||
131 | #define S3C2412_UMCON_AFC_56 (1<<5) | ||
132 | #define S3C2412_UMCON_AFC_48 (2<<5) | ||
133 | #define S3C2412_UMCON_AFC_40 (3<<5) | ||
134 | #define S3C2412_UMCON_AFC_32 (4<<5) | ||
135 | #define S3C2412_UMCON_AFC_24 (5<<5) | ||
136 | #define S3C2412_UMCON_AFC_16 (6<<5) | ||
137 | #define S3C2412_UMCON_AFC_8 (7<<5) | ||
138 | |||
127 | #define S3C2410_UFSTAT_TXFULL (1<<9) | 139 | #define S3C2410_UFSTAT_TXFULL (1<<9) |
128 | #define S3C2410_UFSTAT_RXFULL (1<<8) | 140 | #define S3C2410_UFSTAT_RXFULL (1<<8) |
129 | #define S3C2410_UFSTAT_TXMASK (15<<4) | 141 | #define S3C2410_UFSTAT_TXMASK (15<<4) |
diff --git a/include/asm-arm/arch-s3c2410/regs-spi.h b/include/asm-arm/arch-s3c2410/regs-spi.h index 338217858c7..3552280d1e8 100644 --- a/include/asm-arm/arch-s3c2410/regs-spi.h +++ b/include/asm-arm/arch-s3c2410/regs-spi.h | |||
@@ -7,13 +7,7 @@ | |||
7 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
8 | * | 8 | * |
9 | * S3C2410 SPI register definition | 9 | * S3C2410 SPI register definition |
10 | * | 10 | */ |
11 | * Changelog: | ||
12 | * 20-04-2004 KF Created file | ||
13 | * 04-10-2004 BJD Removed VA address (no longer mapped) | ||
14 | * tidied file for submission | ||
15 | * 03-04-2005 LCVR Added S3C2400_SPPIN_nCS definition | ||
16 | */ | ||
17 | 11 | ||
18 | #ifndef __ASM_ARCH_REGS_SPI_H | 12 | #ifndef __ASM_ARCH_REGS_SPI_H |
19 | #define __ASM_ARCH_REGS_SPI_H | 13 | #define __ASM_ARCH_REGS_SPI_H |
diff --git a/include/asm-arm/arch-s3c2410/regs-timer.h b/include/asm-arm/arch-s3c2410/regs-timer.h index 169064e2752..731918e7783 100644 --- a/include/asm-arm/arch-s3c2410/regs-timer.h +++ b/include/asm-arm/arch-s3c2410/regs-timer.h | |||
@@ -8,13 +8,6 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | * | 9 | * |
10 | * S3C2410 Timer configuration | 10 | * S3C2410 Timer configuration |
11 | * | ||
12 | * Changelog: | ||
13 | * 05-06-2003 BJD Created file | ||
14 | * 26-06-2003 BJD Added more timer definitions to mux / control | ||
15 | * 12-03-2004 BJD Updated include protection | ||
16 | * 10-02-2005 BJD Added S3C2410_TCFG1_MUX4_SHIFT (Guillaume Gourat) | ||
17 | * 10-03-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | ||
18 | */ | 11 | */ |
19 | 12 | ||
20 | 13 | ||
diff --git a/include/asm-arm/arch-s3c2410/regs-udc.h b/include/asm-arm/arch-s3c2410/regs-udc.h index bf315b76325..3aa31a27da1 100644 --- a/include/asm-arm/arch-s3c2410/regs-udc.h +++ b/include/asm-arm/arch-s3c2410/regs-udc.h | |||
@@ -6,13 +6,7 @@ | |||
6 | * modify it under the terms of the GNU General Public License as | 6 | * modify it under the terms of the GNU General Public License as |
7 | * published by the Free Software Foundation; either version 2 of | 7 | * published by the Free Software Foundation; either version 2 of |
8 | * the License, or (at your option) any later version. | 8 | * the License, or (at your option) any later version. |
9 | * | 9 | */ |
10 | * Changelog: | ||
11 | * 01-08-2004 Initial creation | ||
12 | * 12-09-2004 Cleanup for submission | ||
13 | * 24-10-2004 Fixed S3C2410_UDC_MAXP_REG definition | ||
14 | * 10-03-2005 Changed S3C2410_VA to S3C24XX_VA | ||
15 | */ | ||
16 | 10 | ||
17 | #ifndef __ASM_ARCH_REGS_UDC_H | 11 | #ifndef __ASM_ARCH_REGS_UDC_H |
18 | #define __ASM_ARCH_REGS_UDC_H | 12 | #define __ASM_ARCH_REGS_UDC_H |
diff --git a/include/asm-arm/arch-s3c2410/regs-watchdog.h b/include/asm-arm/arch-s3c2410/regs-watchdog.h index d199ca6aff2..f4fff448c7b 100644 --- a/include/asm-arm/arch-s3c2410/regs-watchdog.h +++ b/include/asm-arm/arch-s3c2410/regs-watchdog.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* linux/include/asm/arch-s3c2410/regs0watchdog.h | 1 | /* linux/include/asm/arch-s3c2410/regs-watchdog.h |
2 | * | 2 | * |
3 | * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk> | 3 | * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk> |
4 | * http://www.simtec.co.uk/products/SWLINUX/ | 4 | * http://www.simtec.co.uk/products/SWLINUX/ |
@@ -8,11 +8,6 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | * | 9 | * |
10 | * S3C2410 Watchdog timer control | 10 | * S3C2410 Watchdog timer control |
11 | * | ||
12 | * Changelog: | ||
13 | * 21-06-2003 BJD Created file | ||
14 | * 12-03-2004 BJD Updated include protection | ||
15 | * 10-03-2005 LCVR Changed S3C2410_VA to S3C24XX_VA | ||
16 | */ | 11 | */ |
17 | 12 | ||
18 | 13 | ||
diff --git a/include/asm-arm/arch-s3c2410/system.h b/include/asm-arm/arch-s3c2410/system.h index 9b0d85024cb..718246d8595 100644 --- a/include/asm-arm/arch-s3c2410/system.h +++ b/include/asm-arm/arch-s3c2410/system.h | |||
@@ -8,14 +8,7 @@ | |||
8 | * This program is free software; you can redistribute it and/or modify | 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 | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | 11 | */ |
12 | * Changelog: | ||
13 | * 12-May-2003 BJD Created file | ||
14 | * 14-May-2003 BJD Removed idle to aid debugging | ||
15 | * 12-Jun-2003 BJD Added reset via watchdog | ||
16 | * 04-Sep-2003 BJD Moved to v2.6 | ||
17 | * 28-Oct-2004 BJD Added over-ride for idle, and fixed reset panic() | ||
18 | */ | ||
19 | 12 | ||
20 | #include <asm/hardware.h> | 13 | #include <asm/hardware.h> |
21 | #include <asm/io.h> | 14 | #include <asm/io.h> |
diff --git a/include/asm-arm/arch-s3c2410/timex.h b/include/asm-arm/arch-s3c2410/timex.h index 3558a3a750b..703c337c561 100644 --- a/include/asm-arm/arch-s3c2410/timex.h +++ b/include/asm-arm/arch-s3c2410/timex.h | |||
@@ -8,12 +8,6 @@ | |||
8 | * This program is free software; you can redistribute it and/or modify | 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 | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | ||
12 | * Changelog: | ||
13 | * 02-Sep-2003 BJD Created file | ||
14 | * 05-Jan-2004 BJD Updated for Linux 2.6.0 | ||
15 | * 22-Nov-2004 BJD Fixed CLOCK_TICK_RATE | ||
16 | * 10-Jan-2004 BJD Removed s3c2410_clock_tick_rate | ||
17 | */ | 11 | */ |
18 | 12 | ||
19 | #ifndef __ASM_ARCH_TIMEX_H | 13 | #ifndef __ASM_ARCH_TIMEX_H |
diff --git a/include/asm-arm/arch-s3c2410/uncompress.h b/include/asm-arm/arch-s3c2410/uncompress.h index a6f6a0e44af..81b3e91c56a 100644 --- a/include/asm-arm/arch-s3c2410/uncompress.h +++ b/include/asm-arm/arch-s3c2410/uncompress.h | |||
@@ -8,21 +8,11 @@ | |||
8 | * This program is free software; you can redistribute it and/or modify | 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 | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | ||
12 | * Changelog: | ||
13 | * 22-May-2003 BJD Created | ||
14 | * 08-Sep-2003 BJD Moved to linux v2.6 | ||
15 | * 12-Mar-2004 BJD Updated header protection | ||
16 | * 12-Oct-2004 BJD Take account of debug uart configuration | ||
17 | * 15-Nov-2004 BJD Fixed uart configuration | ||
18 | * 22-Feb-2005 BJD Added watchdog to uncompress | ||
19 | * 04-Apr-2005 LCVR Added support to S3C2400 (no cpuid at GSTATUS1) | ||
20 | */ | 11 | */ |
21 | 12 | ||
22 | #ifndef __ASM_ARCH_UNCOMPRESS_H | 13 | #ifndef __ASM_ARCH_UNCOMPRESS_H |
23 | #define __ASM_ARCH_UNCOMPRESS_H | 14 | #define __ASM_ARCH_UNCOMPRESS_H |
24 | 15 | ||
25 | #include <linux/config.h> | ||
26 | 16 | ||
27 | /* defines for UART registers */ | 17 | /* defines for UART registers */ |
28 | #include "asm/arch/regs-serial.h" | 18 | #include "asm/arch/regs-serial.h" |
@@ -82,7 +72,8 @@ static void putc(int ch) | |||
82 | while (1) { | 72 | while (1) { |
83 | level = uart_rd(S3C2410_UFSTAT); | 73 | level = uart_rd(S3C2410_UFSTAT); |
84 | 74 | ||
85 | if (cpuid == S3C2410_GSTATUS1_2440) { | 75 | if (cpuid == S3C2410_GSTATUS1_2440 || |
76 | cpuid == S3C2410_GSTATUS1_2442) { | ||
86 | level &= S3C2440_UFSTAT_TXMASK; | 77 | level &= S3C2440_UFSTAT_TXMASK; |
87 | level >>= S3C2440_UFSTAT_TXSHIFT; | 78 | level >>= S3C2440_UFSTAT_TXSHIFT; |
88 | } else { | 79 | } else { |
@@ -130,7 +121,7 @@ static void arch_decomp_wdog_start(void) | |||
130 | { | 121 | { |
131 | __raw_writel(WDOG_COUNT, S3C2410_WTDAT); | 122 | __raw_writel(WDOG_COUNT, S3C2410_WTDAT); |
132 | __raw_writel(WDOG_COUNT, S3C2410_WTCNT); | 123 | __raw_writel(WDOG_COUNT, S3C2410_WTCNT); |
133 | __raw_writel(S3C2410_WTCON_ENABLE | S3C2410_WTCON_DIV128 | S3C2410_WTCON_RSTEN | S3C2410_WTCON_PRESCALE(0x40), S3C2410_WTCON); | 124 | __raw_writel(S3C2410_WTCON_ENABLE | S3C2410_WTCON_DIV128 | S3C2410_WTCON_RSTEN | S3C2410_WTCON_PRESCALE(0x80), S3C2410_WTCON); |
134 | } | 125 | } |
135 | 126 | ||
136 | #else | 127 | #else |
diff --git a/include/asm-arm/arch-s3c2410/usb-control.h b/include/asm-arm/arch-s3c2410/usb-control.h index bd43b566db3..35723569a17 100644 --- a/include/asm-arm/arch-s3c2410/usb-control.h +++ b/include/asm-arm/arch-s3c2410/usb-control.h | |||
@@ -8,11 +8,6 @@ | |||
8 | * This program is free software; you can redistribute it and/or modify | 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 | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | ||
12 | * Changelog: | ||
13 | * 11-Sep-2004 BJD Created file | ||
14 | * 21-Sep-2004 BJD Updated port info | ||
15 | * 09-Aug-2005 BJD Renamed s3c2410_report_oc s3c2410_usb_report_oc | ||
16 | */ | 11 | */ |
17 | 12 | ||
18 | #ifndef __ASM_ARCH_USBCONTROL_H | 13 | #ifndef __ASM_ARCH_USBCONTROL_H |
diff --git a/include/asm-arm/arch-s3c2410/vmalloc.h b/include/asm-arm/arch-s3c2410/vmalloc.h index 33963cd5461..0ae3bdb7e03 100644 --- a/include/asm-arm/arch-s3c2410/vmalloc.h +++ b/include/asm-arm/arch-s3c2410/vmalloc.h | |||
@@ -10,11 +10,7 @@ | |||
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | 11 | * |
12 | * S3C2410 vmalloc definition | 12 | * S3C2410 vmalloc definition |
13 | * | 13 | */ |
14 | * Changelog: | ||
15 | * 12-Mar-2004 BJD Fixed header, added include protection | ||
16 | * 12=Mar-2004 BJD Fixed VMALLOC_END definitions | ||
17 | */ | ||
18 | 14 | ||
19 | #ifndef __ASM_ARCH_VMALLOC_H | 15 | #ifndef __ASM_ARCH_VMALLOC_H |
20 | #define __ASM_ARCH_VMALLOC_H | 16 | #define __ASM_ARCH_VMALLOC_H |
diff --git a/include/asm-arm/arch-s3c2410/vr1000-cpld.h b/include/asm-arm/arch-s3c2410/vr1000-cpld.h index 0ee373ac60d..a341b1e1bd9 100644 --- a/include/asm-arm/arch-s3c2410/vr1000-cpld.h +++ b/include/asm-arm/arch-s3c2410/vr1000-cpld.h | |||
@@ -8,10 +8,6 @@ | |||
8 | * This program is free software; you can redistribute it and/or modify | 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 | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | ||
12 | * Changelog: | ||
13 | * 25-May-2003 BJD Created file, added CTRL1 registers | ||
14 | * 19-Mar-2004 BJD Added VR1000 CPLD definitions | ||
15 | */ | 11 | */ |
16 | 12 | ||
17 | #ifndef __ASM_ARCH_VR1000CPLD_H | 13 | #ifndef __ASM_ARCH_VR1000CPLD_H |
diff --git a/include/asm-arm/arch-s3c2410/vr1000-irq.h b/include/asm-arm/arch-s3c2410/vr1000-irq.h index 694f7715d2d..c39a0ffa670 100644 --- a/include/asm-arm/arch-s3c2410/vr1000-irq.h +++ b/include/asm-arm/arch-s3c2410/vr1000-irq.h | |||
@@ -8,11 +8,7 @@ | |||
8 | * This program is free software; you can redistribute it and/or modify | 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 | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | 11 | */ |
12 | * Changelog: | ||
13 | * 06-Jan-2003 BJD Linux 2.6.0 version | ||
14 | * 19-Mar-2004 BJD Updates for VR1000 | ||
15 | */ | ||
16 | 12 | ||
17 | #ifndef __ASM_ARCH_VR1000IRQ_H | 13 | #ifndef __ASM_ARCH_VR1000IRQ_H |
18 | #define __ASM_ARCH_VR1000IRQ_H | 14 | #define __ASM_ARCH_VR1000IRQ_H |
diff --git a/include/asm-arm/arch-s3c2410/vr1000-map.h b/include/asm-arm/arch-s3c2410/vr1000-map.h index 867c9355fd3..1fe4db36c83 100644 --- a/include/asm-arm/arch-s3c2410/vr1000-map.h +++ b/include/asm-arm/arch-s3c2410/vr1000-map.h | |||
@@ -8,12 +8,6 @@ | |||
8 | * This program is free software; you can redistribute it and/or modify | 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 | 9 | * it under the terms of the GNU General Public License version 2 as |
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | ||
12 | * Changelog: | ||
13 | * 06-Jan-2003 BJD Linux 2.6.0 version, split specifics from arch/map.h | ||
14 | * 12-Mar-2004 BJD Fixed header include protection | ||
15 | * 19-Mar-2004 BJD Copied to VR1000 machine headers. | ||
16 | * 19-Jan-2005 BJD Updated map definitions | ||
17 | */ | 11 | */ |
18 | 12 | ||
19 | /* needs arch/map.h including with this */ | 13 | /* needs arch/map.h including with this */ |
diff --git a/include/asm-arm/arch-sa1100/assabet.h b/include/asm-arm/arch-sa1100/assabet.h index 1f59b368c3f..d6a1bb5b494 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 356d5ba8899..9a19c3d07c1 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 d49e5ff63ca..14a344aa3cc 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 02575d72ac6..6b7917a2e77 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 ee008a5484f..1abd7cfc8bc 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 2153538069c..98b10bcf9f1 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 040ccde7a11..0756269404b 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 eabd3be3d70..d7940683efb 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 a29fac1387c..1ff172dc8e3 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 0f0612f79b2..aef91e3b63f 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 47e904cf25c..c4d01948e00 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/platform.h b/include/asm-arm/arch-versatile/platform.h index 72ef874567d..2af9d7c9c63 100644 --- a/include/asm-arm/arch-versatile/platform.h +++ b/include/asm-arm/arch-versatile/platform.h | |||
@@ -65,6 +65,8 @@ | |||
65 | #define VERSATILE_SYS_OSC1_OFFSET 0x1C | 65 | #define VERSATILE_SYS_OSC1_OFFSET 0x1C |
66 | #endif | 66 | #endif |
67 | 67 | ||
68 | #define VERSATILE_SYS_OSCCLCD_OFFSET 0x1c | ||
69 | |||
68 | #define VERSATILE_SYS_LOCK_OFFSET 0x20 | 70 | #define VERSATILE_SYS_LOCK_OFFSET 0x20 |
69 | #define VERSATILE_SYS_100HZ_OFFSET 0x24 | 71 | #define VERSATILE_SYS_100HZ_OFFSET 0x24 |
70 | #define VERSATILE_SYS_CFGDATA1_OFFSET 0x28 | 72 | #define VERSATILE_SYS_CFGDATA1_OFFSET 0x28 |
diff --git a/include/asm-arm/arch-versatile/system.h b/include/asm-arm/arch-versatile/system.h index 8889a189739..71c6254c0d9 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/assembler.h b/include/asm-arm/assembler.h index d53bafa9bf1..fce83282082 100644 --- a/include/asm-arm/assembler.h +++ b/include/asm-arm/assembler.h | |||
@@ -55,30 +55,6 @@ | |||
55 | #define PLD(code...) | 55 | #define PLD(code...) |
56 | #endif | 56 | #endif |
57 | 57 | ||
58 | #define MODE_USR USR_MODE | ||
59 | #define MODE_FIQ FIQ_MODE | ||
60 | #define MODE_IRQ IRQ_MODE | ||
61 | #define MODE_SVC SVC_MODE | ||
62 | |||
63 | #define DEFAULT_FIQ MODE_FIQ | ||
64 | |||
65 | /* | ||
66 | * LOADREGS - ldm with PC in register list (eg, ldmfd sp!, {pc}) | ||
67 | */ | ||
68 | #ifdef __STDC__ | ||
69 | #define LOADREGS(cond, base, reglist...)\ | ||
70 | ldm##cond base,reglist | ||
71 | #else | ||
72 | #define LOADREGS(cond, base, reglist...)\ | ||
73 | ldm/**/cond base,reglist | ||
74 | #endif | ||
75 | |||
76 | /* | ||
77 | * Build a return instruction for this processor type. | ||
78 | */ | ||
79 | #define RETINSTR(instr, regs...)\ | ||
80 | instr regs | ||
81 | |||
82 | /* | 58 | /* |
83 | * Enable and disable interrupts | 59 | * Enable and disable interrupts |
84 | */ | 60 | */ |
@@ -117,18 +93,6 @@ | |||
117 | msr cpsr_c, \oldcpsr | 93 | msr cpsr_c, \oldcpsr |
118 | .endm | 94 | .endm |
119 | 95 | ||
120 | /* | ||
121 | * These two are used to save LR/restore PC over a user-based access. | ||
122 | * The old 26-bit architecture requires that we do. On 32-bit | ||
123 | * architecture, we can safely ignore this requirement. | ||
124 | */ | ||
125 | .macro save_lr | ||
126 | .endm | ||
127 | |||
128 | .macro restore_pc | ||
129 | mov pc, lr | ||
130 | .endm | ||
131 | |||
132 | #define USER(x...) \ | 96 | #define USER(x...) \ |
133 | 9999: x; \ | 97 | 9999: x; \ |
134 | .section __ex_table,"a"; \ | 98 | .section __ex_table,"a"; \ |
diff --git a/include/asm-arm/atomic.h b/include/asm-arm/atomic.h index 3d7283d8440..4b0ce3e7de9 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 5ab8216f520..0e36fd5d87d 100644 --- a/include/asm-arm/bug.h +++ b/include/asm-arm/bug.h | |||
@@ -1,8 +1,6 @@ | |||
1 | #ifndef _ASMARM_BUG_H | 1 | #ifndef _ASMARM_BUG_H |
2 | #define _ASMARM_BUG_H | 2 | #define _ASMARM_BUG_H |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | #include <linux/stddef.h> | ||
6 | 4 | ||
7 | #ifdef CONFIG_BUG | 5 | #ifdef CONFIG_BUG |
8 | #ifdef CONFIG_DEBUG_BUGVERBOSE | 6 | #ifdef CONFIG_DEBUG_BUGVERBOSE |
diff --git a/include/asm-arm/bugs.h b/include/asm-arm/bugs.h index 4c80ec519d4..ca54eb0f12d 100644 --- a/include/asm-arm/bugs.h +++ b/include/asm-arm/bugs.h | |||
@@ -10,8 +10,12 @@ | |||
10 | #ifndef __ASM_BUGS_H | 10 | #ifndef __ASM_BUGS_H |
11 | #define __ASM_BUGS_H | 11 | #define __ASM_BUGS_H |
12 | 12 | ||
13 | #ifdef CONFIG_MMU | ||
13 | extern void check_writebuffer_bugs(void); | 14 | extern void check_writebuffer_bugs(void); |
14 | 15 | ||
15 | #define check_bugs() check_writebuffer_bugs() | 16 | #define check_bugs() check_writebuffer_bugs() |
17 | #else | ||
18 | #define check_bugs() do { } while (0) | ||
19 | #endif | ||
16 | 20 | ||
17 | #endif | 21 | #endif |
diff --git a/include/asm-arm/byteorder.h b/include/asm-arm/byteorder.h index 17eaf8bdf09..e6f7fcdc73b 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 746be56b1b7..e4a2569c636 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 | ||
@@ -248,14 +247,12 @@ extern void dmac_flush_range(unsigned long, unsigned long); | |||
248 | */ | 247 | */ |
249 | #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ | 248 | #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ |
250 | do { \ | 249 | do { \ |
251 | flush_cache_page(vma, vaddr, page_to_pfn(page));\ | ||
252 | memcpy(dst, src, len); \ | 250 | memcpy(dst, src, len); \ |
253 | flush_dcache_page(page); \ | 251 | flush_ptrace_access(vma, page, vaddr, dst, len, 1);\ |
254 | } while (0) | 252 | } while (0) |
255 | 253 | ||
256 | #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ | 254 | #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ |
257 | do { \ | 255 | do { \ |
258 | flush_cache_page(vma, vaddr, page_to_pfn(page));\ | ||
259 | memcpy(dst, src, len); \ | 256 | memcpy(dst, src, len); \ |
260 | } while (0) | 257 | } while (0) |
261 | 258 | ||
@@ -286,10 +283,24 @@ flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsigned l | |||
286 | __cpuc_flush_user_range(addr, addr + PAGE_SIZE, vma->vm_flags); | 283 | __cpuc_flush_user_range(addr, addr + PAGE_SIZE, vma->vm_flags); |
287 | } | 284 | } |
288 | } | 285 | } |
286 | |||
287 | static inline void | ||
288 | flush_ptrace_access(struct vm_area_struct *vma, struct page *page, | ||
289 | unsigned long uaddr, void *kaddr, | ||
290 | unsigned long len, int write) | ||
291 | { | ||
292 | if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask)) { | ||
293 | unsigned long addr = (unsigned long)kaddr; | ||
294 | __cpuc_coherent_kern_range(addr, addr + len); | ||
295 | } | ||
296 | } | ||
289 | #else | 297 | #else |
290 | extern void flush_cache_mm(struct mm_struct *mm); | 298 | extern void flush_cache_mm(struct mm_struct *mm); |
291 | extern void flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end); | 299 | extern void flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end); |
292 | extern void flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsigned long pfn); | 300 | extern void flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsigned long pfn); |
301 | extern void flush_ptrace_access(struct vm_area_struct *vma, struct page *page, | ||
302 | unsigned long uaddr, void *kaddr, | ||
303 | unsigned long len, int write); | ||
293 | #endif | 304 | #endif |
294 | 305 | ||
295 | /* | 306 | /* |
diff --git a/include/asm-arm/cpu.h b/include/asm-arm/cpu.h index 751bc746207..715426b9b08 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 63ca7412a46..55eb4dc3253 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 49c01e2bf7c..9f2c5305c26 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/domain.h b/include/asm-arm/domain.h index f8ea2de4848..4c2885abbe6 100644 --- a/include/asm-arm/domain.h +++ b/include/asm-arm/domain.h | |||
@@ -50,6 +50,8 @@ | |||
50 | #define domain_val(dom,type) ((type) << (2*(dom))) | 50 | #define domain_val(dom,type) ((type) << (2*(dom))) |
51 | 51 | ||
52 | #ifndef __ASSEMBLY__ | 52 | #ifndef __ASSEMBLY__ |
53 | |||
54 | #ifdef CONFIG_MMU | ||
53 | #define set_domain(x) \ | 55 | #define set_domain(x) \ |
54 | do { \ | 56 | do { \ |
55 | __asm__ __volatile__( \ | 57 | __asm__ __volatile__( \ |
@@ -66,5 +68,10 @@ | |||
66 | set_domain(thread->cpu_domain); \ | 68 | set_domain(thread->cpu_domain); \ |
67 | } while (0) | 69 | } while (0) |
68 | 70 | ||
71 | #else | ||
72 | #define set_domain(x) do { } while (0) | ||
73 | #define modify_domain(dom,type) do { } while (0) | ||
74 | #endif | ||
75 | |||
69 | #endif | 76 | #endif |
70 | #endif /* !__ASSEMBLY__ */ | 77 | #endif /* !__ASSEMBLY__ */ |
diff --git a/include/asm-arm/dyntick.h b/include/asm-arm/dyntick.h new file mode 100644 index 00000000000..19fab2d2b76 --- /dev/null +++ b/include/asm-arm/dyntick.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef _ASMARM_DYNTICK_H | ||
2 | #define _ASMARM_DYNTICK_H | ||
3 | |||
4 | #include <asm/mach/time.h> | ||
5 | |||
6 | #endif /* _ASMARM_DYNTICK_H */ | ||
diff --git a/include/asm-arm/elf.h b/include/asm-arm/elf.h index 2d44b42d184..ae7baa6c73f 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.. |
@@ -9,7 +8,9 @@ | |||
9 | 8 | ||
10 | #include <asm/ptrace.h> | 9 | #include <asm/ptrace.h> |
11 | #include <asm/user.h> | 10 | #include <asm/user.h> |
11 | #ifdef __KERNEL | ||
12 | #include <asm/procinfo.h> | 12 | #include <asm/procinfo.h> |
13 | #endif | ||
13 | 14 | ||
14 | typedef unsigned long elf_greg_t; | 15 | typedef unsigned long elf_greg_t; |
15 | typedef unsigned long elf_freg_t[3]; | 16 | typedef unsigned long elf_freg_t[3]; |
diff --git a/include/asm-arm/floppy.h b/include/asm-arm/floppy.h index 6ea657c886b..54b5ae44ed9 100644 --- a/include/asm-arm/floppy.h +++ b/include/asm-arm/floppy.h | |||
@@ -25,7 +25,7 @@ | |||
25 | 25 | ||
26 | #define fd_inb(port) inb((port)) | 26 | #define fd_inb(port) inb((port)) |
27 | #define fd_request_irq() request_irq(IRQ_FLOPPYDISK,floppy_interrupt,\ | 27 | #define fd_request_irq() request_irq(IRQ_FLOPPYDISK,floppy_interrupt,\ |
28 | SA_INTERRUPT|SA_SAMPLE_RANDOM,"floppy",NULL) | 28 | IRQF_DISABLED,"floppy",NULL) |
29 | #define fd_free_irq() free_irq(IRQ_FLOPPYDISK,NULL) | 29 | #define fd_free_irq() free_irq(IRQ_FLOPPYDISK,NULL) |
30 | #define fd_disable_irq() disable_irq(IRQ_FLOPPYDISK) | 30 | #define fd_disable_irq() disable_irq(IRQ_FLOPPYDISK) |
31 | #define fd_enable_irq() enable_irq(IRQ_FLOPPYDISK) | 31 | #define fd_enable_irq() enable_irq(IRQ_FLOPPYDISK) |
diff --git a/include/asm-arm/fpstate.h b/include/asm-arm/fpstate.h index 52bae088a18..6af4e6bd129 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 | ||
@@ -73,6 +72,14 @@ union fp_state { | |||
73 | 72 | ||
74 | #define FP_SIZE (sizeof(union fp_state) / sizeof(int)) | 73 | #define FP_SIZE (sizeof(union fp_state) / sizeof(int)) |
75 | 74 | ||
75 | struct crunch_state { | ||
76 | unsigned int mvdx[16][2]; | ||
77 | unsigned int mvax[4][3]; | ||
78 | unsigned int dspsc[2]; | ||
79 | }; | ||
80 | |||
81 | #define CRUNCH_SIZE sizeof(struct crunch_state) | ||
82 | |||
76 | #endif | 83 | #endif |
77 | 84 | ||
78 | #endif | 85 | #endif |
diff --git a/include/asm-arm/glue.h b/include/asm-arm/glue.h index 223e0d6c41b..0cc5d3b10ce 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 1cbb173bf5b..182310b9919 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 6685e3fb97b..546f7077be9 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 82fa2c279a1..396e55ad06c 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/locomo.h b/include/asm-arm/hardware/locomo.h index 5f10048ec54..22dfb173776 100644 --- a/include/asm-arm/hardware/locomo.h +++ b/include/asm-arm/hardware/locomo.h | |||
@@ -111,6 +111,8 @@ | |||
111 | #define LOCOMO_ALS 0x00 /* Adjust light cycle */ | 111 | #define LOCOMO_ALS 0x00 /* Adjust light cycle */ |
112 | #define LOCOMO_ALD 0x04 /* Adjust light duty */ | 112 | #define LOCOMO_ALD 0x04 /* Adjust light duty */ |
113 | 113 | ||
114 | #define LOCOMO_ALC_EN 0x8000 | ||
115 | |||
114 | /* Backlight controller: TFT signal */ | 116 | /* Backlight controller: TFT signal */ |
115 | #define LOCOMO_BACKLIGHT 0x38 | 117 | #define LOCOMO_BACKLIGHT 0x38 |
116 | #define LOCOMO_TC 0x00 /* TFT control signal */ | 118 | #define LOCOMO_TC 0x00 /* TFT control signal */ |
@@ -203,4 +205,7 @@ void locomo_gpio_write(struct locomo_dev *ldev, unsigned int bits, unsigned int | |||
203 | /* M62332 control function */ | 205 | /* M62332 control function */ |
204 | void locomo_m62332_senddata(struct locomo_dev *ldev, unsigned int dac_data, int channel); | 206 | void locomo_m62332_senddata(struct locomo_dev *ldev, unsigned int dac_data, int channel); |
205 | 207 | ||
208 | /* Frontlight control */ | ||
209 | void locomo_frontlight_set(struct locomo_dev *dev, int duty, int vr, int bpwf); | ||
210 | |||
206 | #endif | 211 | #endif |
diff --git a/include/asm-arm/hardware/sharpsl_pm.h b/include/asm-arm/hardware/sharpsl_pm.h index 36983e5f366..ecf15b83956 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/hardware/ssp.h b/include/asm-arm/hardware/ssp.h index 28aa11b769c..3b42e181997 100644 --- a/include/asm-arm/hardware/ssp.h +++ b/include/asm-arm/hardware/ssp.h | |||
@@ -16,8 +16,8 @@ struct ssp_state { | |||
16 | }; | 16 | }; |
17 | 17 | ||
18 | int ssp_write_word(u16 data); | 18 | int ssp_write_word(u16 data); |
19 | int ssp_read_word(void); | 19 | int ssp_read_word(u16 *data); |
20 | void ssp_flush(void); | 20 | int ssp_flush(void); |
21 | void ssp_enable(void); | 21 | void ssp_enable(void); |
22 | void ssp_disable(void); | 22 | void ssp_disable(void); |
23 | void ssp_save_state(struct ssp_state *ssp); | 23 | void ssp_save_state(struct ssp_state *ssp); |
diff --git a/include/asm-arm/hw_irq.h b/include/asm-arm/hw_irq.h new file mode 100644 index 00000000000..ea856971989 --- /dev/null +++ b/include/asm-arm/hw_irq.h | |||
@@ -0,0 +1,20 @@ | |||
1 | /* | ||
2 | * Nothing to see here yet | ||
3 | */ | ||
4 | #ifndef _ARCH_ARM_HW_IRQ_H | ||
5 | #define _ARCH_ARM_HW_IRQ_H | ||
6 | |||
7 | #include <asm/mach/irq.h> | ||
8 | |||
9 | #if defined(CONFIG_NO_IDLE_HZ) | ||
10 | # include <asm/dyntick.h> | ||
11 | # define handle_dynamic_tick(action) \ | ||
12 | if (!(action->flags & IRQF_TIMER) && system_timer->dyn_tick) { \ | ||
13 | write_seqlock(&xtime_lock); \ | ||
14 | if (system_timer->dyn_tick->state & DYN_TICK_ENABLED) \ | ||
15 | system_timer->dyn_tick->handler(irq, 0, regs); \ | ||
16 | write_sequnlock(&xtime_lock); \ | ||
17 | } | ||
18 | #endif | ||
19 | |||
20 | #endif | ||
diff --git a/include/asm-arm/io.h b/include/asm-arm/io.h index b3479fc1cc8..bf7b9dea30f 100644 --- a/include/asm-arm/io.h +++ b/include/asm-arm/io.h | |||
@@ -291,5 +291,12 @@ extern void pci_iounmap(struct pci_dev *dev, void __iomem *addr); | |||
291 | */ | 291 | */ |
292 | #define xlate_dev_kmem_ptr(p) p | 292 | #define xlate_dev_kmem_ptr(p) p |
293 | 293 | ||
294 | /* | ||
295 | * Register ISA memory and port locations for glibc iopl/inb/outb | ||
296 | * emulation. | ||
297 | */ | ||
298 | extern void register_isa_ports(unsigned int mmio, unsigned int io, | ||
299 | unsigned int io_shift); | ||
300 | |||
294 | #endif /* __KERNEL__ */ | 301 | #endif /* __KERNEL__ */ |
295 | #endif /* __ASM_ARM_IO_H */ | 302 | #endif /* __ASM_ARM_IO_H */ |
diff --git a/include/asm-arm/irq.h b/include/asm-arm/irq.h index 60b5105c9c9..283af50a16c 100644 --- a/include/asm-arm/irq.h +++ b/include/asm-arm/irq.h | |||
@@ -21,18 +21,13 @@ | |||
21 | 21 | ||
22 | struct irqaction; | 22 | struct irqaction; |
23 | 23 | ||
24 | extern void disable_irq_nosync(unsigned int); | ||
25 | extern void disable_irq(unsigned int); | ||
26 | extern void enable_irq(unsigned int); | ||
27 | |||
28 | /* | 24 | /* |
29 | * These correspond with the SA_TRIGGER_* defines, and therefore the | 25 | * Migration helpers |
30 | * IORESOURCE_IRQ_* defines. | ||
31 | */ | 26 | */ |
32 | #define __IRQT_RISEDGE (1 << 0) | 27 | #define __IRQT_FALEDGE IRQ_TYPE_EDGE_FALLING |
33 | #define __IRQT_FALEDGE (1 << 1) | 28 | #define __IRQT_RISEDGE IRQ_TYPE_EDGE_RISING |
34 | #define __IRQT_HIGHLVL (1 << 2) | 29 | #define __IRQT_LOWLVL IRQ_TYPE_LEVEL_LOW |
35 | #define __IRQT_LOWLVL (1 << 3) | 30 | #define __IRQT_HIGHLVL IRQ_TYPE_LEVEL_HIGH |
36 | 31 | ||
37 | #define IRQT_NOEDGE (0) | 32 | #define IRQT_NOEDGE (0) |
38 | #define IRQT_RISING (__IRQT_RISEDGE) | 33 | #define IRQT_RISING (__IRQT_RISEDGE) |
@@ -40,16 +35,7 @@ extern void enable_irq(unsigned int); | |||
40 | #define IRQT_BOTHEDGE (__IRQT_RISEDGE|__IRQT_FALEDGE) | 35 | #define IRQT_BOTHEDGE (__IRQT_RISEDGE|__IRQT_FALEDGE) |
41 | #define IRQT_LOW (__IRQT_LOWLVL) | 36 | #define IRQT_LOW (__IRQT_LOWLVL) |
42 | #define IRQT_HIGH (__IRQT_HIGHLVL) | 37 | #define IRQT_HIGH (__IRQT_HIGHLVL) |
43 | #define IRQT_PROBE (1 << 4) | 38 | #define IRQT_PROBE IRQ_TYPE_PROBE |
44 | |||
45 | int set_irq_type(unsigned int irq, unsigned int type); | ||
46 | void disable_irq_wake(unsigned int irq); | ||
47 | void enable_irq_wake(unsigned int irq); | ||
48 | int setup_irq(unsigned int, struct irqaction *); | ||
49 | |||
50 | struct irqaction; | ||
51 | struct pt_regs; | ||
52 | int handle_IRQ_event(unsigned int, struct pt_regs *, struct irqaction *); | ||
53 | 39 | ||
54 | extern void migrate_irqs(void); | 40 | extern void migrate_irqs(void); |
55 | #endif | 41 | #endif |
diff --git a/include/asm-arm/leds.h b/include/asm-arm/leds.h index 88ce4124f85..12290ea5580 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/irq.h b/include/asm-arm/mach/irq.h index d4d420ecf3a..131f33733d2 100644 --- a/include/asm-arm/mach/irq.h +++ b/include/asm-arm/mach/irq.h | |||
@@ -10,95 +10,9 @@ | |||
10 | #ifndef __ASM_ARM_MACH_IRQ_H | 10 | #ifndef __ASM_ARM_MACH_IRQ_H |
11 | #define __ASM_ARM_MACH_IRQ_H | 11 | #define __ASM_ARM_MACH_IRQ_H |
12 | 12 | ||
13 | struct irqdesc; | 13 | #include <linux/irq.h> |
14 | struct pt_regs; | ||
15 | struct seq_file; | ||
16 | |||
17 | typedef void (*irq_handler_t)(unsigned int, struct irqdesc *, struct pt_regs *); | ||
18 | typedef void (*irq_control_t)(unsigned int); | ||
19 | |||
20 | struct irqchip { | ||
21 | /* | ||
22 | * Acknowledge the IRQ. | ||
23 | * If this is a level-based IRQ, then it is expected to mask the IRQ | ||
24 | * as well. | ||
25 | */ | ||
26 | void (*ack)(unsigned int); | ||
27 | /* | ||
28 | * Mask the IRQ in hardware. | ||
29 | */ | ||
30 | void (*mask)(unsigned int); | ||
31 | /* | ||
32 | * Unmask the IRQ in hardware. | ||
33 | */ | ||
34 | void (*unmask)(unsigned int); | ||
35 | /* | ||
36 | * Ask the hardware to re-trigger the IRQ. | ||
37 | * Note: This method _must_ _not_ call the interrupt handler. | ||
38 | * If you are unable to retrigger the interrupt, do not | ||
39 | * provide a function, or if you do, return non-zero. | ||
40 | */ | ||
41 | int (*retrigger)(unsigned int); | ||
42 | /* | ||
43 | * Set the type of the IRQ. | ||
44 | */ | ||
45 | int (*set_type)(unsigned int, unsigned int); | ||
46 | /* | ||
47 | * Set wakeup-enable on the selected IRQ | ||
48 | */ | ||
49 | int (*set_wake)(unsigned int, unsigned int); | ||
50 | |||
51 | #ifdef CONFIG_SMP | ||
52 | /* | ||
53 | * Route an interrupt to a CPU | ||
54 | */ | ||
55 | void (*set_cpu)(struct irqdesc *desc, unsigned int irq, unsigned int cpu); | ||
56 | #endif | ||
57 | }; | ||
58 | |||
59 | struct irqdesc { | ||
60 | irq_handler_t handle; | ||
61 | struct irqchip *chip; | ||
62 | struct irqaction *action; | ||
63 | struct list_head pend; | ||
64 | void __iomem *base; | ||
65 | void *data; | ||
66 | unsigned int disable_depth; | ||
67 | |||
68 | unsigned int triggered: 1; /* IRQ has occurred */ | ||
69 | unsigned int running : 1; /* IRQ is running */ | ||
70 | unsigned int pending : 1; /* IRQ is pending */ | ||
71 | unsigned int probing : 1; /* IRQ in use for a probe */ | ||
72 | unsigned int probe_ok : 1; /* IRQ can be used for probe */ | ||
73 | unsigned int valid : 1; /* IRQ claimable */ | ||
74 | unsigned int noautoenable : 1; /* don't automatically enable IRQ */ | ||
75 | unsigned int unused :25; | ||
76 | |||
77 | unsigned int irqs_unhandled; | ||
78 | struct proc_dir_entry *procdir; | ||
79 | |||
80 | #ifdef CONFIG_SMP | ||
81 | cpumask_t affinity; | ||
82 | unsigned int cpu; | ||
83 | #endif | ||
84 | |||
85 | /* | ||
86 | * IRQ lock detection | ||
87 | */ | ||
88 | unsigned int lck_cnt; | ||
89 | unsigned int lck_pc; | ||
90 | unsigned int lck_jif; | ||
91 | }; | ||
92 | |||
93 | extern struct irqdesc irq_desc[]; | ||
94 | 14 | ||
95 | /* | 15 | struct seq_file; |
96 | * Helpful inline function for calling irq descriptor handlers. | ||
97 | */ | ||
98 | static inline void desc_handle_irq(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) | ||
99 | { | ||
100 | desc->handle(irq, desc, regs); | ||
101 | } | ||
102 | 16 | ||
103 | /* | 17 | /* |
104 | * This is internal. Do not use it. | 18 | * This is internal. Do not use it. |
@@ -106,18 +20,22 @@ static inline void desc_handle_irq(unsigned int irq, struct irqdesc *desc, struc | |||
106 | extern void (*init_arch_irq)(void); | 20 | extern void (*init_arch_irq)(void); |
107 | extern void init_FIQ(void); | 21 | extern void init_FIQ(void); |
108 | extern int show_fiq_list(struct seq_file *, void *); | 22 | extern int show_fiq_list(struct seq_file *, void *); |
109 | void __set_irq_handler(unsigned int irq, irq_handler_t, int); | ||
110 | 23 | ||
111 | /* | 24 | /* |
112 | * External stuff. | 25 | * Function wrappers |
26 | */ | ||
27 | #define set_irq_chipdata(irq, d) set_irq_chip_data(irq, d) | ||
28 | #define get_irq_chipdata(irq) get_irq_chip_data(irq) | ||
29 | |||
30 | /* | ||
31 | * Obsolete inline function for calling irq descriptor handlers. | ||
113 | */ | 32 | */ |
114 | #define set_irq_handler(irq,handler) __set_irq_handler(irq,handler,0) | 33 | static inline void desc_handle_irq(unsigned int irq, struct irq_desc *desc, |
115 | #define set_irq_chained_handler(irq,handler) __set_irq_handler(irq,handler,1) | 34 | struct pt_regs *regs) |
116 | #define set_irq_data(irq,d) do { irq_desc[irq].data = d; } while (0) | 35 | { |
117 | #define set_irq_chipdata(irq,d) do { irq_desc[irq].base = d; } while (0) | 36 | desc->handle_irq(irq, desc, regs); |
118 | #define get_irq_chipdata(irq) (irq_desc[irq].base) | 37 | } |
119 | 38 | ||
120 | void set_irq_chip(unsigned int irq, struct irqchip *); | ||
121 | void set_irq_flags(unsigned int irq, unsigned int flags); | 39 | void set_irq_flags(unsigned int irq, unsigned int flags); |
122 | 40 | ||
123 | #define IRQF_VALID (1 << 0) | 41 | #define IRQF_VALID (1 << 0) |
@@ -125,12 +43,25 @@ void set_irq_flags(unsigned int irq, unsigned int flags); | |||
125 | #define IRQF_NOAUTOEN (1 << 2) | 43 | #define IRQF_NOAUTOEN (1 << 2) |
126 | 44 | ||
127 | /* | 45 | /* |
128 | * Built-in IRQ handlers. | 46 | * This is for easy migration, but should be changed in the source |
129 | */ | 47 | */ |
130 | void do_level_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs); | 48 | #define do_level_IRQ handle_level_irq |
131 | void do_edge_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs); | 49 | #define do_edge_IRQ handle_edge_irq |
132 | void do_simple_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs); | 50 | #define do_simple_IRQ handle_simple_irq |
133 | void do_bad_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs); | 51 | #define irqdesc irq_desc |
134 | void dummy_mask_unmask_irq(unsigned int irq); | 52 | #define irqchip irq_chip |
53 | |||
54 | #define do_bad_IRQ(irq,desc,regs) \ | ||
55 | do { \ | ||
56 | spin_lock(&desc->lock); \ | ||
57 | handle_bad_irq(irq, desc, regs); \ | ||
58 | spin_unlock(&desc->lock); \ | ||
59 | } while(0) | ||
60 | |||
61 | extern unsigned long irq_err_count; | ||
62 | static inline void ack_bad_irq(int irq) | ||
63 | { | ||
64 | irq_err_count++; | ||
65 | } | ||
135 | 66 | ||
136 | #endif | 67 | #endif |
diff --git a/include/asm-arm/mach/map.h b/include/asm-arm/mach/map.h index e8ea67c97c7..cef5364ed5f 100644 --- a/include/asm-arm/mach/map.h +++ b/include/asm-arm/mach/map.h | |||
@@ -16,8 +16,6 @@ struct map_desc { | |||
16 | unsigned int type; | 16 | unsigned int type; |
17 | }; | 17 | }; |
18 | 18 | ||
19 | struct meminfo; | ||
20 | |||
21 | #define MT_DEVICE 0 | 19 | #define MT_DEVICE 0 |
22 | #define MT_CACHECLEAN 1 | 20 | #define MT_CACHECLEAN 1 |
23 | #define MT_MINICLEAN 2 | 21 | #define MT_MINICLEAN 2 |
@@ -28,7 +26,8 @@ struct meminfo; | |||
28 | #define MT_IXP2000_DEVICE 7 | 26 | #define MT_IXP2000_DEVICE 7 |
29 | #define MT_NONSHARED_DEVICE 8 | 27 | #define MT_NONSHARED_DEVICE 8 |
30 | 28 | ||
31 | extern void create_memmap_holes(struct meminfo *); | 29 | #ifdef CONFIG_MMU |
32 | extern void memtable_init(struct meminfo *); | ||
33 | extern void iotable_init(struct map_desc *, int); | 30 | extern void iotable_init(struct map_desc *, int); |
34 | extern void setup_io_desc(void); | 31 | #else |
32 | #define iotable_init(map,num) do { } while (0) | ||
33 | #endif | ||
diff --git a/include/asm-arm/mach/pci.h b/include/asm-arm/mach/pci.h index 25d540ed007..923e0ca6620 100644 --- a/include/asm-arm/mach/pci.h +++ b/include/asm-arm/mach/pci.h | |||
@@ -28,7 +28,7 @@ struct hw_pci { | |||
28 | struct pci_sys_data { | 28 | struct pci_sys_data { |
29 | struct list_head node; | 29 | struct list_head node; |
30 | int busnr; /* primary bus number */ | 30 | int busnr; /* primary bus number */ |
31 | unsigned long mem_offset; /* bus->cpu memory mapping offset */ | 31 | u64 mem_offset; /* bus->cpu memory mapping offset */ |
32 | unsigned long io_offset; /* bus->cpu IO mapping offset */ | 32 | unsigned long io_offset; /* bus->cpu IO mapping offset */ |
33 | struct pci_bus *bus; /* PCI bus */ | 33 | struct pci_bus *bus; /* PCI bus */ |
34 | struct resource *resource[3]; /* Primary PCI bus resources */ | 34 | struct resource *resource[3]; /* Primary PCI bus resources */ |
diff --git a/include/asm-arm/mach/serial_at91rm9200.h b/include/asm-arm/mach/serial_at91.h index 98f4b0cb883..1290bb32802 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 9162018585d..20c22bb218d 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 96c6db7dd0e..dee0bc336fe 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 */ |
@@ -68,6 +69,7 @@ extern void timer_tick(struct pt_regs *); | |||
68 | /* | 69 | /* |
69 | * Kernel time keeping support. | 70 | * Kernel time keeping support. |
70 | */ | 71 | */ |
72 | struct timespec; | ||
71 | extern int (*set_rtc)(void); | 73 | extern int (*set_rtc)(void); |
72 | extern void save_time_delta(struct timespec *delta, struct timespec *rtc); | 74 | extern void save_time_delta(struct timespec *delta, struct timespec *rtc); |
73 | extern void restore_time_delta(struct timespec *delta, struct timespec *rtc); | 75 | extern void restore_time_delta(struct timespec *delta, struct timespec *rtc); |
diff --git a/include/asm-arm/memory.h b/include/asm-arm/memory.h index 20928940759..91d536c215d 100644 --- a/include/asm-arm/memory.h +++ b/include/asm-arm/memory.h | |||
@@ -2,6 +2,7 @@ | |||
2 | * linux/include/asm-arm/memory.h | 2 | * linux/include/asm-arm/memory.h |
3 | * | 3 | * |
4 | * Copyright (C) 2000-2002 Russell King | 4 | * Copyright (C) 2000-2002 Russell King |
5 | * modification for nommu, Hyok S. Choi, 2004 | ||
5 | * | 6 | * |
6 | * This program is free software; you can redistribute it and/or modify | 7 | * 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 | * it under the terms of the GNU General Public License version 2 as |
@@ -22,11 +23,12 @@ | |||
22 | #define UL(x) (x) | 23 | #define UL(x) (x) |
23 | #endif | 24 | #endif |
24 | 25 | ||
25 | #include <linux/config.h> | ||
26 | #include <linux/compiler.h> | 26 | #include <linux/compiler.h> |
27 | #include <asm/arch/memory.h> | 27 | #include <asm/arch/memory.h> |
28 | #include <asm/sizes.h> | 28 | #include <asm/sizes.h> |
29 | 29 | ||
30 | #ifdef CONFIG_MMU | ||
31 | |||
30 | #ifndef TASK_SIZE | 32 | #ifndef TASK_SIZE |
31 | /* | 33 | /* |
32 | * TASK_SIZE - the maximum size of a user space task. | 34 | * TASK_SIZE - the maximum size of a user space task. |
@@ -49,6 +51,65 @@ | |||
49 | #endif | 51 | #endif |
50 | 52 | ||
51 | /* | 53 | /* |
54 | * The module space lives between the addresses given by TASK_SIZE | ||
55 | * and PAGE_OFFSET - it must be within 32MB of the kernel text. | ||
56 | */ | ||
57 | #define MODULE_END (PAGE_OFFSET) | ||
58 | #define MODULE_START (MODULE_END - 16*1048576) | ||
59 | |||
60 | #if TASK_SIZE > MODULE_START | ||
61 | #error Top of user space clashes with start of module space | ||
62 | #endif | ||
63 | |||
64 | /* | ||
65 | * The XIP kernel gets mapped at the bottom of the module vm area. | ||
66 | * Since we use sections to map it, this macro replaces the physical address | ||
67 | * with its virtual address while keeping offset from the base section. | ||
68 | */ | ||
69 | #define XIP_VIRT_ADDR(physaddr) (MODULE_START + ((physaddr) & 0x000fffff)) | ||
70 | |||
71 | /* | ||
72 | * Allow 16MB-aligned ioremap pages | ||
73 | */ | ||
74 | #define IOREMAP_MAX_ORDER 24 | ||
75 | |||
76 | #else /* CONFIG_MMU */ | ||
77 | |||
78 | /* | ||
79 | * The limitation of user task size can grow up to the end of free ram region. | ||
80 | * It is difficult to define and perhaps will never meet the original meaning | ||
81 | * of this define that was meant to. | ||
82 | * Fortunately, there is no reference for this in noMMU mode, for now. | ||
83 | */ | ||
84 | #ifndef TASK_SIZE | ||
85 | #define TASK_SIZE (CONFIG_DRAM_SIZE) | ||
86 | #endif | ||
87 | |||
88 | #ifndef TASK_UNMAPPED_BASE | ||
89 | #define TASK_UNMAPPED_BASE UL(0x00000000) | ||
90 | #endif | ||
91 | |||
92 | #ifndef PHYS_OFFSET | ||
93 | #define PHYS_OFFSET (CONFIG_DRAM_BASE) | ||
94 | #endif | ||
95 | |||
96 | #ifndef END_MEM | ||
97 | #define END_MEM (CONFIG_DRAM_BASE + CONFIG_DRAM_SIZE) | ||
98 | #endif | ||
99 | |||
100 | #ifndef PAGE_OFFSET | ||
101 | #define PAGE_OFFSET (PHYS_OFFSET) | ||
102 | #endif | ||
103 | |||
104 | /* | ||
105 | * The module can be at any place in ram in nommu mode. | ||
106 | */ | ||
107 | #define MODULE_END (END_MEM) | ||
108 | #define MODULE_START (PHYS_OFFSET) | ||
109 | |||
110 | #endif /* !CONFIG_MMU */ | ||
111 | |||
112 | /* | ||
52 | * Size of DMA-consistent memory region. Must be multiple of 2M, | 113 | * Size of DMA-consistent memory region. Must be multiple of 2M, |
53 | * between 2MB and 14MB inclusive. | 114 | * between 2MB and 14MB inclusive. |
54 | */ | 115 | */ |
@@ -72,24 +133,6 @@ | |||
72 | #define __phys_to_pfn(paddr) ((paddr) >> PAGE_SHIFT) | 133 | #define __phys_to_pfn(paddr) ((paddr) >> PAGE_SHIFT) |
73 | #define __pfn_to_phys(pfn) ((pfn) << PAGE_SHIFT) | 134 | #define __pfn_to_phys(pfn) ((pfn) << PAGE_SHIFT) |
74 | 135 | ||
75 | /* | ||
76 | * The module space lives between the addresses given by TASK_SIZE | ||
77 | * and PAGE_OFFSET - it must be within 32MB of the kernel text. | ||
78 | */ | ||
79 | #define MODULE_END (PAGE_OFFSET) | ||
80 | #define MODULE_START (MODULE_END - 16*1048576) | ||
81 | |||
82 | #if TASK_SIZE > MODULE_START | ||
83 | #error Top of user space clashes with start of module space | ||
84 | #endif | ||
85 | |||
86 | /* | ||
87 | * The XIP kernel gets mapped at the bottom of the module vm area. | ||
88 | * Since we use sections to map it, this macro replaces the physical address | ||
89 | * with its virtual address while keeping offset from the base section. | ||
90 | */ | ||
91 | #define XIP_VIRT_ADDR(physaddr) (MODULE_START + ((physaddr) & 0x000fffff)) | ||
92 | |||
93 | #ifndef __ASSEMBLY__ | 136 | #ifndef __ASSEMBLY__ |
94 | 137 | ||
95 | /* | 138 | /* |
diff --git a/include/asm-arm/mmu.h b/include/asm-arm/mmu.h index a457cb71984..fe2a23b5627 100644 --- a/include/asm-arm/mmu.h +++ b/include/asm-arm/mmu.h | |||
@@ -1,10 +1,13 @@ | |||
1 | #ifndef __ARM_MMU_H | 1 | #ifndef __ARM_MMU_H |
2 | #define __ARM_MMU_H | 2 | #define __ARM_MMU_H |
3 | 3 | ||
4 | #ifdef CONFIG_MMU | ||
5 | |||
4 | typedef struct { | 6 | typedef struct { |
5 | #if __LINUX_ARM_ARCH__ >= 6 | 7 | #if __LINUX_ARM_ARCH__ >= 6 |
6 | unsigned int id; | 8 | unsigned int id; |
7 | #endif | 9 | #endif |
10 | unsigned int kvm_seq; | ||
8 | } mm_context_t; | 11 | } mm_context_t; |
9 | 12 | ||
10 | #if __LINUX_ARM_ARCH__ >= 6 | 13 | #if __LINUX_ARM_ARCH__ >= 6 |
@@ -13,4 +16,18 @@ typedef struct { | |||
13 | #define ASID(mm) (0) | 16 | #define ASID(mm) (0) |
14 | #endif | 17 | #endif |
15 | 18 | ||
19 | #else | ||
20 | |||
21 | /* | ||
22 | * From nommu.h: | ||
23 | * Copyright (C) 2002, David McCullough <davidm@snapgear.com> | ||
24 | * modified for 2.6 by Hyok S. Choi <hyok.choi@samsung.com> | ||
25 | */ | ||
26 | typedef struct { | ||
27 | struct vm_list_struct *vmlist; | ||
28 | unsigned long end_brk; | ||
29 | } mm_context_t; | ||
30 | |||
31 | #endif | ||
32 | |||
16 | #endif | 33 | #endif |
diff --git a/include/asm-arm/mmu_context.h b/include/asm-arm/mmu_context.h index 81c59facea3..d1a65b1edca 100644 --- a/include/asm-arm/mmu_context.h +++ b/include/asm-arm/mmu_context.h | |||
@@ -17,6 +17,8 @@ | |||
17 | #include <asm/cacheflush.h> | 17 | #include <asm/cacheflush.h> |
18 | #include <asm/proc-fns.h> | 18 | #include <asm/proc-fns.h> |
19 | 19 | ||
20 | void __check_kvm_seq(struct mm_struct *mm); | ||
21 | |||
20 | #if __LINUX_ARM_ARCH__ >= 6 | 22 | #if __LINUX_ARM_ARCH__ >= 6 |
21 | 23 | ||
22 | /* | 24 | /* |
@@ -45,13 +47,21 @@ static inline void check_context(struct mm_struct *mm) | |||
45 | { | 47 | { |
46 | if (unlikely((mm->context.id ^ cpu_last_asid) >> ASID_BITS)) | 48 | if (unlikely((mm->context.id ^ cpu_last_asid) >> ASID_BITS)) |
47 | __new_context(mm); | 49 | __new_context(mm); |
50 | |||
51 | if (unlikely(mm->context.kvm_seq != init_mm.context.kvm_seq)) | ||
52 | __check_kvm_seq(mm); | ||
48 | } | 53 | } |
49 | 54 | ||
50 | #define init_new_context(tsk,mm) (__init_new_context(tsk,mm),0) | 55 | #define init_new_context(tsk,mm) (__init_new_context(tsk,mm),0) |
51 | 56 | ||
52 | #else | 57 | #else |
53 | 58 | ||
54 | #define check_context(mm) do { } while (0) | 59 | static inline void check_context(struct mm_struct *mm) |
60 | { | ||
61 | if (unlikely(mm->context.kvm_seq != init_mm.context.kvm_seq)) | ||
62 | __check_kvm_seq(mm); | ||
63 | } | ||
64 | |||
55 | #define init_new_context(tsk,mm) 0 | 65 | #define init_new_context(tsk,mm) 0 |
56 | 66 | ||
57 | #endif | 67 | #endif |
@@ -82,6 +92,7 @@ static inline void | |||
82 | switch_mm(struct mm_struct *prev, struct mm_struct *next, | 92 | switch_mm(struct mm_struct *prev, struct mm_struct *next, |
83 | struct task_struct *tsk) | 93 | struct task_struct *tsk) |
84 | { | 94 | { |
95 | #ifdef CONFIG_MMU | ||
85 | unsigned int cpu = smp_processor_id(); | 96 | unsigned int cpu = smp_processor_id(); |
86 | 97 | ||
87 | if (prev != next) { | 98 | if (prev != next) { |
@@ -91,6 +102,7 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next, | |||
91 | if (cache_is_vivt()) | 102 | if (cache_is_vivt()) |
92 | cpu_clear(cpu, prev->cpu_vm_mask); | 103 | cpu_clear(cpu, prev->cpu_vm_mask); |
93 | } | 104 | } |
105 | #endif | ||
94 | } | 106 | } |
95 | 107 | ||
96 | #define deactivate_mm(tsk,mm) do { } while (0) | 108 | #define deactivate_mm(tsk,mm) do { } while (0) |
diff --git a/include/asm-arm/page-nommu.h b/include/asm-arm/page-nommu.h new file mode 100644 index 00000000000..a1bcad06048 --- /dev/null +++ b/include/asm-arm/page-nommu.h | |||
@@ -0,0 +1,51 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/page-nommu.h | ||
3 | * | ||
4 | * Copyright (C) 2004 Hyok S. Choi | ||
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_PAGE_NOMMU_H | ||
11 | #define _ASMARM_PAGE_NOMMU_H | ||
12 | |||
13 | #if !defined(CONFIG_SMALL_TASKS) && PAGE_SHIFT < 13 | ||
14 | #define KTHREAD_SIZE (8192) | ||
15 | #else | ||
16 | #define KTHREAD_SIZE PAGE_SIZE | ||
17 | #endif | ||
18 | |||
19 | #define get_user_page(vaddr) __get_free_page(GFP_KERNEL) | ||
20 | #define free_user_page(page, addr) free_page(addr) | ||
21 | |||
22 | #define clear_page(page) memset((page), 0, PAGE_SIZE) | ||
23 | #define copy_page(to,from) memcpy((to), (from), PAGE_SIZE) | ||
24 | |||
25 | #define clear_user_page(page, vaddr, pg) clear_page(page) | ||
26 | #define copy_user_page(to, from, vaddr, pg) copy_page(to, from) | ||
27 | |||
28 | /* | ||
29 | * These are used to make use of C type-checking.. | ||
30 | */ | ||
31 | typedef unsigned long pte_t; | ||
32 | typedef unsigned long pmd_t; | ||
33 | typedef unsigned long pgd_t[2]; | ||
34 | typedef unsigned long pgprot_t; | ||
35 | |||
36 | #define pte_val(x) (x) | ||
37 | #define pmd_val(x) (x) | ||
38 | #define pgd_val(x) ((x)[0]) | ||
39 | #define pgprot_val(x) (x) | ||
40 | |||
41 | #define __pte(x) (x) | ||
42 | #define __pmd(x) (x) | ||
43 | #define __pgprot(x) (x) | ||
44 | |||
45 | /* to align the pointer to the (next) page boundary */ | ||
46 | #define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) | ||
47 | |||
48 | extern unsigned long memory_start; | ||
49 | extern unsigned long memory_end; | ||
50 | |||
51 | #endif | ||
diff --git a/include/asm-arm/page.h b/include/asm-arm/page.h index a404d2bf0c6..b721270b998 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 |
@@ -24,6 +23,12 @@ | |||
24 | 23 | ||
25 | #ifndef __ASSEMBLY__ | 24 | #ifndef __ASSEMBLY__ |
26 | 25 | ||
26 | #ifndef CONFIG_MMU | ||
27 | |||
28 | #include "page-nommu.h" | ||
29 | |||
30 | #else | ||
31 | |||
27 | #include <asm/glue.h> | 32 | #include <asm/glue.h> |
28 | 33 | ||
29 | /* | 34 | /* |
@@ -172,6 +177,8 @@ typedef unsigned long pgprot_t; | |||
172 | /* the upper-most page table pointer */ | 177 | /* the upper-most page table pointer */ |
173 | extern pmd_t *top_pmd; | 178 | extern pmd_t *top_pmd; |
174 | 179 | ||
180 | #endif /* CONFIG_MMU */ | ||
181 | |||
175 | #include <asm/memory.h> | 182 | #include <asm/memory.h> |
176 | 183 | ||
177 | #endif /* !__ASSEMBLY__ */ | 184 | #endif /* !__ASSEMBLY__ */ |
@@ -186,8 +193,8 @@ extern pmd_t *top_pmd; | |||
186 | #define ARCH_SLAB_MINALIGN 8 | 193 | #define ARCH_SLAB_MINALIGN 8 |
187 | #endif | 194 | #endif |
188 | 195 | ||
189 | #endif /* __KERNEL__ */ | ||
190 | |||
191 | #include <asm-generic/page.h> | 196 | #include <asm-generic/page.h> |
192 | 197 | ||
198 | #endif /* __KERNEL__ */ | ||
199 | |||
193 | #endif | 200 | #endif |
diff --git a/include/asm-arm/pci.h b/include/asm-arm/pci.h index ead3ced38cb..f21abd4ddac 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/pgalloc.h b/include/asm-arm/pgalloc.h index c4ac2e67768..4d439455291 100644 --- a/include/asm-arm/pgalloc.h +++ b/include/asm-arm/pgalloc.h | |||
@@ -16,6 +16,10 @@ | |||
16 | #include <asm/cacheflush.h> | 16 | #include <asm/cacheflush.h> |
17 | #include <asm/tlbflush.h> | 17 | #include <asm/tlbflush.h> |
18 | 18 | ||
19 | #define check_pgt_cache() do { } while (0) | ||
20 | |||
21 | #ifdef CONFIG_MMU | ||
22 | |||
19 | #define _PAGE_USER_TABLE (PMD_TYPE_TABLE | PMD_BIT4 | PMD_DOMAIN(DOMAIN_USER)) | 23 | #define _PAGE_USER_TABLE (PMD_TYPE_TABLE | PMD_BIT4 | PMD_DOMAIN(DOMAIN_USER)) |
20 | #define _PAGE_KERNEL_TABLE (PMD_TYPE_TABLE | PMD_BIT4 | PMD_DOMAIN(DOMAIN_KERNEL)) | 24 | #define _PAGE_KERNEL_TABLE (PMD_TYPE_TABLE | PMD_BIT4 | PMD_DOMAIN(DOMAIN_KERNEL)) |
21 | 25 | ||
@@ -32,8 +36,6 @@ extern void free_pgd_slow(pgd_t *pgd); | |||
32 | #define pgd_alloc(mm) get_pgd_slow(mm) | 36 | #define pgd_alloc(mm) get_pgd_slow(mm) |
33 | #define pgd_free(pgd) free_pgd_slow(pgd) | 37 | #define pgd_free(pgd) free_pgd_slow(pgd) |
34 | 38 | ||
35 | #define check_pgt_cache() do { } while (0) | ||
36 | |||
37 | /* | 39 | /* |
38 | * Allocate one PTE table. | 40 | * Allocate one PTE table. |
39 | * | 41 | * |
@@ -126,4 +128,6 @@ pmd_populate(struct mm_struct *mm, pmd_t *pmdp, struct page *ptep) | |||
126 | __pmd_populate(pmdp, page_to_pfn(ptep) << PAGE_SHIFT | _PAGE_USER_TABLE); | 128 | __pmd_populate(pmdp, page_to_pfn(ptep) << PAGE_SHIFT | _PAGE_USER_TABLE); |
127 | } | 129 | } |
128 | 130 | ||
131 | #endif /* CONFIG_MMU */ | ||
132 | |||
129 | #endif | 133 | #endif |
diff --git a/include/asm-arm/pgtable-hwdef.h b/include/asm-arm/pgtable-hwdef.h index 1bc1f997bda..f3b5120c99f 100644 --- a/include/asm-arm/pgtable-hwdef.h +++ b/include/asm-arm/pgtable-hwdef.h | |||
@@ -28,6 +28,7 @@ | |||
28 | */ | 28 | */ |
29 | #define PMD_SECT_BUFFERABLE (1 << 2) | 29 | #define PMD_SECT_BUFFERABLE (1 << 2) |
30 | #define PMD_SECT_CACHEABLE (1 << 3) | 30 | #define PMD_SECT_CACHEABLE (1 << 3) |
31 | #define PMD_SECT_XN (1 << 4) /* v6 */ | ||
31 | #define PMD_SECT_AP_WRITE (1 << 10) | 32 | #define PMD_SECT_AP_WRITE (1 << 10) |
32 | #define PMD_SECT_AP_READ (1 << 11) | 33 | #define PMD_SECT_AP_READ (1 << 11) |
33 | #define PMD_SECT_TEX(x) ((x) << 12) /* v5 */ | 34 | #define PMD_SECT_TEX(x) ((x) << 12) /* v5 */ |
diff --git a/include/asm-arm/pgtable-nommu.h b/include/asm-arm/pgtable-nommu.h new file mode 100644 index 00000000000..b13322dccf4 --- /dev/null +++ b/include/asm-arm/pgtable-nommu.h | |||
@@ -0,0 +1,123 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/pgtable-nommu.h | ||
3 | * | ||
4 | * Copyright (C) 1995-2002 Russell King | ||
5 | * Copyright (C) 2004 Hyok S. Choi | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef _ASMARM_PGTABLE_NOMMU_H | ||
12 | #define _ASMARM_PGTABLE_NOMMU_H | ||
13 | |||
14 | #ifndef __ASSEMBLY__ | ||
15 | |||
16 | #include <linux/config.h> | ||
17 | #include <linux/slab.h> | ||
18 | #include <asm/processor.h> | ||
19 | #include <asm/page.h> | ||
20 | #include <asm/io.h> | ||
21 | |||
22 | /* | ||
23 | * Trivial page table functions. | ||
24 | */ | ||
25 | #define pgd_present(pgd) (1) | ||
26 | #define pgd_none(pgd) (0) | ||
27 | #define pgd_bad(pgd) (0) | ||
28 | #define pgd_clear(pgdp) | ||
29 | #define kern_addr_valid(addr) (1) | ||
30 | #define pmd_offset(a, b) ((void *)0) | ||
31 | /* FIXME */ | ||
32 | /* | ||
33 | * PMD_SHIFT determines the size of the area a second-level page table can map | ||
34 | * PGDIR_SHIFT determines what a third-level page table entry can map | ||
35 | */ | ||
36 | #define PGDIR_SHIFT 21 | ||
37 | |||
38 | #define PGDIR_SIZE (1UL << PGDIR_SHIFT) | ||
39 | #define PGDIR_MASK (~(PGDIR_SIZE-1)) | ||
40 | /* FIXME */ | ||
41 | |||
42 | #define PAGE_NONE __pgprot(0) | ||
43 | #define PAGE_SHARED __pgprot(0) | ||
44 | #define PAGE_COPY __pgprot(0) | ||
45 | #define PAGE_READONLY __pgprot(0) | ||
46 | #define PAGE_KERNEL __pgprot(0) | ||
47 | |||
48 | //extern void paging_init(struct meminfo *, struct machine_desc *); | ||
49 | #define swapper_pg_dir ((pgd_t *) 0) | ||
50 | |||
51 | #define __swp_type(x) (0) | ||
52 | #define __swp_offset(x) (0) | ||
53 | #define __swp_entry(typ,off) ((swp_entry_t) { ((typ) | ((off) << 7)) }) | ||
54 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) | ||
55 | #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) | ||
56 | |||
57 | |||
58 | typedef pte_t *pte_addr_t; | ||
59 | |||
60 | static inline int pte_file(pte_t pte) { return 0; } | ||
61 | |||
62 | /* | ||
63 | * ZERO_PAGE is a global shared page that is always zero: used | ||
64 | * for zero-mapped memory areas etc.. | ||
65 | */ | ||
66 | #define ZERO_PAGE(vaddr) (virt_to_page(0)) | ||
67 | |||
68 | /* | ||
69 | * Mark the prot value as uncacheable and unbufferable. | ||
70 | */ | ||
71 | #define pgprot_noncached(prot) __pgprot(0) | ||
72 | #define pgprot_writecombine(prot) __pgprot(0) | ||
73 | |||
74 | |||
75 | /* | ||
76 | * These would be in other places but having them here reduces the diffs. | ||
77 | */ | ||
78 | extern unsigned int kobjsize(const void *objp); | ||
79 | extern int is_in_rom(unsigned long); | ||
80 | |||
81 | /* | ||
82 | * No page table caches to initialise. | ||
83 | */ | ||
84 | #define pgtable_cache_init() do { } while (0) | ||
85 | #define io_remap_page_range remap_page_range | ||
86 | #define io_remap_pfn_range remap_pfn_range | ||
87 | |||
88 | #define MK_IOSPACE_PFN(space, pfn) (pfn) | ||
89 | #define GET_IOSPACE(pfn) 0 | ||
90 | #define GET_PFN(pfn) (pfn) | ||
91 | |||
92 | |||
93 | /* | ||
94 | * All 32bit addresses are effectively valid for vmalloc... | ||
95 | * Sort of meaningless for non-VM targets. | ||
96 | */ | ||
97 | #define VMALLOC_START 0 | ||
98 | #define VMALLOC_END 0xffffffff | ||
99 | |||
100 | #define FIRST_USER_ADDRESS (0) | ||
101 | |||
102 | #else | ||
103 | |||
104 | /* | ||
105 | * dummy tlb and user structures. | ||
106 | */ | ||
107 | #define v3_tlb_fns (0) | ||
108 | #define v4_tlb_fns (0) | ||
109 | #define v4wb_tlb_fns (0) | ||
110 | #define v4wbi_tlb_fns (0) | ||
111 | #define v6_tlb_fns (0) | ||
112 | |||
113 | #define v3_user_fns (0) | ||
114 | #define v4_user_fns (0) | ||
115 | #define v4_mc_user_fns (0) | ||
116 | #define v4wb_user_fns (0) | ||
117 | #define v4wt_user_fns (0) | ||
118 | #define v6_user_fns (0) | ||
119 | #define xscale_mc_user_fns (0) | ||
120 | |||
121 | #endif /*__ASSEMBLY__*/ | ||
122 | |||
123 | #endif /* _ASMARM_PGTABLE_H */ | ||
diff --git a/include/asm-arm/pgtable.h b/include/asm-arm/pgtable.h index e85c08d78dd..8d3919c6458 100644 --- a/include/asm-arm/pgtable.h +++ b/include/asm-arm/pgtable.h | |||
@@ -11,9 +11,15 @@ | |||
11 | #define _ASMARM_PGTABLE_H | 11 | #define _ASMARM_PGTABLE_H |
12 | 12 | ||
13 | #include <asm-generic/4level-fixup.h> | 13 | #include <asm-generic/4level-fixup.h> |
14 | #include <asm/proc-fns.h> | ||
15 | |||
16 | #ifndef CONFIG_MMU | ||
17 | |||
18 | #include "pgtable-nommu.h" | ||
19 | |||
20 | #else | ||
14 | 21 | ||
15 | #include <asm/memory.h> | 22 | #include <asm/memory.h> |
16 | #include <asm/proc-fns.h> | ||
17 | #include <asm/arch/vmalloc.h> | 23 | #include <asm/arch/vmalloc.h> |
18 | 24 | ||
19 | /* | 25 | /* |
@@ -378,4 +384,6 @@ extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; | |||
378 | 384 | ||
379 | #endif /* !__ASSEMBLY__ */ | 385 | #endif /* !__ASSEMBLY__ */ |
380 | 386 | ||
387 | #endif /* CONFIG_MMU */ | ||
388 | |||
381 | #endif /* _ASMARM_PGTABLE_H */ | 389 | #endif /* _ASMARM_PGTABLE_H */ |
diff --git a/include/asm-arm/proc-fns.h b/include/asm-arm/proc-fns.h index 106045edb86..1bde92cdaeb 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 |
@@ -166,6 +165,8 @@ | |||
166 | 165 | ||
167 | #include <asm/memory.h> | 166 | #include <asm/memory.h> |
168 | 167 | ||
168 | #ifdef CONFIG_MMU | ||
169 | |||
169 | #define cpu_switch_mm(pgd,mm) cpu_do_switch_mm(virt_to_phys(pgd),mm) | 170 | #define cpu_switch_mm(pgd,mm) cpu_do_switch_mm(virt_to_phys(pgd),mm) |
170 | 171 | ||
171 | #define cpu_get_pgd() \ | 172 | #define cpu_get_pgd() \ |
@@ -177,6 +178,8 @@ | |||
177 | (pgd_t *)phys_to_virt(pg); \ | 178 | (pgd_t *)phys_to_virt(pg); \ |
178 | }) | 179 | }) |
179 | 180 | ||
181 | #endif | ||
182 | |||
180 | #endif /* __ASSEMBLY__ */ | 183 | #endif /* __ASSEMBLY__ */ |
181 | #endif /* __KERNEL__ */ | 184 | #endif /* __KERNEL__ */ |
182 | #endif /* __ASM_PROCFNS_H */ | 185 | #endif /* __ASM_PROCFNS_H */ |
diff --git a/include/asm-arm/procinfo.h b/include/asm-arm/procinfo.h index 84252605522..91a31adfa8a 100644 --- a/include/asm-arm/procinfo.h +++ b/include/asm-arm/procinfo.h | |||
@@ -29,7 +29,8 @@ struct processor; | |||
29 | struct proc_info_list { | 29 | struct proc_info_list { |
30 | unsigned int cpu_val; | 30 | unsigned int cpu_val; |
31 | unsigned int cpu_mask; | 31 | unsigned int cpu_mask; |
32 | unsigned long __cpu_mmu_flags; /* used by head.S */ | 32 | unsigned long __cpu_mm_mmu_flags; /* used by head.S */ |
33 | unsigned long __cpu_io_mmu_flags; /* used by head.S */ | ||
33 | unsigned long __cpu_flush; /* used by head.S */ | 34 | unsigned long __cpu_flush; /* used by head.S */ |
34 | const char *arch_name; | 35 | const char *arch_name; |
35 | const char *elf_name; | 36 | const char *elf_name; |
@@ -54,5 +55,6 @@ extern unsigned int elf_hwcap; | |||
54 | #define HWCAP_VFP 64 | 55 | #define HWCAP_VFP 64 |
55 | #define HWCAP_EDSP 128 | 56 | #define HWCAP_EDSP 128 |
56 | #define HWCAP_JAVA 256 | 57 | #define HWCAP_JAVA 256 |
58 | #define HWCAP_IWMMXT 512 | ||
57 | 59 | ||
58 | #endif | 60 | #endif |
diff --git a/include/asm-arm/ptrace.h b/include/asm-arm/ptrace.h index 77adb7fa169..5a8ef787dbf 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 |
@@ -26,6 +25,11 @@ | |||
26 | 25 | ||
27 | #define PTRACE_SET_SYSCALL 23 | 26 | #define PTRACE_SET_SYSCALL 23 |
28 | 27 | ||
28 | /* PTRACE_SYSCALL is 24 */ | ||
29 | |||
30 | #define PTRACE_GETCRUNCHREGS 25 | ||
31 | #define PTRACE_SETCRUNCHREGS 26 | ||
32 | |||
29 | /* | 33 | /* |
30 | * PSR bits | 34 | * PSR bits |
31 | */ | 35 | */ |
diff --git a/include/asm-arm/signal.h b/include/asm-arm/signal.h index ced69161917..d0fb487aba4 100644 --- a/include/asm-arm/signal.h +++ b/include/asm-arm/signal.h | |||
@@ -82,7 +82,6 @@ typedef unsigned long sigset_t; | |||
82 | * is running in 26-bit. | 82 | * is running in 26-bit. |
83 | * SA_ONSTACK allows alternate signal stacks (see sigaltstack(2)). | 83 | * SA_ONSTACK allows alternate signal stacks (see sigaltstack(2)). |
84 | * SA_RESTART flag to get restarting signals (which were the default long ago) | 84 | * SA_RESTART flag to get restarting signals (which were the default long ago) |
85 | * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the | ||
86 | * SA_NODEFER prevents the current signal from being masked in the handler. | 85 | * SA_NODEFER prevents the current signal from being masked in the handler. |
87 | * SA_RESETHAND clears the handler when the signal is delivered. | 86 | * SA_RESETHAND clears the handler when the signal is delivered. |
88 | * | 87 | * |
@@ -101,7 +100,6 @@ typedef unsigned long sigset_t; | |||
101 | 100 | ||
102 | #define SA_NOMASK SA_NODEFER | 101 | #define SA_NOMASK SA_NODEFER |
103 | #define SA_ONESHOT SA_RESETHAND | 102 | #define SA_ONESHOT SA_RESETHAND |
104 | #define SA_INTERRUPT 0x20000000 /* dummy -- ignored */ | ||
105 | 103 | ||
106 | 104 | ||
107 | /* | 105 | /* |
@@ -113,10 +111,6 @@ typedef unsigned long sigset_t; | |||
113 | #define MINSIGSTKSZ 2048 | 111 | #define MINSIGSTKSZ 2048 |
114 | #define SIGSTKSZ 8192 | 112 | #define SIGSTKSZ 8192 |
115 | 113 | ||
116 | #ifdef __KERNEL__ | ||
117 | #define SA_TIMER 0x40000000 | ||
118 | #endif | ||
119 | |||
120 | #include <asm-generic/signal.h> | 114 | #include <asm-generic/signal.h> |
121 | 115 | ||
122 | #ifdef __KERNEL__ | 116 | #ifdef __KERNEL__ |
diff --git a/include/asm-arm/smp.h b/include/asm-arm/smp.h index fe45f7f6122..f67acce387e 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/socket.h b/include/asm-arm/socket.h index 3c51da6438c..19f7df702b0 100644 --- a/include/asm-arm/socket.h +++ b/include/asm-arm/socket.h | |||
@@ -48,5 +48,6 @@ | |||
48 | #define SO_ACCEPTCONN 30 | 48 | #define SO_ACCEPTCONN 30 |
49 | 49 | ||
50 | #define SO_PEERSEC 31 | 50 | #define SO_PEERSEC 31 |
51 | #define SO_PASSSEC 34 | ||
51 | 52 | ||
52 | #endif /* _ASM_SOCKET_H */ | 53 | #endif /* _ASM_SOCKET_H */ |
diff --git a/include/asm-arm/spinlock.h b/include/asm-arm/spinlock.h index 406ca97a8ab..01b7c26a303 100644 --- a/include/asm-arm/spinlock.h +++ b/include/asm-arm/spinlock.h | |||
@@ -199,7 +199,21 @@ static inline void __raw_read_unlock(raw_rwlock_t *rw) | |||
199 | : "cc"); | 199 | : "cc"); |
200 | } | 200 | } |
201 | 201 | ||
202 | #define __raw_read_trylock(lock) generic__raw_read_trylock(lock) | 202 | static inline int __raw_read_trylock(raw_rwlock_t *rw) |
203 | { | ||
204 | unsigned long tmp, tmp2 = 1; | ||
205 | |||
206 | __asm__ __volatile__( | ||
207 | "1: ldrex %0, [%2]\n" | ||
208 | " adds %0, %0, #1\n" | ||
209 | " strexpl %1, %0, [%2]\n" | ||
210 | : "=&r" (tmp), "+r" (tmp2) | ||
211 | : "r" (&rw->lock) | ||
212 | : "cc"); | ||
213 | |||
214 | smp_mb(); | ||
215 | return tmp2 == 0; | ||
216 | } | ||
203 | 217 | ||
204 | /* read_can_lock - would read_trylock() succeed? */ | 218 | /* read_can_lock - would read_trylock() succeed? */ |
205 | #define __raw_read_can_lock(x) ((x)->lock < 0x80000000) | 219 | #define __raw_read_can_lock(x) ((x)->lock < 0x80000000) |
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h index 7c9568d3030..0947cbf9b69 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 |
@@ -174,7 +176,6 @@ extern unsigned int user_debug; | |||
174 | #define wmb() mb() | 176 | #define wmb() mb() |
175 | #define read_barrier_depends() do { } while(0) | 177 | #define read_barrier_depends() do { } while(0) |
176 | #define set_mb(var, value) do { var = value; mb(); } while (0) | 178 | #define set_mb(var, value) do { var = value; mb(); } while (0) |
177 | #define set_wmb(var, value) do { var = value; wmb(); } while (0) | ||
178 | #define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t"); | 179 | #define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t"); |
179 | 180 | ||
180 | /* | 181 | /* |
diff --git a/include/asm-arm/thread_info.h b/include/asm-arm/thread_info.h index cfbccb63c67..f28b236139e 100644 --- a/include/asm-arm/thread_info.h +++ b/include/asm-arm/thread_info.h | |||
@@ -59,6 +59,7 @@ struct thread_info { | |||
59 | struct cpu_context_save cpu_context; /* cpu context */ | 59 | struct cpu_context_save cpu_context; /* cpu context */ |
60 | __u8 used_cp[16]; /* thread used copro */ | 60 | __u8 used_cp[16]; /* thread used copro */ |
61 | unsigned long tp_value; | 61 | unsigned long tp_value; |
62 | struct crunch_state crunchstate; | ||
62 | union fp_state fpstate __attribute__((aligned(8))); | 63 | union fp_state fpstate __attribute__((aligned(8))); |
63 | union vfp_state vfpstate; | 64 | union vfp_state vfpstate; |
64 | struct restart_block restart_block; | 65 | struct restart_block restart_block; |
@@ -101,16 +102,22 @@ extern void free_thread_info(struct thread_info *); | |||
101 | #define thread_saved_fp(tsk) \ | 102 | #define thread_saved_fp(tsk) \ |
102 | ((unsigned long)(task_thread_info(tsk)->cpu_context.fp)) | 103 | ((unsigned long)(task_thread_info(tsk)->cpu_context.fp)) |
103 | 104 | ||
105 | extern void crunch_task_disable(struct thread_info *); | ||
106 | extern void crunch_task_copy(struct thread_info *, void *); | ||
107 | extern void crunch_task_restore(struct thread_info *, void *); | ||
108 | extern void crunch_task_release(struct thread_info *); | ||
109 | |||
104 | extern void iwmmxt_task_disable(struct thread_info *); | 110 | extern void iwmmxt_task_disable(struct thread_info *); |
105 | extern void iwmmxt_task_copy(struct thread_info *, void *); | 111 | extern void iwmmxt_task_copy(struct thread_info *, void *); |
106 | extern void iwmmxt_task_restore(struct thread_info *, void *); | 112 | extern void iwmmxt_task_restore(struct thread_info *, void *); |
107 | extern void iwmmxt_task_release(struct thread_info *); | 113 | extern void iwmmxt_task_release(struct thread_info *); |
114 | extern void iwmmxt_task_switch(struct thread_info *); | ||
108 | 115 | ||
109 | #endif | 116 | #endif |
110 | 117 | ||
111 | /* | 118 | /* |
112 | * We use bit 30 of the preempt_count to indicate that kernel | 119 | * We use bit 30 of the preempt_count to indicate that kernel |
113 | * preemption is occuring. See include/asm-arm/hardirq.h. | 120 | * preemption is occurring. See include/asm-arm/hardirq.h. |
114 | */ | 121 | */ |
115 | #define PREEMPT_ACTIVE 0x40000000 | 122 | #define PREEMPT_ACTIVE 0x40000000 |
116 | 123 | ||
diff --git a/include/asm-arm/thread_notify.h b/include/asm-arm/thread_notify.h new file mode 100644 index 00000000000..8866e521684 --- /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 728992451dd..d97fc76189a 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/uaccess.h b/include/asm-arm/uaccess.h index 064f0f5e8e2..87aba57a66c 100644 --- a/include/asm-arm/uaccess.h +++ b/include/asm-arm/uaccess.h | |||
@@ -41,15 +41,24 @@ struct exception_table_entry | |||
41 | extern int fixup_exception(struct pt_regs *regs); | 41 | extern int fixup_exception(struct pt_regs *regs); |
42 | 42 | ||
43 | /* | 43 | /* |
44 | * These two are intentionally not defined anywhere - if the kernel | ||
45 | * code generates any references to them, that's a bug. | ||
46 | */ | ||
47 | extern int __get_user_bad(void); | ||
48 | extern int __put_user_bad(void); | ||
49 | |||
50 | /* | ||
44 | * Note that this is actually 0x1,0000,0000 | 51 | * Note that this is actually 0x1,0000,0000 |
45 | */ | 52 | */ |
46 | #define KERNEL_DS 0x00000000 | 53 | #define KERNEL_DS 0x00000000 |
47 | #define USER_DS TASK_SIZE | ||
48 | |||
49 | #define get_ds() (KERNEL_DS) | 54 | #define get_ds() (KERNEL_DS) |
55 | |||
56 | #ifdef CONFIG_MMU | ||
57 | |||
58 | #define USER_DS TASK_SIZE | ||
50 | #define get_fs() (current_thread_info()->addr_limit) | 59 | #define get_fs() (current_thread_info()->addr_limit) |
51 | 60 | ||
52 | static inline void set_fs (mm_segment_t fs) | 61 | static inline void set_fs(mm_segment_t fs) |
53 | { | 62 | { |
54 | current_thread_info()->addr_limit = fs; | 63 | current_thread_info()->addr_limit = fs; |
55 | modify_domain(DOMAIN_KERNEL, fs ? DOMAIN_CLIENT : DOMAIN_MANAGER); | 64 | modify_domain(DOMAIN_KERNEL, fs ? DOMAIN_CLIENT : DOMAIN_MANAGER); |
@@ -75,8 +84,6 @@ static inline void set_fs (mm_segment_t fs) | |||
75 | : "cc"); \ | 84 | : "cc"); \ |
76 | flag; }) | 85 | flag; }) |
77 | 86 | ||
78 | #define access_ok(type,addr,size) (__range_ok(addr,size) == 0) | ||
79 | |||
80 | /* | 87 | /* |
81 | * Single-value transfer routines. They automatically use the right | 88 | * Single-value transfer routines. They automatically use the right |
82 | * size if we just have the right pointer type. Note that the functions | 89 | * size if we just have the right pointer type. Note that the functions |
@@ -87,20 +94,10 @@ static inline void set_fs (mm_segment_t fs) | |||
87 | * fixup code, but there are a few places where it intrudes on the | 94 | * fixup code, but there are a few places where it intrudes on the |
88 | * main code path. When we only write to user space, there is no | 95 | * main code path. When we only write to user space, there is no |
89 | * problem. | 96 | * problem. |
90 | * | ||
91 | * The "__xxx" versions of the user access functions do not verify the | ||
92 | * address space - it must have been done previously with a separate | ||
93 | * "access_ok()" call. | ||
94 | * | ||
95 | * The "xxx_error" versions set the third argument to EFAULT if an | ||
96 | * error occurs, and leave it unchanged on success. Note that these | ||
97 | * versions are void (ie, don't return a value as such). | ||
98 | */ | 97 | */ |
99 | |||
100 | extern int __get_user_1(void *); | 98 | extern int __get_user_1(void *); |
101 | extern int __get_user_2(void *); | 99 | extern int __get_user_2(void *); |
102 | extern int __get_user_4(void *); | 100 | extern int __get_user_4(void *); |
103 | extern int __get_user_bad(void); | ||
104 | 101 | ||
105 | #define __get_user_x(__r2,__p,__e,__s,__i...) \ | 102 | #define __get_user_x(__r2,__p,__e,__s,__i...) \ |
106 | __asm__ __volatile__ ( \ | 103 | __asm__ __volatile__ ( \ |
@@ -131,6 +128,74 @@ extern int __get_user_bad(void); | |||
131 | __e; \ | 128 | __e; \ |
132 | }) | 129 | }) |
133 | 130 | ||
131 | extern int __put_user_1(void *, unsigned int); | ||
132 | extern int __put_user_2(void *, unsigned int); | ||
133 | extern int __put_user_4(void *, unsigned int); | ||
134 | extern int __put_user_8(void *, unsigned long long); | ||
135 | |||
136 | #define __put_user_x(__r2,__p,__e,__s) \ | ||
137 | __asm__ __volatile__ ( \ | ||
138 | __asmeq("%0", "r0") __asmeq("%2", "r2") \ | ||
139 | "bl __put_user_" #__s \ | ||
140 | : "=&r" (__e) \ | ||
141 | : "0" (__p), "r" (__r2) \ | ||
142 | : "ip", "lr", "cc") | ||
143 | |||
144 | #define put_user(x,p) \ | ||
145 | ({ \ | ||
146 | const register typeof(*(p)) __r2 asm("r2") = (x); \ | ||
147 | const register typeof(*(p)) __user *__p asm("r0") = (p);\ | ||
148 | register int __e asm("r0"); \ | ||
149 | switch (sizeof(*(__p))) { \ | ||
150 | case 1: \ | ||
151 | __put_user_x(__r2, __p, __e, 1); \ | ||
152 | break; \ | ||
153 | case 2: \ | ||
154 | __put_user_x(__r2, __p, __e, 2); \ | ||
155 | break; \ | ||
156 | case 4: \ | ||
157 | __put_user_x(__r2, __p, __e, 4); \ | ||
158 | break; \ | ||
159 | case 8: \ | ||
160 | __put_user_x(__r2, __p, __e, 8); \ | ||
161 | break; \ | ||
162 | default: __e = __put_user_bad(); break; \ | ||
163 | } \ | ||
164 | __e; \ | ||
165 | }) | ||
166 | |||
167 | #else /* CONFIG_MMU */ | ||
168 | |||
169 | /* | ||
170 | * uClinux has only one addr space, so has simplified address limits. | ||
171 | */ | ||
172 | #define USER_DS KERNEL_DS | ||
173 | |||
174 | #define segment_eq(a,b) (1) | ||
175 | #define __addr_ok(addr) (1) | ||
176 | #define __range_ok(addr,size) (0) | ||
177 | #define get_fs() (KERNEL_DS) | ||
178 | |||
179 | static inline void set_fs(mm_segment_t fs) | ||
180 | { | ||
181 | } | ||
182 | |||
183 | #define get_user(x,p) __get_user(x,p) | ||
184 | #define put_user(x,p) __put_user(x,p) | ||
185 | |||
186 | #endif /* CONFIG_MMU */ | ||
187 | |||
188 | #define access_ok(type,addr,size) (__range_ok(addr,size) == 0) | ||
189 | |||
190 | /* | ||
191 | * The "__xxx" versions of the user access functions do not verify the | ||
192 | * address space - it must have been done previously with a separate | ||
193 | * "access_ok()" call. | ||
194 | * | ||
195 | * The "xxx_error" versions set the third argument to EFAULT if an | ||
196 | * error occurs, and leave it unchanged on success. Note that these | ||
197 | * versions are void (ie, don't return a value as such). | ||
198 | */ | ||
134 | #define __get_user(x,ptr) \ | 199 | #define __get_user(x,ptr) \ |
135 | ({ \ | 200 | ({ \ |
136 | long __gu_err = 0; \ | 201 | long __gu_err = 0; \ |
@@ -212,43 +277,6 @@ do { \ | |||
212 | : "r" (addr), "i" (-EFAULT) \ | 277 | : "r" (addr), "i" (-EFAULT) \ |
213 | : "cc") | 278 | : "cc") |
214 | 279 | ||
215 | extern int __put_user_1(void *, unsigned int); | ||
216 | extern int __put_user_2(void *, unsigned int); | ||
217 | extern int __put_user_4(void *, unsigned int); | ||
218 | extern int __put_user_8(void *, unsigned long long); | ||
219 | extern int __put_user_bad(void); | ||
220 | |||
221 | #define __put_user_x(__r2,__p,__e,__s) \ | ||
222 | __asm__ __volatile__ ( \ | ||
223 | __asmeq("%0", "r0") __asmeq("%2", "r2") \ | ||
224 | "bl __put_user_" #__s \ | ||
225 | : "=&r" (__e) \ | ||
226 | : "0" (__p), "r" (__r2) \ | ||
227 | : "ip", "lr", "cc") | ||
228 | |||
229 | #define put_user(x,p) \ | ||
230 | ({ \ | ||
231 | const register typeof(*(p)) __r2 asm("r2") = (x); \ | ||
232 | const register typeof(*(p)) __user *__p asm("r0") = (p);\ | ||
233 | register int __e asm("r0"); \ | ||
234 | switch (sizeof(*(__p))) { \ | ||
235 | case 1: \ | ||
236 | __put_user_x(__r2, __p, __e, 1); \ | ||
237 | break; \ | ||
238 | case 2: \ | ||
239 | __put_user_x(__r2, __p, __e, 2); \ | ||
240 | break; \ | ||
241 | case 4: \ | ||
242 | __put_user_x(__r2, __p, __e, 4); \ | ||
243 | break; \ | ||
244 | case 8: \ | ||
245 | __put_user_x(__r2, __p, __e, 8); \ | ||
246 | break; \ | ||
247 | default: __e = __put_user_bad(); break; \ | ||
248 | } \ | ||
249 | __e; \ | ||
250 | }) | ||
251 | |||
252 | #define __put_user(x,ptr) \ | 280 | #define __put_user(x,ptr) \ |
253 | ({ \ | 281 | ({ \ |
254 | long __pu_err = 0; \ | 282 | long __pu_err = 0; \ |
@@ -353,66 +381,54 @@ do { \ | |||
353 | : "r" (x), "i" (-EFAULT) \ | 381 | : "r" (x), "i" (-EFAULT) \ |
354 | : "cc") | 382 | : "cc") |
355 | 383 | ||
356 | extern unsigned long __arch_copy_from_user(void *to, const void __user *from, unsigned long n); | 384 | |
357 | extern unsigned long __arch_copy_to_user(void __user *to, const void *from, unsigned long n); | 385 | #ifdef CONFIG_MMU |
358 | extern unsigned long __arch_clear_user(void __user *addr, unsigned long n); | 386 | extern unsigned long __copy_from_user(void *to, const void __user *from, unsigned long n); |
359 | extern unsigned long __arch_strncpy_from_user(char *to, const char __user *from, unsigned long count); | 387 | extern unsigned long __copy_to_user(void __user *to, const void *from, unsigned long n); |
360 | extern unsigned long __arch_strnlen_user(const char __user *s, long n); | 388 | extern unsigned long __clear_user(void __user *addr, unsigned long n); |
389 | #else | ||
390 | #define __copy_from_user(to,from,n) (memcpy(to, (void __force *)from, n), 0) | ||
391 | #define __copy_to_user(to,from,n) (memcpy((void __force *)to, from, n), 0) | ||
392 | #define __clear_user(addr,n) (memset((void __force *)addr, 0, n), 0) | ||
393 | #endif | ||
394 | |||
395 | extern unsigned long __strncpy_from_user(char *to, const char __user *from, unsigned long count); | ||
396 | extern unsigned long __strnlen_user(const char __user *s, long n); | ||
361 | 397 | ||
362 | static inline unsigned long copy_from_user(void *to, const void __user *from, unsigned long n) | 398 | static inline unsigned long copy_from_user(void *to, const void __user *from, unsigned long n) |
363 | { | 399 | { |
364 | if (access_ok(VERIFY_READ, from, n)) | 400 | if (access_ok(VERIFY_READ, from, n)) |
365 | n = __arch_copy_from_user(to, from, n); | 401 | n = __copy_from_user(to, from, n); |
366 | else /* security hole - plug it */ | 402 | else /* security hole - plug it */ |
367 | memzero(to, n); | 403 | memzero(to, n); |
368 | return n; | 404 | return n; |
369 | } | 405 | } |
370 | 406 | ||
371 | static inline unsigned long __copy_from_user(void *to, const void __user *from, unsigned long n) | ||
372 | { | ||
373 | return __arch_copy_from_user(to, from, n); | ||
374 | } | ||
375 | |||
376 | static inline unsigned long copy_to_user(void __user *to, const void *from, unsigned long n) | 407 | static inline unsigned long copy_to_user(void __user *to, const void *from, unsigned long n) |
377 | { | 408 | { |
378 | if (access_ok(VERIFY_WRITE, to, n)) | 409 | if (access_ok(VERIFY_WRITE, to, n)) |
379 | n = __arch_copy_to_user(to, from, n); | 410 | n = __copy_to_user(to, from, n); |
380 | return n; | 411 | return n; |
381 | } | 412 | } |
382 | 413 | ||
383 | static inline unsigned long __copy_to_user(void __user *to, const void *from, unsigned long n) | ||
384 | { | ||
385 | return __arch_copy_to_user(to, from, n); | ||
386 | } | ||
387 | |||
388 | #define __copy_to_user_inatomic __copy_to_user | 414 | #define __copy_to_user_inatomic __copy_to_user |
389 | #define __copy_from_user_inatomic __copy_from_user | 415 | #define __copy_from_user_inatomic __copy_from_user |
390 | 416 | ||
391 | static inline unsigned long clear_user (void __user *to, unsigned long n) | 417 | static inline unsigned long clear_user(void __user *to, unsigned long n) |
392 | { | 418 | { |
393 | if (access_ok(VERIFY_WRITE, to, n)) | 419 | if (access_ok(VERIFY_WRITE, to, n)) |
394 | n = __arch_clear_user(to, n); | 420 | n = __clear_user(to, n); |
395 | return n; | 421 | return n; |
396 | } | 422 | } |
397 | 423 | ||
398 | static inline unsigned long __clear_user (void __user *to, unsigned long n) | 424 | static inline long strncpy_from_user(char *dst, const char __user *src, long count) |
399 | { | ||
400 | return __arch_clear_user(to, n); | ||
401 | } | ||
402 | |||
403 | static inline long strncpy_from_user (char *dst, const char __user *src, long count) | ||
404 | { | 425 | { |
405 | long res = -EFAULT; | 426 | long res = -EFAULT; |
406 | if (access_ok(VERIFY_READ, src, 1)) | 427 | if (access_ok(VERIFY_READ, src, 1)) |
407 | res = __arch_strncpy_from_user(dst, src, count); | 428 | res = __strncpy_from_user(dst, src, count); |
408 | return res; | 429 | return res; |
409 | } | 430 | } |
410 | 431 | ||
411 | static inline long __strncpy_from_user (char *dst, const char __user *src, long count) | ||
412 | { | ||
413 | return __arch_strncpy_from_user(dst, src, count); | ||
414 | } | ||
415 | |||
416 | #define strlen_user(s) strnlen_user(s, ~0UL >> 1) | 432 | #define strlen_user(s) strnlen_user(s, ~0UL >> 1) |
417 | 433 | ||
418 | static inline long strnlen_user(const char __user *s, long n) | 434 | static inline long strnlen_user(const char __user *s, long n) |
@@ -420,7 +436,7 @@ static inline long strnlen_user(const char __user *s, long n) | |||
420 | unsigned long res = 0; | 436 | unsigned long res = 0; |
421 | 437 | ||
422 | if (__addr_ok(s)) | 438 | if (__addr_ok(s)) |
423 | res = __arch_strnlen_user(s, n); | 439 | res = __strnlen_user(s, n); |
424 | 440 | ||
425 | return res; | 441 | return res; |
426 | } | 442 | } |
diff --git a/include/asm-arm/ucontext.h b/include/asm-arm/ucontext.h index f853130137c..bf65e9f4525 100644 --- a/include/asm-arm/ucontext.h +++ b/include/asm-arm/ucontext.h | |||
@@ -1,12 +1,103 @@ | |||
1 | #ifndef _ASMARM_UCONTEXT_H | 1 | #ifndef _ASMARM_UCONTEXT_H |
2 | #define _ASMARM_UCONTEXT_H | 2 | #define _ASMARM_UCONTEXT_H |
3 | 3 | ||
4 | #include <asm/fpstate.h> | ||
5 | |||
6 | /* | ||
7 | * struct sigcontext only has room for the basic registers, but struct | ||
8 | * ucontext now has room for all registers which need to be saved and | ||
9 | * restored. Coprocessor registers are stored in uc_regspace. Each | ||
10 | * coprocessor's saved state should start with a documented 32-bit magic | ||
11 | * number, followed by a 32-bit word giving the coproccesor's saved size. | ||
12 | * uc_regspace may be expanded if necessary, although this takes some | ||
13 | * coordination with glibc. | ||
14 | */ | ||
15 | |||
4 | struct ucontext { | 16 | struct ucontext { |
5 | unsigned long uc_flags; | 17 | unsigned long uc_flags; |
6 | struct ucontext *uc_link; | 18 | struct ucontext *uc_link; |
7 | stack_t uc_stack; | 19 | stack_t uc_stack; |
8 | struct sigcontext uc_mcontext; | 20 | struct sigcontext uc_mcontext; |
9 | sigset_t uc_sigmask; /* mask last for extensibility */ | 21 | sigset_t uc_sigmask; |
22 | /* Allow for uc_sigmask growth. Glibc uses a 1024-bit sigset_t. */ | ||
23 | int __unused[32 - (sizeof (sigset_t) / sizeof (int))]; | ||
24 | /* Last for extensibility. Eight byte aligned because some | ||
25 | coprocessors require eight byte alignment. */ | ||
26 | unsigned long uc_regspace[128] __attribute__((__aligned__(8))); | ||
10 | }; | 27 | }; |
11 | 28 | ||
29 | #ifdef __KERNEL__ | ||
30 | |||
31 | /* | ||
32 | * Coprocessor save state. The magic values and specific | ||
33 | * coprocessor's layouts are part of the userspace ABI. Each one of | ||
34 | * these should be a multiple of eight bytes and aligned to eight | ||
35 | * bytes, to prevent unpredictable padding in the signal frame. | ||
36 | */ | ||
37 | |||
38 | #ifdef CONFIG_CRUNCH | ||
39 | #define CRUNCH_MAGIC 0x5065cf03 | ||
40 | #define CRUNCH_STORAGE_SIZE (CRUNCH_SIZE + 8) | ||
41 | |||
42 | struct crunch_sigframe { | ||
43 | unsigned long magic; | ||
44 | unsigned long size; | ||
45 | struct crunch_state storage; | ||
46 | } __attribute__((__aligned__(8))); | ||
47 | #endif | ||
48 | |||
49 | #ifdef CONFIG_IWMMXT | ||
50 | /* iwmmxt_area is 0x98 bytes long, preceeded by 8 bytes of signature */ | ||
51 | #define IWMMXT_MAGIC 0x12ef842a | ||
52 | #define IWMMXT_STORAGE_SIZE (IWMMXT_SIZE + 8) | ||
53 | |||
54 | struct iwmmxt_sigframe { | ||
55 | unsigned long magic; | ||
56 | unsigned long size; | ||
57 | struct iwmmxt_struct storage; | ||
58 | } __attribute__((__aligned__(8))); | ||
59 | #endif /* CONFIG_IWMMXT */ | ||
60 | |||
61 | #ifdef CONFIG_VFP | ||
62 | #if __LINUX_ARM_ARCH__ < 6 | ||
63 | /* For ARM pre-v6, we use fstmiax and fldmiax. This adds one extra | ||
64 | * word after the registers, and a word of padding at the end for | ||
65 | * alignment. */ | ||
66 | #define VFP_MAGIC 0x56465001 | ||
67 | #define VFP_STORAGE_SIZE 152 | ||
68 | #else | ||
69 | #define VFP_MAGIC 0x56465002 | ||
70 | #define VFP_STORAGE_SIZE 144 | ||
71 | #endif | ||
72 | |||
73 | struct vfp_sigframe | ||
74 | { | ||
75 | unsigned long magic; | ||
76 | unsigned long size; | ||
77 | union vfp_state storage; | ||
78 | }; | ||
79 | #endif /* CONFIG_VFP */ | ||
80 | |||
81 | /* | ||
82 | * Auxiliary signal frame. This saves stuff like FP state. | ||
83 | * The layout of this structure is not part of the user ABI, | ||
84 | * because the config options aren't. uc_regspace is really | ||
85 | * one of these. | ||
86 | */ | ||
87 | struct aux_sigframe { | ||
88 | #ifdef CONFIG_CRUNCH | ||
89 | struct crunch_sigframe crunch; | ||
90 | #endif | ||
91 | #ifdef CONFIG_IWMMXT | ||
92 | struct iwmmxt_sigframe iwmmxt; | ||
93 | #endif | ||
94 | #if 0 && defined CONFIG_VFP /* Not yet saved. */ | ||
95 | struct vfp_sigframe vfp; | ||
96 | #endif | ||
97 | /* Something that isn't a valid magic number for any coprocessor. */ | ||
98 | unsigned long end_magic; | ||
99 | } __attribute__((__aligned__(8))); | ||
100 | |||
101 | #endif | ||
102 | |||
12 | #endif /* !_ASMARM_UCONTEXT_H */ | 103 | #endif /* !_ASMARM_UCONTEXT_H */ |
diff --git a/include/asm-arm/unistd.h b/include/asm-arm/unistd.h index cbf39a56dbe..1e891f860ef 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 926e5ee128e..1e0b913c3d7 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)) |