On 2020-03-09 20:52, Laurent Pinchart wrote: > mxsfb_crtc.c defines several macros related to register addresses and > bit, which duplicates macros from mxsfb_regs.h. Use the macros from > mxsfb_regs.h instead and remove them. > > Signed-off-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx> Reviewed-by: Stefan Agner <stefan@xxxxxxxx> > --- > drivers/gpu/drm/mxsfb/mxsfb_crtc.c | 14 +++++--------- > 1 file changed, 5 insertions(+), 9 deletions(-) > > diff --git a/drivers/gpu/drm/mxsfb/mxsfb_crtc.c > b/drivers/gpu/drm/mxsfb/mxsfb_crtc.c > index 722bd9b4f5f9..aef72adabf41 100644 > --- a/drivers/gpu/drm/mxsfb/mxsfb_crtc.c > +++ b/drivers/gpu/drm/mxsfb/mxsfb_crtc.c > @@ -29,10 +29,6 @@ > #include "mxsfb_drv.h" > #include "mxsfb_regs.h" > > -#define MXS_SET_ADDR 0x4 > -#define MXS_CLR_ADDR 0x8 > -#define MODULE_CLKGATE BIT(30) > -#define MODULE_SFTRST BIT(31) > /* 1 second delay should be plenty of time for block reset */ > #define RESET_TIMEOUT 1000000 > > @@ -162,7 +158,7 @@ static int clear_poll_bit(void __iomem *addr, u32 mask) > { > u32 reg; > > - writel(mask, addr + MXS_CLR_ADDR); > + writel(mask, addr + REG_CLR); > return readl_poll_timeout(addr, reg, !(reg & mask), 0, RESET_TIMEOUT); > } > > @@ -170,17 +166,17 @@ static int mxsfb_reset_block(struct > mxsfb_drm_private *mxsfb) > { > int ret; > > - ret = clear_poll_bit(mxsfb->base + LCDC_CTRL, MODULE_SFTRST); > + ret = clear_poll_bit(mxsfb->base + LCDC_CTRL, CTRL_SFTRST); > if (ret) > return ret; > > - writel(MODULE_CLKGATE, mxsfb->base + LCDC_CTRL + MXS_CLR_ADDR); > + writel(CTRL_CLKGATE, mxsfb->base + LCDC_CTRL + REG_CLR); > > - ret = clear_poll_bit(mxsfb->base + LCDC_CTRL, MODULE_SFTRST); > + ret = clear_poll_bit(mxsfb->base + LCDC_CTRL, CTRL_SFTRST); > if (ret) > return ret; > > - return clear_poll_bit(mxsfb->base + LCDC_CTRL, MODULE_CLKGATE); > + return clear_poll_bit(mxsfb->base + LCDC_CTRL, CTRL_CLKGATE); > } > > static dma_addr_t mxsfb_get_fb_paddr(struct mxsfb_drm_private *mxsfb) _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel