fuse.h 1.9 KB

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