From patchwork Tue Nov 22 17:02:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 9441621 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 95948605EE for ; Tue, 22 Nov 2016 17:10:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 84FE328330 for ; Tue, 22 Nov 2016 17:10:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 74A2C2839A; Tue, 22 Nov 2016 17:10:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 80AF028330 for ; Tue, 22 Nov 2016 17:10:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756078AbcKVRKX (ORCPT ); Tue, 22 Nov 2016 12:10:23 -0500 Received: from mail-wj0-f172.google.com ([209.85.210.172]:32936 "EHLO mail-wj0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755421AbcKVRKW (ORCPT ); Tue, 22 Nov 2016 12:10:22 -0500 X-Greylist: delayed 402 seconds by postgrey-1.27 at vger.kernel.org; Tue, 22 Nov 2016 12:10:22 EST Received: by mail-wj0-f172.google.com with SMTP id xy5so45366190wjc.0 for ; Tue, 22 Nov 2016 09:10:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=5IkLgDjrOSnhwuw1/UY8pCpfIqtII/42VFQjdTuWqE0=; b=GF2hOvJbNBCqNtCHaQauQYRMK9q56/qKds0qDPRyUy6vDAwZoBj0e0Bb2xHtaacEgX U5G8heDN1w5qNSOg2IMeaH/9HhPnahRRCvFJRYS+DwQqX2HnA1z/mYjGAcKtxJRu1ukQ +1N1ECdyab5DHBDZK5GZqcW7WqXnB/o5SHYTg= 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; bh=5IkLgDjrOSnhwuw1/UY8pCpfIqtII/42VFQjdTuWqE0=; b=iwORc6imOrf8gx/uLnxtttdkRbcv3rnPoQZ+oljqtv40azSFXkjtQlSnWdJ93+pOsY OunID1918q03Kpu5KAp3xjGRcX2RnjbCcsqHoaa6eF6fyyCW72GNnPuksa/3OAQ6SX3H DnJPHrt3JZoue6cK8/A5dyVEFSFlVuPxqrKmygVmxhzLoiuit2u/Fnpq5MDAlYGPHwSU WfJgcfvx+0EkzUl/neCg1pk/UOdx7aewUql6jVMjngKAtdUxrSwjyssdrPMfqDANs/cr OKTpn7IUiyHxij/esmC3jq+VUGLabGe8Yyn6FmWp0PDtArI1IhVmhpDoMBCKAhYSO7hf AA+Q== X-Gm-Message-State: AKaTC02sW/aqWw/0os4l3sHQoaZhRcXLF72ssMGTt1xgBQ8chnVRTEyE/f3S3YwQ4PUQbYlS X-Received: by 10.194.109.168 with SMTP id ht8mr14977710wjb.36.1479834171259; Tue, 22 Nov 2016 09:02:51 -0800 (PST) Received: from mms-0440.wifi.mm-sol.com ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id g10sm31782029wjw.18.2016.11.22.09.02.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 22 Nov 2016 09:02:50 -0800 (PST) From: Stanimir Varbanov To: Ohad Ben-Cohen , Bjorn Andersson Cc: Andy Gross , linux-remoteproc@vger.kernel.org, Stephen Boyd , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Stanimir Varbanov Subject: [PATCH 2/3] remoteproc: add empty remoteproc API functions in header Date: Tue, 22 Nov 2016 19:02:43 +0200 Message-Id: <1479834163-30842-1-git-send-email-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-remoteproc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP With this addition in place the drivers which uses remote processor APIs will be able to be compile tested on different architectures with COMPILE_TEST Kconfig option. Signed-off-by: Stanimir Varbanov --- include/linux/remoteproc.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/include/linux/remoteproc.h b/include/linux/remoteproc.h index 930023b7c825..a727cb3c9e3d 100644 --- a/include/linux/remoteproc.h +++ b/include/linux/remoteproc.h @@ -486,6 +486,7 @@ struct rproc_vdev { u32 rsc_offset; }; +#if IS_ENABLED(CONFIG_REMOTEPROC) struct rproc *rproc_get_by_phandle(phandle phandle); struct rproc *rproc_alloc(struct device *dev, const char *name, const struct rproc_ops *ops, @@ -510,5 +511,28 @@ static inline struct rproc *vdev_to_rproc(struct virtio_device *vdev) return rvdev->rproc; } +#else +static inline struct rproc * +rproc_get_by_phandle(phandle phandle) { return ERR_PTR(-ENODEV); } +static inline struct rproc *rproc_alloc(struct device *dev, const char *name, + const struct rproc_ops *ops, + const char *firmware, int len) +{ return ERR_PTR(-ENODEV); } +static inline void rproc_put(struct rproc *rproc) {} +static inline int rproc_add(struct rproc *rproc) { return -ENODEV; } +static inline int rproc_del(struct rproc *rproc) { return -ENODEV; } +static inline void rproc_free(struct rproc *rproc) {} + +static inline int rproc_boot(struct rproc *rproc) { return -ENODEV; } +static inline void rproc_shutdown(struct rproc *rproc) {} +static inline void +rproc_report_crash(struct rproc *rproc, enum rproc_crash_type type) {} + +static inline struct rproc_vdev *vdev_to_rvdev(struct virtio_device *vdev) +{ return NULL; } + +static inline struct rproc *vdev_to_rproc(struct virtio_device *vdev) +{ return NULL; } +#endif #endif /* REMOTEPROC_H */