diff options
author | Peter De Schrijver <pdeschrijver@nvidia.com> | 2014-06-12 11:36:35 -0400 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2014-07-17 07:36:44 -0400 |
commit | 3f394f80645bf0c38a30042ba605c71663331035 (patch) | |
tree | 6acabf07689afc6b71bb0409d100ffb732fcb236 /include/soc | |
parent | 304664eab93f9e95a8d28fbd9702ede88bb10cc5 (diff) |
ARM: tegra: export apb dma readl/writel
Export APB DMA readl and writel. These are needed because we can't
access the fuses directly on Tegra20 without potentially causing a
system hang. Also have the APB DMA readl and writel return an error in
case of a read failure instead of just returning zero or ignore write
failures.
Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'include/soc')
-rw-r--r-- | include/soc/tegra/fuse.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/soc/tegra/fuse.h b/include/soc/tegra/fuse.h index 0e03f104fbf8..a43a750dd0a3 100644 --- a/include/soc/tegra/fuse.h +++ b/include/soc/tegra/fuse.h | |||
@@ -27,6 +27,20 @@ | |||
27 | u32 tegra_read_chipid(void); | 27 | u32 tegra_read_chipid(void); |
28 | u8 tegra_get_chip_id(void); | 28 | u8 tegra_get_chip_id(void); |
29 | 29 | ||
30 | #if defined(CONFIG_TEGRA20_APB_DMA) | ||
31 | int tegra_apb_readl_using_dma(unsigned long offset, u32 *value); | ||
32 | int tegra_apb_writel_using_dma(u32 value, unsigned long offset); | ||
33 | #else | ||
34 | static inline int tegra_apb_readl_using_dma(unsigned long offset, u32 *value) | ||
35 | { | ||
36 | return -EINVAL; | ||
37 | } | ||
38 | static inline int tegra_apb_writel_using_dma(u32 value, unsigned long offset) | ||
39 | { | ||
40 | return -EINVAL; | ||
41 | } | ||
42 | #endif /* CONFIG_TEGRA20_APB_DMA */ | ||
43 | |||
30 | #endif /* __ASSEMBLY__ */ | 44 | #endif /* __ASSEMBLY__ */ |
31 | 45 | ||
32 | #endif /* __SOC_TEGRA_FUSE_H__ */ | 46 | #endif /* __SOC_TEGRA_FUSE_H__ */ |