Skip to content

Commit 97ad714

Browse files
committed
add: v2016.05-rc3/0001-mx6ul_14x14_evk-fixes.patch
Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
1 parent 6cbe39e commit 97ad714

File tree

1 file changed

+196
-0
lines changed

1 file changed

+196
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
From 53845a7edaf56cc5c038679f88077d6e74600e80 Mon Sep 17 00:00:00 2001
2+
From: Robert Nelson <robertcnelson@gmail.com>
3+
Date: Thu, 28 Apr 2016 11:31:47 -0500
4+
Subject: [PATCH] mx6ul_14x14_evk fixes
5+
6+
Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
7+
---
8+
drivers/video/ipu_common.c | 2 +-
9+
include/configs/mx6ul_14x14_evk.h | 134 +++++++++++++++++++++++++++++++++-----
10+
2 files changed, 117 insertions(+), 19 deletions(-)
11+
12+
diff --git a/drivers/video/ipu_common.c b/drivers/video/ipu_common.c
13+
index 36d4b23..db50484 100644
14+
--- a/drivers/video/ipu_common.c
15+
+++ b/drivers/video/ipu_common.c
16+
@@ -352,7 +352,7 @@ static int ipu_pixel_clk_set_rate(struct clk *clk, unsigned long rate)
17+
*/
18+
__raw_writel((div / 16) << 16, DI_BS_CLKGEN1(clk->id));
19+
20+
- clk->rate = (u64)(clk->parent->rate * 16) / div;
21+
+ clk->rate = lldiv((u64)(clk->parent->rate * 16), div);
22+
23+
return 0;
24+
}
25+
diff --git a/include/configs/mx6ul_14x14_evk.h b/include/configs/mx6ul_14x14_evk.h
26+
index 15976f7..fdc22db 100644
27+
--- a/include/configs/mx6ul_14x14_evk.h
28+
+++ b/include/configs/mx6ul_14x14_evk.h
29+
@@ -73,22 +73,66 @@
30+
"initrd_high=0xffffffff\0" \
31+
"fdt_file=undefined\0" \
32+
"fdt_addr=0x83000000\0" \
33+
+ "rdaddr=0x83080000\0" \
34+
"boot_fdt=try\0" \
35+
"ip_dyn=yes\0" \
36+
+ "optargs=\0" \
37+
+ "cmdline=\0" \
38+
"videomode=video=ctfb:x:480,y:272,depth:24,pclk:108695,le:8,ri:4,up:2,lo:4,hs:41,vs:10,sync:0,vmode:0\0" \
39+
"mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
40+
"mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \
41+
- "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
42+
+ "mmcroot=" CONFIG_MMCROOT " rootwait ro\0" \
43+
+ "mmcrootfstype=ext4 rootwait\0" \
44+
"mmcautodetect=yes\0" \
45+
"mmcargs=setenv bootargs console=${console},${baudrate} " \
46+
- "root=${mmcroot}\0" \
47+
+ "${optargs} " \
48+
+ "root=${mmcroot} " \
49+
+ "rootfstype=${mmcrootfstype} " \
50+
+ "${cmdline}\0" \
51+
"loadbootscript=" \
52+
- "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
53+
+ "load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
54+
"bootscript=echo Running bootscript from mmc ...; " \
55+
"source\0" \
56+
- "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
57+
- "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
58+
- "mmcboot=echo Booting from mmc ...; " \
59+
+ "loadimage=load mmc ${bootpart} ${loadaddr} ${bootdir}/${bootfile}\0" \
60+
+ "loadrd=load mmc ${bootpart} ${rdaddr} ${bootdir}/${rdfile}; setenv rdsize ${filesize}\0" \
61+
+ "loadfdt=echo loading ${fdtdir}/${fdt_file} ...; load mmc ${bootpart} ${fdt_addr} ${fdtdir}/${fdt_file}\0" \
62+
+ "mmcboot=mmc dev ${mmcdev}; " \
63+
+ "if mmc rescan; then " \
64+
+ "echo SD/MMC found on device ${mmcdev};" \
65+
+ "setenv bootpart ${mmcdev}:1; " \
66+
+ "echo Checking for: /uEnv.txt ...;" \
67+
+ "if test -e mmc ${bootpart} /uEnv.txt; then " \
68+
+ "load mmc ${bootpart} ${loadaddr} /uEnv.txt;" \
69+
+ "env import -t ${loadaddr} ${filesize};" \
70+
+ "echo Loaded environment from /uEnv.txt;" \
71+
+ "echo Checking if uenvcmd is set ...;" \
72+
+ "if test -n ${uenvcmd}; then " \
73+
+ "echo Running uenvcmd ...;" \
74+
+ "run uenvcmd;" \
75+
+ "fi;" \
76+
+ "fi; " \
77+
+ "echo Checking for: /boot/uEnv.txt ...;" \
78+
+ "for i in 1 2 3 4 5 6 7 ; do " \
79+
+ "setenv mmcpart ${i};" \
80+
+ "setenv bootpart ${mmcdev}:${mmcpart};" \
81+
+ "if test -e mmc ${bootpart} /boot/uEnv.txt; then " \
82+
+ "load mmc ${bootpart} ${loadaddr} /boot/uEnv.txt;" \
83+
+ "env import -t ${loadaddr} ${filesize};" \
84+
+ "echo Loaded environment from /boot/uEnv.txt;" \
85+
+ "if test -n ${dtb}; then " \
86+
+ "setenv fdt_file ${dtb};" \
87+
+ "echo Using: dtb=${fdt_file} ...;" \
88+
+ "fi;" \
89+
+ "echo Checking if uname_r is set in /boot/uEnv.txt...;" \
90+
+ "if test -n ${uname_r}; then " \
91+
+ "echo Running uname_boot ...;" \
92+
+ "setenv mmcroot /dev/mmcblk${mmcdev}p${mmcpart} ro;" \
93+
+ "run uname_boot;" \
94+
+ "fi;" \
95+
+ "fi;" \
96+
+ "done;" \
97+
+ "fi;\0" \
98+
+ "mmcboot_old=echo Booting from mmc ...; " \
99+
"run mmcargs; " \
100+
"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
101+
"if run loadfdt; then " \
102+
@@ -127,6 +171,70 @@
103+
"else " \
104+
"bootz; " \
105+
"fi;\0" \
106+
+ "uname_boot="\
107+
+ "setenv bootdir /boot; " \
108+
+ "setenv bootfile vmlinuz-${uname_r}; " \
109+
+ "if test -e mmc ${bootpart} ${bootdir}/${bootfile}; then " \
110+
+ "echo loading ${bootdir}/${bootfile} ...; "\
111+
+ "run loadimage;" \
112+
+ "setenv fdtdir /boot/dtbs/${uname_r}; " \
113+
+ "if test -e mmc ${bootpart} ${fdtdir}/${fdt_file}; then " \
114+
+ "run loadfdt;" \
115+
+ "else " \
116+
+ "setenv fdtdir /usr/lib/linux-image-${uname_r}; " \
117+
+ "if test -e mmc ${bootpart} ${fdtdir}/${fdt_file}; then " \
118+
+ "run loadfdt;" \
119+
+ "else " \
120+
+ "setenv fdtdir /lib/firmware/${uname_r}/device-tree; " \
121+
+ "if test -e mmc ${bootpart} ${fdtdir}/${fdt_file}; then " \
122+
+ "run loadfdt;" \
123+
+ "else " \
124+
+ "setenv fdtdir /boot/dtb-${uname_r}; " \
125+
+ "if test -e mmc ${bootpart} ${fdtdir}/${fdt_file}; then " \
126+
+ "run loadfdt;" \
127+
+ "else " \
128+
+ "setenv fdtdir /boot/dtbs; " \
129+
+ "if test -e mmc ${bootpart} ${fdtdir}/${fdt_file}; then " \
130+
+ "run loadfdt;" \
131+
+ "else " \
132+
+ "setenv fdtdir /boot/dtb; " \
133+
+ "if test -e mmc ${bootpart} ${fdtdir}/${fdt_file}; then " \
134+
+ "run loadfdt;" \
135+
+ "else " \
136+
+ "setenv fdtdir /boot; " \
137+
+ "if test -e mmc ${bootpart} ${fdtdir}/${fdt_file}; then " \
138+
+ "run loadfdt;" \
139+
+ "else " \
140+
+ "echo; echo unable to find ${fdt_file} ...; echo booting legacy ...;"\
141+
+ "run mmcargs;" \
142+
+ "echo debug: [${bootargs}] ... ;" \
143+
+ "echo debug: [bootz ${loadaddr}] ... ;" \
144+
+ "bootz ${loadaddr}; " \
145+
+ "fi;" \
146+
+ "fi;" \
147+
+ "fi;" \
148+
+ "fi;" \
149+
+ "fi;" \
150+
+ "fi;" \
151+
+ "fi; " \
152+
+ "setenv rdfile initrd.img-${uname_r}; " \
153+
+ "if test -e mmc ${bootpart} ${bootdir}/${rdfile}; then " \
154+
+ "echo loading ${bootdir}/${rdfile} ...; "\
155+
+ "run loadrd;" \
156+
+ "if test -n ${uuid}; then " \
157+
+ "setenv mmcroot UUID=${uuid} ro;" \
158+
+ "fi;" \
159+
+ "run mmcargs;" \
160+
+ "echo debug: [${bootargs}] ... ;" \
161+
+ "echo debug: [bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdt_addr}] ... ;" \
162+
+ "bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdt_addr}; " \
163+
+ "else " \
164+
+ "run mmcargs;" \
165+
+ "echo debug: [${bootargs}] ... ;" \
166+
+ "echo debug: [bootz ${loadaddr} - ${fdt_addr}] ... ;" \
167+
+ "bootz ${loadaddr} - ${fdt_addr}; " \
168+
+ "fi;" \
169+
+ "fi;\0" \
170+
"findfdt="\
171+
"if test $fdt_file = undefined; then " \
172+
"if test $board_name = EVK && test $board_rev = 9X9; then " \
173+
@@ -138,18 +246,8 @@
174+
"fi;\0" \
175+
176+
#define CONFIG_BOOTCOMMAND \
177+
- "run findfdt;" \
178+
- "mmc dev ${mmcdev};" \
179+
- "mmc dev ${mmcdev}; if mmc rescan; then " \
180+
- "if run loadbootscript; then " \
181+
- "run bootscript; " \
182+
- "else " \
183+
- "if run loadimage; then " \
184+
- "run mmcboot; " \
185+
- "else run netboot; " \
186+
- "fi; " \
187+
- "fi; " \
188+
- "else run netboot; fi"
189+
+ "run findfdt; " \
190+
+ "run mmcboot; "
191+
192+
/* Miscellaneous configurable options */
193+
#define CONFIG_SYS_MEMTEST_START 0x80000000
194+
--
195+
2.8.0.rc3
196+

0 commit comments

Comments
 (0)