mmc: rtsx_pci: Enable MMC_CAP_ERASE to allow erase/discard/trim requests
[linux/fpc-iii.git] / drivers / soc / tegra / fuse / fuse.h
blob10c2076d5089aa347c1200ac66c03e0a5a2fe926
1 /*
2 * Copyright (C) 2010 Google, Inc.
3 * Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved.
5 * Author:
6 * Colin Cross <ccross@android.com>
8 * This software is licensed under the terms of the GNU General Public
9 * License version 2, as published by the Free Software Foundation, and
10 * may be copied, distributed, and modified under those terms.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
19 #ifndef __DRIVERS_MISC_TEGRA_FUSE_H
20 #define __DRIVERS_MISC_TEGRA_FUSE_H
22 #include <linux/dmaengine.h>
23 #include <linux/types.h>
25 struct tegra_fuse;
27 struct tegra_fuse_info {
28 u32 (*read)(struct tegra_fuse *fuse, unsigned int offset);
29 unsigned int size;
30 unsigned int spare;
33 struct tegra_fuse_soc {
34 void (*init)(struct tegra_fuse *fuse);
35 void (*speedo_init)(struct tegra_sku_info *info);
36 int (*probe)(struct tegra_fuse *fuse);
38 const struct tegra_fuse_info *info;
41 struct tegra_fuse {
42 struct device *dev;
43 void __iomem *base;
44 phys_addr_t phys;
45 struct clk *clk;
47 u32 (*read_early)(struct tegra_fuse *fuse, unsigned int offset);
48 u32 (*read)(struct tegra_fuse *fuse, unsigned int offset);
49 const struct tegra_fuse_soc *soc;
51 /* APBDMA on Tegra20 */
52 struct {
53 struct mutex lock;
54 struct completion wait;
55 struct dma_chan *chan;
56 struct dma_slave_config config;
57 dma_addr_t phys;
58 u32 *virt;
59 } apbdma;
62 void tegra_init_revision(void);
63 void tegra_init_apbmisc(void);
65 bool __init tegra_fuse_read_spare(unsigned int spare);
66 u32 __init tegra_fuse_read_early(unsigned int offset);
68 #ifdef CONFIG_ARCH_TEGRA_2x_SOC
69 void tegra20_init_speedo_data(struct tegra_sku_info *sku_info);
70 #endif
72 #ifdef CONFIG_ARCH_TEGRA_3x_SOC
73 void tegra30_init_speedo_data(struct tegra_sku_info *sku_info);
74 #endif
76 #ifdef CONFIG_ARCH_TEGRA_114_SOC
77 void tegra114_init_speedo_data(struct tegra_sku_info *sku_info);
78 #endif
80 #if defined(CONFIG_ARCH_TEGRA_124_SOC) || defined(CONFIG_ARCH_TEGRA_132_SOC)
81 void tegra124_init_speedo_data(struct tegra_sku_info *sku_info);
82 #endif
84 #ifdef CONFIG_ARCH_TEGRA_210_SOC
85 void tegra210_init_speedo_data(struct tegra_sku_info *sku_info);
86 #endif
88 #ifdef CONFIG_ARCH_TEGRA_2x_SOC
89 extern const struct tegra_fuse_soc tegra20_fuse_soc;
90 #endif
92 #ifdef CONFIG_ARCH_TEGRA_3x_SOC
93 extern const struct tegra_fuse_soc tegra30_fuse_soc;
94 #endif
96 #ifdef CONFIG_ARCH_TEGRA_114_SOC
97 extern const struct tegra_fuse_soc tegra114_fuse_soc;
98 #endif
100 #if defined(CONFIG_ARCH_TEGRA_124_SOC) || defined(CONFIG_ARCH_TEGRA_132_SOC)
101 extern const struct tegra_fuse_soc tegra124_fuse_soc;
102 #endif
104 #ifdef CONFIG_ARCH_TEGRA_210_SOC
105 extern const struct tegra_fuse_soc tegra210_fuse_soc;
106 #endif
108 #endif