diff --git a/meta-lg/recipes-kernel/linux/linux-lg-hammerhead/0001-Fix-Hammerhead-backlight.patch b/meta-lg/recipes-kernel/linux/linux-lg-hammerhead/0001-Fix-Hammerhead-backlight.patch deleted file mode 100644 index 338d992ef..000000000 --- a/meta-lg/recipes-kernel/linux/linux-lg-hammerhead/0001-Fix-Hammerhead-backlight.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff --git a/drivers/video/backlight/lm3630a_bl.c b/drivers/video/backlight/lm3630a_bl.c -index 394deb4f5fde..ba24734f4354 100644 ---- a/drivers/video/backlight/lm3630a_bl.c -+++ b/drivers/video/backlight/lm3630a_bl.c -@@ -398,11 +398,11 @@ static int lm3630a_probe(struct i2c_client *client, - return -ENOMEM; - /* default values */ - pdata->leda_ctrl = LM3630A_LEDA_ENABLE; -- pdata->ledb_ctrl = LM3630A_LEDB_ENABLE; -+ pdata->ledb_ctrl = LM3630A_LEDB_ON_A; - pdata->leda_max_brt = LM3630A_MAX_BRIGHTNESS; - pdata->ledb_max_brt = LM3630A_MAX_BRIGHTNESS; -- pdata->leda_init_brt = 128; -- pdata->ledb_init_brt = LM3630A_MAX_BRIGHTNESS; -+ pdata->leda_init_brt = 180; -+ pdata->ledb_init_brt = 180; - } - pchip->pdata = pdata; - diff --git a/meta-lg/recipes-kernel/linux/linux-lg-hammerhead/0002-Add-ramconsole.patch b/meta-lg/recipes-kernel/linux/linux-lg-hammerhead/0002-Add-ramconsole.patch deleted file mode 100644 index aa7a04f10..000000000 --- a/meta-lg/recipes-kernel/linux/linux-lg-hammerhead/0002-Add-ramconsole.patch +++ /dev/null @@ -1,733 +0,0 @@ -diff --git a/drivers/android/Kconfig b/drivers/android/Kconfig -index 4c190f8d1f4c..a21346232990 100644 ---- a/drivers/android/Kconfig -+++ b/drivers/android/Kconfig -@@ -8,6 +8,22 @@ config ANDROID - - if ANDROID - -+config ANDROID_PERSISTENT_RAM -+ bool "Android persistent RAM" -+ select REED_SOLOMON -+ select REED_SOLOMON_ENC8 -+ select REED_SOLOMON_DEC8 -+ default n -+ ---help--- -+ Enables Android persistent RAM -+ -+config ANDROID_RAM_CONSOLE -+ bool "Android RAM buffer console" -+ select ANDROID_PERSISTENT_RAM -+ default n -+ ---help--- -+ Enables Android RAM console -+ - config ANDROID_BINDER_IPC - bool "Android Binder IPC Driver" - depends on MMU && !CPU_CACHE_VIVT -diff --git a/drivers/android/Makefile b/drivers/android/Makefile -index c7856e3200da..94953a07cbbf 100644 ---- a/drivers/android/Makefile -+++ b/drivers/android/Makefile -@@ -3,3 +3,6 @@ ccflags-y += -I$(src) # needed for trace events - obj-$(CONFIG_ANDROID_BINDERFS) += binderfs.o - obj-$(CONFIG_ANDROID_BINDER_IPC) += binder.o binder_alloc.o - obj-$(CONFIG_ANDROID_BINDER_IPC_SELFTEST) += binder_alloc_selftest.o -+ -+obj-$(CONFIG_ANDROID_PERSISTENT_RAM) += persistent_ram.o -+obj-$(CONFIG_ANDROID_RAM_CONSOLE) += ram_console.o -diff --git a/drivers/android/persistent_ram.c b/drivers/android/persistent_ram.c -new file mode 100644 -index 000000000000..3740e48da995 ---- /dev/null -+++ b/drivers/android/persistent_ram.c -@@ -0,0 +1,477 @@ -+/* -+ * Copyright (C) 2012 Google, Inc. -+ * -+ * This software is licensed under the terms of the GNU General Public -+ * License version 2, as published by the Free Software Foundation, and -+ * may be copied, distributed, and modified under those terms. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include "persistent_ram.h" -+ -+struct persistent_ram_buffer { -+ uint32_t sig; -+ atomic_t start; -+ atomic_t size; -+ uint8_t data[0]; -+}; -+ -+#define PERSISTENT_RAM_SIG (0x43474244) /* DBGC */ -+ -+static LIST_HEAD(persistent_ram_list); -+ -+static inline size_t buffer_size(struct persistent_ram_zone *prz) -+{ -+ return atomic_read(&prz->buffer->size); -+} -+ -+static inline size_t buffer_start(struct persistent_ram_zone *prz) -+{ -+ return atomic_read(&prz->buffer->start); -+} -+ -+/* increase and wrap the start pointer, returning the old value */ -+static inline size_t buffer_start_add(struct persistent_ram_zone *prz, size_t a) -+{ -+ int old; -+ int new; -+ -+ do { -+ old = atomic_read(&prz->buffer->start); -+ new = old + a; -+ while (unlikely(new > prz->buffer_size)) -+ new -= prz->buffer_size; -+ } while (atomic_cmpxchg(&prz->buffer->start, old, new) != old); -+ -+ return old; -+} -+ -+/* increase the size counter until it hits the max size */ -+static inline void buffer_size_add(struct persistent_ram_zone *prz, size_t a) -+{ -+ size_t old; -+ size_t new; -+ -+ if (atomic_read(&prz->buffer->size) == prz->buffer_size) -+ return; -+ -+ do { -+ old = atomic_read(&prz->buffer->size); -+ new = old + a; -+ if (new > prz->buffer_size) -+ new = prz->buffer_size; -+ } while (atomic_cmpxchg(&prz->buffer->size, old, new) != old); -+} -+ -+/* increase the size counter, retuning an error if it hits the max size */ -+static inline ssize_t buffer_size_add_clamp(struct persistent_ram_zone *prz, -+ size_t a) -+{ -+ size_t old; -+ size_t new; -+ -+ do { -+ old = atomic_read(&prz->buffer->size); -+ new = old + a; -+ if (new > prz->buffer_size) -+ return -ENOMEM; -+ } while (atomic_cmpxchg(&prz->buffer->size, old, new) != old); -+ -+ return 0; -+} -+ -+static void notrace persistent_ram_encode_rs8(struct persistent_ram_zone *prz, -+ uint8_t *data, size_t len, uint8_t *ecc) -+{ -+ int i; -+ uint16_t par[prz->ecc_size]; -+ -+ /* Initialize the parity buffer */ -+ memset(par, 0, sizeof(par)); -+ encode_rs8(prz->rs_decoder, data, len, par, 0); -+ for (i = 0; i < prz->ecc_size; i++) -+ ecc[i] = par[i]; -+} -+ -+static int persistent_ram_decode_rs8(struct persistent_ram_zone *prz, -+ void *data, size_t len, uint8_t *ecc) -+{ -+ int i; -+ uint16_t par[prz->ecc_size]; -+ -+ for (i = 0; i < prz->ecc_size; i++) -+ par[i] = ecc[i]; -+ return decode_rs8(prz->rs_decoder, data, par, len, -+ NULL, 0, NULL, 0, NULL); -+} -+ -+static void notrace persistent_ram_update_ecc(struct persistent_ram_zone *prz, -+ unsigned int start, unsigned int count) -+{ -+ struct persistent_ram_buffer *buffer = prz->buffer; -+ uint8_t *buffer_end = buffer->data + prz->buffer_size; -+ uint8_t *block; -+ uint8_t *par; -+ int ecc_block_size = prz->ecc_block_size; -+ int ecc_size = prz->ecc_size; -+ int size = prz->ecc_block_size; -+ -+ if (!prz->ecc) -+ return; -+ -+ block = buffer->data + (start & ~(ecc_block_size - 1)); -+ par = prz->par_buffer + (start / ecc_block_size) * prz->ecc_size; -+ -+ do { -+ if (block + ecc_block_size > buffer_end) -+ size = buffer_end - block; -+ persistent_ram_encode_rs8(prz, block, size, par); -+ block += ecc_block_size; -+ par += ecc_size; -+ } while (block < buffer->data + start + count); -+} -+ -+static void persistent_ram_update_header_ecc(struct persistent_ram_zone *prz) -+{ -+ struct persistent_ram_buffer *buffer = prz->buffer; -+ -+ if (!prz->ecc) -+ return; -+ -+ persistent_ram_encode_rs8(prz, (uint8_t *)buffer, sizeof(*buffer), -+ prz->par_header); -+} -+ -+static void persistent_ram_ecc_old(struct persistent_ram_zone *prz) -+{ -+ struct persistent_ram_buffer *buffer = prz->buffer; -+ uint8_t *block; -+ uint8_t *par; -+ -+ if (!prz->ecc) -+ return; -+ -+ block = buffer->data; -+ par = prz->par_buffer; -+ while (block < buffer->data + buffer_size(prz)) { -+ int numerr; -+ int size = prz->ecc_block_size; -+ if (block + size > buffer->data + prz->buffer_size) -+ size = buffer->data + prz->buffer_size - block; -+ numerr = persistent_ram_decode_rs8(prz, block, size, par); -+ if (numerr > 0) { -+ pr_devel("persistent_ram: error in block %p, %d\n", -+ block, numerr); -+ prz->corrected_bytes += numerr; -+ } else if (numerr < 0) { -+ pr_devel("persistent_ram: uncorrectable error in block %p\n", -+ block); -+ prz->bad_blocks++; -+ } -+ block += prz->ecc_block_size; -+ par += prz->ecc_size; -+ } -+} -+ -+static int persistent_ram_init_ecc(struct persistent_ram_zone *prz, -+ size_t buffer_size, struct persistent_ram *ram) -+{ -+ int numerr; -+ struct persistent_ram_buffer *buffer = prz->buffer; -+ int ecc_blocks; -+ -+ if (!prz->ecc) -+ return 0; -+ -+ prz->ecc_block_size = ram->ecc_block_size ?: 128; -+ prz->ecc_size = ram->ecc_size ?: 16; -+ prz->ecc_symsize = ram->ecc_symsize ?: 8; -+ prz->ecc_poly = ram->ecc_poly ?: 0x11d; -+ -+ ecc_blocks = DIV_ROUND_UP(prz->buffer_size - prz->ecc_size, -+ prz->ecc_block_size + prz->ecc_size); -+ prz->buffer_size -= (ecc_blocks + 1) * prz->ecc_size; -+ -+ if (prz->buffer_size > buffer_size) { -+ pr_err("persistent_ram: invalid size %zu, non-ecc datasize %zu\n", -+ buffer_size, prz->buffer_size); -+ return -EINVAL; -+ } -+ -+ prz->par_buffer = buffer->data + prz->buffer_size; -+ prz->par_header = prz->par_buffer + ecc_blocks * prz->ecc_size; -+ -+ /* -+ * first consecutive root is 0 -+ * primitive element to generate roots = 1 -+ */ -+ prz->rs_decoder = init_rs(prz->ecc_symsize, prz->ecc_poly, 0, 1, -+ prz->ecc_size); -+ if (prz->rs_decoder == NULL) { -+ pr_info("persistent_ram: init_rs failed\n"); -+ return -EINVAL; -+ } -+ -+ prz->corrected_bytes = 0; -+ prz->bad_blocks = 0; -+ -+ numerr = persistent_ram_decode_rs8(prz, buffer, sizeof(*buffer), -+ prz->par_header); -+ if (numerr > 0) { -+ pr_info("persistent_ram: error in header, %d\n", numerr); -+ prz->corrected_bytes += numerr; -+ } else if (numerr < 0) { -+ pr_info("persistent_ram: uncorrectable error in header\n"); -+ prz->bad_blocks++; -+ } -+ -+ return 0; -+} -+ -+ssize_t persistent_ram_ecc_string(struct persistent_ram_zone *prz, -+ char *str, size_t len) -+{ -+ ssize_t ret; -+ -+ if (prz->corrected_bytes || prz->bad_blocks) -+ ret = snprintf(str, len, "" -+ "\n%d Corrected bytes, %d unrecoverable blocks\n", -+ prz->corrected_bytes, prz->bad_blocks); -+ else -+ ret = snprintf(str, len, "\nNo errors detected\n"); -+ -+ return ret; -+} -+ -+static void notrace persistent_ram_update(struct persistent_ram_zone *prz, -+ const void *s, unsigned int start, unsigned int count) -+{ -+ struct persistent_ram_buffer *buffer = prz->buffer; -+ memcpy(buffer->data + start, s, count); -+ persistent_ram_update_ecc(prz, start, count); -+} -+ -+static void -+persistent_ram_save_old(struct persistent_ram_zone *prz) -+{ -+ struct persistent_ram_buffer *buffer = prz->buffer; -+ size_t size = buffer_size(prz); -+ size_t start = buffer_start(prz); -+ char *dest; -+ -+ persistent_ram_ecc_old(prz); -+ -+ dest = kmalloc(size, GFP_KERNEL); -+ if (dest == NULL) { -+ pr_err("persistent_ram: failed to allocate buffer\n"); -+ return; -+ } -+ -+ prz->old_log = dest; -+ prz->old_log_size = size; -+ memcpy(prz->old_log, &buffer->data[start], size - start); -+ memcpy(prz->old_log + size - start, &buffer->data[0], start); -+} -+ -+int notrace persistent_ram_write(struct persistent_ram_zone *prz, -+ const void *s, unsigned int count) -+{ -+ int rem; -+ int c = count; -+ size_t start; -+ -+ if (unlikely(c > prz->buffer_size)) { -+ s += c - prz->buffer_size; -+ c = prz->buffer_size; -+ } -+ -+ buffer_size_add_clamp(prz, c); -+ -+ start = buffer_start_add(prz, c); -+ -+ rem = prz->buffer_size - start; -+ if (unlikely(rem < c)) { -+ persistent_ram_update(prz, s, start, rem); -+ s += rem; -+ c -= rem; -+ start = 0; -+ } -+ persistent_ram_update(prz, s, start, c); -+ -+ persistent_ram_update_header_ecc(prz); -+ -+ return count; -+} -+ -+size_t persistent_ram_old_size(struct persistent_ram_zone *prz) -+{ -+ return prz->old_log_size; -+} -+ -+void *persistent_ram_old(struct persistent_ram_zone *prz) -+{ -+ return prz->old_log; -+} -+ -+void persistent_ram_free_old(struct persistent_ram_zone *prz) -+{ -+ kfree(prz->old_log); -+ prz->old_log = NULL; -+ prz->old_log_size = 0; -+} -+ -+static int persistent_ram_buffer_map(phys_addr_t start, phys_addr_t size, -+ struct persistent_ram_zone *prz) -+{ -+ struct page **pages; -+ phys_addr_t page_start; -+ unsigned int page_count; -+ pgprot_t prot; -+ unsigned int i; -+ -+ page_start = start - offset_in_page(start); -+ page_count = DIV_ROUND_UP(size + offset_in_page(start), PAGE_SIZE); -+ -+ prot = pgprot_noncached(PAGE_KERNEL); -+ -+ pages = kmalloc(sizeof(struct page *) * page_count, GFP_KERNEL); -+ if (!pages) { -+ pr_err("%s: Failed to allocate array for %u pages\n", __func__, -+ page_count); -+ return -ENOMEM; -+ } -+ -+ for (i = 0; i < page_count; i++) { -+ phys_addr_t addr = page_start + i * PAGE_SIZE; -+ pages[i] = pfn_to_page(addr >> PAGE_SHIFT); -+ } -+ prz->vaddr = vmap(pages, page_count, VM_MAP, prot); -+ kfree(pages); -+ if (!prz->vaddr) { -+ pr_err("%s: Failed to map %u pages\n", __func__, page_count); -+ return -ENOMEM; -+ } -+ -+ prz->buffer = prz->vaddr + offset_in_page(start); -+ prz->buffer_size = size - sizeof(struct persistent_ram_buffer); -+ -+ return 0; -+} -+ -+static int persistent_ram_buffer_init(const char *name, -+ struct persistent_ram_zone *prz, struct persistent_ram **ramp) -+{ -+ int i; -+ struct persistent_ram *ram; -+ struct persistent_ram_descriptor *desc; -+ phys_addr_t start; -+ -+ list_for_each_entry(ram, &persistent_ram_list, node) { -+ start = ram->start; -+ for (i = 0; i < ram->num_descs; i++) { -+ desc = &ram->descs[i]; -+ if (!strcmp(desc->name, name)) { -+ *ramp = ram; -+ return persistent_ram_buffer_map(start, -+ desc->size, prz); -+ } -+ start += desc->size; -+ } -+ } -+ -+ return -EINVAL; -+} -+ -+static -+struct persistent_ram_zone *__persistent_ram_init(struct device *dev, bool ecc) -+{ -+ struct persistent_ram *ram; -+ struct persistent_ram_zone *prz; -+ int ret = -ENOMEM; -+ -+ prz = kzalloc(sizeof(struct persistent_ram_zone), GFP_KERNEL); -+ if (!prz) { -+ pr_err("persistent_ram: failed to allocate persistent ram zone\n"); -+ goto err; -+ } -+ -+ INIT_LIST_HEAD(&prz->node); -+ -+ ret = persistent_ram_buffer_init(dev_name(dev), prz, &ram); -+ if (ret) { -+ pr_err("persistent_ram: failed to initialize buffer\n"); -+ goto err; -+ } -+ -+ prz->ecc = ecc; -+ ret = persistent_ram_init_ecc(prz, prz->buffer_size, ram); -+ if (ret) -+ goto err; -+ -+ if (prz->buffer->sig == PERSISTENT_RAM_SIG) { -+ if (buffer_size(prz) > prz->buffer_size || -+ buffer_start(prz) > buffer_size(prz)) -+ pr_info("persistent_ram: found existing invalid buffer," -+ " size %zu, start %zu\n", -+ buffer_size(prz), buffer_start(prz)); -+ else { -+ pr_info("persistent_ram: found existing buffer," -+ " size %zu, start %zu\n", -+ buffer_size(prz), buffer_start(prz)); -+ persistent_ram_save_old(prz); -+ } -+ } else { -+ pr_info("persistent_ram: no valid data in buffer" -+ " (sig = 0x%08x)\n", prz->buffer->sig); -+ } -+ -+ prz->buffer->sig = PERSISTENT_RAM_SIG; -+ atomic_set(&prz->buffer->start, 0); -+ atomic_set(&prz->buffer->size, 0); -+ -+ return prz; -+err: -+ kfree(prz); -+ return ERR_PTR(ret); -+} -+ -+struct persistent_ram_zone * -+persistent_ram_init_ringbuffer(struct device *dev, bool ecc) -+{ -+ return __persistent_ram_init(dev, ecc); -+} -+ -+int __init persistent_ram_early_init(struct persistent_ram *ram) -+{ -+ int ret; -+ -+ ret = memblock_reserve(ram->start, ram->size); -+ if (ret) { -+ pr_err("Failed to reserve persistent memory from %08lx-%08lx\n", -+ (long)ram->start, (long)(ram->start + ram->size - 1)); -+ return ret; -+ } -+ -+ list_add_tail(&ram->node, &persistent_ram_list); -+ -+ pr_info("Initialized persistent memory from %08lx-%08lx\n", -+ (long)ram->start, (long)(ram->start + ram->size - 1)); -+ -+ return 0; -+} -diff --git a/drivers/android/persistent_ram.h b/drivers/android/persistent_ram.h -new file mode 100644 -index 000000000000..22422171f3c0 ---- /dev/null -+++ b/drivers/android/persistent_ram.h -@@ -0,0 +1,83 @@ -+/* -+ * Copyright (C) 2011 Google, Inc. -+ * -+ * This software is licensed under the terms of the GNU General Public -+ * License version 2, as published by the Free Software Foundation, and -+ * may be copied, distributed, and modified under those terms. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ */ -+ -+#ifndef __LINUX_PERSISTENT_RAM_H__ -+#define __LINUX_PERSISTENT_RAM_H__ -+ -+#include -+#include -+#include -+#include -+ -+struct persistent_ram_buffer; -+ -+struct persistent_ram_descriptor { -+ const char *name; -+ phys_addr_t size; -+}; -+ -+struct persistent_ram { -+ phys_addr_t start; -+ phys_addr_t size; -+ -+ int ecc_block_size; -+ int ecc_size; -+ int ecc_symsize; -+ int ecc_poly; -+ -+ int num_descs; -+ struct persistent_ram_descriptor *descs; -+ -+ struct list_head node; -+}; -+ -+struct persistent_ram_zone { -+ struct list_head node; -+ void *vaddr; -+ struct persistent_ram_buffer *buffer; -+ size_t buffer_size; -+ -+ /* ECC correction */ -+ bool ecc; -+ char *par_buffer; -+ char *par_header; -+ struct rs_control *rs_decoder; -+ int corrected_bytes; -+ int bad_blocks; -+ int ecc_block_size; -+ int ecc_size; -+ int ecc_symsize; -+ int ecc_poly; -+ -+ char *old_log; -+ size_t old_log_size; -+ size_t old_log_footer_size; -+ bool early; -+}; -+ -+int persistent_ram_early_init(struct persistent_ram *ram); -+ -+struct persistent_ram_zone *persistent_ram_init_ringbuffer(struct device *dev, -+ bool ecc); -+ -+int persistent_ram_write(struct persistent_ram_zone *prz, const void *s, -+ unsigned int count); -+ -+size_t persistent_ram_old_size(struct persistent_ram_zone *prz); -+void *persistent_ram_old(struct persistent_ram_zone *prz); -+void persistent_ram_free_old(struct persistent_ram_zone *prz); -+ssize_t persistent_ram_ecc_string(struct persistent_ram_zone *prz, -+ char *str, size_t len); -+ -+#endif -diff --git a/drivers/android/ram_console.c b/drivers/android/ram_console.c -new file mode 100644 -index 000000000000..ec1a6d5fc2ec ---- /dev/null -+++ b/drivers/android/ram_console.c -@@ -0,0 +1,89 @@ -+/* drivers/android/ram_console.c -+ * -+ * Copyright (C) 2007-2008 Google, Inc. -+ * -+ * This software is licensed under the terms of the GNU General Public -+ * License version 2, as published by the Free Software Foundation, and -+ * may be copied, distributed, and modified under those terms. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include "ram_console.h" -+#include "persistent_ram.h" -+ -+static struct persistent_ram_zone *ram_console_zone; -+static const char *bootinfo; -+static size_t bootinfo_size; -+ -+static void -+ram_console_write(struct console *console, const char *s, unsigned int count) -+{ -+ struct persistent_ram_zone *prz = console->data; -+ persistent_ram_write(prz, s, count); -+} -+ -+static struct console ram_console = { -+ .name = "ram", -+ .write = ram_console_write, -+ .flags = CON_PRINTBUFFER | CON_ENABLED | CON_ANYTIME, -+ .index = -1, -+}; -+ -+void ram_console_enable_console(int enabled) -+{ -+ if (enabled) -+ ram_console.flags |= CON_ENABLED; -+ else -+ ram_console.flags &= ~CON_ENABLED; -+} -+ -+static int ram_console_probe(struct platform_device *pdev) -+{ -+ struct ram_console_platform_data *pdata = pdev->dev.platform_data; -+ struct persistent_ram_zone *prz; -+ -+ prz = persistent_ram_init_ringbuffer(&pdev->dev, true); -+ if (IS_ERR(prz)) -+ return PTR_ERR(prz); -+ -+ -+ if (pdata) { -+ bootinfo = kstrdup(pdata->bootinfo, GFP_KERNEL); -+ if (bootinfo) -+ bootinfo_size = strlen(bootinfo); -+ } -+ -+ ram_console_zone = prz; -+ ram_console.data = prz; -+ -+ register_console(&ram_console); -+ -+ return 0; -+} -+ -+static struct platform_driver ram_console_driver = { -+ .driver = { -+ .name = "ram_console", -+ }, -+ .probe = ram_console_probe, -+}; -+ -+static int __init ram_console_module_init(void) -+{ -+ return platform_driver_register(&ram_console_driver); -+} -+ -+postcore_initcall(ram_console_module_init); -diff --git a/drivers/android/ram_console.h b/drivers/android/ram_console.h -new file mode 100644 -index 000000000000..9f1125c11066 ---- /dev/null -+++ b/drivers/android/ram_console.h -@@ -0,0 +1,22 @@ -+/* -+ * Copyright (C) 2010 Google, Inc. -+ * -+ * This software is licensed under the terms of the GNU General Public -+ * License version 2, as published by the Free Software Foundation, and -+ * may be copied, distributed, and modified under those terms. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ */ -+ -+#ifndef _INCLUDE_LINUX_PLATFORM_DATA_RAM_CONSOLE_H_ -+#define _INCLUDE_LINUX_PLATFORM_DATA_RAM_CONSOLE_H_ -+ -+struct ram_console_platform_data { -+ const char *bootinfo; -+}; -+ -+#endif /* _INCLUDE_LINUX_PLATFORM_DATA_RAM_CONSOLE_H_ */ diff --git a/meta-lg/recipes-kernel/linux/linux-lg-hammerhead_git.bb b/meta-lg/recipes-kernel/linux/linux-lg-hammerhead_git.bb index 012709764..126582615 100644 --- a/meta-lg/recipes-kernel/linux/linux-lg-hammerhead_git.bb +++ b/meta-lg/recipes-kernel/linux/linux-lg-hammerhead_git.bb @@ -23,14 +23,12 @@ ANDROID_BOOTIMG_TAGS_RAM_BASE = "0x02700000" inherit kernel_android SRC_URI = " \ - git://gitlab.com/postmarketOS/linux-postmarketos.git;branch=postmarketos-linux-qcom \ - file://0001-Fix-Hammerhead-backlight.patch \ - file://0002-Add-ramconsole.patch \ + git://github.com/shr-distribution/linux.git;branch=hammerhead/4.16/postmarketos-linux-qcom \ file://defconfig \ " S = "${WORKDIR}/git" -SRCREV = "e9fc9b4e4a83c8a9fba2230ac91d5c75b9fcd4d8" +SRCREV = "49b3cbff652a8240f0470bd7d81e599234ab4d6e" KV = "4.17" PV = "${KV}+gitr${SRCPV}"