mfp.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef __ASM_MACH_MFP_H
  2. #define __ASM_MACH_MFP_H
  3. #include <plat/mfp.h>
  4. /*
  5. * NOTE: the MFPR register bit definitions on PXA168 processor lines are a
  6. * bit different from those on PXA3xx. Bit [7:10] are now reserved, which
  7. * were SLEEP_OE_N, SLEEP_DATA, SLEEP_SEL and the LSB of DRIVE bits.
  8. *
  9. * To cope with this difference and re-use the pxa3xx mfp code as much as
  10. * possible, we make the following compromise:
  11. *
  12. * 1. SLEEP_OE_N will always be programmed to '1' (by MFP_LPM_FLOAT)
  13. * 2. DRIVE strength definitions redefined to include the reserved bit10
  14. * 3. Override MFP_CFG() and MFP_CFG_DRV()
  15. * 4. Drop the use of MFP_CFG_LPM() and MFP_CFG_X()
  16. */
  17. #define MFP_DRIVE_VERY_SLOW (0x0 << 13)
  18. #define MFP_DRIVE_SLOW (0x2 << 13)
  19. #define MFP_DRIVE_MEDIUM (0x4 << 13)
  20. #define MFP_DRIVE_FAST (0x8 << 13)
  21. #undef MFP_CFG
  22. #undef MFP_CFG_DRV
  23. #undef MFP_CFG_LPM
  24. #undef MFP_CFG_X
  25. #undef MFP_CFG_DEFAULT
  26. #define MFP_CFG(pin, af) \
  27. (MFP_LPM_FLOAT | MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_DRIVE_MEDIUM)
  28. #define MFP_CFG_DRV(pin, af, drv) \
  29. (MFP_LPM_FLOAT | MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_DRIVE_##drv)
  30. #endif /* __ASM_MACH_MFP_H */