From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z7NmZ-0002Ow-DK for barebox@lists.infradead.org; Tue, 23 Jun 2015 12:58:32 +0000 Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1Z7NmA-0006G1-Lf for barebox@lists.infradead.org; Tue, 23 Jun 2015 14:58:06 +0200 Received: from jbe by dude.hi.pengutronix.de with local (Exim 4.85) (envelope-from ) id 1Z7NmA-000394-EP for barebox@lists.infradead.org; Tue, 23 Jun 2015 14:58:06 +0200 From: Juergen Borleis Date: Tue, 23 Jun 2015 14:57:59 +0200 Message-Id: <1435064284-8015-1-git-send-email-jbe@pengutronix.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCHv2] Change barebox regarding "machine-restart", "reset cause detection" und "watchdog usage" To: barebox@lists.infradead.org This is V2 of this patch set. Changelog: - some functions are renamed to better reflect their meaning ("*_register_handler" instead of "*_add_scope") - collect most of the new features in one sourcefile, due to the fact they manage system reset and share some data - clean up and remove some files, because they do not provide a function anymore (due to the removement of reset_cpu()). - the reset cause detection and restart feature is now always part of barebox Currently the architectures in barebox using a fixed approach to restart the machine: they just provide a cpu_reset() function and are done. Every architecture then does what the developer has selected in order to reset the CPU, the SoC or the whole machine. This approach is nice and simple but can fail. For example on a machine where some kind of power management changes power supply voltages in order to save power. Everything works with reduced clock speeds and voltages. It works until a warm start is triggered and the SoC and it clocks are reset to their POR defaults - but not the external power supply. In this case a restart feature is required with a wider scope - which resets the power supplies back to their POR values. To honor the scope of a restart feature is the intention of this patch series. And while a machine restart needs such a scope the use of a watchdog needs such a scope as well. And at the end of this topic, the detection of the reset cause also. BTW: everything works in a reliable manner only, if the kernel honors these scopes as well. Patch 2/5 removes the reset_cpu() function barebox wide and replaces it by registering an architecture dependend restart feature including a scope. Patch 5/5 adds a new driver to handle the DA9055 PMIC which can act as a reset cause detection, a watchdog and a restart unit. It is an example for a unit which has a machine wide scope for all of these three featured. Comments are welcome Juergen _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox