Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1387074
| From | Stephen Boyd <sboyd@codeaurora.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [Patch v2 4/8] firmware: qcom: scm: Add memory allocation API |
| Date | 2016-04-26 04:00 +0200 |
| Message-ID | <rs0sb-7AX-17@gated-at.bofh.it> (permalink) |
| References | <rrXND-5JB-3@gated-at.bofh.it> <rrXXj-5Np-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 04/25, Andy Gross wrote:
> This patch adds APIs for the scm-32 and scm-64 to use for coherent memory
> allocation.
>
> Signed-off-by: Andy Gross <andy.gross@linaro.org>
> ---
> drivers/firmware/qcom_scm.c | 16 ++++++++++++++++
> drivers/firmware/qcom_scm.h | 4 ++++
> 2 files changed, 20 insertions(+)
>
> diff --git a/drivers/firmware/qcom_scm.c b/drivers/firmware/qcom_scm.c
> index d4e9145..8f78938 100644
> --- a/drivers/firmware/qcom_scm.c
> +++ b/drivers/firmware/qcom_scm.c
> @@ -20,6 +20,7 @@
> #include <linux/of.h>
> #include <linux/of_platform.h>
> #include <linux/clk.h>
> +#include <linux/dma-mapping.h>
>
> #include "qcom_scm.h"
>
> @@ -158,6 +159,21 @@ bool qcom_scm_is_available(void)
> }
> EXPORT_SYMBOL(qcom_scm_is_available);
>
> +void *qcom_scm_alloc_buffer(size_t size, dma_addr_t *dma_addr,
> + gfp_t gfp)
> +{
> + if (__scm)
> + return dma_alloc_writecombine(__scm->dev, size, dma_addr, gfp);
> + else
> + return ERR_PTR(-ENODEV);
Any reason we can't use the streaming APIs? That's pretty much
how we were doing things before. This changes it to be a
different memory type buffer which may be slower to read/write to.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[Patch v2 0/8] Qualcomm SCM Rework Andy Gross <andy.gross@linaro.org> - 2016-04-26 01:10 +0200
[Patch v2 6/8] firmware: qcom: scm: Use atomic SCM for cold boot Andy Gross <andy.gross@linaro.org> - 2016-04-26 01:20 +0200
Re: [Patch v2 6/8] firmware: qcom: scm: Use atomic SCM for cold boot Stephen Boyd <sboyd@codeaurora.org> - 2016-04-26 03:50 +0200
[Patch v2 4/8] firmware: qcom: scm: Add memory allocation API Andy Gross <andy.gross@linaro.org> - 2016-04-26 01:20 +0200
Re: [Patch v2 4/8] firmware: qcom: scm: Add memory allocation API Stephen Boyd <sboyd@codeaurora.org> - 2016-04-26 04:00 +0200
[Patch v2 1/8] dt/bindings: firmware: Add Qualcomm SCM binding Andy Gross <andy.gross@linaro.org> - 2016-04-26 01:20 +0200
Re: [Patch v2 1/8] dt/bindings: firmware: Add Qualcomm SCM binding Stephen Boyd <sboyd@codeaurora.org> - 2016-04-26 03:50 +0200
Re: [Patch v2 1/8] dt/bindings: firmware: Add Qualcomm SCM binding Andy Gross <andy.gross@linaro.org> - 2016-04-26 04:20 +0200
[Patch v2 5/8] firmware: qcom: scm: Add support for ARM64 SoCs Andy Gross <andy.gross@linaro.org> - 2016-04-26 01:20 +0200
[Patch v2 2/8] firmware: qcom: scm: Convert SCM to platform driver Andy Gross <andy.gross@linaro.org> - 2016-04-26 01:20 +0200
Re: [Patch v2 2/8] firmware: qcom: scm: Convert SCM to platform driver Stephen Boyd <sboyd@codeaurora.org> - 2016-04-26 03:30 +0200
csiph-web