[U-Boot] [PATCH V2 4/4] arm: mx6: cm_fx6: power down sata on OS boot

Nikita Kiryanov
2014-10-29T15:56:24Z

If sata is used by U-Boot, the Linux kernel fails to detect the ssd
correctly afterwards. 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: Igor Grinberg <grinberg@compulab.co.il>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Jeroen Hofstee <jeroen@myspectrum.nl>
Cc: Otavio Salvador <otavio@ossystems.com.br>
---
Changes in V2:
- New patch split off the previous patch.

board/compulab/cm_fx6/cm_fx6.c | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c
index 0206ae8..676de40 100644
--- a/board/compulab/cm_fx6/cm_fx6.c
+++ b/board/compulab/cm_fx6/cm_fx6.c
@@ -15,6 +15,7 @@
#include <netdev.h>
#include <fdt_support.h>
#include <sata.h>
+#include <bootm.h>
#include <asm/arch/crm_regs.h>
#include <asm/arch/sys_proto.h>
#include <asm/arch/iomux.h>
@@ -125,6 +126,11 @@ int sata_initialize(void)

return err;
}
+
+void board_preboot_os(void)
+{
+ cm_fx6_sata_power(0);
+}
#else
static int cm_fx6_setup_issd(void) { return 0; }
#endif
--
1.9.1