fuse.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. * Copyright (C) 2010 Google, Inc.
  3. *
  4. * Author:
  5. * Colin Cross <ccross@android.com>
  6. *
  7. * This software is licensed under the terms of the GNU General Public
  8. * License version 2, as published by the Free Software Foundation, and
  9. * may be copied, distributed, and modified under those terms.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. */
  17. #ifndef __MACH_TEGRA_FUSE_H
  18. #define __MACH_TEGRA_FUSE_H
  19. enum tegra_revision {
  20. TEGRA_REVISION_UNKNOWN = 0,
  21. TEGRA_REVISION_A01,
  22. TEGRA_REVISION_A02,
  23. TEGRA_REVISION_A03,
  24. TEGRA_REVISION_A03p,
  25. TEGRA_REVISION_A04,
  26. TEGRA_REVISION_MAX,
  27. };
  28. #define SKU_ID_T20 8
  29. #define SKU_ID_T25SE 20
  30. #define SKU_ID_AP25 23
  31. #define SKU_ID_T25 24
  32. #define SKU_ID_AP25E 27
  33. #define SKU_ID_T25E 28
  34. #define TEGRA20 0x20
  35. #define TEGRA30 0x30
  36. extern int tegra_sku_id;
  37. extern int tegra_cpu_process_id;
  38. extern int tegra_core_process_id;
  39. extern int tegra_chip_id;
  40. extern int tegra_cpu_speedo_id; /* only exist in Tegra30 and later */
  41. extern int tegra_soc_speedo_id;
  42. extern enum tegra_revision tegra_revision;
  43. extern int tegra_bct_strapping;
  44. unsigned long long tegra_chip_uid(void);
  45. void tegra_init_fuse(void);
  46. bool tegra_spare_fuse(int bit);
  47. u32 tegra_fuse_readl(unsigned long offset);
  48. #ifdef CONFIG_ARCH_TEGRA_2x_SOC
  49. void tegra20_init_speedo_data(void);
  50. #else
  51. static inline void tegra20_init_speedo_data(void) {}
  52. #endif
  53. #ifdef CONFIG_ARCH_TEGRA_3x_SOC
  54. void tegra30_init_speedo_data(void);
  55. #else
  56. static inline void tegra30_init_speedo_data(void) {}
  57. #endif
  58. #endif