diff options
author | Russell Senior <russell@personaltelco.net> | 2016-05-16 00:52:24 -0700 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2016-05-23 11:56:38 +0200 |
commit | f89a20a89aebe4767c606b4e04a6a3906e1ee26c (patch) | |
tree | 87d0ae9a08aa7b42cad3d2fe9cb632211d834ff9 /target/linux/ath25/patches-4.4/210-reset_button.patch | |
parent | c7efbd7dbb29238631efb7e8565c507284877644 (diff) | |
download | upstream-f89a20a89aebe4767c606b4e04a6a3906e1ee26c.tar.gz upstream-f89a20a89aebe4767c606b4e04a6a3906e1ee26c.tar.bz2 upstream-f89a20a89aebe4767c606b4e04a6a3906e1ee26c.zip |
ath25: update kernel from 3.18 to 4.4
Summary of changes:
* moved config-3.18 to config-4.4 and patches-3.18 to patches-4.4
* removed most of the first two patches, that seem to be upstream already
* changed deprecated/removed IRQF_DISABLED to zero following examples in upstream kernel patches
* added config line to disable device-tree to satisfy kernel configuration
* add new image generation code
Build tested and run tested on an Accton MR3201A.
Signed-off-by: Russell Senior <russell@personaltelco.net>
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Signed-off-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'target/linux/ath25/patches-4.4/210-reset_button.patch')
-rw-r--r-- | target/linux/ath25/patches-4.4/210-reset_button.patch | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/target/linux/ath25/patches-4.4/210-reset_button.patch b/target/linux/ath25/patches-4.4/210-reset_button.patch new file mode 100644 index 0000000000..34ef46bc52 --- /dev/null +++ b/target/linux/ath25/patches-4.4/210-reset_button.patch @@ -0,0 +1,71 @@ +--- a/arch/mips/ath25/Makefile ++++ b/arch/mips/ath25/Makefile +@@ -8,7 +8,7 @@ + # Copyright (C) 2006-2009 Felix Fietkau <nbd@openwrt.org> + # + +-obj-y += board.o prom.o devices.o ++obj-y += board.o prom.o devices.o reset.o + + obj-$(CONFIG_EARLY_PRINTK) += early_printk.o + +--- /dev/null ++++ b/arch/mips/ath25/reset.c +@@ -0,0 +1,57 @@ ++#include <linux/init.h> ++#include <linux/slab.h> ++#include <linux/platform_device.h> ++#include <linux/gpio_keys.h> ++#include <linux/input.h> ++#include <ath25_platform.h> ++#include "devices.h" ++ ++static int __init ++ar231x_init_reset(void) ++{ ++ struct platform_device *pdev; ++ struct gpio_keys_platform_data pdata; ++ struct gpio_keys_button *p; ++ int err; ++ ++ if (ath25_board.config->reset_config_gpio == 0xffff) ++ return -ENODEV; ++ ++ p = kzalloc(sizeof(*p), GFP_KERNEL); ++ if (!p) ++ goto err; ++ ++ p->desc = "reset"; ++ p->type = EV_KEY; ++ p->code = KEY_RESTART; ++ p->debounce_interval = 60; ++ p->gpio = ath25_board.config->reset_config_gpio; ++ ++ memset(&pdata, 0, sizeof(pdata)); ++ pdata.poll_interval = 20; ++ pdata.buttons = p; ++ pdata.nbuttons = 1; ++ ++ pdev = platform_device_alloc("gpio-keys-polled", 0); ++ if (!pdev) ++ goto err_free; ++ ++ err = platform_device_add_data(pdev, &pdata, sizeof(pdata)); ++ if (err) ++ goto err_put_pdev; ++ ++ err = platform_device_add(pdev); ++ if (err) ++ goto err_put_pdev; ++ ++ return 0; ++ ++err_put_pdev: ++ platform_device_put(pdev); ++err_free: ++ kfree(p); ++err: ++ return -ENOMEM; ++} ++ ++module_init(ar231x_init_reset); |