arm:reset: call the reset_misc() before the cpu reset
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. 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 Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
This commit is contained in:
parent
32ee9bc5ed
commit
1fb4dab2a1
|
@ -23,6 +23,10 @@
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
|
||||||
|
__weak void reset_misc(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
||||||
{
|
{
|
||||||
puts ("resetting ...\n");
|
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 */
|
udelay (50000); /* wait 50 ms */
|
||||||
|
|
||||||
disable_interrupts();
|
disable_interrupts();
|
||||||
|
|
||||||
|
reset_misc();
|
||||||
reset_cpu(0);
|
reset_cpu(0);
|
||||||
|
|
||||||
/*NOTREACHED*/
|
/*NOTREACHED*/
|
||||||
|
|
|
@ -616,6 +616,7 @@ int checkicache (void);
|
||||||
int checkdcache (void);
|
int checkdcache (void);
|
||||||
void upmconfig (unsigned int, unsigned int *, unsigned int);
|
void upmconfig (unsigned int, unsigned int *, unsigned int);
|
||||||
ulong get_tbclk (void);
|
ulong get_tbclk (void);
|
||||||
|
void reset_misc (void);
|
||||||
void reset_cpu (ulong addr);
|
void reset_cpu (ulong addr);
|
||||||
#if defined (CONFIG_OF_LIBFDT) && defined (CONFIG_OF_BOARD_SETUP)
|
#if defined (CONFIG_OF_LIBFDT) && defined (CONFIG_OF_BOARD_SETUP)
|
||||||
void ft_cpu_setup(void *blob, bd_t *bd);
|
void ft_cpu_setup(void *blob, bd_t *bd);
|
||||||
|
|
Loading…
Reference in New Issue