diff options
author | Suman Anna | 2014-08-06 18:35:44 -0500 |
---|---|---|
committer | Suman Anna | 2014-08-28 19:22:46 -0500 |
commit | f76f8f196487606a9f82737995f649c02c6c3ee8 (patch) | |
tree | 6bddeaa9a636c2b8573d6f72be4a0d9781f728ba | |
parent | fc8990ab341a36ca03bf7cf81c7e2c383286c128 (diff) | |
download | kernel-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.c | 11 | ||||
-rw-r--r-- | arch/arm/mach-omap2/remoteproc.h | 4 |
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 | ||
26 | void dra7_ctrl_write_dsp1_boot_addr(u32 bootaddr) | ||
27 | { | ||
28 | dra7_ctrl_write_dsp_boot_addr(bootaddr, 0); | ||
29 | } | ||
30 | |||
31 | void 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 @@ | |||
22 | struct omap_dm_timer; | 22 | struct omap_dm_timer; |
23 | 23 | ||
24 | #if IS_ENABLED(CONFIG_OMAP_REMOTEPROC) | 24 | #if IS_ENABLED(CONFIG_OMAP_REMOTEPROC) |
25 | void dra7_ctrl_write_dsp1_boot_addr(u32 bootaddr); | ||
26 | void dra7_ctrl_write_dsp2_boot_addr(u32 bootaddr); | ||
25 | int omap_rproc_device_enable(struct platform_device *pdev); | 27 | int omap_rproc_device_enable(struct platform_device *pdev); |
26 | int omap_rproc_device_shutdown(struct platform_device *pdev); | 28 | int omap_rproc_device_shutdown(struct platform_device *pdev); |
27 | struct omap_dm_timer *omap_rproc_request_timer(struct device_node *np); | 29 | struct 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); | |||
31 | int omap_rproc_get_timer_irq(struct omap_dm_timer *timer); | 33 | int omap_rproc_get_timer_irq(struct omap_dm_timer *timer); |
32 | void omap_rproc_ack_timer_irq(struct omap_dm_timer *timer); | 34 | void omap_rproc_ack_timer_irq(struct omap_dm_timer *timer); |
33 | #else | 35 | #else |
36 | static inline void dra7_ctrl_write_dsp1_boot_addr(u32 bootaddr) { } | ||
37 | static inline void dra7_ctrl_write_dsp2_boot_addr(u32 bootaddr) { } | ||
34 | static inline int omap_rproc_device_enable(struct platform_device *pdev) | 38 | static inline int omap_rproc_device_enable(struct platform_device *pdev) |
35 | { | 39 | { |
36 | return 0; | 40 | return 0; |