Porting OK6410 LCD driver

Publisher:SereneSerenityLatest update time:2024-09-30 Source: cnblogs Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1. In this transplantation process, the linux-2.6.28 lcd driver is selected as a reference and transplanted to the linux-2.6.34 ok6410 development board.


2. Transplantation process


The main idea is to add drivers to the kernel. Add a samsung directory under /driver/video/, extract the driver-related source code in 2.6.28, and copy the source code to samsung.


Modify the Makefile file under /driver/video and add the compilation entry for entering the samsung directory



obj-$(CONFIG_FB_S3C)              += samsung/


Modify the Kconfig file under /driver/video and add the /samsung/Kconfig configuration entry


comment "Frame buffer hardware drivers"

depends on FB

config FB_S3C

tristate "S3C Framebuffer Support"

select FB_CFB_FILLRECT

select FB_CFB_COPYAREA

select FB_CFB_IMAGEBLIT

depends on FB && (ARCH_S3C64XX || ARCH_S5P64XX || ARCH_S5PC1XX)


default n

---help---

TBA


choice

depends on FB_S3C

prompt "Select LCD Type"

default FB_LIYUTAI_WXCAT35


config FB_WXCAT35

bool "WXCAT35 320x240"

---help---

TBA

config FB_WXCAT43

bool "WXCAT43 480x272"

---help---

TBA


config FB_AT056

bool "AT056   640x480"

---help---

TBA

config FB_AT070

bool "AT070   800x480"

---help---

TBA



config FB_AT080

bool "AT080   800x600"

---help---

TBA


config FB_S3C_VGA800

bool "VGA800  800x600"

---help---

TBA

config FB_S3C_XGA

bool "XGA  1024x768"

---help---

TBA


endchoice


config FB_S3C_BPP

tristate "Advanced options for S3C Framebuffer"

depends on FB_S3C

default n

---help---

TBA


choice

depends on FB_S3C_BPP

prompt "Select BPP(Bits Per Pixel)"

default FB_S3C_BPP_16

config FB_S3C_BPP_8

bool "8 BPP"

---help---

TBA


config FB_S3C_BPP_16

bool "16 BPP"

---help---

TBA


config FB_S3C_BPP_24

bool "24 BPP(XRGB888)"

---help---

TBA



config FB_S3C_BPP_28

bool "28 BPP(ARGB4888)"

---help---

TBA


config FB_S3C_BPP_32

bool "32 BPP(ARGB8888)"

---help---

TBA

endchoice


config FB_S3C_NUM

int "Number of Framebuffers"

depends on FB_S3C_BPP && (ARCH_S3C64XX || ARCH_S5P64XX || ARCH_S5PC1XX)

default "1"

---help---

TBA


config FB_S3C_VIRTUAL_SCREEN

bool "Enable Virtual Screen"

depends on FB_S3C_BPP


default n

---help---

TBA


config FB_S3C_DOUBLE_BUFFERING

bool "Enable Double Buffering"

depends on FB_S3C_BPP


default n

---help---

TBA


3. Add platform_device


Find the board file mach-ok6410.c added when porting the system, and add lcd device


/* LCD Controller */


static struct resource s3c_lcd_resource[] = {

[0] = {

.start = S3C64XX_PA_LCD,

.end   = S3C64XX_PA_LCD + SZ_1M - 1,

.flags = IORESOURCE_MEM,

},

[1] = {

.start = IRQ_LCD_VSYNC,

.end   = IRQ_LCD_SYSTEM,

.flags = IORESOURCE_IRQ,

}

};


static u64 s3c_device_lcd_dmamask = 0xffffffffUL;


struct platform_device s3c_device_lcd = {

.name          = "s3c-lcd",

.id          = -1,

.num_resources      = ARRAY_SIZE(s3c_lcd_resource),

.resource      = s3c_lcd_resource,

.dev              = {

.dma_mask        = &s3c_device_lcd_dmamask,

.coherent_dma_mask    = 0xffffffffUL

}

};


Then modify struct platform_device *ok6410_devices[] and add


&s3c_device_lcd,

4. Little penguin appears at startup

Reference address:Porting OK6410 LCD driver

Previous article:LINUX Kernel Porting
Next article:How to start uboot debugging from sdram on ok6410 This is a guess and has not been verified

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号