[PATCH v3: For next 2/2] ARM: am33xx: Add support for reset reason detection

Sascha Hauer s.hauer at pengutronix.de
Tue Feb 10 23:39:10 PST 2015


On Tue, Feb 10, 2015 at 03:13:58PM +0100, Wadim Egorov wrote:
> Also activate in defconfig.
> 
> Signed-off-by: Wadim Egorov <w.egorov at phytec.de>
> +		break;
> +	case (1 << 1):
> +		reset_source_set(RESET_RST);
> +		break;
> +	case (1 << 0):
> +		reset_source_set(RESET_POR);
> +		break;
> +	default:
> +		reset_source_set(RESET_UKWN);
> +		break;
> +	}
> +
> +	return 0;
> +}
> +device_initcall(am33xx_detect_reset_reason);

No SoC specific initcall without testing if you're running on the
correct SoC please. Better call it from am33xx_init() which is only
executed on am33xx.

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list