aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/w100fb.c
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
committerJonathan Herman <hermanjl@cs.unc.edu>2013-01-17 16:15:55 -0500
commit8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch)
treea8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /drivers/video/w100fb.c
parent406089d01562f1e2bf9f089fd7637009ebaad589 (diff)
Patched in Tegra support.
Diffstat (limited to 'drivers/video/w100fb.c')
-rw-r--r--drivers/video/w100fb.c36
1 files changed, 17 insertions, 19 deletions
diff --git a/drivers/video/w100fb.c b/drivers/video/w100fb.c
index 7a299e951f7..c8be8af0cc6 100644
--- a/drivers/video/w100fb.c
+++ b/drivers/video/w100fb.c
@@ -33,7 +33,6 @@
33#include <linux/slab.h> 33#include <linux/slab.h>
34#include <linux/string.h> 34#include <linux/string.h>
35#include <linux/vmalloc.h> 35#include <linux/vmalloc.h>
36#include <linux/module.h>
37#include <asm/io.h> 36#include <asm/io.h>
38#include <asm/uaccess.h> 37#include <asm/uaccess.h>
39#include <video/w100fb.h> 38#include <video/w100fb.h>
@@ -54,7 +53,7 @@ static void w100_update_enable(void);
54static void w100_update_disable(void); 53static void w100_update_disable(void);
55static void calc_hsync(struct w100fb_par *par); 54static void calc_hsync(struct w100fb_par *par);
56static void w100_init_graphic_engine(struct w100fb_par *par); 55static void w100_init_graphic_engine(struct w100fb_par *par);
57struct w100_pll_info *w100_get_xtal_table(unsigned int freq); 56struct w100_pll_info *w100_get_xtal_table(unsigned int freq) __devinit;
58 57
59/* Pseudo palette size */ 58/* Pseudo palette size */
60#define MAX_PALETTES 16 59#define MAX_PALETTES 16
@@ -630,7 +629,7 @@ static int w100fb_resume(struct platform_device *dev)
630#endif 629#endif
631 630
632 631
633int w100fb_probe(struct platform_device *pdev) 632int __devinit w100fb_probe(struct platform_device *pdev)
634{ 633{
635 int err = -EIO; 634 int err = -EIO;
636 struct w100fb_mach_info *inf; 635 struct w100fb_mach_info *inf;
@@ -783,7 +782,7 @@ out:
783} 782}
784 783
785 784
786static int w100fb_remove(struct platform_device *pdev) 785static int __devexit w100fb_remove(struct platform_device *pdev)
787{ 786{
788 struct fb_info *info = platform_get_drvdata(pdev); 787 struct fb_info *info = platform_get_drvdata(pdev);
789 struct w100fb_par *par=info->par; 788 struct w100fb_par *par=info->par;
@@ -1021,7 +1020,7 @@ static struct pll_entries {
1021 { 0 }, 1020 { 0 },
1022}; 1021};
1023 1022
1024struct w100_pll_info *w100_get_xtal_table(unsigned int freq) 1023struct w100_pll_info __devinit *w100_get_xtal_table(unsigned int freq)
1025{ 1024{
1026 struct pll_entries *pll_entry = w100_pll_tables; 1025 struct pll_entries *pll_entry = w100_pll_tables;
1027 1026
@@ -1567,18 +1566,6 @@ static void w100_suspend(u32 mode)
1567 val = readl(remapped_regs + mmPLL_CNTL); 1566 val = readl(remapped_regs + mmPLL_CNTL);
1568 val |= 0x00000004; /* bit2=1 */ 1567 val |= 0x00000004; /* bit2=1 */
1569 writel(val, remapped_regs + mmPLL_CNTL); 1568 writel(val, remapped_regs + mmPLL_CNTL);
1570
1571 writel(0x00000000, remapped_regs + mmLCDD_CNTL1);
1572 writel(0x00000000, remapped_regs + mmLCDD_CNTL2);
1573 writel(0x00000000, remapped_regs + mmGENLCD_CNTL1);
1574 writel(0x00000000, remapped_regs + mmGENLCD_CNTL2);
1575 writel(0x00000000, remapped_regs + mmGENLCD_CNTL3);
1576
1577 val = readl(remapped_regs + mmMEM_EXT_CNTL);
1578 val |= 0xF0000000;
1579 val &= ~(0x00000001);
1580 writel(val, remapped_regs + mmMEM_EXT_CNTL);
1581
1582 writel(0x0000001d, remapped_regs + mmPWRMGT_CNTL); 1569 writel(0x0000001d, remapped_regs + mmPWRMGT_CNTL);
1583 } 1570 }
1584} 1571}
@@ -1624,7 +1611,7 @@ static void w100_vsync(void)
1624 1611
1625static struct platform_driver w100fb_driver = { 1612static struct platform_driver w100fb_driver = {
1626 .probe = w100fb_probe, 1613 .probe = w100fb_probe,
1627 .remove = w100fb_remove, 1614 .remove = __devexit_p(w100fb_remove),
1628 .suspend = w100fb_suspend, 1615 .suspend = w100fb_suspend,
1629 .resume = w100fb_resume, 1616 .resume = w100fb_resume,
1630 .driver = { 1617 .driver = {
@@ -1632,7 +1619,18 @@ static struct platform_driver w100fb_driver = {
1632 }, 1619 },
1633}; 1620};
1634 1621
1635module_platform_driver(w100fb_driver); 1622int __init w100fb_init(void)
1623{
1624 return platform_driver_register(&w100fb_driver);
1625}
1626
1627void __exit w100fb_cleanup(void)
1628{
1629 platform_driver_unregister(&w100fb_driver);
1630}
1631
1632module_init(w100fb_init);
1633module_exit(w100fb_cleanup);
1636 1634
1637MODULE_DESCRIPTION("ATI Imageon w100 framebuffer driver"); 1635MODULE_DESCRIPTION("ATI Imageon w100 framebuffer driver");
1638MODULE_LICENSE("GPL"); 1636MODULE_LICENSE("GPL");