summaryrefslogtreecommitdiff
path: root/meta/packages
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2007-09-02 14:47:16 +0000
committerRichard Purdie <richard@openedhand.com>2007-09-02 14:47:16 +0000
commit3fadcdb07a809a2a90708f38c75f4150cb039c88 (patch)
treecb8762cba2513239abc329a59096d33d71109a30 /meta/packages
parentbe34d55db0ea7c4474b9a2b7c3c03b4dcee277fb (diff)
downloadopenembedded-core-3fadcdb07a809a2a90708f38c75f4150cb039c88.tar.gz
openembedded-core-3fadcdb07a809a2a90708f38c75f4150cb039c88.tar.bz2
openembedded-core-3fadcdb07a809a2a90708f38c75f4150cb039c88.zip
linux-rp: Sync with OE
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2654 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'meta/packages')
-rw-r--r--meta/packages/linux/linux-rp-2.6.20/pxa-serial-hack.patch50
-rw-r--r--meta/packages/linux/linux-rp-2.6.20/sharpsl-rc-r1.patch2
-rw-r--r--meta/packages/linux/linux-rp-2.6.21/connectplus-prevent-oops-HACK.patch17
-rw-r--r--meta/packages/linux/linux-rp-2.6.21/defconfig-spitz1
-rw-r--r--meta/packages/linux/linux-rp-2.6.21/sharpsl-rc-r1.patch519
-rw-r--r--meta/packages/linux/linux-rp.inc28
-rw-r--r--meta/packages/linux/linux-rp_2.6.21.bb26
7 files changed, 602 insertions, 41 deletions
diff --git a/meta/packages/linux/linux-rp-2.6.20/pxa-serial-hack.patch b/meta/packages/linux/linux-rp-2.6.20/pxa-serial-hack.patch
index 9ece71331a..bf20f46a05 100644
--- a/meta/packages/linux/linux-rp-2.6.20/pxa-serial-hack.patch
+++ b/meta/packages/linux/linux-rp-2.6.20/pxa-serial-hack.patch
@@ -5,28 +5,38 @@
include/linux/serial_core.h | 1 +
4 files changed, 16 insertions(+), 3 deletions(-)
-Index: git/drivers/serial/8250.c
+Index: linux-2.6.20/drivers/serial/8250.c
===================================================================
---- git.orig/drivers/serial/8250.c 2006-10-31 16:29:50.000000000 +0000
-+++ git/drivers/serial/8250.c 2006-10-31 16:29:53.000000000 +0000
-@@ -2429,7 +2429,12 @@ static struct uart_driver serial8250_reg
+--- linux-2.6.20.orig/drivers/serial/8250.c 2007-04-27 13:37:26.000000000 +0100
++++ linux-2.6.20/drivers/serial/8250.c 2007-04-27 13:38:16.000000000 +0100
+@@ -2429,7 +2429,12 @@
.driver_name = "serial",
.dev_name = "ttyS",
.major = TTY_MAJOR,
+#ifdef CONFIG_SERIAL_PXA
-+ .minor = 64 + 3,
-+ .name_base = 3,
++ .minor = 64 + 4,
++ .name_base = 4,
+#else
.minor = 64,
+#endif
.nr = UART_NR,
.cons = SERIAL8250_CONSOLE,
};
-Index: git/drivers/serial/serial_core.c
+Index: linux-2.6.20/drivers/serial/serial_core.c
===================================================================
---- git.orig/drivers/serial/serial_core.c 2006-10-31 16:09:17.000000000 +0000
-+++ git/drivers/serial/serial_core.c 2006-10-31 16:29:53.000000000 +0000
-@@ -2183,6 +2183,7 @@ int uart_register_driver(struct uart_dri
+--- linux-2.6.20.orig/drivers/serial/serial_core.c 2007-02-04 18:44:54.000000000 +0000
++++ linux-2.6.20/drivers/serial/serial_core.c 2007-04-27 13:39:39.000000000 +0100
+@@ -2068,7 +2068,8 @@
+ printk(KERN_INFO "%s%s%s%d at %s (irq = %d) is a %s\n",
+ port->dev ? port->dev->bus_id : "",
+ port->dev ? ": " : "",
+- drv->dev_name, port->line, address, port->irq, uart_type(port));
++ drv->dev_name, port->line + drv->name_base, address, port->irq,
++ uart_type(port));
+ }
+
+ static void
+@@ -2183,6 +2184,7 @@
normal->owner = drv->owner;
normal->driver_name = drv->driver_name;
normal->name = drv->dev_name;
@@ -34,11 +44,11 @@ Index: git/drivers/serial/serial_core.c
normal->major = drv->major;
normal->minor_start = drv->minor;
normal->type = TTY_DRIVER_TYPE_SERIAL;
-Index: git/include/linux/serial_core.h
+Index: linux-2.6.20/include/linux/serial_core.h
===================================================================
---- git.orig/include/linux/serial_core.h 2006-10-31 16:09:45.000000000 +0000
-+++ git/include/linux/serial_core.h 2006-10-31 16:30:36.000000000 +0000
-@@ -339,6 +339,7 @@ struct uart_driver {
+--- linux-2.6.20.orig/include/linux/serial_core.h 2007-02-04 18:44:54.000000000 +0000
++++ linux-2.6.20/include/linux/serial_core.h 2007-04-27 13:37:27.000000000 +0100
+@@ -341,6 +341,7 @@
struct module *owner;
const char *driver_name;
const char *dev_name;
@@ -46,11 +56,11 @@ Index: git/include/linux/serial_core.h
int major;
int minor;
int nr;
-Index: git/drivers/serial/serial_cs.c
+Index: linux-2.6.20/drivers/serial/serial_cs.c
===================================================================
---- git.orig/drivers/serial/serial_cs.c 2006-10-31 16:09:17.000000000 +0000
-+++ git/drivers/serial/serial_cs.c 2006-10-31 16:29:53.000000000 +0000
-@@ -390,7 +390,7 @@ static int setup_serial(struct pcmcia_de
+--- linux-2.6.20.orig/drivers/serial/serial_cs.c 2007-02-04 18:44:54.000000000 +0000
++++ linux-2.6.20/drivers/serial/serial_cs.c 2007-04-27 13:40:34.000000000 +0100
+@@ -390,7 +390,7 @@
kio_addr_t iobase, int irq)
{
struct uart_port port;
@@ -59,12 +69,12 @@ Index: git/drivers/serial/serial_cs.c
memset(&port, 0, sizeof (struct uart_port));
port.iobase = iobase;
-@@ -411,10 +411,16 @@ static int setup_serial(struct pcmcia_de
+@@ -411,10 +411,16 @@
return -EINVAL;
}
+#if CONFIG_SERIAL_PXA
-+ linestart = 3;
++ linestart = 4;
+#else
+ linestart = 0;
+#endif
diff --git a/meta/packages/linux/linux-rp-2.6.20/sharpsl-rc-r1.patch b/meta/packages/linux/linux-rp-2.6.20/sharpsl-rc-r1.patch
index 8230d53392..da83fdf5eb 100644
--- a/meta/packages/linux/linux-rp-2.6.20/sharpsl-rc-r1.patch
+++ b/meta/packages/linux/linux-rp-2.6.20/sharpsl-rc-r1.patch
@@ -298,7 +298,7 @@ Index: linux-2.6.20/drivers/input/keyboard/sharpsl_rc.c
+ pxa_gpio_mode(REMOTE_GPIO_INT | GPIO_IN);
+ ret = request_irq(REMOTE_IRQ_INT,
+ sharpsl_rc_interrupt,
-+ IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_SHARED,
++ IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_SHARED,
+ "sharpsl_rc",
+ sharpsl_rc);
+ if (ret < 0) {
diff --git a/meta/packages/linux/linux-rp-2.6.21/connectplus-prevent-oops-HACK.patch b/meta/packages/linux/linux-rp-2.6.21/connectplus-prevent-oops-HACK.patch
new file mode 100644
index 0000000000..b5439c62e7
--- /dev/null
+++ b/meta/packages/linux/linux-rp-2.6.21/connectplus-prevent-oops-HACK.patch
@@ -0,0 +1,17 @@
+Index: linux-2.6.21/drivers/net/wireless/hostap/hostap_hw.c
+===================================================================
+--- linux-2.6.21.orig/drivers/net/wireless/hostap/hostap_hw.c 2007-07-07 12:45:39.000000000 +0100
++++ linux-2.6.21/drivers/net/wireless/hostap/hostap_hw.c 2007-07-07 12:47:30.000000000 +0100
+@@ -2666,6 +2666,12 @@
+ iface = netdev_priv(dev);
+ local = iface->local;
+
++ if(dev->base_addr == 0)
++ {
++ printk(KERN_DEBUG "%s: IRQ before base_addr set\n", dev->name);
++ return IRQ_HANDLED;
++ }
++
+ prism2_io_debug_add(dev, PRISM2_IO_DEBUG_CMD_INTERRUPT, 0, 0);
+
+ if (local->func->card_present && !local->func->card_present(local)) {
diff --git a/meta/packages/linux/linux-rp-2.6.21/defconfig-spitz b/meta/packages/linux/linux-rp-2.6.21/defconfig-spitz
index 3dd84eac46..ce9b90066b 100644
--- a/meta/packages/linux/linux-rp-2.6.21/defconfig-spitz
+++ b/meta/packages/linux/linux-rp-2.6.21/defconfig-spitz
@@ -1778,3 +1778,4 @@ CONFIG_ZLIB_DEFLATE=m
CONFIG_PLIST=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
+CONFIG_SHARPSL_RC=m \ No newline at end of file
diff --git a/meta/packages/linux/linux-rp-2.6.21/sharpsl-rc-r1.patch b/meta/packages/linux/linux-rp-2.6.21/sharpsl-rc-r1.patch
new file mode 100644
index 0000000000..da83fdf5eb
--- /dev/null
+++ b/meta/packages/linux/linux-rp-2.6.21/sharpsl-rc-r1.patch
@@ -0,0 +1,519 @@
+Index: linux-2.6.20/arch/arm/mach-pxa/spitz.c
+===================================================================
+--- linux-2.6.20.orig/arch/arm/mach-pxa/spitz.c
++++ linux-2.6.20/arch/arm/mach-pxa/spitz.c
+@@ -244,6 +244,13 @@ static struct platform_device spitzkbd_d
+ .id = -1,
+ };
+
++/*
++ * Spitz Remote Control Device
++ */
++static struct platform_device sharpsl_rc_device = {
++ .name = "sharpsl-remote-control",
++ .id = -1,
++};
+
+ /*
+ * Spitz LEDs
+@@ -476,6 +483,7 @@ static struct platform_device *devices[]
+ &spitzscoop_device,
+ &spitzssp_device,
+ &spitzkbd_device,
++ &sharpsl_rc_device,
+ &spitzts_device,
+ &spitzbl_device,
+ &spitzled_device,
+Index: linux-2.6.20/drivers/input/keyboard/Kconfig
+===================================================================
+--- linux-2.6.20.orig/drivers/input/keyboard/Kconfig
++++ linux-2.6.20/drivers/input/keyboard/Kconfig
+@@ -154,6 +154,17 @@ config KEYBOARD_SPITZ
+ To compile this driver as a module, choose M here: the
+ module will be called spitzkbd.
+
++config SHARPSL_RC
++ tristate "Sharp SL-Cxx00 Remote Control"
++ depends on PXA_SHARPSL
++ default y
++ help
++ Say Y here to enable the remote on the Sharp Zaurus SL-Cxx00,
++ SL-C1000, SL-C3000 and Sl-C3100 series of PDAs.
++
++ To compile this driver as a module, choose M here: the
++ module will be called sharpsl_rc.
++
+ config KEYBOARD_AMIGA
+ tristate "Amiga keyboard"
+ depends on AMIGA
+Index: linux-2.6.20/drivers/input/keyboard/Makefile
+===================================================================
+--- linux-2.6.20.orig/drivers/input/keyboard/Makefile
++++ linux-2.6.20/drivers/input/keyboard/Makefile
+@@ -14,6 +14,7 @@ obj-$(CONFIG_KEYBOARD_NEWTON) += newton
+ obj-$(CONFIG_KEYBOARD_STOWAWAY) += stowaway.o
+ obj-$(CONFIG_KEYBOARD_CORGI) += corgikbd.o
+ obj-$(CONFIG_KEYBOARD_SPITZ) += spitzkbd.o
++obj-$(CONFIG_SHARPSL_RC) += sharpsl_rc.o
+ obj-$(CONFIG_KEYBOARD_HIL) += hil_kbd.o
+ obj-$(CONFIG_KEYBOARD_HIL_OLD) += hilkbd.o
+ obj-$(CONFIG_KEYBOARD_OMAP) += omap-keypad.o
+Index: linux-2.6.20/drivers/input/keyboard/sharpsl_rc.c
+===================================================================
+--- /dev/null
++++ linux-2.6.20/drivers/input/keyboard/sharpsl_rc.c
+@@ -0,0 +1,291 @@
++/*
++ * Keyboard driver for Sharp Clamshell Models (SL-Cxx00)
++ *
++ * Copyright (c) 2004-2005 Richard Purdie
++ *
++ * Based on corgikbd.c and Sharp's RC driver
++ *
++ * 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
++ * published by the Free Software Foundation.
++ *
++ */
++
++#define DEBUG 1
++#include <linux/delay.h>
++#include <linux/platform_device.h>
++#include <linux/init.h>
++#include <linux/input.h>
++#include <linux/interrupt.h>
++#include <linux/jiffies.h>
++#include <linux/module.h>
++#include <linux/slab.h>
++
++#ifdef CONFIG_MACH_SPITZ
++#include <asm/arch/spitz.h>
++#endif
++#ifdef CONFIG_MACH_CORGI
++#include <asm/arch/corgi.h>
++#endif
++
++#include <asm/arch/hardware.h>
++#include <asm/arch/pxa-regs.h>
++#include <asm/hardware/scoop.h>
++#include <asm/arch/sharpsl.h>
++#include <asm/hardware/sharpsl_pm.h>
++
++#define DPRINTK(fmt, args...) dev_dbg(data->dev, fmt "\n", ##args)
++
++struct remote_control_key {
++ unsigned char min;
++ unsigned char max;
++ unsigned char key;
++};
++
++#ifdef CONFIG_MACH_SPITZ
++#define REMOTE_AKIN_PULLUP SPITZ_SCP2_AKIN_PULLUP
++#define REMOTE_SCOOP_DEVICE spitzscoop2_device
++#define REMOTE_GPIO_INT SPITZ_GPIO_AK_INT
++#define REMOTE_IRQ_INT SPITZ_IRQ_GPIO_AK_INT
++static struct remote_control_key remote_keys[] = {
++ { 25, 35, KEY_STOPCD},
++ { 55, 65, KEY_PLAYPAUSE},
++ { 85, 95, KEY_NEXTSONG},
++ { 115, 125, KEY_VOLUMEUP},
++ { 145, 155, KEY_PREVIOUSSONG},
++ { 180, 190, KEY_MUTE},
++ { 215, 225, KEY_VOLUMEDOWN},
++};
++#endif
++#ifdef CONFIG_MACH_CORGI
++#define REMOTE_AKIN_PULLUP CORGI_SCP_AKIN_PULLUP
++#define REMOTE_SCOOP_DEVICE corgiscoop_device
++#define REMOTE_GPIO_INT CORGI_GPIO_AK_INT
++#define REMOTE_IRQ_INT CORGI_IRQ_GPIO_AK_INT
++static struct remote_control_key remote_keys[] = {
++ //These need to be fixed for the CE-RH1's values
++ { 25, 35, KEY_STOPCD},
++ { 55, 65, KEY_PLAYPAUSE},
++ { 85, 95, KEY_NEXTSONG},
++ { 115, 125, KEY_VOLUMEUP},
++ { 145, 155, KEY_PREVIOUSSONG},
++ { 180, 190, KEY_MUTE},
++ { 215, 225, KEY_VOLUMEDOWN},
++};
++#endif
++
++#define RELEASE_HI 230
++#define MAX_EARPHONE 6
++#define RC_POLL_MS 10
++#define RC_FINISH_MS 500
++#define WAIT_STATE 3
++#define NOISE_THRESHOLD 100
++
++struct sharpsl_rc {
++ struct input_dev *input;
++ struct device *dev;
++
++ spinlock_t lock;
++ struct timer_list rctimer;
++ struct timer_list rctimer_finish;
++
++ unsigned int handling_press;
++ unsigned int noise;
++ unsigned int state;
++ unsigned int last_key;
++};
++
++static int get_remocon_raw(void)
++{
++ int i, val;
++
++ val = sharpsl_pm_pxa_read_max1111(MAX1111_REMCOM);
++ for (i = 0; i < ARRAY_SIZE(remote_keys); ++i) {
++ if (val >= remote_keys[i].min
++ && val <= remote_keys[i].max) {
++ printk("get_remocon_raw: VAL=%i, KEY=%i\n", val, remote_keys[i].key);
++ return remote_keys[i].key;
++ }
++ }
++ return 0;
++}
++
++static irqreturn_t sharpsl_rc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
++{
++ struct sharpsl_rc *data = dev_id;
++ DPRINTK("sharpsl_rc_interrupt %d\n", irq);
++ if (!data->handling_press) {
++ DPRINTK("handling interrupt");
++ data->handling_press = 1;
++ data->noise = 0;
++ data->state = 0;
++ data->last_key = 0;
++
++ reset_scoop_gpio(&REMOTE_SCOOP_DEVICE.dev, REMOTE_AKIN_PULLUP);
++
++ mod_timer(&data->rctimer, jiffies + msecs_to_jiffies(RC_POLL_MS));
++ }
++ return IRQ_HANDLED;
++}
++
++static void sharpsl_rc_timer_callback(unsigned long dataPtr)
++{
++ struct sharpsl_rc *data = (struct sharpsl_rc *) dataPtr;
++ int timer = 1;
++ int key = get_remocon_raw();
++ DPRINTK("timer callback, key: %d", key);
++
++ //wait for value to stabilize
++ if (data->state < WAIT_STATE) {
++ if (data->last_key != key) {
++ ++data->noise;
++ if (data->noise > NOISE_THRESHOLD) {
++ DPRINTK("too much noise, bailing");
++ timer = 0;
++ }
++ data->state = 0;
++ } else {
++ ++data->state;
++ }
++ data->last_key = key;
++
++ //stable value, send event
++ } else if (data->state == WAIT_STATE) {
++ data->noise = 0;
++ //non-key returned, skip the rest of the states and bail now
++ if (data->last_key == 0) {
++ DPRINTK("non-key detected %d, noise: %d", data->last_key, data->noise);
++ timer = 0;
++ //send button press
++ } else {
++ DPRINTK("key press detected %d, noise %d", data->last_key, data->noise);
++ input_report_key(data->input, data->last_key, 1);
++ }
++ ++data->state;
++
++ //wait until key is released
++ } else if (data->state < WAIT_STATE * 2) {
++ if (key == data->last_key
++ && data->noise < NOISE_THRESHOLD) {
++ data->state = WAIT_STATE + 1;
++ ++data->noise;
++ } else {
++ ++data->state;
++ }
++ //key is released, send event
++ } else {
++ //send button release
++ DPRINTK("release key %d", data->last_key);
++ input_report_key(data->input, data->last_key, 0);
++ timer = 0;
++ }
++ if (timer) {
++ mod_timer(&data->rctimer, jiffies + msecs_to_jiffies(RC_POLL_MS));
++ } else {
++ set_scoop_gpio(&REMOTE_SCOOP_DEVICE.dev, REMOTE_AKIN_PULLUP);
++ data->handling_press = 0;
++ }
++}
++
++static int __init sharpsl_rc_probe(struct platform_device *pdev)
++{
++ struct sharpsl_rc *sharpsl_rc;
++ struct input_dev *input_dev;
++ int i, ret;
++
++ dev_dbg(&pdev->dev, "sharpsl_rc_probe\n");
++
++ sharpsl_rc = kzalloc(sizeof(struct sharpsl_rc), GFP_KERNEL);
++ input_dev = input_allocate_device();
++ if (!sharpsl_rc || !input_dev) {
++ kfree(sharpsl_rc);
++ input_free_device(input_dev);
++ return -ENOMEM;
++ }
++
++ platform_set_drvdata(pdev, sharpsl_rc);
++
++ sharpsl_rc->dev = &pdev->dev;
++ sharpsl_rc->input = input_dev;
++ spin_lock_init(&sharpsl_rc->lock);
++
++ /* Init Remote Control Timer */
++ init_timer(&sharpsl_rc->rctimer);
++ sharpsl_rc->rctimer.function = sharpsl_rc_timer_callback;
++ sharpsl_rc->rctimer.data = (unsigned long) sharpsl_rc;
++
++ input_dev->name = "Sharp Remote Control CE-RHX";
++ input_dev->phys = "sharpsl_rc/input0";
++ input_dev->id.bustype = BUS_HOST;
++ input_dev->id.vendor = 0x0001;
++ input_dev->id.product = 0x0001;
++ input_dev->id.version = 0x0100;
++ input_dev->cdev.dev = &pdev->dev;
++ input_dev->private = sharpsl_rc;
++
++ input_dev->evbit[0] = BIT(EV_KEY);
++
++ for (i = 0; i <= ARRAY_SIZE(remote_keys); i++)
++ set_bit(remote_keys[i].key, input_dev->keybit);
++
++ input_register_device(sharpsl_rc->input);
++
++ pxa_gpio_mode(REMOTE_GPIO_INT | GPIO_IN);
++ ret = request_irq(REMOTE_IRQ_INT,
++ sharpsl_rc_interrupt,
++ IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_SHARED,
++ "sharpsl_rc",
++ sharpsl_rc);
++ if (ret < 0) {
++ dev_dbg(&pdev->dev, "Can't get IRQ: %d!\n", i);
++ kfree(sharpsl_rc);
++ input_free_device(input_dev);
++ return ret;
++ }
++
++ return 0;
++}
++
++static int sharpsl_rc_remove(struct platform_device *pdev)
++{
++ struct sharpsl_rc *sharpsl_rc = platform_get_drvdata(pdev);
++
++ dev_dbg(&pdev->dev, "sharpsl_rc_remove\n");
++
++ free_irq(REMOTE_IRQ_INT, sharpsl_rc);
++ del_timer_sync(&sharpsl_rc->rctimer);
++ input_unregister_device(sharpsl_rc->input);
++ kfree(sharpsl_rc);
++
++ return 0;
++}
++
++static struct platform_driver sharpsl_rc_driver = {
++ .probe = sharpsl_rc_probe,
++ .remove = sharpsl_rc_remove,
++ .suspend = NULL,
++ .resume = NULL,
++ .driver = {
++ .name = "sharpsl-remote-control",
++ },
++};
++
++static int __devinit sharpsl_rc_init(void)
++{
++ printk("sharpsl_rc_init\n");
++ return platform_driver_register(&sharpsl_rc_driver);
++}
++
++static void __exit sharpsl_rc_exit(void)
++{
++ printk("sharpsl_rc_exit\n");
++ platform_driver_unregister(&sharpsl_rc_driver);
++}
++
++module_init(sharpsl_rc_init);
++module_exit(sharpsl_rc_exit);
++
++MODULE_AUTHOR("Justin Patrin <papercrane@reversefold.com>");
++MODULE_AUTHOR("Richard Purdie <rpurdie@rpsys.net>");
++MODULE_DESCRIPTION("SharpSL Remote Control Driver");
++MODULE_LICENSE("GPL");
+Index: linux-2.6.20/drivers/input/keyboard/spitzkbd.c
+===================================================================
+--- linux-2.6.20.orig/drivers/input/keyboard/spitzkbd.c
++++ linux-2.6.20/drivers/input/keyboard/spitzkbd.c
+@@ -19,6 +19,7 @@
+ #include <linux/jiffies.h>
+ #include <linux/module.h>
+ #include <linux/slab.h>
++#include <linux/kmod.h>
+
+ #include <asm/arch/spitz.h>
+ #include <asm/arch/hardware.h>
+@@ -279,13 +280,21 @@ static irqreturn_t spitzkbd_hinge_isr(in
+ static int sharpsl_hinge_state;
+ static int hinge_count;
+
++void spitzkbd_handle_sharpsl_rc(void *arg) {
++ request_module("sharpsl_rc");
++}
++
++DECLARE_WORK(spitzkbd_work, spitzkbd_handle_sharpsl_rc);
++
+ static void spitzkbd_hinge_timer(unsigned long data)
+ {
+ struct spitzkbd *spitzkbd_data = (struct spitzkbd *) data;
+ unsigned long state;
+ unsigned long flags;
++ unsigned int headphone, remote;
+
+ state = GPLR(SPITZ_GPIO_SWA) & (GPIO_bit(SPITZ_GPIO_SWA)|GPIO_bit(SPITZ_GPIO_SWB));
++ state |= (GPLR(SPITZ_GPIO_HP_IN) & GPIO_bit(SPITZ_GPIO_HP_IN));
+ state |= (GPLR(SPITZ_GPIO_AK_INT) & GPIO_bit(SPITZ_GPIO_AK_INT));
+ if (state != sharpsl_hinge_state) {
+ hinge_count = 0;
+@@ -299,9 +308,18 @@ static void spitzkbd_hinge_timer(unsigne
+
+ input_report_switch(spitzkbd_data->input, SW_LID, ((GPLR(SPITZ_GPIO_SWA) & GPIO_bit(SPITZ_GPIO_SWA)) != 0));
+ input_report_switch(spitzkbd_data->input, SW_TABLET_MODE, ((GPLR(SPITZ_GPIO_SWB) & GPIO_bit(SPITZ_GPIO_SWB)) != 0));
+- input_report_switch(spitzkbd_data->input, SW_HEADPHONE_INSERT, ((GPLR(SPITZ_GPIO_AK_INT) & GPIO_bit(SPITZ_GPIO_AK_INT)) != 0));
++
++ headphone = ((GPLR(SPITZ_GPIO_HP_IN) & GPIO_bit(SPITZ_GPIO_HP_IN)) != 0);
++ input_report_switch(spitzkbd_data->input, SW_HEADPHONE_INSERT, headphone);
++
++ remote = headphone && ((GPLR(SPITZ_GPIO_AK_INT) & GPIO_bit(SPITZ_GPIO_AK_INT)) == 0);
++ input_report_switch(spitzkbd_data->input, SW_REMOTE_INSERT, remote);
+ input_sync(spitzkbd_data->input);
+
++ if (remote) {
++ schedule_work(&spitzkbd_work);
++ }
++
+ spin_unlock_irqrestore(&spitzkbd_data->lock, flags);
+ } else {
+ mod_timer(&spitzkbd_data->htimer, jiffies + msecs_to_jiffies(HINGE_SCAN_INTERVAL));
+@@ -394,6 +412,7 @@ static int __init spitzkbd_probe(struct
+ set_bit(SW_LID, input_dev->swbit);
+ set_bit(SW_TABLET_MODE, input_dev->swbit);
+ set_bit(SW_HEADPHONE_INSERT, input_dev->swbit);
++ set_bit(SW_REMOTE_INSERT, input_dev->swbit);
+
+ err = input_register_device(input_dev);
+ if (err)
+@@ -431,9 +450,12 @@ static int __init spitzkbd_probe(struct
+ request_irq(SPITZ_IRQ_GPIO_SWB, spitzkbd_hinge_isr,
+ IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
+ "Spitzkbd SWB", spitzkbd);
+- request_irq(SPITZ_IRQ_GPIO_AK_INT, spitzkbd_hinge_isr,
++ request_irq(SPITZ_IRQ_GPIO_HP_IN, spitzkbd_hinge_isr,
+ IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
+ "Spitzkbd HP", spitzkbd);
++ request_irq(SPITZ_IRQ_GPIO_AK_INT, spitzkbd_hinge_isr,
++ IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_SHARED,
++ "Spitzkbd HP Type", spitzkbd);
+
+ return 0;
+
+@@ -454,6 +476,7 @@ static int spitzkbd_remove(struct platfo
+ free_irq(SPITZ_IRQ_GPIO_ON_KEY, spitzkbd);
+ free_irq(SPITZ_IRQ_GPIO_SWA, spitzkbd);
+ free_irq(SPITZ_IRQ_GPIO_SWB, spitzkbd);
++ free_irq(SPITZ_IRQ_GPIO_HP_IN, spitzkbd);
+ free_irq(SPITZ_IRQ_GPIO_AK_INT, spitzkbd);
+
+ del_timer_sync(&spitzkbd->htimer);
+Index: linux-2.6.20/arch/arm/mach-pxa/sharpsl.h
+===================================================================
+--- linux-2.6.20.orig/arch/arm/mach-pxa/sharpsl.h
++++ linux-2.6.20/arch/arm/mach-pxa/sharpsl.h
+@@ -50,15 +50,10 @@ void spitz_wait_hsync(void);
+
+ #define READ_GPIO_BIT(x) (GPLR(x) & GPIO_bit(x))
+
+-/* MAX1111 Channel Definitions */
+-#define MAX1111_BATT_VOLT 4u
+-#define MAX1111_BATT_TEMP 2u
+-#define MAX1111_ACIN_VOLT 6u
+-
+ extern struct battery_thresh spitz_battery_levels_acin[];
+ extern struct battery_thresh spitz_battery_levels_noac[];
+ void sharpsl_pm_pxa_init(void);
+ void sharpsl_pm_pxa_remove(void);
+-int sharpsl_pm_pxa_read_max1111(int channel);
++
+
+
+Index: linux-2.6.20/arch/arm/mach-pxa/sharpsl_pm.c
+===================================================================
+--- linux-2.6.20.orig/arch/arm/mach-pxa/sharpsl_pm.c
++++ linux-2.6.20/arch/arm/mach-pxa/sharpsl_pm.c
+@@ -135,6 +135,8 @@ int sharpsl_pm_pxa_read_max1111(int chan
+ | MAXCTRL_SGL | MAXCTRL_UNI | MAXCTRL_STR);
+ }
+
++EXPORT_SYMBOL(sharpsl_pm_pxa_read_max1111);
++
+ void sharpsl_pm_pxa_init(void)
+ {
+ pxa_gpio_mode(sharpsl_pm.machinfo->gpio_acin | GPIO_IN);
+Index: linux-2.6.20/include/asm-arm/hardware/sharpsl_pm.h
+===================================================================
+--- linux-2.6.20.orig/include/asm-arm/hardware/sharpsl_pm.h
++++ linux-2.6.20/include/asm-arm/hardware/sharpsl_pm.h
+@@ -104,3 +104,10 @@ irqreturn_t sharpsl_ac_isr(int irq, void
+ irqreturn_t sharpsl_chrg_full_isr(int irq, void *dev_id);
+ irqreturn_t sharpsl_fatal_isr(int irq, void *dev_id);
+
++/* MAX1111 Channel Definitions */
++#define MAX1111_REMCOM 0u
++#define MAX1111_BATT_VOLT 4u
++#define MAX1111_BATT_TEMP 2u
++#define MAX1111_ACIN_VOLT 6u
++
++int sharpsl_pm_pxa_read_max1111(int channel);
+Index: linux-2.6.20/include/linux/input.h
+===================================================================
+--- linux-2.6.20.orig/include/linux/input.h
++++ linux-2.6.20/include/linux/input.h
+@@ -602,6 +602,7 @@ struct input_absinfo {
+ #define SW_LID 0x00 /* set = lid shut */
+ #define SW_TABLET_MODE 0x01 /* set = tablet mode */
+ #define SW_HEADPHONE_INSERT 0x02 /* set = inserted */
++#define SW_REMOTE_INSERT 0x04 /* set = remote */
+ #define SW_MAX 0x0f
+
+ /*
+Index: linux-2.6.20/arch/arm/mach-pxa/spitz_pm.c
+===================================================================
+--- linux-2.6.20.orig/arch/arm/mach-pxa/spitz_pm.c
++++ linux-2.6.20/arch/arm/mach-pxa/spitz_pm.c
+@@ -161,6 +161,13 @@ static int spitz_should_wakeup(unsigned
+ if (resume_on_alarm && (PEDR & PWER_RTC))
+ is_resume |= PWER_RTC;
+
++ printk("wakeup: PEDR: %x, PKSR: %x, HP_IN: %x, AK_INT: %x\n", PEDR, PKSR, GPIO_bit(SPITZ_GPIO_HP_IN), GPIO_bit(SPITZ_GPIO_AK_INT));
++
++ //remote/headphone interrupt, wakeup
++ if (PEDR == 0 && (PKSR & 0xc0d01) != 0) {
++ is_resume |= PWER_RTC;
++ }
++
+ dev_dbg(sharpsl_pm.dev, "is_resume: %x\n",is_resume);
+ return is_resume;
+ }
diff --git a/meta/packages/linux/linux-rp.inc b/meta/packages/linux/linux-rp.inc
index 10a4847455..aa40ee3041 100644
--- a/meta/packages/linux/linux-rp.inc
+++ b/meta/packages/linux/linux-rp.inc
@@ -17,10 +17,16 @@ EXTRA_OEMAKE = "OPENZAURUS_RELEASE=-${DISTRO_VERSION}"
COMPATIBLE_HOST = "(arm|i.86).*-linux"
COMPATIBLE_MACHINE = '(collie|poodle|c7x0|akita|spitz|tosa|hx2000|qemuarm|qemux86|bootcdx86|htcuniversal)'
+KERNEL_CUSTOM_NAME ?= ""
+KERNEL_DEPLOY_NAME ?= "${KERNEL_IMAGETYPE}-${PV}-${KERNEL_CUSTOM_NAME}${MACHINE}-${DATETIME}.bin"
+KERNEL_SYMLINK_NAME ?= "${KERNEL_IMAGETYPE}-${KERNEL_CUSTOM_NAME}${MACHINE}.bin"
+KERNEL_DEFCONFIG ?= "defconfig-${MACHINE}"
+
CMDLINE_CON = "console=ttyS0,115200n8 console=tty1 noinitrd"
+CMDLINE_CON_collie = "console=ttySA0,115200n8 console=tty1 noinitrd"
CMDLINE_CON_qemuarm = "console=ttyAMA0,115200n8 console=tty1 noinitrd"
-CMDLINE_ROOT = "root=/dev/mtdblock2 rootfstype=jffs2"
-CMDLINE_ROOT_spitz = "root=/dev/hda1 rootfstype=ext3 rootdelay=1 rw"
+CMDLINE_ROOT ?= "root=/dev/mtdblock2 rootfstype=jffs2"
+CMDLINE_ROOT_spitz ?= "root=/dev/hda1 rootfstype=ext3 rootdelay=1 rw"
#CMDLINE_ROOT_spitz = "root=/dev/mmcblk0p2 rootfstype=ext2 rootdelay=3 rw"
CMDLINE_OTHER = "dyntick=enable"
CMDLINE_DEBUG = '${@base_contains("IMAGE_FEATURES", "debug-tweaks", "debug", "quiet", d)}'
@@ -53,6 +59,8 @@ module_autoload_snd-soc-corgi_c7x0 = "snd-soc-corgi"
module_autoload_snd-soc-spitz_akita = "snd-soc-spitz"
module_autoload_snd-soc-spitz_spitz = "snd-soc-spitz"
module_autoload_snd-soc-poodle_poodle = "snd-soc-poodle"
+module_autoload_locomo-spi_collie = "locomo-spi"
+module_autoload_mmc_block_collie = "mmc_block"
do_configure() {
rm -f ${S}/.config
@@ -64,7 +72,7 @@ do_configure() {
fi
fi
- if [ ! -e ${WORKDIR}/defconfig-${MACHINE} ]; then
+ if [ ! -e ${WORKDIR}/${KERNEL_DEFCONFIG} ]; then
die "No default configuration for ${MACHINE} available."
fi
@@ -105,7 +113,7 @@ do_configure() {
echo "# CONFIG_OABI_COMPAT is not set" >> ${S}/.config
fi
- if [ "${DISTRO}" = "openzaurus" ]; then
+ if [ "${DISTRO}" = "openzaurus" -a "${MACHINE}" != "collie" ]; then
case ${MACHINE} in
c7x0 | akita | spitz )
echo "CONFIG_LOGO_OZ640_CLUT224=y" >> ${S}/.config
@@ -126,7 +134,7 @@ do_configure() {
echo "CONFIG_LOGO=y" >> ${S}/.config
echo "# CONFIG_LOGO_LINUX_CLUT224 is not set" >> ${S}/.config
echo "# CONFIG_LOGO_OHAND_CLUT224 is not set" >> ${S}/.config
- elif [ "${DISTRO}" = "poky" ]; then
+ elif [ "${DISTRO}" = "poky" -a "${MACHINE}" != "collie" ]; then
echo "CONFIG_LOGO=y" >> ${S}/.config
echo "CONFIG_LOGO_OHAND_CLUT224=y" >> ${S}/.config
echo "# CONFIG_LOGO_OZ240_CLUT224 is not set" >> ${S}/.config
@@ -155,7 +163,7 @@ do_configure() {
-e '/CONFIG_LOGO_OZ240_CLUT224=/d' \
-e '/CONFIG_LOGO_OZ480_CLUT224=/d' \
-e '/CONFIG_LOGO_OZ640_CLUT224=/d' \
- '${WORKDIR}/defconfig-${MACHINE}' >>'${S}/.config'
+ '${WORKDIR}/${KERNEL_DEFCONFIG}' >>'${S}/.config'
yes '' | oe_runmake oldconfig
}
@@ -186,11 +194,11 @@ do_compile_append() {
do_deploy() {
install -d ${DEPLOY_DIR_IMAGE}
- install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${PV}-${MACHINE}-${DATETIME}.bin
- rm -f ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin
+ install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR_IMAGE}/${KERNEL_DEPLOY_NAME}
cd ${DEPLOY_DIR_IMAGE}
- ln -s ${KERNEL_IMAGETYPE}-${PV}-${MACHINE}-${DATETIME}.bin ${KERNEL_IMAGETYPE}-${MACHINE}.bin
- tar -cvzf ${DEPLOY_DIR_IMAGE}/modules-${KERNEL_RELEASE}-${MACHINE}.tgz -C ${D} lib
+ rm -f ${KERNEL_SYMLINK_NAME}
+ ln -s ${KERNEL_DEPLOY_NAME} ${KERNEL_SYMLINK_NAME}
+ tar -cvzf ${DEPLOY_DIR_IMAGE}/modules-${KERNEL_VERSION}-${MACHINE}.tgz -C ${D} lib
}
do_deploy[dirs] = "${S}"
diff --git a/meta/packages/linux/linux-rp_2.6.21.bb b/meta/packages/linux/linux-rp_2.6.21.bb
index 682ab308e5..3f155942e9 100644
--- a/meta/packages/linux/linux-rp_2.6.21.bb
+++ b/meta/packages/linux/linux-rp_2.6.21.bb
@@ -1,6 +1,6 @@
require linux-rp.inc
-PR = "r7"
+PR = "r10"
# Handy URLs
# git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git;protocol=git;tag=ef7d1b244fa6c94fb76d5f787b8629df64ea4046
@@ -49,8 +49,10 @@ SRC_URI = "http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.21.tar.bz2 \
${RPSRC}/pxa_cf_initorder_hack-r1.patch;patch=1;status=hack \
file://pxa-serial-hack.patch;patch=1;status=hack \
file://connectplus-remove-ide-HACK.patch;patch=1;status=hack \
+ file://connectplus-prevent-oops-HACK.patch;patch=1;status=hack \
file://squashfs3.0-2.6.15.patch;patch=1;status=external \
file://vesafb-tng-1.0-rc2-2.6.20-rc2.patch;patch=1;status=external \
+ file://sharpsl-rc-r1.patch;patch=1 \
file://defconfig-c7x0 \
file://defconfig-hx2000 \
file://defconfig-collie \
@@ -72,16 +74,20 @@ SRC_URI = "http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.21.tar.bz2 \
# (Pavel Machek's git tree has updated versions of this?)
# ${JLSRC}/zaurus-lcd-2.6.11.diff.gz;patch=1
-# These patches are extracted from Pavel Machek's git tree
-# (diff against vanilla kernel)
SRC_URI_append_collie = "\
- ${DOSRC}/collie/mtd-sharp-flash-hack-r0.patch;patch=1 \
- ${DOSRC}/collie/collie-r0.patch;patch=1 \
- ${DOSRC}/collie/locomolcd-backlight-r0.patch;patch=1 \
- ${DOSRC}/collie/ucb1x00-touch-audio-r0.patch;patch=1 \
- file://collie-mcp-r1.patch;patch=1 \
- ${DOSRC}/collie/sa1100-udc-r0.patch;patch=1 \
-# ${DOSRC}/collie/collie-pm-r1.patch;patch=1 \
+ ${TKSRC}/mtd-sharp-flash-hack-r2.patch;patch=1 \
+ ${TKSRC}/ucb1x00-touch-audio-r1.patch;patch=1 \
+ ${TKSRC}/mcp-sa11x0-r0.patch;patch=1 \
+ ${TKSRC}/sa1100-udc-r2.patch;patch=1 \
+ ${TKSRC}/mmc_spi-r4.patch;patch=1 \
+ ${TKSRC}/locomo-r0.patch;patch=1 \
+ ${TKSRC}/collie-kexec.patch;patch=1 \
+ ${TKSRC}/locomo_spi-r4.patch;patch=1 \
+ ${TKSRC}/sharpsl_pm-r2.patch;patch=1 \
+ ${TKSRC}/collie_pm-r2.patch;patch=1 \
+ ${TKSRC}/locomokeyb_suspendkey-2.patch;patch=1 \
+ ${TKSRC}/pcmcia_suspend.patch;patch=1 \
+ ${TKSRC}/ucb1x00_suspend.patch;patch=1 \
"
SRC_URI_append_tosa = "\