tree: drop last paragraph of GPL copyright header
[coreboot.git] / src / soc / nvidia / tegra210 / ram_code.c
blob8715410e76888b3c2b89b61e389461659016cc43
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.
17 #include <arch/io.h>
18 #include <soc/addressmap.h>
19 #include <soc/sdram.h>
20 #include <soc/nvidia/tegra/apbmisc.h>
22 uint32_t sdram_get_ram_code(void)
24 struct apbmisc *misc = (struct apbmisc *)TEGRA_APB_MISC_BASE;
26 return (read32(&misc->pp_strapping_opt_a) &
27 PP_STRAPPING_OPT_A_RAM_CODE_MASK) >>
28 PP_STRAPPING_OPT_A_RAM_CODE_SHIFT;