From 9771175d40a8948cb601d6c568b9a509c1d871fd Mon Sep 17 00:00:00 2001 From: yxj Date: Thu, 24 Jan 2013 14:25:13 +0800 Subject: [PATCH] rk3188 lcdc:add dump lcdc reg function --- drivers/video/rockchip/lcdc/rk3188_lcdc.c | 27 +++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/drivers/video/rockchip/lcdc/rk3188_lcdc.c b/drivers/video/rockchip/lcdc/rk3188_lcdc.c index 6bc01db5f7d0..3382df8d15c1 100644 --- a/drivers/video/rockchip/lcdc/rk3188_lcdc.c +++ b/drivers/video/rockchip/lcdc/rk3188_lcdc.c @@ -73,6 +73,33 @@ static int rk3188_lcdc_clk_disable(struct rk3188_lcdc_device *lcdc_dev) return 0; } + + +static void rk3188_lcdc_reg_dump(struct rk3188_lcdc_device *lcdc_dev) +{ + int *cbase = (int *)lcdc_dev->regs; + int *regsbak = (int*)lcdc_dev->regsbak; + int i,j; + + printk("back up reg:\n"); + for(i=0; i<=(0x90>>4);i++) + { + for(j=0;j<4;j++) + printk("%08x ",*(regsbak+i*4 +j)); + printk("\n"); + } + + printk("lcdc reg:\n"); + for(i=0; i<=(0x90>>4);i++) + { + for(j=0;j<4;j++) + printk("%08x ",readl_relaxed(cbase+i*4 +j)); + printk("\n"); + } + +} + + static int rk3188_lcdc_reg_resume(struct rk3188_lcdc_device *lcdc_dev) { memcpy((u8*)lcdc_dev->regs, (u8*)lcdc_dev->regsbak, 0x84); -- 2.34.1