Commit 44b9841d7898a03e73b5054f56303514a5b35db8
Committed by
Stefano Babic
1 parent
9cad354425
Exists in
v2017.01-smarct4x
and in
37 other branches
arm: imx: stop sata on boot
Ideally, the Linux kernel should get the hardware in its most untouched state. For the most part, U-Boot does not reset the various subsystems it touches before boot, and usually Linux deals with it, but on some boards (cm_fx6) the Linux kernel fails to detect the ssd correctly if sata is used by U-Boot. Power off sata on OS boot so that Linux will have a clean state to work with. Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il> Cc: Stefano Babic <sbabic@denx.de>
Showing 1 changed file with 6 additions and 2 deletions Side-by-side Diff
arch/arm/imx-common/cpu.c
... | ... | @@ -18,6 +18,7 @@ |
18 | 18 | #include <asm/arch/crm_regs.h> |
19 | 19 | #include <ipu_pixfmt.h> |
20 | 20 | #include <thermal.h> |
21 | +#include <sata.h> | |
21 | 22 | |
22 | 23 | #ifdef CONFIG_FSL_ESDHC |
23 | 24 | #include <fsl_esdhc.h> |
24 | 25 | |
25 | 26 | |
26 | 27 | |
... | ... | @@ -201,13 +202,16 @@ |
201 | 202 | return get_periph_clk() / (ahb_podf + 1); |
202 | 203 | } |
203 | 204 | |
204 | -#if defined(CONFIG_VIDEO_IPUV3) | |
205 | 205 | void arch_preboot_os(void) |
206 | 206 | { |
207 | +#if defined(CONFIG_CMD_SATA) | |
208 | + sata_stop(); | |
209 | +#endif | |
210 | +#if defined(CONFIG_VIDEO_IPUV3) | |
207 | 211 | /* disable video before launching O/S */ |
208 | 212 | ipuv3_fb_shutdown(); |
209 | -} | |
210 | 213 | #endif |
214 | +} | |
211 | 215 | |
212 | 216 | void set_chipselect_size(int const cs_size) |
213 | 217 | { |