fuse.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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 __MACH_TEGRA_FUSE_H
  19. #define __MACH_TEGRA_FUSE_H
  20. #define SKU_ID_T20 8
  21. #define SKU_ID_T25SE 20
  22. #define SKU_ID_AP25 23
  23. #define SKU_ID_T25 24
  24. #define SKU_ID_AP25E 27
  25. #define SKU_ID_T25E 28
  26. #define TEGRA20 0x20
  27. #define TEGRA30 0x30
  28. #define TEGRA114 0x35
  29. #ifndef __ASSEMBLY__
  30. enum tegra_revision {
  31. TEGRA_REVISION_UNKNOWN = 0,
  32. TEGRA_REVISION_A01,
  33. TEGRA_REVISION_A02,
  34. TEGRA_REVISION_A03,
  35. TEGRA_REVISION_A03p,
  36. TEGRA_REVISION_A04,
  37. TEGRA_REVISION_MAX,
  38. };
  39. extern int tegra_sku_id;
  40. extern int tegra_cpu_process_id;
  41. extern int tegra_core_process_id;
  42. extern int tegra_chip_id;
  43. extern int tegra_cpu_speedo_id; /* only exist in Tegra30 and later */
  44. extern int tegra_soc_speedo_id;
  45. extern enum tegra_revision tegra_revision;
  46. extern int tegra_bct_strapping;
  47. unsigned long long tegra_chip_uid(void);
  48. void tegra_init_fuse(void);
  49. bool tegra_spare_fuse(int bit);
  50. u32 tegra_fuse_readl(unsigned long offset);
  51. #ifdef CONFIG_ARCH_TEGRA_2x_SOC
  52. void tegra20_init_speedo_data(void);
  53. #else
  54. static inline void tegra20_init_speedo_data(void) {}
  55. #endif
  56. #ifdef CONFIG_ARCH_TEGRA_3x_SOC
  57. void tegra30_init_speedo_data(void);
  58. #else
  59. static inline void tegra30_init_speedo_data(void) {}
  60. #endif
  61. #ifdef CONFIG_ARCH_TEGRA_114_SOC
  62. void tegra114_init_speedo_data(void);
  63. #else
  64. static inline void tegra114_init_speedo_data(void) {}
  65. #endif
  66. #endif /* __ASSEMBLY__ */
  67. #endif