| 1 |
|
| 2 |
|
| 3 |
#include <device/mmio.h> |
| 4 |
#include <soc/addressmap.h> |
| 5 |
|
| 6 |
#include "apbmisc.h" |
| 7 |
|
| 8 |
static struct apbmisc *misc = (struct apbmisc *)TEGRA_APB_MISC_BASE; |
| 9 |
|
| 10 |
void enable_jtag(void) |
| 11 |
{ |
| 12 |
write32(&misc->pp_config_ctl, PP_CONFIG_CTL_JTAG); |
| 13 |
} |
| 14 |
|
| 15 |
void clamp_tristate_inputs(void) |
| 16 |
{ |
| 17 |
write32(&misc->pp_pinmux_global, PP_PINMUX_CLAMP_INPUTS); |
| 18 |
} |
| 19 |
|
| 20 |
void tegra_revision_info(struct tegra_revision *id) |
| 21 |
{ |
| 22 |
uintptr_t gp_hidrev= (uintptr_t)TEGRA_APB_MISC_BASE + MISC_GP_HIDREV; |
| 23 |
uint32_t reg; |
| 24 |
|
| 25 |
reg = read32((void *)(gp_hidrev)); |
| 26 |
|
| 27 |
id->hid_fam = (reg >> 0) & 0x0f; |
| 28 |
id->chip_id = (reg >> 8) & 0xff; |
| 29 |
id->major = (reg >> 4) & 0x0f; |
| 30 |
id->minor = (reg >> 16) & 0x07; |
| 31 |
} |