video: rockchip: tve: fix compile error and warning
[firefly-linux-kernel-4.4.55.git] / drivers / video / rockchip / lcdc / rk312x_lcdc.h
index 8422303fb2b583040174f9d14449f17d44f23c81..ec1d3cece51b4213e80cd166ecd7e3985c36f717 100755 (executable)
@@ -649,6 +649,9 @@ enum _vop_overlay_mode {
 
 
 #define CalScale(x, y)              ((((u32)(x - 1)) * 0x1000) / (y - 1))
+#define INT_STA_MSK    (m_HS_INT_STA | m_FS_INT_STA |          \
+                        m_LF_INT_STA | m_BUS_ERR_INT_STA)
+#define INT_CLR_SHIFT  8
 
 struct rk_lcdc_drvdata {
      u8 soc_type;
@@ -667,13 +670,15 @@ struct lcdc_device {
        u32 reg_phy_base;               /* physical basic address of lcdc register */
        u32 len;                        /* physical map length of lcdc register */
        spinlock_t  reg_lock;           /* one time only one process allowed to config the register */
-       
+
+       int __iomem *hwc_lut_addr_base;
        int __iomem *dsp_lut_addr_base;
 
        int prop;                       /* used for primary or extended display device */
        bool pre_init;
        bool pwr18;                     /* if lcdc use 1.8v power supply */
        bool clk_on;                    /* if aclk or hclk is closed ,acess to register is not allowed */
+       bool sclk_on;                   /* if sclk is open or closed */
        u8 atv_layer_cnt;               /* active layer counter,when atv_layer_cnt = 0,lcdc is disable*/
 
        unsigned int            irq;
@@ -688,6 +693,8 @@ struct lcdc_device {
         u32 s_pixclock;
 
        u32 standby;                    /* 1:standby,0:work */
+       struct backlight_device *backlight;
+       u32 iommu_status;
 };
 
 static inline void lcdc_writel(struct lcdc_device *lcdc_dev, u32 offset, u32 v)
@@ -699,6 +706,13 @@ static inline void lcdc_writel(struct lcdc_device *lcdc_dev, u32 offset, u32 v)
 }
 
 static inline u32 lcdc_readl(struct lcdc_device *lcdc_dev, u32 offset)
+{
+       u32 v;
+       v = readl_relaxed(lcdc_dev->regs + offset);
+       return v;
+}
+
+static inline u32 lcdc_readl_backup(struct lcdc_device *lcdc_dev, u32 offset)
 {
        u32 v;
        u32 *_pv = (u32*)lcdc_dev->regsbak;