Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[firefly-linux-kernel-4.4.55.git] / drivers / video / fbdev / aty / aty128fb.c
index ff6070170d018721349b2b604113bf019653ee7f..0156954bf34097547a381341385b85dc6c8021de 100644 (file)
@@ -324,14 +324,61 @@ struct aty128_meminfo {
 };
 
 /* various memory configurations */
-static const struct aty128_meminfo sdr_128   =
-       { 4, 4, 3, 3, 1, 3, 1, 16, 30, 16, "128-bit SDR SGRAM (1:1)" };
-static const struct aty128_meminfo sdr_64    =
-       { 4, 8, 3, 3, 1, 3, 1, 17, 46, 17, "64-bit SDR SGRAM (1:1)" };
-static const struct aty128_meminfo sdr_sgram =
-       { 4, 4, 1, 2, 1, 2, 1, 16, 24, 16, "64-bit SDR SGRAM (2:1)" };
-static const struct aty128_meminfo ddr_sgram =
-       { 4, 4, 3, 3, 2, 3, 1, 16, 31, 16, "64-bit DDR SGRAM" };
+static const struct aty128_meminfo sdr_128 = {
+       .ML = 4,
+       .MB = 4,
+       .Trcd = 3,
+       .Trp = 3,
+       .Twr = 1,
+       .CL = 3,
+       .Tr2w = 1,
+       .LoopLatency = 16,
+       .DspOn = 30,
+       .Rloop = 16,
+       .name = "128-bit SDR SGRAM (1:1)",
+};
+
+static const struct aty128_meminfo sdr_64 = {
+       .ML = 4,
+       .MB = 8,
+       .Trcd = 3,
+       .Trp = 3,
+       .Twr = 1,
+       .CL = 3,
+       .Tr2w = 1,
+       .LoopLatency = 17,
+       .DspOn = 46,
+       .Rloop = 17,
+       .name = "64-bit SDR SGRAM (1:1)",
+};
+
+static const struct aty128_meminfo sdr_sgram = {
+       .ML = 4,
+       .MB = 4,
+       .Trcd = 1,
+       .Trp = 2,
+       .Twr = 1,
+       .CL = 2,
+       .Tr2w = 1,
+       .LoopLatency = 16,
+       .DspOn = 24,
+       .Rloop = 16,
+       .name = "64-bit SDR SGRAM (2:1)",
+};
+
+static const struct aty128_meminfo ddr_sgram = {
+       .ML = 4,
+       .MB = 4,
+       .Trcd = 3,
+       .Trp = 3,
+       .Twr = 2,
+       .CL = 3,
+       .Tr2w = 1,
+       .LoopLatency = 16,
+       .DspOn = 31,
+       .Rloop = 16,
+       .name = "64-bit DDR SGRAM",
+};
 
 static struct fb_fix_screeninfo aty128fb_fix = {
        .id             = "ATY Rage128",
@@ -918,7 +965,7 @@ static void __iomem *aty128_find_mem_vbios(struct aty128fb_par *par)
 /* fill in known card constants if pll_block is not available */
 static void aty128_timings(struct aty128fb_par *par)
 {
-#ifdef CONFIG_PPC_OF
+#ifdef CONFIG_PPC
        /* instead of a table lookup, assume OF has properly
         * setup the PLL registers and use their values
         * to set the XCLK values and reference divider values */
@@ -932,7 +979,7 @@ static void aty128_timings(struct aty128fb_par *par)
        if (!par->constants.ref_clk)
                par->constants.ref_clk = 2950;
 
-#ifdef CONFIG_PPC_OF
+#ifdef CONFIG_PPC
        x_mpll_ref_fb_div = aty_ld_pll(X_MPLL_REF_FB_DIV);
        xclk_cntl = aty_ld_pll(XCLK_CNTL) & 0x7;
        Nx = (x_mpll_ref_fb_div & 0x00ff00) >> 8;