Esempio n. 1
0
File: cpu.c Progetto: avmwww/u-boot
	reset_cpu(ulong addr)
{
#ifdef CONFIG_SYS_LPC178X
	/*
	 * We use the function `lpc178x_pre_reset_cpu()` to reset
	 * the Ethernet PHY.
	 *
	 * LPC178x/7x requires a PHY reset immediately before resetting
	 * the SoC, otherwise the Ethernet block hangs after software reset
	 * of the SoC.
	 */
	lpc178x_pre_reset_cpu();
#endif

#ifdef CONFIG_SYS_LPC18XX
#if defined(CONFIG_SPIFI)
	/* LPC4350 errata 3.10 for booting from SPIFI */
	spifi_cancel_mem_mode();
#endif
	/*
	 * Use watchdog reset on LPC18xx/43xx
	 */
	lpc18xx_reset_cpu();
#else
	/*
	 * Perform reset but keep priority group unchanged.
	 */
	CM3_SCB_REGS->aircr = (CM3_AIRCR_VECTKEY << CM3_AIRCR_VECTKEY_SHIFT) |
			  (CM3_SCB_REGS->aircr &
			  (CM3_AIRCR_PRIGROUP_MSK << CM3_AIRCR_PRIGROUP_SHIFT))
			  | CM3_AIRCR_SYSRESET;
#endif
}
Esempio n. 2
0
	reset_cpu(ulong addr)
{
#ifdef CONFIG_SYS_LPC178X
	/*
	 * We use the function `lpc178x_pre_reset_cpu()` to reset
	 * the Ethernet PHY.
	 *
	 * LPC178x/7x requires a PHY reset immediately before resetting
	 * the SoC, otherwise the Ethernet block hangs after software reset
	 * of the SoC.
	 */
	lpc178x_pre_reset_cpu();
#endif

	/*
	 * Perform reset but keep priority group unchanged.
	 */
	CM3_SCB_REGS->aircr = (CM3_AIRCR_VECTKEY << CM3_AIRCR_VECTKEY_SHIFT) |
			  (CM3_SCB_REGS->aircr &
			  (CM3_AIRCR_PRIGROUP_MSK << CM3_AIRCR_PRIGROUP_SHIFT))
			  | CM3_AIRCR_SYSRESET;

}