aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-handheld-4.0/h1940/0007-ARM-s3c24xx-h1940-unlock-reset-button.patch
diff options
context:
space:
mode:
authorAndrea Adami <andrea.adami@gmail.com>2015-04-23 00:26:47 +0200
committerAndrea Adami <andrea.adami@gmail.com>2015-04-23 00:32:52 +0200
commit2fe256495cbc7cc477d67fe5de5693884e8591b6 (patch)
tree172add987e2a45f9190701c494b6e64b5c722725 /recipes-kernel/linux/linux-handheld-4.0/h1940/0007-ARM-s3c24xx-h1940-unlock-reset-button.patch
parentdd8a5c0df939e8142c10d1aa719f6f1ccd331abe (diff)
downloadmeta-handheld-2fe256495cbc7cc477d67fe5de5693884e8591b6.tar.gz
linux-handheld_4.0: add ipaq h1940 patches and defconfig
Patches provided and tested by Vasily Khoruzhick <anarsoul@gmail.com> Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Diffstat (limited to 'recipes-kernel/linux/linux-handheld-4.0/h1940/0007-ARM-s3c24xx-h1940-unlock-reset-button.patch')
-rw-r--r--recipes-kernel/linux/linux-handheld-4.0/h1940/0007-ARM-s3c24xx-h1940-unlock-reset-button.patch52
1 files changed, 52 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-handheld-4.0/h1940/0007-ARM-s3c24xx-h1940-unlock-reset-button.patch b/recipes-kernel/linux/linux-handheld-4.0/h1940/0007-ARM-s3c24xx-h1940-unlock-reset-button.patch
new file mode 100644
index 0000000..1ec8f37
--- /dev/null
+++ b/recipes-kernel/linux/linux-handheld-4.0/h1940/0007-ARM-s3c24xx-h1940-unlock-reset-button.patch
@@ -0,0 +1,52 @@
+From b909cde86ea2b4327c5deac71756ee7a6bff89d6 Mon Sep 17 00:00:00 2001
+From: Vasily Khoruzhick <anarsoul@gmail.com>
+Date: Sat, 3 Dec 2011 12:12:21 +0300
+Subject: [PATCH 07/15] ARM: s3c24xx: h1940: unlock reset button
+
+Reset button can be left locked by bootloader and in case of kernel panic
+user won't be able to reset a device by pressing reset button.
+
+Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
+---
+ arch/arm/mach-s3c24xx/mach-h1940.c | 17 +++++++++++++++--
+ 1 file changed, 15 insertions(+), 2 deletions(-)
+
+diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c
+index 0f2648c..55653e8 100644
+--- a/arch/arm/mach-s3c24xx/mach-h1940.c
++++ b/arch/arm/mach-s3c24xx/mach-h1940.c
+@@ -221,9 +221,9 @@ static struct s3c2410fb_mach_info h1940_fb_info __initdata = {
+ .gpcup = 0x0000ffff,
+ .gpcup_mask = 0xffffffff,
+ .gpdcon = 0xaa84aaa0,
+- .gpdcon_mask = 0xffffffff,
++ .gpdcon_mask = 0xfffffff3,
+ .gpdup = 0x0000faff,
+- .gpdup_mask = 0xffffffff,
++ .gpdup_mask = 0xfffffffd,
+ };
+
+ static int power_supply_init(struct device *dev)
+@@ -798,6 +798,19 @@ static void __init h1940_init(void)
+ gpio_direction_output(S3C2410_GPA(7), 0);
+ gpio_direction_output(H1940_LATCH_LED_FLASH, 0);
+
++ gpio_request(S3C2410_GPD(1), "Reset sense");
++ gpio_request(S3C2410_GPA(14), "Reset reset");
++ gpio_request(S3C2410_GPB(6), "Reset lock");
++ gpio_direction_input(S3C2410_GPD(1));
++ gpio_direction_output(S3C2410_GPA(14), 0);
++ if (gpio_get_value(S3C2410_GPD(1)))
++ gpio_set_value(S3C2410_GPA(14), 0);
++
++ gpio_direction_output(S3C2410_GPA(14), 1);
++ mdelay(100);
++ gpio_direction_output(S3C2410_GPB(6), 1);
++ gpio_direction_output(S3C2410_GPB(6), 0);
++
+ i2c_register_board_info(0, h1940_i2c_devices,
+ ARRAY_SIZE(h1940_i2c_devices));
+ }
+--
+2.3.5
+