aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuman Anna2014-08-06 18:35:44 -0500
committerSuman Anna2014-08-28 19:22:46 -0500
commitf76f8f196487606a9f82737995f649c02c6c3ee8 (patch)
tree6bddeaa9a636c2b8573d6f72be4a0d9781f728ba
parentfc8990ab341a36ca03bf7cf81c7e2c383286c128 (diff)
downloadkernel-video-f76f8f196487606a9f82737995f649c02c6c3ee8.tar.gz
kernel-video-f76f8f196487606a9f82737995f649c02c6c3ee8.tar.xz
kernel-video-f76f8f196487606a9f82737995f649c02c6c3ee8.zip
ARM: OMAP2+: remoteproc: add dra7 dsp boot control functions
DRA7xx has upto two instances of DSP processors, and each DSP needs its boot vector to be programmed in a Control module register. The Control module API is currently limited only to the machine layers, and the OMAP remoteproc driver programs the DSP Boot vectors using a specific platform ops function. The format of this boot control register is different from earlier OMAP2+ SoCs, and is programmed by the dra7_dsp_ctrl_write_boot_addr() function. Add the proper pdata ops implementation wrappers over this function for properly writing the boot vector for each of the DSPs in DRA7xx, so that they can be supplied to the OMAP remoteproc driver through the respective platform data and pdata quirks. Signed-off-by: Suman Anna <s-anna@ti.com>
-rw-r--r--arch/arm/mach-omap2/remoteproc.c11
-rw-r--r--arch/arm/mach-omap2/remoteproc.h4
2 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/remoteproc.c b/arch/arm/mach-omap2/remoteproc.c
index c78f4ca0c96..9e91ef09cf7 100644
--- a/arch/arm/mach-omap2/remoteproc.c
+++ b/arch/arm/mach-omap2/remoteproc.c
@@ -20,8 +20,19 @@
20#include <plat/dmtimer.h> 20#include <plat/dmtimer.h>
21 21
22#include "omap_device.h" 22#include "omap_device.h"
23#include "control.h"
23#include "remoteproc.h" 24#include "remoteproc.h"
24 25
26void dra7_ctrl_write_dsp1_boot_addr(u32 bootaddr)
27{
28 dra7_ctrl_write_dsp_boot_addr(bootaddr, 0);
29}
30
31void dra7_ctrl_write_dsp2_boot_addr(u32 bootaddr)
32{
33 dra7_ctrl_write_dsp_boot_addr(bootaddr, 1);
34}
35
25/** 36/**
26 * omap_rproc_device_enable - enable the remoteproc device 37 * omap_rproc_device_enable - enable the remoteproc device
27 * @pdev: the rproc platform device 38 * @pdev: the rproc platform device
diff --git a/arch/arm/mach-omap2/remoteproc.h b/arch/arm/mach-omap2/remoteproc.h
index 2e88a0ff2d7..43a5658449b 100644
--- a/arch/arm/mach-omap2/remoteproc.h
+++ b/arch/arm/mach-omap2/remoteproc.h
@@ -22,6 +22,8 @@
22struct omap_dm_timer; 22struct omap_dm_timer;
23 23
24#if IS_ENABLED(CONFIG_OMAP_REMOTEPROC) 24#if IS_ENABLED(CONFIG_OMAP_REMOTEPROC)
25void dra7_ctrl_write_dsp1_boot_addr(u32 bootaddr);
26void dra7_ctrl_write_dsp2_boot_addr(u32 bootaddr);
25int omap_rproc_device_enable(struct platform_device *pdev); 27int omap_rproc_device_enable(struct platform_device *pdev);
26int omap_rproc_device_shutdown(struct platform_device *pdev); 28int omap_rproc_device_shutdown(struct platform_device *pdev);
27struct omap_dm_timer *omap_rproc_request_timer(struct device_node *np); 29struct omap_dm_timer *omap_rproc_request_timer(struct device_node *np);
@@ -31,6 +33,8 @@ int omap_rproc_stop_timer(struct omap_dm_timer *timer);
31int omap_rproc_get_timer_irq(struct omap_dm_timer *timer); 33int omap_rproc_get_timer_irq(struct omap_dm_timer *timer);
32void omap_rproc_ack_timer_irq(struct omap_dm_timer *timer); 34void omap_rproc_ack_timer_irq(struct omap_dm_timer *timer);
33#else 35#else
36static inline void dra7_ctrl_write_dsp1_boot_addr(u32 bootaddr) { }
37static inline void dra7_ctrl_write_dsp2_boot_addr(u32 bootaddr) { }
34static inline int omap_rproc_device_enable(struct platform_device *pdev) 38static inline int omap_rproc_device_enable(struct platform_device *pdev)
35{ 39{
36 return 0; 40 return 0;