diff options
author | Daniel Mack <daniel@caiaq.de> | 2009-08-11 08:39:09 -0400 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2009-09-10 06:49:24 -0400 |
commit | fb60870f630f926d2299b6ebd31fc94714dcd734 (patch) | |
tree | 64aec7edf3f57d0a4a5497bca8616801f576bf13 /arch | |
parent | 9304d008d6ba41ff52ef6eae44337398e83b4436 (diff) |
[ARM] pxa: add MFP_PULL_FLOAT
There is currently an uncovered case for MFP configuration on PXAs which
is selected by setting the PULL_SEL bit but none of the PULL{UP,DOWN}_EN
bits. This case is needed to explicitly let pins float, even if the
selected alternate function would default to a configuration with a pull
resistor enabled.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/plat-pxa/include/plat/mfp.h | 5 | ||||
-rw-r--r-- | arch/arm/plat-pxa/mfp.c | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm/plat-pxa/include/plat/mfp.h b/arch/arm/plat-pxa/include/plat/mfp.h index 64019464c8db..08ad665460ba 100644 --- a/arch/arm/plat-pxa/include/plat/mfp.h +++ b/arch/arm/plat-pxa/include/plat/mfp.h | |||
@@ -325,8 +325,9 @@ typedef unsigned long mfp_cfg_t; | |||
325 | #define MFP_PULL_LOW (0x1 << 21) | 325 | #define MFP_PULL_LOW (0x1 << 21) |
326 | #define MFP_PULL_HIGH (0x2 << 21) | 326 | #define MFP_PULL_HIGH (0x2 << 21) |
327 | #define MFP_PULL_BOTH (0x3 << 21) | 327 | #define MFP_PULL_BOTH (0x3 << 21) |
328 | #define MFP_PULL_MASK (0x3 << 21) | 328 | #define MFP_PULL_FLOAT (0x4 << 21) |
329 | #define MFP_PULL(x) (((x) >> 21) & 0x3) | 329 | #define MFP_PULL_MASK (0x7 << 21) |
330 | #define MFP_PULL(x) (((x) >> 21) & 0x7) | ||
330 | 331 | ||
331 | #define MFP_CFG_DEFAULT (MFP_AF0 | MFP_DS03X | MFP_LPM_DEFAULT |\ | 332 | #define MFP_CFG_DEFAULT (MFP_AF0 | MFP_DS03X | MFP_LPM_DEFAULT |\ |
332 | MFP_LPM_EDGE_NONE | MFP_PULL_NONE) | 333 | MFP_LPM_EDGE_NONE | MFP_PULL_NONE) |
diff --git a/arch/arm/plat-pxa/mfp.c b/arch/arm/plat-pxa/mfp.c index e716c622a17c..9405d0379c85 100644 --- a/arch/arm/plat-pxa/mfp.c +++ b/arch/arm/plat-pxa/mfp.c | |||
@@ -77,11 +77,13 @@ | |||
77 | * MFPR_PULL_LOW 1 0 1 | 77 | * MFPR_PULL_LOW 1 0 1 |
78 | * MFPR_PULL_HIGH 1 1 0 | 78 | * MFPR_PULL_HIGH 1 1 0 |
79 | * MFPR_PULL_BOTH 1 1 1 | 79 | * MFPR_PULL_BOTH 1 1 1 |
80 | * MFPR_PULL_FLOAT 1 0 0 | ||
80 | */ | 81 | */ |
81 | #define MFPR_PULL_NONE (0) | 82 | #define MFPR_PULL_NONE (0) |
82 | #define MFPR_PULL_LOW (MFPR_PULL_SEL | MFPR_PULLDOWN_EN) | 83 | #define MFPR_PULL_LOW (MFPR_PULL_SEL | MFPR_PULLDOWN_EN) |
83 | #define MFPR_PULL_BOTH (MFPR_PULL_LOW | MFPR_PULLUP_EN) | 84 | #define MFPR_PULL_BOTH (MFPR_PULL_LOW | MFPR_PULLUP_EN) |
84 | #define MFPR_PULL_HIGH (MFPR_PULL_SEL | MFPR_PULLUP_EN) | 85 | #define MFPR_PULL_HIGH (MFPR_PULL_SEL | MFPR_PULLUP_EN) |
86 | #define MFPR_PULL_FLOAT (MFPR_PULL_SEL) | ||
85 | 87 | ||
86 | /* mfp_spin_lock is used to ensure that MFP register configuration | 88 | /* mfp_spin_lock is used to ensure that MFP register configuration |
87 | * (most likely a read-modify-write operation) is atomic, and that | 89 | * (most likely a read-modify-write operation) is atomic, and that |
@@ -116,6 +118,7 @@ static const unsigned long mfpr_pull[] = { | |||
116 | MFPR_PULL_LOW, | 118 | MFPR_PULL_LOW, |
117 | MFPR_PULL_HIGH, | 119 | MFPR_PULL_HIGH, |
118 | MFPR_PULL_BOTH, | 120 | MFPR_PULL_BOTH, |
121 | MFPR_PULL_FLOAT, | ||
119 | }; | 122 | }; |
120 | 123 | ||
121 | /* mapping of MFP_LPM_EDGE_* definitions to MFPR_EDGE_* register bits */ | 124 | /* mapping of MFP_LPM_EDGE_* definitions to MFPR_EDGE_* register bits */ |