Solve the Linux driver porting problem of kernel 2.6.24-Linux general technology-Linux programming and kernel information. The following is a detailed description. The project requires VGA display, but after porting the 2.6.24 kernel, I modified the LCD driver and found that the specific effect was not displayed, so I want to test it through my own QQ2440 development board first. Because I bought the QQ2440 Development Board with a 3.5 inch tftscreen, I conducted a 2.6.24 kernel LCD transplant test before yesterday, basically, I did not check the relevant LCD screen manual. I believe that all the content in this article, based on "Linux driver porting and GUI programming under S3C2410", can understand the role of specific registers, this article focuses on the LCD difference section of 2.6.24 to provide a shortcut for friends who have the same problem. First of all, I would like to explain, during kernel compilation, You need to select SMDK2410/A9M2410 from the system type in the S3C2410 Machines. Although the friendly QQ2440 is the s3c2440 ARM, however, if you do not select the above items, a function error will occur during kernel compilation. This is a bug found during 2.6.24 compilation. In addition, pay attention to modifying the driver file of the LCD, because the 2410 option is selected, it needs to be performed on the mach-s3c2410 under the arch/arm/mach-smdk2410.c/file, not the folder of 2440, at first, I had been modifying the mach-smdk2440.c under the folder 2440 and asked the system to print out the information, and found that it was never good, I thought it was the reason for selecting 2410, the following details:
When QQ2440 is released, Kernel 2.6.13 original LCD information is as follows:
This is the detailed configuration in Kernel 2.6.13:
CODE: static struct s3c2410fb_mach_info sbc2440_lcdcfg _ initdata = { . Regs = { . Lcdcon1 = s3c2410_lcdconw.tft16bpp | \ S3c2410_lcdconw.tft | \ S3C2410_LCDCON1_CLKVAL (0x03 ), . Lcdcon2 = S3C2410_LCDCON2_VBPD (3) | \ S3C2410_LCDCON2_LINEVAL (239) | \ S3C2410_LCDCON2_VFPD (5) | \ S3C2410_LCDCON2_VSPW (15 ), . Lcdcon3 = S3C2410_LCDCON3_HBPD (5) | \ S3C2410_LCDCON3_HOZVAL (319) | \ S3C2410_LCDCON3_HFPD (15 ), . Lcdcon4 = S3C2410_LCDCON4_MVAL (13) | \ S3C2410_LCDCON4_HSPW (8 ), . Lcdcon5 = S3C2410_LCDCON5_FRM565 | S3C2410_LCDCON5_INVVLINE | S3C2410_LCDCON5_INVVFRAME | S3C2410_LCDCON5_PWREN | S3C2410_LCDCON5_HWSWP, }, . Lpcsel = 0xf82, . Gpccon = 0xaa955699, . Gpccon_mask = 0xffc003cc, . Gpcup = 0x0000ffff, . Gpcup_mask = 0 xffffffff, . Gpdcon = 0xaa95aaa1, . Gpdcon_mask = 0xffc0fff0, . Gpdup = 0x0000faff, . Gpdup_mask = 0 xffffffff, . Fixed_syncs = 1, . Width = 320, . Size = 240, . Xres = { . Min = 320, . Max = 320, . Defval = 320, }, . Yres = { . Max = 240, . Min = 240, . Defval = 240, }, . Bpp = { . Min = 16, . Max = 16, . Defval = 16, }, }; |