sm501fb: Ensure panel interface is not tristated when setup
authorBen Dooks <[email protected]>
Tue, 16 Oct 2007 08:28:39 +0000 (01:28 -0700)
committerLinus Torvalds <[email protected]>
Tue, 16 Oct 2007 16:43:14 +0000 (09:43 -0700)
When we setup the panel interface whilst configuring the
framebuffer, we should ensure the panel interface is not
in tristate, in case the bootloader or previous setup has
not enabled it.

Signed-off-by: Ben Dooks <[email protected]>
Signed-off-by: Antonino Daplas <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
drivers/video/sm501fb.c
include/linux/sm501-regs.h

index d97edd7a6e415949384f5f216905fe45cc557017..1be95a68d69678d4ba05400bedd506467826cb99 100644 (file)
@@ -777,6 +777,11 @@ static int sm501fb_set_par_pnl(struct fb_info *info)
        writel(control, fbi->regs + SM501_DC_PANEL_CONTROL);
        sm501fb_sync_regs(fbi);
 
+       /* ensure the panel interface is not tristated at this point */
+
+       sm501_modify_reg(fbi->dev->parent, SM501_SYSTEM_CONTROL,
+                        0, SM501_SYSCTRL_PANEL_TRISTATE);
+
        /* power the panel up */
        sm501fb_panel_power(fbi, 1);
        return 0;
index 014e73b31fc0ce92005f39c3bb00542c371729d8..df7620dd8f3181133e6818a062cd85347c5e084d 100644 (file)
 
 /* config 1 */
 #define SM501_SYSTEM_CONTROL           (0x000000)
+
+#define SM501_SYSCTRL_PANEL_TRISTATE   (1<<0)
+#define SM501_SYSCTRL_MEM_TRISTATE     (1<<1)
+#define SM501_SYSCTRL_CRT_TRISTATE     (1<<2)
+
+#define SM501_SYSCTRL_PCI_SLAVE_BURST_MASK (3<<4)
+#define SM501_SYSCTRL_PCI_SLAVE_BURST_1        (0<<4)
+#define SM501_SYSCTRL_PCI_SLAVE_BURST_2        (1<<4)
+#define SM501_SYSCTRL_PCI_SLAVE_BURST_4        (2<<4)
+#define SM501_SYSCTRL_PCI_SLAVE_BURST_8        (3<<4)
+
+#define SM501_SYSCTRL_PCI_CLOCK_RUN_EN (1<<6)
+#define SM501_SYSCTRL_PCI_RETRY_DISABLE        (1<<7)
+#define SM501_SYSCTRL_PCI_SUBSYS_LOCK  (1<<11)
+#define SM501_SYSCTRL_PCI_BURST_READ_EN        (1<<15)
+
+/* miscellaneous control */
+
 #define SM501_MISC_CONTROL             (0x000004)
 
 #define SM501_MISC_BUS_SH              (0x0)