summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/board-enterprise.c
diff options
context:
space:
mode:
authorHaley Teng <hteng@nvidia.com>2011-09-27 12:20:32 +0800
committerRohan Somvanshi <rsomvanshi@nvidia.com>2012-01-12 09:50:08 -0800
commit290e96f9916b2cd410aaa8a6e573a75e904cbdd4 (patch)
tree00f61be3a850398031dcb862ff32a24e61813d96 /arch/arm/mach-tegra/board-enterprise.c
parent68b611ff55f049b6da29ebf8226549bea9d6342a (diff)
arm: tegra: move ram console to common codes
cleanup ram console related source codes and move most of the implementation in board files to common.c since ram console is a common debug mechanism. bug 873307 Signed-off-by: Haley Teng <hteng@nvidia.com> Reviewed-on: http://git-master/r/54598 Reviewed-on: http://git-master/r/66588 (cherry picked from commit 119ce36b7bed370a528dfebc80bd79698118248d) Change-Id: I8b769b422305101a97f1fbc99db4af48dc7d4f25 Reviewed-on: http://git-master/r/71961 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com> Reviewed-on: http://git-master/r/74552 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/board-enterprise.c')
-rw-r--r--arch/arm/mach-tegra/board-enterprise.c29
1 files changed, 2 insertions, 27 deletions
diff --git a/arch/arm/mach-tegra/board-enterprise.c b/arch/arm/mach-tegra/board-enterprise.c
index b5bedac1ae66..a16372056a38 100644
--- a/arch/arm/mach-tegra/board-enterprise.c
+++ b/arch/arm/mach-tegra/board-enterprise.c
@@ -510,19 +510,6 @@ static struct platform_device enterprise_audio_device = {
},
};
-static struct resource ram_console_resources[] = {
- {
- .flags = IORESOURCE_MEM,
- },
-};
-
-static struct platform_device ram_console_device = {
- .name = "ram_console",
- .id = -1,
- .num_resources = ARRAY_SIZE(ram_console_resources),
- .resource = ram_console_resources,
-};
-
static struct platform_device *enterprise_devices[] __initdata = {
&tegra_pmu_device,
&tegra_rtc_device,
@@ -544,7 +531,6 @@ static struct platform_device *enterprise_devices[] __initdata = {
#if defined(CONFIG_CRYPTO_DEV_TEGRA_AES)
&tegra_aes_device,
#endif
- &ram_console_device,
};
#define MXT_CONFIG_CRC 0x62F903
@@ -945,6 +931,7 @@ static void __init tegra_enterprise_init(void)
enterprise_usb_init();
enterprise_tsensor_init();
platform_add_devices(enterprise_devices, ARRAY_SIZE(enterprise_devices));
+ tegra_ram_console_debug_init();
enterprise_regulator_init();
enterprise_sdhci_init();
#ifdef CONFIG_TEGRA_EDP_LIMITS
@@ -970,19 +957,7 @@ static void __init tegra_enterprise_ramconsole_reserve(unsigned long size)
struct resource *res;
long ret;
- res = platform_get_resource(&ram_console_device, IORESOURCE_MEM, 0);
- if (!res) {
- pr_err("Failed to find memory resource for ram console\n");
- return;
- }
- res->start = memblock_end_of_DRAM() - size;
- res->end = res->start + size - 1;
- ret = memblock_remove(res->start, size);
- if (ret) {
- ram_console_device.resource = NULL;
- ram_console_device.num_resources = 0;
- pr_err("Failed to reserve memory block for ram console\n");
- }
+ tegra_ram_console_debug_reserve(SZ_1M);
}
static void __init tegra_enterprise_reserve(void)