From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hg58H-00063A-DN for barebox@lists.infradead.org; Wed, 26 Jun 2019 10:26:30 +0000 Date: Wed, 26 Jun 2019 12:26:26 +0200 From: Roland Hieber Message-ID: <20190626102626.vd7joceic5oaro7x@pengutronix.de> References: <20190626073114.2ckfwxnueymn75hx@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190626073114.2ckfwxnueymn75hx@pengutronix.de> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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: Re: [PATCH 01/13] hab: implement interface for i.MX8MQ To: Sascha Hauer Cc: barebox@lists.infradead.org, Rouven Czerwinski On Wed, Jun 26, 2019 at 09:31:14AM +0200, Sascha Hauer wrote: > On Wed, Jun 26, 2019 at 06:58:42AM +0200, Rouven Czerwinski wrote: > > The HAB interface for i.MX8MQ only implements the retrieval of status > > and events. The SoC status is retrieved using the TF-A SIP API found in > > the downstream imx TF-A. After calling into the TF-A the passed data > > structures need to be invalidated, since otherwise the cached zero value > > is used. > > Currently the TF-A report event call only supports FAILURE events. > > Testing the TF-A with other event types resulted in a freeze in the > > bootrom code, which was not investigated further. > > We instead walk the memory containing the events and retrieve the events > > ourselves. They are exposed using the same API. > > > > Signed-off-by: Rouven Czerwinski > > --- > > +{ > > + return habv4_get_status(&hab_smc_ops); > > +} > > + > > +static int init_imx8_hab_get_status(void) > > +{ > > + int ret = 0; > > + > > + if (cpu_is_mx8mq()) > > + ret = imx8_hab_get_status(); > > + else > > + return 0; > > + > > + /* > > + * Nobody will check the return value if there were HAB errors, but the > > + * initcall will fail spectaculously with a strange error message. > > + */ > > + if (ret == -EPERM) > > + return 0; > > Maybe just ignore the return value of imx8_hab_get_status() completely > and just add a comment that this is called for error printing only here? This was probably copied from the i.MX6 HAB implementation, feel free to change it there too. - Roland -- Roland Hieber | r.hieber@pengutronix.de | Pengutronix e.K. | https://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim | Phone: +49-5121-206917-5086 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox