diff options
author | Eric Miao <eric.y.miao@gmail.com> | 2010-03-16 04:48:01 -0400 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2010-05-11 11:24:57 -0400 |
commit | c9840daa70fbb8f6031fcd1f254a3da49a41ea7b (patch) | |
tree | df95f94209b05cca7250b45cc694f15be51e5c50 /arch/arm/mach-pxa/include | |
parent | 793ffb9ed3179906760874689a99d4863d76914e (diff) |
[ARM] pxa: correct SSCR0_SCR to support multiple SoCs
The previous definitions of SSCR0_SCR and SSCR0_SerClkDiv() prevented
them being used simultaneously when supporting multiple PXA SoCs, esp.
in drivers/spi/pxa2xx_spi.c, make them correct.
The change from SSCR0_SerClkDiv(2) to SSCR0_SCR(2), will make the result
a little bit different in pxa2xx_spi_probe(), however, since that's only
used as a default initialization value, it's acceptable.
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch/arm/mach-pxa/include')
-rw-r--r-- | arch/arm/mach-pxa/include/mach/regs-ssp.h | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/arch/arm/mach-pxa/include/mach/regs-ssp.h b/arch/arm/mach-pxa/include/mach/regs-ssp.h index 6a2ed35acd59..dd15dc35a240 100644 --- a/arch/arm/mach-pxa/include/mach/regs-ssp.h +++ b/arch/arm/mach-pxa/include/mach/regs-ssp.h | |||
@@ -33,14 +33,7 @@ | |||
33 | #define SSCR0_National (0x2 << 4) /* National Microwire */ | 33 | #define SSCR0_National (0x2 << 4) /* National Microwire */ |
34 | #define SSCR0_ECS (1 << 6) /* External clock select */ | 34 | #define SSCR0_ECS (1 << 6) /* External clock select */ |
35 | #define SSCR0_SSE (1 << 7) /* Synchronous Serial Port Enable */ | 35 | #define SSCR0_SSE (1 << 7) /* Synchronous Serial Port Enable */ |
36 | 36 | #define SSCR0_SCR(x) ((x) << 8) /* Serial Clock Rate (mask) */ | |
37 | #if defined(CONFIG_PXA25x) | ||
38 | #define SSCR0_SCR (0x0000ff00) /* Serial Clock Rate (mask) */ | ||
39 | #define SSCR0_SerClkDiv(x) ((((x) - 2)/2) << 8) /* Divisor [2..512] */ | ||
40 | #elif defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx) | ||
41 | #define SSCR0_SCR (0x000fff00) /* Serial Clock Rate (mask) */ | ||
42 | #define SSCR0_SerClkDiv(x) (((x) - 1) << 8) /* Divisor [1..4096] */ | ||
43 | #endif | ||
44 | 37 | ||
45 | #if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx) | 38 | #if defined(CONFIG_PXA27x) || defined(CONFIG_PXA3xx) |
46 | #define SSCR0_EDSS (1 << 20) /* Extended data size select */ | 39 | #define SSCR0_EDSS (1 << 20) /* Extended data size select */ |