diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-21 18:40:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-21 18:40:55 -0400 |
commit | 85b375a613085b78531ec86369a51c2f3b922f95 (patch) | |
tree | 716437d598de92bbd7acaf24622e9a7d74fc209a /include/asm-arm | |
parent | ec965350bb98bd291eb34f6ecddfdcfc36da1e6e (diff) | |
parent | cf816ecb533ab96b883dfdc0db174598b5b5c4d2 (diff) |
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (212 commits)
[ARM] pxa: Phycore pcm-990-specific code for the PXA270 Quick Capture driver
[ARM] pxa: V4L2 soc_camera driver for PXA270
[ARM] pxa: restrict availability of pxa2xx PCMCIA drivers
[ARM] 5005/1: BAST: Fix kset_name initialiser
[ARM] 4967/1: Adds functions to set clkout rate for Samsung S3C2410
[ARM] 4988/1: Add GPIO lib support to the EP93xx
[ARM] Add initial sparsemem support
[ARM] pxa: initialise PXA devices before platform init code
[ARM] 5002/1: tosa: add two more leds
[ARM] 5004/1: Tosa: make several unreferenced structures static.
[ARM] 5003/1: Shut up sparse warnings
[ARM] 4977/2: soc - pxa2xx-ac97 - Add missing clk_enable()
[ARM] 4976/1: zylonite: Configure GPIO for WM9713 IRQ line
[ARM] 4974/1: Drop unused leds-tosa.
[ARM] 4973/1: Tosa: use leds-gpio driver.
[ARM] 4972/1: Tosa: convert scoop GPIOs usage to generic gpio code
[ARM] 4971/1: pxaficp_ir: provide startup and shutdown hooks
[ARM] pxa: lubbock: move mis-placed SPI info
[ARM] 4970/1: tosa: correct gpio used for wake up.
[ARM] 4966/1: magician: add MFP pin configuration
...
Diffstat (limited to 'include/asm-arm')
101 files changed, 3564 insertions, 1326 deletions
diff --git a/include/asm-arm/arch-at91/at91_ecc.h b/include/asm-arm/arch-at91/at91_ecc.h index ff93df516d6d..1e5a8caca2d1 100644 --- a/include/asm-arm/arch-at91/at91_ecc.h +++ b/include/asm-arm/arch-at91/at91_ecc.h | |||
@@ -13,26 +13,26 @@ | |||
13 | #ifndef AT91_ECC_H | 13 | #ifndef AT91_ECC_H |
14 | #define AT91_ECC_H | 14 | #define AT91_ECC_H |
15 | 15 | ||
16 | #define AT91_ECC_CR (AT91_ECC + 0x00) /* Control register */ | 16 | #define AT91_ECC_CR 0x00 /* Control register */ |
17 | #define AT91_ECC_RST (1 << 0) /* Reset parity */ | 17 | #define AT91_ECC_RST (1 << 0) /* Reset parity */ |
18 | 18 | ||
19 | #define AT91_ECC_MR (AT91_ECC + 0x04) /* Mode register */ | 19 | #define AT91_ECC_MR 0x04 /* Mode register */ |
20 | #define AT91_ECC_PAGESIZE (3 << 0) /* Page Size */ | 20 | #define AT91_ECC_PAGESIZE (3 << 0) /* Page Size */ |
21 | #define AT91_ECC_PAGESIZE_528 (0) | 21 | #define AT91_ECC_PAGESIZE_528 (0) |
22 | #define AT91_ECC_PAGESIZE_1056 (1) | 22 | #define AT91_ECC_PAGESIZE_1056 (1) |
23 | #define AT91_ECC_PAGESIZE_2112 (2) | 23 | #define AT91_ECC_PAGESIZE_2112 (2) |
24 | #define AT91_ECC_PAGESIZE_4224 (3) | 24 | #define AT91_ECC_PAGESIZE_4224 (3) |
25 | 25 | ||
26 | #define AT91_ECC_SR (AT91_ECC + 0x08) /* Status register */ | 26 | #define AT91_ECC_SR 0x08 /* Status register */ |
27 | #define AT91_ECC_RECERR (1 << 0) /* Recoverable Error */ | 27 | #define AT91_ECC_RECERR (1 << 0) /* Recoverable Error */ |
28 | #define AT91_ECC_ECCERR (1 << 1) /* ECC Single Bit Error */ | 28 | #define AT91_ECC_ECCERR (1 << 1) /* ECC Single Bit Error */ |
29 | #define AT91_ECC_MULERR (1 << 2) /* Multiple Errors */ | 29 | #define AT91_ECC_MULERR (1 << 2) /* Multiple Errors */ |
30 | 30 | ||
31 | #define AT91_ECC_PR (AT91_ECC + 0x0c) /* Parity register */ | 31 | #define AT91_ECC_PR 0x0c /* Parity register */ |
32 | #define AT91_ECC_BITADDR (0xf << 0) /* Bit Error Address */ | 32 | #define AT91_ECC_BITADDR (0xf << 0) /* Bit Error Address */ |
33 | #define AT91_ECC_WORDADDR (0xfff << 4) /* Word Error Address */ | 33 | #define AT91_ECC_WORDADDR (0xfff << 4) /* Word Error Address */ |
34 | 34 | ||
35 | #define AT91_ECC_NPR (AT91_ECC + 0x10) /* NParity register */ | 35 | #define AT91_ECC_NPR 0x10 /* NParity register */ |
36 | #define AT91_ECC_NPARITY (0xffff << 0) /* NParity */ | 36 | #define AT91_ECC_NPARITY (0xffff << 0) /* NParity */ |
37 | 37 | ||
38 | #endif | 38 | #endif |
diff --git a/include/asm-arm/arch-at91/at91_pmc.h b/include/asm-arm/arch-at91/at91_pmc.h index 52cd8e5dabc9..c2b13c280155 100644 --- a/include/asm-arm/arch-at91/at91_pmc.h +++ b/include/asm-arm/arch-at91/at91_pmc.h | |||
@@ -76,10 +76,17 @@ | |||
76 | #define AT91_PMC_PRES_32 (5 << 2) | 76 | #define AT91_PMC_PRES_32 (5 << 2) |
77 | #define AT91_PMC_PRES_64 (6 << 2) | 77 | #define AT91_PMC_PRES_64 (6 << 2) |
78 | #define AT91_PMC_MDIV (3 << 8) /* Master Clock Division */ | 78 | #define AT91_PMC_MDIV (3 << 8) /* Master Clock Division */ |
79 | #define AT91_PMC_MDIV_1 (0 << 8) | 79 | #define AT91RM9200_PMC_MDIV_1 (0 << 8) /* [AT91RM9200 only] */ |
80 | #define AT91_PMC_MDIV_2 (1 << 8) | 80 | #define AT91RM9200_PMC_MDIV_2 (1 << 8) |
81 | #define AT91_PMC_MDIV_3 (2 << 8) | 81 | #define AT91RM9200_PMC_MDIV_3 (2 << 8) |
82 | #define AT91_PMC_MDIV_4 (3 << 8) | 82 | #define AT91RM9200_PMC_MDIV_4 (3 << 8) |
83 | #define AT91SAM9_PMC_MDIV_1 (0 << 8) /* [SAM9,CAP9 only] */ | ||
84 | #define AT91SAM9_PMC_MDIV_2 (1 << 8) | ||
85 | #define AT91SAM9_PMC_MDIV_4 (2 << 8) | ||
86 | #define AT91SAM9_PMC_MDIV_6 (3 << 8) | ||
87 | #define AT91_PMC_PDIV (1 << 12) /* Processor Clock Division [some SAM9 only] */ | ||
88 | #define AT91_PMC_PDIV_1 (0 << 12) | ||
89 | #define AT91_PMC_PDIV_2 (1 << 12) | ||
83 | 90 | ||
84 | #define AT91_PMC_PCKR(n) (AT91_PMC + 0x40 + ((n) * 4)) /* Programmable Clock 0-3 Registers */ | 91 | #define AT91_PMC_PCKR(n) (AT91_PMC + 0x40 + ((n) * 4)) /* Programmable Clock 0-3 Registers */ |
85 | 92 | ||
diff --git a/include/asm-arm/arch-at91/at91_shdwc.h b/include/asm-arm/arch-at91/at91_shdwc.h index 01b433de2272..581fa41d90e8 100644 --- a/include/asm-arm/arch-at91/at91_shdwc.h +++ b/include/asm-arm/arch-at91/at91_shdwc.h | |||
@@ -24,10 +24,12 @@ | |||
24 | #define AT91_SHDW_WKMODE0_LOW 2 | 24 | #define AT91_SHDW_WKMODE0_LOW 2 |
25 | #define AT91_SHDW_WKMODE0_ANYLEVEL 3 | 25 | #define AT91_SHDW_WKMODE0_ANYLEVEL 3 |
26 | #define AT91_SHDW_CPTWK0 (0xf << 4) /* Counter On Wake Up 0 */ | 26 | #define AT91_SHDW_CPTWK0 (0xf << 4) /* Counter On Wake Up 0 */ |
27 | #define AT91_SHDW_CPTWK0_(x) ((x) << 4) | ||
27 | #define AT91_SHDW_RTTWKEN (1 << 16) /* Real Time Timer Wake-up Enable */ | 28 | #define AT91_SHDW_RTTWKEN (1 << 16) /* Real Time Timer Wake-up Enable */ |
28 | 29 | ||
29 | #define AT91_SHDW_SR (AT91_SHDWC + 0x08) /* Shut Down Status Register */ | 30 | #define AT91_SHDW_SR (AT91_SHDWC + 0x08) /* Shut Down Status Register */ |
30 | #define AT91_SHDW_WAKEUP0 (1 << 0) /* Wake-up 0 Status */ | 31 | #define AT91_SHDW_WAKEUP0 (1 << 0) /* Wake-up 0 Status */ |
31 | #define AT91_SHDW_RTTWK (1 << 16) /* Real-time Timer Wake-up */ | 32 | #define AT91_SHDW_RTTWK (1 << 16) /* Real-time Timer Wake-up */ |
33 | #define AT91_SHDW_RTCWK (1 << 17) /* Real-time Clock Wake-up [SAM9RL] */ | ||
32 | 34 | ||
33 | #endif | 35 | #endif |
diff --git a/include/asm-arm/arch-at91/at91cap9_ddrsdr.h b/include/asm-arm/arch-at91/at91cap9_ddrsdr.h new file mode 100644 index 000000000000..efdb23af1ee4 --- /dev/null +++ b/include/asm-arm/arch-at91/at91cap9_ddrsdr.h | |||
@@ -0,0 +1,100 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91/at91cap9_ddrsdr.h | ||
3 | * | ||
4 | * DDR/SDR Controller (DDRSDRC) - System peripherals registers. | ||
5 | * Based on AT91CAP9 datasheet revision B. | ||
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 | |||
13 | #ifndef AT91CAP9_DDRSDR_H | ||
14 | #define AT91CAP9_DDRSDR_H | ||
15 | |||
16 | #define AT91_DDRSDRC_MR (AT91_DDRSDRC + 0x00) /* Mode Register */ | ||
17 | #define AT91_DDRSDRC_MODE (0xf << 0) /* Command Mode */ | ||
18 | #define AT91_DDRSDRC_MODE_NORMAL 0 | ||
19 | #define AT91_DDRSDRC_MODE_NOP 1 | ||
20 | #define AT91_DDRSDRC_MODE_PRECHARGE 2 | ||
21 | #define AT91_DDRSDRC_MODE_LMR 3 | ||
22 | #define AT91_DDRSDRC_MODE_REFRESH 4 | ||
23 | #define AT91_DDRSDRC_MODE_EXT_LMR 5 | ||
24 | #define AT91_DDRSDRC_MODE_DEEP 6 | ||
25 | |||
26 | #define AT91_DDRSDRC_RTR (AT91_DDRSDRC + 0x04) /* Refresh Timer Register */ | ||
27 | #define AT91_DDRSDRC_COUNT (0xfff << 0) /* Refresh Timer Counter */ | ||
28 | |||
29 | #define AT91_DDRSDRC_CR (AT91_DDRSDRC + 0x08) /* Configuration Register */ | ||
30 | #define AT91_DDRSDRC_NC (3 << 0) /* Number of Column Bits */ | ||
31 | #define AT91_DDRSDRC_NC_SDR8 (0 << 0) | ||
32 | #define AT91_DDRSDRC_NC_SDR9 (1 << 0) | ||
33 | #define AT91_DDRSDRC_NC_SDR10 (2 << 0) | ||
34 | #define AT91_DDRSDRC_NC_SDR11 (3 << 0) | ||
35 | #define AT91_DDRSDRC_NC_DDR9 (0 << 0) | ||
36 | #define AT91_DDRSDRC_NC_DDR10 (1 << 0) | ||
37 | #define AT91_DDRSDRC_NC_DDR11 (2 << 0) | ||
38 | #define AT91_DDRSDRC_NC_DDR12 (3 << 0) | ||
39 | #define AT91_DDRSDRC_NR (3 << 2) /* Number of Row Bits */ | ||
40 | #define AT91_DDRSDRC_NR_11 (0 << 2) | ||
41 | #define AT91_DDRSDRC_NR_12 (1 << 2) | ||
42 | #define AT91_DDRSDRC_NR_13 (2 << 2) | ||
43 | #define AT91_DDRSDRC_CAS (7 << 4) /* CAS Latency */ | ||
44 | #define AT91_DDRSDRC_CAS_2 (2 << 4) | ||
45 | #define AT91_DDRSDRC_CAS_3 (3 << 4) | ||
46 | #define AT91_DDRSDRC_CAS_25 (6 << 4) | ||
47 | #define AT91_DDRSDRC_DLL (1 << 7) /* Reset DLL */ | ||
48 | #define AT91_DDRSDRC_DICDS (1 << 8) /* Output impedance control */ | ||
49 | |||
50 | #define AT91_DDRSDRC_T0PR (AT91_DDRSDRC + 0x0C) /* Timing 0 Register */ | ||
51 | #define AT91_DDRSDRC_TRAS (0xf << 0) /* Active to Precharge delay */ | ||
52 | #define AT91_DDRSDRC_TRCD (0xf << 4) /* Row to Column delay */ | ||
53 | #define AT91_DDRSDRC_TWR (0xf << 8) /* Write recovery delay */ | ||
54 | #define AT91_DDRSDRC_TRC (0xf << 12) /* Row cycle delay */ | ||
55 | #define AT91_DDRSDRC_TRP (0xf << 16) /* Row precharge delay */ | ||
56 | #define AT91_DDRSDRC_TRRD (0xf << 20) /* Active BankA to BankB */ | ||
57 | #define AT91_DDRSDRC_TWTR (1 << 24) /* Internal Write to Read delay */ | ||
58 | #define AT91_DDRSDRC_TMRD (0xf << 28) /* Load mode to active/refresh delay */ | ||
59 | |||
60 | #define AT91_DDRSDRC_T1PR (AT91_DDRSDRC + 0x10) /* Timing 1 Register */ | ||
61 | #define AT91_DDRSDRC_TRFC (0x1f << 0) /* Row Cycle Delay */ | ||
62 | #define AT91_DDRSDRC_TXSNR (0xff << 8) /* Exit self-refresh to non-read */ | ||
63 | #define AT91_DDRSDRC_TXSRD (0xff << 16) /* Exit self-refresh to read */ | ||
64 | #define AT91_DDRSDRC_TXP (0xf << 24) /* Exit power-down delay */ | ||
65 | |||
66 | #define AT91_DDRSDRC_LPR (AT91_DDRSDRC + 0x18) /* Low Power Register */ | ||
67 | #define AT91_DDRSDRC_LPCB (3 << 0) /* Low-power Configurations */ | ||
68 | #define AT91_DDRSDRC_LPCB_DISABLE 0 | ||
69 | #define AT91_DDRSDRC_LPCB_SELF_REFRESH 1 | ||
70 | #define AT91_DDRSDRC_LPCB_POWER_DOWN 2 | ||
71 | #define AT91_DDRSDRC_LPCB_DEEP_POWER_DOWN 3 | ||
72 | #define AT91_DDRSDRC_CLKFR (1 << 2) /* Clock Frozen */ | ||
73 | #define AT91_DDRSDRC_PASR (7 << 4) /* Partial Array Self Refresh */ | ||
74 | #define AT91_DDRSDRC_TCSR (3 << 8) /* Temperature Compensated Self Refresh */ | ||
75 | #define AT91_DDRSDRC_DS (3 << 10) /* Drive Strength */ | ||
76 | #define AT91_DDRSDRC_TIMEOUT (3 << 12) /* Time to define when Low Power Mode is enabled */ | ||
77 | #define AT91_DDRSDRC_TIMEOUT_0_CLK_CYCLES (0 << 12) | ||
78 | #define AT91_DDRSDRC_TIMEOUT_64_CLK_CYCLES (1 << 12) | ||
79 | #define AT91_DDRSDRC_TIMEOUT_128_CLK_CYCLES (2 << 12) | ||
80 | |||
81 | #define AT91_DDRSDRC_MDR (AT91_DDRSDRC + 0x1C) /* Memory Device Register */ | ||
82 | #define AT91_DDRSDRC_MD (3 << 0) /* Memory Device Type */ | ||
83 | #define AT91_DDRSDRC_MD_SDR 0 | ||
84 | #define AT91_DDRSDRC_MD_LOW_POWER_SDR 1 | ||
85 | #define AT91_DDRSDRC_MD_DDR 2 | ||
86 | #define AT91_DDRSDRC_MD_LOW_POWER_DDR 3 | ||
87 | |||
88 | #define AT91_DDRSDRC_DLLR (AT91_DDRSDRC + 0x20) /* DLL Information Register */ | ||
89 | #define AT91_DDRSDRC_MDINC (1 << 0) /* Master Delay increment */ | ||
90 | #define AT91_DDRSDRC_MDDEC (1 << 1) /* Master Delay decrement */ | ||
91 | #define AT91_DDRSDRC_MDOVF (1 << 2) /* Master Delay Overflow */ | ||
92 | #define AT91_DDRSDRC_SDCOVF (1 << 3) /* Slave Delay Correction Overflow */ | ||
93 | #define AT91_DDRSDRC_SDCUDF (1 << 4) /* Slave Delay Correction Underflow */ | ||
94 | #define AT91_DDRSDRC_SDERF (1 << 5) /* Slave Delay Correction error */ | ||
95 | #define AT91_DDRSDRC_MDVAL (0xff << 8) /* Master Delay value */ | ||
96 | #define AT91_DDRSDRC_SDVAL (0xff << 16) /* Slave Delay value */ | ||
97 | #define AT91_DDRSDRC_SDCVAL (0xff << 24) /* Slave Delay Correction value */ | ||
98 | |||
99 | |||
100 | #endif | ||
diff --git a/include/asm-arm/arch-at91/at91sam926x_mc.h b/include/asm-arm/arch-at91/at91sam9_sdramc.h index d82631c251f1..d3b8b3da6b4d 100644 --- a/include/asm-arm/arch-at91/at91sam926x_mc.h +++ b/include/asm-arm/arch-at91/at91sam9_sdramc.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-at91/at91sam926x_mc.h | 2 | * include/asm-arm/arch-at91/at91sam9_sdramc.h |
3 | * | 3 | * |
4 | * Memory Controllers (SMC, SDRAMC) - System peripherals registers. | 4 | * SDRAM Controllers (SDRAMC) - System peripherals registers. |
5 | * Based on AT91SAM9261 datasheet revision D. | 5 | * Based on AT91SAM9261 datasheet revision D. |
6 | * | 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 |
@@ -10,8 +10,8 @@ | |||
10 | * (at your option) any later version. | 10 | * (at your option) any later version. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #ifndef AT91SAM926x_MC_H | 13 | #ifndef AT91SAM9_SDRAMC_H |
14 | #define AT91SAM926x_MC_H | 14 | #define AT91SAM9_SDRAMC_H |
15 | 15 | ||
16 | /* SDRAM Controller (SDRAMC) registers */ | 16 | /* SDRAM Controller (SDRAMC) registers */ |
17 | #define AT91_SDRAMC_MR (AT91_SDRAMC + 0x00) /* SDRAM Controller Mode Register */ | 17 | #define AT91_SDRAMC_MR (AT91_SDRAMC + 0x00) /* SDRAM Controller Mode Register */ |
@@ -62,7 +62,7 @@ | |||
62 | #define AT91_SDRAMC_LPCB_DEEP_POWER_DOWN 3 | 62 | #define AT91_SDRAMC_LPCB_DEEP_POWER_DOWN 3 |
63 | #define AT91_SDRAMC_PASR (7 << 4) /* Partial Array Self Refresh */ | 63 | #define AT91_SDRAMC_PASR (7 << 4) /* Partial Array Self Refresh */ |
64 | #define AT91_SDRAMC_TCSR (3 << 8) /* Temperature Compensated Self Refresh */ | 64 | #define AT91_SDRAMC_TCSR (3 << 8) /* Temperature Compensated Self Refresh */ |
65 | #define AT91_SDRAMC_DS (3 << 10) /* Drive Strenght */ | 65 | #define AT91_SDRAMC_DS (3 << 10) /* Drive Strength */ |
66 | #define AT91_SDRAMC_TIMEOUT (3 << 12) /* Time to define when Low Power Mode is enabled */ | 66 | #define AT91_SDRAMC_TIMEOUT (3 << 12) /* Time to define when Low Power Mode is enabled */ |
67 | #define AT91_SDRAMC_TIMEOUT_0_CLK_CYCLES (0 << 12) | 67 | #define AT91_SDRAMC_TIMEOUT_0_CLK_CYCLES (0 << 12) |
68 | #define AT91_SDRAMC_TIMEOUT_64_CLK_CYCLES (1 << 12) | 68 | #define AT91_SDRAMC_TIMEOUT_64_CLK_CYCLES (1 << 12) |
@@ -80,62 +80,4 @@ | |||
80 | #define AT91_SDRAMC_MD_LOW_POWER_SDRAM 1 | 80 | #define AT91_SDRAMC_MD_LOW_POWER_SDRAM 1 |
81 | 81 | ||
82 | 82 | ||
83 | /* Static Memory Controller (SMC) registers */ | ||
84 | #define AT91_SMC_SETUP(n) (AT91_SMC + 0x00 + ((n)*0x10)) /* Setup Register for CS n */ | ||
85 | #define AT91_SMC_NWESETUP (0x3f << 0) /* NWE Setup Length */ | ||
86 | #define AT91_SMC_NWESETUP_(x) ((x) << 0) | ||
87 | #define AT91_SMC_NCS_WRSETUP (0x3f << 8) /* NCS Setup Length in Write Access */ | ||
88 | #define AT91_SMC_NCS_WRSETUP_(x) ((x) << 8) | ||
89 | #define AT91_SMC_NRDSETUP (0x3f << 16) /* NRD Setup Length */ | ||
90 | #define AT91_SMC_NRDSETUP_(x) ((x) << 16) | ||
91 | #define AT91_SMC_NCS_RDSETUP (0x3f << 24) /* NCS Setup Length in Read Access */ | ||
92 | #define AT91_SMC_NCS_RDSETUP_(x) ((x) << 24) | ||
93 | |||
94 | #define AT91_SMC_PULSE(n) (AT91_SMC + 0x04 + ((n)*0x10)) /* Pulse Register for CS n */ | ||
95 | #define AT91_SMC_NWEPULSE (0x7f << 0) /* NWE Pulse Length */ | ||
96 | #define AT91_SMC_NWEPULSE_(x) ((x) << 0) | ||
97 | #define AT91_SMC_NCS_WRPULSE (0x7f << 8) /* NCS Pulse Length in Write Access */ | ||
98 | #define AT91_SMC_NCS_WRPULSE_(x)((x) << 8) | ||
99 | #define AT91_SMC_NRDPULSE (0x7f << 16) /* NRD Pulse Length */ | ||
100 | #define AT91_SMC_NRDPULSE_(x) ((x) << 16) | ||
101 | #define AT91_SMC_NCS_RDPULSE (0x7f << 24) /* NCS Pulse Length in Read Access */ | ||
102 | #define AT91_SMC_NCS_RDPULSE_(x)((x) << 24) | ||
103 | |||
104 | #define AT91_SMC_CYCLE(n) (AT91_SMC + 0x08 + ((n)*0x10)) /* Cycle Register for CS n */ | ||
105 | #define AT91_SMC_NWECYCLE (0x1ff << 0 ) /* Total Write Cycle Length */ | ||
106 | #define AT91_SMC_NWECYCLE_(x) ((x) << 0) | ||
107 | #define AT91_SMC_NRDCYCLE (0x1ff << 16) /* Total Read Cycle Length */ | ||
108 | #define AT91_SMC_NRDCYCLE_(x) ((x) << 16) | ||
109 | |||
110 | #define AT91_SMC_MODE(n) (AT91_SMC + 0x0c + ((n)*0x10)) /* Mode Register for CS n */ | ||
111 | #define AT91_SMC_READMODE (1 << 0) /* Read Mode */ | ||
112 | #define AT91_SMC_WRITEMODE (1 << 1) /* Write Mode */ | ||
113 | #define AT91_SMC_EXNWMODE (3 << 4) /* NWAIT Mode */ | ||
114 | #define AT91_SMC_EXNWMODE_DISABLE (0 << 4) | ||
115 | #define AT91_SMC_EXNWMODE_FROZEN (2 << 4) | ||
116 | #define AT91_SMC_EXNWMODE_READY (3 << 4) | ||
117 | #define AT91_SMC_BAT (1 << 8) /* Byte Access Type */ | ||
118 | #define AT91_SMC_BAT_SELECT (0 << 8) | ||
119 | #define AT91_SMC_BAT_WRITE (1 << 8) | ||
120 | #define AT91_SMC_DBW (3 << 12) /* Data Bus Width */ | ||
121 | #define AT91_SMC_DBW_8 (0 << 12) | ||
122 | #define AT91_SMC_DBW_16 (1 << 12) | ||
123 | #define AT91_SMC_DBW_32 (2 << 12) | ||
124 | #define AT91_SMC_TDF (0xf << 16) /* Data Float Time. */ | ||
125 | #define AT91_SMC_TDF_(x) ((x) << 16) | ||
126 | #define AT91_SMC_TDFMODE (1 << 20) /* TDF Optimization - Enabled */ | ||
127 | #define AT91_SMC_PMEN (1 << 24) /* Page Mode Enabled */ | ||
128 | #define AT91_SMC_PS (3 << 28) /* Page Size */ | ||
129 | #define AT91_SMC_PS_4 (0 << 28) | ||
130 | #define AT91_SMC_PS_8 (1 << 28) | ||
131 | #define AT91_SMC_PS_16 (2 << 28) | ||
132 | #define AT91_SMC_PS_32 (3 << 28) | ||
133 | |||
134 | #if defined(AT91_SMC1) /* The AT91SAM9263 has 2 Static Memory contollers */ | ||
135 | #define AT91_SMC1_SETUP(n) (AT91_SMC1 + 0x00 + ((n)*0x10)) /* Setup Register for CS n */ | ||
136 | #define AT91_SMC1_PULSE(n) (AT91_SMC1 + 0x04 + ((n)*0x10)) /* Pulse Register for CS n */ | ||
137 | #define AT91_SMC1_CYCLE(n) (AT91_SMC1 + 0x08 + ((n)*0x10)) /* Cycle Register for CS n */ | ||
138 | #define AT91_SMC1_MODE(n) (AT91_SMC1 + 0x0c + ((n)*0x10)) /* Mode Register for CS n */ | ||
139 | #endif | ||
140 | |||
141 | #endif | 83 | #endif |
diff --git a/include/asm-arm/arch-at91/at91sam9_smc.h b/include/asm-arm/arch-at91/at91sam9_smc.h new file mode 100644 index 000000000000..9e49eed31e50 --- /dev/null +++ b/include/asm-arm/arch-at91/at91sam9_smc.h | |||
@@ -0,0 +1,73 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-at91/at91sam9_smc.h | ||
3 | * | ||
4 | * Static Memory Controllers (SMC) - System peripherals registers. | ||
5 | * Based on AT91SAM9261 datasheet revision D. | ||
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 | |||
13 | #ifndef AT91SAM9_SMC_H | ||
14 | #define AT91SAM9_SMC_H | ||
15 | |||
16 | #define AT91_SMC_SETUP(n) (AT91_SMC + 0x00 + ((n)*0x10)) /* Setup Register for CS n */ | ||
17 | #define AT91_SMC_NWESETUP (0x3f << 0) /* NWE Setup Length */ | ||
18 | #define AT91_SMC_NWESETUP_(x) ((x) << 0) | ||
19 | #define AT91_SMC_NCS_WRSETUP (0x3f << 8) /* NCS Setup Length in Write Access */ | ||
20 | #define AT91_SMC_NCS_WRSETUP_(x) ((x) << 8) | ||
21 | #define AT91_SMC_NRDSETUP (0x3f << 16) /* NRD Setup Length */ | ||
22 | #define AT91_SMC_NRDSETUP_(x) ((x) << 16) | ||
23 | #define AT91_SMC_NCS_RDSETUP (0x3f << 24) /* NCS Setup Length in Read Access */ | ||
24 | #define AT91_SMC_NCS_RDSETUP_(x) ((x) << 24) | ||
25 | |||
26 | #define AT91_SMC_PULSE(n) (AT91_SMC + 0x04 + ((n)*0x10)) /* Pulse Register for CS n */ | ||
27 | #define AT91_SMC_NWEPULSE (0x7f << 0) /* NWE Pulse Length */ | ||
28 | #define AT91_SMC_NWEPULSE_(x) ((x) << 0) | ||
29 | #define AT91_SMC_NCS_WRPULSE (0x7f << 8) /* NCS Pulse Length in Write Access */ | ||
30 | #define AT91_SMC_NCS_WRPULSE_(x)((x) << 8) | ||
31 | #define AT91_SMC_NRDPULSE (0x7f << 16) /* NRD Pulse Length */ | ||
32 | #define AT91_SMC_NRDPULSE_(x) ((x) << 16) | ||
33 | #define AT91_SMC_NCS_RDPULSE (0x7f << 24) /* NCS Pulse Length in Read Access */ | ||
34 | #define AT91_SMC_NCS_RDPULSE_(x)((x) << 24) | ||
35 | |||
36 | #define AT91_SMC_CYCLE(n) (AT91_SMC + 0x08 + ((n)*0x10)) /* Cycle Register for CS n */ | ||
37 | #define AT91_SMC_NWECYCLE (0x1ff << 0 ) /* Total Write Cycle Length */ | ||
38 | #define AT91_SMC_NWECYCLE_(x) ((x) << 0) | ||
39 | #define AT91_SMC_NRDCYCLE (0x1ff << 16) /* Total Read Cycle Length */ | ||
40 | #define AT91_SMC_NRDCYCLE_(x) ((x) << 16) | ||
41 | |||
42 | #define AT91_SMC_MODE(n) (AT91_SMC + 0x0c + ((n)*0x10)) /* Mode Register for CS n */ | ||
43 | #define AT91_SMC_READMODE (1 << 0) /* Read Mode */ | ||
44 | #define AT91_SMC_WRITEMODE (1 << 1) /* Write Mode */ | ||
45 | #define AT91_SMC_EXNWMODE (3 << 4) /* NWAIT Mode */ | ||
46 | #define AT91_SMC_EXNWMODE_DISABLE (0 << 4) | ||
47 | #define AT91_SMC_EXNWMODE_FROZEN (2 << 4) | ||
48 | #define AT91_SMC_EXNWMODE_READY (3 << 4) | ||
49 | #define AT91_SMC_BAT (1 << 8) /* Byte Access Type */ | ||
50 | #define AT91_SMC_BAT_SELECT (0 << 8) | ||
51 | #define AT91_SMC_BAT_WRITE (1 << 8) | ||
52 | #define AT91_SMC_DBW (3 << 12) /* Data Bus Width */ | ||
53 | #define AT91_SMC_DBW_8 (0 << 12) | ||
54 | #define AT91_SMC_DBW_16 (1 << 12) | ||
55 | #define AT91_SMC_DBW_32 (2 << 12) | ||
56 | #define AT91_SMC_TDF (0xf << 16) /* Data Float Time. */ | ||
57 | #define AT91_SMC_TDF_(x) ((x) << 16) | ||
58 | #define AT91_SMC_TDFMODE (1 << 20) /* TDF Optimization - Enabled */ | ||
59 | #define AT91_SMC_PMEN (1 << 24) /* Page Mode Enabled */ | ||
60 | #define AT91_SMC_PS (3 << 28) /* Page Size */ | ||
61 | #define AT91_SMC_PS_4 (0 << 28) | ||
62 | #define AT91_SMC_PS_8 (1 << 28) | ||
63 | #define AT91_SMC_PS_16 (2 << 28) | ||
64 | #define AT91_SMC_PS_32 (3 << 28) | ||
65 | |||
66 | #if defined(AT91_SMC1) /* The AT91SAM9263 has 2 Static Memory contollers */ | ||
67 | #define AT91_SMC1_SETUP(n) (AT91_SMC1 + 0x00 + ((n)*0x10)) /* Setup Register for CS n */ | ||
68 | #define AT91_SMC1_PULSE(n) (AT91_SMC1 + 0x04 + ((n)*0x10)) /* Pulse Register for CS n */ | ||
69 | #define AT91_SMC1_CYCLE(n) (AT91_SMC1 + 0x08 + ((n)*0x10)) /* Cycle Register for CS n */ | ||
70 | #define AT91_SMC1_MODE(n) (AT91_SMC1 + 0x0c + ((n)*0x10)) /* Mode Register for CS n */ | ||
71 | #endif | ||
72 | |||
73 | #endif | ||
diff --git a/include/asm-arm/arch-ep93xx/gpio.h b/include/asm-arm/arch-ep93xx/gpio.h index 9b1864bbd9a8..186e7c715f8a 100644 --- a/include/asm-arm/arch-ep93xx/gpio.h +++ b/include/asm-arm/arch-ep93xx/gpio.h | |||
@@ -101,30 +101,17 @@ | |||
101 | 101 | ||
102 | /* new generic GPIO API - see Documentation/gpio.txt */ | 102 | /* new generic GPIO API - see Documentation/gpio.txt */ |
103 | 103 | ||
104 | static inline int gpio_request(unsigned gpio, const char *label) | 104 | #include <asm-generic/gpio.h> |
105 | { | ||
106 | if (gpio > EP93XX_GPIO_LINE_MAX) | ||
107 | return -EINVAL; | ||
108 | return 0; | ||
109 | } | ||
110 | 105 | ||
111 | static inline void gpio_free(unsigned gpio) | 106 | #define gpio_get_value __gpio_get_value |
112 | { | 107 | #define gpio_set_value __gpio_set_value |
113 | } | 108 | #define gpio_cansleep __gpio_cansleep |
114 | |||
115 | int gpio_direction_input(unsigned gpio); | ||
116 | int gpio_direction_output(unsigned gpio, int value); | ||
117 | int gpio_get_value(unsigned gpio); | ||
118 | void gpio_set_value(unsigned gpio, int value); | ||
119 | |||
120 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | ||
121 | 109 | ||
122 | /* | 110 | /* |
123 | * Map GPIO A0..A7 (0..7) to irq 64..71, | 111 | * Map GPIO A0..A7 (0..7) to irq 64..71, |
124 | * B0..B7 (7..15) to irq 72..79, and | 112 | * B0..B7 (7..15) to irq 72..79, and |
125 | * F0..F7 (16..24) to irq 80..87. | 113 | * F0..F7 (16..24) to irq 80..87. |
126 | */ | 114 | */ |
127 | |||
128 | static inline int gpio_to_irq(unsigned gpio) | 115 | static inline int gpio_to_irq(unsigned gpio) |
129 | { | 116 | { |
130 | if (gpio <= EP93XX_GPIO_LINE_MAX_IRQ) | 117 | if (gpio <= EP93XX_GPIO_LINE_MAX_IRQ) |
diff --git a/include/asm-arm/arch-ks8695/devices.h b/include/asm-arm/arch-ks8695/devices.h index b0364dce463f..7ad2c656e162 100644 --- a/include/asm-arm/arch-ks8695/devices.h +++ b/include/asm-arm/arch-ks8695/devices.h | |||
@@ -18,6 +18,11 @@ extern void __init ks8695_add_device_wan(void); | |||
18 | extern void __init ks8695_add_device_lan(void); | 18 | extern void __init ks8695_add_device_lan(void); |
19 | extern void __init ks8695_add_device_hpna(void); | 19 | extern void __init ks8695_add_device_hpna(void); |
20 | 20 | ||
21 | /* LEDs */ | ||
22 | extern short ks8695_leds_cpu; | ||
23 | extern short ks8695_leds_timer; | ||
24 | extern void __init ks8695_init_leds(u8 cpu_led, u8 timer_led); | ||
25 | |||
21 | /* PCI */ | 26 | /* PCI */ |
22 | #define KS8695_MODE_PCI 0 | 27 | #define KS8695_MODE_PCI 0 |
23 | #define KS8695_MODE_MINIPCI 1 | 28 | #define KS8695_MODE_MINIPCI 1 |
diff --git a/include/asm-arm/arch-mxc/board-mx31ads.h b/include/asm-arm/arch-mxc/board-mx31ads.h index be29b83ad4ae..8590127760a8 100644 --- a/include/asm-arm/arch-mxc/board-mx31ads.h +++ b/include/asm-arm/arch-mxc/board-mx31ads.h | |||
@@ -11,107 +11,77 @@ | |||
11 | #ifndef __ASM_ARCH_MXC_BOARD_MX31ADS_H__ | 11 | #ifndef __ASM_ARCH_MXC_BOARD_MX31ADS_H__ |
12 | #define __ASM_ARCH_MXC_BOARD_MX31ADS_H__ | 12 | #define __ASM_ARCH_MXC_BOARD_MX31ADS_H__ |
13 | 13 | ||
14 | /*! | 14 | /* Base address of PBC controller */ |
15 | * @name PBC Controller parameters | ||
16 | */ | ||
17 | /*! @{ */ | ||
18 | /*! | ||
19 | * Base address of PBC controller | ||
20 | */ | ||
21 | #define PBC_BASE_ADDRESS IO_ADDRESS(CS4_BASE_ADDR) | 15 | #define PBC_BASE_ADDRESS IO_ADDRESS(CS4_BASE_ADDR) |
22 | /* Offsets for the PBC Controller register */ | 16 | /* Offsets for the PBC Controller register */ |
23 | /*! | 17 | |
24 | * PBC Board status register offset | 18 | /* PBC Board status register offset */ |
25 | */ | ||
26 | #define PBC_BSTAT 0x000002 | 19 | #define PBC_BSTAT 0x000002 |
27 | /*! | 20 | |
28 | * PBC Board control register 1 set address. | 21 | /* PBC Board control register 1 set address */ |
29 | */ | ||
30 | #define PBC_BCTRL1_SET 0x000004 | 22 | #define PBC_BCTRL1_SET 0x000004 |
31 | /*! | 23 | |
32 | * PBC Board control register 1 clear address. | 24 | /* PBC Board control register 1 clear address */ |
33 | */ | ||
34 | #define PBC_BCTRL1_CLEAR 0x000006 | 25 | #define PBC_BCTRL1_CLEAR 0x000006 |
35 | /*! | 26 | |
36 | * PBC Board control register 2 set address. | 27 | /* PBC Board control register 2 set address */ |
37 | */ | ||
38 | #define PBC_BCTRL2_SET 0x000008 | 28 | #define PBC_BCTRL2_SET 0x000008 |
39 | /*! | 29 | |
40 | * PBC Board control register 2 clear address. | 30 | /* PBC Board control register 2 clear address */ |
41 | */ | ||
42 | #define PBC_BCTRL2_CLEAR 0x00000A | 31 | #define PBC_BCTRL2_CLEAR 0x00000A |
43 | /*! | 32 | |
44 | * PBC Board control register 3 set address. | 33 | /* PBC Board control register 3 set address */ |
45 | */ | ||
46 | #define PBC_BCTRL3_SET 0x00000C | 34 | #define PBC_BCTRL3_SET 0x00000C |
47 | /*! | 35 | |
48 | * PBC Board control register 3 clear address. | 36 | /* PBC Board control register 3 clear address */ |
49 | */ | ||
50 | #define PBC_BCTRL3_CLEAR 0x00000E | 37 | #define PBC_BCTRL3_CLEAR 0x00000E |
51 | /*! | 38 | |
52 | * PBC Board control register 4 set address. | 39 | /* PBC Board control register 4 set address */ |
53 | */ | ||
54 | #define PBC_BCTRL4_SET 0x000010 | 40 | #define PBC_BCTRL4_SET 0x000010 |
55 | /*! | 41 | |
56 | * PBC Board control register 4 clear address. | 42 | /* PBC Board control register 4 clear address */ |
57 | */ | ||
58 | #define PBC_BCTRL4_CLEAR 0x000012 | 43 | #define PBC_BCTRL4_CLEAR 0x000012 |
59 | /*! | 44 | |
60 | * PBC Board status register 1. | 45 | /* PBC Board status register 1 */ |
61 | */ | ||
62 | #define PBC_BSTAT1 0x000014 | 46 | #define PBC_BSTAT1 0x000014 |
63 | /*! | 47 | |
64 | * PBC Board interrupt status register. | 48 | /* PBC Board interrupt status register */ |
65 | */ | ||
66 | #define PBC_INTSTATUS 0x000016 | 49 | #define PBC_INTSTATUS 0x000016 |
67 | /*! | 50 | |
68 | * PBC Board interrupt current status register. | 51 | /* PBC Board interrupt current status register */ |
69 | */ | ||
70 | #define PBC_INTCURR_STATUS 0x000018 | 52 | #define PBC_INTCURR_STATUS 0x000018 |
71 | /*! | 53 | |
72 | * PBC Interrupt mask register set address. | 54 | /* PBC Interrupt mask register set address */ |
73 | */ | ||
74 | #define PBC_INTMASK_SET 0x00001A | 55 | #define PBC_INTMASK_SET 0x00001A |
75 | /*! | 56 | |
76 | * PBC Interrupt mask register clear address. | 57 | /* PBC Interrupt mask register clear address */ |
77 | */ | ||
78 | #define PBC_INTMASK_CLEAR 0x00001C | 58 | #define PBC_INTMASK_CLEAR 0x00001C |
79 | 59 | ||
80 | /*! | 60 | /* External UART A */ |
81 | * External UART A. | ||
82 | */ | ||
83 | #define PBC_SC16C652_UARTA 0x010000 | 61 | #define PBC_SC16C652_UARTA 0x010000 |
84 | /*! | 62 | |
85 | * External UART B. | 63 | /* External UART B */ |
86 | */ | ||
87 | #define PBC_SC16C652_UARTB 0x010010 | 64 | #define PBC_SC16C652_UARTB 0x010010 |
88 | /*! | 65 | |
89 | * Ethernet Controller IO base address. | 66 | /* Ethernet Controller IO base address */ |
90 | */ | ||
91 | #define PBC_CS8900A_IOBASE 0x020000 | 67 | #define PBC_CS8900A_IOBASE 0x020000 |
92 | /*! | 68 | |
93 | * Ethernet Controller Memory base address. | 69 | /* Ethernet Controller Memory base address */ |
94 | */ | ||
95 | #define PBC_CS8900A_MEMBASE 0x021000 | 70 | #define PBC_CS8900A_MEMBASE 0x021000 |
96 | /*! | 71 | |
97 | * Ethernet Controller DMA base address. | 72 | /* Ethernet Controller DMA base address */ |
98 | */ | ||
99 | #define PBC_CS8900A_DMABASE 0x022000 | 73 | #define PBC_CS8900A_DMABASE 0x022000 |
100 | /*! | 74 | |
101 | * External chip select 0. | 75 | /* External chip select 0 */ |
102 | */ | ||
103 | #define PBC_XCS0 0x040000 | 76 | #define PBC_XCS0 0x040000 |
104 | /*! | 77 | |
105 | * LCD Display enable. | 78 | /* LCD Display enable */ |
106 | */ | ||
107 | #define PBC_LCD_EN_B 0x060000 | 79 | #define PBC_LCD_EN_B 0x060000 |
108 | /*! | 80 | |
109 | * Code test debug enable. | 81 | /* Code test debug enable */ |
110 | */ | ||
111 | #define PBC_CODE_B 0x070000 | 82 | #define PBC_CODE_B 0x070000 |
112 | /*! | 83 | |
113 | * PSRAM memory select. | 84 | /* PSRAM memory select */ |
114 | */ | ||
115 | #define PBC_PSRAM_B 0x5000000 | 85 | #define PBC_PSRAM_B 0x5000000 |
116 | 86 | ||
117 | #define PBC_INTSTATUS_REG (PBC_INTSTATUS + PBC_BASE_ADDRESS) | 87 | #define PBC_INTSTATUS_REG (PBC_INTSTATUS + PBC_BASE_ADDRESS) |
@@ -139,4 +109,4 @@ | |||
139 | 109 | ||
140 | #define MXC_MAX_EXP_IO_LINES 16 | 110 | #define MXC_MAX_EXP_IO_LINES 16 |
141 | 111 | ||
142 | #endif /* __ASM_ARCH_MXC_BOARD_MX31ADS_H__ */ | 112 | #endif /* __ASM_ARCH_MXC_BOARD_MX31ADS_H__ */ |
diff --git a/include/asm-arm/arch-mxc/dma.h b/include/asm-arm/arch-mxc/dma.h index 65e639d51d2b..c822d569a05e 100644 --- a/include/asm-arm/arch-mxc/dma.h +++ b/include/asm-arm/arch-mxc/dma.h | |||
@@ -11,11 +11,4 @@ | |||
11 | #ifndef __ASM_ARCH_MXC_DMA_H__ | 11 | #ifndef __ASM_ARCH_MXC_DMA_H__ |
12 | #define __ASM_ARCH_MXC_DMA_H__ | 12 | #define __ASM_ARCH_MXC_DMA_H__ |
13 | 13 | ||
14 | /*! | ||
15 | * @file dma.h | ||
16 | * @brief This file contains Unified DMA API for all MXC platforms. | ||
17 | * The API is platform independent. | ||
18 | * | ||
19 | * @ingroup SDMA | ||
20 | */ | ||
21 | #endif | 14 | #endif |
diff --git a/include/asm-arm/arch-mxc/hardware.h b/include/asm-arm/arch-mxc/hardware.h index 3c09b92fef0d..e87ff0679d5e 100644 --- a/include/asm-arm/arch-mxc/hardware.h +++ b/include/asm-arm/arch-mxc/hardware.h | |||
@@ -8,45 +8,24 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | /*! | ||
12 | * @file hardware.h | ||
13 | * @brief This file contains the hardware definitions of the board. | ||
14 | * | ||
15 | * @ingroup System | ||
16 | */ | ||
17 | #ifndef __ASM_ARCH_MXC_HARDWARE_H__ | 11 | #ifndef __ASM_ARCH_MXC_HARDWARE_H__ |
18 | #define __ASM_ARCH_MXC_HARDWARE_H__ | 12 | #define __ASM_ARCH_MXC_HARDWARE_H__ |
19 | 13 | ||
20 | #include <asm/sizes.h> | 14 | #include <asm/sizes.h> |
21 | 15 | ||
22 | #include <asm/arch/mx31.h> | 16 | #ifdef CONFIG_ARCH_MX3 |
17 | # include <asm/arch/mx31.h> | ||
18 | #endif | ||
23 | 19 | ||
24 | #include <asm/arch/mxc.h> | 20 | #include <asm/arch/mxc.h> |
25 | 21 | ||
26 | #define MXC_MAX_GPIO_LINES (GPIO_NUM_PIN * GPIO_PORT_NUM) | ||
27 | |||
28 | /* | 22 | /* |
29 | * --------------------------------------------------------------------------- | 23 | * --------------------------------------------------------------------------- |
30 | * Board specific defines | 24 | * Board specific defines |
31 | * --------------------------------------------------------------------------- | 25 | * --------------------------------------------------------------------------- |
32 | */ | 26 | */ |
33 | #define MXC_EXP_IO_BASE (MXC_GPIO_INT_BASE + MXC_MAX_GPIO_LINES) | 27 | #ifdef CONFIG_MACH_MX31ADS |
34 | 28 | # include <asm/arch/board-mx31ads.h> | |
35 | #include <asm/arch/board-mx31ads.h> | ||
36 | |||
37 | #ifndef MXC_MAX_EXP_IO_LINES | ||
38 | #define MXC_MAX_EXP_IO_LINES 0 | ||
39 | #endif | 29 | #endif |
40 | 30 | ||
41 | #define MXC_MAX_VIRTUAL_INTS 16 | 31 | #endif /* __ASM_ARCH_MXC_HARDWARE_H__ */ |
42 | #define MXC_VIRTUAL_INTS_BASE (MXC_EXP_IO_BASE + MXC_MAX_EXP_IO_LINES) | ||
43 | #define MXC_SDIO1_CARD_IRQ MXC_VIRTUAL_INTS_BASE | ||
44 | #define MXC_SDIO2_CARD_IRQ (MXC_VIRTUAL_INTS_BASE + 1) | ||
45 | #define MXC_SDIO3_CARD_IRQ (MXC_VIRTUAL_INTS_BASE + 2) | ||
46 | |||
47 | #define MXC_MAX_INTS (MXC_MAX_INT_LINES + \ | ||
48 | MXC_MAX_GPIO_LINES + \ | ||
49 | MXC_MAX_EXP_IO_LINES + \ | ||
50 | MXC_MAX_VIRTUAL_INTS) | ||
51 | |||
52 | #endif /* __ASM_ARCH_MXC_HARDWARE_H__ */ | ||
diff --git a/include/asm-arm/arch-mxc/io.h b/include/asm-arm/arch-mxc/io.h index cf6c83a4b9f7..65b6810124c1 100644 --- a/include/asm-arm/arch-mxc/io.h +++ b/include/asm-arm/arch-mxc/io.h | |||
@@ -8,24 +8,13 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | /*! | ||
12 | * @file io.h | ||
13 | * @brief This file contains some memory mapping macros. | ||
14 | * @note There is no real ISA or PCI buses. But have to define these macros | ||
15 | * for some drivers to compile. | ||
16 | * | ||
17 | * @ingroup System | ||
18 | */ | ||
19 | |||
20 | #ifndef __ASM_ARCH_MXC_IO_H__ | 11 | #ifndef __ASM_ARCH_MXC_IO_H__ |
21 | #define __ASM_ARCH_MXC_IO_H__ | 12 | #define __ASM_ARCH_MXC_IO_H__ |
22 | 13 | ||
23 | /*! Allow IO space to be anywhere in the memory */ | 14 | /* Allow IO space to be anywhere in the memory */ |
24 | #define IO_SPACE_LIMIT 0xffffffff | 15 | #define IO_SPACE_LIMIT 0xffffffff |
25 | 16 | ||
26 | /*! | 17 | /* io address mapping macro */ |
27 | * io address mapping macro | ||
28 | */ | ||
29 | #define __io(a) ((void __iomem *)(a)) | 18 | #define __io(a) ((void __iomem *)(a)) |
30 | 19 | ||
31 | #define __mem_pci(a) (a) | 20 | #define __mem_pci(a) (a) |
diff --git a/include/asm-arm/arch-mxc/irqs.h b/include/asm-arm/arch-mxc/irqs.h index e4686c6bc4bf..b2c5205e1962 100644 --- a/include/asm-arm/arch-mxc/irqs.h +++ b/include/asm-arm/arch-mxc/irqs.h | |||
@@ -13,26 +13,17 @@ | |||
13 | 13 | ||
14 | #include <asm/hardware.h> | 14 | #include <asm/hardware.h> |
15 | 15 | ||
16 | /*! | ||
17 | * @file irqs.h | ||
18 | * @brief This file defines the number of normal interrupts and fast interrupts | ||
19 | * | ||
20 | * @ingroup Interrupt | ||
21 | */ | ||
22 | |||
23 | #define MXC_IRQ_TO_EXPIO(irq) ((irq) - MXC_EXP_IO_BASE) | 16 | #define MXC_IRQ_TO_EXPIO(irq) ((irq) - MXC_EXP_IO_BASE) |
24 | 17 | ||
25 | #define MXC_IRQ_TO_GPIO(irq) ((irq) - MXC_GPIO_INT_BASE) | 18 | #define MXC_IRQ_TO_GPIO(irq) ((irq) - MXC_GPIO_INT_BASE) |
26 | #define MXC_GPIO_TO_IRQ(x) (MXC_GPIO_INT_BASE + x) | 19 | #define MXC_GPIO_TO_IRQ(x) (MXC_GPIO_INT_BASE + x) |
27 | 20 | ||
28 | /*! | 21 | /* Number of normal interrupts */ |
29 | * Number of normal interrupts | 22 | #define NR_IRQS (MXC_MAX_INT_LINES + \ |
30 | */ | 23 | MXC_MAX_GPIO_LINES + \ |
31 | #define NR_IRQS MXC_MAX_INTS | 24 | MXC_MAX_VIRTUAL_INTS) |
32 | 25 | ||
33 | /*! | 26 | /* Number of fast interrupts */ |
34 | * Number of fast interrupts | ||
35 | */ | ||
36 | #define NR_FIQS MXC_MAX_INTS | 27 | #define NR_FIQS MXC_MAX_INTS |
37 | 28 | ||
38 | #endif /* __ASM_ARCH_MXC_IRQS_H__ */ | 29 | #endif /* __ASM_ARCH_MXC_IRQS_H__ */ |
diff --git a/include/asm-arm/arch-mxc/memory.h b/include/asm-arm/arch-mxc/memory.h index c89aac83a407..059f83023a10 100644 --- a/include/asm-arm/arch-mxc/memory.h +++ b/include/asm-arm/arch-mxc/memory.h | |||
@@ -13,24 +13,17 @@ | |||
13 | 13 | ||
14 | #include <asm/hardware.h> | 14 | #include <asm/hardware.h> |
15 | 15 | ||
16 | /*! | 16 | /* |
17 | * @file memory.h | ||
18 | * @brief This file contains macros needed by the Linux kernel and drivers. | ||
19 | * | ||
20 | * @ingroup Memory | ||
21 | */ | ||
22 | |||
23 | /*! | ||
24 | * Virtual view <-> DMA view memory address translations | 17 | * Virtual view <-> DMA view memory address translations |
25 | * This macro is used to translate the virtual address to an address | 18 | * This macro is used to translate the virtual address to an address |
26 | * suitable to be passed to set_dma_addr() | 19 | * suitable to be passed to set_dma_addr() |
27 | */ | 20 | */ |
28 | #define __virt_to_bus(a) __virt_to_phys(a) | 21 | #define __virt_to_bus(a) __virt_to_phys(a) |
29 | 22 | ||
30 | /*! | 23 | /* |
31 | * Used to convert an address for DMA operations to an address that the | 24 | * Used to convert an address for DMA operations to an address that the |
32 | * kernel can use. | 25 | * kernel can use. |
33 | */ | 26 | */ |
34 | #define __bus_to_virt(a) __phys_to_virt(a) | 27 | #define __bus_to_virt(a) __phys_to_virt(a) |
35 | 28 | ||
36 | #endif /* __ASM_ARCH_MXC_MEMORY_H__ */ | 29 | #endif /* __ASM_ARCH_MXC_MEMORY_H__ */ |
diff --git a/include/asm-arm/arch-mxc/mx31.h b/include/asm-arm/arch-mxc/mx31.h index 85c49c9e5d15..36a1af495bb3 100644 --- a/include/asm-arm/arch-mxc/mx31.h +++ b/include/asm-arm/arch-mxc/mx31.h | |||
@@ -317,6 +317,8 @@ | |||
317 | #define MXC_MAX_INT_LINES 64 | 317 | #define MXC_MAX_INT_LINES 64 |
318 | 318 | ||
319 | #define MXC_GPIO_INT_BASE MXC_MAX_INT_LINES | 319 | #define MXC_GPIO_INT_BASE MXC_MAX_INT_LINES |
320 | #define MXC_MAX_GPIO_LINES (GPIO_NUM_PIN * GPIO_PORT_NUM) | ||
321 | #define MXC_MAX_VIRTUAL_INTS 16 | ||
320 | 322 | ||
321 | /*! | 323 | /*! |
322 | * Number of GPIO port as defined in the IC Spec | 324 | * Number of GPIO port as defined in the IC Spec |
@@ -329,7 +331,33 @@ | |||
329 | 331 | ||
330 | #define PROD_SIGNATURE 0x1 /* For MX31 */ | 332 | #define PROD_SIGNATURE 0x1 /* For MX31 */ |
331 | 333 | ||
334 | /* silicon revisions specific to i.MX31 */ | ||
335 | #define CHIP_REV_1_0 0x10 | ||
336 | #define CHIP_REV_1_1 0x11 | ||
337 | #define CHIP_REV_1_2 0x12 | ||
338 | #define CHIP_REV_1_3 0x13 | ||
339 | #define CHIP_REV_2_0 0x20 | ||
340 | #define CHIP_REV_2_1 0x21 | ||
341 | #define CHIP_REV_2_2 0x22 | ||
342 | #define CHIP_REV_2_3 0x23 | ||
343 | #define CHIP_REV_3_0 0x30 | ||
344 | #define CHIP_REV_3_1 0x31 | ||
345 | #define CHIP_REV_3_2 0x32 | ||
346 | |||
332 | #define SYSTEM_REV_MIN CHIP_REV_1_0 | 347 | #define SYSTEM_REV_MIN CHIP_REV_1_0 |
333 | #define SYSTEM_REV_NUM 3 | 348 | #define SYSTEM_REV_NUM 3 |
334 | 349 | ||
335 | #endif /* __ASM_ARCH_MXC_MX31_H__ */ | 350 | #if !defined(__ASSEMBLY__) && !defined(__MXC_BOOT_UNCOMPRESS) |
351 | |||
352 | /* this is a i.MX31 CPU */ | ||
353 | #define cpu_is_mx31() (1) | ||
354 | |||
355 | extern unsigned int system_rev; | ||
356 | |||
357 | static inline int mx31_revision(void) | ||
358 | { | ||
359 | return system_rev; | ||
360 | } | ||
361 | #endif | ||
362 | |||
363 | #endif /* __ASM_ARCH_MXC_MX31_H__ */ | ||
diff --git a/include/asm-arm/arch-mxc/mxc.h b/include/asm-arm/arch-mxc/mxc.h index 0837f1f9ca31..146d3f60951a 100644 --- a/include/asm-arm/arch-mxc/mxc.h +++ b/include/asm-arm/arch-mxc/mxc.h | |||
@@ -15,6 +15,11 @@ | |||
15 | #error "Do not include directly." | 15 | #error "Do not include directly." |
16 | #endif | 16 | #endif |
17 | 17 | ||
18 | /* clean up all things that are not used */ | ||
19 | #ifndef CONFIG_ARCH_MX3 | ||
20 | # define cpu_is_mx31() (0) | ||
21 | #endif | ||
22 | |||
18 | /* | 23 | /* |
19 | ***************************************** | 24 | ***************************************** |
20 | * GPT Register definitions * | 25 | * GPT Register definitions * |
@@ -31,9 +36,7 @@ | |||
31 | #define MXC_GPT_GPTICR2 IO_ADDRESS(GPT1_BASE_ADDR + 0x20) | 36 | #define MXC_GPT_GPTICR2 IO_ADDRESS(GPT1_BASE_ADDR + 0x20) |
32 | #define MXC_GPT_GPTCNT IO_ADDRESS(GPT1_BASE_ADDR + 0x24) | 37 | #define MXC_GPT_GPTCNT IO_ADDRESS(GPT1_BASE_ADDR + 0x24) |
33 | 38 | ||
34 | /*! | 39 | /* GPT Control register bit definitions */ |
35 | * GPT Control register bit definitions | ||
36 | */ | ||
37 | #define GPTCR_FO3 (1 << 31) | 40 | #define GPTCR_FO3 (1 << 31) |
38 | #define GPTCR_FO2 (1 << 30) | 41 | #define GPTCR_FO2 (1 << 30) |
39 | #define GPTCR_FO1 (1 << 29) | 42 | #define GPTCR_FO1 (1 << 29) |
@@ -146,4 +149,4 @@ | |||
146 | #define IIM_PROD_REV_SH 3 | 149 | #define IIM_PROD_REV_SH 3 |
147 | #define IIM_PROD_REV_LEN 5 | 150 | #define IIM_PROD_REV_LEN 5 |
148 | 151 | ||
149 | #endif /* __ASM_ARCH_MXC_H__ */ | 152 | #endif /* __ASM_ARCH_MXC_H__ */ |
diff --git a/include/asm-arm/arch-mxc/system.h b/include/asm-arm/arch-mxc/system.h index 109956b41aca..bbfc37465fc5 100644 --- a/include/asm-arm/arch-mxc/system.h +++ b/include/asm-arm/arch-mxc/system.h | |||
@@ -21,30 +21,14 @@ | |||
21 | #ifndef __ASM_ARCH_MXC_SYSTEM_H__ | 21 | #ifndef __ASM_ARCH_MXC_SYSTEM_H__ |
22 | #define __ASM_ARCH_MXC_SYSTEM_H__ | 22 | #define __ASM_ARCH_MXC_SYSTEM_H__ |
23 | 23 | ||
24 | /*! | ||
25 | * @file system.h | ||
26 | * @brief This file contains idle and reset functions. | ||
27 | * | ||
28 | * @ingroup System | ||
29 | */ | ||
30 | |||
31 | /*! | ||
32 | * This function puts the CPU into idle mode. It is called by default_idle() | ||
33 | * in process.c file. | ||
34 | */ | ||
35 | static inline void arch_idle(void) | 24 | static inline void arch_idle(void) |
36 | { | 25 | { |
37 | cpu_do_idle(); | 26 | cpu_do_idle(); |
38 | } | 27 | } |
39 | 28 | ||
40 | /* | ||
41 | * This function resets the system. It is called by machine_restart(). | ||
42 | * | ||
43 | * @param mode indicates different kinds of resets | ||
44 | */ | ||
45 | static inline void arch_reset(char mode) | 29 | static inline void arch_reset(char mode) |
46 | { | 30 | { |
47 | cpu_reset(0); | 31 | cpu_reset(0); |
48 | } | 32 | } |
49 | 33 | ||
50 | #endif /* __ASM_ARCH_MXC_SYSTEM_H__ */ | 34 | #endif /* __ASM_ARCH_MXC_SYSTEM_H__ */ |
diff --git a/include/asm-arm/arch-mxc/vmalloc.h b/include/asm-arm/arch-mxc/vmalloc.h index 83a73da895eb..62d97623412f 100644 --- a/include/asm-arm/arch-mxc/vmalloc.h +++ b/include/asm-arm/arch-mxc/vmalloc.h | |||
@@ -20,17 +20,7 @@ | |||
20 | #ifndef __ASM_ARCH_MXC_VMALLOC_H__ | 20 | #ifndef __ASM_ARCH_MXC_VMALLOC_H__ |
21 | #define __ASM_ARCH_MXC_VMALLOC_H__ | 21 | #define __ASM_ARCH_MXC_VMALLOC_H__ |
22 | 22 | ||
23 | /*! | 23 | /* vmalloc ending address */ |
24 | * @file vmalloc.h | ||
25 | * | ||
26 | * @brief This file contains platform specific macros for vmalloc. | ||
27 | * | ||
28 | * @ingroup System | ||
29 | */ | ||
30 | |||
31 | /*! | ||
32 | * vmalloc ending address | ||
33 | */ | ||
34 | #define VMALLOC_END 0xF4000000 | 24 | #define VMALLOC_END 0xF4000000 |
35 | 25 | ||
36 | #endif /* __ASM_ARCH_MXC_VMALLOC_H__ */ | 26 | #endif /* __ASM_ARCH_MXC_VMALLOC_H__ */ |
diff --git a/include/asm-arm/arch-ns9xxx/board.h b/include/asm-arm/arch-ns9xxx/board.h index 716f34fdb716..e57443bdbbd9 100644 --- a/include/asm-arm/arch-ns9xxx/board.h +++ b/include/asm-arm/arch-ns9xxx/board.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-ns9xxx/board.h | 2 | * include/asm-arm/arch-ns9xxx/board.h |
3 | * | 3 | * |
4 | * Copyright (C) 2006 by Digi International Inc. | 4 | * Copyright (C) 2006,2007 by Digi International Inc. |
5 | * All rights reserved. | 5 | * All rights reserved. |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify it | 7 | * This program is free software; you can redistribute it and/or modify it |
@@ -13,8 +13,30 @@ | |||
13 | 13 | ||
14 | #include <asm/mach-types.h> | 14 | #include <asm/mach-types.h> |
15 | 15 | ||
16 | #define board_is_a9m9750dev() (machine_is_cc9p9360dev()) | 16 | #define board_is_a9m9750dev() (0 \ |
17 | || machine_is_cc9p9360dev() \ | ||
18 | || machine_is_cc9p9750dev() \ | ||
19 | ) | ||
17 | 20 | ||
18 | #define board_is_jscc9p9360() (machine_is_cc9p9360js()) | 21 | #define board_is_a9mvali() (0 \ |
22 | || machine_is_cc9p9360val() \ | ||
23 | || machine_is_cc9p9750val() \ | ||
24 | ) | ||
25 | |||
26 | #define board_is_jscc9p9210() (0 \ | ||
27 | || machine_is_cc9p9210js() \ | ||
28 | ) | ||
29 | |||
30 | #define board_is_jscc9p9215() (0 \ | ||
31 | || machine_is_cc9p9215js() \ | ||
32 | ) | ||
33 | |||
34 | #define board_is_jscc9p9360() (0 \ | ||
35 | || machine_is_cc9p9360js() \ | ||
36 | ) | ||
37 | |||
38 | #define board_is_uncbas() (0 \ | ||
39 | || machine_is_cc7ucamry() \ | ||
40 | ) | ||
19 | 41 | ||
20 | #endif /* ifndef __ASM_ARCH_BOARD_H */ | 42 | #endif /* ifndef __ASM_ARCH_BOARD_H */ |
diff --git a/include/asm-arm/arch-ns9xxx/clock.h b/include/asm-arm/arch-ns9xxx/clock.h deleted file mode 100644 index b943d3a92a1d..000000000000 --- a/include/asm-arm/arch-ns9xxx/clock.h +++ /dev/null | |||
@@ -1,71 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ns9xxx/clock.h | ||
3 | * | ||
4 | * Copyright (C) 2007 by Digi International Inc. | ||
5 | * All rights reserved. | ||
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 version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_CLOCK_H | ||
12 | #define __ASM_ARCH_CLOCK_H | ||
13 | |||
14 | #include <asm/arch-ns9xxx/regs-sys.h> | ||
15 | |||
16 | #define CRYSTAL 29491200 /* Hz */ | ||
17 | |||
18 | /* The HRM calls this value f_vco */ | ||
19 | static inline u32 ns9xxx_systemclock(void) __attribute__((const)); | ||
20 | static inline u32 ns9xxx_systemclock(void) | ||
21 | { | ||
22 | u32 pll = __raw_readl(SYS_PLL); | ||
23 | |||
24 | /* | ||
25 | * The system clock should be a multiple of HZ * TIMERCLOCKSELECT (in | ||
26 | * time.c). | ||
27 | * | ||
28 | * The following values are given: | ||
29 | * - TIMERCLOCKSELECT == 2^i for an i in {0 .. 6} | ||
30 | * - CRYSTAL == 29491200 == 2^17 * 3^2 * 5^2 | ||
31 | * - ND in {0 .. 31} | ||
32 | * - FS in {0 .. 3} | ||
33 | * | ||
34 | * Assuming the worst, we consider: | ||
35 | * - TIMERCLOCKSELECT == 64 | ||
36 | * - ND == 0 | ||
37 | * - FS == 3 | ||
38 | * | ||
39 | * So HZ should be a divisor of: | ||
40 | * (CRYSTAL * (ND + 1) >> FS) / TIMERCLOCKSELECT | ||
41 | * == (2^17 * 3^2 * 5^2 * 1 >> 3) / 64 | ||
42 | * == 2^8 * 3^2 * 5^2 | ||
43 | * == 57600 | ||
44 | * | ||
45 | * Currently HZ is defined to be 100 for this platform. | ||
46 | * | ||
47 | * Fine. | ||
48 | */ | ||
49 | return CRYSTAL * (REGGETIM(pll, SYS_PLL, ND) + 1) | ||
50 | >> REGGETIM(pll, SYS_PLL, FS); | ||
51 | } | ||
52 | |||
53 | static inline u32 ns9xxx_cpuclock(void) __attribute__((const)); | ||
54 | static inline u32 ns9xxx_cpuclock(void) | ||
55 | { | ||
56 | return ns9xxx_systemclock() / 2; | ||
57 | } | ||
58 | |||
59 | static inline u32 ns9xxx_ahbclock(void) __attribute__((const)); | ||
60 | static inline u32 ns9xxx_ahbclock(void) | ||
61 | { | ||
62 | return ns9xxx_systemclock() / 4; | ||
63 | } | ||
64 | |||
65 | static inline u32 ns9xxx_bbusclock(void) __attribute__((const)); | ||
66 | static inline u32 ns9xxx_bbusclock(void) | ||
67 | { | ||
68 | return ns9xxx_systemclock() / 8; | ||
69 | } | ||
70 | |||
71 | #endif /* ifndef __ASM_ARCH_CLOCK_H */ | ||
diff --git a/include/asm-arm/arch-ns9xxx/entry-macro.S b/include/asm-arm/arch-ns9xxx/entry-macro.S index 86aec87303e4..89a21c530468 100644 --- a/include/asm-arm/arch-ns9xxx/entry-macro.S +++ b/include/asm-arm/arch-ns9xxx/entry-macro.S | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-ns9xxx/entry-macro.S | 2 | * include/asm-arm/arch-ns9xxx/entry-macro.S |
3 | * | 3 | * |
4 | * Copyright (C) 2006 by Digi International Inc. | 4 | * Copyright (C) 2006,2007 by Digi International Inc. |
5 | * All rights reserved. | 5 | * All rights reserved. |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify it | 7 | * This program is free software; you can redistribute it and/or modify it |
@@ -9,16 +9,16 @@ | |||
9 | * the Free Software Foundation. | 9 | * the Free Software Foundation. |
10 | */ | 10 | */ |
11 | #include <asm/hardware.h> | 11 | #include <asm/hardware.h> |
12 | #include <asm/arch-ns9xxx/regs-sys.h> | 12 | #include <asm/arch-ns9xxx/regs-sys-common.h> |
13 | 13 | ||
14 | .macro get_irqnr_preamble, base, tmp | 14 | .macro get_irqnr_preamble, base, tmp |
15 | ldr \base, =SYS_ISRADDR | ||
15 | .endm | 16 | .endm |
16 | 17 | ||
17 | .macro arch_ret_to_user, tmp1, tmp2 | 18 | .macro arch_ret_to_user, tmp1, tmp2 |
18 | .endm | 19 | .endm |
19 | 20 | ||
20 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 21 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
21 | ldr \base, =SYS_ISRADDR | ||
22 | ldr \irqstat, [\base, #(SYS_ISA - SYS_ISRADDR)] | 22 | ldr \irqstat, [\base, #(SYS_ISA - SYS_ISRADDR)] |
23 | cmp \irqstat, #0 | 23 | cmp \irqstat, #0 |
24 | ldrne \irqnr, [\base] | 24 | ldrne \irqnr, [\base] |
diff --git a/include/asm-arm/arch-ns9xxx/irqs.h b/include/asm-arm/arch-ns9xxx/irqs.h index 25d8d28b27f3..e83d48ec42c9 100644 --- a/include/asm-arm/arch-ns9xxx/irqs.h +++ b/include/asm-arm/arch-ns9xxx/irqs.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-ns9xxx/irqs.h | 2 | * include/asm-arm/arch-ns9xxx/irqs.h |
3 | * | 3 | * |
4 | * Copyright (C) 2006 by Digi International Inc. | 4 | * Copyright (C) 2006,2007 by Digi International Inc. |
5 | * All rights reserved. | 5 | * All rights reserved. |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify it | 7 | * This program is free software; you can redistribute it and/or modify it |
@@ -11,38 +11,39 @@ | |||
11 | #ifndef __ASM_ARCH_IRQS_H | 11 | #ifndef __ASM_ARCH_IRQS_H |
12 | #define __ASM_ARCH_IRQS_H | 12 | #define __ASM_ARCH_IRQS_H |
13 | 13 | ||
14 | #define IRQ_WATCHDOG 0 | 14 | /* NetSilicon 9360 */ |
15 | #define IRQ_AHBBUSERR 1 | 15 | #define IRQ_NS9XXX_WATCHDOG 0 |
16 | #define IRQ_BBUSAGG 2 | 16 | #define IRQ_NS9XXX_AHBBUSERR 1 |
17 | #define IRQ_NS9360_BBUSAGG 2 | ||
17 | /* irq 3 is reserved for NS9360 */ | 18 | /* irq 3 is reserved for NS9360 */ |
18 | #define IRQ_ETHRX 4 | 19 | #define IRQ_NS9XXX_ETHRX 4 |
19 | #define IRQ_ETHTX 5 | 20 | #define IRQ_NS9XXX_ETHTX 5 |
20 | #define IRQ_ETHPHY 6 | 21 | #define IRQ_NS9XXX_ETHPHY 6 |
21 | #define IRQ_LCD 7 | 22 | #define IRQ_NS9360_LCD 7 |
22 | #define IRQ_SERBRX 8 | 23 | #define IRQ_NS9360_SERBRX 8 |
23 | #define IRQ_SERBTX 9 | 24 | #define IRQ_NS9360_SERBTX 9 |
24 | #define IRQ_SERARX 10 | 25 | #define IRQ_NS9360_SERARX 10 |
25 | #define IRQ_SERATX 11 | 26 | #define IRQ_NS9360_SERATX 11 |
26 | #define IRQ_SERCRX 12 | 27 | #define IRQ_NS9360_SERCRX 12 |
27 | #define IRQ_SERCTX 13 | 28 | #define IRQ_NS9360_SERCTX 13 |
28 | #define IRQ_I2C 14 | 29 | #define IRQ_NS9360_I2C 14 |
29 | #define IRQ_BBUSDMA 15 | 30 | #define IRQ_NS9360_BBUSDMA 15 |
30 | #define IRQ_TIMER0 16 | 31 | #define IRQ_NS9360_TIMER0 16 |
31 | #define IRQ_TIMER1 17 | 32 | #define IRQ_NS9360_TIMER1 17 |
32 | #define IRQ_TIMER2 18 | 33 | #define IRQ_NS9360_TIMER2 18 |
33 | #define IRQ_TIMER3 19 | 34 | #define IRQ_NS9360_TIMER3 19 |
34 | #define IRQ_TIMER4 20 | 35 | #define IRQ_NS9360_TIMER4 20 |
35 | #define IRQ_TIMER5 21 | 36 | #define IRQ_NS9360_TIMER5 21 |
36 | #define IRQ_TIMER6 22 | 37 | #define IRQ_NS9360_TIMER6 22 |
37 | #define IRQ_TIMER7 23 | 38 | #define IRQ_NS9360_TIMER7 23 |
38 | #define IRQ_RTC 24 | 39 | #define IRQ_NS9360_RTC 24 |
39 | #define IRQ_USBHOST 25 | 40 | #define IRQ_NS9360_USBHOST 25 |
40 | #define IRQ_USBDEVICE 26 | 41 | #define IRQ_NS9360_USBDEVICE 26 |
41 | #define IRQ_IEEE1284 27 | 42 | #define IRQ_NS9360_IEEE1284 27 |
42 | #define IRQ_EXT0 28 | 43 | #define IRQ_NS9XXX_EXT0 28 |
43 | #define IRQ_EXT1 29 | 44 | #define IRQ_NS9XXX_EXT1 29 |
44 | #define IRQ_EXT2 30 | 45 | #define IRQ_NS9XXX_EXT2 30 |
45 | #define IRQ_EXT3 31 | 46 | #define IRQ_NS9XXX_EXT3 31 |
46 | 47 | ||
47 | #define BBUS_IRQ(irq) (32 + irq) | 48 | #define BBUS_IRQ(irq) (32 + irq) |
48 | 49 | ||
@@ -67,7 +68,7 @@ | |||
67 | /* | 68 | /* |
68 | * these Interrupts are specific for the a9m9750dev board. | 69 | * these Interrupts are specific for the a9m9750dev board. |
69 | * They are generated by an FPGA that interrupts the CPU on | 70 | * They are generated by an FPGA that interrupts the CPU on |
70 | * IRQ_EXT2 | 71 | * IRQ_NS9360_EXT2 |
71 | */ | 72 | */ |
72 | #define FPGA_IRQ(irq) (64 + irq) | 73 | #define FPGA_IRQ(irq) (64 + irq) |
73 | 74 | ||
diff --git a/include/asm-arm/arch-ns9xxx/module.h b/include/asm-arm/arch-ns9xxx/module.h new file mode 100644 index 000000000000..ac08a31111e4 --- /dev/null +++ b/include/asm-arm/arch-ns9xxx/module.h | |||
@@ -0,0 +1,60 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ns9xxx/module.h | ||
3 | * | ||
4 | * Copyright (C) 2007 by Digi International Inc. | ||
5 | * All rights reserved. | ||
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 version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_MODULE_H | ||
12 | #define __ASM_ARCH_MODULE_H | ||
13 | |||
14 | #include <asm/mach-types.h> | ||
15 | |||
16 | #define module_is_cc7ucamry() (0 \ | ||
17 | || machine_is_cc7ucamry() \ | ||
18 | ) | ||
19 | |||
20 | #define module_is_cc9c() (0 \ | ||
21 | || machine_is_cc9c() \ | ||
22 | ) | ||
23 | |||
24 | #define module_is_cc9p9210() (0 \ | ||
25 | || machine_is_cc9p9210() \ | ||
26 | || machine_is_cc9p9210js() \ | ||
27 | ) | ||
28 | |||
29 | #define module_is_cc9p9215() (0 \ | ||
30 | || machine_is_cc9p9215() \ | ||
31 | || machine_is_cc9p9215js() \ | ||
32 | ) | ||
33 | |||
34 | #define module_is_cc9p9360() (0 \ | ||
35 | || machine_is_a9m9360() \ | ||
36 | || machine_is_cc9p9360dev() \ | ||
37 | || machine_is_cc9p9360js() \ | ||
38 | || machine_is_cc9p9360val() \ | ||
39 | ) | ||
40 | |||
41 | #define module_is_cc9p9750() (0 \ | ||
42 | || machine_is_a9m9750() \ | ||
43 | || machine_is_cc9p9750dev() \ | ||
44 | || machine_is_cc9p9750js() \ | ||
45 | || machine_is_cc9p9750val() \ | ||
46 | ) | ||
47 | |||
48 | #define module_is_ccw9c() (0 \ | ||
49 | || machine_is_ccw9c() \ | ||
50 | ) | ||
51 | |||
52 | #define module_is_inc20otter() (0 \ | ||
53 | || machine_is_inc20otter() \ | ||
54 | ) | ||
55 | |||
56 | #define module_is_otter() (0 \ | ||
57 | || machine_is_otter() \ | ||
58 | ) | ||
59 | |||
60 | #endif /* ifndef __ASM_ARCH_MODULE_H */ | ||
diff --git a/include/asm-arm/arch-ns9xxx/processor-ns9360.h b/include/asm-arm/arch-ns9xxx/processor-ns9360.h new file mode 100644 index 000000000000..f3aa6c50dbe5 --- /dev/null +++ b/include/asm-arm/arch-ns9xxx/processor-ns9360.h | |||
@@ -0,0 +1,32 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ns9xxx/processor-ns9360.h | ||
3 | * | ||
4 | * Copyright (C) 2007 by Digi International Inc. | ||
5 | * All rights reserved. | ||
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 version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef __ASM_ARCH_PROCESSORNS9360_H | ||
12 | #define __ASM_ARCH_PROCESSORNS9360_H | ||
13 | |||
14 | #include <linux/init.h> | ||
15 | |||
16 | void ns9360_reset(char mode); | ||
17 | |||
18 | unsigned long ns9360_systemclock(void) __attribute__((const)); | ||
19 | |||
20 | static inline unsigned long ns9360_cpuclock(void) __attribute__((const)); | ||
21 | static inline unsigned long ns9360_cpuclock(void) | ||
22 | { | ||
23 | return ns9360_systemclock() / 2; | ||
24 | } | ||
25 | |||
26 | void __init ns9360_map_io(void); | ||
27 | |||
28 | extern struct sys_timer ns9360_timer; | ||
29 | |||
30 | int ns9360_gpio_configure(unsigned gpio, int inv, int func); | ||
31 | |||
32 | #endif /* ifndef __ASM_ARCH_PROCESSORNS9360_H */ | ||
diff --git a/include/asm-arm/arch-ns9xxx/processor.h b/include/asm-arm/arch-ns9xxx/processor.h index 223e51b8e104..f7b53b65de81 100644 --- a/include/asm-arm/arch-ns9xxx/processor.h +++ b/include/asm-arm/arch-ns9xxx/processor.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-ns9xxx/processor.h | 2 | * include/asm-arm/arch-ns9xxx/processor.h |
3 | * | 3 | * |
4 | * Copyright (C) 2006 by Digi International Inc. | 4 | * Copyright (C) 2006,2007 by Digi International Inc. |
5 | * All rights reserved. | 5 | * All rights reserved. |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify it | 7 | * This program is free software; you can redistribute it and/or modify it |
@@ -11,9 +11,32 @@ | |||
11 | #ifndef __ASM_ARCH_PROCESSOR_H | 11 | #ifndef __ASM_ARCH_PROCESSOR_H |
12 | #define __ASM_ARCH_PROCESSOR_H | 12 | #define __ASM_ARCH_PROCESSOR_H |
13 | 13 | ||
14 | #include <asm/mach-types.h> | 14 | #include <asm/arch-ns9xxx/module.h> |
15 | 15 | ||
16 | #define processor_is_ns9360() (machine_is_cc9p9360dev() \ | 16 | #define processor_is_ns9210() (0 \ |
17 | || machine_is_cc9p9360js()) | 17 | || module_is_cc7ucamry() \ |
18 | || module_is_cc9p9210() \ | ||
19 | || module_is_inc20otter() \ | ||
20 | || module_is_otter() \ | ||
21 | ) | ||
22 | |||
23 | #define processor_is_ns9215() (0 \ | ||
24 | || module_is_cc9p9215() \ | ||
25 | ) | ||
26 | |||
27 | #define processor_is_ns9360() (0 \ | ||
28 | || module_is_cc9p9360() \ | ||
29 | || module_is_cc9c() \ | ||
30 | || module_is_ccw9c() \ | ||
31 | ) | ||
32 | |||
33 | #define processor_is_ns9750() (0 \ | ||
34 | || module_is_cc9p9750() \ | ||
35 | ) | ||
36 | |||
37 | #define processor_is_ns921x() (0 \ | ||
38 | || processor_is_ns9210() \ | ||
39 | || processor_is_ns9215() \ | ||
40 | ) | ||
18 | 41 | ||
19 | #endif /* ifndef __ASM_ARCH_PROCESSOR_H */ | 42 | #endif /* ifndef __ASM_ARCH_PROCESSOR_H */ |
diff --git a/include/asm-arm/arch-ns9xxx/regs-sys-common.h b/include/asm-arm/arch-ns9xxx/regs-sys-common.h new file mode 100644 index 000000000000..956c57cb781f --- /dev/null +++ b/include/asm-arm/arch-ns9xxx/regs-sys-common.h | |||
@@ -0,0 +1,31 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-ns9xxx/regs-sys-common.h | ||
3 | * | ||
4 | * Copyright (C) 2007 by Digi International Inc. | ||
5 | * All rights reserved. | ||
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 version 2 as published by | ||
9 | * the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #ifndef __ASM_ARCH_REGSSYSCOMMON_H | ||
13 | #define __ASM_ARCH_REGSSYSCOMMON_H | ||
14 | #include <asm/hardware.h> | ||
15 | |||
16 | /* Interrupt Vector Address Register Level x */ | ||
17 | #define SYS_IVA(x) __REG2(0xa09000c4, (x)) | ||
18 | |||
19 | /* Interrupt Configuration registers */ | ||
20 | #define SYS_IC(x) __REG2(0xa0900144, (x)) | ||
21 | |||
22 | /* ISRADDR */ | ||
23 | #define SYS_ISRADDR __REG(0xa0900164) | ||
24 | |||
25 | /* Interrupt Status Active */ | ||
26 | #define SYS_ISA __REG(0xa0900168) | ||
27 | |||
28 | /* Interrupt Status Raw */ | ||
29 | #define SYS_ISR __REG(0xa090016c) | ||
30 | |||
31 | #endif /* ifndef __ASM_ARCH_REGSSYSCOMMON_H */ | ||
diff --git a/include/asm-arm/arch-ns9xxx/regs-sys.h b/include/asm-arm/arch-ns9xxx/regs-sys-ns9360.h index 749262f86204..318b6945afb6 100644 --- a/include/asm-arm/arch-ns9xxx/regs-sys.h +++ b/include/asm-arm/arch-ns9xxx/regs-sys-ns9360.h | |||
@@ -1,15 +1,15 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-ns9xxx/regs-sys.h | 2 | * include/asm-arm/arch-ns9xxx/regs-sys-ns9360.h |
3 | * | 3 | * |
4 | * Copyright (C) 2006 by Digi International Inc. | 4 | * Copyright (C) 2006,2007 by Digi International Inc. |
5 | * All rights reserved. | 5 | * All rights reserved. |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify it | 7 | * This program is free software; you can redistribute it and/or modify it |
8 | * under the terms of the GNU General Public License version 2 as published by | 8 | * under the terms of the GNU General Public License version 2 as published by |
9 | * the Free Software Foundation. | 9 | * the Free Software Foundation. |
10 | */ | 10 | */ |
11 | #ifndef __ASM_ARCH_REGSSYS_H | 11 | #ifndef __ASM_ARCH_REGSSYSNS9360_H |
12 | #define __ASM_ARCH_REGSSYS_H | 12 | #define __ASM_ARCH_REGSSYSNS9360_H |
13 | 13 | ||
14 | #include <asm/hardware.h> | 14 | #include <asm/hardware.h> |
15 | 15 | ||
@@ -27,21 +27,6 @@ | |||
27 | /* Timer x Read register */ | 27 | /* Timer x Read register */ |
28 | #define SYS_TR(x) __REG2(0xa0900084, (x)) | 28 | #define SYS_TR(x) __REG2(0xa0900084, (x)) |
29 | 29 | ||
30 | /* Interrupt Vector Address Register Level x */ | ||
31 | #define SYS_IVA(x) __REG2(0xa09000c4, (x)) | ||
32 | |||
33 | /* Interrupt Configuration registers */ | ||
34 | #define SYS_IC(x) __REG2(0xa0900144, (x)) | ||
35 | |||
36 | /* ISRADDR */ | ||
37 | #define SYS_ISRADDR __REG(0xa0900164) | ||
38 | |||
39 | /* Interrupt Status Active */ | ||
40 | #define SYS_ISA __REG(0xa0900168) | ||
41 | |||
42 | /* Interrupt Status Raw */ | ||
43 | #define SYS_ISR __REG(0xa090016c) | ||
44 | |||
45 | /* Timer Interrupt Status register */ | 30 | /* Timer Interrupt Status register */ |
46 | #define SYS_TIS __REG(0xa0900170) | 31 | #define SYS_TIS __REG(0xa0900170) |
47 | 32 | ||
@@ -160,4 +145,4 @@ | |||
160 | #define SYS_EIC_LVEDG_LEVEL __REGVAL(SYS_EIC_LVEDG, 0) | 145 | #define SYS_EIC_LVEDG_LEVEL __REGVAL(SYS_EIC_LVEDG, 0) |
161 | #define SYS_EIC_LVEDG_EDGE __REGVAL(SYS_EIC_LVEDG, 1) | 146 | #define SYS_EIC_LVEDG_EDGE __REGVAL(SYS_EIC_LVEDG, 1) |
162 | 147 | ||
163 | #endif /* ifndef __ASM_ARCH_REGSSYS_H */ | 148 | #endif /* ifndef __ASM_ARCH_REGSSYSNS9360_H */ |
diff --git a/include/asm-arm/arch-ns9xxx/system.h b/include/asm-arm/arch-ns9xxx/system.h index c1082bd8977c..1348073afe48 100644 --- a/include/asm-arm/arch-ns9xxx/system.h +++ b/include/asm-arm/arch-ns9xxx/system.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-ns9xxx/system.h | 2 | * include/asm-arm/arch-ns9xxx/system.h |
3 | * | 3 | * |
4 | * Copyright (C) 2006 by Digi International Inc. | 4 | * Copyright (C) 2006,2007 by Digi International Inc. |
5 | * All rights reserved. | 5 | * All rights reserved. |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify it | 7 | * This program is free software; you can redistribute it and/or modify it |
@@ -12,8 +12,8 @@ | |||
12 | #define __ASM_ARCH_SYSTEM_H | 12 | #define __ASM_ARCH_SYSTEM_H |
13 | 13 | ||
14 | #include <asm/proc-fns.h> | 14 | #include <asm/proc-fns.h> |
15 | #include <asm/arch-ns9xxx/regs-sys.h> | 15 | #include <asm/arch-ns9xxx/processor.h> |
16 | #include <asm/mach-types.h> | 16 | #include <asm/arch-ns9xxx/processor-ns9360.h> |
17 | 17 | ||
18 | static inline void arch_idle(void) | 18 | static inline void arch_idle(void) |
19 | { | 19 | { |
@@ -22,11 +22,12 @@ static inline void arch_idle(void) | |||
22 | 22 | ||
23 | static inline void arch_reset(char mode) | 23 | static inline void arch_reset(char mode) |
24 | { | 24 | { |
25 | u32 reg; | 25 | #ifdef CONFIG_PROCESSOR_NS9360 |
26 | 26 | if (processor_is_ns9360()) | |
27 | reg = __raw_readl(SYS_PLL) >> 16; | 27 | ns9360_reset(mode); |
28 | REGSET(reg, SYS_PLL, SWC, YES); | 28 | else |
29 | __raw_writel(reg, SYS_PLL); | 29 | #endif |
30 | BUG(); | ||
30 | 31 | ||
31 | BUG(); | 32 | BUG(); |
32 | } | 33 | } |
diff --git a/include/asm-arm/arch-ns9xxx/uncompress.h b/include/asm-arm/arch-ns9xxx/uncompress.h index 961ca7dc9954..71066baceab7 100644 --- a/include/asm-arm/arch-ns9xxx/uncompress.h +++ b/include/asm-arm/arch-ns9xxx/uncompress.h | |||
@@ -11,20 +11,149 @@ | |||
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 | static void putc(char c) | 14 | #include <asm/io.h> |
15 | |||
16 | #define __REG(x) ((void __iomem __force *)(x)) | ||
17 | |||
18 | static void putc_dummy(char c, void __iomem *base) | ||
15 | { | 19 | { |
16 | volatile u8 *base = (volatile u8 *)0x40000000; | 20 | /* nothing */ |
17 | int t = 0x10000; | 21 | } |
18 | 22 | ||
23 | static void putc_ns9360(char c, void __iomem *base) | ||
24 | { | ||
25 | static int t = 0x10000; | ||
26 | do { | ||
27 | if (t) | ||
28 | --t; | ||
29 | |||
30 | if (__raw_readl(base + 8) & (1 << 3)) { | ||
31 | __raw_writeb(c, base + 16); | ||
32 | t = 0x10000; | ||
33 | break; | ||
34 | } | ||
35 | } while (t); | ||
36 | } | ||
37 | |||
38 | static void putc_a9m9750dev(char c, void __iomem *base) | ||
39 | { | ||
40 | static int t = 0x10000; | ||
41 | do { | ||
42 | if (t) | ||
43 | --t; | ||
44 | |||
45 | if (__raw_readb(base + 5) & (1 << 5)) { | ||
46 | __raw_writeb(c, base); | ||
47 | t = 0x10000; | ||
48 | break; | ||
49 | } | ||
50 | } while (t); | ||
51 | |||
52 | } | ||
53 | |||
54 | static void putc_ns921x(char c, void __iomem *base) | ||
55 | { | ||
56 | static int t = 0x10000; | ||
19 | do { | 57 | do { |
20 | if (base[5] & 0x20) { | 58 | if (t) |
21 | base[0] = c; | 59 | --t; |
60 | |||
61 | if (!(__raw_readl(base) & (1 << 11))) { | ||
62 | __raw_writeb(c, base + 0x0028); | ||
63 | t = 0x10000; | ||
22 | break; | 64 | break; |
23 | } | 65 | } |
24 | } while (--t); | 66 | } while (t); |
25 | } | 67 | } |
26 | 68 | ||
27 | #define arch_decomp_setup() | 69 | #define MSCS __REG(0xA0900184) |
70 | |||
71 | #define NS9360_UARTA __REG(0x90200040) | ||
72 | #define NS9360_UARTB __REG(0x90200000) | ||
73 | #define NS9360_UARTC __REG(0x90300000) | ||
74 | #define NS9360_UARTD __REG(0x90300040) | ||
75 | |||
76 | #define NS9360_UART_ENABLED(base) \ | ||
77 | (__raw_readl(NS9360_UARTA) & (1 << 31)) | ||
78 | |||
79 | #define A9M9750DEV_UARTA __REG(0x40000000) | ||
80 | |||
81 | #define NS921XSYS_CLOCK __REG(0xa090017c) | ||
82 | #define NS921X_UARTA __REG(0x90010000) | ||
83 | #define NS921X_UARTB __REG(0x90018000) | ||
84 | #define NS921X_UARTC __REG(0x90020000) | ||
85 | #define NS921X_UARTD __REG(0x90028000) | ||
86 | |||
87 | #define NS921X_UART_ENABLED(base) \ | ||
88 | (__raw_readl((base) + 0x1000) & (1 << 29)) | ||
89 | |||
90 | static void autodetect(void (**putc)(char, void __iomem *), void __iomem **base) | ||
91 | { | ||
92 | if (((__raw_readl(MSCS) >> 16) & 0xfe) == 0x00) { | ||
93 | /* ns9360 or ns9750 */ | ||
94 | if (NS9360_UART_ENABLED(NS9360_UARTA)) { | ||
95 | *putc = putc_ns9360; | ||
96 | *base = NS9360_UARTA; | ||
97 | return; | ||
98 | } else if (NS9360_UART_ENABLED(NS9360_UARTB)) { | ||
99 | *putc = putc_ns9360; | ||
100 | *base = NS9360_UARTB; | ||
101 | return; | ||
102 | } else if (NS9360_UART_ENABLED(NS9360_UARTC)) { | ||
103 | *putc = putc_ns9360; | ||
104 | *base = NS9360_UARTC; | ||
105 | return; | ||
106 | } else if (NS9360_UART_ENABLED(NS9360_UARTD)) { | ||
107 | *putc = putc_ns9360; | ||
108 | *base = NS9360_UARTD; | ||
109 | return; | ||
110 | } else if (__raw_readl(__REG(0xa09001f4)) == 0xfffff001) { | ||
111 | *putc = putc_a9m9750dev; | ||
112 | *base = A9M9750DEV_UARTA; | ||
113 | return; | ||
114 | } | ||
115 | } else if (((__raw_readl(MSCS) >> 16) & 0xfe) == 0x02) { | ||
116 | /* ns921x */ | ||
117 | u32 clock = __raw_readl(NS921XSYS_CLOCK); | ||
118 | |||
119 | if ((clock & (1 << 1)) && | ||
120 | NS921X_UART_ENABLED(NS921X_UARTA)) { | ||
121 | *putc = putc_ns921x; | ||
122 | *base = NS921X_UARTA; | ||
123 | return; | ||
124 | } else if ((clock & (1 << 2)) && | ||
125 | NS921X_UART_ENABLED(NS921X_UARTB)) { | ||
126 | *putc = putc_ns921x; | ||
127 | *base = NS921X_UARTB; | ||
128 | return; | ||
129 | } else if ((clock & (1 << 3)) && | ||
130 | NS921X_UART_ENABLED(NS921X_UARTC)) { | ||
131 | *putc = putc_ns921x; | ||
132 | *base = NS921X_UARTC; | ||
133 | return; | ||
134 | } else if ((clock & (1 << 4)) && | ||
135 | NS921X_UART_ENABLED(NS921X_UARTD)) { | ||
136 | *putc = putc_ns921x; | ||
137 | *base = NS921X_UARTD; | ||
138 | return; | ||
139 | } | ||
140 | } | ||
141 | |||
142 | *putc = putc_dummy; | ||
143 | } | ||
144 | |||
145 | void (*myputc)(char, void __iomem *); | ||
146 | void __iomem *base; | ||
147 | |||
148 | static void putc(char c) | ||
149 | { | ||
150 | myputc(c, base); | ||
151 | } | ||
152 | |||
153 | static void arch_decomp_setup(void) | ||
154 | { | ||
155 | autodetect(&myputc, &base); | ||
156 | } | ||
28 | #define arch_decomp_wdog() | 157 | #define arch_decomp_wdog() |
29 | 158 | ||
30 | static void flush(void) | 159 | static void flush(void) |
diff --git a/include/asm-arm/arch-omap/board-osk.h b/include/asm-arm/arch-omap/board-osk.h index 2b1a8a4fe44e..94926090e475 100644 --- a/include/asm-arm/arch-omap/board-osk.h +++ b/include/asm-arm/arch-omap/board-osk.h | |||
@@ -32,5 +32,16 @@ | |||
32 | /* At OMAP5912 OSK the Ethernet is directly connected to CS1 */ | 32 | /* At OMAP5912 OSK the Ethernet is directly connected to CS1 */ |
33 | #define OMAP_OSK_ETHR_START 0x04800300 | 33 | #define OMAP_OSK_ETHR_START 0x04800300 |
34 | 34 | ||
35 | /* TPS65010 has four GPIOs. nPG and LED2 can be treated like GPIOs with | ||
36 | * alternate pin configurations for hardware-controlled blinking. | ||
37 | */ | ||
38 | #define OSK_TPS_GPIO_BASE (OMAP_MAX_GPIO_LINES + 16 /* MPUIO */) | ||
39 | # define OSK_TPS_GPIO_USB_PWR_EN (OSK_TPS_GPIO_BASE + 0) | ||
40 | # define OSK_TPS_GPIO_LED_D3 (OSK_TPS_GPIO_BASE + 1) | ||
41 | # define OSK_TPS_GPIO_LAN_RESET (OSK_TPS_GPIO_BASE + 2) | ||
42 | # define OSK_TPS_GPIO_DSP_PWR_EN (OSK_TPS_GPIO_BASE + 3) | ||
43 | # define OSK_TPS_GPIO_LED_D9 (OSK_TPS_GPIO_BASE + 4) | ||
44 | # define OSK_TPS_GPIO_LED_D2 (OSK_TPS_GPIO_BASE + 5) | ||
45 | |||
35 | #endif /* __ASM_ARCH_OMAP_OSK_H */ | 46 | #endif /* __ASM_ARCH_OMAP_OSK_H */ |
36 | 47 | ||
diff --git a/include/asm-arm/arch-omap/clock.h b/include/asm-arm/arch-omap/clock.h index fa6881049903..57523bdb642b 100644 --- a/include/asm-arm/arch-omap/clock.h +++ b/include/asm-arm/arch-omap/clock.h | |||
@@ -14,6 +14,35 @@ | |||
14 | #define __ARCH_ARM_OMAP_CLOCK_H | 14 | #define __ARCH_ARM_OMAP_CLOCK_H |
15 | 15 | ||
16 | struct module; | 16 | struct module; |
17 | struct clk; | ||
18 | |||
19 | #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) | ||
20 | |||
21 | struct clksel_rate { | ||
22 | u8 div; | ||
23 | u32 val; | ||
24 | u8 flags; | ||
25 | }; | ||
26 | |||
27 | struct clksel { | ||
28 | struct clk *parent; | ||
29 | const struct clksel_rate *rates; | ||
30 | }; | ||
31 | |||
32 | struct dpll_data { | ||
33 | void __iomem *mult_div1_reg; | ||
34 | u32 mult_mask; | ||
35 | u32 div1_mask; | ||
36 | # if defined(CONFIG_ARCH_OMAP3) | ||
37 | void __iomem *control_reg; | ||
38 | u32 enable_mask; | ||
39 | u8 auto_recal_bit; | ||
40 | u8 recal_en_bit; | ||
41 | u8 recal_st_bit; | ||
42 | # endif | ||
43 | }; | ||
44 | |||
45 | #endif | ||
17 | 46 | ||
18 | struct clk { | 47 | struct clk { |
19 | struct list_head node; | 48 | struct list_head node; |
@@ -25,8 +54,6 @@ struct clk { | |||
25 | __u32 flags; | 54 | __u32 flags; |
26 | void __iomem *enable_reg; | 55 | void __iomem *enable_reg; |
27 | __u8 enable_bit; | 56 | __u8 enable_bit; |
28 | __u8 rate_offset; | ||
29 | __u8 src_offset; | ||
30 | __s8 usecount; | 57 | __s8 usecount; |
31 | void (*recalc)(struct clk *); | 58 | void (*recalc)(struct clk *); |
32 | int (*set_rate)(struct clk *, unsigned long); | 59 | int (*set_rate)(struct clk *, unsigned long); |
@@ -34,6 +61,16 @@ struct clk { | |||
34 | void (*init)(struct clk *); | 61 | void (*init)(struct clk *); |
35 | int (*enable)(struct clk *); | 62 | int (*enable)(struct clk *); |
36 | void (*disable)(struct clk *); | 63 | void (*disable)(struct clk *); |
64 | #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) | ||
65 | u8 fixed_div; | ||
66 | void __iomem *clksel_reg; | ||
67 | u32 clksel_mask; | ||
68 | const struct clksel *clksel; | ||
69 | const struct dpll_data *dpll_data; | ||
70 | #else | ||
71 | __u8 rate_offset; | ||
72 | __u8 src_offset; | ||
73 | #endif | ||
37 | }; | 74 | }; |
38 | 75 | ||
39 | struct clk_functions { | 76 | struct clk_functions { |
@@ -54,10 +91,12 @@ extern int clk_init(struct clk_functions * custom_clocks); | |||
54 | extern int clk_register(struct clk *clk); | 91 | extern int clk_register(struct clk *clk); |
55 | extern void clk_unregister(struct clk *clk); | 92 | extern void clk_unregister(struct clk *clk); |
56 | extern void propagate_rate(struct clk *clk); | 93 | extern void propagate_rate(struct clk *clk); |
94 | extern void recalculate_root_clocks(void); | ||
57 | extern void followparent_recalc(struct clk * clk); | 95 | extern void followparent_recalc(struct clk * clk); |
58 | extern void clk_allow_idle(struct clk *clk); | 96 | extern void clk_allow_idle(struct clk *clk); |
59 | extern void clk_deny_idle(struct clk *clk); | 97 | extern void clk_deny_idle(struct clk *clk); |
60 | extern int clk_get_usecount(struct clk *clk); | 98 | extern int clk_get_usecount(struct clk *clk); |
99 | extern void clk_enable_init_clocks(void); | ||
61 | 100 | ||
62 | /* Clock flags */ | 101 | /* Clock flags */ |
63 | #define RATE_CKCTL (1 << 0) /* Main fixed ratio clocks */ | 102 | #define RATE_CKCTL (1 << 0) /* Main fixed ratio clocks */ |
@@ -71,21 +110,33 @@ extern int clk_get_usecount(struct clk *clk); | |||
71 | #define CLOCK_NO_IDLE_PARENT (1 << 8) | 110 | #define CLOCK_NO_IDLE_PARENT (1 << 8) |
72 | #define DELAYED_APP (1 << 9) /* Delay application of clock */ | 111 | #define DELAYED_APP (1 << 9) /* Delay application of clock */ |
73 | #define CONFIG_PARTICIPANT (1 << 10) /* Fundamental clock */ | 112 | #define CONFIG_PARTICIPANT (1 << 10) /* Fundamental clock */ |
74 | #define CM_MPU_SEL1 (1 << 11) /* Domain divider/source */ | 113 | #define ENABLE_ON_INIT (1 << 11) /* Enable upon framework init */ |
75 | #define CM_DSP_SEL1 (1 << 12) | 114 | #define INVERT_ENABLE (1 << 12) /* 0 enables, 1 disables */ |
76 | #define CM_GFX_SEL1 (1 << 13) | 115 | /* bits 13-20 are currently free */ |
77 | #define CM_MODEM_SEL1 (1 << 14) | ||
78 | #define CM_CORE_SEL1 (1 << 15) /* Sets divider for many */ | ||
79 | #define CM_CORE_SEL2 (1 << 16) /* sets parent for GPT */ | ||
80 | #define CM_WKUP_SEL1 (1 << 17) | ||
81 | #define CM_PLL_SEL1 (1 << 18) | ||
82 | #define CM_PLL_SEL2 (1 << 19) | ||
83 | #define CM_SYSCLKOUT_SEL1 (1 << 20) | ||
84 | #define CLOCK_IN_OMAP310 (1 << 21) | 116 | #define CLOCK_IN_OMAP310 (1 << 21) |
85 | #define CLOCK_IN_OMAP730 (1 << 22) | 117 | #define CLOCK_IN_OMAP730 (1 << 22) |
86 | #define CLOCK_IN_OMAP1510 (1 << 23) | 118 | #define CLOCK_IN_OMAP1510 (1 << 23) |
87 | #define CLOCK_IN_OMAP16XX (1 << 24) | 119 | #define CLOCK_IN_OMAP16XX (1 << 24) |
88 | #define CLOCK_IN_OMAP242X (1 << 25) | 120 | #define CLOCK_IN_OMAP242X (1 << 25) |
89 | #define CLOCK_IN_OMAP243X (1 << 26) | 121 | #define CLOCK_IN_OMAP243X (1 << 26) |
122 | #define CLOCK_IN_OMAP343X (1 << 27) /* clocks common to all 343X */ | ||
123 | #define PARENT_CONTROLS_CLOCK (1 << 28) | ||
124 | #define CLOCK_IN_OMAP3430ES1 (1 << 29) /* 3430ES1 clocks only */ | ||
125 | #define CLOCK_IN_OMAP3430ES2 (1 << 30) /* 3430ES2 clocks only */ | ||
126 | |||
127 | /* Clksel_rate flags */ | ||
128 | #define DEFAULT_RATE (1 << 0) | ||
129 | #define RATE_IN_242X (1 << 1) | ||
130 | #define RATE_IN_243X (1 << 2) | ||
131 | #define RATE_IN_343X (1 << 3) /* rates common to all 343X */ | ||
132 | #define RATE_IN_3430ES2 (1 << 4) /* 3430ES2 rates only */ | ||
133 | |||
134 | #define RATE_IN_24XX (RATE_IN_242X | RATE_IN_243X) | ||
135 | |||
136 | |||
137 | /* CM_CLKSEL2_PLL.CORE_CLK_SRC options (24XX) */ | ||
138 | #define CORE_CLK_SRC_32K 0 | ||
139 | #define CORE_CLK_SRC_DPLL 1 | ||
140 | #define CORE_CLK_SRC_DPLL_X2 2 | ||
90 | 141 | ||
91 | #endif | 142 | #endif |
diff --git a/include/asm-arm/arch-omap/control.h b/include/asm-arm/arch-omap/control.h new file mode 100644 index 000000000000..9944bb5d5330 --- /dev/null +++ b/include/asm-arm/arch-omap/control.h | |||
@@ -0,0 +1,191 @@ | |||
1 | #ifndef __ASM_ARCH_CONTROL_H | ||
2 | #define __ASM_ARCH_CONTROL_H | ||
3 | |||
4 | /* | ||
5 | * include/asm-arm/arch-omap/control.h | ||
6 | * | ||
7 | * OMAP2/3 System Control Module definitions | ||
8 | * | ||
9 | * Copyright (C) 2007 Texas Instruments, Inc. | ||
10 | * Copyright (C) 2007 Nokia Corporation | ||
11 | * | ||
12 | * Written by Paul Walmsley | ||
13 | * | ||
14 | * This program is free software; you can redistribute it and/or modify | ||
15 | * it under the terms of the GNU General Public License as published by | ||
16 | * the Free Software Foundation. | ||
17 | */ | ||
18 | |||
19 | #include <asm/arch/io.h> | ||
20 | |||
21 | #define OMAP242X_CTRL_REGADDR(reg) \ | ||
22 | (void __iomem *)IO_ADDRESS(OMAP242X_CTRL_BASE + (reg)) | ||
23 | #define OMAP243X_CTRL_REGADDR(reg) \ | ||
24 | (void __iomem *)IO_ADDRESS(OMAP243X_CTRL_BASE + (reg)) | ||
25 | #define OMAP343X_CTRL_REGADDR(reg) \ | ||
26 | (void __iomem *)IO_ADDRESS(OMAP343X_CTRL_BASE + (reg)) | ||
27 | |||
28 | /* | ||
29 | * As elsewhere, the "OMAP2_" prefix indicates that the macro is valid for | ||
30 | * OMAP24XX and OMAP34XX. | ||
31 | */ | ||
32 | |||
33 | /* Control submodule offsets */ | ||
34 | |||
35 | #define OMAP2_CONTROL_INTERFACE 0x000 | ||
36 | #define OMAP2_CONTROL_PADCONFS 0x030 | ||
37 | #define OMAP2_CONTROL_GENERAL 0x270 | ||
38 | #define OMAP343X_CONTROL_MEM_WKUP 0x600 | ||
39 | #define OMAP343X_CONTROL_PADCONFS_WKUP 0xa00 | ||
40 | #define OMAP343X_CONTROL_GENERAL_WKUP 0xa60 | ||
41 | |||
42 | /* Control register offsets - read/write with omap_ctrl_{read,write}{bwl}() */ | ||
43 | |||
44 | #define OMAP2_CONTROL_SYSCONFIG (OMAP2_CONTROL_INTERFACE + 0x10) | ||
45 | |||
46 | /* CONTROL_GENERAL register offsets common to OMAP2 & 3 */ | ||
47 | #define OMAP2_CONTROL_DEVCONF0 (OMAP2_CONTROL_GENERAL + 0x0004) | ||
48 | #define OMAP2_CONTROL_MSUSPENDMUX_0 (OMAP2_CONTROL_GENERAL + 0x0020) | ||
49 | #define OMAP2_CONTROL_MSUSPENDMUX_1 (OMAP2_CONTROL_GENERAL + 0x0024) | ||
50 | #define OMAP2_CONTROL_MSUSPENDMUX_2 (OMAP2_CONTROL_GENERAL + 0x0028) | ||
51 | #define OMAP2_CONTROL_MSUSPENDMUX_3 (OMAP2_CONTROL_GENERAL + 0x002c) | ||
52 | #define OMAP2_CONTROL_MSUSPENDMUX_4 (OMAP2_CONTROL_GENERAL + 0x0030) | ||
53 | #define OMAP2_CONTROL_MSUSPENDMUX_5 (OMAP2_CONTROL_GENERAL + 0x0034) | ||
54 | #define OMAP2_CONTROL_SEC_CTRL (OMAP2_CONTROL_GENERAL + 0x0040) | ||
55 | #define OMAP2_CONTROL_RPUB_KEY_H_0 (OMAP2_CONTROL_GENERAL + 0x0090) | ||
56 | #define OMAP2_CONTROL_RPUB_KEY_H_1 (OMAP2_CONTROL_GENERAL + 0x0094) | ||
57 | #define OMAP2_CONTROL_RPUB_KEY_H_2 (OMAP2_CONTROL_GENERAL + 0x0098) | ||
58 | #define OMAP2_CONTROL_RPUB_KEY_H_3 (OMAP2_CONTROL_GENERAL + 0x009c) | ||
59 | |||
60 | /* 242x-only CONTROL_GENERAL register offsets */ | ||
61 | #define OMAP242X_CONTROL_DEVCONF OMAP2_CONTROL_DEVCONF0 /* match TRM */ | ||
62 | #define OMAP242X_CONTROL_OCM_RAM_PERM (OMAP2_CONTROL_GENERAL + 0x0068) | ||
63 | |||
64 | /* 243x-only CONTROL_GENERAL register offsets */ | ||
65 | /* CONTROL_IVA2_BOOT{ADDR,MOD} are at the same place on 343x - noted below */ | ||
66 | #define OMAP243X_CONTROL_DEVCONF1 (OMAP2_CONTROL_GENERAL + 0x0078) | ||
67 | #define OMAP243X_CONTROL_CSIRXFE (OMAP2_CONTROL_GENERAL + 0x007c) | ||
68 | #define OMAP243X_CONTROL_IVA2_BOOTADDR (OMAP2_CONTROL_GENERAL + 0x0190) | ||
69 | #define OMAP243X_CONTROL_IVA2_BOOTMOD (OMAP2_CONTROL_GENERAL + 0x0194) | ||
70 | #define OMAP243X_CONTROL_IVA2_GEMCFG (OMAP2_CONTROL_GENERAL + 0x0198) | ||
71 | |||
72 | /* 24xx-only CONTROL_GENERAL register offsets */ | ||
73 | #define OMAP24XX_CONTROL_DEBOBS (OMAP2_CONTROL_GENERAL + 0x0000) | ||
74 | #define OMAP24XX_CONTROL_EMU_SUPPORT (OMAP2_CONTROL_GENERAL + 0x0008) | ||
75 | #define OMAP24XX_CONTROL_SEC_TEST (OMAP2_CONTROL_GENERAL + 0x0044) | ||
76 | #define OMAP24XX_CONTROL_PSA_CTRL (OMAP2_CONTROL_GENERAL + 0x0048) | ||
77 | #define OMAP24XX_CONTROL_PSA_CMD (OMAP2_CONTROL_GENERAL + 0x004c) | ||
78 | #define OMAP24XX_CONTROL_PSA_VALUE (OMAP2_CONTROL_GENERAL + 0x0050) | ||
79 | #define OMAP24XX_CONTROL_SEC_EMU (OMAP2_CONTROL_GENERAL + 0x0060) | ||
80 | #define OMAP24XX_CONTROL_SEC_TAP (OMAP2_CONTROL_GENERAL + 0x0064) | ||
81 | #define OMAP24XX_CONTROL_OCM_PUB_RAM_ADD (OMAP2_CONTROL_GENERAL + 0x006c) | ||
82 | #define OMAP24XX_CONTROL_EXT_SEC_RAM_START_ADD (OMAP2_CONTROL_GENERAL + 0x0070) | ||
83 | #define OMAP24XX_CONTROL_EXT_SEC_RAM_STOP_ADD (OMAP2_CONTROL_GENERAL + 0x0074 | ||
84 | #define OMAP24XX_CONTROL_SEC_STATUS (OMAP2_CONTROL_GENERAL + 0x0080) | ||
85 | #define OMAP24XX_CONTROL_SEC_ERR_STATUS (OMAP2_CONTROL_GENERAL + 0x0084) | ||
86 | #define OMAP24XX_CONTROL_STATUS (OMAP2_CONTROL_GENERAL + 0x0088) | ||
87 | #define OMAP24XX_CONTROL_GENERAL_PURPOSE_STATUS (OMAP2_CONTROL_GENERAL + 0x008c) | ||
88 | #define OMAP24XX_CONTROL_RAND_KEY_0 (OMAP2_CONTROL_GENERAL + 0x00a0) | ||
89 | #define OMAP24XX_CONTROL_RAND_KEY_1 (OMAP2_CONTROL_GENERAL + 0x00a4) | ||
90 | #define OMAP24XX_CONTROL_RAND_KEY_2 (OMAP2_CONTROL_GENERAL + 0x00a8) | ||
91 | #define OMAP24XX_CONTROL_RAND_KEY_3 (OMAP2_CONTROL_GENERAL + 0x00ac) | ||
92 | #define OMAP24XX_CONTROL_CUST_KEY_0 (OMAP2_CONTROL_GENERAL + 0x00b0) | ||
93 | #define OMAP24XX_CONTROL_CUST_KEY_1 (OMAP2_CONTROL_GENERAL + 0x00b4) | ||
94 | #define OMAP24XX_CONTROL_TEST_KEY_0 (OMAP2_CONTROL_GENERAL + 0x00c0) | ||
95 | #define OMAP24XX_CONTROL_TEST_KEY_1 (OMAP2_CONTROL_GENERAL + 0x00c4) | ||
96 | #define OMAP24XX_CONTROL_TEST_KEY_2 (OMAP2_CONTROL_GENERAL + 0x00c8) | ||
97 | #define OMAP24XX_CONTROL_TEST_KEY_3 (OMAP2_CONTROL_GENERAL + 0x00cc) | ||
98 | #define OMAP24XX_CONTROL_TEST_KEY_4 (OMAP2_CONTROL_GENERAL + 0x00d0) | ||
99 | #define OMAP24XX_CONTROL_TEST_KEY_5 (OMAP2_CONTROL_GENERAL + 0x00d4) | ||
100 | #define OMAP24XX_CONTROL_TEST_KEY_6 (OMAP2_CONTROL_GENERAL + 0x00d8) | ||
101 | #define OMAP24XX_CONTROL_TEST_KEY_7 (OMAP2_CONTROL_GENERAL + 0x00dc) | ||
102 | #define OMAP24XX_CONTROL_TEST_KEY_8 (OMAP2_CONTROL_GENERAL + 0x00e0) | ||
103 | #define OMAP24XX_CONTROL_TEST_KEY_9 (OMAP2_CONTROL_GENERAL + 0x00e4) | ||
104 | |||
105 | /* 34xx-only CONTROL_GENERAL register offsets */ | ||
106 | #define OMAP343X_CONTROL_PADCONF_OFF (OMAP2_CONTROL_GENERAL + 0x0000) | ||
107 | #define OMAP343X_CONTROL_MEM_DFTRW0 (OMAP2_CONTROL_GENERAL + 0x0008) | ||
108 | #define OMAP343X_CONTROL_MEM_DFTRW1 (OMAP2_CONTROL_GENERAL + 0x000c) | ||
109 | #define OMAP343X_CONTROL_DEVCONF1 (OMAP2_CONTROL_GENERAL + 0x0068) | ||
110 | #define OMAP343X_CONTROL_CSIRXFE (OMAP2_CONTROL_GENERAL + 0x006c) | ||
111 | #define OMAP343X_CONTROL_SEC_STATUS (OMAP2_CONTROL_GENERAL + 0x0070) | ||
112 | #define OMAP343X_CONTROL_SEC_ERR_STATUS (OMAP2_CONTROL_GENERAL + 0x0074) | ||
113 | #define OMAP343X_CONTROL_SEC_ERR_STATUS_DEBUG (OMAP2_CONTROL_GENERAL + 0x0078) | ||
114 | #define OMAP343X_CONTROL_STATUS (OMAP2_CONTROL_GENERAL + 0x0080) | ||
115 | #define OMAP343X_CONTROL_GENERAL_PURPOSE_STATUS (OMAP2_CONTROL_GENERAL + 0x0084) | ||
116 | #define OMAP343X_CONTROL_RPUB_KEY_H_4 (OMAP2_CONTROL_GENERAL + 0x00a0) | ||
117 | #define OMAP343X_CONTROL_RAND_KEY_0 (OMAP2_CONTROL_GENERAL + 0x00a8) | ||
118 | #define OMAP343X_CONTROL_RAND_KEY_1 (OMAP2_CONTROL_GENERAL + 0x00ac) | ||
119 | #define OMAP343X_CONTROL_RAND_KEY_2 (OMAP2_CONTROL_GENERAL + 0x00b0) | ||
120 | #define OMAP343X_CONTROL_RAND_KEY_3 (OMAP2_CONTROL_GENERAL + 0x00b4) | ||
121 | #define OMAP343X_CONTROL_TEST_KEY_0 (OMAP2_CONTROL_GENERAL + 0x00c8) | ||
122 | #define OMAP343X_CONTROL_TEST_KEY_1 (OMAP2_CONTROL_GENERAL + 0x00cc) | ||
123 | #define OMAP343X_CONTROL_TEST_KEY_2 (OMAP2_CONTROL_GENERAL + 0x00d0) | ||
124 | #define OMAP343X_CONTROL_TEST_KEY_3 (OMAP2_CONTROL_GENERAL + 0x00d4) | ||
125 | #define OMAP343X_CONTROL_TEST_KEY_4 (OMAP2_CONTROL_GENERAL + 0x00d8) | ||
126 | #define OMAP343X_CONTROL_TEST_KEY_5 (OMAP2_CONTROL_GENERAL + 0x00dc) | ||
127 | #define OMAP343X_CONTROL_TEST_KEY_6 (OMAP2_CONTROL_GENERAL + 0x00e0) | ||
128 | #define OMAP343X_CONTROL_TEST_KEY_7 (OMAP2_CONTROL_GENERAL + 0x00e4) | ||
129 | #define OMAP343X_CONTROL_TEST_KEY_8 (OMAP2_CONTROL_GENERAL + 0x00e8) | ||
130 | #define OMAP343X_CONTROL_TEST_KEY_9 (OMAP2_CONTROL_GENERAL + 0x00ec) | ||
131 | #define OMAP343X_CONTROL_TEST_KEY_10 (OMAP2_CONTROL_GENERAL + 0x00f0) | ||
132 | #define OMAP343X_CONTROL_TEST_KEY_11 (OMAP2_CONTROL_GENERAL + 0x00f4) | ||
133 | #define OMAP343X_CONTROL_TEST_KEY_12 (OMAP2_CONTROL_GENERAL + 0x00f8) | ||
134 | #define OMAP343X_CONTROL_TEST_KEY_13 (OMAP2_CONTROL_GENERAL + 0x00fc) | ||
135 | #define OMAP343X_CONTROL_IVA2_BOOTADDR (OMAP2_CONTROL_GENERAL + 0x0190) | ||
136 | #define OMAP343X_CONTROL_IVA2_BOOTMOD (OMAP2_CONTROL_GENERAL + 0x0194) | ||
137 | |||
138 | /* | ||
139 | * REVISIT: This list of registers is not comprehensive - there are more | ||
140 | * that should be added. | ||
141 | */ | ||
142 | |||
143 | /* | ||
144 | * Control module register bit defines - these should eventually go into | ||
145 | * their own regbits file. Some of these will be complicated, depending | ||
146 | * on the device type (general-purpose, emulator, test, secure, bad, other) | ||
147 | * and the security mode (secure, non-secure, don't care) | ||
148 | */ | ||
149 | /* CONTROL_DEVCONF0 bits */ | ||
150 | #define OMAP24XX_USBSTANDBYCTRL (1 << 15) | ||
151 | #define OMAP2_MCBSP2_CLKS_MASK (1 << 6) | ||
152 | #define OMAP2_MCBSP1_CLKS_MASK (1 << 2) | ||
153 | |||
154 | /* CONTROL_DEVCONF1 bits */ | ||
155 | #define OMAP2_MCBSP5_CLKS_MASK (1 << 4) /* > 242x */ | ||
156 | #define OMAP2_MCBSP4_CLKS_MASK (1 << 2) /* > 242x */ | ||
157 | #define OMAP2_MCBSP3_CLKS_MASK (1 << 0) /* > 242x */ | ||
158 | |||
159 | /* CONTROL_STATUS bits */ | ||
160 | #define OMAP2_DEVICETYPE_MASK (0x7 << 8) | ||
161 | #define OMAP2_SYSBOOT_5_MASK (1 << 5) | ||
162 | #define OMAP2_SYSBOOT_4_MASK (1 << 4) | ||
163 | #define OMAP2_SYSBOOT_3_MASK (1 << 3) | ||
164 | #define OMAP2_SYSBOOT_2_MASK (1 << 2) | ||
165 | #define OMAP2_SYSBOOT_1_MASK (1 << 1) | ||
166 | #define OMAP2_SYSBOOT_0_MASK (1 << 0) | ||
167 | |||
168 | #ifndef __ASSEMBLY__ | ||
169 | #if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) | ||
170 | extern void omap_ctrl_base_set(u32 base); | ||
171 | extern u32 omap_ctrl_base_get(void); | ||
172 | extern u8 omap_ctrl_readb(u16 offset); | ||
173 | extern u16 omap_ctrl_readw(u16 offset); | ||
174 | extern u32 omap_ctrl_readl(u16 offset); | ||
175 | extern void omap_ctrl_writeb(u8 val, u16 offset); | ||
176 | extern void omap_ctrl_writew(u16 val, u16 offset); | ||
177 | extern void omap_ctrl_writel(u32 val, u16 offset); | ||
178 | #else | ||
179 | #define omap_ctrl_base_set(x) WARN_ON(1) | ||
180 | #define omap_ctrl_base_get() 0 | ||
181 | #define omap_ctrl_readb(x) 0 | ||
182 | #define omap_ctrl_readw(x) 0 | ||
183 | #define omap_ctrl_readl(x) 0 | ||
184 | #define omap_ctrl_writeb(x, y) WARN_ON(1) | ||
185 | #define omap_ctrl_writew(x, y) WARN_ON(1) | ||
186 | #define omap_ctrl_writel(x, y) WARN_ON(1) | ||
187 | #endif | ||
188 | #endif /* __ASSEMBLY__ */ | ||
189 | |||
190 | #endif /* __ASM_ARCH_CONTROL_H */ | ||
191 | |||
diff --git a/include/asm-arm/arch-omap/entry-macro.S b/include/asm-arm/arch-omap/entry-macro.S index f6967c8df323..74cd57221c8e 100644 --- a/include/asm-arm/arch-omap/entry-macro.S +++ b/include/asm-arm/arch-omap/entry-macro.S | |||
@@ -68,7 +68,7 @@ | |||
68 | .endm | 68 | .endm |
69 | 69 | ||
70 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp | 70 | .macro get_irqnr_and_base, irqnr, irqstat, base, tmp |
71 | ldr \base, =VA_IC_BASE | 71 | ldr \base, =OMAP2_VA_IC_BASE |
72 | ldr \irqnr, [\base, #0x98] /* IRQ pending reg 1 */ | 72 | ldr \irqnr, [\base, #0x98] /* IRQ pending reg 1 */ |
73 | cmp \irqnr, #0x0 | 73 | cmp \irqnr, #0x0 |
74 | bne 2222f | 74 | bne 2222f |
diff --git a/include/asm-arm/arch-omap/gpio.h b/include/asm-arm/arch-omap/gpio.h index 164da09be095..86621a04cd8f 100644 --- a/include/asm-arm/arch-omap/gpio.h +++ b/include/asm-arm/arch-omap/gpio.h | |||
@@ -82,62 +82,35 @@ extern void omap_set_gpio_debounce_time(int gpio, int enable); | |||
82 | 82 | ||
83 | /*-------------------------------------------------------------------------*/ | 83 | /*-------------------------------------------------------------------------*/ |
84 | 84 | ||
85 | /* wrappers for "new style" GPIO calls. the old OMAP-specfic ones should | 85 | /* Wrappers for "new style" GPIO calls, using the new infrastructure |
86 | * eventually be removed (along with this errno.h inclusion), and maybe | 86 | * which lets us plug in FPGA, I2C, and other implementations. |
87 | * gpios should put MPUIOs last too. | 87 | * * |
88 | * The original OMAP-specfic calls should eventually be removed. | ||
88 | */ | 89 | */ |
89 | 90 | ||
90 | #include <asm/errno.h> | 91 | #include <linux/errno.h> |
91 | 92 | #include <asm-generic/gpio.h> | |
92 | static inline int gpio_request(unsigned gpio, const char *label) | ||
93 | { | ||
94 | return omap_request_gpio(gpio); | ||
95 | } | ||
96 | |||
97 | static inline void gpio_free(unsigned gpio) | ||
98 | { | ||
99 | omap_free_gpio(gpio); | ||
100 | } | ||
101 | |||
102 | static inline int __gpio_set_direction(unsigned gpio, int is_input) | ||
103 | { | ||
104 | if (cpu_class_is_omap2()) { | ||
105 | if (gpio > OMAP_MAX_GPIO_LINES) | ||
106 | return -EINVAL; | ||
107 | } else { | ||
108 | if (gpio > (OMAP_MAX_GPIO_LINES + 16 /* MPUIO */)) | ||
109 | return -EINVAL; | ||
110 | } | ||
111 | omap_set_gpio_direction(gpio, is_input); | ||
112 | return 0; | ||
113 | } | ||
114 | |||
115 | static inline int gpio_direction_input(unsigned gpio) | ||
116 | { | ||
117 | return __gpio_set_direction(gpio, 1); | ||
118 | } | ||
119 | |||
120 | static inline int gpio_direction_output(unsigned gpio, int value) | ||
121 | { | ||
122 | omap_set_gpio_dataout(gpio, value); | ||
123 | return __gpio_set_direction(gpio, 0); | ||
124 | } | ||
125 | 93 | ||
126 | static inline int gpio_get_value(unsigned gpio) | 94 | static inline int gpio_get_value(unsigned gpio) |
127 | { | 95 | { |
128 | return omap_get_gpio_datain(gpio); | 96 | return __gpio_get_value(gpio); |
129 | } | 97 | } |
130 | 98 | ||
131 | static inline void gpio_set_value(unsigned gpio, int value) | 99 | static inline void gpio_set_value(unsigned gpio, int value) |
132 | { | 100 | { |
133 | omap_set_gpio_dataout(gpio, value); | 101 | __gpio_set_value(gpio, value); |
134 | } | 102 | } |
135 | 103 | ||
136 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | 104 | static inline int gpio_cansleep(unsigned gpio) |
105 | { | ||
106 | return __gpio_cansleep(gpio); | ||
107 | } | ||
137 | 108 | ||
138 | static inline int gpio_to_irq(unsigned gpio) | 109 | static inline int gpio_to_irq(unsigned gpio) |
139 | { | 110 | { |
140 | return OMAP_GPIO_IRQ(gpio); | 111 | if (gpio < (OMAP_MAX_GPIO_LINES + 16)) |
112 | return OMAP_GPIO_IRQ(gpio); | ||
113 | return -EINVAL; | ||
141 | } | 114 | } |
142 | 115 | ||
143 | static inline int irq_to_gpio(unsigned irq) | 116 | static inline int irq_to_gpio(unsigned irq) |
diff --git a/include/asm-arm/arch-omap/io.h b/include/asm-arm/arch-omap/io.h index 289082d07f14..160578e1f557 100644 --- a/include/asm-arm/arch-omap/io.h +++ b/include/asm-arm/arch-omap/io.h | |||
@@ -80,6 +80,13 @@ | |||
80 | #define OMAP243X_GPMC_PHYS OMAP243X_GPMC_BASE /* 0x49000000 */ | 80 | #define OMAP243X_GPMC_PHYS OMAP243X_GPMC_BASE /* 0x49000000 */ |
81 | #define OMAP243X_GPMC_VIRT 0xFE000000 | 81 | #define OMAP243X_GPMC_VIRT 0xFE000000 |
82 | #define OMAP243X_GPMC_SIZE SZ_1M | 82 | #define OMAP243X_GPMC_SIZE SZ_1M |
83 | #define OMAP243X_SDRC_PHYS OMAP243X_SDRC_BASE | ||
84 | #define OMAP243X_SDRC_VIRT 0xFD000000 | ||
85 | #define OMAP243X_SDRC_SIZE SZ_1M | ||
86 | #define OMAP243X_SMS_PHYS OMAP243X_SMS_BASE | ||
87 | #define OMAP243X_SMS_VIRT 0xFC000000 | ||
88 | #define OMAP243X_SMS_SIZE SZ_1M | ||
89 | |||
83 | #endif | 90 | #endif |
84 | 91 | ||
85 | #define IO_OFFSET 0x90000000 | 92 | #define IO_OFFSET 0x90000000 |
@@ -88,16 +95,73 @@ | |||
88 | #define io_v2p(va) ((va) - IO_OFFSET) /* Works for L3 and L4 */ | 95 | #define io_v2p(va) ((va) - IO_OFFSET) /* Works for L3 and L4 */ |
89 | 96 | ||
90 | /* DSP */ | 97 | /* DSP */ |
91 | #define DSP_MEM_24XX_PHYS OMAP24XX_DSP_MEM_BASE /* 0x58000000 */ | 98 | #define DSP_MEM_24XX_PHYS OMAP2420_DSP_MEM_BASE /* 0x58000000 */ |
92 | #define DSP_MEM_24XX_VIRT 0xe0000000 | 99 | #define DSP_MEM_24XX_VIRT 0xe0000000 |
93 | #define DSP_MEM_24XX_SIZE 0x28000 | 100 | #define DSP_MEM_24XX_SIZE 0x28000 |
94 | #define DSP_IPI_24XX_PHYS OMAP24XX_DSP_IPI_BASE /* 0x59000000 */ | 101 | #define DSP_IPI_24XX_PHYS OMAP2420_DSP_IPI_BASE /* 0x59000000 */ |
95 | #define DSP_IPI_24XX_VIRT 0xe1000000 | 102 | #define DSP_IPI_24XX_VIRT 0xe1000000 |
96 | #define DSP_IPI_24XX_SIZE SZ_4K | 103 | #define DSP_IPI_24XX_SIZE SZ_4K |
97 | #define DSP_MMU_24XX_PHYS OMAP24XX_DSP_MMU_BASE /* 0x5a000000 */ | 104 | #define DSP_MMU_24XX_PHYS OMAP2420_DSP_MMU_BASE /* 0x5a000000 */ |
98 | #define DSP_MMU_24XX_VIRT 0xe2000000 | 105 | #define DSP_MMU_24XX_VIRT 0xe2000000 |
99 | #define DSP_MMU_24XX_SIZE SZ_4K | 106 | #define DSP_MMU_24XX_SIZE SZ_4K |
100 | 107 | ||
108 | #elif defined(CONFIG_ARCH_OMAP3) | ||
109 | |||
110 | /* We map both L3 and L4 on OMAP3 */ | ||
111 | #define L3_34XX_PHYS L3_34XX_BASE /* 0x68000000 */ | ||
112 | #define L3_34XX_VIRT 0xf8000000 | ||
113 | #define L3_34XX_SIZE SZ_1M /* 44kB of 128MB used, want 1MB sect */ | ||
114 | |||
115 | #define L4_34XX_PHYS L4_34XX_BASE /* 0x48000000 */ | ||
116 | #define L4_34XX_VIRT 0xd8000000 | ||
117 | #define L4_34XX_SIZE SZ_4M /* 1MB of 128MB used, want 1MB sect */ | ||
118 | |||
119 | /* | ||
120 | * Need to look at the Size 4M for L4. | ||
121 | * VPOM3430 was not working for Int controller | ||
122 | */ | ||
123 | |||
124 | #define L4_WK_34XX_PHYS L4_WK_34XX_BASE /* 0x48300000 */ | ||
125 | #define L4_WK_34XX_VIRT 0xd8300000 | ||
126 | #define L4_WK_34XX_SIZE SZ_1M | ||
127 | |||
128 | #define L4_PER_34XX_PHYS L4_PER_34XX_BASE /* 0x49000000 */ | ||
129 | #define L4_PER_34XX_VIRT 0xd9000000 | ||
130 | #define L4_PER_34XX_SIZE SZ_1M | ||
131 | |||
132 | #define L4_EMU_34XX_PHYS L4_EMU_34XX_BASE /* 0x54000000 */ | ||
133 | #define L4_EMU_34XX_VIRT 0xe4000000 | ||
134 | #define L4_EMU_34XX_SIZE SZ_64M | ||
135 | |||
136 | #define OMAP34XX_GPMC_PHYS OMAP34XX_GPMC_BASE /* 0x6E000000 */ | ||
137 | #define OMAP34XX_GPMC_VIRT 0xFE000000 | ||
138 | #define OMAP34XX_GPMC_SIZE SZ_1M | ||
139 | |||
140 | #define OMAP343X_SMS_PHYS OMAP343X_SMS_BASE /* 0x6C000000 */ | ||
141 | #define OMAP343X_SMS_VIRT 0xFC000000 | ||
142 | #define OMAP343X_SMS_SIZE SZ_1M | ||
143 | |||
144 | #define OMAP343X_SDRC_PHYS OMAP343X_SDRC_BASE /* 0x6D000000 */ | ||
145 | #define OMAP343X_SDRC_VIRT 0xFD000000 | ||
146 | #define OMAP343X_SDRC_SIZE SZ_1M | ||
147 | |||
148 | |||
149 | #define IO_OFFSET 0x90000000 | ||
150 | #define IO_ADDRESS(pa) ((pa) + IO_OFFSET)/* Works for L3 and L4 */ | ||
151 | #define io_p2v(pa) ((pa) + IO_OFFSET)/* Works for L3 and L4 */ | ||
152 | #define io_v2p(va) ((va) - IO_OFFSET)/* Works for L3 and L4 */ | ||
153 | |||
154 | /* DSP */ | ||
155 | #define DSP_MEM_34XX_PHYS OMAP34XX_DSP_MEM_BASE /* 0x58000000 */ | ||
156 | #define DSP_MEM_34XX_VIRT 0xe0000000 | ||
157 | #define DSP_MEM_34XX_SIZE 0x28000 | ||
158 | #define DSP_IPI_34XX_PHYS OMAP34XX_DSP_IPI_BASE /* 0x59000000 */ | ||
159 | #define DSP_IPI_34XX_VIRT 0xe1000000 | ||
160 | #define DSP_IPI_34XX_SIZE SZ_4K | ||
161 | #define DSP_MMU_34XX_PHYS OMAP34XX_DSP_MMU_BASE /* 0x5a000000 */ | ||
162 | #define DSP_MMU_34XX_VIRT 0xe2000000 | ||
163 | #define DSP_MMU_34XX_SIZE SZ_4K | ||
164 | |||
101 | #endif | 165 | #endif |
102 | 166 | ||
103 | #ifndef __ASSEMBLER__ | 167 | #ifndef __ASSEMBLER__ |
diff --git a/include/asm-arm/arch-omap/mux.h b/include/asm-arm/arch-omap/mux.h index b8fff50e6a87..ff9a5b5575fd 100644 --- a/include/asm-arm/arch-omap/mux.h +++ b/include/asm-arm/arch-omap/mux.h | |||
@@ -4,9 +4,10 @@ | |||
4 | * Table of the Omap register configurations for the FUNC_MUX and | 4 | * Table of the Omap register configurations for the FUNC_MUX and |
5 | * PULL_DWN combinations. | 5 | * PULL_DWN combinations. |
6 | * | 6 | * |
7 | * Copyright (C) 2003 - 2005 Nokia Corporation | 7 | * Copyright (C) 2004 - 2008 Texas Instruments Inc. |
8 | * Copyright (C) 2003 - 2008 Nokia Corporation | ||
8 | * | 9 | * |
9 | * Written by Tony Lindgren <tony.lindgren@nokia.com> | 10 | * Written by Tony Lindgren |
10 | * | 11 | * |
11 | * This program is free software; you can redistribute it and/or modify | 12 | * This program is free software; you can redistribute it and/or modify |
12 | * it under the terms of the GNU General Public License as published by | 13 | * it under the terms of the GNU General Public License as published by |
@@ -27,14 +28,6 @@ | |||
27 | * - W8 = ball | 28 | * - W8 = ball |
28 | * - 1610 = 1510 or 1610, none if common for both 1510 and 1610 | 29 | * - 1610 = 1510 or 1610, none if common for both 1510 and 1610 |
29 | * - MMC2_DAT0 = function | 30 | * - MMC2_DAT0 = function |
30 | * | ||
31 | * Change log: | ||
32 | * Added entry for the I2C interface. (02Feb 2004) | ||
33 | * Copyright (C) 2004 Texas Instruments | ||
34 | * | ||
35 | * Added entry for the keypad and uwire CS1. (09Mar 2004) | ||
36 | * Copyright (C) 2004 Texas Instruments | ||
37 | * | ||
38 | */ | 31 | */ |
39 | 32 | ||
40 | #ifndef __ASM_ARCH_MUX_H | 33 | #ifndef __ASM_ARCH_MUX_H |
@@ -469,7 +462,12 @@ enum omap24xx_index { | |||
469 | AA8_242X_GPIO58, | 462 | AA8_242X_GPIO58, |
470 | Y20_24XX_GPIO60, | 463 | Y20_24XX_GPIO60, |
471 | W4__24XX_GPIO74, | 464 | W4__24XX_GPIO74, |
465 | N15_24XX_GPIO85, | ||
472 | M15_24XX_GPIO92, | 466 | M15_24XX_GPIO92, |
467 | P20_24XX_GPIO93, | ||
468 | P18_24XX_GPIO95, | ||
469 | M18_24XX_GPIO96, | ||
470 | L14_24XX_GPIO97, | ||
473 | J15_24XX_GPIO99, | 471 | J15_24XX_GPIO99, |
474 | V14_24XX_GPIO117, | 472 | V14_24XX_GPIO117, |
475 | P14_24XX_GPIO125, | 473 | P14_24XX_GPIO125, |
@@ -494,8 +492,6 @@ enum omap24xx_index { | |||
494 | D3_242X_DMAREQ4, | 492 | D3_242X_DMAREQ4, |
495 | E3_242X_DMAREQ5, | 493 | E3_242X_DMAREQ5, |
496 | 494 | ||
497 | P20_24XX_TSC_IRQ, | ||
498 | |||
499 | /* UART3 */ | 495 | /* UART3 */ |
500 | K15_24XX_UART3_TX, | 496 | K15_24XX_UART3_TX, |
501 | K14_24XX_UART3_RX, | 497 | K14_24XX_UART3_RX, |
@@ -557,13 +553,57 @@ enum omap24xx_index { | |||
557 | B3__24XX_KBR5, | 553 | B3__24XX_KBR5, |
558 | AA4_24XX_KBC2, | 554 | AA4_24XX_KBC2, |
559 | B13_24XX_KBC6, | 555 | B13_24XX_KBC6, |
556 | |||
557 | /* 2430 USB */ | ||
558 | AD9_2430_USB0_PUEN, | ||
559 | Y11_2430_USB0_VP, | ||
560 | AD7_2430_USB0_VM, | ||
561 | AE7_2430_USB0_RCV, | ||
562 | AD4_2430_USB0_TXEN, | ||
563 | AF9_2430_USB0_SE0, | ||
564 | AE6_2430_USB0_DAT, | ||
565 | AD24_2430_USB1_SE0, | ||
566 | AB24_2430_USB1_RCV, | ||
567 | Y25_2430_USB1_TXEN, | ||
568 | AA26_2430_USB1_DAT, | ||
569 | |||
570 | /* 2430 HS-USB */ | ||
571 | AD9_2430_USB0HS_DATA3, | ||
572 | Y11_2430_USB0HS_DATA4, | ||
573 | AD7_2430_USB0HS_DATA5, | ||
574 | AE7_2430_USB0HS_DATA6, | ||
575 | AD4_2430_USB0HS_DATA2, | ||
576 | AF9_2430_USB0HS_DATA0, | ||
577 | AE6_2430_USB0HS_DATA1, | ||
578 | AE8_2430_USB0HS_CLK, | ||
579 | AD8_2430_USB0HS_DIR, | ||
580 | AE5_2430_USB0HS_STP, | ||
581 | AE9_2430_USB0HS_NXT, | ||
582 | AC7_2430_USB0HS_DATA7, | ||
583 | |||
584 | /* 2430 McBSP */ | ||
585 | AC10_2430_MCBSP2_FSX, | ||
586 | AD16_2430_MCBSP2_CLX, | ||
587 | AE13_2430_MCBSP2_DX, | ||
588 | AD13_2430_MCBSP2_DR, | ||
589 | AC10_2430_MCBSP2_FSX_OFF, | ||
590 | AD16_2430_MCBSP2_CLX_OFF, | ||
591 | AE13_2430_MCBSP2_DX_OFF, | ||
592 | AD13_2430_MCBSP2_DR_OFF, | ||
593 | |||
594 | }; | ||
595 | |||
596 | struct omap_mux_cfg { | ||
597 | struct pin_config *pins; | ||
598 | unsigned long size; | ||
599 | int (*cfg_reg)(const struct pin_config *cfg); | ||
560 | }; | 600 | }; |
561 | 601 | ||
562 | #ifdef CONFIG_OMAP_MUX | 602 | #ifdef CONFIG_OMAP_MUX |
563 | /* setup pin muxing in Linux */ | 603 | /* setup pin muxing in Linux */ |
564 | extern int omap1_mux_init(void); | 604 | extern int omap1_mux_init(void); |
565 | extern int omap2_mux_init(void); | 605 | extern int omap2_mux_init(void); |
566 | extern int omap_mux_register(struct pin_config * pins, unsigned long size); | 606 | extern int omap_mux_register(struct omap_mux_cfg *); |
567 | extern int omap_cfg_reg(unsigned long reg_cfg); | 607 | extern int omap_cfg_reg(unsigned long reg_cfg); |
568 | #else | 608 | #else |
569 | /* boot loader does it all (no warnings from CONFIG_OMAP_MUX_WARNINGS) */ | 609 | /* boot loader does it all (no warnings from CONFIG_OMAP_MUX_WARNINGS) */ |
diff --git a/include/asm-arm/arch-omap/omap24xx.h b/include/asm-arm/arch-omap/omap24xx.h index 14c0f9496579..b9fcaae287c8 100644 --- a/include/asm-arm/arch-omap/omap24xx.h +++ b/include/asm-arm/arch-omap/omap24xx.h | |||
@@ -1,3 +1,28 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-omap/omap24xx.h | ||
3 | * | ||
4 | * This file contains the processor specific definitions | ||
5 | * of the TI OMAP24XX. | ||
6 | * | ||
7 | * Copyright (C) 2007 Texas Instruments. | ||
8 | * Copyright (C) 2007 Nokia Corporation. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or modify | ||
11 | * it under the terms of the GNU General Public License as published by | ||
12 | * the Free Software Foundation; either version 2 of the License, or | ||
13 | * (at your option) any later version. | ||
14 | * | ||
15 | * This program is distributed in the hope that it will be useful, | ||
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | * GNU General Public License for more details. | ||
19 | * | ||
20 | * You should have received a copy of the GNU General Public License | ||
21 | * along with this program; if not, write to the Free Software | ||
22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
23 | * | ||
24 | */ | ||
25 | |||
1 | #ifndef __ASM_ARCH_OMAP24XX_H | 26 | #ifndef __ASM_ARCH_OMAP24XX_H |
2 | #define __ASM_ARCH_OMAP24XX_H | 27 | #define __ASM_ARCH_OMAP24XX_H |
3 | 28 | ||
@@ -13,33 +38,70 @@ | |||
13 | 38 | ||
14 | /* interrupt controller */ | 39 | /* interrupt controller */ |
15 | #define OMAP24XX_IC_BASE (L4_24XX_BASE + 0xfe000) | 40 | #define OMAP24XX_IC_BASE (L4_24XX_BASE + 0xfe000) |
16 | #define VA_IC_BASE IO_ADDRESS(OMAP24XX_IC_BASE) | ||
17 | #define OMAP24XX_IVA_INTC_BASE 0x40000000 | 41 | #define OMAP24XX_IVA_INTC_BASE 0x40000000 |
18 | #define IRQ_SIR_IRQ 0x0040 | 42 | #define IRQ_SIR_IRQ 0x0040 |
19 | 43 | ||
20 | #ifdef CONFIG_ARCH_OMAP2420 | 44 | #define OMAP2420_CTRL_BASE L4_24XX_BASE |
21 | #define OMAP24XX_32KSYNCT_BASE (L4_24XX_BASE + 0x4000) | 45 | #define OMAP2420_32KSYNCT_BASE (L4_24XX_BASE + 0x4000) |
22 | #define OMAP24XX_PRCM_BASE (L4_24XX_BASE + 0x8000) | 46 | #define OMAP2420_PRCM_BASE (L4_24XX_BASE + 0x8000) |
23 | #define OMAP24XX_SDRC_BASE (L3_24XX_BASE + 0x9000) | 47 | #define OMAP2420_CM_BASE (L4_24XX_BASE + 0x8000) |
24 | #define OMAP242X_CONTROL_STATUS (L4_24XX_BASE + 0x2f8) | 48 | #define OMAP2420_PRM_BASE OMAP2420_CM_BASE |
25 | #endif | 49 | #define OMAP2420_SDRC_BASE (L3_24XX_BASE + 0x9000) |
50 | #define OMAP2420_SMS_BASE 0x68008000 | ||
26 | 51 | ||
27 | #ifdef CONFIG_ARCH_OMAP2430 | 52 | #define OMAP2430_32KSYNCT_BASE (L4_WK_243X_BASE + 0x20000) |
28 | #define OMAP24XX_32KSYNCT_BASE (L4_WK_243X_BASE + 0x20000) | 53 | #define OMAP2430_PRCM_BASE (L4_WK_243X_BASE + 0x6000) |
29 | #define OMAP24XX_PRCM_BASE (L4_WK_243X_BASE + 0x6000) | 54 | #define OMAP2430_CM_BASE (L4_WK_243X_BASE + 0x6000) |
30 | #define OMAP24XX_SDRC_BASE (0x6D000000) | 55 | #define OMAP2430_PRM_BASE OMAP2430_CM_BASE |
31 | #define OMAP242X_CONTROL_STATUS (L4_24XX_BASE + 0x2f8) | 56 | |
57 | #define OMAP243X_SMS_BASE 0x6C000000 | ||
58 | #define OMAP243X_SDRC_BASE 0x6D000000 | ||
32 | #define OMAP243X_GPMC_BASE 0x6E000000 | 59 | #define OMAP243X_GPMC_BASE 0x6E000000 |
33 | #endif | 60 | #define OMAP243X_SCM_BASE (L4_WK_243X_BASE + 0x2000) |
61 | #define OMAP243X_CTRL_BASE OMAP243X_SCM_BASE | ||
62 | #define OMAP243X_HS_BASE (L4_24XX_BASE + 0x000ac000) | ||
34 | 63 | ||
35 | /* DSP SS */ | 64 | /* DSP SS */ |
36 | #define OMAP24XX_DSP_BASE 0x58000000 | 65 | #define OMAP2420_DSP_BASE 0x58000000 |
37 | #define OMAP24XX_DSP_MEM_BASE (OMAP24XX_DSP_BASE + 0x0) | 66 | #define OMAP2420_DSP_MEM_BASE (OMAP2420_DSP_BASE + 0x0) |
38 | #define OMAP24XX_DSP_IPI_BASE (OMAP24XX_DSP_BASE + 0x1000000) | 67 | #define OMAP2420_DSP_IPI_BASE (OMAP2420_DSP_BASE + 0x1000000) |
39 | #define OMAP24XX_DSP_MMU_BASE (OMAP24XX_DSP_BASE + 0x2000000) | 68 | #define OMAP2420_DSP_MMU_BASE (OMAP2420_DSP_BASE + 0x2000000) |
69 | |||
70 | #define OMAP243X_DSP_BASE 0x5C000000 | ||
71 | #define OMAP243X_DSP_MEM_BASE (OMAP243X_DSP_BASE + 0x0) | ||
72 | #define OMAP243X_DSP_MMU_BASE (OMAP243X_DSP_BASE + 0x1000000) | ||
40 | 73 | ||
41 | /* Mailbox */ | 74 | /* Mailbox */ |
42 | #define OMAP24XX_MAILBOX_BASE (L4_24XX_BASE + 0x94000) | 75 | #define OMAP24XX_MAILBOX_BASE (L4_24XX_BASE + 0x94000) |
43 | 76 | ||
77 | /* Camera */ | ||
78 | #define OMAP24XX_CAMERA_BASE (L4_24XX_BASE + 0x52000) | ||
79 | |||
80 | /* Security */ | ||
81 | #define OMAP24XX_SEC_BASE (L4_24XX_BASE + 0xA0000) | ||
82 | #define OMAP24XX_SEC_RNG_BASE (OMAP24XX_SEC_BASE + 0x0000) | ||
83 | #define OMAP24XX_SEC_DES_BASE (OMAP24XX_SEC_BASE + 0x2000) | ||
84 | #define OMAP24XX_SEC_SHA1MD5_BASE (OMAP24XX_SEC_BASE + 0x4000) | ||
85 | #define OMAP24XX_SEC_AES_BASE (OMAP24XX_SEC_BASE + 0x6000) | ||
86 | #define OMAP24XX_SEC_PKA_BASE (OMAP24XX_SEC_BASE + 0x8000) | ||
87 | |||
88 | #if defined(CONFIG_ARCH_OMAP2420) | ||
89 | |||
90 | #define OMAP2_32KSYNCT_BASE OMAP2420_32KSYNCT_BASE | ||
91 | #define OMAP2_PRCM_BASE OMAP2420_PRCM_BASE | ||
92 | #define OMAP2_CM_BASE OMAP2420_CM_BASE | ||
93 | #define OMAP2_PRM_BASE OMAP2420_PRM_BASE | ||
94 | #define OMAP2_VA_IC_BASE IO_ADDRESS(OMAP24XX_IC_BASE) | ||
95 | |||
96 | #elif defined(CONFIG_ARCH_OMAP2430) | ||
97 | |||
98 | #define OMAP2_32KSYNCT_BASE OMAP2430_32KSYNCT_BASE | ||
99 | #define OMAP2_PRCM_BASE OMAP2430_PRCM_BASE | ||
100 | #define OMAP2_CM_BASE OMAP2430_CM_BASE | ||
101 | #define OMAP2_PRM_BASE OMAP2430_PRM_BASE | ||
102 | #define OMAP2_VA_IC_BASE IO_ADDRESS(OMAP24XX_IC_BASE) | ||
103 | |||
104 | #endif | ||
105 | |||
44 | #endif /* __ASM_ARCH_OMAP24XX_H */ | 106 | #endif /* __ASM_ARCH_OMAP24XX_H */ |
45 | 107 | ||
diff --git a/include/asm-arm/arch-omap/sdrc.h b/include/asm-arm/arch-omap/sdrc.h new file mode 100644 index 000000000000..673b3965befc --- /dev/null +++ b/include/asm-arm/arch-omap/sdrc.h | |||
@@ -0,0 +1,75 @@ | |||
1 | #ifndef ____ASM_ARCH_SDRC_H | ||
2 | #define ____ASM_ARCH_SDRC_H | ||
3 | |||
4 | /* | ||
5 | * OMAP2/3 SDRC/SMS register definitions | ||
6 | * | ||
7 | * Copyright (C) 2007 Texas Instruments, Inc. | ||
8 | * Copyright (C) 2007 Nokia Corporation | ||
9 | * | ||
10 | * Written by Paul Walmsley | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify | ||
13 | * it under the terms of the GNU General Public License version 2 as | ||
14 | * published by the Free Software Foundation. | ||
15 | */ | ||
16 | |||
17 | #include <asm/arch/io.h> | ||
18 | |||
19 | /* SDRC register offsets - read/write with sdrc_{read,write}_reg() */ | ||
20 | |||
21 | #define SDRC_SYSCONFIG 0x010 | ||
22 | #define SDRC_DLLA_CTRL 0x060 | ||
23 | #define SDRC_DLLA_STATUS 0x064 | ||
24 | #define SDRC_DLLB_CTRL 0x068 | ||
25 | #define SDRC_DLLB_STATUS 0x06C | ||
26 | #define SDRC_POWER 0x070 | ||
27 | #define SDRC_MR_0 0x084 | ||
28 | #define SDRC_RFR_CTRL_0 0x0a4 | ||
29 | |||
30 | /* | ||
31 | * These values represent the number of memory clock cycles between | ||
32 | * autorefresh initiation. They assume 1 refresh per 64 ms (JEDEC), 8192 | ||
33 | * rows per device, and include a subtraction of a 50 cycle window in the | ||
34 | * event that the autorefresh command is delayed due to other SDRC activity. | ||
35 | * The '| 1' sets the ARE field to send one autorefresh when the autorefresh | ||
36 | * counter reaches 0. | ||
37 | * | ||
38 | * These represent optimal values for common parts, it won't work for all. | ||
39 | * As long as you scale down, most parameters are still work, they just | ||
40 | * become sub-optimal. The RFR value goes in the opposite direction. If you | ||
41 | * don't adjust it down as your clock period increases the refresh interval | ||
42 | * will not be met. Setting all parameters for complete worst case may work, | ||
43 | * but may cut memory performance by 2x. Due to errata the DLLs need to be | ||
44 | * unlocked and their value needs run time calibration. A dynamic call is | ||
45 | * need for that as no single right value exists acorss production samples. | ||
46 | * | ||
47 | * Only the FULL speed values are given. Current code is such that rate | ||
48 | * changes must be made at DPLLoutx2. The actual value adjustment for low | ||
49 | * frequency operation will be handled by omap_set_performance() | ||
50 | * | ||
51 | * By having the boot loader boot up in the fastest L4 speed available likely | ||
52 | * will result in something which you can switch between. | ||
53 | */ | ||
54 | #define SDRC_RFR_CTRL_165MHz (0x00044c00 | 1) | ||
55 | #define SDRC_RFR_CTRL_133MHz (0x0003de00 | 1) | ||
56 | #define SDRC_RFR_CTRL_100MHz (0x0002da01 | 1) | ||
57 | #define SDRC_RFR_CTRL_110MHz (0x0002da01 | 1) /* Need to calc */ | ||
58 | #define SDRC_RFR_CTRL_BYPASS (0x00005000 | 1) /* Need to calc */ | ||
59 | |||
60 | |||
61 | /* | ||
62 | * SMS register access | ||
63 | */ | ||
64 | |||
65 | |||
66 | #define OMAP242X_SMS_REGADDR(reg) (void __iomem *)IO_ADDRESS(OMAP2420_SMS_BASE + reg) | ||
67 | #define OMAP243X_SMS_REGADDR(reg) (void __iomem *)IO_ADDRESS(OMAP243X_SMS_BASE + reg) | ||
68 | #define OMAP343X_SMS_REGADDR(reg) (void __iomem *)IO_ADDRESS(OMAP343X_SMS_BASE + reg) | ||
69 | |||
70 | /* SMS register offsets - read/write with sms_{read,write}_reg() */ | ||
71 | |||
72 | #define SMS_SYSCONFIG 0x010 | ||
73 | /* REVISIT: fill in other SMS registers here */ | ||
74 | |||
75 | #endif | ||
diff --git a/include/asm-arm/arch-omap/usb.h b/include/asm-arm/arch-omap/usb.h index 99ae9eabaf71..2147d18aaeae 100644 --- a/include/asm-arm/arch-omap/usb.h +++ b/include/asm-arm/arch-omap/usb.h | |||
@@ -132,14 +132,11 @@ | |||
132 | # define CONF_USB_PWRDN_DP_R (1 << 1) | 132 | # define CONF_USB_PWRDN_DP_R (1 << 1) |
133 | 133 | ||
134 | /* OMAP2 */ | 134 | /* OMAP2 */ |
135 | #define CONTROL_DEVCONF_REG __REG32(L4_24XX_BASE + 0x0274) | ||
136 | # define USB_UNIDIR 0x0 | 135 | # define USB_UNIDIR 0x0 |
137 | # define USB_UNIDIR_TLL 0x1 | 136 | # define USB_UNIDIR_TLL 0x1 |
138 | # define USB_BIDIR 0x2 | 137 | # define USB_BIDIR 0x2 |
139 | # define USB_BIDIR_TLL 0x3 | 138 | # define USB_BIDIR_TLL 0x3 |
140 | # define USBT0WRMODEI(x) ((x) << 22) | 139 | # define USBTXWRMODEI(port, x) ((x) << (22 - (port * 2))) |
141 | # define USBT1WRMODEI(x) ((x) << 20) | ||
142 | # define USBT2WRMODEI(x) ((x) << 18) | ||
143 | # define USBT2TLL5PI (1 << 17) | 140 | # define USBT2TLL5PI (1 << 17) |
144 | # define USB0PUENACTLOI (1 << 16) | 141 | # define USB0PUENACTLOI (1 << 16) |
145 | # define USBSTANDBYCTRL (1 << 15) | 142 | # define USBSTANDBYCTRL (1 << 15) |
diff --git a/include/asm-arm/arch-orion/io.h b/include/asm-arm/arch-orion/io.h deleted file mode 100644 index e0b8c39b9167..000000000000 --- a/include/asm-arm/arch-orion/io.h +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-orion/io.h | ||
3 | * | ||
4 | * Tzachi Perelstein <tzachi@marvell.com> | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #ifndef __ASM_ARM_ARCH_IO_H | ||
12 | #define __ASM_ARM_ARCH_IO_H | ||
13 | |||
14 | #include "orion.h" | ||
15 | |||
16 | #define IO_SPACE_LIMIT 0xffffffff | ||
17 | #define IO_SPACE_REMAP ORION_PCI_SYS_IO_BASE | ||
18 | |||
19 | static inline void __iomem *__io(unsigned long addr) | ||
20 | { | ||
21 | return (void __iomem *)addr; | ||
22 | } | ||
23 | |||
24 | #define __io(a) __io(a) | ||
25 | #define __mem_pci(a) (a) | ||
26 | |||
27 | #endif | ||
diff --git a/include/asm-arm/arch-orion/irqs.h b/include/asm-arm/arch-orion/irqs.h deleted file mode 100644 index eea65ca6076a..000000000000 --- a/include/asm-arm/arch-orion/irqs.h +++ /dev/null | |||
@@ -1,61 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-orion/irqs.h | ||
3 | * | ||
4 | * IRQ definitions for Orion SoC | ||
5 | * | ||
6 | * Maintainer: Tzachi Perelstein <tzachi@marvell.com> | ||
7 | * | ||
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 | #ifndef __ASM_ARCH_IRQS_H__ | ||
14 | #define __ASM_ARCH_IRQS_H__ | ||
15 | |||
16 | #include "orion.h" /* need GPIO_MAX */ | ||
17 | |||
18 | /* | ||
19 | * Orion Main Interrupt Controller | ||
20 | */ | ||
21 | #define IRQ_ORION_BRIDGE 0 | ||
22 | #define IRQ_ORION_DOORBELL_H2C 1 | ||
23 | #define IRQ_ORION_DOORBELL_C2H 2 | ||
24 | #define IRQ_ORION_UART0 3 | ||
25 | #define IRQ_ORION_UART1 4 | ||
26 | #define IRQ_ORION_I2C 5 | ||
27 | #define IRQ_ORION_GPIO_0_7 6 | ||
28 | #define IRQ_ORION_GPIO_8_15 7 | ||
29 | #define IRQ_ORION_GPIO_16_23 8 | ||
30 | #define IRQ_ORION_GPIO_24_31 9 | ||
31 | #define IRQ_ORION_PCIE0_ERR 10 | ||
32 | #define IRQ_ORION_PCIE0_INT 11 | ||
33 | #define IRQ_ORION_USB1_CTRL 12 | ||
34 | #define IRQ_ORION_DEV_BUS_ERR 14 | ||
35 | #define IRQ_ORION_PCI_ERR 15 | ||
36 | #define IRQ_ORION_USB_BR_ERR 16 | ||
37 | #define IRQ_ORION_USB0_CTRL 17 | ||
38 | #define IRQ_ORION_ETH_RX 18 | ||
39 | #define IRQ_ORION_ETH_TX 19 | ||
40 | #define IRQ_ORION_ETH_MISC 20 | ||
41 | #define IRQ_ORION_ETH_SUM 21 | ||
42 | #define IRQ_ORION_ETH_ERR 22 | ||
43 | #define IRQ_ORION_IDMA_ERR 23 | ||
44 | #define IRQ_ORION_IDMA_0 24 | ||
45 | #define IRQ_ORION_IDMA_1 25 | ||
46 | #define IRQ_ORION_IDMA_2 26 | ||
47 | #define IRQ_ORION_IDMA_3 27 | ||
48 | #define IRQ_ORION_CESA 28 | ||
49 | #define IRQ_ORION_SATA 29 | ||
50 | #define IRQ_ORION_XOR0 30 | ||
51 | #define IRQ_ORION_XOR1 31 | ||
52 | |||
53 | /* | ||
54 | * Orion General Purpose Pins | ||
55 | */ | ||
56 | #define IRQ_ORION_GPIO_START 32 | ||
57 | #define NR_GPIO_IRQS GPIO_MAX | ||
58 | |||
59 | #define NR_IRQS (IRQ_ORION_GPIO_START + NR_GPIO_IRQS) | ||
60 | |||
61 | #endif /* __ASM_ARCH_IRQS_H__ */ | ||
diff --git a/include/asm-arm/arch-orion/orion.h b/include/asm-arm/arch-orion/orion.h deleted file mode 100644 index 673a418a7419..000000000000 --- a/include/asm-arm/arch-orion/orion.h +++ /dev/null | |||
@@ -1,165 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-orion/orion.h | ||
3 | * | ||
4 | * Generic definitions of Orion SoC flavors: | ||
5 | * Orion-1, Orion-NAS, Orion-VoIP, and Orion-2. | ||
6 | * | ||
7 | * Maintainer: Tzachi Perelstein <tzachi@marvell.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASM_ARCH_ORION_H__ | ||
15 | #define __ASM_ARCH_ORION_H__ | ||
16 | |||
17 | /***************************************************************************** | ||
18 | * Orion Address Map | ||
19 | * | ||
20 | * virt phys size | ||
21 | * fdd00000 f1000000 1M on-chip peripheral registers | ||
22 | * fde00000 f2000000 1M PCIe I/O space | ||
23 | * fdf00000 f2100000 1M PCI I/O space | ||
24 | * fe000000 f0000000 16M PCIe WA space (Orion-NAS only) | ||
25 | ****************************************************************************/ | ||
26 | #define ORION_REGS_PHYS_BASE 0xf1000000 | ||
27 | #define ORION_REGS_VIRT_BASE 0xfdd00000 | ||
28 | #define ORION_REGS_SIZE SZ_1M | ||
29 | |||
30 | #define ORION_PCIE_IO_PHYS_BASE 0xf2000000 | ||
31 | #define ORION_PCIE_IO_VIRT_BASE 0xfde00000 | ||
32 | #define ORION_PCIE_IO_BUS_BASE 0x00000000 | ||
33 | #define ORION_PCIE_IO_SIZE SZ_1M | ||
34 | |||
35 | #define ORION_PCI_IO_PHYS_BASE 0xf2100000 | ||
36 | #define ORION_PCI_IO_VIRT_BASE 0xfdf00000 | ||
37 | #define ORION_PCI_IO_BUS_BASE 0x00100000 | ||
38 | #define ORION_PCI_IO_SIZE SZ_1M | ||
39 | |||
40 | /* Relevant only for Orion-NAS */ | ||
41 | #define ORION_PCIE_WA_PHYS_BASE 0xf0000000 | ||
42 | #define ORION_PCIE_WA_VIRT_BASE 0xfe000000 | ||
43 | #define ORION_PCIE_WA_SIZE SZ_16M | ||
44 | |||
45 | #define ORION_PCIE_MEM_PHYS_BASE 0xe0000000 | ||
46 | #define ORION_PCIE_MEM_SIZE SZ_128M | ||
47 | |||
48 | #define ORION_PCI_MEM_PHYS_BASE 0xe8000000 | ||
49 | #define ORION_PCI_MEM_SIZE SZ_128M | ||
50 | |||
51 | /******************************************************************************* | ||
52 | * Supported Devices & Revisions | ||
53 | ******************************************************************************/ | ||
54 | /* Orion-1 (88F5181) */ | ||
55 | #define MV88F5181_DEV_ID 0x5181 | ||
56 | #define MV88F5181_REV_B1 3 | ||
57 | /* Orion-NAS (88F5182) */ | ||
58 | #define MV88F5182_DEV_ID 0x5182 | ||
59 | #define MV88F5182_REV_A2 2 | ||
60 | /* Orion-2 (88F5281) */ | ||
61 | #define MV88F5281_DEV_ID 0x5281 | ||
62 | #define MV88F5281_REV_D1 5 | ||
63 | #define MV88F5281_REV_D2 6 | ||
64 | |||
65 | /******************************************************************************* | ||
66 | * Orion Registers Map | ||
67 | ******************************************************************************/ | ||
68 | #define ORION_DDR_VIRT_BASE (ORION_REGS_VIRT_BASE | 0x00000) | ||
69 | #define ORION_DDR_REG(x) (ORION_DDR_VIRT_BASE | (x)) | ||
70 | |||
71 | #define ORION_DEV_BUS_PHYS_BASE (ORION_REGS_PHYS_BASE | 0x10000) | ||
72 | #define ORION_DEV_BUS_VIRT_BASE (ORION_REGS_VIRT_BASE | 0x10000) | ||
73 | #define ORION_DEV_BUS_REG(x) (ORION_DEV_BUS_VIRT_BASE | (x)) | ||
74 | #define I2C_PHYS_BASE (ORION_DEV_BUS_PHYS_BASE | 0x1000) | ||
75 | #define UART0_PHYS_BASE (ORION_DEV_BUS_PHYS_BASE | 0x2000) | ||
76 | #define UART0_VIRT_BASE (ORION_DEV_BUS_VIRT_BASE | 0x2000) | ||
77 | #define UART1_PHYS_BASE (ORION_DEV_BUS_PHYS_BASE | 0x2100) | ||
78 | #define UART1_VIRT_BASE (ORION_DEV_BUS_VIRT_BASE | 0x2100) | ||
79 | |||
80 | #define ORION_BRIDGE_VIRT_BASE (ORION_REGS_VIRT_BASE | 0x20000) | ||
81 | #define ORION_BRIDGE_REG(x) (ORION_BRIDGE_VIRT_BASE | (x)) | ||
82 | |||
83 | #define ORION_PCI_VIRT_BASE (ORION_REGS_VIRT_BASE | 0x30000) | ||
84 | #define ORION_PCI_REG(x) (ORION_PCI_VIRT_BASE | (x)) | ||
85 | |||
86 | #define ORION_PCIE_VIRT_BASE (ORION_REGS_VIRT_BASE | 0x40000) | ||
87 | #define ORION_PCIE_REG(x) (ORION_PCIE_VIRT_BASE | (x)) | ||
88 | |||
89 | #define ORION_USB0_PHYS_BASE (ORION_REGS_PHYS_BASE | 0x50000) | ||
90 | #define ORION_USB0_VIRT_BASE (ORION_REGS_VIRT_BASE | 0x50000) | ||
91 | #define ORION_USB0_REG(x) (ORION_USB0_VIRT_BASE | (x)) | ||
92 | |||
93 | #define ORION_ETH_PHYS_BASE (ORION_REGS_PHYS_BASE | 0x70000) | ||
94 | #define ORION_ETH_VIRT_BASE (ORION_REGS_VIRT_BASE | 0x70000) | ||
95 | #define ORION_ETH_REG(x) (ORION_ETH_VIRT_BASE | (x)) | ||
96 | |||
97 | #define ORION_SATA_PHYS_BASE (ORION_REGS_PHYS_BASE | 0x80000) | ||
98 | #define ORION_SATA_VIRT_BASE (ORION_REGS_VIRT_BASE | 0x80000) | ||
99 | #define ORION_SATA_REG(x) (ORION_SATA_VIRT_BASE | (x)) | ||
100 | |||
101 | #define ORION_USB1_PHYS_BASE (ORION_REGS_PHYS_BASE | 0xa0000) | ||
102 | #define ORION_USB1_VIRT_BASE (ORION_REGS_VIRT_BASE | 0xa0000) | ||
103 | #define ORION_USB1_REG(x) (ORION_USB1_VIRT_BASE | (x)) | ||
104 | |||
105 | /******************************************************************************* | ||
106 | * Device Bus Registers | ||
107 | ******************************************************************************/ | ||
108 | #define MPP_0_7_CTRL ORION_DEV_BUS_REG(0x000) | ||
109 | #define MPP_8_15_CTRL ORION_DEV_BUS_REG(0x004) | ||
110 | #define MPP_16_19_CTRL ORION_DEV_BUS_REG(0x050) | ||
111 | #define MPP_DEV_CTRL ORION_DEV_BUS_REG(0x008) | ||
112 | #define MPP_RESET_SAMPLE ORION_DEV_BUS_REG(0x010) | ||
113 | #define GPIO_OUT ORION_DEV_BUS_REG(0x100) | ||
114 | #define GPIO_IO_CONF ORION_DEV_BUS_REG(0x104) | ||
115 | #define GPIO_BLINK_EN ORION_DEV_BUS_REG(0x108) | ||
116 | #define GPIO_IN_POL ORION_DEV_BUS_REG(0x10c) | ||
117 | #define GPIO_DATA_IN ORION_DEV_BUS_REG(0x110) | ||
118 | #define GPIO_EDGE_CAUSE ORION_DEV_BUS_REG(0x114) | ||
119 | #define GPIO_EDGE_MASK ORION_DEV_BUS_REG(0x118) | ||
120 | #define GPIO_LEVEL_MASK ORION_DEV_BUS_REG(0x11c) | ||
121 | #define DEV_BANK_0_PARAM ORION_DEV_BUS_REG(0x45c) | ||
122 | #define DEV_BANK_1_PARAM ORION_DEV_BUS_REG(0x460) | ||
123 | #define DEV_BANK_2_PARAM ORION_DEV_BUS_REG(0x464) | ||
124 | #define DEV_BANK_BOOT_PARAM ORION_DEV_BUS_REG(0x46c) | ||
125 | #define DEV_BUS_CTRL ORION_DEV_BUS_REG(0x4c0) | ||
126 | #define DEV_BUS_INT_CAUSE ORION_DEV_BUS_REG(0x4d0) | ||
127 | #define DEV_BUS_INT_MASK ORION_DEV_BUS_REG(0x4d4) | ||
128 | #define GPIO_MAX 32 | ||
129 | |||
130 | /*************************************************************************** | ||
131 | * Orion CPU Bridge Registers | ||
132 | **************************************************************************/ | ||
133 | #define CPU_CONF ORION_BRIDGE_REG(0x100) | ||
134 | #define CPU_CTRL ORION_BRIDGE_REG(0x104) | ||
135 | #define CPU_RESET_MASK ORION_BRIDGE_REG(0x108) | ||
136 | #define CPU_SOFT_RESET ORION_BRIDGE_REG(0x10c) | ||
137 | #define POWER_MNG_CTRL_REG ORION_BRIDGE_REG(0x11C) | ||
138 | #define BRIDGE_CAUSE ORION_BRIDGE_REG(0x110) | ||
139 | #define BRIDGE_MASK ORION_BRIDGE_REG(0x114) | ||
140 | #define MAIN_IRQ_CAUSE ORION_BRIDGE_REG(0x200) | ||
141 | #define MAIN_IRQ_MASK ORION_BRIDGE_REG(0x204) | ||
142 | #define TIMER_CTRL ORION_BRIDGE_REG(0x300) | ||
143 | #define TIMER_VAL(x) ORION_BRIDGE_REG(0x314 + ((x) * 8)) | ||
144 | #define TIMER_VAL_RELOAD(x) ORION_BRIDGE_REG(0x310 + ((x) * 8)) | ||
145 | |||
146 | #ifndef __ASSEMBLY__ | ||
147 | |||
148 | /******************************************************************************* | ||
149 | * Helpers to access Orion registers | ||
150 | ******************************************************************************/ | ||
151 | #include <asm/types.h> | ||
152 | #include <asm/io.h> | ||
153 | |||
154 | #define orion_read(r) __raw_readl(r) | ||
155 | #define orion_write(r, val) __raw_writel(val, r) | ||
156 | |||
157 | /* | ||
158 | * These are not preempt safe. Locks, if needed, must be taken care by caller. | ||
159 | */ | ||
160 | #define orion_setbits(r, mask) orion_write((r), orion_read(r) | (mask)) | ||
161 | #define orion_clrbits(r, mask) orion_write((r), orion_read(r) & ~(mask)) | ||
162 | |||
163 | #endif /* __ASSEMBLY__ */ | ||
164 | |||
165 | #endif /* __ASM_ARCH_ORION_H__ */ | ||
diff --git a/include/asm-arm/arch-orion/timex.h b/include/asm-arm/arch-orion/timex.h deleted file mode 100644 index 26c2c91eecf0..000000000000 --- a/include/asm-arm/arch-orion/timex.h +++ /dev/null | |||
@@ -1,12 +0,0 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-orion/timex.h | ||
3 | * | ||
4 | * Tzachi Perelstein <tzachi@marvell.com> | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #define ORION_TCLK 166666667 | ||
12 | #define CLOCK_TICK_RATE ORION_TCLK | ||
diff --git a/include/asm-arm/arch-orion/debug-macro.S b/include/asm-arm/arch-orion5x/debug-macro.S index 2746220f5d85..4f98f3ba2929 100644 --- a/include/asm-arm/arch-orion/debug-macro.S +++ b/include/asm-arm/arch-orion5x/debug-macro.S | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * linux/include/asm-arm/arch-orion/debug-macro.S | 2 | * include/asm-arm/arch-orion5x/debug-macro.S |
3 | * | 3 | * |
4 | * Debugging macro include header | 4 | * Debugging macro include header |
5 | * | 5 | * |
@@ -8,13 +8,13 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <asm/arch/orion.h> | 11 | #include <asm/arch/orion5x.h> |
12 | 12 | ||
13 | .macro addruart,rx | 13 | .macro addruart,rx |
14 | mrc p15, 0, \rx, c1, c0 | 14 | mrc p15, 0, \rx, c1, c0 |
15 | tst \rx, #1 @ MMU enabled? | 15 | tst \rx, #1 @ MMU enabled? |
16 | ldreq \rx, =ORION_REGS_PHYS_BASE | 16 | ldreq \rx, =ORION5X_REGS_PHYS_BASE |
17 | ldrne \rx, =ORION_REGS_VIRT_BASE | 17 | ldrne \rx, =ORION5X_REGS_VIRT_BASE |
18 | orr \rx, \rx, #0x00012000 | 18 | orr \rx, \rx, #0x00012000 |
19 | .endm | 19 | .endm |
20 | 20 | ||
diff --git a/include/asm-arm/arch-orion/dma.h b/include/asm-arm/arch-orion5x/dma.h index 40a8c178f10d..40a8c178f10d 100644 --- a/include/asm-arm/arch-orion/dma.h +++ b/include/asm-arm/arch-orion5x/dma.h | |||
diff --git a/include/asm-arm/arch-orion/entry-macro.S b/include/asm-arm/arch-orion5x/entry-macro.S index cda096b2acfd..d8ef54c0ee9a 100644 --- a/include/asm-arm/arch-orion/entry-macro.S +++ b/include/asm-arm/arch-orion5x/entry-macro.S | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-orion/entry-macro.S | 2 | * include/asm-arm/arch-orion5x/entry-macro.S |
3 | * | 3 | * |
4 | * Low-level IRQ helper macros for Orion platforms | 4 | * Low-level IRQ helper macros for Orion platforms |
5 | * | 5 | * |
@@ -8,7 +8,7 @@ | |||
8 | * warranty of any kind, whether express or implied. | 8 | * warranty of any kind, whether express or implied. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <asm/arch/orion.h> | 11 | #include <asm/arch/orion5x.h> |
12 | 12 | ||
13 | .macro disable_fiq | 13 | .macro disable_fiq |
14 | .endm | 14 | .endm |
diff --git a/include/asm-arm/arch-orion/gpio.h b/include/asm-arm/arch-orion5x/gpio.h index d66284f9a14c..c85e498388b6 100644 --- a/include/asm-arm/arch-orion/gpio.h +++ b/include/asm-arm/arch-orion5x/gpio.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-orion/gpio.h | 2 | * include/asm-arm/arch-orion5x/gpio.h |
3 | * | 3 | * |
4 | * This file is licensed under the terms of the GNU General Public | 4 | * This file is licensed under the terms of the GNU General Public |
5 | * License version 2. This program is licensed "as is" without any | 5 | * License version 2. This program is licensed "as is" without any |
@@ -12,17 +12,17 @@ extern int gpio_direction_input(unsigned pin); | |||
12 | extern int gpio_direction_output(unsigned pin, int value); | 12 | extern int gpio_direction_output(unsigned pin, int value); |
13 | extern int gpio_get_value(unsigned pin); | 13 | extern int gpio_get_value(unsigned pin); |
14 | extern void gpio_set_value(unsigned pin, int value); | 14 | extern void gpio_set_value(unsigned pin, int value); |
15 | extern void orion_gpio_set_blink(unsigned pin, int blink); | 15 | extern void orion5x_gpio_set_blink(unsigned pin, int blink); |
16 | extern void gpio_display(void); /* debug */ | 16 | extern void gpio_display(void); /* debug */ |
17 | 17 | ||
18 | static inline int gpio_to_irq(int pin) | 18 | static inline int gpio_to_irq(int pin) |
19 | { | 19 | { |
20 | return pin + IRQ_ORION_GPIO_START; | 20 | return pin + IRQ_ORION5X_GPIO_START; |
21 | } | 21 | } |
22 | 22 | ||
23 | static inline int irq_to_gpio(int irq) | 23 | static inline int irq_to_gpio(int irq) |
24 | { | 24 | { |
25 | return irq - IRQ_ORION_GPIO_START; | 25 | return irq - IRQ_ORION5X_GPIO_START; |
26 | } | 26 | } |
27 | 27 | ||
28 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | 28 | #include <asm-generic/gpio.h> /* cansleep wrappers */ |
diff --git a/include/asm-arm/arch-orion/hardware.h b/include/asm-arm/arch-orion5x/hardware.h index 65da374de735..5d2d8e0b5630 100644 --- a/include/asm-arm/arch-orion/hardware.h +++ b/include/asm-arm/arch-orion5x/hardware.h | |||
@@ -1,21 +1,21 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-orion/hardware.h | 2 | * include/asm-arm/arch-orion5x/hardware.h |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License version 2 as | 5 | * it under the terms of the GNU General Public License version 2 as |
6 | * published by the Free Software Foundation. | 6 | * published by the Free Software Foundation. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #ifndef __ASM_ARCH_HARDWARE_H__ | 9 | #ifndef __ASM_ARCH_HARDWARE_H |
10 | #define __ASM_ARCH_HARDWARE_H__ | 10 | #define __ASM_ARCH_HARDWARE_H |
11 | 11 | ||
12 | #include "orion.h" | 12 | #include "orion5x.h" |
13 | 13 | ||
14 | #define pcibios_assign_all_busses() 1 | 14 | #define pcibios_assign_all_busses() 1 |
15 | 15 | ||
16 | #define PCIBIOS_MIN_IO 0x00001000 | 16 | #define PCIBIOS_MIN_IO 0x00001000 |
17 | #define PCIBIOS_MIN_MEM 0x01000000 | 17 | #define PCIBIOS_MIN_MEM 0x01000000 |
18 | #define PCIMEM_BASE ORION_PCIE_MEM_PHYS_BASE | 18 | #define PCIMEM_BASE ORION5X_PCIE_MEM_PHYS_BASE |
19 | 19 | ||
20 | 20 | ||
21 | #endif | 21 | #endif |
diff --git a/include/asm-arm/arch-orion5x/io.h b/include/asm-arm/arch-orion5x/io.h new file mode 100644 index 000000000000..5148ab7ad1f8 --- /dev/null +++ b/include/asm-arm/arch-orion5x/io.h | |||
@@ -0,0 +1,68 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-orion5x/io.h | ||
3 | * | ||
4 | * Tzachi Perelstein <tzachi@marvell.com> | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #ifndef __ASM_ARCH_IO_H | ||
12 | #define __ASM_ARCH_IO_H | ||
13 | |||
14 | #include "orion5x.h" | ||
15 | |||
16 | #define IO_SPACE_LIMIT 0xffffffff | ||
17 | #define IO_SPACE_REMAP ORION5X_PCI_SYS_IO_BASE | ||
18 | |||
19 | static inline void __iomem * | ||
20 | __arch_ioremap(unsigned long paddr, size_t size, unsigned int mtype) | ||
21 | { | ||
22 | void __iomem *retval; | ||
23 | |||
24 | if (mtype == MT_DEVICE && size && paddr >= ORION5X_REGS_PHYS_BASE && | ||
25 | paddr + size <= ORION5X_REGS_PHYS_BASE + ORION5X_REGS_SIZE) { | ||
26 | retval = (void __iomem *)ORION5X_REGS_VIRT_BASE + | ||
27 | (paddr - ORION5X_REGS_PHYS_BASE); | ||
28 | } else { | ||
29 | retval = __arm_ioremap(paddr, size, mtype); | ||
30 | } | ||
31 | |||
32 | return retval; | ||
33 | } | ||
34 | |||
35 | static inline void | ||
36 | __arch_iounmap(void __iomem *addr) | ||
37 | { | ||
38 | if (addr < (void __iomem *)ORION5X_REGS_VIRT_BASE || | ||
39 | addr >= (void __iomem *)(ORION5X_REGS_VIRT_BASE + ORION5X_REGS_SIZE)) | ||
40 | __iounmap(addr); | ||
41 | } | ||
42 | |||
43 | static inline void __iomem *__io(unsigned long addr) | ||
44 | { | ||
45 | return (void __iomem *)addr; | ||
46 | } | ||
47 | |||
48 | #define __arch_ioremap(p, s, m) __arch_ioremap(p, s, m) | ||
49 | #define __arch_iounmap(a) __arch_iounmap(a) | ||
50 | #define __io(a) __io(a) | ||
51 | #define __mem_pci(a) (a) | ||
52 | |||
53 | |||
54 | /***************************************************************************** | ||
55 | * Helpers to access Orion registers | ||
56 | ****************************************************************************/ | ||
57 | #define orion5x_read(r) __raw_readl(r) | ||
58 | #define orion5x_write(r, val) __raw_writel(val, r) | ||
59 | |||
60 | /* | ||
61 | * These are not preempt-safe. Locks, if needed, must be taken | ||
62 | * care of by the caller. | ||
63 | */ | ||
64 | #define orion5x_setbits(r, mask) orion5x_write((r), orion5x_read(r) | (mask)) | ||
65 | #define orion5x_clrbits(r, mask) orion5x_write((r), orion5x_read(r) & ~(mask)) | ||
66 | |||
67 | |||
68 | #endif | ||
diff --git a/include/asm-arm/arch-orion5x/irqs.h b/include/asm-arm/arch-orion5x/irqs.h new file mode 100644 index 000000000000..abdd61a4833a --- /dev/null +++ b/include/asm-arm/arch-orion5x/irqs.h | |||
@@ -0,0 +1,62 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-orion5x/irqs.h | ||
3 | * | ||
4 | * IRQ definitions for Orion SoC | ||
5 | * | ||
6 | * Maintainer: Tzachi Perelstein <tzachi@marvell.com> | ||
7 | * | ||
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 | #ifndef __ASM_ARCH_IRQS_H | ||
14 | #define __ASM_ARCH_IRQS_H | ||
15 | |||
16 | #include "orion5x.h" /* need GPIO_MAX */ | ||
17 | |||
18 | /* | ||
19 | * Orion Main Interrupt Controller | ||
20 | */ | ||
21 | #define IRQ_ORION5X_BRIDGE 0 | ||
22 | #define IRQ_ORION5X_DOORBELL_H2C 1 | ||
23 | #define IRQ_ORION5X_DOORBELL_C2H 2 | ||
24 | #define IRQ_ORION5X_UART0 3 | ||
25 | #define IRQ_ORION5X_UART1 4 | ||
26 | #define IRQ_ORION5X_I2C 5 | ||
27 | #define IRQ_ORION5X_GPIO_0_7 6 | ||
28 | #define IRQ_ORION5X_GPIO_8_15 7 | ||
29 | #define IRQ_ORION5X_GPIO_16_23 8 | ||
30 | #define IRQ_ORION5X_GPIO_24_31 9 | ||
31 | #define IRQ_ORION5X_PCIE0_ERR 10 | ||
32 | #define IRQ_ORION5X_PCIE0_INT 11 | ||
33 | #define IRQ_ORION5X_USB1_CTRL 12 | ||
34 | #define IRQ_ORION5X_DEV_BUS_ERR 14 | ||
35 | #define IRQ_ORION5X_PCI_ERR 15 | ||
36 | #define IRQ_ORION5X_USB_BR_ERR 16 | ||
37 | #define IRQ_ORION5X_USB0_CTRL 17 | ||
38 | #define IRQ_ORION5X_ETH_RX 18 | ||
39 | #define IRQ_ORION5X_ETH_TX 19 | ||
40 | #define IRQ_ORION5X_ETH_MISC 20 | ||
41 | #define IRQ_ORION5X_ETH_SUM 21 | ||
42 | #define IRQ_ORION5X_ETH_ERR 22 | ||
43 | #define IRQ_ORION5X_IDMA_ERR 23 | ||
44 | #define IRQ_ORION5X_IDMA_0 24 | ||
45 | #define IRQ_ORION5X_IDMA_1 25 | ||
46 | #define IRQ_ORION5X_IDMA_2 26 | ||
47 | #define IRQ_ORION5X_IDMA_3 27 | ||
48 | #define IRQ_ORION5X_CESA 28 | ||
49 | #define IRQ_ORION5X_SATA 29 | ||
50 | #define IRQ_ORION5X_XOR0 30 | ||
51 | #define IRQ_ORION5X_XOR1 31 | ||
52 | |||
53 | /* | ||
54 | * Orion General Purpose Pins | ||
55 | */ | ||
56 | #define IRQ_ORION5X_GPIO_START 32 | ||
57 | #define NR_GPIO_IRQS GPIO_MAX | ||
58 | |||
59 | #define NR_IRQS (IRQ_ORION5X_GPIO_START + NR_GPIO_IRQS) | ||
60 | |||
61 | |||
62 | #endif | ||
diff --git a/include/asm-arm/arch-orion/memory.h b/include/asm-arm/arch-orion5x/memory.h index d954dba87ced..80053a7afc7a 100644 --- a/include/asm-arm/arch-orion/memory.h +++ b/include/asm-arm/arch-orion5x/memory.h | |||
@@ -1,15 +1,16 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-orion/memory.h | 2 | * include/asm-arm/arch-orion5x/memory.h |
3 | * | 3 | * |
4 | * Marvell Orion memory definitions | 4 | * Marvell Orion memory definitions |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #ifndef __ASM_ARCH_MMU_H | 7 | #ifndef __ASM_ARCH_MEMORY_H |
8 | #define __ASM_ARCH_MMU_H | 8 | #define __ASM_ARCH_MEMORY_H |
9 | 9 | ||
10 | #define PHYS_OFFSET UL(0x00000000) | 10 | #define PHYS_OFFSET UL(0x00000000) |
11 | 11 | ||
12 | #define __virt_to_bus(x) __virt_to_phys(x) | 12 | #define __virt_to_bus(x) __virt_to_phys(x) |
13 | #define __bus_to_virt(x) __phys_to_virt(x) | 13 | #define __bus_to_virt(x) __phys_to_virt(x) |
14 | 14 | ||
15 | |||
15 | #endif | 16 | #endif |
diff --git a/include/asm-arm/arch-orion5x/orion5x.h b/include/asm-arm/arch-orion5x/orion5x.h new file mode 100644 index 000000000000..206ddd71e193 --- /dev/null +++ b/include/asm-arm/arch-orion5x/orion5x.h | |||
@@ -0,0 +1,159 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-orion5x/orion5x.h | ||
3 | * | ||
4 | * Generic definitions of Orion SoC flavors: | ||
5 | * Orion-1, Orion-NAS, Orion-VoIP, and Orion-2. | ||
6 | * | ||
7 | * Maintainer: Tzachi Perelstein <tzachi@marvell.com> | ||
8 | * | ||
9 | * This file is licensed under the terms of the GNU General Public | ||
10 | * License version 2. This program is licensed "as is" without any | ||
11 | * warranty of any kind, whether express or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASM_ARCH_ORION5X_H | ||
15 | #define __ASM_ARCH_ORION5X_H | ||
16 | |||
17 | /***************************************************************************** | ||
18 | * Orion Address Maps | ||
19 | * | ||
20 | * phys | ||
21 | * e0000000 PCIe MEM space | ||
22 | * e8000000 PCI MEM space | ||
23 | * f0000000 PCIe WA space (Orion-1/Orion-NAS only) | ||
24 | * f1000000 on-chip peripheral registers | ||
25 | * f2000000 PCIe I/O space | ||
26 | * f2100000 PCI I/O space | ||
27 | * f4000000 device bus mappings (boot) | ||
28 | * fa000000 device bus mappings (cs0) | ||
29 | * fa800000 device bus mappings (cs2) | ||
30 | * fc000000 device bus mappings (cs0/cs1) | ||
31 | * | ||
32 | * virt phys size | ||
33 | * fdd00000 f1000000 1M on-chip peripheral registers | ||
34 | * fde00000 f2000000 1M PCIe I/O space | ||
35 | * fdf00000 f2100000 1M PCI I/O space | ||
36 | * fe000000 f0000000 16M PCIe WA space (Orion-1/Orion-NAS only) | ||
37 | ****************************************************************************/ | ||
38 | #define ORION5X_REGS_PHYS_BASE 0xf1000000 | ||
39 | #define ORION5X_REGS_VIRT_BASE 0xfdd00000 | ||
40 | #define ORION5X_REGS_SIZE SZ_1M | ||
41 | |||
42 | #define ORION5X_PCIE_IO_PHYS_BASE 0xf2000000 | ||
43 | #define ORION5X_PCIE_IO_VIRT_BASE 0xfde00000 | ||
44 | #define ORION5X_PCIE_IO_BUS_BASE 0x00000000 | ||
45 | #define ORION5X_PCIE_IO_SIZE SZ_1M | ||
46 | |||
47 | #define ORION5X_PCI_IO_PHYS_BASE 0xf2100000 | ||
48 | #define ORION5X_PCI_IO_VIRT_BASE 0xfdf00000 | ||
49 | #define ORION5X_PCI_IO_BUS_BASE 0x00100000 | ||
50 | #define ORION5X_PCI_IO_SIZE SZ_1M | ||
51 | |||
52 | /* Relevant only for Orion-1/Orion-NAS */ | ||
53 | #define ORION5X_PCIE_WA_PHYS_BASE 0xf0000000 | ||
54 | #define ORION5X_PCIE_WA_VIRT_BASE 0xfe000000 | ||
55 | #define ORION5X_PCIE_WA_SIZE SZ_16M | ||
56 | |||
57 | #define ORION5X_PCIE_MEM_PHYS_BASE 0xe0000000 | ||
58 | #define ORION5X_PCIE_MEM_SIZE SZ_128M | ||
59 | |||
60 | #define ORION5X_PCI_MEM_PHYS_BASE 0xe8000000 | ||
61 | #define ORION5X_PCI_MEM_SIZE SZ_128M | ||
62 | |||
63 | /******************************************************************************* | ||
64 | * Supported Devices & Revisions | ||
65 | ******************************************************************************/ | ||
66 | /* Orion-1 (88F5181) */ | ||
67 | #define MV88F5181_DEV_ID 0x5181 | ||
68 | #define MV88F5181_REV_B1 3 | ||
69 | /* Orion-NAS (88F5182) */ | ||
70 | #define MV88F5182_DEV_ID 0x5182 | ||
71 | #define MV88F5182_REV_A2 2 | ||
72 | /* Orion-2 (88F5281) */ | ||
73 | #define MV88F5281_DEV_ID 0x5281 | ||
74 | #define MV88F5281_REV_D1 5 | ||
75 | #define MV88F5281_REV_D2 6 | ||
76 | |||
77 | /******************************************************************************* | ||
78 | * Orion Registers Map | ||
79 | ******************************************************************************/ | ||
80 | #define ORION5X_DDR_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x00000) | ||
81 | #define ORION5X_DDR_REG(x) (ORION5X_DDR_VIRT_BASE | (x)) | ||
82 | |||
83 | #define ORION5X_DEV_BUS_PHYS_BASE (ORION5X_REGS_PHYS_BASE | 0x10000) | ||
84 | #define ORION5X_DEV_BUS_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x10000) | ||
85 | #define ORION5X_DEV_BUS_REG(x) (ORION5X_DEV_BUS_VIRT_BASE | (x)) | ||
86 | #define I2C_PHYS_BASE (ORION5X_DEV_BUS_PHYS_BASE | 0x1000) | ||
87 | #define UART0_PHYS_BASE (ORION5X_DEV_BUS_PHYS_BASE | 0x2000) | ||
88 | #define UART0_VIRT_BASE (ORION5X_DEV_BUS_VIRT_BASE | 0x2000) | ||
89 | #define UART1_PHYS_BASE (ORION5X_DEV_BUS_PHYS_BASE | 0x2100) | ||
90 | #define UART1_VIRT_BASE (ORION5X_DEV_BUS_VIRT_BASE | 0x2100) | ||
91 | |||
92 | #define ORION5X_BRIDGE_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x20000) | ||
93 | #define ORION5X_BRIDGE_REG(x) (ORION5X_BRIDGE_VIRT_BASE | (x)) | ||
94 | #define TIMER_VIRT_BASE (ORION5X_BRIDGE_VIRT_BASE | 0x300) | ||
95 | |||
96 | #define ORION5X_PCI_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x30000) | ||
97 | #define ORION5X_PCI_REG(x) (ORION5X_PCI_VIRT_BASE | (x)) | ||
98 | |||
99 | #define ORION5X_PCIE_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x40000) | ||
100 | #define ORION5X_PCIE_REG(x) (ORION5X_PCIE_VIRT_BASE | (x)) | ||
101 | |||
102 | #define ORION5X_USB0_PHYS_BASE (ORION5X_REGS_PHYS_BASE | 0x50000) | ||
103 | #define ORION5X_USB0_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x50000) | ||
104 | #define ORION5X_USB0_REG(x) (ORION5X_USB0_VIRT_BASE | (x)) | ||
105 | |||
106 | #define ORION5X_ETH_PHYS_BASE (ORION5X_REGS_PHYS_BASE | 0x70000) | ||
107 | #define ORION5X_ETH_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x70000) | ||
108 | #define ORION5X_ETH_REG(x) (ORION5X_ETH_VIRT_BASE | (x)) | ||
109 | |||
110 | #define ORION5X_SATA_PHYS_BASE (ORION5X_REGS_PHYS_BASE | 0x80000) | ||
111 | #define ORION5X_SATA_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0x80000) | ||
112 | #define ORION5X_SATA_REG(x) (ORION5X_SATA_VIRT_BASE | (x)) | ||
113 | |||
114 | #define ORION5X_USB1_PHYS_BASE (ORION5X_REGS_PHYS_BASE | 0xa0000) | ||
115 | #define ORION5X_USB1_VIRT_BASE (ORION5X_REGS_VIRT_BASE | 0xa0000) | ||
116 | #define ORION5X_USB1_REG(x) (ORION5X_USB1_VIRT_BASE | (x)) | ||
117 | |||
118 | /******************************************************************************* | ||
119 | * Device Bus Registers | ||
120 | ******************************************************************************/ | ||
121 | #define MPP_0_7_CTRL ORION5X_DEV_BUS_REG(0x000) | ||
122 | #define MPP_8_15_CTRL ORION5X_DEV_BUS_REG(0x004) | ||
123 | #define MPP_16_19_CTRL ORION5X_DEV_BUS_REG(0x050) | ||
124 | #define MPP_DEV_CTRL ORION5X_DEV_BUS_REG(0x008) | ||
125 | #define MPP_RESET_SAMPLE ORION5X_DEV_BUS_REG(0x010) | ||
126 | #define GPIO_OUT ORION5X_DEV_BUS_REG(0x100) | ||
127 | #define GPIO_IO_CONF ORION5X_DEV_BUS_REG(0x104) | ||
128 | #define GPIO_BLINK_EN ORION5X_DEV_BUS_REG(0x108) | ||
129 | #define GPIO_IN_POL ORION5X_DEV_BUS_REG(0x10c) | ||
130 | #define GPIO_DATA_IN ORION5X_DEV_BUS_REG(0x110) | ||
131 | #define GPIO_EDGE_CAUSE ORION5X_DEV_BUS_REG(0x114) | ||
132 | #define GPIO_EDGE_MASK ORION5X_DEV_BUS_REG(0x118) | ||
133 | #define GPIO_LEVEL_MASK ORION5X_DEV_BUS_REG(0x11c) | ||
134 | #define DEV_BANK_0_PARAM ORION5X_DEV_BUS_REG(0x45c) | ||
135 | #define DEV_BANK_1_PARAM ORION5X_DEV_BUS_REG(0x460) | ||
136 | #define DEV_BANK_2_PARAM ORION5X_DEV_BUS_REG(0x464) | ||
137 | #define DEV_BANK_BOOT_PARAM ORION5X_DEV_BUS_REG(0x46c) | ||
138 | #define DEV_BUS_CTRL ORION5X_DEV_BUS_REG(0x4c0) | ||
139 | #define DEV_BUS_INT_CAUSE ORION5X_DEV_BUS_REG(0x4d0) | ||
140 | #define DEV_BUS_INT_MASK ORION5X_DEV_BUS_REG(0x4d4) | ||
141 | #define GPIO_MAX 32 | ||
142 | |||
143 | /*************************************************************************** | ||
144 | * Orion CPU Bridge Registers | ||
145 | **************************************************************************/ | ||
146 | #define CPU_CONF ORION5X_BRIDGE_REG(0x100) | ||
147 | #define CPU_CTRL ORION5X_BRIDGE_REG(0x104) | ||
148 | #define CPU_RESET_MASK ORION5X_BRIDGE_REG(0x108) | ||
149 | #define CPU_SOFT_RESET ORION5X_BRIDGE_REG(0x10c) | ||
150 | #define POWER_MNG_CTRL_REG ORION5X_BRIDGE_REG(0x11C) | ||
151 | #define BRIDGE_CAUSE ORION5X_BRIDGE_REG(0x110) | ||
152 | #define BRIDGE_MASK ORION5X_BRIDGE_REG(0x114) | ||
153 | #define BRIDGE_INT_TIMER0 0x0002 | ||
154 | #define BRIDGE_INT_TIMER1 0x0004 | ||
155 | #define MAIN_IRQ_CAUSE ORION5X_BRIDGE_REG(0x200) | ||
156 | #define MAIN_IRQ_MASK ORION5X_BRIDGE_REG(0x204) | ||
157 | |||
158 | |||
159 | #endif | ||
diff --git a/include/asm-arm/arch-orion/system.h b/include/asm-arm/arch-orion5x/system.h index 17704c68f90e..3f1d1e2d38f8 100644 --- a/include/asm-arm/arch-orion/system.h +++ b/include/asm-arm/arch-orion5x/system.h | |||
@@ -1,10 +1,10 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-orion/system.h | 2 | * include/asm-arm/arch-orion5x/system.h |
3 | * | 3 | * |
4 | * Tzachi Perelstein <tzachi@marvell.com> | 4 | * Tzachi Perelstein <tzachi@marvell.com> |
5 | * | 5 | * |
6 | * This file is licensed under the terms of the GNU General Public | 6 | * This file is licensed under the terms of the GNU General Public |
7 | * License version 2. This program is licensed "as is" without any | 7 | * License version 2. This program is licensed "as is" without any |
8 | * warranty of any kind, whether express or implied. | 8 | * warranty of any kind, whether express or implied. |
9 | */ | 9 | */ |
10 | 10 | ||
@@ -12,7 +12,7 @@ | |||
12 | #define __ASM_ARCH_SYSTEM_H | 12 | #define __ASM_ARCH_SYSTEM_H |
13 | 13 | ||
14 | #include <asm/arch/hardware.h> | 14 | #include <asm/arch/hardware.h> |
15 | #include <asm/arch/orion.h> | 15 | #include <asm/arch/orion5x.h> |
16 | 16 | ||
17 | static inline void arch_idle(void) | 17 | static inline void arch_idle(void) |
18 | { | 18 | { |
@@ -24,8 +24,9 @@ static inline void arch_reset(char mode) | |||
24 | /* | 24 | /* |
25 | * Enable and issue soft reset | 25 | * Enable and issue soft reset |
26 | */ | 26 | */ |
27 | orion_setbits(CPU_RESET_MASK, (1 << 2)); | 27 | orion5x_setbits(CPU_RESET_MASK, (1 << 2)); |
28 | orion_setbits(CPU_SOFT_RESET, 1); | 28 | orion5x_setbits(CPU_SOFT_RESET, 1); |
29 | } | 29 | } |
30 | 30 | ||
31 | |||
31 | #endif | 32 | #endif |
diff --git a/include/asm-arm/arch-orion5x/timex.h b/include/asm-arm/arch-orion5x/timex.h new file mode 100644 index 000000000000..31c568e28cc3 --- /dev/null +++ b/include/asm-arm/arch-orion5x/timex.h | |||
@@ -0,0 +1,13 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-orion5x/timex.h | ||
3 | * | ||
4 | * Tzachi Perelstein <tzachi@marvell.com> | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #define CLOCK_TICK_RATE (100 * HZ) | ||
12 | |||
13 | #define ORION5X_TCLK 166666667 | ||
diff --git a/include/asm-arm/arch-orion/uncompress.h b/include/asm-arm/arch-orion5x/uncompress.h index 59f44039909a..5c13d4fafb4e 100644 --- a/include/asm-arm/arch-orion/uncompress.h +++ b/include/asm-arm/arch-orion5x/uncompress.h | |||
@@ -1,14 +1,14 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-orion/uncompress.h | 2 | * include/asm-arm/arch-orion5x/uncompress.h |
3 | * | 3 | * |
4 | * Tzachi Perelstein <tzachi@marvell.com> | 4 | * Tzachi Perelstein <tzachi@marvell.com> |
5 | * | 5 | * |
6 | * This file is licensed under the terms of the GNU General Public | 6 | * This file is licensed under the terms of the GNU General Public |
7 | * License version 2. This program is licensed "as is" without any | 7 | * License version 2. This program is licensed "as is" without any |
8 | * warranty of any kind, whether express or implied. | 8 | * warranty of any kind, whether express or implied. |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <asm/arch/orion.h> | 11 | #include <asm/arch/orion5x.h> |
12 | 12 | ||
13 | #define MV_UART_THR ((volatile unsigned char *)(UART0_PHYS_BASE + 0x0)) | 13 | #define MV_UART_THR ((volatile unsigned char *)(UART0_PHYS_BASE + 0x0)) |
14 | #define MV_UART_LSR ((volatile unsigned char *)(UART0_PHYS_BASE + 0x14)) | 14 | #define MV_UART_LSR ((volatile unsigned char *)(UART0_PHYS_BASE + 0x14)) |
diff --git a/include/asm-arm/arch-orion/vmalloc.h b/include/asm-arm/arch-orion5x/vmalloc.h index 9d580278d2bc..2b3061e90dc1 100644 --- a/include/asm-arm/arch-orion/vmalloc.h +++ b/include/asm-arm/arch-orion5x/vmalloc.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-arm/arch-orion/vmalloc.h | 2 | * include/asm-arm/arch-orion5x/vmalloc.h |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #define VMALLOC_END 0xfd800000 | 5 | #define VMALLOC_END 0xfd800000 |
diff --git a/include/asm-arm/arch-pxa/camera.h b/include/asm-arm/arch-pxa/camera.h new file mode 100644 index 000000000000..39516ced8b1f --- /dev/null +++ b/include/asm-arm/arch-pxa/camera.h | |||
@@ -0,0 +1,48 @@ | |||
1 | /* | ||
2 | camera.h - PXA camera driver header file | ||
3 | |||
4 | Copyright (C) 2003, Intel Corporation | ||
5 | Copyright (C) 2008, Guennadi Liakhovetski <kernel@pengutronix.de> | ||
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., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
20 | */ | ||
21 | |||
22 | #ifndef __ASM_ARCH_CAMERA_H_ | ||
23 | #define __ASM_ARCH_CAMERA_H_ | ||
24 | |||
25 | #define PXA_CAMERA_MASTER 1 | ||
26 | #define PXA_CAMERA_DATAWIDTH_4 2 | ||
27 | #define PXA_CAMERA_DATAWIDTH_5 4 | ||
28 | #define PXA_CAMERA_DATAWIDTH_8 8 | ||
29 | #define PXA_CAMERA_DATAWIDTH_9 0x10 | ||
30 | #define PXA_CAMERA_DATAWIDTH_10 0x20 | ||
31 | #define PXA_CAMERA_PCLK_EN 0x40 | ||
32 | #define PXA_CAMERA_MCLK_EN 0x80 | ||
33 | #define PXA_CAMERA_PCP 0x100 | ||
34 | #define PXA_CAMERA_HSP 0x200 | ||
35 | #define PXA_CAMERA_VSP 0x400 | ||
36 | |||
37 | struct pxacamera_platform_data { | ||
38 | int (*init)(struct device *); | ||
39 | int (*power)(struct device *, int); | ||
40 | int (*reset)(struct device *, int); | ||
41 | |||
42 | unsigned long flags; | ||
43 | unsigned long mclk_10khz; | ||
44 | }; | ||
45 | |||
46 | extern void pxa_set_camera_info(struct pxacamera_platform_data *); | ||
47 | |||
48 | #endif /* __ASM_ARCH_CAMERA_H_ */ | ||
diff --git a/include/asm-arm/arch-pxa/gumstix.h b/include/asm-arm/arch-pxa/gumstix.h new file mode 100644 index 000000000000..6fa85c4f94f8 --- /dev/null +++ b/include/asm-arm/arch-pxa/gumstix.h | |||
@@ -0,0 +1,96 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/arch-pxa/gumstix.h | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version 2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | |||
10 | /* BTRESET - Reset line to Bluetooth module, active low signal. */ | ||
11 | #define GPIO_GUMSTIX_BTRESET 7 | ||
12 | #define GPIO_GUMSTIX_BTRESET_MD (GPIO_GUMSTIX_BTRESET | GPIO_OUT) | ||
13 | |||
14 | |||
15 | /* | ||
16 | GPIOn - Input from MAX823 (or equiv), normalizing USB +5V into a clean | ||
17 | interrupt signal for determining cable presence. On the original gumstix, | ||
18 | this is GPIO81, and GPIO83 needs to be defined as well. On the gumstix F, | ||
19 | this moves to GPIO17 and GPIO37. */ | ||
20 | |||
21 | /* GPIOx - Connects to USB D+ and used as a pull-up after GPIOn | ||
22 | has detected a cable insertion; driven low otherwise. */ | ||
23 | |||
24 | #ifdef CONFIG_ARCH_GUMSTIX_ORIG | ||
25 | |||
26 | #define GPIO_GUMSTIX_USB_GPIOn 81 | ||
27 | #define GPIO_GUMSTIX_USB_GPIOx 83 | ||
28 | |||
29 | #else | ||
30 | |||
31 | #define GPIO_GUMSTIX_USB_GPIOn 35 | ||
32 | #define GPIO_GUMSTIX_USB_GPIOx 41 | ||
33 | |||
34 | #endif | ||
35 | |||
36 | /* usb state change */ | ||
37 | #define GUMSTIX_USB_INTR_IRQ IRQ_GPIO(GPIO_GUMSTIX_USB_GPIOn) | ||
38 | |||
39 | #define GPIO_GUMSTIX_USB_GPIOn_MD (GPIO_GUMSTIX_USB_GPIOn | GPIO_IN) | ||
40 | #define GPIO_GUMSTIX_USB_GPIOx_CON_MD (GPIO_GUMSTIX_USB_GPIOx | GPIO_OUT) | ||
41 | #define GPIO_GUMSTIX_USB_GPIOx_DIS_MD (GPIO_GUMSTIX_USB_GPIOx | GPIO_IN) | ||
42 | |||
43 | /* | ||
44 | * SD/MMC definitions | ||
45 | */ | ||
46 | #define GUMSTIX_GPIO_nSD_WP 22 /* SD Write Protect */ | ||
47 | #define GUMSTIX_GPIO_nSD_DETECT 11 /* MMC/SD Card Detect */ | ||
48 | #define GUMSTIX_IRQ_GPIO_nSD_DETECT IRQ_GPIO(GUMSTIX_GPIO_nSD_DETECT) | ||
49 | |||
50 | /* | ||
51 | * SMC Ethernet definitions | ||
52 | * ETH_RST provides a hardware reset line to the ethernet chip | ||
53 | * ETH is the IRQ line in from the ethernet chip to the PXA | ||
54 | */ | ||
55 | #define GPIO_GUMSTIX_ETH0_RST 80 | ||
56 | #define GPIO_GUMSTIX_ETH0_RST_MD (GPIO_GUMSTIX_ETH0_RST | GPIO_OUT) | ||
57 | #define GPIO_GUMSTIX_ETH1_RST 52 | ||
58 | #define GPIO_GUMSTIX_ETH1_RST_MD (GPIO_GUMSTIX_ETH1_RST | GPIO_OUT) | ||
59 | |||
60 | #define GPIO_GUMSTIX_ETH0 36 | ||
61 | #define GPIO_GUMSTIX_ETH0_MD (GPIO_GUMSTIX_ETH0 | GPIO_IN) | ||
62 | #define GUMSTIX_ETH0_IRQ IRQ_GPIO(GPIO_GUMSTIX_ETH0) | ||
63 | #define GPIO_GUMSTIX_ETH1 27 | ||
64 | #define GPIO_GUMSTIX_ETH1_MD (GPIO_GUMSTIX_ETH1 | GPIO_IN) | ||
65 | #define GUMSTIX_ETH1_IRQ IRQ_GPIO(GPIO_GUMSTIX_ETH1) | ||
66 | |||
67 | |||
68 | /* CF reset line */ | ||
69 | #define GPIO8_RESET 8 | ||
70 | |||
71 | /* CF slot 0 */ | ||
72 | #define GPIO4_nBVD1 4 | ||
73 | #define GPIO4_nSTSCHG GPIO4_nBVD1 | ||
74 | #define GPIO11_nCD 11 | ||
75 | #define GPIO26_PRDY_nBSY 26 | ||
76 | #define GUMSTIX_S0_nSTSCHG_IRQ IRQ_GPIO(GPIO4_nSTSCHG) | ||
77 | #define GUMSTIX_S0_nCD_IRQ IRQ_GPIO(GPIO11_nCD) | ||
78 | #define GUMSTIX_S0_PRDY_nBSY_IRQ IRQ_GPIO(GPIO26_PRDY_nBSY) | ||
79 | |||
80 | /* CF slot 1 */ | ||
81 | #define GPIO18_nBVD1 18 | ||
82 | #define GPIO18_nSTSCHG GPIO18_nBVD1 | ||
83 | #define GPIO36_nCD 36 | ||
84 | #define GPIO27_PRDY_nBSY 27 | ||
85 | #define GUMSTIX_S1_nSTSCHG_IRQ IRQ_GPIO(GPIO18_nSTSCHG) | ||
86 | #define GUMSTIX_S1_nCD_IRQ IRQ_GPIO(GPIO36_nCD) | ||
87 | #define GUMSTIX_S1_PRDY_nBSY_IRQ IRQ_GPIO(GPIO27_PRDY_nBSY) | ||
88 | |||
89 | /* CF GPIO line modes */ | ||
90 | #define GPIO4_nSTSCHG_MD (GPIO4_nSTSCHG | GPIO_IN) | ||
91 | #define GPIO8_RESET_MD (GPIO8_RESET | GPIO_OUT) | ||
92 | #define GPIO11_nCD_MD (GPIO11_nCD | GPIO_IN) | ||
93 | #define GPIO18_nSTSCHG_MD (GPIO18_nSTSCHG | GPIO_IN) | ||
94 | #define GPIO26_PRDY_nBSY_MD (GPIO26_PRDY_nBSY | GPIO_IN) | ||
95 | #define GPIO27_PRDY_nBSY_MD (GPIO27_PRDY_nBSY | GPIO_IN) | ||
96 | #define GPIO36_nCD_MD (GPIO36_nCD | GPIO_IN) | ||
diff --git a/include/asm-arm/arch-pxa/irda.h b/include/asm-arm/arch-pxa/irda.h index 748406f384c2..99f4f423a8e1 100644 --- a/include/asm-arm/arch-pxa/irda.h +++ b/include/asm-arm/arch-pxa/irda.h | |||
@@ -10,6 +10,8 @@ | |||
10 | struct pxaficp_platform_data { | 10 | struct pxaficp_platform_data { |
11 | int transceiver_cap; | 11 | int transceiver_cap; |
12 | void (*transceiver_mode)(struct device *dev, int mode); | 12 | void (*transceiver_mode)(struct device *dev, int mode); |
13 | int (*startup)(struct device *dev); | ||
14 | void (*shutdown)(struct device *dev); | ||
13 | }; | 15 | }; |
14 | 16 | ||
15 | extern void pxa_set_ficp_info(struct pxaficp_platform_data *info); | 17 | extern void pxa_set_ficp_info(struct pxaficp_platform_data *info); |
diff --git a/include/asm-arm/arch-pxa/irqs.h b/include/asm-arm/arch-pxa/irqs.h index c562b972a4a6..50c77eacbd5e 100644 --- a/include/asm-arm/arch-pxa/irqs.h +++ b/include/asm-arm/arch-pxa/irqs.h | |||
@@ -181,7 +181,8 @@ | |||
181 | #elif defined(CONFIG_ARCH_LUBBOCK) || \ | 181 | #elif defined(CONFIG_ARCH_LUBBOCK) || \ |
182 | defined(CONFIG_MACH_LOGICPD_PXA270) || \ | 182 | defined(CONFIG_MACH_LOGICPD_PXA270) || \ |
183 | defined(CONFIG_MACH_MAINSTONE) || \ | 183 | defined(CONFIG_MACH_MAINSTONE) || \ |
184 | defined(CONFIG_MACH_PCM027) | 184 | defined(CONFIG_MACH_PCM027) || \ |
185 | defined(CONFIG_MACH_MAGICIAN) | ||
185 | #define NR_IRQS (IRQ_BOARD_END) | 186 | #define NR_IRQS (IRQ_BOARD_END) |
186 | #else | 187 | #else |
187 | #define NR_IRQS (IRQ_BOARD_START) | 188 | #define NR_IRQS (IRQ_BOARD_START) |
diff --git a/include/asm-arm/arch-pxa/magician.h b/include/asm-arm/arch-pxa/magician.h index 337f51f06b3a..b34fd5683e2d 100644 --- a/include/asm-arm/arch-pxa/magician.h +++ b/include/asm-arm/arch-pxa/magician.h | |||
@@ -12,7 +12,8 @@ | |||
12 | #ifndef _MAGICIAN_H_ | 12 | #ifndef _MAGICIAN_H_ |
13 | #define _MAGICIAN_H_ | 13 | #define _MAGICIAN_H_ |
14 | 14 | ||
15 | #include <asm/arch/pxa-regs.h> | 15 | #include <asm/arch/irqs.h> |
16 | #include <asm/arch/pxa2xx-gpio.h> | ||
16 | 17 | ||
17 | /* | 18 | /* |
18 | * PXA GPIOs | 19 | * PXA GPIOs |
@@ -34,6 +35,7 @@ | |||
34 | #define GPIO48_MAGICIAN_UNKNOWN 48 | 35 | #define GPIO48_MAGICIAN_UNKNOWN 48 |
35 | #define GPIO56_MAGICIAN_UNKNOWN 56 | 36 | #define GPIO56_MAGICIAN_UNKNOWN 56 |
36 | #define GPIO57_MAGICIAN_CAM_RESET 57 | 37 | #define GPIO57_MAGICIAN_CAM_RESET 57 |
38 | #define GPIO75_MAGICIAN_SAMSUNG_POWER 75 | ||
37 | #define GPIO83_MAGICIAN_nIR_EN 83 | 39 | #define GPIO83_MAGICIAN_nIR_EN 83 |
38 | #define GPIO86_MAGICIAN_GSM_RESET 86 | 40 | #define GPIO86_MAGICIAN_GSM_RESET 86 |
39 | #define GPIO87_MAGICIAN_GSM_SELECT 87 | 41 | #define GPIO87_MAGICIAN_GSM_SELECT 87 |
@@ -81,6 +83,7 @@ | |||
81 | #define GPIO48_MAGICIAN_UNKNOWN_MD (48 | GPIO_OUT) | 83 | #define GPIO48_MAGICIAN_UNKNOWN_MD (48 | GPIO_OUT) |
82 | #define GPIO56_MAGICIAN_UNKNOWN_MD (56 | GPIO_OUT) | 84 | #define GPIO56_MAGICIAN_UNKNOWN_MD (56 | GPIO_OUT) |
83 | #define GPIO57_MAGICIAN_CAM_RESET_MD (57 | GPIO_OUT) | 85 | #define GPIO57_MAGICIAN_CAM_RESET_MD (57 | GPIO_OUT) |
86 | #define GPIO75_MAGICIAN_SAMSUNG_POWER_MD (75 | GPIO_OUT) | ||
84 | #define GPIO83_MAGICIAN_nIR_EN_MD (83 | GPIO_OUT) | 87 | #define GPIO83_MAGICIAN_nIR_EN_MD (83 | GPIO_OUT) |
85 | #define GPIO86_MAGICIAN_GSM_RESET_MD (86 | GPIO_OUT) | 88 | #define GPIO86_MAGICIAN_GSM_RESET_MD (86 | GPIO_OUT) |
86 | #define GPIO87_MAGICIAN_GSM_SELECT_MD (87 | GPIO_OUT) | 89 | #define GPIO87_MAGICIAN_GSM_SELECT_MD (87 | GPIO_OUT) |
@@ -108,4 +111,56 @@ | |||
108 | #define GPIO119_MAGICIAN_UNKNOWN_MD (119 | GPIO_OUT) | 111 | #define GPIO119_MAGICIAN_UNKNOWN_MD (119 | GPIO_OUT) |
109 | #define GPIO120_MAGICIAN_UNKNOWN_MD (120 | GPIO_OUT) | 112 | #define GPIO120_MAGICIAN_UNKNOWN_MD (120 | GPIO_OUT) |
110 | 113 | ||
114 | /* | ||
115 | * CPLD IRQs | ||
116 | */ | ||
117 | |||
118 | #define IRQ_MAGICIAN_SD (IRQ_BOARD_START + 0) | ||
119 | #define IRQ_MAGICIAN_EP (IRQ_BOARD_START + 1) | ||
120 | #define IRQ_MAGICIAN_BT (IRQ_BOARD_START + 2) | ||
121 | #define IRQ_MAGICIAN_AC (IRQ_BOARD_START + 3) | ||
122 | |||
123 | /* | ||
124 | * CPLD EGPIOs | ||
125 | */ | ||
126 | |||
127 | #define MAGICIAN_EGPIO_BASE 0x80 /* GPIO_BOARD_START */ | ||
128 | #define MAGICIAN_EGPIO(reg,bit) \ | ||
129 | (MAGICIAN_EGPIO_BASE + 8*reg + bit) | ||
130 | |||
131 | /* output */ | ||
132 | |||
133 | #define EGPIO_MAGICIAN_TOPPOLY_POWER MAGICIAN_EGPIO(0, 2) | ||
134 | #define EGPIO_MAGICIAN_LED_POWER MAGICIAN_EGPIO(0, 5) | ||
135 | #define EGPIO_MAGICIAN_GSM_RESET MAGICIAN_EGPIO(0, 6) | ||
136 | #define EGPIO_MAGICIAN_LCD_POWER MAGICIAN_EGPIO(0, 7) | ||
137 | #define EGPIO_MAGICIAN_SPK_POWER MAGICIAN_EGPIO(1, 0) | ||
138 | #define EGPIO_MAGICIAN_EP_POWER MAGICIAN_EGPIO(1, 1) | ||
139 | #define EGPIO_MAGICIAN_IN_SEL0 MAGICIAN_EGPIO(1, 2) | ||
140 | #define EGPIO_MAGICIAN_IN_SEL1 MAGICIAN_EGPIO(1, 3) | ||
141 | #define EGPIO_MAGICIAN_MIC_POWER MAGICIAN_EGPIO(1, 4) | ||
142 | #define EGPIO_MAGICIAN_CODEC_RESET MAGICIAN_EGPIO(1, 5) | ||
143 | #define EGPIO_MAGICIAN_CODEC_POWER MAGICIAN_EGPIO(1, 6) | ||
144 | #define EGPIO_MAGICIAN_BL_POWER MAGICIAN_EGPIO(1, 7) | ||
145 | #define EGPIO_MAGICIAN_SD_POWER MAGICIAN_EGPIO(2, 0) | ||
146 | #define EGPIO_MAGICIAN_CARKIT_MIC MAGICIAN_EGPIO(2, 1) | ||
147 | #define EGPIO_MAGICIAN_UNKNOWN_WAVEDEV_DLL MAGICIAN_EGPIO(2, 2) | ||
148 | #define EGPIO_MAGICIAN_FLASH_VPP MAGICIAN_EGPIO(2, 3) | ||
149 | #define EGPIO_MAGICIAN_BL_POWER2 MAGICIAN_EGPIO(2, 4) | ||
150 | #define EGPIO_MAGICIAN_CHARGE_EN MAGICIAN_EGPIO(2, 5) | ||
151 | #define EGPIO_MAGICIAN_GSM_POWER MAGICIAN_EGPIO(2, 7) | ||
152 | |||
153 | /* input */ | ||
154 | |||
155 | #define EGPIO_MAGICIAN_CABLE_STATE_AC MAGICIAN_EGPIO(4, 0) | ||
156 | #define EGPIO_MAGICIAN_CABLE_STATE_USB MAGICIAN_EGPIO(4, 1) | ||
157 | |||
158 | #define EGPIO_MAGICIAN_BOARD_ID0 MAGICIAN_EGPIO(5, 0) | ||
159 | #define EGPIO_MAGICIAN_BOARD_ID1 MAGICIAN_EGPIO(5, 1) | ||
160 | #define EGPIO_MAGICIAN_BOARD_ID2 MAGICIAN_EGPIO(5, 2) | ||
161 | #define EGPIO_MAGICIAN_LCD_SELECT MAGICIAN_EGPIO(5, 3) | ||
162 | #define EGPIO_MAGICIAN_nSD_READONLY MAGICIAN_EGPIO(5, 4) | ||
163 | |||
164 | #define EGPIO_MAGICIAN_EP_INSERT MAGICIAN_EGPIO(6, 1) | ||
165 | |||
111 | #endif /* _MAGICIAN_H_ */ | 166 | #endif /* _MAGICIAN_H_ */ |
diff --git a/include/asm-arm/arch-pxa/mfp-pxa25x.h b/include/asm-arm/arch-pxa/mfp-pxa25x.h new file mode 100644 index 000000000000..0499323010ba --- /dev/null +++ b/include/asm-arm/arch-pxa/mfp-pxa25x.h | |||
@@ -0,0 +1,161 @@ | |||
1 | #ifndef __ASM_ARCH_MFP_PXA25X_H | ||
2 | #define __ASM_ARCH_MFP_PXA25X_H | ||
3 | |||
4 | #include <asm/arch/mfp.h> | ||
5 | #include <asm/arch/mfp-pxa2xx.h> | ||
6 | |||
7 | /* GPIO */ | ||
8 | #define GPIO2_GPIO MFP_CFG_IN(GPIO2, AF0) | ||
9 | #define GPIO3_GPIO MFP_CFG_IN(GPIO3, AF0) | ||
10 | #define GPIO4_GPIO MFP_CFG_IN(GPIO4, AF0) | ||
11 | #define GPIO5_GPIO MFP_CFG_IN(GPIO5, AF0) | ||
12 | #define GPIO6_GPIO MFP_CFG_IN(GPIO6, AF0) | ||
13 | #define GPIO7_GPIO MFP_CFG_IN(GPIO7, AF0) | ||
14 | #define GPIO8_GPIO MFP_CFG_IN(GPIO8, AF0) | ||
15 | |||
16 | #define GPIO1_RST MFP_CFG_IN(GPIO1, AF1) | ||
17 | |||
18 | /* Crystal and Clock Signals */ | ||
19 | #define GPIO10_RTCCLK MFP_CFG_OUT(GPIO10, AF1, DRIVE_LOW) | ||
20 | #define GPIO70_RTC_CLK MFP_CFG_OUT(GPIO70, AF1, DRIVE_LOW) | ||
21 | #define GPIO7_48MHz MFP_CFG_OUT(GPIO7, AF1, DRIVE_LOW) | ||
22 | #define GPIO11_3_6MHz MFP_CFG_OUT(GPIO11, AF1, DRIVE_LOW) | ||
23 | #define GPIO71_3_6MHz MFP_CFG_OUT(GPIO71, AF1, DRIVE_LOW) | ||
24 | #define GPIO12_32KHz MFP_CFG_OUT(GPIO12, AF1, DRIVE_LOW) | ||
25 | #define GPIO72_32kHz MFP_CFG_OUT(GPIO72, AF1, DRIVE_LOW) | ||
26 | |||
27 | /* SDRAM and Static Memory I/O Signals */ | ||
28 | #define GPIO15_nCS_1 MFP_CFG_OUT(GPIO15, AF2, DRIVE_HIGH) | ||
29 | #define GPIO78_nCS_2 MFP_CFG_OUT(GPIO78, AF2, DRIVE_HIGH) | ||
30 | #define GPIO79_nCS_3 MFP_CFG_OUT(GPIO79, AF2, DRIVE_HIGH) | ||
31 | #define GPIO80_nCS_4 MFP_CFG_OUT(GPIO80, AF2, DRIVE_HIGH) | ||
32 | #define GPIO33_nCS_5 MFP_CFG_OUT(GPIO33, AF2, DRIVE_HIGH) | ||
33 | |||
34 | /* Miscellaneous I/O and DMA Signals */ | ||
35 | #define GPIO18_RDY MFP_CFG_IN(GPIO18, AF1) | ||
36 | #define GPIO20_DREQ_0 MFP_CFG_IN(GPIO20, AF1) | ||
37 | #define GPIO19_DREQ_1 MFP_CFG_IN(GPIO19, AF1) | ||
38 | |||
39 | /* Alternate Bus Master Mode I/O Signals */ | ||
40 | #define GPIO13_MBGNT MFP_CFG_OUT(GPIO13, AF2, DRIVE_LOW) | ||
41 | #define GPIO73_MBGNT MFP_CFG_OUT(GPIO73, AF1, DRIVE_LOW) | ||
42 | #define GPIO14_MBREQ MFP_CFG_IN(GPIO14, AF1) | ||
43 | #define GPIO66_MBREQ MFP_CFG_IN(GPIO66, AF1) | ||
44 | |||
45 | /* PC CARD */ | ||
46 | #define GPIO52_nPCE_1 MFP_CFG_OUT(GPIO52, AF2, DRIVE_HIGH) | ||
47 | #define GPIO53_nPCE_2 MFP_CFG_OUT(GPIO53, AF2, DRIVE_HIGH) | ||
48 | #define GPIO55_nPREG MFP_CFG_OUT(GPIO55, AF2, DRIVE_HIGH) | ||
49 | #define GPIO50_nPIOR MFP_CFG_OUT(GPIO50, AF2, DRIVE_HIGH) | ||
50 | #define GPIO51_nPIOW MFP_CFG_OUT(GPIO51, AF2, DRIVE_HIGH) | ||
51 | #define GPIO49_nPWE MFP_CFG_OUT(GPIO49, AF2, DRIVE_HIGH) | ||
52 | #define GPIO48_nPOE MFP_CFG_OUT(GPIO48, AF2, DRIVE_HIGH) | ||
53 | #define GPIO57_nIOIS16 MFP_CFG_IN(GPIO57, AF1) | ||
54 | #define GPIO56_nPWAIT MFP_CFG_IN(GPIO56, AF1) | ||
55 | #define GPIO54_nPSKTSEL MFP_CFG_OUT(GPIO54, AF2, DRIVE_HIGH) | ||
56 | |||
57 | /* FFUART */ | ||
58 | #define GPIO34_FFUART_RXD MFP_CFG_IN(GPIO34, AF1) | ||
59 | #define GPIO35_FFUART_CTS MFP_CFG_IN(GPIO35, AF1) | ||
60 | #define GPIO36_FFUART_DCD MFP_CFG_IN(GPIO36, AF1) | ||
61 | #define GPIO37_FFUART_DSR MFP_CFG_IN(GPIO37, AF1) | ||
62 | #define GPIO38_FFUART_RI MFP_CFG_IN(GPIO38, AF1) | ||
63 | #define GPIO39_FFUART_TXD MFP_CFG_OUT(GPIO39, AF2, DRIVE_HIGH) | ||
64 | #define GPIO40_FFUART_DTR MFP_CFG_OUT(GPIO40, AF2, DRIVE_HIGH) | ||
65 | #define GPIO41_FFUART_RTS MFP_CFG_OUT(GPIO41, AF2, DRIVE_HIGH) | ||
66 | |||
67 | /* BTUART */ | ||
68 | #define GPIO42_BTUART_RXD MFP_CFG_IN(GPIO42, AF1) | ||
69 | #define GPIO43_BTUART_TXD MFP_CFG_OUT(GPIO43, AF2, DRIVE_HIGH) | ||
70 | #define GPIO44_BTUART_CTS MFP_CFG_IN(GPIO44, AF1) | ||
71 | #define GPIO45_BTUART_RTS MFP_CFG_OUT(GPIO45, AF2, DRIVE_HIGH) | ||
72 | |||
73 | /* STUART */ | ||
74 | #define GPIO46_STUART_RXD MFP_CFG_IN(GPIO46, AF2) | ||
75 | #define GPIO47_STUART_TXD MFP_CFG_OUT(GPIO47, AF1, DRIVE_HIGH) | ||
76 | |||
77 | /* HWUART */ | ||
78 | #define GPIO42_HWUART_RXD MFP_CFG_IN(GPIO42, AF3) | ||
79 | #define GPIO43_HWUART_TXD MFP_CFG_OUT(GPIO43, AF3, DRIVE_HIGH) | ||
80 | #define GPIO44_HWUART_CTS MFP_CFG_IN(GPIO44, AF3) | ||
81 | #define GPIO45_HWUART_RTS MFP_CFG_OUT(GPIO45, AF3, DRIVE_HIGH) | ||
82 | #define GPIO48_HWUART_TXD MFP_CFG_OUT(GPIO48, AF1, DRIVE_HIGH) | ||
83 | #define GPIO49_HWUART_RXD MFP_CFG_IN(GPIO49, AF1) | ||
84 | #define GPIO50_HWUART_CTS MFP_CFG_IN(GPIO50, AF1) | ||
85 | #define GPIO51_HWUART_RTS MFP_CFG_OUT(GPIO51, AF1, DRIVE_HIGH) | ||
86 | |||
87 | /* FICP */ | ||
88 | #define GPIO46_FICP_RXD MFP_CFG_IN(GPIO46, AF1) | ||
89 | #define GPIO47_FICP_TXD MFP_CFG_OUT(GPIO47, AF2, DRIVE_HIGH) | ||
90 | |||
91 | /* PWM 0/1 */ | ||
92 | #define GPIO16_PWM0_OUT MFP_CFG_OUT(GPIO16, AF2, DRIVE_LOW) | ||
93 | #define GPIO17_PWM1_OUT MFP_CFG_OUT(GPIO17, AF2, DRIVE_LOW) | ||
94 | |||
95 | /* AC97 */ | ||
96 | #define GPIO28_AC97_BITCLK MFP_CFG_IN(GPIO28, AF1) | ||
97 | #define GPIO29_AC97_SDATA_IN_0 MFP_CFG_IN(GPIO29, AF1) | ||
98 | #define GPIO30_AC97_SDATA_OUT MFP_CFG_OUT(GPIO30, AF2, DRIVE_LOW) | ||
99 | #define GPIO31_AC97_SYNC MFP_CFG_OUT(GPIO31, AF2, DRIVE_LOW) | ||
100 | #define GPIO32_AC97_SDATA_IN_1 MFP_CFG_IN(GPIO32, AF1) | ||
101 | |||
102 | /* I2S */ | ||
103 | #define GPIO28_I2S_BITCLK_IN MFP_CFG_IN(GPIO28, AF2) | ||
104 | #define GPIO28_I2S_BITCLK_OUT MFP_CFG_OUT(GPIO28, AF1, DRIVE_LOW) | ||
105 | #define GPIO29_I2S_SDATA_IN MFP_CFG_IN(GPIO29, AF2) | ||
106 | #define GPIO30_I2S_SDATA_OUT MFP_CFG_OUT(GPIO30, AF1, DRIVE_LOW) | ||
107 | #define GPIO31_I2S_SYNC MFP_CFG_OUT(GPIO31, AF1, DRIVE_LOW) | ||
108 | #define GPIO32_I2S_SYSCLK MFP_CFG_OUT(GPIO32, AF1, DRIVE_LOW) | ||
109 | |||
110 | /* SSP 1 */ | ||
111 | #define GPIO23_SSP1_SCLK MFP_CFG_OUT(GPIO23, AF2, DRIVE_LOW) | ||
112 | #define GPIO24_SSP1_SFRM MFP_CFG_OUT(GPIO24, AF2, DRIVE_LOW) | ||
113 | #define GPIO25_SSP1_TXD MFP_CFG_OUT(GPIO25, AF2, DRIVE_LOW) | ||
114 | #define GPIO26_SSP1_RXD MFP_CFG_IN(GPIO26, AF1) | ||
115 | #define GPIO27_SSP1_EXTCLK MFP_CFG_IN(GPIO27, AF1) | ||
116 | |||
117 | /* SSP 2 - NSSP */ | ||
118 | #define GPIO81_SSP2_CLK_OUT MFP_CFG_OUT(GPIO81, AF1, DRIVE_LOW) | ||
119 | #define GPIO81_SSP2_CLK_IN MFP_CFG_IN(GPIO81, AF1) | ||
120 | #define GPIO82_SSP2_FRM_OUT MFP_CFG_OUT(GPIO82, AF1, DRIVE_LOW) | ||
121 | #define GPIO82_SSP2_FRM_IN MFP_CFG_IN(GPIO82, AF1) | ||
122 | #define GPIO83_SSP2_TXD MFP_CFG_OUT(GPIO83, AF1, DRIVE_LOW) | ||
123 | #define GPIO83_SSP2_RXD MFP_CFG_IN(GPIO83, AF2) | ||
124 | #define GPIO84_SSP2_TXD MFP_CFG_OUT(GPIO84, AF1, DRIVE_LOW) | ||
125 | #define GPIO84_SSP2_RXD MFP_CFG_IN(GPIO84, AF2) | ||
126 | |||
127 | /* MMC */ | ||
128 | #define GPIO6_MMC_CLK MFP_CFG_OUT(GPIO6, AF1, DRIVE_LOW) | ||
129 | #define GPIO8_MMC_CS0 MFP_CFG_OUT(GPIO8, AF1, DRIVE_LOW) | ||
130 | #define GPIO9_MMC_CS1 MFP_CFG_OUT(GPIO9, AF1, DRIVE_LOW) | ||
131 | #define GPIO34_MMC_CS0 MFP_CFG_OUT(GPIO34, AF2, DRIVE_LOW) | ||
132 | #define GPIO39_MMC_CS1 MFP_CFG_OUT(GPIO39, AF1, DRIVE_LOW) | ||
133 | #define GPIO53_MMC_CLK MFP_CFG_OUT(GPIO53, AF1, DRIVE_LOW) | ||
134 | #define GPIO54_MMC_CLK MFP_CFG_OUT(GPIO54, AF1, DRIVE_LOW) | ||
135 | #define GPIO69_MMC_CLK MFP_CFG_OUT(GPIO69, AF1, DRIVE_LOW) | ||
136 | #define GPIO67_MMC_CS0 MFP_CFG_OUT(GPIO67, AF1, DRIVE_LOW) | ||
137 | #define GPIO68_MMC_CS1 MFP_CFG_OUT(GPIO68, AF1, DRIVE_LOW) | ||
138 | |||
139 | /* LCD */ | ||
140 | #define GPIO58_LCD_LDD_0 MFP_CFG_OUT(GPIO58, AF2, DRIVE_LOW) | ||
141 | #define GPIO59_LCD_LDD_1 MFP_CFG_OUT(GPIO59, AF2, DRIVE_LOW) | ||
142 | #define GPIO60_LCD_LDD_2 MFP_CFG_OUT(GPIO60, AF2, DRIVE_LOW) | ||
143 | #define GPIO61_LCD_LDD_3 MFP_CFG_OUT(GPIO61, AF2, DRIVE_LOW) | ||
144 | #define GPIO62_LCD_LDD_4 MFP_CFG_OUT(GPIO62, AF2, DRIVE_LOW) | ||
145 | #define GPIO63_LCD_LDD_5 MFP_CFG_OUT(GPIO63, AF2, DRIVE_LOW) | ||
146 | #define GPIO64_LCD_LDD_6 MFP_CFG_OUT(GPIO64, AF2, DRIVE_LOW) | ||
147 | #define GPIO65_LCD_LDD_7 MFP_CFG_OUT(GPIO65, AF2, DRIVE_LOW) | ||
148 | #define GPIO66_LCD_LDD_8 MFP_CFG_OUT(GPIO66, AF2, DRIVE_LOW) | ||
149 | #define GPIO67_LCD_LDD_9 MFP_CFG_OUT(GPIO67, AF2, DRIVE_LOW) | ||
150 | #define GPIO68_LCD_LDD_10 MFP_CFG_OUT(GPIO68, AF2, DRIVE_LOW) | ||
151 | #define GPIO69_LCD_LDD_11 MFP_CFG_OUT(GPIO69, AF2, DRIVE_LOW) | ||
152 | #define GPIO70_LCD_LDD_12 MFP_CFG_OUT(GPIO70, AF2, DRIVE_LOW) | ||
153 | #define GPIO71_LCD_LDD_13 MFP_CFG_OUT(GPIO71, AF2, DRIVE_LOW) | ||
154 | #define GPIO72_LCD_LDD_14 MFP_CFG_OUT(GPIO72, AF2, DRIVE_LOW) | ||
155 | #define GPIO73_LCD_LDD_15 MFP_CFG_OUT(GPIO73, AF2, DRIVE_LOW) | ||
156 | #define GPIO74_LCD_FCLK MFP_CFG_OUT(GPIO74, AF2, DRIVE_LOW) | ||
157 | #define GPIO75_LCD_LCLK MFP_CFG_OUT(GPIO75, AF2, DRIVE_LOW) | ||
158 | #define GPIO76_LCD_PCLK MFP_CFG_OUT(GPIO76, AF2, DRIVE_LOW) | ||
159 | #define GPIO77_LCD_ACBIAS MFP_CFG_OUT(GPIO77, AF2, DRIVE_LOW) | ||
160 | |||
161 | #endif /* __ASM_ARCH_MFP_PXA25X_H */ | ||
diff --git a/include/asm-arm/arch-pxa/mfp-pxa27x.h b/include/asm-arm/arch-pxa/mfp-pxa27x.h new file mode 100644 index 000000000000..eb6eaa174f8d --- /dev/null +++ b/include/asm-arm/arch-pxa/mfp-pxa27x.h | |||
@@ -0,0 +1,432 @@ | |||
1 | #ifndef __ASM_ARCH_MFP_PXA27X_H | ||
2 | #define __ASM_ARCH_MFP_PXA27X_H | ||
3 | |||
4 | /* | ||
5 | * NOTE: for those special-function bidirectional GPIOs, as described | ||
6 | * in the "PXA27x Developer's Manual" Section 24.4.2.1, only its input | ||
7 | * alternative is preserved, the direction is actually selected by the | ||
8 | * specific controller, and this should work in most cases. | ||
9 | */ | ||
10 | |||
11 | #include <asm/arch/mfp.h> | ||
12 | #include <asm/arch/mfp-pxa2xx.h> | ||
13 | |||
14 | /* GPIO */ | ||
15 | #define GPIO85_GPIO MFP_CFG_IN(GPIO85, AF0) | ||
16 | #define GPIO86_GPIO MFP_CFG_IN(GPIO86, AF0) | ||
17 | #define GPIO87_GPIO MFP_CFG_IN(GPIO87, AF0) | ||
18 | #define GPIO88_GPIO MFP_CFG_IN(GPIO88, AF0) | ||
19 | #define GPIO89_GPIO MFP_CFG_IN(GPIO89, AF0) | ||
20 | #define GPIO90_GPIO MFP_CFG_IN(GPIO90, AF0) | ||
21 | #define GPIO91_GPIO MFP_CFG_IN(GPIO91, AF0) | ||
22 | #define GPIO92_GPIO MFP_CFG_IN(GPIO92, AF0) | ||
23 | #define GPIO93_GPIO MFP_CFG_IN(GPIO93, AF0) | ||
24 | #define GPIO94_GPIO MFP_CFG_IN(GPIO94, AF0) | ||
25 | #define GPIO95_GPIO MFP_CFG_IN(GPIO95, AF0) | ||
26 | #define GPIO96_GPIO MFP_CFG_IN(GPIO96, AF0) | ||
27 | #define GPIO97_GPIO MFP_CFG_IN(GPIO97, AF0) | ||
28 | #define GPIO98_GPIO MFP_CFG_IN(GPIO98, AF0) | ||
29 | #define GPIO99_GPIO MFP_CFG_IN(GPIO99, AF0) | ||
30 | #define GPIO100_GPIO MFP_CFG_IN(GPIO100, AF0) | ||
31 | #define GPIO101_GPIO MFP_CFG_IN(GPIO101, AF0) | ||
32 | #define GPIO102_GPIO MFP_CFG_IN(GPIO102, AF0) | ||
33 | #define GPIO103_GPIO MFP_CFG_IN(GPIO103, AF0) | ||
34 | #define GPIO104_GPIO MFP_CFG_IN(GPIO104, AF0) | ||
35 | #define GPIO105_GPIO MFP_CFG_IN(GPIO105, AF0) | ||
36 | #define GPIO106_GPIO MFP_CFG_IN(GPIO106, AF0) | ||
37 | #define GPIO107_GPIO MFP_CFG_IN(GPIO107, AF0) | ||
38 | #define GPIO108_GPIO MFP_CFG_IN(GPIO108, AF0) | ||
39 | #define GPIO109_GPIO MFP_CFG_IN(GPIO109, AF0) | ||
40 | #define GPIO110_GPIO MFP_CFG_IN(GPIO110, AF0) | ||
41 | #define GPIO111_GPIO MFP_CFG_IN(GPIO111, AF0) | ||
42 | #define GPIO112_GPIO MFP_CFG_IN(GPIO112, AF0) | ||
43 | #define GPIO113_GPIO MFP_CFG_IN(GPIO113, AF0) | ||
44 | #define GPIO114_GPIO MFP_CFG_IN(GPIO114, AF0) | ||
45 | #define GPIO115_GPIO MFP_CFG_IN(GPIO115, AF0) | ||
46 | #define GPIO116_GPIO MFP_CFG_IN(GPIO116, AF0) | ||
47 | #define GPIO117_GPIO MFP_CFG_IN(GPIO117, AF0) | ||
48 | #define GPIO118_GPIO MFP_CFG_IN(GPIO118, AF0) | ||
49 | #define GPIO119_GPIO MFP_CFG_IN(GPIO119, AF0) | ||
50 | #define GPIO120_GPIO MFP_CFG_IN(GPIO120, AF0) | ||
51 | |||
52 | /* Crystal and Clock Signals */ | ||
53 | #define GPIO9_HZ_CLK MFP_CFG_OUT(GPIO9, AF1, DRIVE_LOW) | ||
54 | #define GPIO10_HZ_CLK MFP_CFG_OUT(GPIO10, AF1, DRIVE_LOW) | ||
55 | #define GPIO11_48_MHz MFP_CFG_OUT(GPIO11, AF3, DRIVE_LOW) | ||
56 | #define GPIO12_48_MHz MFP_CFG_OUT(GPIO12, AF3, DRIVE_LOW) | ||
57 | #define GPIO13_CLK_EXT MFP_CFG_IN(GPIO13, AF1) | ||
58 | |||
59 | /* OS Timer Signals */ | ||
60 | #define GPIO11_EXT_SYNC_0 MFP_CFG_IN(GPIO11, AF1) | ||
61 | #define GPIO12_EXT_SYNC_1 MFP_CFG_IN(GPIO12, AF1) | ||
62 | #define GPIO9_CHOUT_0 MFP_CFG_OUT(GPIO9, AF3, DRIVE_LOW) | ||
63 | #define GPIO10_CHOUT_1 MFP_CFG_OUT(GPIO10, AF3, DRIVE_LOW) | ||
64 | #define GPIO11_CHOUT_0 MFP_CFG_OUT(GPIO11, AF1, DRIVE_LOW) | ||
65 | #define GPIO12_CHOUT_1 MFP_CFG_OUT(GPIO12, AF1, DRIVE_LOW) | ||
66 | |||
67 | /* SDRAM and Static Memory I/O Signals */ | ||
68 | #define GPIO20_nSDCS_2 MFP_CFG_OUT(GPIO20, AF1, DRIVE_HIGH) | ||
69 | #define GPIO21_nSDCS_3 MFP_CFG_OUT(GPIO21, AF1, DRIVE_HIGH) | ||
70 | #define GPIO15_nCS_1 MFP_CFG_OUT(GPIO15, AF2, DRIVE_HIGH) | ||
71 | #define GPIO78_nCS_2 MFP_CFG_OUT(GPIO78, AF2, DRIVE_HIGH) | ||
72 | #define GPIO79_nCS_3 MFP_CFG_OUT(GPIO79, AF2, DRIVE_HIGH) | ||
73 | #define GPIO80_nCS_4 MFP_CFG_OUT(GPIO80, AF2, DRIVE_HIGH) | ||
74 | #define GPIO33_nCS_5 MFP_CFG_OUT(GPIO33, AF2, DRIVE_HIGH) | ||
75 | |||
76 | /* Miscellaneous I/O and DMA Signals */ | ||
77 | #define GPIO21_DVAL_0 MFP_CFG_OUT(GPIO21, AF2, DRIVE_HIGH) | ||
78 | #define GPIO116_DVAL_0 MFP_CFG_OUT(GPIO116, AF1, DRIVE_HIGH) | ||
79 | #define GPIO33_DVAL_1 MFP_CFG_OUT(GPIO33, AF1, DRIVE_HIGH) | ||
80 | #define GPIO96_DVAL_1 MFP_CFG_OUT(GPIO96, AF2, DRIVE_HIGH) | ||
81 | #define GPIO18_RDY MFP_CFG_IN(GPIO18, AF1) | ||
82 | #define GPIO20_DREQ_0 MFP_CFG_IN(GPIO20, AF1) | ||
83 | #define GPIO115_DREQ_0 MFP_CFG_IN(GPIO115, AF1) | ||
84 | #define GPIO80_DREQ_1 MFP_CFG_IN(GPIO80, AF1) | ||
85 | #define GPIO97_DREQ_1 MFP_CFG_IN(GPIO97, AF2) | ||
86 | #define GPIO85_DREQ_2 MFP_CFG_IN(GPIO85, AF2) | ||
87 | #define GPIO100_DREQ_2 MFP_CFG_IN(GPIO100, AF2) | ||
88 | |||
89 | /* Alternate Bus Master Mode I/O Signals */ | ||
90 | #define GPIO20_MBREQ MFP_CFG_IN(GPIO20, AF2) | ||
91 | #define GPIO80_MBREQ MFP_CFG_IN(GPIO80, AF2) | ||
92 | #define GPIO96_MBREQ MFP_CFG_IN(GPIO96, AF2) | ||
93 | #define GPIO115_MBREQ MFP_CFG_IN(GPIO115, AF3) | ||
94 | #define GPIO21_MBGNT MFP_CFG_OUT(GPIO21, AF3, DRIVE_LOW) | ||
95 | #define GPIO33_MBGNT MFP_CFG_OUT(GPIO33, AF3, DRIVE_LOW) | ||
96 | #define GPIO97_MBGNT MFP_CFG_OUT(GPIO97, AF2, DRIVE_LOW) | ||
97 | #define GPIO116_MBGNT MFP_CFG_OUT(GPIO116, AF3, DRIVE_LOW) | ||
98 | |||
99 | /* PC CARD */ | ||
100 | #define GPIO15_nPCE_1 MFP_CFG_OUT(GPIO15, AF1, DRIVE_HIGH) | ||
101 | #define GPIO85_nPCE_1 MFP_CFG_OUT(GPIO85, AF1, DRIVE_HIGH) | ||
102 | #define GPIO86_nPCE_1 MFP_CFG_OUT(GPIO86, AF1, DRIVE_HIGH) | ||
103 | #define GPIO102_nPCE_1 MFP_CFG_OUT(GPIO102, AF1, DRIVE_HIGH) | ||
104 | #define GPIO54_nPCE_2 MFP_CFG_OUT(GPIO54, AF2, DRIVE_HIGH) | ||
105 | #define GPIO78_nPCE_2 MFP_CFG_OUT(GPIO78, AF1, DRIVE_HIGH) | ||
106 | #define GPIO87_nPCE_2 MFP_CFG_IN(GPIO87, AF1) | ||
107 | #define GPIO55_nPREG MFP_CFG_OUT(GPIO55, AF2, DRIVE_HIGH) | ||
108 | #define GPIO50_nPIOR MFP_CFG_OUT(GPIO50, AF2, DRIVE_HIGH) | ||
109 | #define GPIO51_nPIOW MFP_CFG_OUT(GPIO51, AF2, DRIVE_HIGH) | ||
110 | #define GPIO49_nPWE MFP_CFG_OUT(GPIO49, AF2, DRIVE_HIGH) | ||
111 | #define GPIO48_nPOE MFP_CFG_OUT(GPIO48, AF2, DRIVE_HIGH) | ||
112 | #define GPIO57_nIOIS16 MFP_CFG_IN(GPIO57, AF1) | ||
113 | #define GPIO56_nPWAIT MFP_CFG_IN(GPIO56, AF1) | ||
114 | #define GPIO79_PSKTSEL MFP_CFG_OUT(GPIO79, AF1, DRIVE_HIGH) | ||
115 | |||
116 | /* I2C */ | ||
117 | #define GPIO117_I2C_SCL MFP_CFG_IN(GPIO117, AF1) | ||
118 | #define GPIO118_I2C_SDA MFP_CFG_IN(GPIO118, AF1) | ||
119 | |||
120 | /* FFUART */ | ||
121 | #define GPIO9_FFUART_CTS MFP_CFG_IN(GPIO9, AF3) | ||
122 | #define GPIO26_FFUART_CTS MFP_CFG_IN(GPIO26, AF3) | ||
123 | #define GPIO35_FFUART_CTS MFP_CFG_IN(GPIO35, AF1) | ||
124 | #define GPIO100_FFUART_CTS MFP_CFG_IN(GPIO100, AF3) | ||
125 | #define GPIO10_FFUART_DCD MFP_CFG_IN(GPIO10, AF1) | ||
126 | #define GPIO36_FFUART_DCD MFP_CFG_IN(GPIO36, AF1) | ||
127 | #define GPIO33_FFUART_DSR MFP_CFG_IN(GPIO33, AF2) | ||
128 | #define GPIO37_FFUART_DSR MFP_CFG_IN(GPIO37, AF1) | ||
129 | #define GPIO38_FFUART_RI MFP_CFG_IN(GPIO38, AF1) | ||
130 | #define GPIO89_FFUART_RI MFP_CFG_IN(GPIO89, AF3) | ||
131 | #define GPIO19_FFUART_RXD MFP_CFG_IN(GPIO19, AF3) | ||
132 | #define GPIO33_FFUART_RXD MFP_CFG_IN(GPIO33, AF1) | ||
133 | #define GPIO34_FFUART_RXD MFP_CFG_IN(GPIO34, AF1) | ||
134 | #define GPIO41_FFUART_RXD MFP_CFG_IN(GPIO41, AF1) | ||
135 | #define GPIO53_FFUART_RXD MFP_CFG_IN(GPIO53, AF1) | ||
136 | #define GPIO85_FFUART_RXD MFP_CFG_IN(GPIO85, AF1) | ||
137 | #define GPIO96_FFUART_RXD MFP_CFG_IN(GPIO96, AF3) | ||
138 | #define GPIO102_FFUART_RXD MFP_CFG_IN(GPIO102, AF3) | ||
139 | #define GPIO16_FFUART_TXD MFP_CFG_OUT(GPIO16, AF3, DRIVE_HIGH) | ||
140 | #define GPIO37_FFUART_TXD MFP_CFG_OUT(GPIO37, AF3, DRIVE_HIGH) | ||
141 | #define GPIO39_FFUART_TXD MFP_CFG_OUT(GPIO39, AF2, DRIVE_HIGH) | ||
142 | #define GPIO83_FFUART_TXD MFP_CFG_OUT(GPIO83, AF2, DRIVE_HIGH) | ||
143 | #define GPIO99_FFUART_TXD MFP_CFG_OUT(GPIO99, AF3, DRIVE_HIGH) | ||
144 | #define GPIO27_FFUART_RTS MFP_CFG_OUT(GPIO27, AF3, DRIVE_HIGH) | ||
145 | #define GPIO41_FFUART_RTS MFP_CFG_OUT(GPIO41, AF2, DRIVE_HIGH) | ||
146 | #define GPIO83_FFUART_RTS MFP_CFG_OUT(GPIO83, AF3, DRIVE_HIGH) | ||
147 | #define GPIO98_FFUART_RTS MFP_CFG_OUT(GPIO98, AF3, DRIVE_HIGH) | ||
148 | #define GPIO40_FFUART_DTR MFP_CFG_OUT(GPIO40, AF2, DRIVE_HIGH) | ||
149 | #define GPIO82_FFUART_DTR MFP_CFG_OUT(GPIO82, AF3, DRIVE_HIGH) | ||
150 | |||
151 | /* BTUART */ | ||
152 | #define GPIO44_BTUART_CTS MFP_CFG_IN(GPIO44, AF1) | ||
153 | #define GPIO42_BTUART_RXD MFP_CFG_IN(GPIO42, AF1) | ||
154 | #define GPIO45_BTUART_RTS MFP_CFG_OUT(GPIO45, AF2, DRIVE_HIGH) | ||
155 | #define GPIO43_BTUART_TXD MFP_CFG_OUT(GPIO43, AF2, DRIVE_HIGH) | ||
156 | |||
157 | /* STUART */ | ||
158 | #define GPIO46_STUART_RXD MFP_CFG_IN(GPIO46, AF2) | ||
159 | #define GPIO47_STUART_TXD MFP_CFG_OUT(GPIO47, AF1, DRIVE_HIGH) | ||
160 | |||
161 | /* FICP */ | ||
162 | #define GPIO42_FICP_RXD MFP_CFG_IN(GPIO42, AF2) | ||
163 | #define GPIO46_FICP_RXD MFP_CFG_IN(GPIO46, AF1) | ||
164 | #define GPIO43_FICP_TXD MFP_CFG_OUT(GPIO43, AF1, DRIVE_HIGH) | ||
165 | #define GPIO47_FICP_TXD MFP_CFG_OUT(GPIO47, AF2, DRIVE_HIGH) | ||
166 | |||
167 | /* PWM 0/1/2/3 */ | ||
168 | #define GPIO11_PWM2_OUT MFP_CFG_OUT(GPIO11, AF2, DRIVE_LOW) | ||
169 | #define GPIO12_PWM3_OUT MFP_CFG_OUT(GPIO12, AF2, DRIVE_LOW) | ||
170 | #define GPIO16_PWM0_OUT MFP_CFG_OUT(GPIO16, AF2, DRIVE_LOW) | ||
171 | #define GPIO17_PWM1_OUT MFP_CFG_OUT(GPIO17, AF2, DRIVE_LOW) | ||
172 | #define GPIO38_PWM1_OUT MFP_CFG_OUT(GPIO38, AF3, DRIVE_LOW) | ||
173 | #define GPIO46_PWM2_OUT MFP_CFG_OUT(GPIO46, AF2, DRIVE_LOW) | ||
174 | #define GPIO47_PWM3_OUT MFP_CFG_OUT(GPIO47, AF3, DRIVE_LOW) | ||
175 | #define GPIO79_PWM2_OUT MFP_CFG_OUT(GPIO79, AF3, DRIVE_LOW) | ||
176 | #define GPIO80_PWM3_OUT MFP_CFG_OUT(GPIO80, AF3, DRIVE_LOW) | ||
177 | #define GPIO115_PWM1_OUT MFP_CFG_OUT(GPIO115, AF3, DRIVE_LOW) | ||
178 | |||
179 | /* AC97 */ | ||
180 | #define GPIO31_AC97_SYNC MFP_CFG_OUT(GPIO31, AF2, DRIVE_LOW) | ||
181 | #define GPIO94_AC97_SYNC MFP_CFG_OUT(GPIO94, AF1, DRIVE_LOW) | ||
182 | #define GPIO30_AC97_SDATA_OUT MFP_CFG_OUT(GPIO30, AF2, DRIVE_LOW) | ||
183 | #define GPIO93_AC97_SDATA_OUT MFP_CFG_OUT(GPIO93, AF1, DRIVE_LOW) | ||
184 | #define GPIO45_AC97_SYSCLK MFP_CFG_OUT(GPIO45, AF1, DRIVE_LOW) | ||
185 | #define GPIO89_AC97_SYSCLK MFP_CFG_OUT(GPIO89, AF1, DRIVE_LOW) | ||
186 | #define GPIO98_AC97_SYSCLK MFP_CFG_OUT(GPIO98, AF1, DRIVE_LOW) | ||
187 | #define GPIO95_AC97_nRESET MFP_CFG_OUT(GPIO95, AF1, DRIVE_LOW) | ||
188 | #define GPIO113_AC97_nRESET MFP_CFG_OUT(GPIO113, AF2, DRIVE_LOW) | ||
189 | #define GPIO28_AC97_BITCLK MFP_CFG_IN(GPIO28, AF1) | ||
190 | #define GPIO29_AC97_SDATA_IN_0 MFP_CFG_IN(GPIO29, AF1) | ||
191 | #define GPIO116_AC97_SDATA_IN_0 MFP_CFG_IN(GPIO116, AF2) | ||
192 | #define GPIO99_AC97_SDATA_IN_1 MFP_CFG_IN(GPIO99, AF2) | ||
193 | |||
194 | /* I2S */ | ||
195 | #define GPIO28_I2S_BITCLK_IN MFP_CFG_IN(GPIO28, AF2) | ||
196 | #define GPIO28_I2S_BITCLK_OUT MFP_CFG_OUT(GPIO28, AF1, DRIVE_LOW) | ||
197 | #define GPIO29_I2S_SDATA_IN MFP_CFG_IN(GPIO29, AF2) | ||
198 | #define GPIO30_I2S_SDATA_OUT MFP_CFG_OUT(GPIO30, AF1, DRIVE_LOW) | ||
199 | #define GPIO31_I2S_SYNC MFP_CFG_OUT(GPIO31, AF1, DRIVE_LOW) | ||
200 | #define GPIO113_I2S_SYSCLK MFP_CFG_OUT(GPIO113, AF1, DRIVE_LOW) | ||
201 | |||
202 | /* SSP 1 */ | ||
203 | #define GPIO23_SSP1_SCLK MFP_CFG_OUT(GPIO23, AF2, DRIVE_LOW) | ||
204 | #define GPIO29_SSP1_SCLK MFP_CFG_IN(GPIO29, AF3) | ||
205 | #define GPIO27_SSP1_SYSCLK MFP_CFG_OUT(GPIO27, AF1, DRIVE_LOW) | ||
206 | #define GPIO53_SSP1_SYSCLK MFP_CFG_OUT(GPIO53, AF3, DRIVE_LOW) | ||
207 | #define GPIO24_SSP1_SFRM MFP_CFG_IN(GPIO24, AF2) | ||
208 | #define GPIO28_SSP1_SFRM MFP_CFG_IN(GPIO28, AF3) | ||
209 | #define GPIO25_SSP1_TXD MFP_CFG_OUT(GPIO25, AF2, DRIVE_LOW) | ||
210 | #define GPIO57_SSP1_TXD MFP_CFG_OUT(GPIO57, AF3, DRIVE_LOW) | ||
211 | #define GPIO26_SSP1_RXD MFP_CFG_IN(GPIO26, AF1) | ||
212 | #define GPIO27_SSP1_SCLKEN MFP_CFG_IN(GPIO27, AF2) | ||
213 | |||
214 | /* SSP 2 */ | ||
215 | #define GPIO19_SSP2_SCLK MFP_CFG_IN(GPIO19, AF1) | ||
216 | #define GPIO22_SSP2_SCLK MFP_CFG_IN(GPIO22, AF3) | ||
217 | #define GPIO29_SSP2_SCLK MFP_CFG_OUT(GPIO29, AF3, DRIVE_LOW) | ||
218 | #define GPIO36_SSP2_SCLK MFP_CFG_IN(GPIO36, AF2) | ||
219 | #define GPIO50_SSP2_SCLK MFP_CFG_IN(GPIO50, AF3) | ||
220 | #define GPIO22_SSP2_SYSCLK MFP_CFG_OUT(GPIO22, AF2, DRIVE_LOW) | ||
221 | #define GPIO14_SSP2_SFRM MFP_CFG_IN(GPIO14, AF2) | ||
222 | #define GPIO37_SSP2_SFRM MFP_CFG_IN(GPIO37, AF2) | ||
223 | #define GPIO87_SSP2_SFRM MFP_CFG_OUT(GPIO87, AF3, DRIVE_LOW) | ||
224 | #define GPIO88_SSP2_SFRM MFP_CFG_IN(GPIO88, AF3) | ||
225 | #define GPIO13_SSP2_TXD MFP_CFG_OUT(GPIO13, AF1, DRIVE_LOW) | ||
226 | #define GPIO38_SSP2_TXD MFP_CFG_OUT(GPIO38, AF2, DRIVE_LOW) | ||
227 | #define GPIO87_SSP2_TXD MFP_CFG_OUT(GPIO87, AF1, DRIVE_LOW) | ||
228 | #define GPIO89_SSP2_TXD MFP_CFG_OUT(GPIO89, AF3, DRIVE_LOW) | ||
229 | #define GPIO11_SSP2_RXD MFP_CFG_IN(GPIO11, AF2) | ||
230 | #define GPIO29_SSP2_RXD MFP_CFG_OUT(GPIO29, AF1, DRIVE_LOW) | ||
231 | #define GPIO40_SSP2_RXD MFP_CFG_IN(GPIO40, AF1) | ||
232 | #define GPIO86_SSP2_RXD MFP_CFG_IN(GPIO86, AF1) | ||
233 | #define GPIO88_SSP2_RXD MFP_CFG_IN(GPIO88, AF2) | ||
234 | #define GPIO22_SSP2_EXTCLK MFP_CFG_IN(GPIO22, AF1) | ||
235 | #define GPIO27_SSP2_EXTCLK MFP_CFG_IN(GPIO27, AF1) | ||
236 | #define GPIO22_SSP2_SCLKEN MFP_CFG_IN(GPIO22, AF2) | ||
237 | #define GPIO23_SSP2_SCLKEN MFP_CFG_IN(GPIO23, AF2) | ||
238 | |||
239 | /* SSP 3 */ | ||
240 | #define GPIO34_SSP3_SCLK MFP_CFG_IN(GPIO34, AF3) | ||
241 | #define GPIO40_SSP3_SCLK MFP_CFG_OUT(GPIO40, AF3, DRIVE_LOW) | ||
242 | #define GPIO52_SSP3_SCLK MFP_CFG_IN(GPIO52, AF2) | ||
243 | #define GPIO84_SSP3_SCLK MFP_CFG_IN(GPIO84, AF1) | ||
244 | #define GPIO45_SSP3_SYSCLK MFP_CFG_OUT(GPIO45, AF3, DRIVE_LOW) | ||
245 | #define GPIO35_SSP3_SFRM MFP_CFG_IN(GPIO35, AF3) | ||
246 | #define GPIO39_SSP3_SFRM MFP_CFG_IN(GPIO39, AF3) | ||
247 | #define GPIO83_SSP3_SFRM MFP_CFG_IN(GPIO83, AF1) | ||
248 | #define GPIO35_SSP3_TXD MFP_CFG_OUT(GPIO35, AF3, DRIVE_LOW) | ||
249 | #define GPIO38_SSP3_TXD MFP_CFG_OUT(GPIO38, AF1, DRIVE_LOW) | ||
250 | #define GPIO81_SSP3_TXD MFP_CFG_OUT(GPIO81, AF1, DRIVE_LOW) | ||
251 | #define GPIO41_SSP3_RXD MFP_CFG_IN(GPIO41, AF3) | ||
252 | #define GPIO82_SSP3_RXD MFP_CFG_IN(GPIO82, AF1) | ||
253 | #define GPIO89_SSP3_RXD MFP_CFG_IN(GPIO89, AF1) | ||
254 | |||
255 | /* MMC */ | ||
256 | #define GPIO32_MMC_CLK MFP_CFG_OUT(GPIO32, AF2, DRIVE_LOW) | ||
257 | #define GPIO92_MMC_DAT_0 MFP_CFG_IN(GPIO92, AF1) | ||
258 | #define GPIO109_MMC_DAT_1 MFP_CFG_IN(GPIO109, AF1) | ||
259 | #define GPIO110_MMC_DAT_2 MFP_CFG_IN(GPIO110, AF1) | ||
260 | #define GPIO111_MMC_DAT_3 MFP_CFG_IN(GPIO111, AF1) | ||
261 | #define GPIO112_MMC_CMD MFP_CFG_IN(GPIO112, AF1) | ||
262 | |||
263 | /* LCD */ | ||
264 | #define GPIO58_LCD_LDD_0 MFP_CFG_OUT(GPIO58, AF2, DRIVE_LOW) | ||
265 | #define GPIO59_LCD_LDD_1 MFP_CFG_OUT(GPIO59, AF2, DRIVE_LOW) | ||
266 | #define GPIO60_LCD_LDD_2 MFP_CFG_OUT(GPIO60, AF2, DRIVE_LOW) | ||
267 | #define GPIO61_LCD_LDD_3 MFP_CFG_OUT(GPIO61, AF2, DRIVE_LOW) | ||
268 | #define GPIO62_LCD_LDD_4 MFP_CFG_OUT(GPIO62, AF2, DRIVE_LOW) | ||
269 | #define GPIO63_LCD_LDD_5 MFP_CFG_OUT(GPIO63, AF2, DRIVE_LOW) | ||
270 | #define GPIO64_LCD_LDD_6 MFP_CFG_OUT(GPIO64, AF2, DRIVE_LOW) | ||
271 | #define GPIO65_LCD_LDD_7 MFP_CFG_OUT(GPIO65, AF2, DRIVE_LOW) | ||
272 | #define GPIO66_LCD_LDD_8 MFP_CFG_OUT(GPIO66, AF2, DRIVE_LOW) | ||
273 | #define GPIO67_LCD_LDD_9 MFP_CFG_OUT(GPIO67, AF2, DRIVE_LOW) | ||
274 | #define GPIO68_LCD_LDD_10 MFP_CFG_OUT(GPIO68, AF2, DRIVE_LOW) | ||
275 | #define GPIO69_LCD_LDD_11 MFP_CFG_OUT(GPIO69, AF2, DRIVE_LOW) | ||
276 | #define GPIO70_LCD_LDD_12 MFP_CFG_OUT(GPIO70, AF2, DRIVE_LOW) | ||
277 | #define GPIO71_LCD_LDD_13 MFP_CFG_OUT(GPIO71, AF2, DRIVE_LOW) | ||
278 | #define GPIO72_LCD_LDD_14 MFP_CFG_OUT(GPIO72, AF2, DRIVE_LOW) | ||
279 | #define GPIO73_LCD_LDD_15 MFP_CFG_OUT(GPIO73, AF2, DRIVE_LOW) | ||
280 | #define GPIO86_LCD_LDD_16 MFP_CFG_OUT(GPIO86, AF2, DRIVE_LOW) | ||
281 | #define GPIO87_LCD_LDD_17 MFP_CFG_OUT(GPIO87, AF2, DRIVE_LOW) | ||
282 | #define GPIO74_LCD_FCLK MFP_CFG_OUT(GPIO74, AF2, DRIVE_LOW) | ||
283 | #define GPIO75_LCD_LCLK MFP_CFG_OUT(GPIO75, AF2, DRIVE_LOW) | ||
284 | #define GPIO76_LCD_PCLK MFP_CFG_OUT(GPIO76, AF2, DRIVE_LOW) | ||
285 | #define GPIO77_LCD_BIAS MFP_CFG_OUT(GPIO77, AF2, DRIVE_LOW) | ||
286 | #define GPIO14_LCD_VSYNC MFP_CFG_IN(GPIO14, AF1) | ||
287 | #define GPIO19_LCD_CS MFP_CFG_OUT(GPIO19, AF2, DRIVE_LOW) | ||
288 | |||
289 | /* Keypad */ | ||
290 | #define GPIO93_KP_DKIN_0 MFP_CFG_IN(GPIO93, AF1) | ||
291 | #define GPIO94_KP_DKIN_1 MFP_CFG_IN(GPIO94, AF1) | ||
292 | #define GPIO95_KP_DKIN_2 MFP_CFG_IN(GPIO95, AF1) | ||
293 | #define GPIO96_KP_DKIN_3 MFP_CFG_IN(GPIO96, AF1) | ||
294 | #define GPIO97_KP_DKIN_4 MFP_CFG_IN(GPIO97, AF1) | ||
295 | #define GPIO98_KP_DKIN_5 MFP_CFG_IN(GPIO98, AF1) | ||
296 | #define GPIO99_KP_DKIN_6 MFP_CFG_IN(GPIO99, AF1) | ||
297 | #define GPIO13_KP_KDIN_7 MFP_CFG_IN(GPIO13, AF2) | ||
298 | #define GPIO100_KP_MKIN_0 MFP_CFG_IN(GPIO100, AF1) | ||
299 | #define GPIO101_KP_MKIN_1 MFP_CFG_IN(GPIO101, AF1) | ||
300 | #define GPIO102_KP_MKIN_2 MFP_CFG_IN(GPIO102, AF1) | ||
301 | #define GPIO34_KP_MKIN_3 MFP_CFG_IN(GPIO34, AF2) | ||
302 | #define GPIO37_KP_MKIN_3 MFP_CFG_IN(GPIO37, AF3) | ||
303 | #define GPIO97_KP_MKIN_3 MFP_CFG_IN(GPIO97, AF3) | ||
304 | #define GPIO98_KP_MKIN_4 MFP_CFG_IN(GPIO98, AF3) | ||
305 | #define GPIO38_KP_MKIN_4 MFP_CFG_IN(GPIO38, AF2) | ||
306 | #define GPIO39_KP_MKIN_4 MFP_CFG_IN(GPIO39, AF1) | ||
307 | #define GPIO16_KP_MKIN_5 MFP_CFG_IN(GPIO16, AF1) | ||
308 | #define GPIO90_KP_MKIN_5 MFP_CFG_IN(GPIO90, AF1) | ||
309 | #define GPIO99_KP_MKIN_5 MFP_CFG_IN(GPIO99, AF3) | ||
310 | #define GPIO17_KP_MKIN_6 MFP_CFG_IN(GPIO17, AF1) | ||
311 | #define GPIO91_KP_MKIN_6 MFP_CFG_IN(GPIO91, AF1) | ||
312 | #define GPIO95_KP_MKIN_6 MFP_CFG_IN(GPIO95, AF3) | ||
313 | #define GPIO13_KP_MKIN_7 MFP_CFG_IN(GPIO13, AF3) | ||
314 | #define GPIO36_KP_MKIN_7 MFP_CFG_IN(GPIO36, AF3) | ||
315 | #define GPIO103_KP_MKOUT_0 MFP_CFG_OUT(GPIO103, AF2, DRIVE_HIGH) | ||
316 | #define GPIO104_KP_MKOUT_1 MFP_CFG_OUT(GPIO104, AF2, DRIVE_HIGH) | ||
317 | #define GPIO105_KP_MKOUT_2 MFP_CFG_OUT(GPIO105, AF2, DRIVE_HIGH) | ||
318 | #define GPIO106_KP_MKOUT_3 MFP_CFG_OUT(GPIO106, AF2, DRIVE_HIGH) | ||
319 | #define GPIO107_KP_MKOUT_4 MFP_CFG_OUT(GPIO107, AF2, DRIVE_HIGH) | ||
320 | #define GPIO108_KP_MKOUT_5 MFP_CFG_OUT(GPIO108, AF2, DRIVE_HIGH) | ||
321 | #define GPIO35_KP_MKOUT_6 MFP_CFG_OUT(GPIO35, AF2, DRIVE_HIGH) | ||
322 | #define GPIO22_KP_MKOUT_7 MFP_CFG_OUT(GPIO22, AF1, DRIVE_HIGH) | ||
323 | #define GPIO40_KP_MKOUT_6 MFP_CFG_OUT(GPIO40, AF1, DRIVE_HIGH) | ||
324 | #define GPIO41_KP_MKOUT_7 MFP_CFG_OUT(GPIO41, AF1, DRIVE_HIGH) | ||
325 | #define GPIO96_KP_MKOUT_6 MFP_CFG_OUT(GPIO96, AF3, DRIVE_HIGH) | ||
326 | |||
327 | /* USB P3 */ | ||
328 | #define GPIO10_USB_P3_5 MFP_CFG_IN(GPIO10, AF3) | ||
329 | #define GPIO11_USB_P3_1 MFP_CFG_IN(GPIO11, AF3) | ||
330 | #define GPIO30_USB_P3_2 MFP_CFG_OUT(GPIO30, AF3, DRIVE_LOW) | ||
331 | #define GPIO31_USB_P3_6 MFP_CFG_OUT(GPIO31, AF3, DRIVE_LOW) | ||
332 | #define GPIO56_USB_P3_4 MFP_CFG_OUT(GPIO56, AF1, DRIVE_LOW) | ||
333 | #define GPIO86_USB_P3_5 MFP_CFG_IN(GPIO86, AF3) | ||
334 | #define GPIO87_USB_P3_1 MFP_CFG_IN(GPIO87, AF3) | ||
335 | #define GPIO90_USB_P3_5 MFP_CFG_IN(GPIO90, AF2) | ||
336 | #define GPIO91_USB_P3_1 MFP_CFG_IN(GPIO91, AF2) | ||
337 | #define GPIO113_USB_P3_3 MFP_CFG_IN(GPIO113, AF3) | ||
338 | |||
339 | /* USB P2 */ | ||
340 | #define GPIO34_USB_P2_2 MFP_CFG_OUT(GPIO34, AF1, DRIVE_LOW) | ||
341 | #define GPIO35_USB_P2_1 MFP_CFG_IN(GPIO35, AF2) | ||
342 | #define GPIO36_USB_P2_4 MFP_CFG_OUT(GPIO36, AF1, DRIVE_LOW) | ||
343 | #define GPIO37_USB_P2_8 MFP_CFG_OUT(GPIO37, AF1, DRIVE_LOW) | ||
344 | #define GPIO38_USB_P2_3 MFP_CFG_IN(GPIO38, AF3) | ||
345 | #define GPIO39_USB_P2_6 MFP_CFG_OUT(GPIO39, AF1, DRIVE_LOW) | ||
346 | #define GPIO40_USB_P2_5 MFP_CFG_IN(GPIO40, AF3) | ||
347 | #define GPIO41_USB_P2_7 MFP_CFG_IN(GPIO41, AF2) | ||
348 | #define GPIO53_USB_P2_3 MFP_CFG_IN(GPIO53, AF2) | ||
349 | |||
350 | /* USB Host Port 1/2 */ | ||
351 | #define GPIO88_USBH1_PWR MFP_CFG_IN(GPIO88, AF1) | ||
352 | #define GPIO89_USBH1_PEN MFP_CFG_OUT(GPIO89, AF2, DRIVE_LOW) | ||
353 | #define GPIO119_USBH2_PWR MFP_CFG_IN(GPIO119, AF1) | ||
354 | #define GPIO120_USBH2_PEN MFP_CFG_OUT(GPIO120, AF2, DRIVE_LOW) | ||
355 | |||
356 | /* QCI - default to Master Mode: CIF_FV/CIF_LV Direction In */ | ||
357 | #define GPIO115_CIF_DD_3 MFP_CFG_IN(GPIO115, AF2) | ||
358 | #define GPIO116_CIF_DD_2 MFP_CFG_IN(GPIO116, AF1) | ||
359 | #define GPIO12_CIF_DD_7 MFP_CFG_IN(GPIO12, AF2) | ||
360 | #define GPIO17_CIF_DD_6 MFP_CFG_IN(GPIO17, AF2) | ||
361 | #define GPIO23_CIF_MCLK MFP_CFG_OUT(GPIO23, AF1, DRIVE_LOW) | ||
362 | #define GPIO24_CIF_FV MFP_CFG_IN(GPIO24, AF1) | ||
363 | #define GPIO25_CIF_LV MFP_CFG_IN(GPIO25, AF1) | ||
364 | #define GPIO26_CIF_PCLK MFP_CFG_IN(GPIO26, AF2) | ||
365 | #define GPIO27_CIF_DD_0 MFP_CFG_IN(GPIO27, AF3) | ||
366 | #define GPIO42_CIF_MCLK MFP_CFG_OUT(GPIO42, AF3, DRIVE_LOW) | ||
367 | #define GPIO43_CIF_FV MFP_CFG_IN(GPIO43, AF3) | ||
368 | #define GPIO44_CIF_LV MFP_CFG_IN(GPIO44, AF3) | ||
369 | #define GPIO45_CIF_PCLK MFP_CFG_IN(GPIO45, AF3) | ||
370 | #define GPIO47_CIF_DD_0 MFP_CFG_IN(GPIO47, AF1) | ||
371 | #define GPIO48_CIF_DD_5 MFP_CFG_IN(GPIO48, AF1) | ||
372 | #define GPIO50_CIF_DD_3 MFP_CFG_IN(GPIO50, AF1) | ||
373 | #define GPIO51_CIF_DD_2 MFP_CFG_IN(GPIO51, AF1) | ||
374 | #define GPIO52_CIF_DD_4 MFP_CFG_IN(GPIO52, AF1) | ||
375 | #define GPIO53_CIF_MCLK MFP_CFG_OUT(GPIO53, AF2, DRIVE_LOW) | ||
376 | #define GPIO54_CIF_PCLK MFP_CFG_IN(GPIO54, AF3) | ||
377 | #define GPIO55_CIF_DD_1 MFP_CFG_IN(GPIO55, AF1) | ||
378 | #define GPIO81_CIF_DD_0 MFP_CFG_IN(GPIO81, AF2) | ||
379 | #define GPIO82_CIF_DD_5 MFP_CFG_IN(GPIO82, AF3) | ||
380 | #define GPIO83_CIF_DD_4 MFP_CFG_IN(GPIO83, AF3) | ||
381 | #define GPIO84_CIF_FV MFP_CFG_IN(GPIO84, AF3) | ||
382 | #define GPIO85_CIF_LV MFP_CFG_IN(GPIO85, AF3) | ||
383 | #define GPIO90_CIF_DD_4 MFP_CFG_IN(GPIO90, AF3) | ||
384 | #define GPIO91_CIF_DD_5 MFP_CFG_IN(GPIO91, AF3) | ||
385 | #define GPIO93_CIF_DD_6 MFP_CFG_IN(GPIO93, AF2) | ||
386 | #define GPIO94_CIF_DD_5 MFP_CFG_IN(GPIO94, AF2) | ||
387 | #define GPIO95_CIF_DD_4 MFP_CFG_IN(GPIO95, AF2) | ||
388 | #define GPIO98_CIF_DD_0 MFP_CFG_IN(GPIO98, AF2) | ||
389 | #define GPIO103_CIF_DD_3 MFP_CFG_IN(GPIO103, AF1) | ||
390 | #define GPIO104_CIF_DD_2 MFP_CFG_IN(GPIO104, AF1) | ||
391 | #define GPIO105_CIF_DD_1 MFP_CFG_IN(GPIO105, AF1) | ||
392 | #define GPIO106_CIF_DD_9 MFP_CFG_IN(GPIO106, AF1) | ||
393 | #define GPIO107_CIF_DD_8 MFP_CFG_IN(GPIO107, AF1) | ||
394 | #define GPIO108_CIF_DD_7 MFP_CFG_IN(GPIO108, AF1) | ||
395 | #define GPIO114_CIF_DD_1 MFP_CFG_IN(GPIO114, AF1) | ||
396 | |||
397 | /* Universal Subscriber ID Interface */ | ||
398 | #define GPIO114_UVS0 MFP_CFG_OUT(GPIO114, AF2, DRIVE_LOW) | ||
399 | #define GPIO115_nUVS1 MFP_CFG_OUT(GPIO115, AF2, DRIVE_LOW) | ||
400 | #define GPIO116_nUVS2 MFP_CFG_OUT(GPIO116, AF2, DRIVE_LOW) | ||
401 | #define GPIO14_UCLK MFP_CFG_OUT(GPIO14, AF3, DRIVE_LOW) | ||
402 | #define GPIO91_UCLK MFP_CFG_OUT(GPIO91, AF2, DRIVE_LOW) | ||
403 | #define GPIO19_nURST MFP_CFG_OUT(GPIO19, AF3, DRIVE_LOW) | ||
404 | #define GPIO90_nURST MFP_CFG_OUT(GPIO90, AF2, DRIVE_LOW) | ||
405 | #define GPIO116_UDET MFP_CFG_IN(GPIO116, AF3) | ||
406 | #define GPIO114_UEN MFP_CFG_OUT(GPIO114, AF1, DRIVE_LOW) | ||
407 | #define GPIO115_UEN MFP_CFG_OUT(GPIO115, AF1, DRIVE_LOW) | ||
408 | |||
409 | /* Mobile Scalable Link (MSL) Interface */ | ||
410 | #define GPIO81_BB_OB_DAT_0 MFP_CFG_OUT(GPIO81, AF2, DRIVE_LOW) | ||
411 | #define GPIO48_BB_OB_DAT_1 MFP_CFG_OUT(GPIO48, AF1, DRIVE_LOW) | ||
412 | #define GPIO50_BB_OB_DAT_2 MFP_CFG_OUT(GPIO50, AF1, DRIVE_LOW) | ||
413 | #define GPIO51_BB_OB_DAT_3 MFP_CFG_OUT(GPIO51, AF1, DRIVE_LOW) | ||
414 | #define GPIO52_BB_OB_CLK MFP_CFG_OUT(GPIO52, AF1, DRIVE_LOW) | ||
415 | #define GPIO53_BB_OB_STB MFP_CFG_OUT(GPIO53, AF1, DRIVE_LOW) | ||
416 | #define GPIO54_BB_OB_WAIT MFP_CFG_IN(GPIO54, AF2) | ||
417 | #define GPIO82_BB_IB_DAT_0 MFP_CFG_IN(GPIO82, AF2) | ||
418 | #define GPIO55_BB_IB_DAT_1 MFP_CFG_IN(GPIO55, AF2) | ||
419 | #define GPIO56_BB_IB_DAT_2 MFP_CFG_IN(GPIO56, AF2) | ||
420 | #define GPIO57_BB_IB_DAT_3 MFP_CFG_IN(GPIO57, AF2) | ||
421 | #define GPIO83_BB_IB_CLK MFP_CFG_IN(GPIO83, AF2) | ||
422 | #define GPIO84_BB_IB_STB MFP_CFG_IN(GPIO84, AF2) | ||
423 | #define GPIO85_BB_IB_WAIT MFP_CFG_OUT(GPIO85, AF2, DRIVE_LOW) | ||
424 | |||
425 | /* Memory Stick Host Controller */ | ||
426 | #define GPIO92_MSBS MFP_CFG_OUT(GPIO92, AF2, DRIVE_LOW) | ||
427 | #define GPIO109_MSSDIO MFP_CFG_IN(GPIO109, AF2) | ||
428 | #define GPIO112_nMSINS MFP_CFG_IN(GPIO112, AF2) | ||
429 | #define GPIO32_MSSCLK MFP_CFG_OUT(GPIO32, AF1, DRIVE_LOW) | ||
430 | |||
431 | extern int keypad_set_wake(unsigned int on); | ||
432 | #endif /* __ASM_ARCH_MFP_PXA27X_H */ | ||
diff --git a/include/asm-arm/arch-pxa/mfp-pxa2xx.h b/include/asm-arm/arch-pxa/mfp-pxa2xx.h new file mode 100644 index 000000000000..db8d890d237c --- /dev/null +++ b/include/asm-arm/arch-pxa/mfp-pxa2xx.h | |||
@@ -0,0 +1,132 @@ | |||
1 | #ifndef __ASM_ARCH_MFP_PXA2XX_H | ||
2 | #define __ASM_ARCH_MFP_PXA2XX_H | ||
3 | |||
4 | #include <asm/arch/mfp.h> | ||
5 | |||
6 | /* | ||
7 | * the following MFP_xxx bit definitions in mfp.h are re-used for pxa2xx: | ||
8 | * | ||
9 | * MFP_PIN(x) | ||
10 | * MFP_AFx | ||
11 | * MFP_LPM_DRIVE_{LOW, HIGH} | ||
12 | * MFP_LPM_EDGE_x | ||
13 | * | ||
14 | * other MFP_x bit definitions will be ignored | ||
15 | * | ||
16 | * and adds the below two bits specifically for pxa2xx: | ||
17 | * | ||
18 | * bit 23 - Input/Output (PXA2xx specific) | ||
19 | * bit 24 - Wakeup Enable(PXA2xx specific) | ||
20 | */ | ||
21 | |||
22 | #define MFP_DIR_IN (0x0 << 23) | ||
23 | #define MFP_DIR_OUT (0x1 << 23) | ||
24 | #define MFP_DIR_MASK (0x1 << 23) | ||
25 | #define MFP_DIR(x) (((x) >> 23) & 0x1) | ||
26 | |||
27 | #define MFP_LPM_CAN_WAKEUP (0x1 << 24) | ||
28 | #define WAKEUP_ON_EDGE_RISE (MFP_LPM_CAN_WAKEUP | MFP_LPM_EDGE_RISE) | ||
29 | #define WAKEUP_ON_EDGE_FALL (MFP_LPM_CAN_WAKEUP | MFP_LPM_EDGE_FALL) | ||
30 | #define WAKEUP_ON_EDGE_BOTH (MFP_LPM_CAN_WAKEUP | MFP_LPM_EDGE_BOTH) | ||
31 | |||
32 | /* specifically for enabling wakeup on keypad GPIOs */ | ||
33 | #define WAKEUP_ON_LEVEL_HIGH (MFP_LPM_CAN_WAKEUP) | ||
34 | |||
35 | #define MFP_CFG_IN(pin, af) \ | ||
36 | ((MFP_CFG_DEFAULT & ~(MFP_AF_MASK | MFP_DIR_MASK)) |\ | ||
37 | (MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_DIR_IN)) | ||
38 | |||
39 | /* NOTE: pins configured as output _must_ provide a low power state, | ||
40 | * and this state should help to minimize the power dissipation. | ||
41 | */ | ||
42 | #define MFP_CFG_OUT(pin, af, state) \ | ||
43 | ((MFP_CFG_DEFAULT & ~(MFP_AF_MASK | MFP_DIR_MASK | MFP_LPM_STATE_MASK)) |\ | ||
44 | (MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_DIR_OUT | MFP_LPM_##state)) | ||
45 | |||
46 | /* Common configurations for pxa25x and pxa27x | ||
47 | * | ||
48 | * Note: pins configured as GPIO are always initialized to input | ||
49 | * so not to cause any side effect | ||
50 | */ | ||
51 | #define GPIO0_GPIO MFP_CFG_IN(GPIO0, AF0) | ||
52 | #define GPIO1_GPIO MFP_CFG_IN(GPIO1, AF0) | ||
53 | #define GPIO9_GPIO MFP_CFG_IN(GPIO9, AF0) | ||
54 | #define GPIO10_GPIO MFP_CFG_IN(GPIO10, AF0) | ||
55 | #define GPIO11_GPIO MFP_CFG_IN(GPIO11, AF0) | ||
56 | #define GPIO12_GPIO MFP_CFG_IN(GPIO12, AF0) | ||
57 | #define GPIO13_GPIO MFP_CFG_IN(GPIO13, AF0) | ||
58 | #define GPIO14_GPIO MFP_CFG_IN(GPIO14, AF0) | ||
59 | #define GPIO15_GPIO MFP_CFG_IN(GPIO15, AF0) | ||
60 | #define GPIO16_GPIO MFP_CFG_IN(GPIO16, AF0) | ||
61 | #define GPIO17_GPIO MFP_CFG_IN(GPIO17, AF0) | ||
62 | #define GPIO18_GPIO MFP_CFG_IN(GPIO18, AF0) | ||
63 | #define GPIO19_GPIO MFP_CFG_IN(GPIO19, AF0) | ||
64 | #define GPIO20_GPIO MFP_CFG_IN(GPIO20, AF0) | ||
65 | #define GPIO21_GPIO MFP_CFG_IN(GPIO21, AF0) | ||
66 | #define GPIO22_GPIO MFP_CFG_IN(GPIO22, AF0) | ||
67 | #define GPIO23_GPIO MFP_CFG_IN(GPIO23, AF0) | ||
68 | #define GPIO24_GPIO MFP_CFG_IN(GPIO24, AF0) | ||
69 | #define GPIO25_GPIO MFP_CFG_IN(GPIO25, AF0) | ||
70 | #define GPIO26_GPIO MFP_CFG_IN(GPIO26, AF0) | ||
71 | #define GPIO27_GPIO MFP_CFG_IN(GPIO27, AF0) | ||
72 | #define GPIO28_GPIO MFP_CFG_IN(GPIO28, AF0) | ||
73 | #define GPIO29_GPIO MFP_CFG_IN(GPIO29, AF0) | ||
74 | #define GPIO30_GPIO MFP_CFG_IN(GPIO30, AF0) | ||
75 | #define GPIO31_GPIO MFP_CFG_IN(GPIO31, AF0) | ||
76 | #define GPIO32_GPIO MFP_CFG_IN(GPIO32, AF0) | ||
77 | #define GPIO33_GPIO MFP_CFG_IN(GPIO33, AF0) | ||
78 | #define GPIO34_GPIO MFP_CFG_IN(GPIO34, AF0) | ||
79 | #define GPIO35_GPIO MFP_CFG_IN(GPIO35, AF0) | ||
80 | #define GPIO36_GPIO MFP_CFG_IN(GPIO36, AF0) | ||
81 | #define GPIO37_GPIO MFP_CFG_IN(GPIO37, AF0) | ||
82 | #define GPIO38_GPIO MFP_CFG_IN(GPIO38, AF0) | ||
83 | #define GPIO39_GPIO MFP_CFG_IN(GPIO39, AF0) | ||
84 | #define GPIO40_GPIO MFP_CFG_IN(GPIO40, AF0) | ||
85 | #define GPIO41_GPIO MFP_CFG_IN(GPIO41, AF0) | ||
86 | #define GPIO42_GPIO MFP_CFG_IN(GPIO42, AF0) | ||
87 | #define GPIO43_GPIO MFP_CFG_IN(GPIO43, AF0) | ||
88 | #define GPIO44_GPIO MFP_CFG_IN(GPIO44, AF0) | ||
89 | #define GPIO45_GPIO MFP_CFG_IN(GPIO45, AF0) | ||
90 | #define GPIO46_GPIO MFP_CFG_IN(GPIO46, AF0) | ||
91 | #define GPIO47_GPIO MFP_CFG_IN(GPIO47, AF0) | ||
92 | #define GPIO48_GPIO MFP_CFG_IN(GPIO48, AF0) | ||
93 | #define GPIO49_GPIO MFP_CFG_IN(GPIO49, AF0) | ||
94 | #define GPIO50_GPIO MFP_CFG_IN(GPIO50, AF0) | ||
95 | #define GPIO51_GPIO MFP_CFG_IN(GPIO51, AF0) | ||
96 | #define GPIO52_GPIO MFP_CFG_IN(GPIO52, AF0) | ||
97 | #define GPIO53_GPIO MFP_CFG_IN(GPIO53, AF0) | ||
98 | #define GPIO54_GPIO MFP_CFG_IN(GPIO54, AF0) | ||
99 | #define GPIO55_GPIO MFP_CFG_IN(GPIO55, AF0) | ||
100 | #define GPIO56_GPIO MFP_CFG_IN(GPIO56, AF0) | ||
101 | #define GPIO57_GPIO MFP_CFG_IN(GPIO57, AF0) | ||
102 | #define GPIO58_GPIO MFP_CFG_IN(GPIO58, AF0) | ||
103 | #define GPIO59_GPIO MFP_CFG_IN(GPIO59, AF0) | ||
104 | #define GPIO60_GPIO MFP_CFG_IN(GPIO60, AF0) | ||
105 | #define GPIO61_GPIO MFP_CFG_IN(GPIO61, AF0) | ||
106 | #define GPIO62_GPIO MFP_CFG_IN(GPIO62, AF0) | ||
107 | #define GPIO63_GPIO MFP_CFG_IN(GPIO63, AF0) | ||
108 | #define GPIO64_GPIO MFP_CFG_IN(GPIO64, AF0) | ||
109 | #define GPIO65_GPIO MFP_CFG_IN(GPIO65, AF0) | ||
110 | #define GPIO66_GPIO MFP_CFG_IN(GPIO66, AF0) | ||
111 | #define GPIO67_GPIO MFP_CFG_IN(GPIO67, AF0) | ||
112 | #define GPIO68_GPIO MFP_CFG_IN(GPIO68, AF0) | ||
113 | #define GPIO69_GPIO MFP_CFG_IN(GPIO69, AF0) | ||
114 | #define GPIO70_GPIO MFP_CFG_IN(GPIO70, AF0) | ||
115 | #define GPIO71_GPIO MFP_CFG_IN(GPIO71, AF0) | ||
116 | #define GPIO72_GPIO MFP_CFG_IN(GPIO72, AF0) | ||
117 | #define GPIO73_GPIO MFP_CFG_IN(GPIO73, AF0) | ||
118 | #define GPIO74_GPIO MFP_CFG_IN(GPIO74, AF0) | ||
119 | #define GPIO75_GPIO MFP_CFG_IN(GPIO75, AF0) | ||
120 | #define GPIO76_GPIO MFP_CFG_IN(GPIO76, AF0) | ||
121 | #define GPIO77_GPIO MFP_CFG_IN(GPIO77, AF0) | ||
122 | #define GPIO78_GPIO MFP_CFG_IN(GPIO78, AF0) | ||
123 | #define GPIO79_GPIO MFP_CFG_IN(GPIO79, AF0) | ||
124 | #define GPIO80_GPIO MFP_CFG_IN(GPIO80, AF0) | ||
125 | #define GPIO81_GPIO MFP_CFG_IN(GPIO81, AF0) | ||
126 | #define GPIO82_GPIO MFP_CFG_IN(GPIO82, AF0) | ||
127 | #define GPIO83_GPIO MFP_CFG_IN(GPIO83, AF0) | ||
128 | #define GPIO84_GPIO MFP_CFG_IN(GPIO84, AF0) | ||
129 | |||
130 | extern void pxa2xx_mfp_config(unsigned long *mfp_cfgs, int num); | ||
131 | extern int gpio_set_wake(unsigned int gpio, unsigned int on); | ||
132 | #endif /* __ASM_ARCH_MFP_PXA2XX_H */ | ||
diff --git a/include/asm-arm/arch-pxa/pxa-regs.h b/include/asm-arm/arch-pxa/pxa-regs.h index 2357a73340d4..a322012f16ac 100644 --- a/include/asm-arm/arch-pxa/pxa-regs.h +++ b/include/asm-arm/arch-pxa/pxa-regs.h | |||
@@ -1129,6 +1129,11 @@ | |||
1129 | #define ICPR __REG(0x40D00010) /* Interrupt Controller Pending Register */ | 1129 | #define ICPR __REG(0x40D00010) /* Interrupt Controller Pending Register */ |
1130 | #define ICCR __REG(0x40D00014) /* Interrupt Controller Control Register */ | 1130 | #define ICCR __REG(0x40D00014) /* Interrupt Controller Control Register */ |
1131 | 1131 | ||
1132 | #define ICIP2 __REG(0x40D0009C) /* Interrupt Controller IRQ Pending Register 2 */ | ||
1133 | #define ICMR2 __REG(0x40D000A0) /* Interrupt Controller Mask Register 2 */ | ||
1134 | #define ICLR2 __REG(0x40D000A4) /* Interrupt Controller Level Register 2 */ | ||
1135 | #define ICFP2 __REG(0x40D000A8) /* Interrupt Controller FIQ Pending Register 2 */ | ||
1136 | #define ICPR2 __REG(0x40D000AC) /* Interrupt Controller Pending Register 2 */ | ||
1132 | 1137 | ||
1133 | /* | 1138 | /* |
1134 | * General Purpose I/O | 1139 | * General Purpose I/O |
@@ -1200,12 +1205,6 @@ | |||
1200 | 1205 | ||
1201 | /* Interrupt Controller */ | 1206 | /* Interrupt Controller */ |
1202 | 1207 | ||
1203 | #define ICIP2 __REG(0x40D0009C) /* Interrupt Controller IRQ Pending Register 2 */ | ||
1204 | #define ICMR2 __REG(0x40D000A0) /* Interrupt Controller Mask Register 2 */ | ||
1205 | #define ICLR2 __REG(0x40D000A4) /* Interrupt Controller Level Register 2 */ | ||
1206 | #define ICFP2 __REG(0x40D000A8) /* Interrupt Controller FIQ Pending Register 2 */ | ||
1207 | #define ICPR2 __REG(0x40D000AC) /* Interrupt Controller Pending Register 2 */ | ||
1208 | |||
1209 | #define _GPLR(x) __REG2(0x40E00000, ((x) & 0x60) >> 3) | 1208 | #define _GPLR(x) __REG2(0x40E00000, ((x) & 0x60) >> 3) |
1210 | #define _GPDR(x) __REG2(0x40E0000C, ((x) & 0x60) >> 3) | 1209 | #define _GPDR(x) __REG2(0x40E0000C, ((x) & 0x60) >> 3) |
1211 | #define _GPSR(x) __REG2(0x40E00018, ((x) & 0x60) >> 3) | 1210 | #define _GPSR(x) __REG2(0x40E00018, ((x) & 0x60) >> 3) |
@@ -1237,267 +1236,6 @@ | |||
1237 | 1236 | ||
1238 | #endif | 1237 | #endif |
1239 | 1238 | ||
1240 | |||
1241 | /* GPIO alternate function assignments */ | ||
1242 | |||
1243 | #define GPIO1_RST 1 /* reset */ | ||
1244 | #define GPIO6_MMCCLK 6 /* MMC Clock */ | ||
1245 | #define GPIO7_48MHz 7 /* 48 MHz clock output */ | ||
1246 | #define GPIO8_MMCCS0 8 /* MMC Chip Select 0 */ | ||
1247 | #define GPIO9_MMCCS1 9 /* MMC Chip Select 1 */ | ||
1248 | #define GPIO10_RTCCLK 10 /* real time clock (1 Hz) */ | ||
1249 | #define GPIO11_3_6MHz 11 /* 3.6 MHz oscillator out */ | ||
1250 | #define GPIO12_32KHz 12 /* 32 kHz out */ | ||
1251 | #define GPIO13_MBGNT 13 /* memory controller grant */ | ||
1252 | #define GPIO14_MBREQ 14 /* alternate bus master request */ | ||
1253 | #define GPIO15_nCS_1 15 /* chip select 1 */ | ||
1254 | #define GPIO16_PWM0 16 /* PWM0 output */ | ||
1255 | #define GPIO17_PWM1 17 /* PWM1 output */ | ||
1256 | #define GPIO18_RDY 18 /* Ext. Bus Ready */ | ||
1257 | #define GPIO19_DREQ1 19 /* External DMA Request */ | ||
1258 | #define GPIO20_DREQ0 20 /* External DMA Request */ | ||
1259 | #define GPIO23_SCLK 23 /* SSP clock */ | ||
1260 | #define GPIO24_SFRM 24 /* SSP Frame */ | ||
1261 | #define GPIO25_STXD 25 /* SSP transmit */ | ||
1262 | #define GPIO26_SRXD 26 /* SSP receive */ | ||
1263 | #define GPIO27_SEXTCLK 27 /* SSP ext_clk */ | ||
1264 | #define GPIO28_BITCLK 28 /* AC97/I2S bit_clk */ | ||
1265 | #define GPIO29_SDATA_IN 29 /* AC97 Sdata_in0 / I2S Sdata_in */ | ||
1266 | #define GPIO30_SDATA_OUT 30 /* AC97/I2S Sdata_out */ | ||
1267 | #define GPIO31_SYNC 31 /* AC97/I2S sync */ | ||
1268 | #define GPIO32_SDATA_IN1 32 /* AC97 Sdata_in1 */ | ||
1269 | #define GPIO32_SYSCLK 32 /* I2S System Clock */ | ||
1270 | #define GPIO32_MMCCLK 32 /* MMC Clock (PXA270) */ | ||
1271 | #define GPIO33_nCS_5 33 /* chip select 5 */ | ||
1272 | #define GPIO34_FFRXD 34 /* FFUART receive */ | ||
1273 | #define GPIO34_MMCCS0 34 /* MMC Chip Select 0 */ | ||
1274 | #define GPIO35_FFCTS 35 /* FFUART Clear to send */ | ||
1275 | #define GPIO36_FFDCD 36 /* FFUART Data carrier detect */ | ||
1276 | #define GPIO37_FFDSR 37 /* FFUART data set ready */ | ||
1277 | #define GPIO38_FFRI 38 /* FFUART Ring Indicator */ | ||
1278 | #define GPIO39_MMCCS1 39 /* MMC Chip Select 1 */ | ||
1279 | #define GPIO39_FFTXD 39 /* FFUART transmit data */ | ||
1280 | #define GPIO40_FFDTR 40 /* FFUART data terminal Ready */ | ||
1281 | #define GPIO41_FFRTS 41 /* FFUART request to send */ | ||
1282 | #define GPIO42_BTRXD 42 /* BTUART receive data */ | ||
1283 | #define GPIO42_HWRXD 42 /* HWUART receive data */ | ||
1284 | #define GPIO43_BTTXD 43 /* BTUART transmit data */ | ||
1285 | #define GPIO43_HWTXD 43 /* HWUART transmit data */ | ||
1286 | #define GPIO44_BTCTS 44 /* BTUART clear to send */ | ||
1287 | #define GPIO44_HWCTS 44 /* HWUART clear to send */ | ||
1288 | #define GPIO45_BTRTS 45 /* BTUART request to send */ | ||
1289 | #define GPIO45_HWRTS 45 /* HWUART request to send */ | ||
1290 | #define GPIO45_AC97_SYSCLK 45 /* AC97 System Clock */ | ||
1291 | #define GPIO46_ICPRXD 46 /* ICP receive data */ | ||
1292 | #define GPIO46_STRXD 46 /* STD_UART receive data */ | ||
1293 | #define GPIO47_ICPTXD 47 /* ICP transmit data */ | ||
1294 | #define GPIO47_STTXD 47 /* STD_UART transmit data */ | ||
1295 | #define GPIO48_nPOE 48 /* Output Enable for Card Space */ | ||
1296 | #define GPIO49_nPWE 49 /* Write Enable for Card Space */ | ||
1297 | #define GPIO50_nPIOR 50 /* I/O Read for Card Space */ | ||
1298 | #define GPIO51_nPIOW 51 /* I/O Write for Card Space */ | ||
1299 | #define GPIO52_nPCE_1 52 /* Card Enable for Card Space */ | ||
1300 | #define GPIO53_nPCE_2 53 /* Card Enable for Card Space */ | ||
1301 | #define GPIO53_MMCCLK 53 /* MMC Clock */ | ||
1302 | #define GPIO54_MMCCLK 54 /* MMC Clock */ | ||
1303 | #define GPIO54_pSKTSEL 54 /* Socket Select for Card Space */ | ||
1304 | #define GPIO54_nPCE_2 54 /* Card Enable for Card Space (PXA27x) */ | ||
1305 | #define GPIO55_nPREG 55 /* Card Address bit 26 */ | ||
1306 | #define GPIO56_nPWAIT 56 /* Wait signal for Card Space */ | ||
1307 | #define GPIO57_nIOIS16 57 /* Bus Width select for I/O Card Space */ | ||
1308 | #define GPIO58_LDD_0 58 /* LCD data pin 0 */ | ||
1309 | #define GPIO59_LDD_1 59 /* LCD data pin 1 */ | ||
1310 | #define GPIO60_LDD_2 60 /* LCD data pin 2 */ | ||
1311 | #define GPIO61_LDD_3 61 /* LCD data pin 3 */ | ||
1312 | #define GPIO62_LDD_4 62 /* LCD data pin 4 */ | ||
1313 | #define GPIO63_LDD_5 63 /* LCD data pin 5 */ | ||
1314 | #define GPIO64_LDD_6 64 /* LCD data pin 6 */ | ||
1315 | #define GPIO65_LDD_7 65 /* LCD data pin 7 */ | ||
1316 | #define GPIO66_LDD_8 66 /* LCD data pin 8 */ | ||
1317 | #define GPIO66_MBREQ 66 /* alternate bus master req */ | ||
1318 | #define GPIO67_LDD_9 67 /* LCD data pin 9 */ | ||
1319 | #define GPIO67_MMCCS0 67 /* MMC Chip Select 0 */ | ||
1320 | #define GPIO68_LDD_10 68 /* LCD data pin 10 */ | ||
1321 | #define GPIO68_MMCCS1 68 /* MMC Chip Select 1 */ | ||
1322 | #define GPIO69_LDD_11 69 /* LCD data pin 11 */ | ||
1323 | #define GPIO69_MMCCLK 69 /* MMC_CLK */ | ||
1324 | #define GPIO70_LDD_12 70 /* LCD data pin 12 */ | ||
1325 | #define GPIO70_RTCCLK 70 /* Real Time clock (1 Hz) */ | ||
1326 | #define GPIO71_LDD_13 71 /* LCD data pin 13 */ | ||
1327 | #define GPIO71_3_6MHz 71 /* 3.6 MHz Oscillator clock */ | ||
1328 | #define GPIO72_LDD_14 72 /* LCD data pin 14 */ | ||
1329 | #define GPIO72_32kHz 72 /* 32 kHz clock */ | ||
1330 | #define GPIO73_LDD_15 73 /* LCD data pin 15 */ | ||
1331 | #define GPIO73_MBGNT 73 /* Memory controller grant */ | ||
1332 | #define GPIO74_LCD_FCLK 74 /* LCD Frame clock */ | ||
1333 | #define GPIO75_LCD_LCLK 75 /* LCD line clock */ | ||
1334 | #define GPIO76_LCD_PCLK 76 /* LCD Pixel clock */ | ||
1335 | #define GPIO77_LCD_ACBIAS 77 /* LCD AC Bias */ | ||
1336 | #define GPIO78_nCS_2 78 /* chip select 2 */ | ||
1337 | #define GPIO79_nCS_3 79 /* chip select 3 */ | ||
1338 | #define GPIO80_nCS_4 80 /* chip select 4 */ | ||
1339 | #define GPIO81_NSCLK 81 /* NSSP clock */ | ||
1340 | #define GPIO82_NSFRM 82 /* NSSP Frame */ | ||
1341 | #define GPIO83_NSTXD 83 /* NSSP transmit */ | ||
1342 | #define GPIO84_NSRXD 84 /* NSSP receive */ | ||
1343 | #define GPIO85_nPCE_1 85 /* Card Enable for Card Space (PXA27x) */ | ||
1344 | #define GPIO92_MMCDAT0 92 /* MMC DAT0 (PXA27x) */ | ||
1345 | #define GPIO102_nPCE_1 102 /* PCMCIA (PXA27x) */ | ||
1346 | #define GPIO109_MMCDAT1 109 /* MMC DAT1 (PXA27x) */ | ||
1347 | #define GPIO110_MMCDAT2 110 /* MMC DAT2 (PXA27x) */ | ||
1348 | #define GPIO110_MMCCS0 110 /* MMC Chip Select 0 (PXA27x) */ | ||
1349 | #define GPIO111_MMCDAT3 111 /* MMC DAT3 (PXA27x) */ | ||
1350 | #define GPIO111_MMCCS1 111 /* MMC Chip Select 1 (PXA27x) */ | ||
1351 | #define GPIO112_MMCCMD 112 /* MMC CMD (PXA27x) */ | ||
1352 | #define GPIO113_I2S_SYSCLK 113 /* I2S System Clock (PXA27x) */ | ||
1353 | #define GPIO113_AC97_RESET_N 113 /* AC97 NRESET on (PXA27x) */ | ||
1354 | |||
1355 | /* GPIO alternate function mode & direction */ | ||
1356 | |||
1357 | #define GPIO_IN 0x000 | ||
1358 | #define GPIO_OUT 0x080 | ||
1359 | #define GPIO_ALT_FN_1_IN 0x100 | ||
1360 | #define GPIO_ALT_FN_1_OUT 0x180 | ||
1361 | #define GPIO_ALT_FN_2_IN 0x200 | ||
1362 | #define GPIO_ALT_FN_2_OUT 0x280 | ||
1363 | #define GPIO_ALT_FN_3_IN 0x300 | ||
1364 | #define GPIO_ALT_FN_3_OUT 0x380 | ||
1365 | #define GPIO_MD_MASK_NR 0x07f | ||
1366 | #define GPIO_MD_MASK_DIR 0x080 | ||
1367 | #define GPIO_MD_MASK_FN 0x300 | ||
1368 | #define GPIO_DFLT_LOW 0x400 | ||
1369 | #define GPIO_DFLT_HIGH 0x800 | ||
1370 | |||
1371 | #define GPIO1_RTS_MD ( 1 | GPIO_ALT_FN_1_IN) | ||
1372 | #define GPIO6_MMCCLK_MD ( 6 | GPIO_ALT_FN_1_OUT) | ||
1373 | #define GPIO7_48MHz_MD ( 7 | GPIO_ALT_FN_1_OUT) | ||
1374 | #define GPIO8_MMCCS0_MD ( 8 | GPIO_ALT_FN_1_OUT) | ||
1375 | #define GPIO9_MMCCS1_MD ( 9 | GPIO_ALT_FN_1_OUT) | ||
1376 | #define GPIO10_RTCCLK_MD (10 | GPIO_ALT_FN_1_OUT) | ||
1377 | #define GPIO11_3_6MHz_MD (11 | GPIO_ALT_FN_1_OUT) | ||
1378 | #define GPIO12_32KHz_MD (12 | GPIO_ALT_FN_1_OUT) | ||
1379 | #define GPIO13_MBGNT_MD (13 | GPIO_ALT_FN_2_OUT) | ||
1380 | #define GPIO14_MBREQ_MD (14 | GPIO_ALT_FN_1_IN) | ||
1381 | #define GPIO15_nCS_1_MD (15 | GPIO_ALT_FN_2_OUT) | ||
1382 | #define GPIO16_PWM0_MD (16 | GPIO_ALT_FN_2_OUT) | ||
1383 | #define GPIO17_PWM1_MD (17 | GPIO_ALT_FN_2_OUT) | ||
1384 | #define GPIO18_RDY_MD (18 | GPIO_ALT_FN_1_IN) | ||
1385 | #define GPIO19_DREQ1_MD (19 | GPIO_ALT_FN_1_IN) | ||
1386 | #define GPIO20_DREQ0_MD (20 | GPIO_ALT_FN_1_IN) | ||
1387 | #define GPIO23_SCLK_MD (23 | GPIO_ALT_FN_2_OUT) | ||
1388 | #define GPIO24_SFRM_MD (24 | GPIO_ALT_FN_2_OUT) | ||
1389 | #define GPIO25_STXD_MD (25 | GPIO_ALT_FN_2_OUT) | ||
1390 | #define GPIO26_SRXD_MD (26 | GPIO_ALT_FN_1_IN) | ||
1391 | #define GPIO27_SEXTCLK_MD (27 | GPIO_ALT_FN_1_IN) | ||
1392 | #define GPIO28_BITCLK_AC97_MD (28 | GPIO_ALT_FN_1_IN) | ||
1393 | #define GPIO28_BITCLK_IN_I2S_MD (28 | GPIO_ALT_FN_2_IN) | ||
1394 | #define GPIO28_BITCLK_OUT_I2S_MD (28 | GPIO_ALT_FN_1_OUT) | ||
1395 | #define GPIO29_SDATA_IN_AC97_MD (29 | GPIO_ALT_FN_1_IN) | ||
1396 | #define GPIO29_SDATA_IN_I2S_MD (29 | GPIO_ALT_FN_2_IN) | ||
1397 | #define GPIO30_SDATA_OUT_AC97_MD (30 | GPIO_ALT_FN_2_OUT) | ||
1398 | #define GPIO30_SDATA_OUT_I2S_MD (30 | GPIO_ALT_FN_1_OUT) | ||
1399 | #define GPIO31_SYNC_I2S_MD (31 | GPIO_ALT_FN_1_OUT) | ||
1400 | #define GPIO31_SYNC_AC97_MD (31 | GPIO_ALT_FN_2_OUT) | ||
1401 | #define GPIO32_SDATA_IN1_AC97_MD (32 | GPIO_ALT_FN_1_IN) | ||
1402 | #define GPIO32_SYSCLK_I2S_MD (32 | GPIO_ALT_FN_1_OUT) | ||
1403 | #define GPIO32_MMCCLK_MD ( 32 | GPIO_ALT_FN_2_OUT) | ||
1404 | #define GPIO33_nCS_5_MD (33 | GPIO_ALT_FN_2_OUT) | ||
1405 | #define GPIO34_FFRXD_MD (34 | GPIO_ALT_FN_1_IN) | ||
1406 | #define GPIO34_MMCCS0_MD (34 | GPIO_ALT_FN_2_OUT) | ||
1407 | #define GPIO35_FFCTS_MD (35 | GPIO_ALT_FN_1_IN) | ||
1408 | #define GPIO36_FFDCD_MD (36 | GPIO_ALT_FN_1_IN) | ||
1409 | #define GPIO37_FFDSR_MD (37 | GPIO_ALT_FN_1_IN) | ||
1410 | #define GPIO38_FFRI_MD (38 | GPIO_ALT_FN_1_IN) | ||
1411 | #define GPIO39_MMCCS1_MD (39 | GPIO_ALT_FN_1_OUT) | ||
1412 | #define GPIO39_FFTXD_MD (39 | GPIO_ALT_FN_2_OUT) | ||
1413 | #define GPIO40_FFDTR_MD (40 | GPIO_ALT_FN_2_OUT) | ||
1414 | #define GPIO41_FFRTS_MD (41 | GPIO_ALT_FN_2_OUT) | ||
1415 | #define GPIO42_BTRXD_MD (42 | GPIO_ALT_FN_1_IN) | ||
1416 | #define GPIO42_HWRXD_MD (42 | GPIO_ALT_FN_3_IN) | ||
1417 | #define GPIO43_BTTXD_MD (43 | GPIO_ALT_FN_2_OUT) | ||
1418 | #define GPIO43_HWTXD_MD (43 | GPIO_ALT_FN_3_OUT) | ||
1419 | #define GPIO44_BTCTS_MD (44 | GPIO_ALT_FN_1_IN) | ||
1420 | #define GPIO44_HWCTS_MD (44 | GPIO_ALT_FN_3_IN) | ||
1421 | #define GPIO45_BTRTS_MD (45 | GPIO_ALT_FN_2_OUT) | ||
1422 | #define GPIO45_HWRTS_MD (45 | GPIO_ALT_FN_3_OUT) | ||
1423 | #define GPIO45_SYSCLK_AC97_MD (45 | GPIO_ALT_FN_1_OUT) | ||
1424 | #define GPIO46_ICPRXD_MD (46 | GPIO_ALT_FN_1_IN) | ||
1425 | #define GPIO46_STRXD_MD (46 | GPIO_ALT_FN_2_IN) | ||
1426 | #define GPIO47_ICPTXD_MD (47 | GPIO_ALT_FN_2_OUT) | ||
1427 | #define GPIO47_STTXD_MD (47 | GPIO_ALT_FN_1_OUT) | ||
1428 | #define GPIO48_nPOE_MD (48 | GPIO_ALT_FN_2_OUT) | ||
1429 | #define GPIO48_HWTXD_MD (48 | GPIO_ALT_FN_1_OUT) | ||
1430 | #define GPIO48_nPOE_MD (48 | GPIO_ALT_FN_2_OUT) | ||
1431 | #define GPIO49_HWRXD_MD (49 | GPIO_ALT_FN_1_IN) | ||
1432 | #define GPIO49_nPWE_MD (49 | GPIO_ALT_FN_2_OUT) | ||
1433 | #define GPIO50_nPIOR_MD (50 | GPIO_ALT_FN_2_OUT) | ||
1434 | #define GPIO50_HWCTS_MD (50 | GPIO_ALT_FN_1_IN) | ||
1435 | #define GPIO51_HWRTS_MD (51 | GPIO_ALT_FN_1_OUT) | ||
1436 | #define GPIO51_nPIOW_MD (51 | GPIO_ALT_FN_2_OUT) | ||
1437 | #define GPIO52_nPCE_1_MD (52 | GPIO_ALT_FN_2_OUT) | ||
1438 | #define GPIO53_nPCE_2_MD (53 | GPIO_ALT_FN_2_OUT) | ||
1439 | #define GPIO53_MMCCLK_MD (53 | GPIO_ALT_FN_1_OUT) | ||
1440 | #define GPIO54_MMCCLK_MD (54 | GPIO_ALT_FN_1_OUT) | ||
1441 | #define GPIO54_nPCE_2_MD (54 | GPIO_ALT_FN_2_OUT) | ||
1442 | #define GPIO54_pSKTSEL_MD (54 | GPIO_ALT_FN_2_OUT) | ||
1443 | #define GPIO55_nPREG_MD (55 | GPIO_ALT_FN_2_OUT) | ||
1444 | #define GPIO56_nPWAIT_MD (56 | GPIO_ALT_FN_1_IN) | ||
1445 | #define GPIO57_nIOIS16_MD (57 | GPIO_ALT_FN_1_IN) | ||
1446 | #define GPIO58_LDD_0_MD (58 | GPIO_ALT_FN_2_OUT) | ||
1447 | #define GPIO59_LDD_1_MD (59 | GPIO_ALT_FN_2_OUT) | ||
1448 | #define GPIO60_LDD_2_MD (60 | GPIO_ALT_FN_2_OUT) | ||
1449 | #define GPIO61_LDD_3_MD (61 | GPIO_ALT_FN_2_OUT) | ||
1450 | #define GPIO62_LDD_4_MD (62 | GPIO_ALT_FN_2_OUT) | ||
1451 | #define GPIO63_LDD_5_MD (63 | GPIO_ALT_FN_2_OUT) | ||
1452 | #define GPIO64_LDD_6_MD (64 | GPIO_ALT_FN_2_OUT) | ||
1453 | #define GPIO65_LDD_7_MD (65 | GPIO_ALT_FN_2_OUT) | ||
1454 | #define GPIO66_LDD_8_MD (66 | GPIO_ALT_FN_2_OUT) | ||
1455 | #define GPIO66_MBREQ_MD (66 | GPIO_ALT_FN_1_IN) | ||
1456 | #define GPIO67_LDD_9_MD (67 | GPIO_ALT_FN_2_OUT) | ||
1457 | #define GPIO67_MMCCS0_MD (67 | GPIO_ALT_FN_1_OUT) | ||
1458 | #define GPIO68_LDD_10_MD (68 | GPIO_ALT_FN_2_OUT) | ||
1459 | #define GPIO68_MMCCS1_MD (68 | GPIO_ALT_FN_1_OUT) | ||
1460 | #define GPIO69_LDD_11_MD (69 | GPIO_ALT_FN_2_OUT) | ||
1461 | #define GPIO69_MMCCLK_MD (69 | GPIO_ALT_FN_1_OUT) | ||
1462 | #define GPIO70_LDD_12_MD (70 | GPIO_ALT_FN_2_OUT) | ||
1463 | #define GPIO70_RTCCLK_MD (70 | GPIO_ALT_FN_1_OUT) | ||
1464 | #define GPIO71_LDD_13_MD (71 | GPIO_ALT_FN_2_OUT) | ||
1465 | #define GPIO71_3_6MHz_MD (71 | GPIO_ALT_FN_1_OUT) | ||
1466 | #define GPIO72_LDD_14_MD (72 | GPIO_ALT_FN_2_OUT) | ||
1467 | #define GPIO72_32kHz_MD (72 | GPIO_ALT_FN_1_OUT) | ||
1468 | #define GPIO73_LDD_15_MD (73 | GPIO_ALT_FN_2_OUT) | ||
1469 | #define GPIO73_MBGNT_MD (73 | GPIO_ALT_FN_1_OUT) | ||
1470 | #define GPIO74_LCD_FCLK_MD (74 | GPIO_ALT_FN_2_OUT) | ||
1471 | #define GPIO75_LCD_LCLK_MD (75 | GPIO_ALT_FN_2_OUT) | ||
1472 | #define GPIO76_LCD_PCLK_MD (76 | GPIO_ALT_FN_2_OUT) | ||
1473 | #define GPIO77_LCD_ACBIAS_MD (77 | GPIO_ALT_FN_2_OUT) | ||
1474 | #define GPIO78_nCS_2_MD (78 | GPIO_ALT_FN_2_OUT) | ||
1475 | #define GPIO79_nCS_3_MD (79 | GPIO_ALT_FN_2_OUT) | ||
1476 | #define GPIO79_pSKTSEL_MD (79 | GPIO_ALT_FN_1_OUT) | ||
1477 | #define GPIO80_nCS_4_MD (80 | GPIO_ALT_FN_2_OUT) | ||
1478 | #define GPIO81_NSSP_CLK_OUT (81 | GPIO_ALT_FN_1_OUT) | ||
1479 | #define GPIO81_NSSP_CLK_IN (81 | GPIO_ALT_FN_1_IN) | ||
1480 | #define GPIO82_NSSP_FRM_OUT (82 | GPIO_ALT_FN_1_OUT) | ||
1481 | #define GPIO82_NSSP_FRM_IN (82 | GPIO_ALT_FN_1_IN) | ||
1482 | #define GPIO83_NSSP_TX (83 | GPIO_ALT_FN_1_OUT) | ||
1483 | #define GPIO83_NSSP_RX (83 | GPIO_ALT_FN_2_IN) | ||
1484 | #define GPIO84_NSSP_TX (84 | GPIO_ALT_FN_1_OUT) | ||
1485 | #define GPIO84_NSSP_RX (84 | GPIO_ALT_FN_2_IN) | ||
1486 | #define GPIO85_nPCE_1_MD (85 | GPIO_ALT_FN_1_OUT) | ||
1487 | #define GPIO92_MMCDAT0_MD (92 | GPIO_ALT_FN_1_OUT) | ||
1488 | #define GPIO102_nPCE_1_MD (102 | GPIO_ALT_FN_1_OUT) | ||
1489 | #define GPIO104_pSKTSEL_MD (104 | GPIO_ALT_FN_1_OUT) | ||
1490 | #define GPIO109_MMCDAT1_MD (109 | GPIO_ALT_FN_1_OUT) | ||
1491 | #define GPIO110_MMCDAT2_MD (110 | GPIO_ALT_FN_1_OUT) | ||
1492 | #define GPIO110_MMCCS0_MD (110 | GPIO_ALT_FN_1_OUT) | ||
1493 | #define GPIO111_MMCDAT3_MD (111 | GPIO_ALT_FN_1_OUT) | ||
1494 | #define GPIO110_MMCCS1_MD (111 | GPIO_ALT_FN_1_OUT) | ||
1495 | #define GPIO112_MMCCMD_MD (112 | GPIO_ALT_FN_1_OUT) | ||
1496 | #define GPIO113_I2S_SYSCLK_MD (113 | GPIO_ALT_FN_1_OUT) | ||
1497 | #define GPIO113_AC97_RESET_N_MD (113 | GPIO_ALT_FN_2_OUT) | ||
1498 | #define GPIO117_I2CSCL_MD (117 | GPIO_ALT_FN_1_IN) | ||
1499 | #define GPIO118_I2CSDA_MD (118 | GPIO_ALT_FN_1_IN) | ||
1500 | |||
1501 | /* | 1239 | /* |
1502 | * Power Manager | 1240 | * Power Manager |
1503 | */ | 1241 | */ |
@@ -1866,62 +1604,6 @@ | |||
1866 | 1604 | ||
1867 | #ifdef CONFIG_PXA27x | 1605 | #ifdef CONFIG_PXA27x |
1868 | 1606 | ||
1869 | /* | ||
1870 | * Keypad | ||
1871 | */ | ||
1872 | #define KPC __REG(0x41500000) /* Keypad Interface Control register */ | ||
1873 | #define KPDK __REG(0x41500008) /* Keypad Interface Direct Key register */ | ||
1874 | #define KPREC __REG(0x41500010) /* Keypad Interface Rotary Encoder register */ | ||
1875 | #define KPMK __REG(0x41500018) /* Keypad Interface Matrix Key register */ | ||
1876 | #define KPAS __REG(0x41500020) /* Keypad Interface Automatic Scan register */ | ||
1877 | #define KPASMKP0 __REG(0x41500028) /* Keypad Interface Automatic Scan Multiple Key Presser register 0 */ | ||
1878 | #define KPASMKP1 __REG(0x41500030) /* Keypad Interface Automatic Scan Multiple Key Presser register 1 */ | ||
1879 | #define KPASMKP2 __REG(0x41500038) /* Keypad Interface Automatic Scan Multiple Key Presser register 2 */ | ||
1880 | #define KPASMKP3 __REG(0x41500040) /* Keypad Interface Automatic Scan Multiple Key Presser register 3 */ | ||
1881 | #define KPKDI __REG(0x41500048) /* Keypad Interface Key Debounce Interval register */ | ||
1882 | |||
1883 | #define KPC_AS (0x1 << 30) /* Automatic Scan bit */ | ||
1884 | #define KPC_ASACT (0x1 << 29) /* Automatic Scan on Activity */ | ||
1885 | #define KPC_MI (0x1 << 22) /* Matrix interrupt bit */ | ||
1886 | #define KPC_IMKP (0x1 << 21) /* Ignore Multiple Key Press */ | ||
1887 | #define KPC_MS7 (0x1 << 20) /* Matrix scan line 7 */ | ||
1888 | #define KPC_MS6 (0x1 << 19) /* Matrix scan line 6 */ | ||
1889 | #define KPC_MS5 (0x1 << 18) /* Matrix scan line 5 */ | ||
1890 | #define KPC_MS4 (0x1 << 17) /* Matrix scan line 4 */ | ||
1891 | #define KPC_MS3 (0x1 << 16) /* Matrix scan line 3 */ | ||
1892 | #define KPC_MS2 (0x1 << 15) /* Matrix scan line 2 */ | ||
1893 | #define KPC_MS1 (0x1 << 14) /* Matrix scan line 1 */ | ||
1894 | #define KPC_MS0 (0x1 << 13) /* Matrix scan line 0 */ | ||
1895 | #define KPC_MS_ALL (KPC_MS0 | KPC_MS1 | KPC_MS2 | KPC_MS3 | KPC_MS4 | KPC_MS5 | KPC_MS6 | KPC_MS7) | ||
1896 | #define KPC_ME (0x1 << 12) /* Matrix Keypad Enable */ | ||
1897 | #define KPC_MIE (0x1 << 11) /* Matrix Interrupt Enable */ | ||
1898 | #define KPC_DK_DEB_SEL (0x1 << 9) /* Direct Keypad Debounce Select */ | ||
1899 | #define KPC_DI (0x1 << 5) /* Direct key interrupt bit */ | ||
1900 | #define KPC_RE_ZERO_DEB (0x1 << 4) /* Rotary Encoder Zero Debounce */ | ||
1901 | #define KPC_REE1 (0x1 << 3) /* Rotary Encoder1 Enable */ | ||
1902 | #define KPC_REE0 (0x1 << 2) /* Rotary Encoder0 Enable */ | ||
1903 | #define KPC_DE (0x1 << 1) /* Direct Keypad Enable */ | ||
1904 | #define KPC_DIE (0x1 << 0) /* Direct Keypad interrupt Enable */ | ||
1905 | |||
1906 | #define KPDK_DKP (0x1 << 31) | ||
1907 | #define KPDK_DK7 (0x1 << 7) | ||
1908 | #define KPDK_DK6 (0x1 << 6) | ||
1909 | #define KPDK_DK5 (0x1 << 5) | ||
1910 | #define KPDK_DK4 (0x1 << 4) | ||
1911 | #define KPDK_DK3 (0x1 << 3) | ||
1912 | #define KPDK_DK2 (0x1 << 2) | ||
1913 | #define KPDK_DK1 (0x1 << 1) | ||
1914 | #define KPDK_DK0 (0x1 << 0) | ||
1915 | |||
1916 | #define KPREC_OF1 (0x1 << 31) | ||
1917 | #define kPREC_UF1 (0x1 << 30) | ||
1918 | #define KPREC_OF0 (0x1 << 15) | ||
1919 | #define KPREC_UF0 (0x1 << 14) | ||
1920 | |||
1921 | #define KPMK_MKP (0x1 << 31) | ||
1922 | #define KPAS_SO (0x1 << 31) | ||
1923 | #define KPASMKPx_SO (0x1 << 31) | ||
1924 | |||
1925 | /* Camera Interface */ | 1607 | /* Camera Interface */ |
1926 | #define CICR0 __REG(0x50000000) | 1608 | #define CICR0 __REG(0x50000000) |
1927 | #define CICR1 __REG(0x50000004) | 1609 | #define CICR1 __REG(0x50000004) |
@@ -1953,7 +1635,7 @@ | |||
1953 | #define CICR0_FOM (1 << 0) /* FIFO-overrun mask */ | 1635 | #define CICR0_FOM (1 << 0) /* FIFO-overrun mask */ |
1954 | 1636 | ||
1955 | #define CICR1_TBIT (1 << 31) /* Transparency bit */ | 1637 | #define CICR1_TBIT (1 << 31) /* Transparency bit */ |
1956 | #define CICR1_RGBT_CONV (0x3 << 30) /* RGBT conversion mask */ | 1638 | #define CICR1_RGBT_CONV (0x3 << 29) /* RGBT conversion mask */ |
1957 | #define CICR1_PPL (0x7ff << 15) /* Pixels per line mask */ | 1639 | #define CICR1_PPL (0x7ff << 15) /* Pixels per line mask */ |
1958 | #define CICR1_RGB_CONV (0x7 << 12) /* RGB conversion mask */ | 1640 | #define CICR1_RGB_CONV (0x7 << 12) /* RGB conversion mask */ |
1959 | #define CICR1_RGB_F (1 << 11) /* RGB format */ | 1641 | #define CICR1_RGB_F (1 << 11) /* RGB format */ |
diff --git a/include/asm-arm/arch-pxa/pxa27x_keypad.h b/include/asm-arm/arch-pxa/pxa27x_keypad.h index 644f7609b523..d5a48a96dea7 100644 --- a/include/asm-arm/arch-pxa/pxa27x_keypad.h +++ b/include/asm-arm/arch-pxa/pxa27x_keypad.h | |||
@@ -53,4 +53,6 @@ struct pxa27x_keypad_platform_data { | |||
53 | 53 | ||
54 | #define KEY(row, col, val) (((row) << 28) | ((col) << 24) | (val)) | 54 | #define KEY(row, col, val) (((row) << 28) | ((col) << 24) | (val)) |
55 | 55 | ||
56 | extern void pxa_set_keypad_info(struct pxa27x_keypad_platform_data *info); | ||
57 | |||
56 | #endif /* __ASM_ARCH_PXA27x_KEYPAD_H */ | 58 | #endif /* __ASM_ARCH_PXA27x_KEYPAD_H */ |
diff --git a/include/asm-arm/arch-pxa/pxa2xx-gpio.h b/include/asm-arm/arch-pxa/pxa2xx-gpio.h new file mode 100644 index 000000000000..763313c5e6be --- /dev/null +++ b/include/asm-arm/arch-pxa/pxa2xx-gpio.h | |||
@@ -0,0 +1,357 @@ | |||
1 | #ifndef __ASM_ARCH_PXA2XX_GPIO_H | ||
2 | #define __ASM_ARCH_PXA2XX_GPIO_H | ||
3 | |||
4 | /* GPIO alternate function assignments */ | ||
5 | |||
6 | #define GPIO1_RST 1 /* reset */ | ||
7 | #define GPIO6_MMCCLK 6 /* MMC Clock */ | ||
8 | #define GPIO7_48MHz 7 /* 48 MHz clock output */ | ||
9 | #define GPIO8_MMCCS0 8 /* MMC Chip Select 0 */ | ||
10 | #define GPIO9_MMCCS1 9 /* MMC Chip Select 1 */ | ||
11 | #define GPIO10_RTCCLK 10 /* real time clock (1 Hz) */ | ||
12 | #define GPIO11_3_6MHz 11 /* 3.6 MHz oscillator out */ | ||
13 | #define GPIO12_32KHz 12 /* 32 kHz out */ | ||
14 | #define GPIO12_CIF_DD_7 12 /* Camera data pin 7 */ | ||
15 | #define GPIO13_MBGNT 13 /* memory controller grant */ | ||
16 | #define GPIO14_MBREQ 14 /* alternate bus master request */ | ||
17 | #define GPIO15_nCS_1 15 /* chip select 1 */ | ||
18 | #define GPIO16_PWM0 16 /* PWM0 output */ | ||
19 | #define GPIO17_PWM1 17 /* PWM1 output */ | ||
20 | #define GPIO17_CIF_DD_6 17 /* Camera data pin 6 */ | ||
21 | #define GPIO18_RDY 18 /* Ext. Bus Ready */ | ||
22 | #define GPIO19_DREQ1 19 /* External DMA Request */ | ||
23 | #define GPIO20_DREQ0 20 /* External DMA Request */ | ||
24 | #define GPIO23_SCLK 23 /* SSP clock */ | ||
25 | #define GPIO23_CIF_MCLK 23 /* Camera Master Clock */ | ||
26 | #define GPIO24_SFRM 24 /* SSP Frame */ | ||
27 | #define GPIO24_CIF_FV 24 /* Camera frame start signal */ | ||
28 | #define GPIO25_STXD 25 /* SSP transmit */ | ||
29 | #define GPIO25_CIF_LV 25 /* Camera line start signal */ | ||
30 | #define GPIO26_SRXD 26 /* SSP receive */ | ||
31 | #define GPIO26_CIF_PCLK 26 /* Camera Pixel Clock */ | ||
32 | #define GPIO27_SEXTCLK 27 /* SSP ext_clk */ | ||
33 | #define GPIO27_CIF_DD_0 27 /* Camera data pin 0 */ | ||
34 | #define GPIO28_BITCLK 28 /* AC97/I2S bit_clk */ | ||
35 | #define GPIO29_SDATA_IN 29 /* AC97 Sdata_in0 / I2S Sdata_in */ | ||
36 | #define GPIO30_SDATA_OUT 30 /* AC97/I2S Sdata_out */ | ||
37 | #define GPIO31_SYNC 31 /* AC97/I2S sync */ | ||
38 | #define GPIO32_SDATA_IN1 32 /* AC97 Sdata_in1 */ | ||
39 | #define GPIO32_SYSCLK 32 /* I2S System Clock */ | ||
40 | #define GPIO32_MMCCLK 32 /* MMC Clock (PXA270) */ | ||
41 | #define GPIO33_nCS_5 33 /* chip select 5 */ | ||
42 | #define GPIO34_FFRXD 34 /* FFUART receive */ | ||
43 | #define GPIO34_MMCCS0 34 /* MMC Chip Select 0 */ | ||
44 | #define GPIO35_FFCTS 35 /* FFUART Clear to send */ | ||
45 | #define GPIO36_FFDCD 36 /* FFUART Data carrier detect */ | ||
46 | #define GPIO37_FFDSR 37 /* FFUART data set ready */ | ||
47 | #define GPIO38_FFRI 38 /* FFUART Ring Indicator */ | ||
48 | #define GPIO39_MMCCS1 39 /* MMC Chip Select 1 */ | ||
49 | #define GPIO39_FFTXD 39 /* FFUART transmit data */ | ||
50 | #define GPIO40_FFDTR 40 /* FFUART data terminal Ready */ | ||
51 | #define GPIO41_FFRTS 41 /* FFUART request to send */ | ||
52 | #define GPIO42_BTRXD 42 /* BTUART receive data */ | ||
53 | #define GPIO42_HWRXD 42 /* HWUART receive data */ | ||
54 | #define GPIO42_CIF_MCLK 42 /* Camera Master Clock */ | ||
55 | #define GPIO43_BTTXD 43 /* BTUART transmit data */ | ||
56 | #define GPIO43_HWTXD 43 /* HWUART transmit data */ | ||
57 | #define GPIO43_CIF_FV 43 /* Camera frame start signal */ | ||
58 | #define GPIO44_BTCTS 44 /* BTUART clear to send */ | ||
59 | #define GPIO44_HWCTS 44 /* HWUART clear to send */ | ||
60 | #define GPIO44_CIF_LV 44 /* Camera line start signal */ | ||
61 | #define GPIO45_BTRTS 45 /* BTUART request to send */ | ||
62 | #define GPIO45_HWRTS 45 /* HWUART request to send */ | ||
63 | #define GPIO45_AC97_SYSCLK 45 /* AC97 System Clock */ | ||
64 | #define GPIO45_CIF_PCLK 45 /* Camera Pixel Clock */ | ||
65 | #define GPIO46_ICPRXD 46 /* ICP receive data */ | ||
66 | #define GPIO46_STRXD 46 /* STD_UART receive data */ | ||
67 | #define GPIO47_ICPTXD 47 /* ICP transmit data */ | ||
68 | #define GPIO47_STTXD 47 /* STD_UART transmit data */ | ||
69 | #define GPIO47_CIF_DD_0 47 /* Camera data pin 0 */ | ||
70 | #define GPIO48_nPOE 48 /* Output Enable for Card Space */ | ||
71 | #define GPIO48_CIF_DD_5 48 /* Camera data pin 5 */ | ||
72 | #define GPIO49_nPWE 49 /* Write Enable for Card Space */ | ||
73 | #define GPIO50_nPIOR 50 /* I/O Read for Card Space */ | ||
74 | #define GPIO50_CIF_DD_3 50 /* Camera data pin 3 */ | ||
75 | #define GPIO51_nPIOW 51 /* I/O Write for Card Space */ | ||
76 | #define GPIO51_CIF_DD_2 51 /* Camera data pin 2 */ | ||
77 | #define GPIO52_nPCE_1 52 /* Card Enable for Card Space */ | ||
78 | #define GPIO52_CIF_DD_4 52 /* Camera data pin 4 */ | ||
79 | #define GPIO53_nPCE_2 53 /* Card Enable for Card Space */ | ||
80 | #define GPIO53_MMCCLK 53 /* MMC Clock */ | ||
81 | #define GPIO53_CIF_MCLK 53 /* Camera Master Clock */ | ||
82 | #define GPIO54_MMCCLK 54 /* MMC Clock */ | ||
83 | #define GPIO54_pSKTSEL 54 /* Socket Select for Card Space */ | ||
84 | #define GPIO54_nPCE_2 54 /* Card Enable for Card Space (PXA27x) */ | ||
85 | #define GPIO54_CIF_PCLK 54 /* Camera Pixel Clock */ | ||
86 | #define GPIO55_nPREG 55 /* Card Address bit 26 */ | ||
87 | #define GPIO55_CIF_DD_1 55 /* Camera data pin 1 */ | ||
88 | #define GPIO56_nPWAIT 56 /* Wait signal for Card Space */ | ||
89 | #define GPIO57_nIOIS16 57 /* Bus Width select for I/O Card Space */ | ||
90 | #define GPIO58_LDD_0 58 /* LCD data pin 0 */ | ||
91 | #define GPIO59_LDD_1 59 /* LCD data pin 1 */ | ||
92 | #define GPIO60_LDD_2 60 /* LCD data pin 2 */ | ||
93 | #define GPIO61_LDD_3 61 /* LCD data pin 3 */ | ||
94 | #define GPIO62_LDD_4 62 /* LCD data pin 4 */ | ||
95 | #define GPIO63_LDD_5 63 /* LCD data pin 5 */ | ||
96 | #define GPIO64_LDD_6 64 /* LCD data pin 6 */ | ||
97 | #define GPIO65_LDD_7 65 /* LCD data pin 7 */ | ||
98 | #define GPIO66_LDD_8 66 /* LCD data pin 8 */ | ||
99 | #define GPIO66_MBREQ 66 /* alternate bus master req */ | ||
100 | #define GPIO67_LDD_9 67 /* LCD data pin 9 */ | ||
101 | #define GPIO67_MMCCS0 67 /* MMC Chip Select 0 */ | ||
102 | #define GPIO68_LDD_10 68 /* LCD data pin 10 */ | ||
103 | #define GPIO68_MMCCS1 68 /* MMC Chip Select 1 */ | ||
104 | #define GPIO69_LDD_11 69 /* LCD data pin 11 */ | ||
105 | #define GPIO69_MMCCLK 69 /* MMC_CLK */ | ||
106 | #define GPIO70_LDD_12 70 /* LCD data pin 12 */ | ||
107 | #define GPIO70_RTCCLK 70 /* Real Time clock (1 Hz) */ | ||
108 | #define GPIO71_LDD_13 71 /* LCD data pin 13 */ | ||
109 | #define GPIO71_3_6MHz 71 /* 3.6 MHz Oscillator clock */ | ||
110 | #define GPIO72_LDD_14 72 /* LCD data pin 14 */ | ||
111 | #define GPIO72_32kHz 72 /* 32 kHz clock */ | ||
112 | #define GPIO73_LDD_15 73 /* LCD data pin 15 */ | ||
113 | #define GPIO73_MBGNT 73 /* Memory controller grant */ | ||
114 | #define GPIO74_LCD_FCLK 74 /* LCD Frame clock */ | ||
115 | #define GPIO75_LCD_LCLK 75 /* LCD line clock */ | ||
116 | #define GPIO76_LCD_PCLK 76 /* LCD Pixel clock */ | ||
117 | #define GPIO77_LCD_ACBIAS 77 /* LCD AC Bias */ | ||
118 | #define GPIO78_nCS_2 78 /* chip select 2 */ | ||
119 | #define GPIO79_nCS_3 79 /* chip select 3 */ | ||
120 | #define GPIO80_nCS_4 80 /* chip select 4 */ | ||
121 | #define GPIO81_NSCLK 81 /* NSSP clock */ | ||
122 | #define GPIO81_CIF_DD_0 81 /* Camera data pin 0 */ | ||
123 | #define GPIO82_NSFRM 82 /* NSSP Frame */ | ||
124 | #define GPIO82_CIF_DD_5 82 /* Camera data pin 5 */ | ||
125 | #define GPIO83_NSTXD 83 /* NSSP transmit */ | ||
126 | #define GPIO83_CIF_DD_4 83 /* Camera data pin 4 */ | ||
127 | #define GPIO84_NSRXD 84 /* NSSP receive */ | ||
128 | #define GPIO84_CIF_FV 84 /* Camera frame start signal */ | ||
129 | #define GPIO85_nPCE_1 85 /* Card Enable for Card Space (PXA27x) */ | ||
130 | #define GPIO85_CIF_LV 85 /* Camera line start signal */ | ||
131 | #define GPIO90_CIF_DD_4 90 /* Camera data pin 4 */ | ||
132 | #define GPIO91_CIF_DD_5 91 /* Camera data pin 5 */ | ||
133 | #define GPIO92_MMCDAT0 92 /* MMC DAT0 (PXA27x) */ | ||
134 | #define GPIO93_CIF_DD_6 93 /* Camera data pin 6 */ | ||
135 | #define GPIO94_CIF_DD_5 94 /* Camera data pin 5 */ | ||
136 | #define GPIO95_CIF_DD_4 95 /* Camera data pin 4 */ | ||
137 | #define GPIO98_CIF_DD_0 98 /* Camera data pin 0 */ | ||
138 | #define GPIO102_nPCE_1 102 /* PCMCIA (PXA27x) */ | ||
139 | #define GPIO103_CIF_DD_3 103 /* Camera data pin 3 */ | ||
140 | #define GPIO104_CIF_DD_2 104 /* Camera data pin 2 */ | ||
141 | #define GPIO105_CIF_DD_1 105 /* Camera data pin 1 */ | ||
142 | #define GPIO106_CIF_DD_9 106 /* Camera data pin 9 */ | ||
143 | #define GPIO107_CIF_DD_8 107 /* Camera data pin 8 */ | ||
144 | #define GPIO108_CIF_DD_7 108 /* Camera data pin 7 */ | ||
145 | #define GPIO109_MMCDAT1 109 /* MMC DAT1 (PXA27x) */ | ||
146 | #define GPIO110_MMCDAT2 110 /* MMC DAT2 (PXA27x) */ | ||
147 | #define GPIO110_MMCCS0 110 /* MMC Chip Select 0 (PXA27x) */ | ||
148 | #define GPIO111_MMCDAT3 111 /* MMC DAT3 (PXA27x) */ | ||
149 | #define GPIO111_MMCCS1 111 /* MMC Chip Select 1 (PXA27x) */ | ||
150 | #define GPIO112_MMCCMD 112 /* MMC CMD (PXA27x) */ | ||
151 | #define GPIO113_I2S_SYSCLK 113 /* I2S System Clock (PXA27x) */ | ||
152 | #define GPIO113_AC97_RESET_N 113 /* AC97 NRESET on (PXA27x) */ | ||
153 | #define GPIO114_CIF_DD_1 114 /* Camera data pin 1 */ | ||
154 | #define GPIO115_CIF_DD_3 115 /* Camera data pin 3 */ | ||
155 | #define GPIO116_CIF_DD_2 116 /* Camera data pin 2 */ | ||
156 | |||
157 | /* GPIO alternate function mode & direction */ | ||
158 | |||
159 | #define GPIO_IN 0x000 | ||
160 | #define GPIO_OUT 0x080 | ||
161 | #define GPIO_ALT_FN_1_IN 0x100 | ||
162 | #define GPIO_ALT_FN_1_OUT 0x180 | ||
163 | #define GPIO_ALT_FN_2_IN 0x200 | ||
164 | #define GPIO_ALT_FN_2_OUT 0x280 | ||
165 | #define GPIO_ALT_FN_3_IN 0x300 | ||
166 | #define GPIO_ALT_FN_3_OUT 0x380 | ||
167 | #define GPIO_MD_MASK_NR 0x07f | ||
168 | #define GPIO_MD_MASK_DIR 0x080 | ||
169 | #define GPIO_MD_MASK_FN 0x300 | ||
170 | #define GPIO_DFLT_LOW 0x400 | ||
171 | #define GPIO_DFLT_HIGH 0x800 | ||
172 | |||
173 | #define GPIO1_RTS_MD ( 1 | GPIO_ALT_FN_1_IN) | ||
174 | #define GPIO6_MMCCLK_MD ( 6 | GPIO_ALT_FN_1_OUT) | ||
175 | #define GPIO7_48MHz_MD ( 7 | GPIO_ALT_FN_1_OUT) | ||
176 | #define GPIO8_MMCCS0_MD ( 8 | GPIO_ALT_FN_1_OUT) | ||
177 | #define GPIO9_MMCCS1_MD ( 9 | GPIO_ALT_FN_1_OUT) | ||
178 | #define GPIO10_RTCCLK_MD (10 | GPIO_ALT_FN_1_OUT) | ||
179 | #define GPIO11_3_6MHz_MD (11 | GPIO_ALT_FN_1_OUT) | ||
180 | #define GPIO12_32KHz_MD (12 | GPIO_ALT_FN_1_OUT) | ||
181 | #define GPIO12_CIF_DD_7_MD (12 | GPIO_ALT_FN_2_IN) | ||
182 | #define GPIO13_MBGNT_MD (13 | GPIO_ALT_FN_2_OUT) | ||
183 | #define GPIO14_MBREQ_MD (14 | GPIO_ALT_FN_1_IN) | ||
184 | #define GPIO15_nCS_1_MD (15 | GPIO_ALT_FN_2_OUT) | ||
185 | #define GPIO16_PWM0_MD (16 | GPIO_ALT_FN_2_OUT) | ||
186 | #define GPIO17_PWM1_MD (17 | GPIO_ALT_FN_2_OUT) | ||
187 | #define GPIO17_CIF_DD_6_MD (17 | GPIO_ALT_FN_2_IN) | ||
188 | #define GPIO18_RDY_MD (18 | GPIO_ALT_FN_1_IN) | ||
189 | #define GPIO19_DREQ1_MD (19 | GPIO_ALT_FN_1_IN) | ||
190 | #define GPIO20_DREQ0_MD (20 | GPIO_ALT_FN_1_IN) | ||
191 | #define GPIO23_CIF_MCLK_MD (23 | GPIO_ALT_FN_1_OUT) | ||
192 | #define GPIO23_SCLK_MD (23 | GPIO_ALT_FN_2_OUT) | ||
193 | #define GPIO24_CIF_FV_MD (24 | GPIO_ALT_FN_1_OUT) | ||
194 | #define GPIO24_SFRM_MD (24 | GPIO_ALT_FN_2_OUT) | ||
195 | #define GPIO25_CIF_LV_MD (25 | GPIO_ALT_FN_1_OUT) | ||
196 | #define GPIO25_STXD_MD (25 | GPIO_ALT_FN_2_OUT) | ||
197 | #define GPIO26_SRXD_MD (26 | GPIO_ALT_FN_1_IN) | ||
198 | #define GPIO26_CIF_PCLK_MD (26 | GPIO_ALT_FN_2_IN) | ||
199 | #define GPIO27_SEXTCLK_MD (27 | GPIO_ALT_FN_1_IN) | ||
200 | #define GPIO27_CIF_DD_0_MD (27 | GPIO_ALT_FN_3_IN) | ||
201 | #define GPIO28_BITCLK_AC97_MD (28 | GPIO_ALT_FN_1_IN) | ||
202 | #define GPIO28_BITCLK_IN_I2S_MD (28 | GPIO_ALT_FN_2_IN) | ||
203 | #define GPIO28_BITCLK_OUT_I2S_MD (28 | GPIO_ALT_FN_1_OUT) | ||
204 | #define GPIO29_SDATA_IN_AC97_MD (29 | GPIO_ALT_FN_1_IN) | ||
205 | #define GPIO29_SDATA_IN_I2S_MD (29 | GPIO_ALT_FN_2_IN) | ||
206 | #define GPIO30_SDATA_OUT_AC97_MD (30 | GPIO_ALT_FN_2_OUT) | ||
207 | #define GPIO30_SDATA_OUT_I2S_MD (30 | GPIO_ALT_FN_1_OUT) | ||
208 | #define GPIO31_SYNC_I2S_MD (31 | GPIO_ALT_FN_1_OUT) | ||
209 | #define GPIO31_SYNC_AC97_MD (31 | GPIO_ALT_FN_2_OUT) | ||
210 | #define GPIO32_SDATA_IN1_AC97_MD (32 | GPIO_ALT_FN_1_IN) | ||
211 | #define GPIO32_SYSCLK_I2S_MD (32 | GPIO_ALT_FN_1_OUT) | ||
212 | #define GPIO32_MMCCLK_MD (32 | GPIO_ALT_FN_2_OUT) | ||
213 | #define GPIO33_nCS_5_MD (33 | GPIO_ALT_FN_2_OUT) | ||
214 | #define GPIO34_FFRXD_MD (34 | GPIO_ALT_FN_1_IN) | ||
215 | #define GPIO34_MMCCS0_MD (34 | GPIO_ALT_FN_2_OUT) | ||
216 | #define GPIO35_FFCTS_MD (35 | GPIO_ALT_FN_1_IN) | ||
217 | #define GPIO35_KP_MKOUT6_MD (35 | GPIO_ALT_FN_2_OUT) | ||
218 | #define GPIO36_FFDCD_MD (36 | GPIO_ALT_FN_1_IN) | ||
219 | #define GPIO37_FFDSR_MD (37 | GPIO_ALT_FN_1_IN) | ||
220 | #define GPIO38_FFRI_MD (38 | GPIO_ALT_FN_1_IN) | ||
221 | #define GPIO39_MMCCS1_MD (39 | GPIO_ALT_FN_1_OUT) | ||
222 | #define GPIO39_FFTXD_MD (39 | GPIO_ALT_FN_2_OUT) | ||
223 | #define GPIO40_FFDTR_MD (40 | GPIO_ALT_FN_2_OUT) | ||
224 | #define GPIO41_FFRTS_MD (41 | GPIO_ALT_FN_2_OUT) | ||
225 | #define GPIO41_KP_MKOUT7_MD (41 | GPIO_ALT_FN_1_OUT) | ||
226 | #define GPIO42_BTRXD_MD (42 | GPIO_ALT_FN_1_IN) | ||
227 | #define GPIO42_HWRXD_MD (42 | GPIO_ALT_FN_3_IN) | ||
228 | #define GPIO42_CIF_MCLK_MD (42 | GPIO_ALT_FN_3_OUT) | ||
229 | #define GPIO43_BTTXD_MD (43 | GPIO_ALT_FN_2_OUT) | ||
230 | #define GPIO43_HWTXD_MD (43 | GPIO_ALT_FN_3_OUT) | ||
231 | #define GPIO43_CIF_FV_MD (43 | GPIO_ALT_FN_3_OUT) | ||
232 | #define GPIO44_BTCTS_MD (44 | GPIO_ALT_FN_1_IN) | ||
233 | #define GPIO44_HWCTS_MD (44 | GPIO_ALT_FN_3_IN) | ||
234 | #define GPIO44_CIF_LV_MD (44 | GPIO_ALT_FN_3_OUT) | ||
235 | #define GPIO45_CIF_PCLK_MD (45 | GPIO_ALT_FN_3_IN) | ||
236 | #define GPIO45_BTRTS_MD (45 | GPIO_ALT_FN_2_OUT) | ||
237 | #define GPIO45_HWRTS_MD (45 | GPIO_ALT_FN_3_OUT) | ||
238 | #define GPIO45_SYSCLK_AC97_MD (45 | GPIO_ALT_FN_1_OUT) | ||
239 | #define GPIO46_ICPRXD_MD (46 | GPIO_ALT_FN_1_IN) | ||
240 | #define GPIO46_STRXD_MD (46 | GPIO_ALT_FN_2_IN) | ||
241 | #define GPIO47_CIF_DD_0_MD (47 | GPIO_ALT_FN_1_IN) | ||
242 | #define GPIO47_ICPTXD_MD (47 | GPIO_ALT_FN_2_OUT) | ||
243 | #define GPIO47_STTXD_MD (47 | GPIO_ALT_FN_1_OUT) | ||
244 | #define GPIO48_CIF_DD_5_MD (48 | GPIO_ALT_FN_1_IN) | ||
245 | #define GPIO48_nPOE_MD (48 | GPIO_ALT_FN_2_OUT) | ||
246 | #define GPIO48_HWTXD_MD (48 | GPIO_ALT_FN_1_OUT) | ||
247 | #define GPIO48_nPOE_MD (48 | GPIO_ALT_FN_2_OUT) | ||
248 | #define GPIO49_HWRXD_MD (49 | GPIO_ALT_FN_1_IN) | ||
249 | #define GPIO49_nPWE_MD (49 | GPIO_ALT_FN_2_OUT) | ||
250 | #define GPIO50_CIF_DD_3_MD (50 | GPIO_ALT_FN_1_IN) | ||
251 | #define GPIO50_nPIOR_MD (50 | GPIO_ALT_FN_2_OUT) | ||
252 | #define GPIO50_HWCTS_MD (50 | GPIO_ALT_FN_1_IN) | ||
253 | #define GPIO50_CIF_DD_3_MD (50 | GPIO_ALT_FN_1_IN) | ||
254 | #define GPIO51_CIF_DD_2_MD (51 | GPIO_ALT_FN_1_IN) | ||
255 | #define GPIO51_nPIOW_MD (51 | GPIO_ALT_FN_2_OUT) | ||
256 | #define GPIO51_HWRTS_MD (51 | GPIO_ALT_FN_1_OUT) | ||
257 | #define GPIO51_CIF_DD_2_MD (51 | GPIO_ALT_FN_1_IN) | ||
258 | #define GPIO52_nPCE_1_MD (52 | GPIO_ALT_FN_2_OUT) | ||
259 | #define GPIO52_CIF_DD_4_MD (52 | GPIO_ALT_FN_1_IN) | ||
260 | #define GPIO53_nPCE_2_MD (53 | GPIO_ALT_FN_2_OUT) | ||
261 | #define GPIO53_MMCCLK_MD (53 | GPIO_ALT_FN_1_OUT) | ||
262 | #define GPIO53_CIF_MCLK_MD (53 | GPIO_ALT_FN_2_OUT) | ||
263 | #define GPIO54_MMCCLK_MD (54 | GPIO_ALT_FN_1_OUT) | ||
264 | #define GPIO54_nPCE_2_MD (54 | GPIO_ALT_FN_2_OUT) | ||
265 | #define GPIO54_pSKTSEL_MD (54 | GPIO_ALT_FN_2_OUT) | ||
266 | #define GPIO54_CIF_PCLK_MD (54 | GPIO_ALT_FN_3_IN) | ||
267 | #define GPIO55_nPREG_MD (55 | GPIO_ALT_FN_2_OUT) | ||
268 | #define GPIO55_CIF_DD_1_MD (55 | GPIO_ALT_FN_1_IN) | ||
269 | #define GPIO56_nPWAIT_MD (56 | GPIO_ALT_FN_1_IN) | ||
270 | #define GPIO57_nIOIS16_MD (57 | GPIO_ALT_FN_1_IN) | ||
271 | #define GPIO58_LDD_0_MD (58 | GPIO_ALT_FN_2_OUT) | ||
272 | #define GPIO59_LDD_1_MD (59 | GPIO_ALT_FN_2_OUT) | ||
273 | #define GPIO60_LDD_2_MD (60 | GPIO_ALT_FN_2_OUT) | ||
274 | #define GPIO61_LDD_3_MD (61 | GPIO_ALT_FN_2_OUT) | ||
275 | #define GPIO62_LDD_4_MD (62 | GPIO_ALT_FN_2_OUT) | ||
276 | #define GPIO63_LDD_5_MD (63 | GPIO_ALT_FN_2_OUT) | ||
277 | #define GPIO64_LDD_6_MD (64 | GPIO_ALT_FN_2_OUT) | ||
278 | #define GPIO65_LDD_7_MD (65 | GPIO_ALT_FN_2_OUT) | ||
279 | #define GPIO66_LDD_8_MD (66 | GPIO_ALT_FN_2_OUT) | ||
280 | #define GPIO66_MBREQ_MD (66 | GPIO_ALT_FN_1_IN) | ||
281 | #define GPIO67_LDD_9_MD (67 | GPIO_ALT_FN_2_OUT) | ||
282 | #define GPIO67_MMCCS0_MD (67 | GPIO_ALT_FN_1_OUT) | ||
283 | #define GPIO68_LDD_10_MD (68 | GPIO_ALT_FN_2_OUT) | ||
284 | #define GPIO68_MMCCS1_MD (68 | GPIO_ALT_FN_1_OUT) | ||
285 | #define GPIO69_LDD_11_MD (69 | GPIO_ALT_FN_2_OUT) | ||
286 | #define GPIO69_MMCCLK_MD (69 | GPIO_ALT_FN_1_OUT) | ||
287 | #define GPIO70_LDD_12_MD (70 | GPIO_ALT_FN_2_OUT) | ||
288 | #define GPIO70_RTCCLK_MD (70 | GPIO_ALT_FN_1_OUT) | ||
289 | #define GPIO71_LDD_13_MD (71 | GPIO_ALT_FN_2_OUT) | ||
290 | #define GPIO71_3_6MHz_MD (71 | GPIO_ALT_FN_1_OUT) | ||
291 | #define GPIO72_LDD_14_MD (72 | GPIO_ALT_FN_2_OUT) | ||
292 | #define GPIO72_32kHz_MD (72 | GPIO_ALT_FN_1_OUT) | ||
293 | #define GPIO73_LDD_15_MD (73 | GPIO_ALT_FN_2_OUT) | ||
294 | #define GPIO73_MBGNT_MD (73 | GPIO_ALT_FN_1_OUT) | ||
295 | #define GPIO74_LCD_FCLK_MD (74 | GPIO_ALT_FN_2_OUT) | ||
296 | #define GPIO75_LCD_LCLK_MD (75 | GPIO_ALT_FN_2_OUT) | ||
297 | #define GPIO76_LCD_PCLK_MD (76 | GPIO_ALT_FN_2_OUT) | ||
298 | #define GPIO77_LCD_ACBIAS_MD (77 | GPIO_ALT_FN_2_OUT) | ||
299 | #define GPIO78_nCS_2_MD (78 | GPIO_ALT_FN_2_OUT) | ||
300 | #define GPIO78_nPCE_2_MD (78 | GPIO_ALT_FN_1_OUT) | ||
301 | #define GPIO79_nCS_3_MD (79 | GPIO_ALT_FN_2_OUT) | ||
302 | #define GPIO79_pSKTSEL_MD (79 | GPIO_ALT_FN_1_OUT) | ||
303 | #define GPIO80_nCS_4_MD (80 | GPIO_ALT_FN_2_OUT) | ||
304 | #define GPIO81_NSSP_CLK_OUT (81 | GPIO_ALT_FN_1_OUT) | ||
305 | #define GPIO81_NSSP_CLK_IN (81 | GPIO_ALT_FN_1_IN) | ||
306 | #define GPIO81_CIF_DD_0_MD (81 | GPIO_ALT_FN_2_IN) | ||
307 | #define GPIO82_NSSP_FRM_OUT (82 | GPIO_ALT_FN_1_OUT) | ||
308 | #define GPIO82_NSSP_FRM_IN (82 | GPIO_ALT_FN_1_IN) | ||
309 | #define GPIO82_CIF_DD_5_MD (82 | GPIO_ALT_FN_3_IN) | ||
310 | #define GPIO83_NSSP_TX (83 | GPIO_ALT_FN_1_OUT) | ||
311 | #define GPIO83_NSSP_RX (83 | GPIO_ALT_FN_2_IN) | ||
312 | #define GPIO83_CIF_DD_4_MD (83 | GPIO_ALT_FN_3_IN) | ||
313 | #define GPIO84_NSSP_TX (84 | GPIO_ALT_FN_1_OUT) | ||
314 | #define GPIO84_NSSP_RX (84 | GPIO_ALT_FN_2_IN) | ||
315 | #define GPIO84_CIF_FV_MD (84 | GPIO_ALT_FN_3_IN) | ||
316 | #define GPIO85_nPCE_1_MD (85 | GPIO_ALT_FN_1_OUT) | ||
317 | #define GPIO85_CIF_LV_MD (85 | GPIO_ALT_FN_3_IN) | ||
318 | #define GPIO86_nPCE_1_MD (86 | GPIO_ALT_FN_1_OUT) | ||
319 | #define GPIO90_CIF_DD_4_MD (90 | GPIO_ALT_FN_3_IN) | ||
320 | #define GPIO91_CIF_DD_5_MD (91 | GPIO_ALT_FN_3_IN) | ||
321 | #define GPIO92_MMCDAT0_MD (92 | GPIO_ALT_FN_1_OUT) | ||
322 | #define GPIO93_CIF_DD_6_MD (93 | GPIO_ALT_FN_2_IN) | ||
323 | #define GPIO94_CIF_DD_5_MD (94 | GPIO_ALT_FN_2_IN) | ||
324 | #define GPIO95_CIF_DD_4_MD (95 | GPIO_ALT_FN_2_IN) | ||
325 | #define GPIO95_KP_MKIN6_MD (95 | GPIO_ALT_FN_3_IN) | ||
326 | #define GPIO96_KP_DKIN3_MD (96 | GPIO_ALT_FN_1_IN) | ||
327 | #define GPIO97_KP_MKIN3_MD (97 | GPIO_ALT_FN_3_IN) | ||
328 | #define GPIO98_CIF_DD_0_MD (98 | GPIO_ALT_FN_2_IN) | ||
329 | #define GPIO100_KP_MKIN0_MD (100 | GPIO_ALT_FN_1_IN) | ||
330 | #define GPIO101_KP_MKIN1_MD (101 | GPIO_ALT_FN_1_IN) | ||
331 | #define GPIO102_nPCE_1_MD (102 | GPIO_ALT_FN_1_OUT) | ||
332 | #define GPIO102_KP_MKIN2_MD (102 | GPIO_ALT_FN_1_IN) | ||
333 | #define GPIO103_CIF_DD_3_MD (103 | GPIO_ALT_FN_1_IN) | ||
334 | #define GPIO103_KP_MKOUT0_MD (103 | GPIO_ALT_FN_2_OUT) | ||
335 | #define GPIO104_CIF_DD_2_MD (104 | GPIO_ALT_FN_1_IN) | ||
336 | #define GPIO104_pSKTSEL_MD (104 | GPIO_ALT_FN_1_OUT) | ||
337 | #define GPIO104_KP_MKOUT1_MD (104 | GPIO_ALT_FN_2_OUT) | ||
338 | #define GPIO105_CIF_DD_1_MD (105 | GPIO_ALT_FN_1_IN) | ||
339 | #define GPIO105_KP_MKOUT2_MD (105 | GPIO_ALT_FN_2_OUT) | ||
340 | #define GPIO106_CIF_DD_9_MD (106 | GPIO_ALT_FN_1_IN) | ||
341 | #define GPIO106_KP_MKOUT3_MD (106 | GPIO_ALT_FN_2_OUT) | ||
342 | #define GPIO107_CIF_DD_8_MD (107 | GPIO_ALT_FN_1_IN) | ||
343 | #define GPIO107_KP_MKOUT4_MD (107 | GPIO_ALT_FN_2_OUT) | ||
344 | #define GPIO108_CIF_DD_7_MD (108 | GPIO_ALT_FN_1_IN) | ||
345 | #define GPIO108_KP_MKOUT5_MD (108 | GPIO_ALT_FN_2_OUT) | ||
346 | #define GPIO109_MMCDAT1_MD (109 | GPIO_ALT_FN_1_OUT) | ||
347 | #define GPIO110_MMCDAT2_MD (110 | GPIO_ALT_FN_1_OUT) | ||
348 | #define GPIO110_MMCCS0_MD (110 | GPIO_ALT_FN_1_OUT) | ||
349 | #define GPIO111_MMCDAT3_MD (111 | GPIO_ALT_FN_1_OUT) | ||
350 | #define GPIO110_MMCCS1_MD (111 | GPIO_ALT_FN_1_OUT) | ||
351 | #define GPIO112_MMCCMD_MD (112 | GPIO_ALT_FN_1_OUT) | ||
352 | #define GPIO113_I2S_SYSCLK_MD (113 | GPIO_ALT_FN_1_OUT) | ||
353 | #define GPIO113_AC97_RESET_N_MD (113 | GPIO_ALT_FN_2_OUT) | ||
354 | #define GPIO117_I2CSCL_MD (117 | GPIO_ALT_FN_1_IN) | ||
355 | #define GPIO118_I2CSDA_MD (118 | GPIO_ALT_FN_1_IN) | ||
356 | |||
357 | #endif /* __ASM_ARCH_PXA2XX_GPIO_H */ | ||
diff --git a/include/asm-arm/arch-pxa/pxa3xx-regs.h b/include/asm-arm/arch-pxa/pxa3xx-regs.h index 8e1b3ead827f..fe9364c83a28 100644 --- a/include/asm-arm/arch-pxa/pxa3xx-regs.h +++ b/include/asm-arm/arch-pxa/pxa3xx-regs.h | |||
@@ -12,6 +12,15 @@ | |||
12 | 12 | ||
13 | #ifndef __ASM_ARCH_PXA3XX_REGS_H | 13 | #ifndef __ASM_ARCH_PXA3XX_REGS_H |
14 | #define __ASM_ARCH_PXA3XX_REGS_H | 14 | #define __ASM_ARCH_PXA3XX_REGS_H |
15 | |||
16 | /* | ||
17 | * Oscillator Configuration Register (OSCC) | ||
18 | */ | ||
19 | #define OSCC __REG(0x41350000) /* Oscillator Configuration Register */ | ||
20 | |||
21 | #define OSCC_PEN (1 << 11) /* 13MHz POUT */ | ||
22 | |||
23 | |||
15 | /* | 24 | /* |
16 | * Service Power Management Unit (MPMU) | 25 | * Service Power Management Unit (MPMU) |
17 | */ | 26 | */ |
diff --git a/include/asm-arm/arch-pxa/tosa.h b/include/asm-arm/arch-pxa/tosa.h index c05e4faf85a6..c5b6fde6907c 100644 --- a/include/asm-arm/arch-pxa/tosa.h +++ b/include/asm-arm/arch-pxa/tosa.h | |||
@@ -23,11 +23,12 @@ | |||
23 | /* | 23 | /* |
24 | * SCOOP2 internal GPIOs | 24 | * SCOOP2 internal GPIOs |
25 | */ | 25 | */ |
26 | #define TOSA_SCOOP_GPIO_BASE NR_BUILTIN_GPIO | ||
26 | #define TOSA_SCOOP_PXA_VCORE1 SCOOP_GPCR_PA11 | 27 | #define TOSA_SCOOP_PXA_VCORE1 SCOOP_GPCR_PA11 |
27 | #define TOSA_SCOOP_TC6393_REST_IN SCOOP_GPCR_PA12 | 28 | #define TOSA_SCOOP_TC6393_REST_IN SCOOP_GPCR_PA12 |
28 | #define TOSA_SCOOP_IR_POWERDWN SCOOP_GPCR_PA13 | 29 | #define TOSA_GPIO_IR_POWERDWN (TOSA_SCOOP_GPIO_BASE + 2) |
29 | #define TOSA_SCOOP_SD_WP SCOOP_GPCR_PA14 | 30 | #define TOSA_GPIO_SD_WP (TOSA_SCOOP_GPIO_BASE + 3) |
30 | #define TOSA_SCOOP_PWR_ON SCOOP_GPCR_PA15 | 31 | #define TOSA_GPIO_PWR_ON (TOSA_SCOOP_GPIO_BASE + 4) |
31 | #define TOSA_SCOOP_AUD_PWR_ON SCOOP_GPCR_PA16 | 32 | #define TOSA_SCOOP_AUD_PWR_ON SCOOP_GPCR_PA16 |
32 | #define TOSA_SCOOP_BT_RESET SCOOP_GPCR_PA17 | 33 | #define TOSA_SCOOP_BT_RESET SCOOP_GPCR_PA17 |
33 | #define TOSA_SCOOP_BT_PWR_EN SCOOP_GPCR_PA18 | 34 | #define TOSA_SCOOP_BT_PWR_EN SCOOP_GPCR_PA18 |
@@ -35,7 +36,7 @@ | |||
35 | 36 | ||
36 | /* GPIO Direction 1 : output mode / 0:input mode */ | 37 | /* GPIO Direction 1 : output mode / 0:input mode */ |
37 | #define TOSA_SCOOP_IO_DIR ( TOSA_SCOOP_PXA_VCORE1 | TOSA_SCOOP_TC6393_REST_IN | \ | 38 | #define TOSA_SCOOP_IO_DIR ( TOSA_SCOOP_PXA_VCORE1 | TOSA_SCOOP_TC6393_REST_IN | \ |
38 | TOSA_SCOOP_IR_POWERDWN | TOSA_SCOOP_PWR_ON | TOSA_SCOOP_AUD_PWR_ON |\ | 39 | TOSA_SCOOP_AUD_PWR_ON |\ |
39 | TOSA_SCOOP_BT_RESET | TOSA_SCOOP_BT_PWR_EN ) | 40 | TOSA_SCOOP_BT_RESET | TOSA_SCOOP_BT_PWR_EN ) |
40 | /* GPIO out put level when init 1: Hi */ | 41 | /* GPIO out put level when init 1: Hi */ |
41 | #define TOSA_SCOOP_IO_OUT ( TOSA_SCOOP_TC6393_REST_IN ) | 42 | #define TOSA_SCOOP_IO_OUT ( TOSA_SCOOP_TC6393_REST_IN ) |
@@ -43,23 +44,21 @@ | |||
43 | /* | 44 | /* |
44 | * SCOOP2 jacket GPIOs | 45 | * SCOOP2 jacket GPIOs |
45 | */ | 46 | */ |
46 | #define TOSA_SCOOP_JC_BT_LED SCOOP_GPCR_PA11 | 47 | #define TOSA_SCOOP_JC_GPIO_BASE (NR_BUILTIN_GPIO + 12) |
47 | #define TOSA_SCOOP_JC_NOTE_LED SCOOP_GPCR_PA12 | 48 | #define TOSA_GPIO_BT_LED (TOSA_SCOOP_JC_GPIO_BASE + 0) |
48 | #define TOSA_SCOOP_JC_CHRG_ERR_LED SCOOP_GPCR_PA13 | 49 | #define TOSA_GPIO_NOTE_LED (TOSA_SCOOP_JC_GPIO_BASE + 1) |
49 | #define TOSA_SCOOP_JC_USB_PULLUP SCOOP_GPCR_PA14 | 50 | #define TOSA_GPIO_CHRG_ERR_LED (TOSA_SCOOP_JC_GPIO_BASE + 2) |
51 | #define TOSA_GPIO_USB_PULLUP (TOSA_SCOOP_JC_GPIO_BASE + 3) | ||
50 | #define TOSA_SCOOP_JC_TC6393_SUSPEND SCOOP_GPCR_PA15 | 52 | #define TOSA_SCOOP_JC_TC6393_SUSPEND SCOOP_GPCR_PA15 |
51 | #define TOSA_SCOOP_JC_TC3693_L3V_ON SCOOP_GPCR_PA16 | 53 | #define TOSA_SCOOP_JC_TC3693_L3V_ON SCOOP_GPCR_PA16 |
52 | #define TOSA_SCOOP_JC_WLAN_DETECT SCOOP_GPCR_PA17 | 54 | #define TOSA_SCOOP_JC_WLAN_DETECT SCOOP_GPCR_PA17 |
53 | #define TOSA_SCOOP_JC_WLAN_LED SCOOP_GPCR_PA18 | 55 | #define TOSA_GPIO_WLAN_LED (TOSA_SCOOP_JC_GPIO_BASE + 7) |
54 | #define TOSA_SCOOP_JC_CARD_LIMIT_SEL SCOOP_GPCR_PA19 | 56 | #define TOSA_SCOOP_JC_CARD_LIMIT_SEL SCOOP_GPCR_PA19 |
55 | 57 | ||
56 | /* GPIO Direction 1 : output mode / 0:input mode */ | 58 | /* GPIO Direction 1 : output mode / 0:input mode */ |
57 | #define TOSA_SCOOP_JC_IO_DIR ( TOSA_SCOOP_JC_BT_LED | TOSA_SCOOP_JC_NOTE_LED | \ | 59 | #define TOSA_SCOOP_JC_IO_DIR ( \ |
58 | TOSA_SCOOP_JC_CHRG_ERR_LED | TOSA_SCOOP_JC_USB_PULLUP | \ | ||
59 | TOSA_SCOOP_JC_TC6393_SUSPEND | TOSA_SCOOP_JC_TC3693_L3V_ON | \ | 60 | TOSA_SCOOP_JC_TC6393_SUSPEND | TOSA_SCOOP_JC_TC3693_L3V_ON | \ |
60 | TOSA_SCOOP_JC_WLAN_LED | TOSA_SCOOP_JC_CARD_LIMIT_SEL ) | 61 | TOSA_SCOOP_JC_CARD_LIMIT_SEL ) |
61 | /* GPIO out put level when init 1: Hi */ | ||
62 | #define TOSA_SCOOP_JC_IO_OUT ( 0 ) | ||
63 | 62 | ||
64 | /* | 63 | /* |
65 | * Timing Generator | 64 | * Timing Generator |
@@ -74,15 +73,6 @@ | |||
74 | #define TG_HPOSCTL 0x07 | 73 | #define TG_HPOSCTL 0x07 |
75 | 74 | ||
76 | /* | 75 | /* |
77 | * LED | ||
78 | */ | ||
79 | #define TOSA_SCOOP_LED_BLUE TOSA_SCOOP_GPCR_PA11 | ||
80 | #define TOSA_SCOOP_LED_GREEN TOSA_SCOOP_GPCR_PA12 | ||
81 | #define TOSA_SCOOP_LED_ORANGE TOSA_SCOOP_GPCR_PA13 | ||
82 | #define TOSA_SCOOP_LED_WLAN TOSA_SCOOP_GPCR_PA18 | ||
83 | |||
84 | |||
85 | /* | ||
86 | * PXA GPIOs | 76 | * PXA GPIOs |
87 | */ | 77 | */ |
88 | #define TOSA_GPIO_POWERON (0) | 78 | #define TOSA_GPIO_POWERON (0) |
@@ -161,12 +151,8 @@ | |||
161 | 151 | ||
162 | #define TOSA_IRQ_GPIO_MAIN_BAT_LOW IRQ_GPIO(TOSA_GPIO_MAIN_BAT_LOW) | 152 | #define TOSA_IRQ_GPIO_MAIN_BAT_LOW IRQ_GPIO(TOSA_GPIO_MAIN_BAT_LOW) |
163 | 153 | ||
164 | extern struct platform_device tosascoop_jc_device; | ||
165 | extern struct platform_device tosascoop_device; | ||
166 | |||
167 | #define TOSA_KEY_SYNC KEY_102ND /* ??? */ | 154 | #define TOSA_KEY_SYNC KEY_102ND /* ??? */ |
168 | 155 | ||
169 | |||
170 | #ifndef CONFIG_KEYBOARD_TOSA_USE_EXT_KEYCODES | 156 | #ifndef CONFIG_KEYBOARD_TOSA_USE_EXT_KEYCODES |
171 | #define TOSA_KEY_RECORD KEY_YEN | 157 | #define TOSA_KEY_RECORD KEY_YEN |
172 | #define TOSA_KEY_ADDRESSBOOK KEY_KATAKANA | 158 | #define TOSA_KEY_ADDRESSBOOK KEY_KATAKANA |
diff --git a/include/asm-arm/arch-pxa/zylonite.h b/include/asm-arm/arch-pxa/zylonite.h index 5f717d64ea7d..4881b80f0f90 100644 --- a/include/asm-arm/arch-pxa/zylonite.h +++ b/include/asm-arm/arch-pxa/zylonite.h | |||
@@ -18,6 +18,8 @@ extern struct platform_mmc_slot zylonite_mmc_slot[]; | |||
18 | extern int gpio_backlight; | 18 | extern int gpio_backlight; |
19 | extern int gpio_eth_irq; | 19 | extern int gpio_eth_irq; |
20 | 20 | ||
21 | extern int wm9713_irq; | ||
22 | |||
21 | extern int lcd_id; | 23 | extern int lcd_id; |
22 | extern int lcd_orientation; | 24 | extern int lcd_orientation; |
23 | 25 | ||
diff --git a/include/asm-arm/arch-realview/board-eb.h b/include/asm-arm/arch-realview/board-eb.h index 3e437b7f425a..206f7a752882 100644 --- a/include/asm-arm/arch-realview/board-eb.h +++ b/include/asm-arm/arch-realview/board-eb.h | |||
@@ -26,6 +26,26 @@ | |||
26 | /* | 26 | /* |
27 | * RealView EB + ARM11MPCore peripheral addresses | 27 | * RealView EB + ARM11MPCore peripheral addresses |
28 | */ | 28 | */ |
29 | #define REALVIEW_EB_UART0_BASE 0x10009000 /* UART 0 */ | ||
30 | #define REALVIEW_EB_UART1_BASE 0x1000A000 /* UART 1 */ | ||
31 | #define REALVIEW_EB_UART2_BASE 0x1000B000 /* UART 2 */ | ||
32 | #define REALVIEW_EB_UART3_BASE 0x1000C000 /* UART 3 */ | ||
33 | #define REALVIEW_EB_SSP_BASE 0x1000D000 /* Synchronous Serial Port */ | ||
34 | #define REALVIEW_EB_WATCHDOG_BASE 0x10010000 /* watchdog interface */ | ||
35 | #define REALVIEW_EB_TIMER0_1_BASE 0x10011000 /* Timer 0 and 1 */ | ||
36 | #define REALVIEW_EB_TIMER2_3_BASE 0x10012000 /* Timer 2 and 3 */ | ||
37 | #define REALVIEW_EB_GPIO0_BASE 0x10013000 /* GPIO port 0 */ | ||
38 | #define REALVIEW_EB_RTC_BASE 0x10017000 /* Real Time Clock */ | ||
39 | #define REALVIEW_EB_CLCD_BASE 0x10020000 /* CLCD */ | ||
40 | #define REALVIEW_EB_GIC_CPU_BASE 0x10040000 /* Generic interrupt controller CPU interface */ | ||
41 | #define REALVIEW_EB_GIC_DIST_BASE 0x10041000 /* Generic interrupt controller distributor */ | ||
42 | #define REALVIEW_EB_SMC_BASE 0x10080000 /* Static memory controller */ | ||
43 | |||
44 | #define REALVIEW_EB_FLASH_BASE 0x40000000 | ||
45 | #define REALVIEW_EB_FLASH_SIZE SZ_64M | ||
46 | #define REALVIEW_EB_ETH_BASE 0x4E000000 /* Ethernet */ | ||
47 | #define REALVIEW_EB_USB_BASE 0x4F000000 /* USB */ | ||
48 | |||
29 | #ifdef CONFIG_REALVIEW_EB_ARM11MP_REVB | 49 | #ifdef CONFIG_REALVIEW_EB_ARM11MP_REVB |
30 | #define REALVIEW_EB11MP_SCU_BASE 0x10100000 /* SCU registers */ | 50 | #define REALVIEW_EB11MP_SCU_BASE 0x10100000 /* SCU registers */ |
31 | #define REALVIEW_EB11MP_GIC_CPU_BASE 0x10100100 /* Generic interrupt controller CPU interface */ | 51 | #define REALVIEW_EB11MP_GIC_CPU_BASE 0x10100100 /* Generic interrupt controller CPU interface */ |
diff --git a/include/asm-arm/arch-realview/board-pb1176.h b/include/asm-arm/arch-realview/board-pb1176.h new file mode 100644 index 000000000000..48ce9c833705 --- /dev/null +++ b/include/asm-arm/arch-realview/board-pb1176.h | |||
@@ -0,0 +1,152 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-realview/board-pb1176.h | ||
3 | * | ||
4 | * Copyright (C) 2008 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 version 2 as | ||
8 | * 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., 51 Franklin Street, Fifth Floor, Boston, | ||
18 | * MA 02110-1301, USA. | ||
19 | */ | ||
20 | |||
21 | #ifndef __ASM_ARCH_BOARD_PB1176_H | ||
22 | #define __ASM_ARCH_BOARD_PB1176_H | ||
23 | |||
24 | #include <asm/arch/platform.h> | ||
25 | |||
26 | /* | ||
27 | * Peripheral addresses | ||
28 | */ | ||
29 | #define REALVIEW_PB1176_SCTL_BASE 0x10100000 /* System controller */ | ||
30 | #define REALVIEW_PB1176_SMC_BASE 0x10111000 /* SMC */ | ||
31 | #define REALVIEW_PB1176_DMC_BASE 0x10109000 /* DMC configuration */ | ||
32 | #define REALVIEW_PB1176_SDRAM67_BASE 0x70000000 /* SDRAM banks 6 and 7 */ | ||
33 | #define REALVIEW_PB1176_FLASH_BASE 0x30000000 | ||
34 | #define REALVIEW_PB1176_FLASH_SIZE SZ_64M | ||
35 | |||
36 | #define REALVIEW_PB1176_TIMER0_1_BASE 0x10104000 /* Timer 0 and 1 */ | ||
37 | #define REALVIEW_PB1176_TIMER2_3_BASE 0x10105000 /* Timer 2 and 3 */ | ||
38 | #define REALVIEW_PB1176_TIMER4_5_BASE 0x10106000 /* Timer 4 and 5 */ | ||
39 | #define REALVIEW_PB1176_WATCHDOG_BASE 0x10107000 /* watchdog interface */ | ||
40 | #define REALVIEW_PB1176_RTC_BASE 0x10108000 /* Real Time Clock */ | ||
41 | #define REALVIEW_PB1176_GPIO0_BASE 0x1010A000 /* GPIO port 0 */ | ||
42 | #define REALVIEW_PB1176_SSP_BASE 0x1010B000 /* Synchronous Serial Port */ | ||
43 | #define REALVIEW_PB1176_UART0_BASE 0x1010C000 /* UART 0 */ | ||
44 | #define REALVIEW_PB1176_UART1_BASE 0x1010D000 /* UART 1 */ | ||
45 | #define REALVIEW_PB1176_UART2_BASE 0x1010E000 /* UART 2 */ | ||
46 | #define REALVIEW_PB1176_UART3_BASE 0x1010F000 /* UART 3 */ | ||
47 | #define REALVIEW_PB1176_CLCD_BASE 0x10112000 /* CLCD */ | ||
48 | #define REALVIEW_PB1176_ETH_BASE 0x3A000000 /* Ethernet */ | ||
49 | #define REALVIEW_PB1176_USB_BASE 0x3B000000 /* USB */ | ||
50 | |||
51 | /* | ||
52 | * PCI regions | ||
53 | */ | ||
54 | #define REALVIEW_PB1176_PCI_BASE 0x60000000 /* PCI self config */ | ||
55 | #define REALVIEW_PB1176_PCI_CFG_BASE 0x61000000 /* PCI config */ | ||
56 | #define REALVIEW_PB1176_PCI_IO_BASE0 0x62000000 /* PCI IO region */ | ||
57 | #define REALVIEW_PB1176_PCI_MEM_BASE0 0x63000000 /* Memory region 1 */ | ||
58 | #define REALVIEW_PB1176_PCI_MEM_BASE1 0x64000000 /* Memory region 2 */ | ||
59 | #define REALVIEW_PB1176_PCI_MEM_BASE2 0x68000000 /* Memory region 3 */ | ||
60 | |||
61 | #define REALVIEW_PB1176_PCI_BASE_SIZE 0x01000000 /* 16MB */ | ||
62 | #define REALVIEW_PB1176_PCI_CFG_BASE_SIZE 0x01000000 /* 16MB */ | ||
63 | #define REALVIEW_PB1176_PCI_IO_BASE0_SIZE 0x01000000 /* 16MB */ | ||
64 | #define REALVIEW_PB1176_PCI_MEM_BASE0_SIZE 0x01000000 /* 16MB */ | ||
65 | #define REALVIEW_PB1176_PCI_MEM_BASE1_SIZE 0x04000000 /* 64MB */ | ||
66 | #define REALVIEW_PB1176_PCI_MEM_BASE2_SIZE 0x08000000 /* 128MB */ | ||
67 | |||
68 | #define REALVIEW_DC1176_GIC_CPU_BASE 0x10120000 /* GIC CPU interface, on devchip */ | ||
69 | #define REALVIEW_DC1176_GIC_DIST_BASE 0x10121000 /* GIC distributor, on devchip */ | ||
70 | #define REALVIEW_PB1176_GIC_CPU_BASE 0x10040000 /* GIC CPU interface, on FPGA */ | ||
71 | #define REALVIEW_PB1176_GIC_DIST_BASE 0x10041000 /* GIC distributor, on FPGA */ | ||
72 | #define REALVIEW_PB1176_L220_BASE 0x10110000 /* L220 registers */ | ||
73 | |||
74 | /* | ||
75 | * Irqs | ||
76 | */ | ||
77 | #define IRQ_DC1176_GIC_START 32 | ||
78 | #define IRQ_PB1176_GIC_START 64 | ||
79 | |||
80 | /* | ||
81 | * ARM1176 DevChip interrupt sources (primary GIC) | ||
82 | */ | ||
83 | #define IRQ_DC1176_WATCHDOG (IRQ_DC1176_GIC_START + 0) /* Watchdog timer */ | ||
84 | #define IRQ_DC1176_SOFTINT (IRQ_DC1176_GIC_START + 1) /* Software interrupt */ | ||
85 | #define IRQ_DC1176_COMMRx (IRQ_DC1176_GIC_START + 2) /* Debug Comm Rx interrupt */ | ||
86 | #define IRQ_DC1176_COMMTx (IRQ_DC1176_GIC_START + 3) /* Debug Comm Tx interrupt */ | ||
87 | #define IRQ_DC1176_TIMER0 (IRQ_DC1176_GIC_START + 8) /* Timer 0 */ | ||
88 | #define IRQ_DC1176_TIMER1 (IRQ_DC1176_GIC_START + 9) /* Timer 1 */ | ||
89 | #define IRQ_DC1176_TIMER2 (IRQ_DC1176_GIC_START + 10) /* Timer 2 */ | ||
90 | #define IRQ_DC1176_APC (IRQ_DC1176_GIC_START + 11) | ||
91 | #define IRQ_DC1176_IEC (IRQ_DC1176_GIC_START + 12) | ||
92 | #define IRQ_DC1176_L2CC (IRQ_DC1176_GIC_START + 13) | ||
93 | #define IRQ_DC1176_RTC (IRQ_DC1176_GIC_START + 14) | ||
94 | #define IRQ_DC1176_CLCD (IRQ_DC1176_GIC_START + 15) /* CLCD controller */ | ||
95 | #define IRQ_DC1176_UART0 (IRQ_DC1176_GIC_START + 18) /* UART 0 on development chip */ | ||
96 | #define IRQ_DC1176_UART1 (IRQ_DC1176_GIC_START + 19) /* UART 1 on development chip */ | ||
97 | #define IRQ_DC1176_UART2 (IRQ_DC1176_GIC_START + 20) /* UART 2 on development chip */ | ||
98 | #define IRQ_DC1176_UART3 (IRQ_DC1176_GIC_START + 21) /* UART 3 on development chip */ | ||
99 | |||
100 | #define IRQ_DC1176_PB_IRQ2 (IRQ_DC1176_GIC_START + 30) /* tile GIC */ | ||
101 | #define IRQ_DC1176_PB_IRQ1 (IRQ_DC1176_GIC_START + 31) /* main GIC */ | ||
102 | |||
103 | /* | ||
104 | * RealView PB1176 interrupt sources (secondary GIC) | ||
105 | */ | ||
106 | #define IRQ_PB1176_MMCI0A (IRQ_PB1176_GIC_START + 1) /* Multimedia Card 0A */ | ||
107 | #define IRQ_PB1176_MMCI0B (IRQ_PB1176_GIC_START + 2) /* Multimedia Card 0A */ | ||
108 | #define IRQ_PB1176_KMI0 (IRQ_PB1176_GIC_START + 3) /* Keyboard/Mouse port 0 */ | ||
109 | #define IRQ_PB1176_KMI1 (IRQ_PB1176_GIC_START + 4) /* Keyboard/Mouse port 1 */ | ||
110 | #define IRQ_PB1176_SCI (IRQ_PB1176_GIC_START + 5) | ||
111 | #define IRQ_PB1176_UART4 (IRQ_PB1176_GIC_START + 6) /* UART 4 on baseboard */ | ||
112 | #define IRQ_PB1176_CHARLCD (IRQ_PB1176_GIC_START + 7) /* Character LCD */ | ||
113 | #define IRQ_PB1176_GPIO1 (IRQ_PB1176_GIC_START + 8) | ||
114 | #define IRQ_PB1176_GPIO2 (IRQ_PB1176_GIC_START + 9) | ||
115 | #define IRQ_PB1176_ETH (IRQ_PB1176_GIC_START + 10) /* Ethernet controller */ | ||
116 | #define IRQ_PB1176_USB (IRQ_PB1176_GIC_START + 11) /* USB controller */ | ||
117 | |||
118 | #define IRQ_PB1176_PISMO (IRQ_PB1176_GIC_START + 16) | ||
119 | |||
120 | #define IRQ_PB1176_AACI (IRQ_PB1176_GIC_START + 19) /* Audio Codec */ | ||
121 | |||
122 | #define IRQ_PB1176_TIMER0_1 (IRQ_PB1176_GIC_START + 22) | ||
123 | #define IRQ_PB1176_TIMER2_3 (IRQ_PB1176_GIC_START + 23) | ||
124 | #define IRQ_PB1176_DMAC (IRQ_PB1176_GIC_START + 24) /* DMA controller */ | ||
125 | #define IRQ_PB1176_RTC (IRQ_PB1176_GIC_START + 25) /* Real Time Clock */ | ||
126 | |||
127 | #define IRQ_PB1176_GPIO0 -1 | ||
128 | #define IRQ_PB1176_SSP -1 | ||
129 | #define IRQ_PB1176_SCTL -1 | ||
130 | |||
131 | #define NR_GIC_PB1176 2 | ||
132 | |||
133 | /* | ||
134 | * Only define NR_IRQS if less than NR_IRQS_PB1176 | ||
135 | */ | ||
136 | #define NR_IRQS_PB1176 (IRQ_DC1176_GIC_START + 96) | ||
137 | |||
138 | #if defined(CONFIG_MACH_REALVIEW_PB1176) | ||
139 | |||
140 | #if !defined(NR_IRQS) || (NR_IRQS < NR_IRQS_PB1176) | ||
141 | #undef NR_IRQS | ||
142 | #define NR_IRQS NR_IRQS_PB1176 | ||
143 | #endif | ||
144 | |||
145 | #if !defined(MAX_GIC_NR) || (MAX_GIC_NR < NR_GIC_PB1176) | ||
146 | #undef MAX_GIC_NR | ||
147 | #define MAX_GIC_NR NR_GIC_PB1176 | ||
148 | #endif | ||
149 | |||
150 | #endif /* CONFIG_MACH_REALVIEW_PB1176 */ | ||
151 | |||
152 | #endif /* __ASM_ARCH_BOARD_PB1176_H */ | ||
diff --git a/include/asm-arm/arch-realview/board-pb11mp.h b/include/asm-arm/arch-realview/board-pb11mp.h new file mode 100644 index 000000000000..a1294d915fa8 --- /dev/null +++ b/include/asm-arm/arch-realview/board-pb11mp.h | |||
@@ -0,0 +1,186 @@ | |||
1 | /* | ||
2 | * include/asm-arm/arch-realview/board-pb11mp.h | ||
3 | * | ||
4 | * Copyright (C) 2008 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 version 2 as | ||
8 | * 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., 51 Franklin Street, Fifth Floor, Boston, | ||
18 | * MA 02110-1301, USA. | ||
19 | */ | ||
20 | |||
21 | #ifndef __ASM_ARCH_BOARD_PB11MP_H | ||
22 | #define __ASM_ARCH_BOARD_PB11MP_H | ||
23 | |||
24 | #include <asm/arch/platform.h> | ||
25 | |||
26 | /* | ||
27 | * Peripheral addresses | ||
28 | */ | ||
29 | #define REALVIEW_PB11MP_UART0_BASE 0x10009000 /* UART 0 */ | ||
30 | #define REALVIEW_PB11MP_UART1_BASE 0x1000A000 /* UART 1 */ | ||
31 | #define REALVIEW_PB11MP_UART2_BASE 0x1000B000 /* UART 2 */ | ||
32 | #define REALVIEW_PB11MP_UART3_BASE 0x1000C000 /* UART 3 */ | ||
33 | #define REALVIEW_PB11MP_SSP_BASE 0x1000D000 /* Synchronous Serial Port */ | ||
34 | #define REALVIEW_PB11MP_WATCHDOG0_BASE 0x1000F000 /* Watchdog 0 */ | ||
35 | #define REALVIEW_PB11MP_WATCHDOG_BASE 0x10010000 /* watchdog interface */ | ||
36 | #define REALVIEW_PB11MP_TIMER0_1_BASE 0x10011000 /* Timer 0 and 1 */ | ||
37 | #define REALVIEW_PB11MP_TIMER2_3_BASE 0x10012000 /* Timer 2 and 3 */ | ||
38 | #define REALVIEW_PB11MP_GPIO0_BASE 0x10013000 /* GPIO port 0 */ | ||
39 | #define REALVIEW_PB11MP_RTC_BASE 0x10017000 /* Real Time Clock */ | ||
40 | #define REALVIEW_PB11MP_TIMER4_5_BASE 0x10018000 /* Timer 4/5 */ | ||
41 | #define REALVIEW_PB11MP_TIMER6_7_BASE 0x10019000 /* Timer 6/7 */ | ||
42 | #define REALVIEW_PB11MP_SCTL_BASE 0x1001A000 /* System Controller */ | ||
43 | #define REALVIEW_PB11MP_CLCD_BASE 0x10020000 /* CLCD */ | ||
44 | #define REALVIEW_PB11MP_ONB_SRAM_BASE 0x10060000 /* On-board SRAM */ | ||
45 | #define REALVIEW_PB11MP_DMC_BASE 0x100E0000 /* DMC configuration */ | ||
46 | #define REALVIEW_PB11MP_SMC_BASE 0x100E1000 /* SMC configuration */ | ||
47 | #define REALVIEW_PB11MP_CAN_BASE 0x100E2000 /* CAN bus */ | ||
48 | #define REALVIEW_PB11MP_CF_BASE 0x18000000 /* Compact flash */ | ||
49 | #define REALVIEW_PB11MP_CF_MEM_BASE 0x18003000 /* SMC for Compact flash */ | ||
50 | #define REALVIEW_PB11MP_GIC_CPU_BASE 0x1E000000 /* Generic interrupt controller CPU interface */ | ||
51 | #define REALVIEW_PB11MP_FLASH0_BASE 0x40000000 | ||
52 | #define REALVIEW_PB11MP_FLASH0_SIZE SZ_64M | ||
53 | #define REALVIEW_PB11MP_FLASH1_BASE 0x44000000 | ||
54 | #define REALVIEW_PB11MP_FLASH1_SIZE SZ_64M | ||
55 | #define REALVIEW_PB11MP_ETH_BASE 0x4E000000 /* Ethernet */ | ||
56 | #define REALVIEW_PB11MP_USB_BASE 0x4F000000 /* USB */ | ||
57 | #define REALVIEW_PB11MP_GIC_DIST_BASE 0x1E001000 /* Generic interrupt controller distributor */ | ||
58 | #define REALVIEW_PB11MP_LT_BASE 0xC0000000 /* Logic Tile expansion */ | ||
59 | #define REALVIEW_PB11MP_SDRAM6_BASE 0x70000000 /* SDRAM bank 6 256MB */ | ||
60 | #define REALVIEW_PB11MP_SDRAM7_BASE 0x80000000 /* SDRAM bank 7 256MB */ | ||
61 | |||
62 | #define REALVIEW_PB11MP_SYS_PLD_CTRL1 0x74 | ||
63 | |||
64 | /* | ||
65 | * PB11MPCore PCI regions | ||
66 | */ | ||
67 | #define REALVIEW_PB11MP_PCI_BASE 0x90040000 /* PCI-X Unit base */ | ||
68 | #define REALVIEW_PB11MP_PCI_IO_BASE 0x90050000 /* IO Region on AHB */ | ||
69 | #define REALVIEW_PB11MP_PCI_MEM_BASE 0xA0000000 /* MEM Region on AHB */ | ||
70 | |||
71 | #define REALVIEW_PB11MP_PCI_BASE_SIZE 0x10000 /* 16 Kb */ | ||
72 | #define REALVIEW_PB11MP_PCI_IO_SIZE 0x1000 /* 4 Kb */ | ||
73 | #define REALVIEW_PB11MP_PCI_MEM_SIZE 0x20000000 /* 512 MB */ | ||
74 | |||
75 | /* | ||
76 | * Testchip peripheral and fpga gic regions | ||
77 | */ | ||
78 | #define REALVIEW_TC11MP_SCU_BASE 0x1F000000 /* IRQ, Test chip */ | ||
79 | #define REALVIEW_TC11MP_GIC_CPU_BASE 0x1F000100 /* Test chip interrupt controller CPU interface */ | ||
80 | #define REALVIEW_TC11MP_TWD_BASE 0x1F000700 | ||
81 | #define REALVIEW_TC11MP_TWD_SIZE 0x00000100 | ||
82 | #define REALVIEW_TC11MP_GIC_DIST_BASE 0x1F001000 /* Test chip interrupt controller distributor */ | ||
83 | #define REALVIEW_TC11MP_L220_BASE 0x1F002000 /* L220 registers */ | ||
84 | |||
85 | /* | ||
86 | * Irqs | ||
87 | */ | ||
88 | #define IRQ_TC11MP_GIC_START 32 | ||
89 | #define IRQ_PB11MP_GIC_START 64 | ||
90 | |||
91 | /* | ||
92 | * ARM11MPCore test chip interrupt sources (primary GIC on the test chip) | ||
93 | */ | ||
94 | #define IRQ_TC11MP_AACI (IRQ_TC11MP_GIC_START + 0) | ||
95 | #define IRQ_TC11MP_TIMER0_1 (IRQ_TC11MP_GIC_START + 1) | ||
96 | #define IRQ_TC11MP_TIMER2_3 (IRQ_TC11MP_GIC_START + 2) | ||
97 | #define IRQ_TC11MP_USB (IRQ_TC11MP_GIC_START + 3) | ||
98 | #define IRQ_TC11MP_UART0 (IRQ_TC11MP_GIC_START + 4) | ||
99 | #define IRQ_TC11MP_UART1 (IRQ_TC11MP_GIC_START + 5) | ||
100 | #define IRQ_TC11MP_RTC (IRQ_TC11MP_GIC_START + 6) | ||
101 | #define IRQ_TC11MP_KMI0 (IRQ_TC11MP_GIC_START + 7) | ||
102 | #define IRQ_TC11MP_KMI1 (IRQ_TC11MP_GIC_START + 8) | ||
103 | #define IRQ_TC11MP_ETH (IRQ_TC11MP_GIC_START + 9) | ||
104 | #define IRQ_TC11MP_PB_IRQ1 (IRQ_TC11MP_GIC_START + 10) /* main GIC */ | ||
105 | #define IRQ_TC11MP_PB_IRQ2 (IRQ_TC11MP_GIC_START + 11) /* tile GIC */ | ||
106 | #define IRQ_TC11MP_PB_FIQ1 (IRQ_TC11MP_GIC_START + 12) /* main GIC */ | ||
107 | #define IRQ_TC11MP_PB_FIQ2 (IRQ_TC11MP_GIC_START + 13) /* tile GIC */ | ||
108 | #define IRQ_TC11MP_MMCI0A (IRQ_TC11MP_GIC_START + 14) | ||
109 | #define IRQ_TC11MP_MMCI0B (IRQ_TC11MP_GIC_START + 15) | ||
110 | |||
111 | #define IRQ_TC11MP_PMU_CPU0 (IRQ_TC11MP_GIC_START + 17) | ||
112 | #define IRQ_TC11MP_PMU_CPU1 (IRQ_TC11MP_GIC_START + 18) | ||
113 | #define IRQ_TC11MP_PMU_CPU2 (IRQ_TC11MP_GIC_START + 19) | ||
114 | #define IRQ_TC11MP_PMU_CPU3 (IRQ_TC11MP_GIC_START + 20) | ||
115 | #define IRQ_TC11MP_PMU_SCU0 (IRQ_TC11MP_GIC_START + 21) | ||
116 | #define IRQ_TC11MP_PMU_SCU1 (IRQ_TC11MP_GIC_START + 22) | ||
117 | #define IRQ_TC11MP_PMU_SCU2 (IRQ_TC11MP_GIC_START + 23) | ||
118 | #define IRQ_TC11MP_PMU_SCU3 (IRQ_TC11MP_GIC_START + 24) | ||
119 | #define IRQ_TC11MP_PMU_SCU4 (IRQ_TC11MP_GIC_START + 25) | ||
120 | #define IRQ_TC11MP_PMU_SCU5 (IRQ_TC11MP_GIC_START + 26) | ||
121 | #define IRQ_TC11MP_PMU_SCU6 (IRQ_TC11MP_GIC_START + 27) | ||
122 | #define IRQ_TC11MP_PMU_SCU7 (IRQ_TC11MP_GIC_START + 28) | ||
123 | |||
124 | #define IRQ_TC11MP_L220_EVENT (IRQ_TC11MP_GIC_START + 29) | ||
125 | #define IRQ_TC11MP_L220_SLAVE (IRQ_TC11MP_GIC_START + 30) | ||
126 | #define IRQ_TC11MP_L220_DECODE (IRQ_TC11MP_GIC_START + 31) | ||
127 | |||
128 | /* | ||
129 | * RealView PB11MPCore GIC interrupt sources (secondary GIC on the board) | ||
130 | */ | ||
131 | #define IRQ_PB11MP_WATCHDOG (IRQ_PB11MP_GIC_START + 0) /* Watchdog timer */ | ||
132 | #define IRQ_PB11MP_SOFT (IRQ_PB11MP_GIC_START + 1) /* Software interrupt */ | ||
133 | #define IRQ_PB11MP_COMMRx (IRQ_PB11MP_GIC_START + 2) /* Debug Comm Rx interrupt */ | ||
134 | #define IRQ_PB11MP_COMMTx (IRQ_PB11MP_GIC_START + 3) /* Debug Comm Tx interrupt */ | ||
135 | #define IRQ_PB11MP_GPIO0 (IRQ_PB11MP_GIC_START + 6) /* GPIO 0 */ | ||
136 | #define IRQ_PB11MP_GPIO1 (IRQ_PB11MP_GIC_START + 7) /* GPIO 1 */ | ||
137 | #define IRQ_PB11MP_GPIO2 (IRQ_PB11MP_GIC_START + 8) /* GPIO 2 */ | ||
138 | /* 9 reserved */ | ||
139 | #define IRQ_PB11MP_RTC_GIC1 (IRQ_PB11MP_GIC_START + 10) /* Real Time Clock */ | ||
140 | #define IRQ_PB11MP_SSP (IRQ_PB11MP_GIC_START + 11) /* Synchronous Serial Port */ | ||
141 | #define IRQ_PB11MP_UART0_GIC1 (IRQ_PB11MP_GIC_START + 12) /* UART 0 on development chip */ | ||
142 | #define IRQ_PB11MP_UART1_GIC1 (IRQ_PB11MP_GIC_START + 13) /* UART 1 on development chip */ | ||
143 | #define IRQ_PB11MP_UART2 (IRQ_PB11MP_GIC_START + 14) /* UART 2 on development chip */ | ||
144 | #define IRQ_PB11MP_UART3 (IRQ_PB11MP_GIC_START + 15) /* UART 3 on development chip */ | ||
145 | #define IRQ_PB11MP_SCI (IRQ_PB11MP_GIC_START + 16) /* Smart Card Interface */ | ||
146 | #define IRQ_PB11MP_MMCI0A_GIC1 (IRQ_PB11MP_GIC_START + 17) /* Multimedia Card 0A */ | ||
147 | #define IRQ_PB11MP_MMCI0B_GIC1 (IRQ_PB11MP_GIC_START + 18) /* Multimedia Card 0B */ | ||
148 | #define IRQ_PB11MP_AACI_GIC1 (IRQ_PB11MP_GIC_START + 19) /* Audio Codec */ | ||
149 | #define IRQ_PB11MP_KMI0_GIC1 (IRQ_PB11MP_GIC_START + 20) /* Keyboard/Mouse port 0 */ | ||
150 | #define IRQ_PB11MP_KMI1_GIC1 (IRQ_PB11MP_GIC_START + 21) /* Keyboard/Mouse port 1 */ | ||
151 | #define IRQ_PB11MP_CHARLCD (IRQ_PB11MP_GIC_START + 22) /* Character LCD */ | ||
152 | #define IRQ_PB11MP_CLCD (IRQ_PB11MP_GIC_START + 23) /* CLCD controller */ | ||
153 | #define IRQ_PB11MP_DMAC (IRQ_PB11MP_GIC_START + 24) /* DMA controller */ | ||
154 | #define IRQ_PB11MP_PWRFAIL (IRQ_PB11MP_GIC_START + 25) /* Power failure */ | ||
155 | #define IRQ_PB11MP_PISMO (IRQ_PB11MP_GIC_START + 26) /* PISMO interface */ | ||
156 | #define IRQ_PB11MP_DoC (IRQ_PB11MP_GIC_START + 27) /* Disk on Chip memory controller */ | ||
157 | #define IRQ_PB11MP_ETH_GIC1 (IRQ_PB11MP_GIC_START + 28) /* Ethernet controller */ | ||
158 | #define IRQ_PB11MP_USB_GIC1 (IRQ_PB11MP_GIC_START + 29) /* USB controller */ | ||
159 | #define IRQ_PB11MP_TSPEN (IRQ_PB11MP_GIC_START + 30) /* Touchscreen pen */ | ||
160 | #define IRQ_PB11MP_TSKPAD (IRQ_PB11MP_GIC_START + 31) /* Touchscreen keypad */ | ||
161 | |||
162 | #define IRQ_PB11MP_SMC -1 | ||
163 | #define IRQ_PB11MP_SCTL -1 | ||
164 | |||
165 | #define NR_GIC_PB11MP 2 | ||
166 | |||
167 | /* | ||
168 | * Only define NR_IRQS if less than NR_IRQS_PB11MP | ||
169 | */ | ||
170 | #define NR_IRQS_PB11MP (IRQ_TC11MP_GIC_START + 96) | ||
171 | |||
172 | #if defined(CONFIG_MACH_REALVIEW_PB11MP) | ||
173 | |||
174 | #if !defined(NR_IRQS) || (NR_IRQS < NR_IRQS_PB11MP) | ||
175 | #undef NR_IRQS | ||
176 | #define NR_IRQS NR_IRQS_PB11MP | ||
177 | #endif | ||
178 | |||
179 | #if !defined(MAX_GIC_NR) || (MAX_GIC_NR < NR_GIC_PB11MP) | ||
180 | #undef MAX_GIC_NR | ||
181 | #define MAX_GIC_NR NR_GIC_PB11MP | ||
182 | #endif | ||
183 | |||
184 | #endif /* CONFIG_MACH_REALVIEW_PB11MP */ | ||
185 | |||
186 | #endif /* __ASM_ARCH_BOARD_PB11MP_H */ | ||
diff --git a/include/asm-arm/arch-realview/debug-macro.S b/include/asm-arm/arch-realview/debug-macro.S index f17efc65518a..c8c860c3c26e 100644 --- a/include/asm-arm/arch-realview/debug-macro.S +++ b/include/asm-arm/arch-realview/debug-macro.S | |||
@@ -15,7 +15,7 @@ | |||
15 | mrc p15, 0, \rx, c1, c0 | 15 | mrc p15, 0, \rx, c1, c0 |
16 | tst \rx, #1 @ MMU enabled? | 16 | tst \rx, #1 @ MMU enabled? |
17 | moveq \rx, #0x10000000 | 17 | moveq \rx, #0x10000000 |
18 | movne \rx, #0xf1000000 @ virtual base | 18 | movne \rx, #0xf0000000 @ virtual base |
19 | orr \rx, \rx, #0x00009000 | 19 | orr \rx, \rx, #0x00009000 |
20 | .endm | 20 | .endm |
21 | 21 | ||
diff --git a/include/asm-arm/arch-realview/hardware.h b/include/asm-arm/arch-realview/hardware.h index bad8d7ce9bfe..1ee8313ceb6a 100644 --- a/include/asm-arm/arch-realview/hardware.h +++ b/include/asm-arm/arch-realview/hardware.h | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <asm/sizes.h> | 25 | #include <asm/sizes.h> |
26 | 26 | ||
27 | /* macro to get at IO space when running virtually */ | 27 | /* macro to get at IO space when running virtually */ |
28 | #define IO_ADDRESS(x) ((((x) & 0x0effffff) | (((x) >> 4) & 0x0f000000)) + 0xf0000000) | 28 | #define IO_ADDRESS(x) (((x) & 0x0fffffff) + 0xf0000000) |
29 | #define __io_address(n) __io(IO_ADDRESS(n)) | 29 | #define __io_address(n) __io(IO_ADDRESS(n)) |
30 | 30 | ||
31 | #endif | 31 | #endif |
diff --git a/include/asm-arm/arch-realview/irqs.h b/include/asm-arm/arch-realview/irqs.h index ad0c911002fc..ccbac59235c6 100644 --- a/include/asm-arm/arch-realview/irqs.h +++ b/include/asm-arm/arch-realview/irqs.h | |||
@@ -23,6 +23,8 @@ | |||
23 | #define __ASM_ARCH_IRQS_H | 23 | #define __ASM_ARCH_IRQS_H |
24 | 24 | ||
25 | #include <asm/arch/board-eb.h> | 25 | #include <asm/arch/board-eb.h> |
26 | #include <asm/arch/board-pb11mp.h> | ||
27 | #include <asm/arch/board-pb1176.h> | ||
26 | 28 | ||
27 | #define IRQ_LOCALTIMER 29 | 29 | #define IRQ_LOCALTIMER 29 |
28 | #define IRQ_LOCALWDOG 30 | 30 | #define IRQ_LOCALWDOG 30 |
diff --git a/include/asm-arm/arch-realview/platform.h b/include/asm-arm/arch-realview/platform.h index 4fd351b5e4a2..424c0aaf46a0 100644 --- a/include/asm-arm/arch-realview/platform.h +++ b/include/asm-arm/arch-realview/platform.h | |||
@@ -32,9 +32,6 @@ | |||
32 | #define REALVIEW_SSRAM_BASE /* REALVIEW_SSMC_BASE ? */ | 32 | #define REALVIEW_SSRAM_BASE /* REALVIEW_SSMC_BASE ? */ |
33 | #define REALVIEW_SSRAM_SIZE SZ_2M | 33 | #define REALVIEW_SSRAM_SIZE SZ_2M |
34 | 34 | ||
35 | #define REALVIEW_FLASH_BASE 0x40000000 | ||
36 | #define REALVIEW_FLASH_SIZE SZ_64M | ||
37 | |||
38 | /* | 35 | /* |
39 | * SDRAM | 36 | * SDRAM |
40 | */ | 37 | */ |
@@ -175,42 +172,20 @@ | |||
175 | #define REALVIEW_INTREG_CARDINSERT 0x03 /* Signal insertion of MMC card */ | 172 | #define REALVIEW_INTREG_CARDINSERT 0x03 /* Signal insertion of MMC card */ |
176 | 173 | ||
177 | /* | 174 | /* |
178 | * REALVIEW peripheral addresses | 175 | * RealView common peripheral addresses |
179 | */ | 176 | */ |
180 | #define REALVIEW_SCTL_BASE 0x10001000 /* System controller */ | 177 | #define REALVIEW_SCTL_BASE 0x10001000 /* System controller */ |
181 | #define REALVIEW_I2C_BASE 0x10002000 /* I2C control */ | 178 | #define REALVIEW_I2C_BASE 0x10002000 /* I2C control */ |
182 | /* Reserved 0x10003000 */ | ||
183 | #define REALVIEW_AACI_BASE 0x10004000 /* Audio */ | 179 | #define REALVIEW_AACI_BASE 0x10004000 /* Audio */ |
184 | #define REALVIEW_MMCI0_BASE 0x10005000 /* MMC interface */ | 180 | #define REALVIEW_MMCI0_BASE 0x10005000 /* MMC interface */ |
185 | #define REALVIEW_KMI0_BASE 0x10006000 /* KMI interface */ | 181 | #define REALVIEW_KMI0_BASE 0x10006000 /* KMI interface */ |
186 | #define REALVIEW_KMI1_BASE 0x10007000 /* KMI 2nd interface */ | 182 | #define REALVIEW_KMI1_BASE 0x10007000 /* KMI 2nd interface */ |
187 | #define REALVIEW_CHAR_LCD_BASE 0x10008000 /* Character LCD */ | 183 | #define REALVIEW_CHAR_LCD_BASE 0x10008000 /* Character LCD */ |
188 | #define REALVIEW_UART0_BASE 0x10009000 /* UART 0 */ | ||
189 | #define REALVIEW_UART1_BASE 0x1000A000 /* UART 1 */ | ||
190 | #define REALVIEW_UART2_BASE 0x1000B000 /* UART 2 */ | ||
191 | #define REALVIEW_UART3_BASE 0x1000C000 /* UART 3 */ | ||
192 | #define REALVIEW_SSP_BASE 0x1000D000 /* Synchronous Serial Port */ | ||
193 | #define REALVIEW_SCI_BASE 0x1000E000 /* Smart card controller */ | 184 | #define REALVIEW_SCI_BASE 0x1000E000 /* Smart card controller */ |
194 | /* Reserved 0x1000F000 */ | ||
195 | #define REALVIEW_WATCHDOG_BASE 0x10010000 /* watchdog interface */ | ||
196 | #define REALVIEW_TIMER0_1_BASE 0x10011000 /* Timer 0 and 1 */ | ||
197 | #define REALVIEW_TIMER2_3_BASE 0x10012000 /* Timer 2 and 3 */ | ||
198 | #define REALVIEW_GPIO0_BASE 0x10013000 /* GPIO port 0 */ | ||
199 | #define REALVIEW_GPIO1_BASE 0x10014000 /* GPIO port 1 */ | 185 | #define REALVIEW_GPIO1_BASE 0x10014000 /* GPIO port 1 */ |
200 | #define REALVIEW_GPIO2_BASE 0x10015000 /* GPIO port 2 */ | 186 | #define REALVIEW_GPIO2_BASE 0x10015000 /* GPIO port 2 */ |
201 | /* Reserved 0x10016000 */ | ||
202 | #define REALVIEW_RTC_BASE 0x10017000 /* Real Time Clock */ | ||
203 | #define REALVIEW_DMC_BASE 0x10018000 /* DMC configuration */ | 187 | #define REALVIEW_DMC_BASE 0x10018000 /* DMC configuration */ |
204 | #define REALVIEW_PCI_CORE_BASE 0x10019000 /* PCI configuration */ | ||
205 | /* Reserved 0x1001A000 - 0x1001FFFF */ | ||
206 | #define REALVIEW_CLCD_BASE 0x10020000 /* CLCD */ | ||
207 | #define REALVIEW_DMAC_BASE 0x10030000 /* DMA controller */ | 188 | #define REALVIEW_DMAC_BASE 0x10030000 /* DMA controller */ |
208 | #define REALVIEW_GIC_CPU_BASE 0x10040000 /* Generic interrupt controller CPU interface */ | ||
209 | #define REALVIEW_GIC_DIST_BASE 0x10041000 /* Generic interrupt controller distributor */ | ||
210 | #define REALVIEW_SMC_BASE 0x10080000 /* SMC */ | ||
211 | /* Reserved 0x10090000 - 0x100EFFFF */ | ||
212 | |||
213 | #define REALVIEW_ETH_BASE 0x4E000000 /* Ethernet */ | ||
214 | 189 | ||
215 | /* PCI space */ | 190 | /* PCI space */ |
216 | #define REALVIEW_PCI_BASE 0x41000000 /* PCI Interface */ | 191 | #define REALVIEW_PCI_BASE 0x41000000 /* PCI Interface */ |
diff --git a/include/asm-arm/arch-realview/scu.h b/include/asm-arm/arch-realview/scu.h index 08b3db883c36..d55802d645af 100644 --- a/include/asm-arm/arch-realview/scu.h +++ b/include/asm-arm/arch-realview/scu.h | |||
@@ -1,8 +1,13 @@ | |||
1 | #ifndef __ASMARM_ARCH_SCU_H | 1 | #ifndef __ASMARM_ARCH_SCU_H |
2 | #define __ASMARM_ARCH_SCU_H | 2 | #define __ASMARM_ARCH_SCU_H |
3 | 3 | ||
4 | #include <asm/arch/board-eb.h> | 4 | /* |
5 | 5 | * SCU registers | |
6 | #define SCU_BASE REALVIEW_EB11MP_SCU_BASE | 6 | */ |
7 | #define SCU_CTRL 0x00 | ||
8 | #define SCU_CONFIG 0x04 | ||
9 | #define SCU_CPU_STATUS 0x08 | ||
10 | #define SCU_INVALIDATE 0x0c | ||
11 | #define SCU_FPGA_REVISION 0x10 | ||
7 | 12 | ||
8 | #endif | 13 | #endif |
diff --git a/include/asm-arm/arch-realview/uncompress.h b/include/asm-arm/arch-realview/uncompress.h index 3d5c2db07a26..4c905d7a13a1 100644 --- a/include/asm-arm/arch-realview/uncompress.h +++ b/include/asm-arm/arch-realview/uncompress.h | |||
@@ -18,28 +18,50 @@ | |||
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 <asm/hardware.h> | 20 | #include <asm/hardware.h> |
21 | #include <asm/mach-types.h> | ||
21 | 22 | ||
22 | #include <asm/arch/platform.h> | 23 | #include <asm/arch/board-eb.h> |
24 | #include <asm/arch/board-pb11mp.h> | ||
25 | #include <asm/arch/board-pb1176.h> | ||
23 | 26 | ||
24 | #define AMBA_UART_DR (*(volatile unsigned char *) (REALVIEW_UART0_BASE + 0x00)) | 27 | #define AMBA_UART_DR(base) (*(volatile unsigned char *)((base) + 0x00)) |
25 | #define AMBA_UART_LCRH (*(volatile unsigned char *) (REALVIEW_UART0_BASE + 0x2c)) | 28 | #define AMBA_UART_LCRH(base) (*(volatile unsigned char *)((base) + 0x2c)) |
26 | #define AMBA_UART_CR (*(volatile unsigned char *) (REALVIEW_UART0_BASE + 0x30)) | 29 | #define AMBA_UART_CR(base) (*(volatile unsigned char *)((base) + 0x30)) |
27 | #define AMBA_UART_FR (*(volatile unsigned char *) (REALVIEW_UART0_BASE + 0x18)) | 30 | #define AMBA_UART_FR(base) (*(volatile unsigned char *)((base) + 0x18)) |
31 | |||
32 | /* | ||
33 | * Return the UART base address | ||
34 | */ | ||
35 | static inline unsigned long get_uart_base(void) | ||
36 | { | ||
37 | if (machine_is_realview_eb()) | ||
38 | return REALVIEW_EB_UART0_BASE; | ||
39 | else if (machine_is_realview_pb11mp()) | ||
40 | return REALVIEW_PB11MP_UART0_BASE; | ||
41 | else if (machine_is_realview_pb1176()) | ||
42 | return REALVIEW_PB1176_UART0_BASE; | ||
43 | else | ||
44 | return 0; | ||
45 | } | ||
28 | 46 | ||
29 | /* | 47 | /* |
30 | * This does not append a newline | 48 | * This does not append a newline |
31 | */ | 49 | */ |
32 | static inline void putc(int c) | 50 | static inline void putc(int c) |
33 | { | 51 | { |
34 | while (AMBA_UART_FR & (1 << 5)) | 52 | unsigned long base = get_uart_base(); |
53 | |||
54 | while (AMBA_UART_FR(base) & (1 << 5)) | ||
35 | barrier(); | 55 | barrier(); |
36 | 56 | ||
37 | AMBA_UART_DR = c; | 57 | AMBA_UART_DR(base) = c; |
38 | } | 58 | } |
39 | 59 | ||
40 | static inline void flush(void) | 60 | static inline void flush(void) |
41 | { | 61 | { |
42 | while (AMBA_UART_FR & (1 << 3)) | 62 | unsigned long base = get_uart_base(); |
63 | |||
64 | while (AMBA_UART_FR(base) & (1 << 3)) | ||
43 | barrier(); | 65 | barrier(); |
44 | } | 66 | } |
45 | 67 | ||
diff --git a/include/asm-arm/arch-s3c2410/regs-clock.h b/include/asm-arm/arch-s3c2410/regs-clock.h index dba9df9d8713..ecae9e7f5e45 100644 --- a/include/asm-arm/arch-s3c2410/regs-clock.h +++ b/include/asm-arm/arch-s3c2410/regs-clock.h | |||
@@ -137,7 +137,7 @@ s3c2410_get_pll(unsigned int pllval, unsigned int baseclk) | |||
137 | 137 | ||
138 | #define S3C2412_CLKDIVN_PDIVN (1<<2) | 138 | #define S3C2412_CLKDIVN_PDIVN (1<<2) |
139 | #define S3C2412_CLKDIVN_HDIVN_MASK (3<<0) | 139 | #define S3C2412_CLKDIVN_HDIVN_MASK (3<<0) |
140 | #define S3C2421_CLKDIVN_ARMDIVN (1<<3) | 140 | #define S3C2412_CLKDIVN_ARMDIVN (1<<3) |
141 | #define S3C2412_CLKDIVN_DVSEN (1<<4) | 141 | #define S3C2412_CLKDIVN_DVSEN (1<<4) |
142 | #define S3C2412_CLKDIVN_HALFHCLK (1<<5) | 142 | #define S3C2412_CLKDIVN_HALFHCLK (1<<5) |
143 | #define S3C2412_CLKDIVN_USB48DIV (1<<6) | 143 | #define S3C2412_CLKDIVN_USB48DIV (1<<6) |
diff --git a/include/asm-arm/arch-s3c2410/regs-gpio.h b/include/asm-arm/arch-s3c2410/regs-gpio.h index 0ad75d716ded..497dd06e2c99 100644 --- a/include/asm-arm/arch-s3c2410/regs-gpio.h +++ b/include/asm-arm/arch-s3c2410/regs-gpio.h | |||
@@ -529,11 +529,13 @@ | |||
529 | #define S3C2410_GPD14_INP (0x00 << 28) | 529 | #define S3C2410_GPD14_INP (0x00 << 28) |
530 | #define S3C2410_GPD14_OUTP (0x01 << 28) | 530 | #define S3C2410_GPD14_OUTP (0x01 << 28) |
531 | #define S3C2410_GPD14_VD22 (0x02 << 28) | 531 | #define S3C2410_GPD14_VD22 (0x02 << 28) |
532 | #define S3C2410_GPD14_nSS1 (0x03 << 28) | ||
532 | 533 | ||
533 | #define S3C2410_GPD15 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 15) | 534 | #define S3C2410_GPD15 S3C2410_GPIONO(S3C2410_GPIO_BANKD, 15) |
534 | #define S3C2410_GPD15_INP (0x00 << 30) | 535 | #define S3C2410_GPD15_INP (0x00 << 30) |
535 | #define S3C2410_GPD15_OUTP (0x01 << 30) | 536 | #define S3C2410_GPD15_OUTP (0x01 << 30) |
536 | #define S3C2410_GPD15_VD23 (0x02 << 30) | 537 | #define S3C2410_GPD15_VD23 (0x02 << 30) |
538 | #define S3C2410_GPD15_nSS0 (0x03 << 30) | ||
537 | 539 | ||
538 | #define S3C2410_GPD_PUPDIS(x) (1<<(x)) | 540 | #define S3C2410_GPD_PUPDIS(x) (1<<(x)) |
539 | 541 | ||
@@ -801,12 +803,14 @@ | |||
801 | #define S3C2410_GPG2_INP (0x00 << 4) | 803 | #define S3C2410_GPG2_INP (0x00 << 4) |
802 | #define S3C2410_GPG2_OUTP (0x01 << 4) | 804 | #define S3C2410_GPG2_OUTP (0x01 << 4) |
803 | #define S3C2410_GPG2_EINT10 (0x02 << 4) | 805 | #define S3C2410_GPG2_EINT10 (0x02 << 4) |
806 | #define S3C2410_GPG2_nSS0 (0x03 << 4) | ||
804 | #define S3C2400_GPG2_CDCLK (0x02 << 4) | 807 | #define S3C2400_GPG2_CDCLK (0x02 << 4) |
805 | 808 | ||
806 | #define S3C2410_GPG3 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 3) | 809 | #define S3C2410_GPG3 S3C2410_GPIONO(S3C2410_GPIO_BANKG, 3) |
807 | #define S3C2410_GPG3_INP (0x00 << 6) | 810 | #define S3C2410_GPG3_INP (0x00 << 6) |
808 | #define S3C2410_GPG3_OUTP (0x01 << 6) | 811 | #define S3C2410_GPG3_OUTP (0x01 << 6) |
809 | #define S3C2410_GPG3_EINT11 (0x02 << 6) | 812 | #define S3C2410_GPG3_EINT11 (0x02 << 6) |
813 | #define S3C2410_GPG3_nSS1 (0x03 << 6) | ||
810 | #define S3C2400_GPG3_I2SSDO (0x02 << 6) | 814 | #define S3C2400_GPG3_I2SSDO (0x02 << 6) |
811 | #define S3C2400_GPG3_I2SSDI (0x03 << 6) | 815 | #define S3C2400_GPG3_I2SSDI (0x03 << 6) |
812 | 816 | ||
diff --git a/include/asm-arm/arch-s3c2410/regs-s3c2412-mem.h b/include/asm-arm/arch-s3c2410/regs-s3c2412-mem.h new file mode 100644 index 000000000000..c8c793e78936 --- /dev/null +++ b/include/asm-arm/arch-s3c2410/regs-s3c2412-mem.h | |||
@@ -0,0 +1,29 @@ | |||
1 | /* linux/include/asm-arm/arch-s3c2410/regs-s3c2412-mem.h | ||
2 | * | ||
3 | * Copyright (c) 2008 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * http://armlinux.simtec.co.uk/ | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | * | ||
11 | * S3C2412 memory register definitions | ||
12 | */ | ||
13 | |||
14 | #ifndef __ASM_ARM_REGS_S3C2412_MEM | ||
15 | #define __ASM_ARM_REGS_S3C2412_MEM | ||
16 | |||
17 | #ifndef S3C2412_MEMREG | ||
18 | #define S3C2412_MEMREG(x) (S3C24XX_VA_MEMCTRL + (x)) | ||
19 | #endif | ||
20 | |||
21 | #define S3C2412_BANKCFG S3C2412_MEMREG(0x00) | ||
22 | #define S3C2412_BANKCON1 S3C2412_MEMREG(0x04) | ||
23 | #define S3C2412_BANKCON2 S3C2412_MEMREG(0x08) | ||
24 | #define S3C2412_BANKCON3 S3C2412_MEMREG(0x0C) | ||
25 | |||
26 | #define S3C2412_REFRESH S3C2412_MEMREG(0x10) | ||
27 | #define S3C2412_TIMEOUT S3C2412_MEMREG(0x14) | ||
28 | |||
29 | #endif /* __ASM_ARM_REGS_S3C2412_MEM */ | ||
diff --git a/include/asm-arm/arch-s3c2410/system-reset.h b/include/asm-arm/arch-s3c2410/system-reset.h new file mode 100644 index 000000000000..1615bce0c026 --- /dev/null +++ b/include/asm-arm/arch-s3c2410/system-reset.h | |||
@@ -0,0 +1,64 @@ | |||
1 | /* linux/include/asm-arm/arch-s3c2410/system-reset.h | ||
2 | * | ||
3 | * Copyright (c) 2008 Simtec Electronics | ||
4 | * Ben Dooks <ben@simtec.co.uk> | ||
5 | * | ||
6 | * S3C2410 - System define for arch_reset() function | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include <asm/hardware.h> | ||
14 | #include <asm/io.h> | ||
15 | |||
16 | #include <asm/plat-s3c/regs-watchdog.h> | ||
17 | #include <asm/arch/regs-clock.h> | ||
18 | |||
19 | #include <linux/clk.h> | ||
20 | #include <linux/err.h> | ||
21 | |||
22 | extern void (*s3c24xx_reset_hook)(void); | ||
23 | |||
24 | static void | ||
25 | arch_reset(char mode) | ||
26 | { | ||
27 | struct clk *wdtclk; | ||
28 | |||
29 | if (mode == 's') { | ||
30 | cpu_reset(0); | ||
31 | } | ||
32 | |||
33 | if (s3c24xx_reset_hook) | ||
34 | s3c24xx_reset_hook(); | ||
35 | |||
36 | printk("arch_reset: attempting watchdog reset\n"); | ||
37 | |||
38 | __raw_writel(0, S3C2410_WTCON); /* disable watchdog, to be safe */ | ||
39 | |||
40 | wdtclk = clk_get(NULL, "watchdog"); | ||
41 | if (!IS_ERR(wdtclk)) { | ||
42 | clk_enable(wdtclk); | ||
43 | } else | ||
44 | printk(KERN_WARNING "%s: warning: cannot get watchdog clock\n", __func__); | ||
45 | |||
46 | /* put initial values into count and data */ | ||
47 | __raw_writel(0x80, S3C2410_WTCNT); | ||
48 | __raw_writel(0x80, S3C2410_WTDAT); | ||
49 | |||
50 | /* set the watchdog to go and reset... */ | ||
51 | __raw_writel(S3C2410_WTCON_ENABLE|S3C2410_WTCON_DIV16|S3C2410_WTCON_RSTEN | | ||
52 | S3C2410_WTCON_PRESCALE(0x20), S3C2410_WTCON); | ||
53 | |||
54 | /* wait for reset to assert... */ | ||
55 | mdelay(500); | ||
56 | |||
57 | printk(KERN_ERR "Watchdog reset failed to assert reset\n"); | ||
58 | |||
59 | /* delay to allow the serial port to show the message */ | ||
60 | mdelay(50); | ||
61 | |||
62 | /* we'll take a jump through zero as a poor second */ | ||
63 | cpu_reset(0); | ||
64 | } | ||
diff --git a/include/asm-arm/arch-s3c2410/system.h b/include/asm-arm/arch-s3c2410/system.h index 14de4e596f87..ad258085e53b 100644 --- a/include/asm-arm/arch-s3c2410/system.h +++ b/include/asm-arm/arch-s3c2410/system.h | |||
@@ -17,12 +17,8 @@ | |||
17 | #include <asm/arch/idle.h> | 17 | #include <asm/arch/idle.h> |
18 | #include <asm/arch/reset.h> | 18 | #include <asm/arch/reset.h> |
19 | 19 | ||
20 | #include <asm/plat-s3c/regs-watchdog.h> | ||
21 | #include <asm/arch/regs-clock.h> | 20 | #include <asm/arch/regs-clock.h> |
22 | 21 | ||
23 | #include <linux/clk.h> | ||
24 | #include <linux/err.h> | ||
25 | |||
26 | void (*s3c24xx_idle)(void); | 22 | void (*s3c24xx_idle)(void); |
27 | void (*s3c24xx_reset_hook)(void); | 23 | void (*s3c24xx_reset_hook)(void); |
28 | 24 | ||
@@ -59,44 +55,4 @@ static void arch_idle(void) | |||
59 | s3c24xx_default_idle(); | 55 | s3c24xx_default_idle(); |
60 | } | 56 | } |
61 | 57 | ||
62 | static void | 58 | #include <asm/arch/system-reset.h> |
63 | arch_reset(char mode) | ||
64 | { | ||
65 | struct clk *wdtclk; | ||
66 | |||
67 | if (mode == 's') { | ||
68 | cpu_reset(0); | ||
69 | } | ||
70 | |||
71 | if (s3c24xx_reset_hook) | ||
72 | s3c24xx_reset_hook(); | ||
73 | |||
74 | printk("arch_reset: attempting watchdog reset\n"); | ||
75 | |||
76 | __raw_writel(0, S3C2410_WTCON); /* disable watchdog, to be safe */ | ||
77 | |||
78 | wdtclk = clk_get(NULL, "watchdog"); | ||
79 | if (!IS_ERR(wdtclk)) { | ||
80 | clk_enable(wdtclk); | ||
81 | } else | ||
82 | printk(KERN_WARNING "%s: warning: cannot get watchdog clock\n", __func__); | ||
83 | |||
84 | /* put initial values into count and data */ | ||
85 | __raw_writel(0x80, S3C2410_WTCNT); | ||
86 | __raw_writel(0x80, S3C2410_WTDAT); | ||
87 | |||
88 | /* set the watchdog to go and reset... */ | ||
89 | __raw_writel(S3C2410_WTCON_ENABLE|S3C2410_WTCON_DIV16|S3C2410_WTCON_RSTEN | | ||
90 | S3C2410_WTCON_PRESCALE(0x20), S3C2410_WTCON); | ||
91 | |||
92 | /* wait for reset to assert... */ | ||
93 | mdelay(500); | ||
94 | |||
95 | printk(KERN_ERR "Watchdog reset failed to assert reset\n"); | ||
96 | |||
97 | /* delay to allow the serial port to show the message */ | ||
98 | mdelay(50); | ||
99 | |||
100 | /* we'll take a jump through zero as a poor second */ | ||
101 | cpu_reset(0); | ||
102 | } | ||
diff --git a/include/asm-arm/arch-sa1100/gpio.h b/include/asm-arm/arch-sa1100/gpio.h index e7a9d26e22a8..93d3395b102d 100644 --- a/include/asm-arm/arch-sa1100/gpio.h +++ b/include/asm-arm/arch-sa1100/gpio.h | |||
@@ -26,35 +26,28 @@ | |||
26 | 26 | ||
27 | #include <asm/hardware.h> | 27 | #include <asm/hardware.h> |
28 | #include <asm/irq.h> | 28 | #include <asm/irq.h> |
29 | 29 | #include <asm-generic/gpio.h> | |
30 | static inline int gpio_request(unsigned gpio, const char *label) | ||
31 | { | ||
32 | return 0; | ||
33 | } | ||
34 | |||
35 | static inline void gpio_free(unsigned gpio) | ||
36 | { | ||
37 | return; | ||
38 | } | ||
39 | |||
40 | extern int gpio_direction_input(unsigned gpio); | ||
41 | extern int gpio_direction_output(unsigned gpio, int value); | ||
42 | |||
43 | 30 | ||
44 | static inline int gpio_get_value(unsigned gpio) | 31 | static inline int gpio_get_value(unsigned gpio) |
45 | { | 32 | { |
46 | return GPLR & GPIO_GPIO(gpio); | 33 | if (__builtin_constant_p(gpio) && (gpio <= GPIO_MAX)) |
34 | return GPLR & GPIO_GPIO(gpio); | ||
35 | else | ||
36 | return __gpio_get_value(gpio); | ||
47 | } | 37 | } |
48 | 38 | ||
49 | static inline void gpio_set_value(unsigned gpio, int value) | 39 | static inline void gpio_set_value(unsigned gpio, int value) |
50 | { | 40 | { |
51 | if (value) | 41 | if (__builtin_constant_p(gpio) && (gpio <= GPIO_MAX)) |
52 | GPSR = GPIO_GPIO(gpio); | 42 | if (value) |
43 | GPSR = GPIO_GPIO(gpio); | ||
44 | else | ||
45 | GPCR = GPIO_GPIO(gpio); | ||
53 | else | 46 | else |
54 | GPCR = GPIO_GPIO(gpio); | 47 | __gpio_set_value(gpio, value); |
55 | } | 48 | } |
56 | 49 | ||
57 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | 50 | #define gpio_cansleep __gpio_cansleep |
58 | 51 | ||
59 | static inline unsigned gpio_to_irq(unsigned gpio) | 52 | static inline unsigned gpio_to_irq(unsigned gpio) |
60 | { | 53 | { |
diff --git a/include/asm-arm/cpu-multi32.h b/include/asm-arm/cpu-multi32.h index 715e18a4add1..3479de9266e5 100644 --- a/include/asm-arm/cpu-multi32.h +++ b/include/asm-arm/cpu-multi32.h | |||
@@ -21,6 +21,10 @@ extern struct processor { | |||
21 | */ | 21 | */ |
22 | void (*_data_abort)(unsigned long pc); | 22 | void (*_data_abort)(unsigned long pc); |
23 | /* | 23 | /* |
24 | * Retrieve prefetch fault address | ||
25 | */ | ||
26 | unsigned long (*_prefetch_abort)(unsigned long lr); | ||
27 | /* | ||
24 | * Set up any processor specifics | 28 | * Set up any processor specifics |
25 | */ | 29 | */ |
26 | void (*_proc_init)(void); | 30 | void (*_proc_init)(void); |
diff --git a/include/asm-arm/glue.h b/include/asm-arm/glue.h index 22274ce81375..a97a182ba287 100644 --- a/include/asm-arm/glue.h +++ b/include/asm-arm/glue.h | |||
@@ -40,83 +40,110 @@ | |||
40 | * v6_early - ARMv6 generic early abort handler | 40 | * v6_early - ARMv6 generic early abort handler |
41 | * v7_early - ARMv7 generic early abort handler | 41 | * v7_early - ARMv7 generic early abort handler |
42 | */ | 42 | */ |
43 | #undef CPU_ABORT_HANDLER | 43 | #undef CPU_DABORT_HANDLER |
44 | #undef MULTI_ABORT | 44 | #undef MULTI_DABORT |
45 | 45 | ||
46 | #if defined(CONFIG_CPU_ARM610) | 46 | #if defined(CONFIG_CPU_ARM610) |
47 | # ifdef CPU_ABORT_HANDLER | 47 | # ifdef CPU_DABORT_HANDLER |
48 | # define MULTI_ABORT 1 | 48 | # define MULTI_DABORT 1 |
49 | # else | 49 | # else |
50 | # define CPU_ABORT_HANDLER cpu_arm6_data_abort | 50 | # define CPU_DABORT_HANDLER cpu_arm6_data_abort |
51 | # endif | 51 | # endif |
52 | #endif | 52 | #endif |
53 | 53 | ||
54 | #if defined(CONFIG_CPU_ARM710) | 54 | #if defined(CONFIG_CPU_ARM710) |
55 | # ifdef CPU_ABORT_HANDLER | 55 | # ifdef CPU_DABORT_HANDLER |
56 | # define MULTI_ABORT 1 | 56 | # define MULTI_DABORT 1 |
57 | # else | 57 | # else |
58 | # define CPU_ABORT_HANDLER cpu_arm7_data_abort | 58 | # define CPU_DABORT_HANDLER cpu_arm7_data_abort |
59 | # endif | 59 | # endif |
60 | #endif | 60 | #endif |
61 | 61 | ||
62 | #ifdef CONFIG_CPU_ABRT_LV4T | 62 | #ifdef CONFIG_CPU_ABRT_LV4T |
63 | # ifdef CPU_ABORT_HANDLER | 63 | # ifdef CPU_DABORT_HANDLER |
64 | # define MULTI_ABORT 1 | 64 | # define MULTI_DABORT 1 |
65 | # else | 65 | # else |
66 | # define CPU_ABORT_HANDLER v4t_late_abort | 66 | # define CPU_DABORT_HANDLER v4t_late_abort |
67 | # endif | 67 | # endif |
68 | #endif | 68 | #endif |
69 | 69 | ||
70 | #ifdef CONFIG_CPU_ABRT_EV4 | 70 | #ifdef CONFIG_CPU_ABRT_EV4 |
71 | # ifdef CPU_ABORT_HANDLER | 71 | # ifdef CPU_DABORT_HANDLER |
72 | # define MULTI_ABORT 1 | 72 | # define MULTI_DABORT 1 |
73 | # else | 73 | # else |
74 | # define CPU_ABORT_HANDLER v4_early_abort | 74 | # define CPU_DABORT_HANDLER v4_early_abort |
75 | # endif | 75 | # endif |
76 | #endif | 76 | #endif |
77 | 77 | ||
78 | #ifdef CONFIG_CPU_ABRT_EV4T | 78 | #ifdef CONFIG_CPU_ABRT_EV4T |
79 | # ifdef CPU_ABORT_HANDLER | 79 | # ifdef CPU_DABORT_HANDLER |
80 | # define MULTI_ABORT 1 | 80 | # define MULTI_DABORT 1 |
81 | # else | 81 | # else |
82 | # define CPU_ABORT_HANDLER v4t_early_abort | 82 | # define CPU_DABORT_HANDLER v4t_early_abort |
83 | # endif | 83 | # endif |
84 | #endif | 84 | #endif |
85 | 85 | ||
86 | #ifdef CONFIG_CPU_ABRT_EV5TJ | 86 | #ifdef CONFIG_CPU_ABRT_EV5TJ |
87 | # ifdef CPU_ABORT_HANDLER | 87 | # ifdef CPU_DABORT_HANDLER |
88 | # define MULTI_ABORT 1 | 88 | # define MULTI_DABORT 1 |
89 | # else | 89 | # else |
90 | # define CPU_ABORT_HANDLER v5tj_early_abort | 90 | # define CPU_DABORT_HANDLER v5tj_early_abort |
91 | # endif | 91 | # endif |
92 | #endif | 92 | #endif |
93 | 93 | ||
94 | #ifdef CONFIG_CPU_ABRT_EV5T | 94 | #ifdef CONFIG_CPU_ABRT_EV5T |
95 | # ifdef CPU_ABORT_HANDLER | 95 | # ifdef CPU_DABORT_HANDLER |
96 | # define MULTI_ABORT 1 | 96 | # define MULTI_DABORT 1 |
97 | # else | 97 | # else |
98 | # define CPU_ABORT_HANDLER v5t_early_abort | 98 | # define CPU_DABORT_HANDLER v5t_early_abort |
99 | # endif | 99 | # endif |
100 | #endif | 100 | #endif |
101 | 101 | ||
102 | #ifdef CONFIG_CPU_ABRT_EV6 | 102 | #ifdef CONFIG_CPU_ABRT_EV6 |
103 | # ifdef CPU_ABORT_HANDLER | 103 | # ifdef CPU_DABORT_HANDLER |
104 | # define MULTI_ABORT 1 | 104 | # define MULTI_DABORT 1 |
105 | # else | 105 | # else |
106 | # define CPU_ABORT_HANDLER v6_early_abort | 106 | # define CPU_DABORT_HANDLER v6_early_abort |
107 | # endif | 107 | # endif |
108 | #endif | 108 | #endif |
109 | 109 | ||
110 | #ifdef CONFIG_CPU_ABRT_EV7 | 110 | #ifdef CONFIG_CPU_ABRT_EV7 |
111 | # ifdef CPU_ABORT_HANDLER | 111 | # ifdef CPU_DABORT_HANDLER |
112 | # define MULTI_ABORT 1 | 112 | # define MULTI_DABORT 1 |
113 | # else | 113 | # else |
114 | # define CPU_ABORT_HANDLER v7_early_abort | 114 | # define CPU_DABORT_HANDLER v7_early_abort |
115 | # endif | 115 | # endif |
116 | #endif | 116 | #endif |
117 | 117 | ||
118 | #ifndef CPU_ABORT_HANDLER | 118 | #ifndef CPU_DABORT_HANDLER |
119 | #error Unknown data abort handler type | 119 | #error Unknown data abort handler type |
120 | #endif | 120 | #endif |
121 | 121 | ||
122 | /* | ||
123 | * Prefetch abort handler. If the CPU has an IFAR use that, otherwise | ||
124 | * use the address of the aborted instruction | ||
125 | */ | ||
126 | #undef CPU_PABORT_HANDLER | ||
127 | #undef MULTI_PABORT | ||
128 | |||
129 | #ifdef CONFIG_CPU_PABRT_IFAR | ||
130 | # ifdef CPU_PABORT_HANDLER | ||
131 | # define MULTI_PABORT 1 | ||
132 | # else | ||
133 | # define CPU_PABORT_HANDLER(reg, insn) mrc p15, 0, reg, cr6, cr0, 2 | ||
134 | # endif | ||
135 | #endif | ||
136 | |||
137 | #ifdef CONFIG_CPU_PABRT_NOIFAR | ||
138 | # ifdef CPU_PABORT_HANDLER | ||
139 | # define MULTI_PABORT 1 | ||
140 | # else | ||
141 | # define CPU_PABORT_HANDLER(reg, insn) mov reg, insn | ||
142 | # endif | ||
143 | #endif | ||
144 | |||
145 | #ifndef CPU_PABORT_HANDLER | ||
146 | #error Unknown prefetch abort handler type | ||
147 | #endif | ||
148 | |||
122 | #endif | 149 | #endif |
diff --git a/include/asm-arm/hardware/arm_scu.h b/include/asm-arm/hardware/arm_scu.h deleted file mode 100644 index 7d28eb5a1758..000000000000 --- a/include/asm-arm/hardware/arm_scu.h +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | #ifndef ASMARM_HARDWARE_ARM_SCU_H | ||
2 | #define ASMARM_HARDWARE_ARM_SCU_H | ||
3 | |||
4 | #include <asm/arch/scu.h> | ||
5 | |||
6 | /* | ||
7 | * SCU registers | ||
8 | */ | ||
9 | #define SCU_CTRL 0x00 | ||
10 | #define SCU_CONFIG 0x04 | ||
11 | #define SCU_CPU_STATUS 0x08 | ||
12 | #define SCU_INVALIDATE 0x0c | ||
13 | #define SCU_FPGA_REVISION 0x10 | ||
14 | |||
15 | #endif | ||
diff --git a/include/asm-arm/hardware/iop3xx.h b/include/asm-arm/hardware/iop3xx.h index ede377ec9147..18f6937f5010 100644 --- a/include/asm-arm/hardware/iop3xx.h +++ b/include/asm-arm/hardware/iop3xx.h | |||
@@ -29,6 +29,7 @@ extern void gpio_line_config(int line, int direction); | |||
29 | extern int gpio_line_get(int line); | 29 | extern int gpio_line_get(int line); |
30 | extern void gpio_line_set(int line, int value); | 30 | extern void gpio_line_set(int line, int value); |
31 | extern int init_atu; | 31 | extern int init_atu; |
32 | extern int iop3xx_get_init_atu(void); | ||
32 | #endif | 33 | #endif |
33 | 34 | ||
34 | 35 | ||
@@ -112,14 +113,6 @@ extern int init_atu; | |||
112 | #define IOP3XX_INIT_ATU_DISABLE -1 | 113 | #define IOP3XX_INIT_ATU_DISABLE -1 |
113 | #define IOP3XX_INIT_ATU_ENABLE 1 | 114 | #define IOP3XX_INIT_ATU_ENABLE 1 |
114 | 115 | ||
115 | #ifdef CONFIG_IOP3XX_ATU | ||
116 | #define iop3xx_get_init_atu(x) (init_atu == IOP3XX_INIT_ATU_DEFAULT ?\ | ||
117 | IOP3XX_INIT_ATU_ENABLE : init_atu) | ||
118 | #else | ||
119 | #define iop3xx_get_init_atu(x) (init_atu == IOP3XX_INIT_ATU_DEFAULT ?\ | ||
120 | IOP3XX_INIT_ATU_DISABLE : init_atu) | ||
121 | #endif | ||
122 | |||
123 | /* Messaging Unit */ | 116 | /* Messaging Unit */ |
124 | #define IOP3XX_IMR0 (volatile u32 *)IOP3XX_REG_ADDR(0x0310) | 117 | #define IOP3XX_IMR0 (volatile u32 *)IOP3XX_REG_ADDR(0x0310) |
125 | #define IOP3XX_IMR1 (volatile u32 *)IOP3XX_REG_ADDR(0x0314) | 118 | #define IOP3XX_IMR1 (volatile u32 *)IOP3XX_REG_ADDR(0x0314) |
diff --git a/include/asm-arm/hardware/scoop.h b/include/asm-arm/hardware/scoop.h index d37bf7443264..dfb8330599f9 100644 --- a/include/asm-arm/hardware/scoop.h +++ b/include/asm-arm/hardware/scoop.h | |||
@@ -40,6 +40,7 @@ struct scoop_config { | |||
40 | unsigned short io_dir; | 40 | unsigned short io_dir; |
41 | unsigned short suspend_clr; | 41 | unsigned short suspend_clr; |
42 | unsigned short suspend_set; | 42 | unsigned short suspend_set; |
43 | int gpio_base; | ||
43 | }; | 44 | }; |
44 | 45 | ||
45 | /* Structure for linking scoop devices to PCMCIA sockets */ | 46 | /* Structure for linking scoop devices to PCMCIA sockets */ |
@@ -62,7 +63,7 @@ struct scoop_pcmcia_config { | |||
62 | extern struct scoop_pcmcia_config *platform_scoop_config; | 63 | extern struct scoop_pcmcia_config *platform_scoop_config; |
63 | 64 | ||
64 | void reset_scoop(struct device *dev); | 65 | void reset_scoop(struct device *dev); |
65 | unsigned short set_scoop_gpio(struct device *dev, unsigned short bit); | 66 | unsigned short __deprecated set_scoop_gpio(struct device *dev, unsigned short bit); |
66 | unsigned short reset_scoop_gpio(struct device *dev, unsigned short bit); | 67 | unsigned short __deprecated reset_scoop_gpio(struct device *dev, unsigned short bit); |
67 | unsigned short read_scoop_reg(struct device *dev, unsigned short reg); | 68 | unsigned short read_scoop_reg(struct device *dev, unsigned short reg); |
68 | void write_scoop_reg(struct device *dev, unsigned short reg, unsigned short data); | 69 | void write_scoop_reg(struct device *dev, unsigned short reg, unsigned short data); |
diff --git a/include/asm-arm/hwcap.h b/include/asm-arm/hwcap.h index 01a1391d3014..81f4c899a555 100644 --- a/include/asm-arm/hwcap.h +++ b/include/asm-arm/hwcap.h | |||
@@ -15,6 +15,7 @@ | |||
15 | #define HWCAP_JAVA 256 | 15 | #define HWCAP_JAVA 256 |
16 | #define HWCAP_IWMMXT 512 | 16 | #define HWCAP_IWMMXT 512 |
17 | #define HWCAP_CRUNCH 1024 | 17 | #define HWCAP_CRUNCH 1024 |
18 | #define HWCAP_THUMBEE 2048 | ||
18 | 19 | ||
19 | #if defined(__KERNEL__) && !defined(__ASSEMBLY__) | 20 | #if defined(__KERNEL__) && !defined(__ASSEMBLY__) |
20 | /* | 21 | /* |
diff --git a/include/asm-arm/mach/pci.h b/include/asm-arm/mach/pci.h index 24621c49a0c7..9d4f6b5ea419 100644 --- a/include/asm-arm/mach/pci.h +++ b/include/asm-arm/mach/pci.h | |||
@@ -55,6 +55,7 @@ void pci_common_init(struct hw_pci *); | |||
55 | extern int iop3xx_pci_setup(int nr, struct pci_sys_data *); | 55 | extern int iop3xx_pci_setup(int nr, struct pci_sys_data *); |
56 | extern struct pci_bus *iop3xx_pci_scan_bus(int nr, struct pci_sys_data *); | 56 | extern struct pci_bus *iop3xx_pci_scan_bus(int nr, struct pci_sys_data *); |
57 | extern void iop3xx_pci_preinit(void); | 57 | extern void iop3xx_pci_preinit(void); |
58 | extern void iop3xx_pci_preinit_cond(void); | ||
58 | 59 | ||
59 | extern int dc21285_setup(int nr, struct pci_sys_data *); | 60 | extern int dc21285_setup(int nr, struct pci_sys_data *); |
60 | extern struct pci_bus *dc21285_scan_bus(int nr, struct pci_sys_data *); | 61 | extern struct pci_bus *dc21285_scan_bus(int nr, struct pci_sys_data *); |
diff --git a/include/asm-arm/memory.h b/include/asm-arm/memory.h index d9bfb39adabf..9ba4d7136e6b 100644 --- a/include/asm-arm/memory.h +++ b/include/asm-arm/memory.h | |||
@@ -217,7 +217,10 @@ static inline __deprecated void *bus_to_virt(unsigned long x) | |||
217 | #ifndef CONFIG_DISCONTIGMEM | 217 | #ifndef CONFIG_DISCONTIGMEM |
218 | 218 | ||
219 | #define ARCH_PFN_OFFSET PHYS_PFN_OFFSET | 219 | #define ARCH_PFN_OFFSET PHYS_PFN_OFFSET |
220 | |||
221 | #ifndef CONFIG_SPARSEMEM | ||
220 | #define pfn_valid(pfn) ((pfn) >= PHYS_PFN_OFFSET && (pfn) < (PHYS_PFN_OFFSET + max_mapnr)) | 222 | #define pfn_valid(pfn) ((pfn) >= PHYS_PFN_OFFSET && (pfn) < (PHYS_PFN_OFFSET + max_mapnr)) |
223 | #endif | ||
221 | 224 | ||
222 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) | 225 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) |
223 | #define virt_addr_valid(kaddr) ((unsigned long)(kaddr) >= PAGE_OFFSET && (unsigned long)(kaddr) < (unsigned long)high_memory) | 226 | #define virt_addr_valid(kaddr) ((unsigned long)(kaddr) >= PAGE_OFFSET && (unsigned long)(kaddr) < (unsigned long)high_memory) |
diff --git a/include/asm-arm/plat-orion/ehci-orion.h b/include/asm-arm/plat-orion/ehci-orion.h new file mode 100644 index 000000000000..785705651e24 --- /dev/null +++ b/include/asm-arm/plat-orion/ehci-orion.h | |||
@@ -0,0 +1,19 @@ | |||
1 | /* | ||
2 | * include/asm-arm/plat-orion/ehci-orion.h | ||
3 | * | ||
4 | * This file is licensed under the terms of the GNU General Public | ||
5 | * License version 2. This program is licensed "as is" without any | ||
6 | * warranty of any kind, whether express or implied. | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASM_PLAT_ORION_EHCI_ORION_H | ||
10 | #define __ASM_PLAT_ORION_EHCI_ORION_H | ||
11 | |||
12 | #include <linux/mbus.h> | ||
13 | |||
14 | struct orion_ehci_data { | ||
15 | struct mbus_dram_target_info *dram; | ||
16 | }; | ||
17 | |||
18 | |||
19 | #endif | ||
diff --git a/include/asm-arm/plat-orion/irq.h b/include/asm-arm/plat-orion/irq.h new file mode 100644 index 000000000000..94aeed919d5b --- /dev/null +++ b/include/asm-arm/plat-orion/irq.h | |||
@@ -0,0 +1,17 @@ | |||
1 | /* | ||
2 | * include/asm-arm/plat-orion/irq.h | ||
3 | * | ||
4 | * Marvell Orion SoC IRQ handling. | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #ifndef __ASM_PLAT_ORION_IRQ_H | ||
12 | #define __ASM_PLAT_ORION_IRQ_H | ||
13 | |||
14 | void orion_irq_init(unsigned int irq_start, void __iomem *maskaddr); | ||
15 | |||
16 | |||
17 | #endif | ||
diff --git a/include/asm-arm/arch-orion/platform.h b/include/asm-arm/plat-orion/orion_nand.h index 143c38e2fa0b..ffd3852a0dd7 100644 --- a/include/asm-arm/arch-orion/platform.h +++ b/include/asm-arm/plat-orion/orion_nand.h | |||
@@ -1,15 +1,13 @@ | |||
1 | /* | 1 | /* |
2 | * asm-arm/arch-orion/platform.h | 2 | * include/asm-arm/plat-orion/orion_nand.h |
3 | * | ||
4 | * Tzachi Perelstein <tzachi@marvell.com> | ||
5 | * | 3 | * |
6 | * This file is licensed under the terms of the GNU General Public | 4 | * This file is licensed under the terms of the GNU General Public |
7 | * License version 2. This program is licensed "as is" without any | 5 | * License version 2. This program is licensed "as is" without any |
8 | * warranty of any kind, whether express or implied. | 6 | * warranty of any kind, whether express or implied. |
9 | */ | 7 | */ |
10 | 8 | ||
11 | #ifndef __ASM_ARCH_PLATFORM_H__ | 9 | #ifndef __ASM_PLAT_ORION_ORION_NAND_H |
12 | #define __ASM_ARCH_PLATFORM_H__ | 10 | #define __ASM_PLAT_ORION_ORION_NAND_H |
13 | 11 | ||
14 | /* | 12 | /* |
15 | * Device bus NAND private data | 13 | * Device bus NAND private data |
@@ -22,4 +20,5 @@ struct orion_nand_data { | |||
22 | u8 width; /* buswidth */ | 20 | u8 width; /* buswidth */ |
23 | }; | 21 | }; |
24 | 22 | ||
23 | |||
25 | #endif | 24 | #endif |
diff --git a/include/asm-arm/plat-orion/pcie.h b/include/asm-arm/plat-orion/pcie.h new file mode 100644 index 000000000000..6434ac685d21 --- /dev/null +++ b/include/asm-arm/plat-orion/pcie.h | |||
@@ -0,0 +1,31 @@ | |||
1 | /* | ||
2 | * include/asm-arm/plat-orion/pcie.h | ||
3 | * | ||
4 | * Marvell Orion SoC PCIe handling. | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #ifndef __ASM_PLAT_ORION_PCIE_H | ||
12 | #define __ASM_PLAT_ORION_PCIE_H | ||
13 | |||
14 | u32 orion_pcie_dev_id(void __iomem *base); | ||
15 | u32 orion_pcie_rev(void __iomem *base); | ||
16 | int orion_pcie_link_up(void __iomem *base); | ||
17 | int orion_pcie_get_local_bus_nr(void __iomem *base); | ||
18 | void orion_pcie_set_local_bus_nr(void __iomem *base, int nr); | ||
19 | void orion_pcie_setup(void __iomem *base, | ||
20 | struct mbus_dram_target_info *dram); | ||
21 | int orion_pcie_rd_conf(void __iomem *base, struct pci_bus *bus, | ||
22 | u32 devfn, int where, int size, u32 *val); | ||
23 | int orion_pcie_rd_conf_tlp(void __iomem *base, struct pci_bus *bus, | ||
24 | u32 devfn, int where, int size, u32 *val); | ||
25 | int orion_pcie_rd_conf_wa(void __iomem *wa_base, struct pci_bus *bus, | ||
26 | u32 devfn, int where, int size, u32 *val); | ||
27 | int orion_pcie_wr_conf(void __iomem *base, struct pci_bus *bus, | ||
28 | u32 devfn, int where, int size, u32 val); | ||
29 | |||
30 | |||
31 | #endif | ||
diff --git a/include/asm-arm/plat-orion/time.h b/include/asm-arm/plat-orion/time.h new file mode 100644 index 000000000000..0e85cc8f44d9 --- /dev/null +++ b/include/asm-arm/plat-orion/time.h | |||
@@ -0,0 +1,17 @@ | |||
1 | /* | ||
2 | * include/asm-arm/plat-orion/time.h | ||
3 | * | ||
4 | * Marvell Orion SoC time handling. | ||
5 | * | ||
6 | * This file is licensed under the terms of the GNU General Public | ||
7 | * License version 2. This program is licensed "as is" without any | ||
8 | * warranty of any kind, whether express or implied. | ||
9 | */ | ||
10 | |||
11 | #ifndef __ASM_PLAT_ORION_TIME_H | ||
12 | #define __ASM_PLAT_ORION_TIME_H | ||
13 | |||
14 | void orion_time_init(unsigned int irq, unsigned int tclk); | ||
15 | |||
16 | |||
17 | #endif | ||
diff --git a/include/asm-arm/sparsemem.h b/include/asm-arm/sparsemem.h new file mode 100644 index 000000000000..277158191a0d --- /dev/null +++ b/include/asm-arm/sparsemem.h | |||
@@ -0,0 +1,10 @@ | |||
1 | #ifndef ASMARM_SPARSEMEM_H | ||
2 | #define ASMARM_SPARSEMEM_H | ||
3 | |||
4 | #include <asm/memory.h> | ||
5 | |||
6 | #define MAX_PHYSADDR_BITS 32 | ||
7 | #define MAX_PHYSMEM_BITS 32 | ||
8 | #define SECTION_SIZE_BITS NODE_MEM_SIZE_BITS | ||
9 | |||
10 | #endif | ||
diff --git a/include/asm-arm/thread_info.h b/include/asm-arm/thread_info.h index 41784357a204..f5a664786311 100644 --- a/include/asm-arm/thread_info.h +++ b/include/asm-arm/thread_info.h | |||
@@ -62,6 +62,9 @@ struct thread_info { | |||
62 | struct crunch_state crunchstate; | 62 | struct crunch_state crunchstate; |
63 | union fp_state fpstate __attribute__((aligned(8))); | 63 | union fp_state fpstate __attribute__((aligned(8))); |
64 | union vfp_state vfpstate; | 64 | union vfp_state vfpstate; |
65 | #ifdef CONFIG_ARM_THUMBEE | ||
66 | unsigned long thumbee_state; /* ThumbEE Handler Base register */ | ||
67 | #endif | ||
65 | struct restart_block restart_block; | 68 | struct restart_block restart_block; |
66 | }; | 69 | }; |
67 | 70 | ||
diff --git a/include/asm-arm/unistd.h b/include/asm-arm/unistd.h index 88e868b7aae0..7c570082b1e0 100644 --- a/include/asm-arm/unistd.h +++ b/include/asm-arm/unistd.h | |||
@@ -376,9 +376,11 @@ | |||
376 | #define __NR_kexec_load (__NR_SYSCALL_BASE+347) | 376 | #define __NR_kexec_load (__NR_SYSCALL_BASE+347) |
377 | #define __NR_utimensat (__NR_SYSCALL_BASE+348) | 377 | #define __NR_utimensat (__NR_SYSCALL_BASE+348) |
378 | #define __NR_signalfd (__NR_SYSCALL_BASE+349) | 378 | #define __NR_signalfd (__NR_SYSCALL_BASE+349) |
379 | #define __NR_timerfd (__NR_SYSCALL_BASE+350) | 379 | #define __NR_timerfd_create (__NR_SYSCALL_BASE+350) |
380 | #define __NR_eventfd (__NR_SYSCALL_BASE+351) | 380 | #define __NR_eventfd (__NR_SYSCALL_BASE+351) |
381 | #define __NR_fallocate (__NR_SYSCALL_BASE+352) | 381 | #define __NR_fallocate (__NR_SYSCALL_BASE+352) |
382 | #define __NR_timerfd_settime (__NR_SYSCALL_BASE+353) | ||
383 | #define __NR_timerfd_gettime (__NR_SYSCALL_BASE+354) | ||
382 | 384 | ||
383 | /* | 385 | /* |
384 | * The following SWIs are ARM private. | 386 | * The following SWIs are ARM private. |