pandora: enable android persistent_ram thing
authorGrazvydas Ignotas <notasas@gmail.com>
Wed, 20 Mar 2013 00:37:53 +0000 (02:37 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Wed, 20 Mar 2013 23:44:21 +0000 (01:44 +0200)
maybe will help debug mysterious kernel crashes

arch/arm/configs/omap3_pandora_defconfig
arch/arm/mach-omap2/board-omap3pandora.c

index 3c1a258..274cebb 100644 (file)
@@ -2923,7 +2923,8 @@ CONFIG_ANDROID=y
 CONFIG_ANDROID_BINDER_IPC=m
 CONFIG_ASHMEM=m
 CONFIG_ANDROID_LOGGER=m
-# CONFIG_ANDROID_RAM_CONSOLE is not set
+CONFIG_ANDROID_PERSISTENT_RAM=y
+CONFIG_ANDROID_RAM_CONSOLE=y
 # CONFIG_ANDROID_TIMED_OUTPUT is not set
 CONFIG_ANDROID_LOW_MEMORY_KILLER=m
 # CONFIG_ANDROID_SWITCH is not set
@@ -3429,6 +3430,9 @@ CONFIG_XZ_DEC_SPARC=y
 CONFIG_XZ_DEC_BCJ=y
 # CONFIG_XZ_DEC_TEST is not set
 CONFIG_DECOMPRESS_GZIP=y
+CONFIG_REED_SOLOMON=y
+CONFIG_REED_SOLOMON_ENC8=y
+CONFIG_REED_SOLOMON_DEC8=y
 CONFIG_HAS_IOMEM=y
 CONFIG_HAS_IOPORT=y
 CONFIG_HAS_DMA=y
index add4416..bb70256 100644 (file)
@@ -788,12 +788,18 @@ static struct ads7846_platform_data pandora_ads7846_cfg = {
        .get_pendown_state      = pandora_pendown_state,
 };
 
+static struct platform_device pandora_ram_console = {
+       .name   = "ram_console",
+       .id     = -1,
+};
+
 static struct platform_device *omap3pandora_devices[] __initdata = {
        &pandora_leds_gpio,
        &pandora_leds_pwm,
        &pandora_bl,
        &pandora_keys_gpio,
        &pandora_vwlan_device,
+       &pandora_ram_console,
 };
 
 static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
@@ -915,9 +921,32 @@ static int __init proc_pandora_init(void)
 fs_initcall(proc_pandora_init);
 #endif
 
+/* for debug.. */
+#include <../drivers/staging/android/persistent_ram.h>
+
+struct persistent_ram_descriptor ram_console_desc = {
+       .name           = "ram_console",
+       .size           = 0x20000,
+};
+
+struct persistent_ram ram_console_ram = {
+       .start          = 0x80fe0000,
+       .size           = 0x20000,
+       .num_descs      = 1,
+       .descs          = &ram_console_desc,
+};
+
+void __init pandora_reserve(void)
+{
+       omap_reserve();
+#ifdef CONFIG_ANDROID_PERSISTENT_RAM
+       persistent_ram_early_init(&ram_console_ram);
+#endif
+}
+
 MACHINE_START(OMAP3_PANDORA, "Pandora Handheld Console")
        .atag_offset    = 0x100,
-       .reserve        = omap_reserve,
+       .reserve        = pandora_reserve,
        .map_io         = omap3_map_io,
        .init_early     = omap35xx_init_early,
        .init_irq       = omap3_init_irq,