Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 74412
b: refs/heads/master
c: 52b2bd7
h: refs/heads/master
v: v3
  • Loading branch information
eric miao authored and Russell King committed Nov 26, 2007
1 parent fc2f3c6 commit 2efaa56
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 43b35f104d20c03fd1741d25c370a94485e2cae6
refs/heads/master: 52b2bd7f97e2677f8d6f5cef675f86bba732e860
18 changes: 13 additions & 5 deletions trunk/include/asm-arm/arch-pxa/mfp.h
Original file line number Diff line number Diff line change
Expand Up @@ -346,23 +346,31 @@ typedef uint32_t mfp_cfg_t;
#define MFP_CFG_PIN(mfp_cfg) (((mfp_cfg) >> 16) & 0xffff)
#define MFP_CFG_VAL(mfp_cfg) ((mfp_cfg) & 0xffff)

#define MFPR_DEFAULT (0x0000)
/*
* MFP register defaults to
* drive strength fast 3mA (010'b)
* edge detection logic disabled
* alternate function 0
*/
#define MFPR_DEFAULT (0x0840)

#define MFP_CFG(pin, af) \
((MFP_PIN_##pin << 16) | MFPR_DEFAULT | (MFP_##af))

#define MFP_CFG_DRV(pin, af, drv) \
((MFP_PIN_##pin << 16) | MFPR_DEFAULT |\
((MFP_PIN_##pin << 16) | (MFPR_DEFAULT & ~MFPR_DRV_MASK) |\
((MFP_##drv) << 10) | (MFP_##af))

#define MFP_CFG_LPM(pin, af, lpm) \
((MFP_PIN_##pin << 16) | MFPR_DEFAULT | (MFP_##af) |\
((MFP_PIN_##pin << 16) | (MFPR_DEFAULT & ~MFPR_LPM_MASK) |\
(((MFP_LPM_##lpm) & 0x3) << 7) |\
(((MFP_LPM_##lpm) & 0x4) << 12) |\
(((MFP_LPM_##lpm) & 0x8) << 10))
(((MFP_LPM_##lpm) & 0x8) << 10) |\
(MFP_##af))

#define MFP_CFG_X(pin, af, drv, lpm) \
((MFP_PIN_##pin << 16) | MFPR_DEFAULT |\
((MFP_PIN_##pin << 16) |\
(MFPR_DEFAULT & ~(MFPR_DRV_MASK | MFPR_LPM_MASK)) |\
((MFP_##drv) << 10) | (MFP_##af) |\
(((MFP_LPM_##lpm) & 0x3) << 7) |\
(((MFP_LPM_##lpm) & 0x4) << 12) |\
Expand Down

0 comments on commit 2efaa56

Please sign in to comment.