Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752059AbbH2BI0 (ORCPT ); Fri, 28 Aug 2015 21:08:26 -0400 Received: from mail.kmu-office.ch ([178.209.48.109]:42795 "EHLO mail.kmu-office.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751389AbbH2BIZ (ORCPT ); Fri, 28 Aug 2015 21:08:25 -0400 From: Stefan Agner To: ohad@wizery.com Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Stefan Agner Subject: [PATCH] remoteproc: report error if resource table doesn't exist Date: Fri, 28 Aug 2015 18:08:19 -0700 Message-Id: <1440810499-24327-1-git-send-email-stefan@agner.ch> X-Mailer: git-send-email 2.5.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1704 Lines: 48 Currently, if the resource table is completely missing in the firmware, powering up the remoteproc fails silently. Add a message indicating that the resource table is missing in the firmware. Signed-off-by: Stefan Agner --- Hi Ohad, I am currently working on remoteproc support for Freescale Vybrid's secondary Cortex-M4 core. I stumbled upon this rough spot since the little test firmware I am using now does not have a resource table yet. This also opens up a more general question: Is it mandatory to have a resource table in the firmware? Theoretically a remoteproc could also work completely independent, all what would be used from the remoteproc framework is the loading and starting capabilities... -- Stefan drivers/remoteproc/remoteproc_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 8b3130f..29db8b3 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -823,8 +823,10 @@ static int rproc_fw_boot(struct rproc *rproc, const struct firmware *fw) /* look for the resource table */ table = rproc_find_rsc_table(rproc, fw, &tablesz); - if (!table) + if (!table) { + dev_err(dev, "Failed to find resource table\n"); goto clean_up; + } /* Verify that resource table in loaded fw is unchanged */ if (rproc->table_csum != crc32(0, table, tablesz)) { -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/