else
platform_device_register(&ardbeg_audio_device_rt5639);
- //tegra_ram_console_debug_init();
tegra_io_dpd_init();
ardbeg_sdhci_init();
if (board_info.board_id == BOARD_PM359 ||
static void __init ardbeg_ramconsole_reserve(unsigned long size)
{
- tegra_ram_console_debug_reserve(SZ_1M);
+ tegra_reserve_ramoops_memory(SZ_1M);
}
static void __init tegra_ardbeg_init_early(void)
/*
* arch/arm/mach-tegra/board-dalmore.c
*
- * Copyright (c) 2012-2013, NVIDIA CORPORATION. All rights reserved.
+ * Copyright (c) 2012-2014, NVIDIA CORPORATION. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
dalmore_uart_init();
dalmore_audio_init();
platform_add_devices(dalmore_devices, ARRAY_SIZE(dalmore_devices));
- //tegra_ram_console_debug_init();
tegra_io_dpd_init();
dalmore_regulator_init();
dalmore_sdhci_init();
static void __init dalmore_ramconsole_reserve(unsigned long size)
{
- tegra_ram_console_debug_reserve(SZ_1M);
+ tegra_reserve_ramoops_memory(SZ_1M);
}
static void __init tegra_dalmore_dt_init(void)
/*
* arch/arm/mach-tegra/board-loki.c
*
- * Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved.
+ * Copyright (c) 2013-2014, NVIDIA CORPORATION. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
loki_uart_init();
loki_audio_init();
platform_add_devices(loki_devices, ARRAY_SIZE(loki_devices));
- //tegra_ram_console_debug_init();
tegra_io_dpd_init();
loki_sdhci_init();
loki_regulator_init();
static void __init loki_ramconsole_reserve(unsigned long size)
{
- tegra_ram_console_debug_reserve(SZ_1M);
+ tegra_reserve_ramoops_memory(SZ_1M);
}
static void __init tegra_loki_dt_init(void)
/*
* arch/arm/mach-tegra/board-macallan.c
*
- * Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved.
+ * Copyright (c) 2013-2014, NVIDIA CORPORATION. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
macallan_uart_init();
macallan_audio_init();
platform_add_devices(macallan_devices, ARRAY_SIZE(macallan_devices));
- //tegra_ram_console_debug_init();
tegra_io_dpd_init();
macallan_regulator_init();
macallan_sdhci_init();
static void __init macallan_ramconsole_reserve(unsigned long size)
{
- tegra_ram_console_debug_reserve(SZ_1M);
+ tegra_reserve_ramoops_memory(SZ_1M);
}
static void __init tegra_macallan_dt_init(void)
/*
* arch/arm/mach-tegra/board-pismo.c
*
- * Copyright (c) 2012-2013, NVIDIA CORPORATION. All rights reserved.
+ * Copyright (c) 2012-2014, NVIDIA CORPORATION. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
pismo_uart_init();
pismo_audio_init();
platform_add_devices(pismo_devices, ARRAY_SIZE(pismo_devices));
- //tegra_ram_console_debug_init();
tegra_io_dpd_init();
pismo_regulator_init();
pismo_sdhci_init();
static void __init pismo_ramconsole_reserve(unsigned long size)
{
- tegra_ram_console_debug_reserve(SZ_1M);
+ tegra_reserve_ramoops_memory(SZ_1M);
}
#ifdef CONFIG_USE_OF
/*
* arch/arm/mach-tegra/board-pluto.c
*
- * Copyright (c) 2012-2013, NVIDIA CORPORATION. All rights reserved.
+ * Copyright (c) 2012-2014, NVIDIA CORPORATION. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
pluto_uart_init();
pluto_audio_init();
platform_add_devices(pluto_devices, ARRAY_SIZE(pluto_devices));
- //tegra_ram_console_debug_init();
tegra_io_dpd_init();
pluto_sdhci_init();
pluto_regulator_init();
static void __init pluto_ramconsole_reserve(unsigned long size)
{
- tegra_ram_console_debug_reserve(SZ_1M);
+ tegra_reserve_ramoops_memory(SZ_1M);
}
static void __init tegra_pluto_dt_init(void)
/*
* arch/arm/mach-tegra/board-roth.c
*
- * Copyright (c) 2012-2013, NVIDIA CORPORATION. All rights reserved.
+ * Copyright (c) 2012-2014, NVIDIA CORPORATION. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
roth_led_init();
roth_audio_init();
platform_add_devices(roth_devices, ARRAY_SIZE(roth_devices));
- //tegra_ram_console_debug_init();
tegra_io_dpd_init();
roth_regulator_init();
roth_sdhci_init();
static void __init roth_ramconsole_reserve(unsigned long size)
{
- tegra_ram_console_debug_reserve(SZ_1M);
+ tegra_reserve_ramoops_memory(SZ_1M);
}
#ifdef CONFIG_USE_OF
static void __init vcm30_t124_ramconsole_reserve(unsigned long size)
{
- tegra_ram_console_debug_reserve(SZ_1M);
+ tegra_reserve_ramoops_memory(SZ_1M);
}
static void __init tegra_vcm30_t124_dt_init(void)
* arch/arm/mach-tegra/board.h
*
* Copyright (C) 2010 Google, Inc.
- * Copyright (c) 2011-2013, NVIDIA CORPORATION. All rights reserved.
+ * Copyright (c) 2011-2014, NVIDIA CORPORATION. All rights reserved.
*
* Author:
* Colin Cross <ccross@google.com>
int __init tegra_register_fuse(void);
#ifdef CONFIG_PSTORE_RAM
-void __init tegra_ram_console_debug_reserve(unsigned long ram_console_size);
+void __init tegra_reserve_ramoops_memory(unsigned long ram_console_size);
#else
-static inline void __init tegra_ram_console_debug_reserve(unsigned long ram_console_size)
+static inline void __init
+ tegra_reserve_ramoops_memory(unsigned long ram_console_size)
{}
#endif
tegra_init_power();
tegra_init_ahb_gizmo_settings();
tegra_init_debug_uart_rate();
- tegra_ram_console_debug_reserve(SZ_1M);
}
#endif
#ifdef CONFIG_ARCH_TEGRA_3x_SOC
tegra_init_power();
tegra_init_ahb_gizmo_settings();
tegra_init_debug_uart_rate();
- tegra_ram_console_debug_reserve(SZ_1M);
init_dma_coherent_pool_size(SZ_1M);
}
tegra_init_power();
tegra_init_ahb_gizmo_settings();
tegra_init_debug_uart_rate();
- tegra_ram_console_debug_reserve(SZ_1M);
}
#endif
static int __init tegra_lp0_vec_arg(char *options)
}
#ifdef CONFIG_PSTORE_RAM
-static struct persistent_ram_descriptor desc = {
+static struct ramoops_platform_data ramoops_data;
+
+static struct platform_device ramoops_dev = {
.name = "ramoops",
+ .dev = {
+ .platform_data = &ramoops_data,
+ },
};
-static struct persistent_ram ram = {
- .descs = &desc,
- .num_descs = 1,
-};
-void __init tegra_ram_console_debug_reserve(unsigned long ram_console_size)
+void __init tegra_reserve_ramoops_memory(unsigned long reserve_size)
{
- int ret;
-
- ram.start = memblock_end_of_DRAM() - ram_console_size;
- ram.size = ram_console_size;
- ram.descs->size = ram_console_size;
-
- INIT_LIST_HEAD(&ram.node);
-
- ret = persistent_ram_early_init(&ram);
- if (ret)
- goto fail;
-
- return;
+ ramoops_data.mem_size = reserve_size;
+ ramoops_data.mem_address = memblock_end_of_4G() - reserve_size;
+ ramoops_data.console_size = reserve_size;
+ ramoops_data.dump_oops = 1;
+ memblock_reserve(ramoops_data.mem_address, ramoops_data.mem_size);
+}
-fail:
- pr_err("Failed to reserve memory block for ram console\n");
+static void __init tegra_register_ramoops_device()
+{
+ if (platform_device_register(&ramoops_dev))
+ pr_info("Unable to register ramoops platform device\n");
}
+core_initcall(tegra_register_ramoops_device);
#endif
int __init tegra_register_fuse(void)