Remove address from GPLv2 headers
[coreboot.git] / src / soc / nvidia / tegra / apbmisc.c
blob0701c6011be213af95cf06dfa4c3eaa791a4e835
1 /*
2 * This file is part of the coreboot project.
4 * Copyright 2014 Google Inc.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc.
20 #include <arch/io.h>
21 #include <soc/addressmap.h>
23 #include "apbmisc.h"
25 static struct apbmisc *misc = (struct apbmisc *)TEGRA_APB_MISC_BASE;
27 void enable_jtag(void)
29 write32(&misc->pp_config_ctl, PP_CONFIG_CTL_JTAG);
32 void clamp_tristate_inputs(void)
34 write32(&misc->pp_pinmux_global, PP_PINMUX_CLAMP_INPUTS);
37 void tegra_revision_info(struct tegra_revision *id)
39 uintptr_t gp_hidrev= (uintptr_t)TEGRA_APB_MISC_BASE + MISC_GP_HIDREV;
40 uint32_t reg;
42 reg = read32((void *)(gp_hidrev));
44 id->hid_fam = (reg >> 0) & 0x0f;
45 id->chip_id = (reg >> 8) & 0xff;
46 id->major = (reg >> 4) & 0x0f;
47 id->minor = (reg >> 16) & 0x07;