blob: 62e510e80a58099bfefb363253a2fdae92537837 [file] [log] [blame]
Eric Miaoa7a89d92009-01-20 17:20:56 +08001#ifndef __ASM_MACH_MFP_H
2#define __ASM_MACH_MFP_H
3
4#include <plat/mfp.h>
5
6/*
7 * NOTE: the MFPR register bit definitions on PXA168 processor lines are a
8 * bit different from those on PXA3xx. Bit [7:10] are now reserved, which
9 * were SLEEP_OE_N, SLEEP_DATA, SLEEP_SEL and the LSB of DRIVE bits.
10 *
11 * To cope with this difference and re-use the pxa3xx mfp code as much as
12 * possible, we make the following compromise:
13 *
14 * 1. SLEEP_OE_N will always be programmed to '1' (by MFP_LPM_FLOAT)
Mingwei Wang0e1b74d2009-05-20 16:49:57 +080015 * 2. DRIVE strength definitions redefined to include the reserved bit
16 * - the reserved bit differs between pxa168 and pxa910, and the
17 * MFP_DRIVE_* macros are individually defined in mfp-pxa{168,910}.h
Eric Miaoa7a89d92009-01-20 17:20:56 +080018 * 3. Override MFP_CFG() and MFP_CFG_DRV()
19 * 4. Drop the use of MFP_CFG_LPM() and MFP_CFG_X()
20 */
21
Eric Miaoa7a89d92009-01-20 17:20:56 +080022#undef MFP_CFG
23#undef MFP_CFG_DRV
24#undef MFP_CFG_LPM
25#undef MFP_CFG_X
26#undef MFP_CFG_DEFAULT
27
28#define MFP_CFG(pin, af) \
29 (MFP_LPM_FLOAT | MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_DRIVE_MEDIUM)
30
31#define MFP_CFG_DRV(pin, af, drv) \
32 (MFP_LPM_FLOAT | MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_DRIVE_##drv)
33
34#endif /* __ASM_MACH_MFP_H */