fuse.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. #define TEGRA124 0x40
  30. #ifndef __ASSEMBLY__
  31. enum tegra_revision {
  32. TEGRA_REVISION_UNKNOWN = 0,
  33. TEGRA_REVISION_A01,
  34. TEGRA_REVISION_A02,
  35. TEGRA_REVISION_A03,
  36. TEGRA_REVISION_A03p,
  37. TEGRA_REVISION_A04,
  38. TEGRA_REVISION_MAX,
  39. };
  40. extern int tegra_sku_id;
  41. extern int tegra_cpu_process_id;
  42. extern int tegra_core_process_id;
  43. extern int tegra_chip_id;
  44. extern int tegra_cpu_speedo_id; /* only exist in Tegra30 and later */
  45. extern int tegra_soc_speedo_id;
  46. extern enum tegra_revision tegra_revision;
  47. extern int tegra_bct_strapping;
  48. unsigned long long tegra_chip_uid(void);
  49. void tegra_init_fuse(void);
  50. bool tegra_spare_fuse(int bit);
  51. u32 tegra_fuse_readl(unsigned long offset);
  52. #ifdef CONFIG_ARCH_TEGRA_2x_SOC
  53. void tegra20_init_speedo_data(void);
  54. #else
  55. static inline void tegra20_init_speedo_data(void) {}
  56. #endif
  57. #ifdef CONFIG_ARCH_TEGRA_3x_SOC
  58. void tegra30_init_speedo_data(void);
  59. #else
  60. static inline void tegra30_init_speedo_data(void) {}
  61. #endif
  62. #ifdef CONFIG_ARCH_TEGRA_114_SOC
  63. void tegra114_init_speedo_data(void);
  64. #else
  65. static inline void tegra114_init_speedo_data(void) {}
  66. #endif
  67. #endif /* __ASSEMBLY__ */
  68. #endif