Commit fb60870f authored by Daniel Mack's avatar Daniel Mack Committed by Eric Miao

[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: default avatarDaniel Mack <daniel@caiaq.de>
Signed-off-by: default avatarEric Miao <eric.y.miao@gmail.com>
parent 9304d008
...@@ -325,8 +325,9 @@ typedef unsigned long mfp_cfg_t; ...@@ -325,8 +325,9 @@ typedef unsigned long mfp_cfg_t;
#define MFP_PULL_LOW (0x1 << 21) #define MFP_PULL_LOW (0x1 << 21)
#define MFP_PULL_HIGH (0x2 << 21) #define MFP_PULL_HIGH (0x2 << 21)
#define MFP_PULL_BOTH (0x3 << 21) #define MFP_PULL_BOTH (0x3 << 21)
#define MFP_PULL_MASK (0x3 << 21) #define MFP_PULL_FLOAT (0x4 << 21)
#define MFP_PULL(x) (((x) >> 21) & 0x3) #define MFP_PULL_MASK (0x7 << 21)
#define MFP_PULL(x) (((x) >> 21) & 0x7)
#define MFP_CFG_DEFAULT (MFP_AF0 | MFP_DS03X | MFP_LPM_DEFAULT |\ #define MFP_CFG_DEFAULT (MFP_AF0 | MFP_DS03X | MFP_LPM_DEFAULT |\
MFP_LPM_EDGE_NONE | MFP_PULL_NONE) MFP_LPM_EDGE_NONE | MFP_PULL_NONE)
......
...@@ -77,11 +77,13 @@ ...@@ -77,11 +77,13 @@
* MFPR_PULL_LOW 1 0 1 * MFPR_PULL_LOW 1 0 1
* MFPR_PULL_HIGH 1 1 0 * MFPR_PULL_HIGH 1 1 0
* MFPR_PULL_BOTH 1 1 1 * MFPR_PULL_BOTH 1 1 1
* MFPR_PULL_FLOAT 1 0 0
*/ */
#define MFPR_PULL_NONE (0) #define MFPR_PULL_NONE (0)
#define MFPR_PULL_LOW (MFPR_PULL_SEL | MFPR_PULLDOWN_EN) #define MFPR_PULL_LOW (MFPR_PULL_SEL | MFPR_PULLDOWN_EN)
#define MFPR_PULL_BOTH (MFPR_PULL_LOW | MFPR_PULLUP_EN) #define MFPR_PULL_BOTH (MFPR_PULL_LOW | MFPR_PULLUP_EN)
#define MFPR_PULL_HIGH (MFPR_PULL_SEL | MFPR_PULLUP_EN) #define MFPR_PULL_HIGH (MFPR_PULL_SEL | MFPR_PULLUP_EN)
#define MFPR_PULL_FLOAT (MFPR_PULL_SEL)
/* mfp_spin_lock is used to ensure that MFP register configuration /* mfp_spin_lock is used to ensure that MFP register configuration
* (most likely a read-modify-write operation) is atomic, and that * (most likely a read-modify-write operation) is atomic, and that
...@@ -116,6 +118,7 @@ static const unsigned long mfpr_pull[] = { ...@@ -116,6 +118,7 @@ static const unsigned long mfpr_pull[] = {
MFPR_PULL_LOW, MFPR_PULL_LOW,
MFPR_PULL_HIGH, MFPR_PULL_HIGH,
MFPR_PULL_BOTH, MFPR_PULL_BOTH,
MFPR_PULL_FLOAT,
}; };
/* mapping of MFP_LPM_EDGE_* definitions to MFPR_EDGE_* register bits */ /* mapping of MFP_LPM_EDGE_* definitions to MFPR_EDGE_* register bits */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment