Commit 993e8268 authored by Madhumitha Prabakaran's avatar Madhumitha Prabakaran Committed by Greg Kroah-Hartman

Staging: media: davinci_vpfe: Drop macros

Drop macros instead use functions set_bit() and clear_bit directly.
Signed-off-by: default avatarMadhumitha Prabakaran <madhumithabiw@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a3703713
...@@ -189,7 +189,7 @@ static int ipipeif_hw_setup(struct v4l2_subdev *sd) ...@@ -189,7 +189,7 @@ static int ipipeif_hw_setup(struct v4l2_subdev *sd)
enum ipipeif_input_source ipipeif_source; enum ipipeif_input_source ipipeif_source;
u32 isif_port_if; u32 isif_port_if;
void __iomem *ipipeif_base_addr; void __iomem *ipipeif_base_addr;
unsigned int val; unsigned long val;
int data_shift; int data_shift;
int pack_mode; int pack_mode;
int source1; int source1;
...@@ -296,14 +296,14 @@ static int ipipeif_hw_setup(struct v4l2_subdev *sd) ...@@ -296,14 +296,14 @@ static int ipipeif_hw_setup(struct v4l2_subdev *sd)
case MEDIA_BUS_FMT_YUYV8_1X16: case MEDIA_BUS_FMT_YUYV8_1X16:
case MEDIA_BUS_FMT_UYVY8_2X8: case MEDIA_BUS_FMT_UYVY8_2X8:
case MEDIA_BUS_FMT_Y8_1X8: case MEDIA_BUS_FMT_Y8_1X8:
RESETBIT(val, IPIPEIF_CFG2_YUV8_SHIFT); clear_bit(IPIPEIF_CFG2_YUV8_SHIFT, &val);
SETBIT(val, IPIPEIF_CFG2_YUV16_SHIFT); set_bit(IPIPEIF_CFG2_YUV16_SHIFT, &val);
ipipeif_write(val, ipipeif_base_addr, IPIPEIF_CFG2); ipipeif_write(val, ipipeif_base_addr, IPIPEIF_CFG2);
break; break;
default: default:
RESETBIT(val, IPIPEIF_CFG2_YUV8_SHIFT); clear_bit(IPIPEIF_CFG2_YUV8_SHIFT, &val);
RESETBIT(val, IPIPEIF_CFG2_YUV16_SHIFT); clear_bit(IPIPEIF_CFG2_YUV16_SHIFT, &val);
ipipeif_write(val, ipipeif_base_addr, IPIPEIF_CFG2); ipipeif_write(val, ipipeif_base_addr, IPIPEIF_CFG2);
break; break;
} }
...@@ -344,16 +344,16 @@ static int ipipeif_hw_setup(struct v4l2_subdev *sd) ...@@ -344,16 +344,16 @@ static int ipipeif_hw_setup(struct v4l2_subdev *sd)
switch (isif_port_if) { switch (isif_port_if) {
case MEDIA_BUS_FMT_YUYV8_1X16: case MEDIA_BUS_FMT_YUYV8_1X16:
case MEDIA_BUS_FMT_YUYV10_1X20: case MEDIA_BUS_FMT_YUYV10_1X20:
RESETBIT(val, IPIPEIF_CFG2_YUV8_SHIFT); clear_bit(IPIPEIF_CFG2_YUV8_SHIFT, &val);
SETBIT(val, IPIPEIF_CFG2_YUV16_SHIFT); set_bit(IPIPEIF_CFG2_YUV16_SHIFT, &val);
break; break;
case MEDIA_BUS_FMT_YUYV8_2X8: case MEDIA_BUS_FMT_YUYV8_2X8:
case MEDIA_BUS_FMT_UYVY8_2X8: case MEDIA_BUS_FMT_UYVY8_2X8:
case MEDIA_BUS_FMT_Y8_1X8: case MEDIA_BUS_FMT_Y8_1X8:
case MEDIA_BUS_FMT_YUYV10_2X10: case MEDIA_BUS_FMT_YUYV10_2X10:
SETBIT(val, IPIPEIF_CFG2_YUV8_SHIFT); set_bit(IPIPEIF_CFG2_YUV8_SHIFT, &val);
SETBIT(val, IPIPEIF_CFG2_YUV16_SHIFT); set_bit(IPIPEIF_CFG2_YUV16_SHIFT, &val);
val |= IPIPEIF_CBCR_Y << IPIPEIF_CFG2_YUV8P_SHIFT; val |= IPIPEIF_CBCR_Y << IPIPEIF_CFG2_YUV8P_SHIFT;
break; break;
......
...@@ -166,8 +166,6 @@ struct vpfe_ipipeif_device { ...@@ -166,8 +166,6 @@ struct vpfe_ipipeif_device {
#define IPIPEIF_RSZ_MIN 16 #define IPIPEIF_RSZ_MIN 16
#define IPIPEIF_RSZ_MAX 112 #define IPIPEIF_RSZ_MAX 112
#define IPIPEIF_RSZ_CONST 16 #define IPIPEIF_RSZ_CONST 16
#define SETBIT(reg, bit) (reg = ((reg) | ((0x00000001)<<(bit))))
#define RESETBIT(reg, bit) (reg = ((reg) & (~(0x00000001<<(bit)))))
#define IPIPEIF_ADOFS_LSB_MASK 0x1ff #define IPIPEIF_ADOFS_LSB_MASK 0x1ff
#define IPIPEIF_ADOFS_LSB_SHIFT 5 #define IPIPEIF_ADOFS_LSB_SHIFT 5
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment