imx6 uboot splash image
跟踪uboot代码,了解imx6 splash image的生成过程。
涉及文件:
./cpu/arm_cortexa8/start.S
./board/freescale/mx6q_sabresd/mx6q_sabresd.c
./board/freescale/commom/fsl_bmp_reversed_600x400.c
/* 汇编调用C语言 */
./cpu/arm_cortexa8/start.S:
ldr pc, _start_armboot @ jump to C code ------+
|
lib_arm/board.c <-----+
start_armboot(void)
{
......
/* 一系列初始化 */
for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) { ---+
if ((*init_fnc_ptr)() != 0) { |
hang (); |
} |
} |
...... |
|
#if defined CONFIG_SPLASH_SCREEN && defined CONFIG_VIDEO_MX5 |
setup_splash_image(); --------------------|-+
#endif | |
...... | |
} | |
| |
init_fnc_t *init_sequence[] = { <--------+ |
#if defined(CONFIG_ARCH_CPU_INIT) |
arch_cpu_init, /* basic arch cpu dependent setup */ |
#endif |
board_init, /* basic board dependent setup */ ------+ |
#if defined(CONFIG_USE_IRQ) | |
interrupt_init, /* set up exceptions */ | |
#endif | |
timer_init, /* initialize timer */ | |
env_init, /* initialize environment */ | |
init_baudrate, /* initialze baudrate settings */ | |
serial_init, /* serial communications setup */ | |
console_init_f, /* stage 1 init of console */ | |
display_banner, /* say that we are here */ | |
#if defined(CONFIG_DISPLAY_CPUINFO) | |
print_cpuinfo, /* display cpu info (and speed) */ | |
#endif | |
#if defined(CONFIG_DISPLAY_BOARDINFO) | |
checkboard, /* display board info */ | |
#endif | |
#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SOFT_I2C) | |
init_func_i2c, | |
#endif | |
dram_init, /* configure available RAM banks */ | |
#if defined(CONFIG_CMD_PCI) || defined (CONFIG_PCI) | |
arm_pci_init, | |
#endif | |
display_dram_config, | |
NULL, | |
}; | |
| |
/* imx6初始化文件 */ | |
board/freescale/mx6q_sabresd/mx6q_sabresd.c | |
int board_init(void) <-----+ |
{ |
/* need set Power Supply Glitch to 0x41736166 |
*and need clear Power supply Glitch Detect bit |
* when POR or reboot or power on Otherwise system |
*could not be power off anymore*/ |
u32 reg; |
writel(0x41736166, SNVS_BASE_ADDR + 0x64);/*set LPPGDR*/ |
udelay(10); |
reg = readl(SNVS_BASE_ADDR + 0x4c); |
reg |= (1 << 3); |
writel(reg, SNVS_BASE_ADDR + 0x4c);/*clear LPSR*/ |
|
mxc_iomux_v3_init((void *)IOMUXC_BASE_ADDR); |
setup_boot_device(); |
fsl_set_system_rev(); |
|
/* board id for linux */ |
gd->bd->bi_arch_number = MACH_TYPE_MX6Q_SABRESD; |
|
/* address of boot parameters */ |
gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100; |
|
setup_uart(); |
#ifdef CONFIG_DWC_AHSATA |
if (cpu_is_mx6q()) |
setup_sata(); |
#endif |
|
#ifdef CONFIG_VIDEO_MX5 |
/* Enable lvds power */ |
// setup_lvds_poweron(); |
|
panel_info_init(); -------------------+ |
| |
gd->fb_base = CONFIG_FB_BASE; | |
#ifdef CONFIG_ARCH_MMU | |
gd->fb_base = ioremap_nocache(iomem_to_phys(gd->fb_base), 0); | |
#endif | |
#endif | |
| |
#ifdef CONFIG_NAND_GPMI | |
// setup_gpmi_nand(); | |
#endif | |
| |
#if defined(CONFIG_ENET_RMII) && !defined(CONFIG_DWC_AHSATA) | |
setup_fec(); | |
#endif | |
| |
#ifdef CONFIG_MXC_EPDC | |
setup_epdc(); -------------------+ |
#endif | | |
return 0; | | |
} | | |
| | |
#ifdef CONFIG_VIDEO_MX5 | | |
void panel_info_init(void) <-------+ | |
{ | |
panel_info.vl_bpix = LCD_BPP; //屏幕颜色深度 | |
panel_info.vl_col = lvds_xga.xres; //屏幕尺寸 | |
panel_info.vl_row = lvds_xga.yres; //屏幕尺寸 | |
panel_info.cmap = colormap; | |
} | |
#endif | |
| |
static void setup_epdc(void) <-----------------------+ |
{ |
unsigned int reg; |
|
/*** epdc Maxim PMIC settings ***/ |
|
/* EPDC PWRSTAT - GPIO2[21] for PWR_GOOD status */ |
mxc_iomux_v3_setup_pad(MX6DL_PAD_EIM_A17__GPIO_2_21); |
|
/* EPDC VCOM0 - GPIO3[17] for VCOM control */ |
mxc_iomux_v3_setup_pad(MX6DL_PAD_EIM_D17__GPIO_3_17); |
|
/* UART4 TXD - GPIO3[20] for EPD PMIC WAKEUP */ |
mxc_iomux_v3_setup_pad(MX6DL_PAD_EIM_D20__GPIO_3_20); |
|
/* EIM_A18 - GPIO2[20] for EPD PWR CTL0 */ |
mxc_iomux_v3_setup_pad(MX6DL_PAD_EIM_A18__GPIO_2_20); |
|
/*** Set pixel clock rates for EPDC ***/ |
|
/* EPDC AXI clk (IPU2_CLK) from PFD_400M, set to 396/2 = 198MHz */ |
reg = readl(CCM_BASE_ADDR + CLKCTL_CSCDR3); |
reg &= ~0x7C000; |
reg |= (1 << 16) | (1 << 14); |
writel(reg, CCM_BASE_ADDR + CLKCTL_CSCDR3); |
|
/* EPDC AXI clk enable */ |
reg = readl(CCM_BASE_ADDR + CLKCTL_CCGR3); |
reg |= 0x00C0; |
writel(reg, CCM_BASE_ADDR + CLKCTL_CCGR3); |
|
/* EPDC PIX clk (IPU2_DI1_CLK) from PLL5, set to 650/4/6 = ~27MHz */ |
reg = readl(CCM_BASE_ADDR + CLKCTL_CSCDR2); |
reg &= ~0x3FE00; |
reg |= (2 << 15) | (5 << 12); |
writel(reg, CCM_BASE_ADDR + CLKCTL_CSCDR2); |
|
/* PLL5 enable (defaults to 650) */ |
reg = readl(ANATOP_BASE_ADDR + ANATOP_PLL_VIDEO); |
reg &= ~((1 << 16) | (1 << 12)); |
reg |= (1 << 13); |
writel(reg, ANATOP_BASE_ADDR + ANATOP_PLL_VIDEO); |
|
/* EPDC PIX clk enable */ |
reg = readl(CCM_BASE_ADDR + CLKCTL_CCGR3); |
reg |= 0x0C00; |
writel(reg, CCM_BASE_ADDR + CLKCTL_CCGR3); |
|
panel_info.epdc_data.working_buf_addr = CONFIG_WORKING_BUF_ADDR; |
panel_info.epdc_data.waveform_buf_addr = CONFIG_WAVEFORM_BUF_ADDR; |
|
panel_info.epdc_data.wv_modes.mode_init = 0; |
panel_info.epdc_data.wv_modes.mode_du = 1; |
panel_info.epdc_data.wv_modes.mode_gc4 = 3; |
panel_info.epdc_data.wv_modes.mode_gc8 = 2; |
panel_info.epdc_data.wv_modes.mode_gc16 = 2; |
panel_info.epdc_data.wv_modes.mode_gc32 = 2; |
|
panel_info.epdc_data.epdc_timings = panel_timings; |
|
setup_epdc_power(); |
|
/* Assign fb_base */ |
gd->fb_base = CONFIG_FB_BASE; |
} |
|
#ifdef CONFIG_SPLASH_SCREEN |
void setup_splash_image(void) <-------------------------+
{
char *s;
ulong addr;
s = getenv("splashimage");
if (s != NULL) {
addr = simple_strtoul(s, NULL, 16);
#if defined(CONFIG_ARCH_MMU)
addr = ioremap_nocache(iomem_to_phys(addr),
fsl_bmp_reversed_600x400_size);
#endif
/* 显示uboot图片 */
memcpy((char *)addr, (char *)fsl_bmp_reversed_600x400, ----+
fsl_bmp_reversed_600x400_size); |
} |
} |
#endif |
/* bmp文件生成的源文件 */ |
board/freescale/commom/fsl_bmp_reversed_600x400.c |
const unsigned char fsl_bmp_reversed_600x400[] = { <-----+
......
}
Author
Tony Liu
2016-8-9, Shenzhen
imx6 uboot splash image的更多相关文章
- imx6 uboot lcd
本文记录imx6 uboot中关于lcd初始化的过程. uboot中相关的文件: cpu/arm_cortexa8/start.S lib_arm/board.c board/freescale/mx ...
- imx6 uboot lvds clock
在uboot中添加logo,lvds接口的lcd显示不正常,出现波动.网上说是lvds时钟频率的问题. 使用示波器测量之后,发现频率是60M,而lcd最大频率才46.8M. 因此就需要更改uboot中 ...
- imx6 uboot启动流程分析
参考http://blog.csdn.net/skyflying2012/article/details/25804209 这里以imx6平台为例,分析uboot启动流程对于任何程序,入口函数是在链接 ...
- imx6 uboot saveenv fail
uboot设置环境变量之后,不能保存在EMMC中,出现错误. MX6SDL SABRESD U-Boot > saveenv Saving Environment to SPI Flash... ...
- imx6 u-boot.bin 和 u-boot.imx
有些MFG TOOL烧录工具使用了u-boot.imx,而不是原来的u-boot.bin文件进行烧录. 这两个镜像的区别是,u-boot.bin文件编译后,会在u-boot.bin的开头添加一个大小为 ...
- imx6 uboot logo 更改
最近需要更改im6 uboot的开机logo,使用10.1inch, 1024x600,18bit的LCD,期间遇到了很多的问题,记录于此. 参考链接 https://community.nxp.co ...
- iMX6QD How to Add 24-bit LVDS Support in Android
iMX6QD How to Add 24-bit LVDS Support in Android 版本 4 由 Ying Liu 于 2012-10-14 下午11:52创建,最后由 Jodi Pau ...
- imx6 Image Vector Table (IVT)
imx6开启启动之后,运行板子上的ROM程序.ROM确定启动的设备,进行一些初始化,然后读取IVT,进行寄存器初始化,最后运行uboot/cpu/arm_cortexa8/start.S中的_star ...
- imx6 RGB LCD
imx6dl需要支持lcd接口的屏,imx6dl的datasheet并没有明确的说明lcd相关的配置,只在Display Content Integrity Checker (DCIC)一章中介绍.本 ...
随机推荐
- es5||es6 - array
导航目录 /** * javascript - array * * ES5: * join() * push() * pop() * shift() * unshift() * sort() * re ...
- tomcat服务器开启gzip功能的方法
http://blog.csdn.net/wang_159369/article/details/8107163 tomcat5.0以后的版本是支持对输出内容进行gzip格式的压缩的.该功能默认是关闭 ...
- Vue中使用节流Lodash throttle
在Vue中,有时需要对ajax请求提交进行节流操作.这时候,如果页面在请求成功之后会跳转,使用vue指令once或者加载一个loading遮罩禁止点击即可,但如果请求之后不跳转,并且loading不适 ...
- cookie 封装
1.代码 ;(function (factory) { var registeredInModuleLoader; if (typeof define === 'function' && ...
- 【转发】未能加载文件或程序集“Oracle.DataAccess”或它的某一个依赖项。试图加载格式不正确的程序。
http://www.cnblogs.com/joey0210/archive/2012/09/29/2708420.html 上一篇文章说到了DLL引用问题,主要是说的程序中如果使用过了反射, ...
- Spring 泛型依赖注入
BaseService<T>:有RoleService和UserService两的子类 BaseRepepositry<T>:有UserRepository和RoleRepos ...
- Git-学习笔记(常用命令集合)
这里引用一下百度百科里Git的内容: Git --- The stupid content tracker, 傻瓜内容跟踪器.Linus Torvalds 是这样给我们介绍 Git 的. Git 是用 ...
- cxf利用接口规范写法发布webservice
package cn.itcast.cxf; import javax.jws.WebService; @WebService public interface IHelloService { pub ...
- cxf 生成客户端代码调用服务
cxf是另一种发布webservice的方式,与jdk提供的相比 jdk提供的是wsimport cxf 提供的是 wsdl2java- d 地址 根据http://www.cnblogs.com/f ...
- 【LeetCode】99. Recover Binary Search Tree
Recover Binary Search Tree Two elements of a binary search tree (BST) are swapped by mistake. Recove ...