summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-tegra/common.c')
-rw-r--r--arch/arm/mach-tegra/common.c47
1 files changed, 47 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c
index 0d1407b6b668..d5acd8bdea76 100644
--- a/arch/arm/mach-tegra/common.c
+++ b/arch/arm/mach-tegra/common.c
@@ -172,6 +172,9 @@ static __initdata struct tegra_clk_init_table common_clk_init_table[] = {
{ "pll_p_out4", "pll_p", 108000000, false },
{ "pll_m", "clk_m", 0, true },
{ "pll_m_out1", "pll_m", 120000000, true },
+//[ 0.000000] Failed to set parent pll_c_out1 for sclk (violates clock limit 240000000)
+//[ 0.000000] Unable to set parent pll_c_out1 of clock sclk: -22
+ { "pll_c_out1", "pll_c", 40000000, false },
{ "sclk", "pll_c_out1", 40000000, true },
{ "hclk", "sclk", 40000000, true },
{ "pclk", "hclk", 40000000, true },
@@ -466,6 +469,21 @@ static int __init tegra_lp0_vec_arg(char *options)
}
early_param("lp0_vec", tegra_lp0_vec_arg);
+static int __init tegra_bootloader_fb_arg0(char *options)
+{
+ char *p = options;
+
+ tegra_bootloader_fb_size = memparse(p, &p);
+ if (*p == '@')
+ tegra_bootloader_fb_start = memparse(p+1, &p);
+
+ pr_info("Found fbmem: %08lx@%08lx\n",
+ tegra_bootloader_fb_size, tegra_bootloader_fb_start);
+
+ return 0;
+}
+early_param("fbmem", tegra_bootloader_fb_arg0);
+
static int __init tegra_bootloader_fb_arg(char *options)
{
char *p = options;
@@ -496,6 +514,27 @@ static int __init tegra_bootloader_fb2_arg(char *options)
}
early_param("tegra_fbmem2", tegra_bootloader_fb2_arg);
+/* To specify NVIDIA carveout memory */
+static int __init parse_nvmem(char *p)
+{
+ unsigned long size, start;
+ char *endp;
+
+ size = memparse(p, &endp);
+ if (*endp == '@') {
+ start = memparse(endp + 1, NULL);
+ if (start && size) {
+ pr_info("Found nvmem: %08lx@%08lx\n", size, start);
+ tegra_carveout_start = start;
+ tegra_carveout_size = size;
+ return 0;
+ }
+ }
+
+ return -EINVAL;
+}
+early_param("nvmem", parse_nvmem);
+
static int __init tegra_sku_override(char *id)
{
char *p = id;
@@ -892,6 +931,9 @@ void __init tegra_reserve(unsigned long carveout_size, unsigned long fb_size,
tegra_carveout_size = 0;
} else
tegra_carveout_size = carveout_size;
+ } else {
+ /* special handling due to already reserved fbmem/nvmem */
+ fb2_size -= tegra_bootloader_fb_size;
}
if (fb2_size) {
@@ -906,6 +948,11 @@ void __init tegra_reserve(unsigned long carveout_size, unsigned long fb_size,
tegra_fb2_size = fb2_size;
}
+ if (!carveout_size) {
+ /* special handling due to already reserved fbmem/nvmem */
+ tegra_fb2_size += tegra_bootloader_fb_size;
+ }
+
if (fb_size) {
tegra_fb_start = memblock_end_of_DRAM() - fb_size;
if (memblock_remove(tegra_fb_start, fb_size)) {