diff options
author | Xiang Wang <wangx@marvell.com> | 2015-03-23 17:56:58 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-04-23 13:59:18 -0400 |
commit | ee4303cffa52216c4d12c6182eb41480713f439a (patch) | |
tree | d6e1a84ae56bea8c2e907bcc8bc02f833b11dcb9 /drivers/gpio | |
parent | a868e44333ebac080dd6ed81e5ae580691f7fd18 (diff) |
gpio: mvmfp: support newer MFP bit definitions
1. The bits 11..10 for mfp driver strength is only valid for
aspen and old xscale family, for newer Marvell chip, this range
has been moved to 12..11.
2. add sleep bit support
Signed-off-by: Xiang Wang <wangx@marvell.com>
[robh: rebase to current mainline]
Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/mvmfp.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/gpio/mvmfp.c b/drivers/gpio/mvmfp.c index 97bbe996f7..43ecf6610c 100644 --- a/drivers/gpio/mvmfp.c +++ b/drivers/gpio/mvmfp.c @@ -43,18 +43,8 @@ void mfp_config(u32 *mfp_cfgs) /* Write a mfg register as per configuration */ val = 0; - if (cfg_val & MFP_AF_FLAG) - /* Abstract and program Afternate-Func Selection */ - val |= cfg_val & MFP_AF_MASK; - if (cfg_val & MFP_EDGE_FLAG) - /* Abstract and program Edge configuration */ - val |= cfg_val & MFP_LPM_EDGE_MASK; - if (cfg_val & MFP_DRIVE_FLAG) - /* Abstract and program Drive configuration */ - val |= cfg_val & MFP_DRIVE_MASK; - if (cfg_val & MFP_PULL_FLAG) - /* Abstract and program Pullup/down configuration */ - val |= cfg_val & MFP_PULL_MASK; + if (cfg_val & MFP_VALUE_MASK) + val |= cfg_val & MFP_VALUE_MASK; writel(val, p_mfpr); } while (1); |