aboutsummaryrefslogtreecommitdiffstats
blob: 020454e3d83ce76c96f22c83f1b07156664dfa20 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/*
 * Remote processor machine-specific quirks for OMAP4+ SoCs
 *
 * Copyright (C) 2014 Texas Instruments, Inc.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 */

#ifndef __ARCH_ARM_MACH_OMAP2_REMOTEPROC_H
#define __ARCH_ARM_MACH_OMAP2_REMOTEPROC_H

#include "linux/platform_device.h"

struct omap_dm_timer;

#if IS_ENABLED(CONFIG_OMAP_REMOTEPROC)
void dra7_ctrl_write_dsp1_boot_addr(u32 bootaddr);
void dra7_ctrl_write_dsp2_boot_addr(u32 bootaddr);
void dra7_dsp1_pre_shutdown(void);
void dra7_dsp2_pre_shutdown(void);
int omap_rproc_device_enable(struct platform_device *pdev);
int omap_rproc_device_shutdown(struct platform_device *pdev);
struct omap_dm_timer *omap_rproc_request_timer(struct device_node *np);
int omap_rproc_release_timer(struct omap_dm_timer *timer);
int omap_rproc_start_timer(struct omap_dm_timer *timer);
int omap_rproc_stop_timer(struct omap_dm_timer *timer);
int omap_rproc_get_timer_irq(struct omap_dm_timer *timer);
void omap_rproc_ack_timer_irq(struct omap_dm_timer *timer);
#else
static inline void dra7_ctrl_write_dsp1_boot_addr(u32 bootaddr) { }
static inline void dra7_ctrl_write_dsp2_boot_addr(u32 bootaddr) { }
static inline void dra7_dsp1_pre_shutdown(void) { }
static inline void dra7_dsp2_pre_shutdown(void) { }
static inline int omap_rproc_device_enable(struct platform_device *pdev)
{
	return 0;
}

static inline int omap_rproc_device_shutdown(struct platform_device *pdev)
{
	return 0;
}

static inline
struct omap_dm_timer *omap_rproc_request_timer(struct device_node *np)
{
	return ERR_PTR(-ENODEV);
}

static inline int omap_rproc_release_timer(struct omap_dm_timer *timer)
{
	return -ENODEV;
}

static inline int omap_rproc_start_timer(struct omap_dm_timer *timer)
{
	return -ENODEV;
}

static inline int omap_rproc_stop_timer(struct omap_dm_timer *timer)
{
	return -ENODEV;
}

static inline int omap_rproc_get_timer_irq(struct omap_dm_timer *timer)
{
	return -1;
}

static inline void omap_rproc_ack_timer_irq(struct omap_dm_timer *timer) { }
#endif

#endif