Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: tegra: fuse: add bct strapping reading

This is used by the memory setup code to pick the right memory
timing table, if needed.

Signed-off-by: Olof Johansson <olof@lixom.net>

+16
+14
arch/arm/mach-tegra/fuse.c
··· 35 35 int tegra_core_process_id; 36 36 enum tegra_revision tegra_revision; 37 37 38 + /* The BCT to use at boot is specified by board straps that can be read 39 + * through a APB misc register and decoded. 2 bits, i.e. 4 possible BCTs. 40 + */ 41 + int tegra_bct_strapping; 42 + 43 + #define STRAP_OPT 0x008 44 + #define GMI_AD0 (1 << 4) 45 + #define GMI_AD1 (1 << 5) 46 + #define RAM_ID_MASK (GMI_AD0 | GMI_AD1) 47 + #define RAM_CODE_SHIFT 4 48 + 38 49 static const char *tegra_revision_name[TEGRA_REVISION_MAX] = { 39 50 [TEGRA_REVISION_UNKNOWN] = "unknown", 40 51 [TEGRA_REVISION_A01] = "A01", ··· 103 92 104 93 reg = tegra_fuse_readl(FUSE_SPARE_BIT); 105 94 tegra_core_process_id = (reg >> 12) & 3; 95 + 96 + reg = tegra_apb_readl(TEGRA_APB_MISC_BASE + STRAP_OPT); 97 + tegra_bct_strapping = (reg & RAM_ID_MASK) >> RAM_CODE_SHIFT; 106 98 107 99 tegra_revision = tegra_get_revision(); 108 100
+2
arch/arm/mach-tegra/fuse.h
··· 40 40 extern int tegra_core_process_id; 41 41 extern enum tegra_revision tegra_revision; 42 42 43 + extern int tegra_bct_strapping; 44 + 43 45 unsigned long long tegra_chip_uid(void); 44 46 void tegra_init_fuse(void); 45 47