arm:reset: call the reset_misc() before the cpu reset
authorPrzemyslaw Marczak <p.marczak@samsung.com>
Tue, 3 Jun 2014 12:05:45 +0000 (14:05 +0200)
committerPrzemyslaw Marczak <p.marczak@samsung.com>
Wed, 6 Aug 2014 12:10:25 +0000 (14:10 +0200)
On an Odroid U3 board, the SOC is unable to reset the eMMC card
in the DWMMC mode by the cpu software reset. Manual reset of the card
by switching proper gpio pin - fixes this issue.

Such solution needs to add a call to pre reset function.
This is done by the reset_misc() function, which is called before reset_cpu().
The function reset_misc() is a weak function.

Change-Id: I16d619eafcc54b7b57c81e46b6bd49934d0ce943
Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Cc: Tom Rini <trini@ti.com>
Changes v4:
- arch/arm/reset: fix weak function attribute to proper style

arch/arm/lib/reset.c
include/common.h

index 7a0358071ced67b39f7f9f77cf261c827659e276..9a95f085044ade0c8f62fe489263c455b08df221 100644 (file)
 
 #include <common.h>
 
+__weak void reset_misc(void)
+{
+}
+
 int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
        puts ("resetting ...\n");
@@ -30,6 +34,8 @@ int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
        udelay (50000);                         /* wait 50 ms */
 
        disable_interrupts();
+
+       reset_misc();
        reset_cpu(0);
 
        /*NOTREACHED*/
index 1d6cb48ff0787f1260366530f989d6d656b95be4..c8c3e0629a40221a37eff3415a377c1a9a31175e 100644 (file)
@@ -619,6 +619,7 @@ int checkicache   (void);
 int    checkdcache   (void);
 void   upmconfig     (unsigned int, unsigned int *, unsigned int);
 ulong  get_tbclk     (void);
+void   reset_misc    (void);
 void   reset_cpu     (ulong addr);
 #if defined (CONFIG_OF_LIBFDT) && defined (CONFIG_OF_BOARD_SETUP)
 void ft_cpu_setup(void *blob, bd_t *bd);