Patch "ARM: davinci: da8xx: Create DSP device only when assigned memory" has been added to the 3.18-stable tree
This is a note to let you know that I've just added the patch titled
ARM: davinci: da8xx: Create DSP device only when assigned memory
to the 3.18-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
arm-davinci-da8xx-create-dsp-device-only-when-assigned-memory.patch
and it can be found in the queue-3.18 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Tue Apr 10 13:58:07 CEST 2018
From: Suman Anna <[email protected]>
Date: Tue, 16 May 2017 17:13:45 -0500
Subject: ARM: davinci: da8xx: Create DSP device only when assigned memory
From: Suman Anna <[email protected]>
[ Upstream commit f97f03578b997a8ec2b9bc4928f958a865137268 ]
The DSP device on Davinci platforms does not have an MMU and requires specific DDR memory to boot. This memory is reserved using the rproc_mem kernel boot parameter and is assigned to the device on non-DT boots. The remoteproc core uses the DMA API and so will fall back to assigning random memory if this memory is not assigned to the device, but the DSP remote processor boot will not be successful in such cases. So, check that memory has been reserved and assigned to the device specifically before even creating the DSP device.
--- arch/arm/mach-davinci/devices-da8xx.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
arch/arm/mach-davinci/devices-da8xx.c +10 -0
@@ -761,6 +761,8 @@ static struct platform_device da8xx_dsp .resource = da8xx_rproc_resources, }; +static bool rproc_mem_inited__initdata ; +#if IS_ENABLED (CONFIG_DA8XX_REMOTEPROC )static phys_addr_t rproc_base__initdata ;
@@ -799,6 +801,8 @@ void __init da8xx_rproc_reserve_cma(void ret =dma_declare_contiguous (&da8xx_dsp.dev, rproc_size, rproc_base,0 );if (ret)pr_err ("%s: dma_declare_contiguous failed %d\n" , __func__, ret); +else + rproc_mem_inited = true; }#else
@@ -813,6 +817,12 @@ int __init da8xx_register_rproc(void) {int ret; +if (!rproc_mem_inited) { +pr_warn ("%s: memory not reserved for DSP, not registering DSP device\n" , + __func__); +return -ENOMEM ; + } + ret =platform_device_register (&da8xx_dsp);if (ret)pr_err ("%s: can't register DSP device: %d\n" , __func__, ret);
Patches currently in stable-queue which might be from [email protected] are
queue-3.18/arm-davinci-da8xx-create-dsp-device-only-when-assigned-memory.patch