Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef __ASM_MACH_MFP_H
0003 #define __ASM_MACH_MFP_H
0004 
0005 #include <linux/soc/pxa/mfp.h>
0006 
0007 /*
0008  * NOTE: the MFPR register bit definitions on PXA168 processor lines are a
0009  * bit different from those on PXA3xx.  Bit [7:10] are now reserved, which
0010  * were SLEEP_OE_N, SLEEP_DATA, SLEEP_SEL and the LSB of DRIVE bits.
0011  *
0012  * To cope with this difference and re-use the pxa3xx mfp code as much as
0013  * possible, we make the following compromise:
0014  *
0015  * 1. SLEEP_OE_N will always be programmed to '1' (by MFP_LPM_FLOAT)
0016  * 2. DRIVE strength definitions redefined to include the reserved bit
0017  *    - the reserved bit differs between pxa168 and pxa910, and the
0018  *      MFP_DRIVE_* macros are individually defined in mfp-pxa{168,910}.h
0019  * 3. Override MFP_CFG() and MFP_CFG_DRV()
0020  * 4. Drop the use of MFP_CFG_LPM() and MFP_CFG_X()
0021  */
0022 
0023 #undef MFP_CFG
0024 #undef MFP_CFG_DRV
0025 #undef MFP_CFG_LPM
0026 #undef MFP_CFG_X
0027 #undef MFP_CFG_DEFAULT
0028 
0029 #define MFP_CFG(pin, af)        \
0030     (MFP_LPM_FLOAT | MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_DRIVE_MEDIUM)
0031 
0032 #define MFP_CFG_DRV(pin, af, drv)   \
0033     (MFP_LPM_FLOAT | MFP_PIN(MFP_PIN_##pin) | MFP_##af | MFP_DRIVE_##drv)
0034 
0035 #endif /* __ASM_MACH_MFP_H */