]> err.no Git - linux-2.6/blobdiff - drivers/video/pm2fb.c
[PATCH] fbcon: Console Rotation - Add support to rotate the logo
[linux-2.6] / drivers / video / pm2fb.c
index 5dceddedf50752645e1bd781330ec25393594b5f..0277ce031e5e0e3b5e941c71f6d4836ac8c2de3d 100644 (file)
@@ -138,27 +138,27 @@ static struct fb_var_screeninfo pm2fb_var __devinitdata = {
  * Utility functions
  */
 
-inline static u32 RD32(unsigned char __iomem *base, s32 off)
+static inline u32 RD32(unsigned char __iomem *base, s32 off)
 {
        return fb_readl(base + off);
 }
 
-inline static void WR32(unsigned char __iomem *base, s32 off, u32 v)
+static inline void WR32(unsigned char __iomem *base, s32 off, u32 v)
 {
        fb_writel(v, base + off);
 }
 
-inline static u32 pm2_RD(struct pm2fb_par* p, s32 off)
+static inline u32 pm2_RD(struct pm2fb_par* p, s32 off)
 {
        return RD32(p->v_regs, off);
 }
 
-inline static void pm2_WR(struct pm2fb_par* p, s32 off, u32 v)
+static inline void pm2_WR(struct pm2fb_par* p, s32 off, u32 v)
 {
        WR32(p->v_regs, off, v);
 }
 
-inline static u32 pm2_RDAC_RD(struct pm2fb_par* p, s32 idx)
+static inline u32 pm2_RDAC_RD(struct pm2fb_par* p, s32 idx)
 {
        int index = PM2R_RD_INDEXED_DATA;
        switch (p->type) {
@@ -174,7 +174,7 @@ inline static u32 pm2_RDAC_RD(struct pm2fb_par* p, s32 idx)
        return pm2_RD(p, index);
 }
 
-inline static void pm2_RDAC_WR(struct pm2fb_par* p, s32 idx, u32 v)
+static inline void pm2_RDAC_WR(struct pm2fb_par* p, s32 idx, u32 v)
 {
        int index = PM2R_RD_INDEXED_DATA;
        switch (p->type) {
@@ -190,7 +190,7 @@ inline static void pm2_RDAC_WR(struct pm2fb_par* p, s32 idx, u32 v)
        pm2_WR(p, index, v);
 }
 
-inline static void pm2v_RDAC_WR(struct pm2fb_par* p, s32 idx, u32 v)
+static inline void pm2v_RDAC_WR(struct pm2fb_par* p, s32 idx, u32 v)
 {
        pm2_WR(p, PM2VR_RD_INDEX_LOW, idx & 0xff);
        mb();
@@ -200,7 +200,7 @@ inline static void pm2v_RDAC_WR(struct pm2fb_par* p, s32 idx, u32 v)
 #ifdef CONFIG_FB_PM2_FIFO_DISCONNECT
 #define WAIT_FIFO(p,a)
 #else
-inline static void WAIT_FIFO(struct pm2fb_par* p, u32 a)
+static inline void WAIT_FIFO(struct pm2fb_par* p, u32 a)
 {
        while( pm2_RD(p, PM2R_IN_FIFO_SPACE) < a );
        mb();
@@ -1034,7 +1034,6 @@ static struct fb_ops pm2fb_ops = {
        .fb_fillrect    = cfb_fillrect,
        .fb_copyarea    = cfb_copyarea,
        .fb_imageblit   = cfb_imageblit,
-       .fb_cursor      = soft_cursor,
 };
 
 /*
@@ -1121,6 +1120,22 @@ static int __devinit pm2fb_probe(struct pci_dev *pdev,
                default_par->mem_control, default_par->boot_address,
                default_par->mem_config);
 
+       if(default_par->mem_control == 0 &&
+               default_par->boot_address == 0x31 &&
+               default_par->mem_config == 0x259fffff &&
+               pdev->subsystem_vendor == 0x1048 &&
+               pdev->subsystem_device == 0x0a31) {
+               DPRINTK("subsystem_vendor: %04x, subsystem_device: %04x\n",
+                       pdev->subsystem_vendor, pdev->subsystem_device);
+               DPRINTK("We have not been initialized by VGA BIOS "
+                       "and are running on an Elsa Winner 2000 Office\n");
+               DPRINTK("Initializing card timings manually...\n");
+               default_par->mem_control=0;
+               default_par->boot_address=0x20;
+               default_par->mem_config=0xe6002021;
+               default_par->memclock=100000;
+       }
+
        /* Now work out how big lfb is going to be. */
        switch(default_par->mem_config & PM2F_MEM_CONFIG_RAM_MASK) {
        case PM2F_MEM_BANKS_1: