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