Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 296076
b: refs/heads/master
c: dee4718
h: refs/heads/master
v: v3
  • Loading branch information
Olof Johansson committed Feb 7, 2012
1 parent 56b2600 commit 1014dfc
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9a1086da345cea8b2d1f01b47e5bbd81d640d642
refs/heads/master: dee47183301983139fd0ed784d0defe0ba08f8f6
14 changes: 14 additions & 0 deletions trunk/arch/arm/mach-tegra/fuse.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,17 @@ int tegra_cpu_process_id;
int tegra_core_process_id;
enum tegra_revision tegra_revision;

/* The BCT to use at boot is specified by board straps that can be read
* through a APB misc register and decoded. 2 bits, i.e. 4 possible BCTs.
*/
int tegra_bct_strapping;

#define STRAP_OPT 0x008
#define GMI_AD0 (1 << 4)
#define GMI_AD1 (1 << 5)
#define RAM_ID_MASK (GMI_AD0 | GMI_AD1)
#define RAM_CODE_SHIFT 4

static const char *tegra_revision_name[TEGRA_REVISION_MAX] = {
[TEGRA_REVISION_UNKNOWN] = "unknown",
[TEGRA_REVISION_A01] = "A01",
Expand Down Expand Up @@ -93,6 +104,9 @@ void tegra_init_fuse(void)
reg = tegra_fuse_readl(FUSE_SPARE_BIT);
tegra_core_process_id = (reg >> 12) & 3;

reg = tegra_apb_readl(TEGRA_APB_MISC_BASE + STRAP_OPT);
tegra_bct_strapping = (reg & RAM_ID_MASK) >> RAM_CODE_SHIFT;

tegra_revision = tegra_get_revision();

pr_info("Tegra Revision: %s SKU: %d CPU Process: %d Core Process: %d\n",
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/arm/mach-tegra/fuse.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ extern int tegra_cpu_process_id;
extern int tegra_core_process_id;
extern enum tegra_revision tegra_revision;

extern int tegra_bct_strapping;

unsigned long long tegra_chip_uid(void);
void tegra_init_fuse(void);

Expand Down

0 comments on commit 1014dfc

Please sign in to comment.