summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorIshan Mittal <imittal@nvidia.com>2016-04-01 08:18:23 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-07-04 13:02:15 -0400
commit08bf8c9524efc0f26df2a00306226cba923b74ee (patch)
tree468fc3312d8249c893f49cba747784077922e8e8 /include
parent341260c72aff2c0dd47038086b3cbebff95efd3c (diff)
platform: tegra: Import tegra_prod and wdt-recovery drivers
This changes imports tegra_prod and wdt-recovery drivers from k4.4. It squashes below three original commits to make the change neat as the original commits contained many other drivers as well: commit c5c90b82ec25 ("drivers: platform: tegra: Add miscellaneous platform specific drivers") commit 000acb1cd376 ("platform: tegra: add missing headers and build fixes") commit 0b95640a2a30 ("include/linux: add missing tegra headers") commit c413070a1e21 ("platform: tegra: Get rid of mach/irq.h include") Bug 200416207 Change-Id: Ic174f1123854cbac816dfe0a95c52f6395bf095d Signed-off-by: Nicolin Chen <nicolinc@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1768527 GVS: Gerrit_Virtual_Submit Reviewed-by: Sachin Nikam <snikam@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/tegra_prod.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/include/linux/tegra_prod.h b/include/linux/tegra_prod.h
new file mode 100644
index 000000000..76678112b
--- /dev/null
+++ b/include/linux/tegra_prod.h
@@ -0,0 +1,63 @@
1/*
2 * Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#ifndef _TEGRA_PRODS_H
18#define _TEGRA_PRODS_H
19
20#define PROD_TUPLE_NUM (sizeof(struct prod_tuple)/sizeof(u32))
21
22struct prod_tuple {
23 u32 index; /* Address base index */
24 u32 addr; /* offset address*/
25 u32 mask; /* mask */
26 u32 val; /* value */
27};
28
29struct tegra_prod {
30 const char *name;
31 struct prod_tuple *prod_tuple;
32 int count; /* number of prod_tuple*/
33 bool boot_init;
34};
35
36/* tegra_prod_list: Tegra Prod list for the given submodule
37 * @n_prod_cells: Number of prod setting cells.
38 */
39struct tegra_prod_list {
40 struct tegra_prod *tegra_prod;
41 int num; /* number of tegra_prod*/
42 int n_prod_cells;
43};
44
45int tegra_prod_set_tuple(void __iomem **base, struct prod_tuple *prod_tuple);
46
47int tegra_prod_set(void __iomem **base, struct tegra_prod *tegra_prod);
48
49int tegra_prod_set_list(void __iomem **base,
50 struct tegra_prod_list *tegra_prod_list);
51
52int tegra_prod_set_boot_init(void __iomem **base,
53 struct tegra_prod_list *tegra_prod_list);
54
55int tegra_prod_set_by_name(void __iomem **base, const char *name,
56 struct tegra_prod_list *tegra_prod_list);
57
58struct tegra_prod_list *tegra_prod_init(const struct device_node *np);
59
60struct tegra_prod_list *tegra_prod_get(struct device *dev, const char *name);
61
62int tegra_prod_release(struct tegra_prod_list **tegra_prod_list);
63#endif