ARM: OMAP: select correct reset_cpu function at runtime
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
f6b399ef9b
commit
f56a48471a
|
@ -30,7 +30,7 @@
|
|||
#include <mach/am33xx-generic.h>
|
||||
#include <mach/gpmc.h>
|
||||
|
||||
void __noreturn reset_cpu(unsigned long addr)
|
||||
void __noreturn am33xx_reset_cpu(unsigned long addr)
|
||||
{
|
||||
writel(AM33XX_PRM_RSTCTRL_RESET, AM33XX_PRM_RSTCTRL);
|
||||
|
||||
|
|
|
@ -26,4 +26,6 @@ u32 am33xx_running_in_flash(void);
|
|||
u32 am33xx_running_in_sram(void);
|
||||
u32 am33xx_running_in_sdram(void);
|
||||
|
||||
void __noreturn am33xx_reset_cpu(unsigned long addr);
|
||||
|
||||
#endif /* __MACH_AM33XX_GENERIC_H */
|
||||
|
|
|
@ -23,4 +23,6 @@ u32 omap3_running_in_flash(void);
|
|||
u32 omap3_running_in_sram(void);
|
||||
u32 omap3_running_in_sdram(void);
|
||||
|
||||
void __noreturn omap3_reset_cpu(unsigned long addr);
|
||||
|
||||
#endif /* __MACH_OMAP3_GENERIC_H */
|
||||
|
|
|
@ -18,4 +18,6 @@ static inline void omap4_save_bootinfo(uint32_t *info)
|
|||
omap_save_bootinfo(info);
|
||||
}
|
||||
|
||||
void __noreturn omap4_reset_cpu(unsigned long addr);
|
||||
|
||||
#endif /* __MACH_OMAP4_GENERIC_H */
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
void __noreturn reset_cpu(unsigned long addr)
|
||||
void __noreturn omap3_reset_cpu(unsigned long addr)
|
||||
{
|
||||
writel(OMAP3_PRM_RSTCTRL_RESET, OMAP3_PRM_REG(RSTCTRL));
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#define EMIF_L3_CONFIG_VAL_SYS_10_LL_0 0x0A0000FF
|
||||
#define EMIF_L3_CONFIG_VAL_SYS_10_MPU_3_LL_0 0x0A300000
|
||||
|
||||
void __noreturn reset_cpu(unsigned long addr)
|
||||
void __noreturn omap4_reset_cpu(unsigned long addr)
|
||||
{
|
||||
writel(OMAP44XX_PRM_RSTCTRL_RESET, OMAP44XX_PRM_RSTCTRL);
|
||||
|
||||
|
|
|
@ -25,6 +25,9 @@
|
|||
#include <mach/am33xx-silicon.h>
|
||||
#include <mach/omap3-silicon.h>
|
||||
#include <mach/omap4-silicon.h>
|
||||
#include <mach/am33xx-generic.h>
|
||||
#include <mach/omap3-generic.h>
|
||||
#include <mach/omap4-generic.h>
|
||||
|
||||
static void *omap_sram_start(void)
|
||||
{
|
||||
|
@ -130,3 +133,14 @@ static int omap_env_init(void)
|
|||
}
|
||||
late_initcall(omap_env_init);
|
||||
#endif
|
||||
|
||||
void __noreturn reset_cpu(unsigned long addr)
|
||||
{
|
||||
if (cpu_is_omap34xx())
|
||||
omap3_reset_cpu(addr);
|
||||
if (cpu_is_omap4xxx())
|
||||
omap4_reset_cpu(addr);
|
||||
if (cpu_is_am33xx())
|
||||
am33xx_reset_cpu(addr);
|
||||
while (1);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue