diff options
Diffstat (limited to 'include/asm-arm/arch-pxa/mfp.h')
-rw-r--r-- | include/asm-arm/arch-pxa/mfp.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/include/asm-arm/arch-pxa/mfp.h b/include/asm-arm/arch-pxa/mfp.h index ac4157af5a8e..03c508d94f0e 100644 --- a/include/asm-arm/arch-pxa/mfp.h +++ b/include/asm-arm/arch-pxa/mfp.h | |||
@@ -346,23 +346,31 @@ typedef uint32_t mfp_cfg_t; | |||
346 | #define MFP_CFG_PIN(mfp_cfg) (((mfp_cfg) >> 16) & 0xffff) | 346 | #define MFP_CFG_PIN(mfp_cfg) (((mfp_cfg) >> 16) & 0xffff) |
347 | #define MFP_CFG_VAL(mfp_cfg) ((mfp_cfg) & 0xffff) | 347 | #define MFP_CFG_VAL(mfp_cfg) ((mfp_cfg) & 0xffff) |
348 | 348 | ||
349 | #define MFPR_DEFAULT (0x0000) | 349 | /* |
350 | * MFP register defaults to | ||
351 | * drive strength fast 3mA (010'b) | ||
352 | * edge detection logic disabled | ||
353 | * alternate function 0 | ||
354 | */ | ||
355 | #define MFPR_DEFAULT (0x0840) | ||
350 | 356 | ||
351 | #define MFP_CFG(pin, af) \ | 357 | #define MFP_CFG(pin, af) \ |
352 | ((MFP_PIN_##pin << 16) | MFPR_DEFAULT | (MFP_##af)) | 358 | ((MFP_PIN_##pin << 16) | MFPR_DEFAULT | (MFP_##af)) |
353 | 359 | ||
354 | #define MFP_CFG_DRV(pin, af, drv) \ | 360 | #define MFP_CFG_DRV(pin, af, drv) \ |
355 | ((MFP_PIN_##pin << 16) | MFPR_DEFAULT |\ | 361 | ((MFP_PIN_##pin << 16) | (MFPR_DEFAULT & ~MFPR_DRV_MASK) |\ |
356 | ((MFP_##drv) << 10) | (MFP_##af)) | 362 | ((MFP_##drv) << 10) | (MFP_##af)) |
357 | 363 | ||
358 | #define MFP_CFG_LPM(pin, af, lpm) \ | 364 | #define MFP_CFG_LPM(pin, af, lpm) \ |
359 | ((MFP_PIN_##pin << 16) | MFPR_DEFAULT | (MFP_##af) |\ | 365 | ((MFP_PIN_##pin << 16) | (MFPR_DEFAULT & ~MFPR_LPM_MASK) |\ |
360 | (((MFP_LPM_##lpm) & 0x3) << 7) |\ | 366 | (((MFP_LPM_##lpm) & 0x3) << 7) |\ |
361 | (((MFP_LPM_##lpm) & 0x4) << 12) |\ | 367 | (((MFP_LPM_##lpm) & 0x4) << 12) |\ |
362 | (((MFP_LPM_##lpm) & 0x8) << 10)) | 368 | (((MFP_LPM_##lpm) & 0x8) << 10) |\ |
369 | (MFP_##af)) | ||
363 | 370 | ||
364 | #define MFP_CFG_X(pin, af, drv, lpm) \ | 371 | #define MFP_CFG_X(pin, af, drv, lpm) \ |
365 | ((MFP_PIN_##pin << 16) | MFPR_DEFAULT |\ | 372 | ((MFP_PIN_##pin << 16) |\ |
373 | (MFPR_DEFAULT & ~(MFPR_DRV_MASK | MFPR_LPM_MASK)) |\ | ||
366 | ((MFP_##drv) << 10) | (MFP_##af) |\ | 374 | ((MFP_##drv) << 10) | (MFP_##af) |\ |
367 | (((MFP_LPM_##lpm) & 0x3) << 7) |\ | 375 | (((MFP_LPM_##lpm) & 0x3) << 7) |\ |
368 | (((MFP_LPM_##lpm) & 0x4) << 12) |\ | 376 | (((MFP_LPM_##lpm) & 0x4) << 12) |\ |