[PATCH 07/18] tegra: add Tegra3 mem initcall
Lucas Stach
dev at lynxeye.de
Sun Apr 13 06:27:37 PDT 2014
Signed-off-by: Lucas Stach <dev at lynxeye.de>
---
arch/arm/mach-tegra/tegra20.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-tegra/tegra20.c b/arch/arm/mach-tegra/tegra20.c
index cc2d74864140..0d76df9844dd 100644
--- a/arch/arm/mach-tegra/tegra20.c
+++ b/arch/arm/mach-tegra/tegra20.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013 Lucas Stach <l.stach at pengutronix.de>
+ * Copyright (C) 2013-2014 Lucas Stach <l.stach at pengutronix.de>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
@@ -58,8 +58,22 @@ console_initcall(tegra20_add_debug_console);
static int tegra20_mem_init(void)
{
+ if (!of_machine_is_compatible("nvidia,tegra20"))
+ return 0;
+
arm_add_mem_device("ram0", 0x0, tegra20_get_ramsize());
return 0;
}
mem_initcall(tegra20_mem_init);
+
+static int tegra30_mem_init(void)
+{
+ if (!of_machine_is_compatible("nvidia,tegra30"))
+ return 0;
+
+ arm_add_mem_device("ram0", SZ_2G, tegra30_get_ramsize());
+
+ return 0;
+}
+mem_initcall(tegra30_mem_init);
--
1.9.0
More information about the barebox
mailing list