X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fvideo%2Ftx3912fb.c;h=07389ba01effa51407d44a022d8a224a99c89b22;hb=16c70f8c1b54b61c3b951b6fb220df250fe09b32;hp=f060c0ac3f89f69aaf17d86f51e6561c1371cbfc;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/drivers/video/tx3912fb.c b/drivers/video/tx3912fb.c index f060c0ac3..07389ba01 100644 --- a/drivers/video/tx3912fb.c +++ b/drivers/video/tx3912fb.c @@ -10,12 +10,10 @@ * * Framebuffer for LCD controller in TMPR3912/05 and PR31700 processors */ -#include #include #include #include #include -#include #include #include #include @@ -35,11 +33,7 @@ static u32 cfb8[16]; static struct fb_fix_screeninfo tx3912fb_fix __initdata = { .id = "tx3912fb", -#ifdef CONFIG_NINO_16MB - .smem_len = (240 * 320), -#else .smem_len = ((240 * 320)/2), -#endif .type = FB_TYPE_PACKED_PIXELS, .visual = FB_VISUAL_TRUECOLOR, .xpanstep = 1, @@ -53,14 +47,10 @@ static struct fb_var_screeninfo tx3912fb_var = { .yres = 320, .xres_virtual = 240, .yres_virtual = 320, -#ifdef CONFIG_NINO_16MB - .bits_per_pixel =8, - .red = { 5, 3, 0 }, /* RGB 332 */ - .green = { 2, 3, 0 }, - .blue = { 0, 2, 0 }, -#else .bits_per_pixel =4, -#endif + .red = { 0, 4, 0 }, /* ??? */ + .green = { 0, 4, 0 }, + .blue = { 0, 4, 0 }, .activate = FB_ACTIVATE_NOW, .width = -1, .height = -1, @@ -98,7 +88,6 @@ static struct fb_ops tx3912fb_ops = { .fb_fillrect = cfb_fillrect, .fb_copyarea = cfb_copyarea, .fb_imageblit = cfb_imageblit, - .fb_cursor = soft_cursor, }; static int tx3912fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) @@ -205,6 +194,8 @@ static int tx3912fb_setcolreg(u_int regno, u_int red, u_int green, return 0; } +int __init tx3912fb_setup(char *options); + /* * Initialization of the framebuffer */ @@ -212,6 +203,11 @@ int __init tx3912fb_init(void) { u_long tx3912fb_paddr = 0; int size = (info->var.bits_per_pixel == 8) ? 256 : 16; + char *option = NULL; + + if (fb_get_options("tx3912fb", &option)) + return -ENODEV; + tx3912fb_setup(option); /* Disable the video logic */ outl(inl(TX3912_VIDEO_CTRL1) & @@ -296,7 +292,7 @@ int __init tx3912fb_init(void) fb_info.var = tx3912fb_var; fb_info.fix = tx3912fb_fix; fb_info.pseudo_palette = pseudo_palette; - fb_info.flags = FBINFO_FLAG_DEFAULT; + fb_info.flags = FBINFO_DEFAULT; /* Clear the framebuffer */ memset((void *) fb_info.fix.smem_start, 0xff, fb_info.fix.smem_len); @@ -326,4 +322,5 @@ int __init tx3912fb_setup(char *options) return 0; } +module_init(tx3912fb_init); MODULE_LICENSE("GPL");