]> git.sur5r.net Git - u-boot/commitdiff
imx: iomux-v3: Restore Linux's NEW_PAD_CTRL() macro
authorBenoît Thébaudeau <benoit.thebaudeau@advansee.com>
Fri, 26 Apr 2013 01:34:46 +0000 (01:34 +0000)
committerStefano Babic <sbabic@denx.de>
Sun, 28 Apr 2013 09:15:07 +0000 (11:15 +0200)
This macro will be useful for future changes.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
arch/arm/include/asm/imx-common/iomux-v3.h

index 6b5838117879c76f424162338943c1937d08eb65..2ba0a053de4a4627be2b98646372eef1ddcee12b 100644 (file)
@@ -86,6 +86,9 @@ typedef u64 iomux_v3_cfg_t;
        ((iomux_v3_cfg_t)(sel_input_ofs) << MUX_SEL_INPUT_OFS_SHIFT)|   \
        ((iomux_v3_cfg_t)(sel_input)     << MUX_SEL_INPUT_SHIFT))
 
+#define NEW_PAD_CTRL(cfg, pad) (((cfg) & ~MUX_PAD_CTRL_MASK) | \
+                                       MUX_PAD_CTRL(pad))
+
 #define __NA_                  0x000
 #define NO_MUX_I               0
 #define NO_PAD_I               0