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: 83450 Delivered-To: patch@linaro.org Received: by 10.182.1.168 with SMTP id 8csp2256749obn; Tue, 22 Nov 2016 09:03:43 -0800 (PST) X-Received: by 10.84.216.17 with SMTP id m17mr1573499pli.82.1479834223552; Tue, 22 Nov 2016 09:03:43 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u75si26944579pgc.144.2016.11.22.09.03.43; Tue, 22 Nov 2016 09:03:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755570AbcKVRDl (ORCPT + 9 others); Tue, 22 Nov 2016 12:03:41 -0500 Received: from mail-wm0-f42.google.com ([74.125.82.42]:35626 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755432AbcKVRDk (ORCPT ); Tue, 22 Nov 2016 12:03:40 -0500 Received: by mail-wm0-f42.google.com with SMTP id a197so35463516wmd.0 for ; Tue, 22 Nov 2016 09:02:52 -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=Vsq2LROa/2bm0AXLlBrsVt//wZ/G34vc8QW02hUN/q4gBjF8g/TXAuXia3UOz3hkNn yGJ2Sv86eSsFtnE/HXbUOZrDnBxDoVNOeMdcmSvKVhwWBdO5IWkIlgqD3qXeQCFCbK+l XVJ3pborQiDIiojRWoumh9TfnwMVk0sFX+FDzFB7aCjVqlVtnh4GvZX4w52XDVXBWXk8 ndP/5BGp9/r2fOF7/eB3pU1Ca8v/cSc/GU89aY0bJqRDc2WDEc4M4WroAalbs2u41Jvc D3vqJzTHXwg7ulBb8lS+pe02wz+eX2BWt467XCjf7rOabrSzOXei2LxuSo6EaG2tjWfj y0Zg== X-Gm-Message-State: AKaTC03CH1ioba/1yF98+qajMdhYZncJLO5t78HES0JfpBjx3EpOjQDq8+G4k46vf+LU6W56 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-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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(+) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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 */