gma500: introduce some register maps
[firefly-linux-kernel-4.4.55.git] / drivers / gpu / drm / gma500 / oaktrail_device.c
index e0b3d49a619a1ac67d45320baba332a60d8837ca..3c3c862ef61e9912cf09e5ae0892c328ddceb568 100644 (file)
@@ -456,11 +456,62 @@ static int oaktrail_power_up(struct drm_device *dev)
        return 0;
 }
 
+/* Oaktrail */
+static const struct psb_offset oaktrail_regmap[2] = {
+       {
+               .fp0 = MRST_FPA0,
+               .fp1 = MRST_FPA1,
+               .cntr = DSPACNTR,
+               .conf = PIPEACONF,
+               .src = PIPEASRC,
+               .dpll = MRST_DPLL_A,
+               .htotal = HTOTAL_A,
+               .hblank = HBLANK_A,
+               .hsync = HSYNC_A,
+               .vtotal = VTOTAL_A,
+               .vblank = VBLANK_A,
+               .vsync = VSYNC_A,
+               .stride = DSPASTRIDE,
+               .size = DSPASIZE,
+               .pos = DSPAPOS,
+               .surf = DSPASURF,
+               .addr = DSPABASE,
+               .status = PIPEASTAT,
+               .linoff = DSPALINOFF,
+               .tileoff = DSPATILEOFF,
+               .palette = PALETTE_A,
+       },
+       {
+               .fp0 = FPB0,
+               .fp1 = FPB1,
+               .cntr = DSPBCNTR,
+               .conf = PIPEBCONF,
+               .src = PIPEBSRC,
+               .dpll = DPLL_B,
+               .htotal = HTOTAL_B,
+               .hblank = HBLANK_B,
+               .hsync = HSYNC_B,
+               .vtotal = VTOTAL_B,
+               .vblank = VBLANK_B,
+               .vsync = VSYNC_B,
+               .stride = DSPBSTRIDE,
+               .size = DSPBSIZE,
+               .pos = DSPBPOS,
+               .surf = DSPBSURF,
+               .addr = DSPBBASE,
+               .status = PIPEBSTAT,
+               .linoff = DSPBLINOFF,
+               .tileoff = DSPBTILEOFF,
+               .palette = PALETTE_B,
+       },
+};
 
 static int oaktrail_chip_setup(struct drm_device *dev)
 {
        struct drm_psb_private *dev_priv = dev->dev_private;
        int ret;
+       
+       dev_priv->regmap = oaktrail_regmap;
 
        ret = mid_chip_setup(dev);
        if (ret < 0)