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)一章中介绍.本 ...
随机推荐
- 将图片转成base64字符串并在JSP页面显示的Java代码
*本事例主要讲了如下几点: * 1:将图片转换为BASE64加密字符串. * 2:将图片流转换为BASE64加密字符串. * 3:将BASE64加密字符串转换为图片. * 4:在jsp文件中以引 ...
- Redhat 5禁止IPv6
Redhat 5禁止IPv6 IPv6还没有全然普及,可是安装完系统之后IPv6是有效的,在一定程度上影响网络性能,所以在我们在全然不使用IPv6的情况下.最好关闭IPv6.如今我们就在本文以完整的 ...
- linux内核学习推荐书籍
<UNIX环境高级编程>,推荐指数:★★★★★ <UNIX环境高级编程>是 Unix/ Linux 程序员案头必备的一本书籍.可以说,Linux 程序员如果没有读过这本书,就好 ...
- 几种通讯协议的比较RMI > Httpinvoker >= Hessian >> Burlap >> web service (转)
一.综述 本文比较了RMI,Hessian,Burlap,Httpinvoker,web service等5种通讯协议的在不同的数据结构和不同数据量时的传输性能.RMI是java语言本身提供的通讯协议 ...
- 系统学习NIO
概述 适用于有一定编程基础的朋友,想系统学习NIO这块知识的朋友.知识点大体分3块:1:>概念了解(各类IO) 2>NIO的核心(缓存区,通道等) 3>网络IO 详细 代码下载:ht ...
- KeyboardJS - "构建你的应用吧,我会处理按键"
KeyboardJS - "构建你的应用吧,我会处理按键" 太阳火神的漂亮人生 (http://blog.csdn.net/opengl_es) 本文遵循"署名-非商业 ...
- centos时间调整的操作(转)
在我们使用CentOS系统的时候,也许时区经常会出现问题,有时候改完之后还是会出错,下面我们就来学习一种方法来改变这个状况. 如果没有安装,而你使用的是 CentOS系统 那使用命令 yum ins ...
- unity, 替换shader渲染(Rendering with Replaced Shaders)
实现特效,尤其是一些后处理特效,经常需要将各物体的shader替换为另一套shader进行渲染到纹理,再后再进行合成或以某种叠加方式叠加到最后的画面上去. 再复杂一点儿的,可能不同的物体所用的替换sh ...
- python随机数seed用法
import random ... def main(): a = random.Random() a.seed(1) print a.random() 这样就可以通过种子取得固定随机值了 网上很多只 ...
- C++ string long double转char*
long long q = 10; ]; char* output; sprintf(s, "%ld", q); output = s; double ]; sprintf(s1, ...