JZ2440 V3版 4 3寸LCD驅動 上

2021-08-20 11:23:30 字數 3915 閱讀 7132

在linux-2.6.22.6/arch/arm/mach-s3c2440/mach-smdk2440.c找到mach-smdk2440.c這個檔案,開啟檔案,找到如的**段:

/* 240x320 */

static struct s3c2410fb_mach_info smdk2440_lcd_cfg __initdata = , , ,

};#define ucon s3c2410_ucon_default | s3c2410_ucon_uclk

#define ulcon s3c2410_lcon_cs8 | s3c2410_lcon_pnone | s3c2410_lcon_stopb

#define ufcon s3c2410_ufcon_rxtrig8 | s3c2410_ufcon_fifomode

static struct s3c2410_uartcfg smdk2440_uartcfgs __initdata = ,

[1] = ,

/* ir port */

[2] =

};/* lcd driver info */

static struct s3c2410fb_mach_info smdk2440_lcd_cfg_1024x768 __initdata = ,

.lpcsel = 0xf82,

.gpccon = 0xaa955699,

.gpccon_mask = 0xffc003cc,

.gpcup = 0x0000ffff,

.gpcup_mask = 0xffffffff,

.gpdcon = 0xaa95aaa1,

.gpdcon_mask = 0xffc0fff0,

.gpdup = 0x0000faff,

.gpdup_mask = 0xffffffff,

.fixed_syncs = 1,

.type = s3c2410_lcdcon1_tft,

.width = 1024,

.height = 768,

.xres = ,

.yres = ,

.bpp = ,

};/* 240x320 */

static struct s3c2410fb_mach_info smdk2440_lcd_cfg_240x320 __initdata = ,

.gpccon = 0xaaaa56aa,

.gpccon_mask = 0xffffffff,

.gpcup = 0xffffffff,

.gpcup_mask = 0xffffffff,

.gpdcon = 0xaaaaaaaa,

.gpdcon_mask = 0xffffffff,

.gpdup = 0xffffffff,

.gpdup_mask = 0xffffffff,

.fixed_syncs = 1,

.type = s3c2410_lcdcon1_tft,

.width = 240,

.height = 320,

.xres = ,

.yres = ,

.bpp = ,

};/* 480x272 */

static struct s3c2410fb_mach_info smdk2440_lcd_cfg __initdata = ,

.gpccon = 0xaaaa56aa,

.gpccon_mask = 0xffffffff,

.gpcup = 0xffffffff,

.gpcup_mask = 0xffffffff,

.gpdcon = 0xaaaaaaaa,

.gpdcon_mask = 0xffffffff,

.gpdup = 0xffffffff,

.gpdup_mask = 0xffffffff,

.fixed_syncs = 1,

.type = s3c2410_lcdcon1_tft,

.width = 480,

.height = 272,

.xres = ,

.yres = ,

.bpp = ,

};/* 320x240 */

static struct s3c2410fb_mach_info smdk2440_lcd_cfg_320x240 __initdata = ,

.gpccon = 0xaaaa56aa,

.gpccon_mask = 0xffffffff,

.gpcup = 0xffffffff,

.gpcup_mask = 0xffffffff,

.gpdcon = 0xaaaaaaaa,

.gpdcon_mask = 0xffffffff,

.gpdup = 0xffffffff,

.gpdup_mask = 0xffffffff,

.fixed_syncs = 1,

.type = s3c2410_lcdcon1_tft,

.width = 320,

.height = 240,

.xres = ,

.yres = ,

.bpp = ,

};/* sdi */

static struct resource s3c2440_sdi_resource = ,

[1] =

};static struct platform_device s3c2440_device_sdi = ;

static struct platform_device *smdk2440_devices __initdata = ;

static void __init smdk2440_map_io(void)

static void __init smdk2440_machine_init(void)

machine_start(s3c2440, "smdk2440")

/* maintainer: ben dooks */

.phys_io = s3c2410_pa_uart,

.io_pg_offst = (((u32)s3c24xx_va_uart) >> 18) & 0xfffc,

.boot_params = s3c2410_sdram_pa + 0x100,

.init_irq = s3c24xx_init_irq,

.map_io = smdk2440_map_io,

.init_machine = smdk2440_machine_init,

.timer = &s3c24xx_timer,

machine_end

儲存為4.3寸lcd_mach-smdk2440.c好檔案備用,然後把未經修改的核心原始碼linux-2.6.22.6.tar.bz2、linux-2.6.22.6_jz2440.patch、4.3寸lcd_mach-smdk2440.c這三個檔案放到/work/system目錄下。

1.tar xjf linux-2.6.22.6.tar.bz2 ,cd linux-2.6.22.6

2. patch -p1 < ../linux-2.6.22.6_jz2440.patch

3.mv ../4.3寸lcd_mach-smdk2440.c arch/arm/mach-s3c2440/mach-smdk2440.c

4.cp config_ok .config

5.make uimage

這樣就生成了支援4.3寸lcd的uimage.

JZ2440開發筆記(3) 配置TFTP

1.關閉ubuntu的防火牆 ufw disable 2.解除安裝了iptables apt get remove iptables 1.用iptables f這個命令來關閉防火牆,但是使用這個命令前,千萬記得用iptables l檢視一下你的系統中所有鏈的預設target,iptables f這個...

JZ2440攝像頭驅動1 V4L2框架分析學習筆記

1 對於複雜的字元裝置驅動程式 以lcd為例 引入分層的概念 1 上層fbmem.c 對於lcd驅動程式來說,核心已經幫我們做好了,這個fbmem.c是核心提供的 2 我們要做的是硬體相關這一層 分配 設定 註冊fb info結構體,這裡的註冊是把這個結構體告訴fbmem.c,當應用程式呼叫讀寫等函...

jsapi微信支付v3版

v2還是 v3。在這裡整理的是 v3的,v2的同學請忽略!前期準備須要用的是商戶證書,用的是 p12的。設定 api金鑰 jsapi 授權資料夾 1.openid 授權完 你的 url response type code scope snsapi userinfo state 1 wechat r...