From patchwork Tue Mar 29 03:36:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 8681961 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: X-Original-To: patchwork-linux-arm-msm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5015DC0553 for ; Tue, 29 Mar 2016 03:39:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7427B2020F for ; Tue, 29 Mar 2016 03:39:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7CA9820121 for ; Tue, 29 Mar 2016 03:39:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755807AbcC2Djb (ORCPT ); Mon, 28 Mar 2016 23:39:31 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:36262 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755546AbcC2DhN (ORCPT ); Mon, 28 Mar 2016 23:37:13 -0400 Received: by mail-pa0-f53.google.com with SMTP id tt10so3455770pab.3 for ; Mon, 28 Mar 2016 20:37:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=HdGr2p4W6RPJpI8bi8D7+n4dapYURFv5gV8LbgK+L/o=; b=D+33csp8+s2aWOEC/fnQGXPjpPKFWT01v2mMGFgjTnq5xZD1h85yccuXiEtXw8uONI 0/UG4CbKnnm7/Ow8qa4HfeC2SMA2Bge84ZQok1BIHMccKMaVYL0RWbBSbV+wtlDE9GcG 9Dct2pd0UNvc5kpXE0vC9/JPeoEdb+6xCD1u0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=HdGr2p4W6RPJpI8bi8D7+n4dapYURFv5gV8LbgK+L/o=; b=BcnVgD29aQdsX4A8rA//hFBDJ6HOTXSQeltvT/liemnMYbizGQ0erVj41XuFylFDL6 fIlS5w0HiK1zPBUG5BloxLpolWRn2w7QJ4/q7STMHPMsyoWAM5TeUFNN7v1zvJqfV/s0 bJTMAW767+7R6EldoSA9pgBDd8yC3XkAp8YbDwNP51iRVO3kM6ceCyaAWHEoYW+p7Y75 GFrjTi8mLC9KXYe3aoL+71TLT9IV2UHJvCWAfjG8BAWNMEzLWDL0bAqvyZh255/y2D3z Ie0MWwkJaE8dXt+Nv/Rf+7JgtPRj26hjCH+huX3mOkTIHYx1Dj4BH7DIAEk9XYb741jL NiNw== X-Gm-Message-State: AD7BkJJzlTaSls6Ik6lZxXtwdIlteudKVt565t+H3hukgUzAzfxmK2ntRlCheoWxKatDcLje X-Received: by 10.66.102.106 with SMTP id fn10mr48666957pab.60.1459222632254; Mon, 28 Mar 2016 20:37:12 -0700 (PDT) Received: from localhost.localdomain (ip68-111-223-48.sd.sd.cox.net. [68.111.223.48]) by smtp.gmail.com with ESMTPSA id 85sm38851600pfl.18.2016.03.28.20.37.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Mar 2016 20:37:11 -0700 (PDT) From: Bjorn Andersson To: Ohad Ben-Cohen , Bjorn Andersson Cc: Rob Herring , Suman Anna , John Stultz , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, Bjorn Andersson Subject: [PATCH v2 2/9] remoteproc: core: Make the loaded resource table optional Date: Mon, 28 Mar 2016 20:36:58 -0700 Message-Id: <1459222625-11440-3-git-send-email-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1459222625-11440-1-git-send-email-bjorn.andersson@linaro.org> References: <1459222625-11440-1-git-send-email-bjorn.andersson@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bjorn Andersson Remote processors like the ones found in the Qualcomm SoCs does not have a resource table passed to them, so make it optional by only populating it if it does exist. Signed-off-by: Bjorn Andersson Signed-off-by: Bjorn Andersson --- Changes since v1: - None drivers/remoteproc/remoteproc_core.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 3d7d58a109d8..c04a786dc051 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -856,12 +856,8 @@ static int rproc_fw_boot(struct rproc *rproc, const struct firmware *fw) * copy this information to device memory. */ loaded_table = rproc_find_loaded_rsc_table(rproc, fw); - if (!loaded_table) { - ret = -EINVAL; - goto clean_up; - } - - memcpy(loaded_table, rproc->cached_table, tablesz); + if (loaded_table) + memcpy(loaded_table, rproc->cached_table, tablesz); /* power up the remote processor */ ret = rproc->ops->start(rproc);