From 290e96f9916b2cd410aaa8a6e573a75e904cbdd4 Mon Sep 17 00:00:00 2001 From: Haley Teng Date: Tue, 27 Sep 2011 12:20:32 +0800 Subject: 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 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 Tested-by: Simone Willett Reviewed-on: http://git-master/r/74552 Reviewed-by: Rohan Somvanshi Tested-by: Rohan Somvanshi --- arch/arm/mach-tegra/board-enterprise.c | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) (limited to 'arch/arm/mach-tegra/board-enterprise.c') 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) -- cgit v1.2.3