fuse.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*
  2. * Copyright (C) 2010 Google, Inc.
  3. * Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved.
  4. *
  5. * Author:
  6. * Colin Cross <ccross@android.com>
  7. *
  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.
  11. *
  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.
  16. *
  17. */
  18. #ifndef __DRIVERS_MISC_TEGRA_FUSE_H
  19. #define __DRIVERS_MISC_TEGRA_FUSE_H
  20. #define TEGRA_FUSE_BASE 0x7000f800
  21. #define TEGRA_FUSE_SIZE 0x400
  22. int tegra_fuse_create_sysfs(struct device *dev, int size,
  23. u32 (*readl)(const unsigned int offset));
  24. bool tegra30_spare_fuse(int bit);
  25. u32 tegra30_fuse_readl(const unsigned int offset);
  26. void tegra30_init_fuse_early(void);
  27. void tegra_init_revision(void);
  28. void tegra_init_apbmisc(void);
  29. #ifdef CONFIG_ARCH_TEGRA_2x_SOC
  30. void tegra20_init_speedo_data(struct tegra_sku_info *sku_info);
  31. bool tegra20_spare_fuse_early(int spare_bit);
  32. void tegra20_init_fuse_early(void);
  33. u32 tegra20_fuse_early(const unsigned int offset);
  34. #else
  35. static inline void tegra20_init_speedo_data(struct tegra_sku_info *sku_info) {}
  36. static inline bool tegra20_spare_fuse_early(int spare_bit)
  37. {
  38. return false;
  39. }
  40. static inline void tegra20_init_fuse_early(void) {}
  41. static inline u32 tegra20_fuse_early(const unsigned int offset)
  42. {
  43. return 0;
  44. }
  45. #endif
  46. #ifdef CONFIG_ARCH_TEGRA_3x_SOC
  47. void tegra30_init_speedo_data(struct tegra_sku_info *sku_info);
  48. #else
  49. static inline void tegra30_init_speedo_data(struct tegra_sku_info *sku_info) {}
  50. #endif
  51. #ifdef CONFIG_ARCH_TEGRA_114_SOC
  52. void tegra114_init_speedo_data(struct tegra_sku_info *sku_info);
  53. #else
  54. static inline void tegra114_init_speedo_data(struct tegra_sku_info *sku_info) {}
  55. #endif
  56. #ifdef CONFIG_ARCH_TEGRA_124_SOC
  57. void tegra124_init_speedo_data(struct tegra_sku_info *sku_info);
  58. #else
  59. static inline void tegra124_init_speedo_data(struct tegra_sku_info *sku_info) {}
  60. #endif
  61. #endif