Any BMC# for this request? rs
On 1/31/11 7:22 PM, "Kangkai Yin" <[email protected]> wrote: >Hi, >I have made the following changes to kernel-adaptation-oaktrail in >project Trunk:Testing. Please review and accept ASAP. > >Thank You, >Kangkai Yin > >[This message was auto-generated] > >--- > >Request #13134: > > submit: devel:kernel/kernel-adaptation-oaktrail(r10)(update) -> >Trunk:Testing/kernel-adaptation-oaktrail > > >Message: > Update EC Extra driver to 0.2; Reboot quirk fix for oaktrail; EHCI >BUG fix while suspending; Serial fixes for suspend and resume. > >State: new 2011-01-31T19:22:41 kai >Comment: None > > > >changes files: >-------------- >--- kernel.changes >+++ kernel.changes >@@ -0,0 +1,8 @@ >+* Tue Feb 1 2011 - Yin Kangkai <[email protected]> - 2.6.37 >+- Reboot quirk for oaktrail >+- EHCI BUG fix while suspending >+- Serial fixes for suspend and resume >+ >+* Thu Jan 20 2011 - Huang Liang <[email protected]> - 2.6.37 >+- Update ACPI EC Extra driver for Oaktrail >+ > >new: >---- > linux-2.6.37-1-3-serial-core-reset-the-console-speed-on-resume.patch > >linux-2.6.37-2-3-serial-also-set-the-uartclk-value-in-resume-after-go.patc >h > >linux-2.6.37-3-3-serial-change-the-divisor-latch-only-when-prescalar-.patc >h > linux-2.6.37-ARCH_X86-apply-reboot-quirk-for-Intel-Oaktrail.patch > linux-2.6.37-USB-EHCI-fix-scheduling-while-atomic-during-suspend.patch > >spec files: >----------- >--- kernel-adaptation-oaktrail.spec >+++ kernel-adaptation-oaktrail.spec >@@ -252,6 +252,22 @@ > Patch305: >linux-2.6.37-hid-remove-the-Sitronix-touch-panel-support-from-sta.patch > Patch306: >linux-2.6.37-platform-driver-x86-ACPI-EC-Extra-driver-for-Oaktrai.patch > >+# reboot quirk for oaktrail >+Patch307: >linux-2.6.37-ARCH_X86-apply-reboot-quirk-for-Intel-Oaktrail.patch >+ >+# EHCI BUG while suspending >+Patch308: >linux-2.6.37-USB-EHCI-fix-scheduling-while-atomic-during-suspend.patch >+ >+# serial fixes for suspend and resume >+Patch309: >linux-2.6.37-1-3-serial-core-reset-the-console-speed-on-resume.patch >+Patch310: >linux-2.6.37-2-3-serial-also-set-the-uartclk-value-in-resume-after-go.patc >h >+Patch311: >linux-2.6.37-3-3-serial-change-the-divisor-latch-only-when-prescalar-.patc >h >+ >+# >+# End of the Oaktrail Adaptation patches >+# >+##################################################################### >+ > > BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root > >@@ -473,6 +489,27 @@ > # linux-2.6.37-platform-driver-x86-ACPI-EC-Extra-driver-for-Oaktrai.patch > %patch306 -p1 > >+# reboot quirk for oaktrail >+# linux-2.6.37-ARCH_X86-apply-reboot-quirk-for-Intel-Oaktrail.patch >+%patch307 -p1 >+ >+# EHCI BUG while suspending >+# linux-2.6.37-USB-EHCI-fix-scheduling-while-atomic-during-suspend.patch >+%patch308 -p1 >+ >+# serial fixes for suspend and resume >+# linux-2.6.37-1-3-serial-core-reset-the-console-speed-on-resume.patch >+%patch309 -p1 >+# >linux-2.6.37-2-3-serial-also-set-the-uartclk-value-in-resume-after-go.patc >h >+%patch310 -p1 >+# >linux-2.6.37-3-3-serial-change-the-divisor-latch-only-when-prescalar-.patc >h >+%patch311 -p1 >+ >+# >+# End of the Oaktrail Adaptation patches >+# >+##################################################################### >+ > # Drop some necessary files from the source dir into the buildroot > cp $RPM_SOURCE_DIR/config-* . > cp %{SOURCE15} . > >other changes: >-------------- > >++++++ >linux-2.6.37-1-3-serial-core-reset-the-console-speed-on-resume.patch (new) >--- linux-2.6.37-1-3-serial-core-reset-the-console-speed-on-resume.patch >+++ linux-2.6.37-1-3-serial-core-reset-the-console-speed-on-resume.patch >+From 264df12e17da3770b44671b37c21582ab2c5ffe3 Mon Sep 17 00:00:00 2001 >+From: Yin Kangkai <[email protected]> >+Date: Tue, 1 Feb 2011 09:58:25 +0800 >+Subject: [PATCH 1/3] serial-core: reset the console speed on resume >+ >+Hi all, >+ >+On some platforms, we need to restore the console speed on resume even >+it was not suspended (no_console_suspend), and on others we don't have >+to do that. >+ >+So don't care about the "console_suspend_enabled" and unconditionally >+reset the console speed if it is a console. >+ >+This is actually a redo of ba15ab0 (Set proper console speed on resume >+if console suspend is disabled) from Deepak Saxena. I also tried to >+investigate more to find out if this change will break others, here is >+what I've found out: >+ >+commit 891b9dd10764352926e1e107756aa229dfa2c210 >+Author: Jason Wang <[email protected]> >+ serial-core: restore termios settings when resume console ports >+ >+commit ca2e71aa8cfb0056ce720f3fd53f59f5fac4a3e1 >+Author: Jason Wang <[email protected]> >+ serial-core: skip call set_termios/console_start when >no_console_suspend >+ >+commit 4547be7809a3b775ce750ec7f8b5748954741523 >+Author: Stanislav Brabec <[email protected]> >+ serial-core: resume serial hardware with no_console_suspend >+ >+commit ba15ab0e8de0d4439a91342ad52d55ca9e313f3d >+Author: Deepak Saxena <[email protected]> >+ Set proper console speed on resume if console suspend is disabled >+ >+from ba15ab0, we learned that, even if the console suspend is disabled >+(when no_console_suspend is set), we may still need to "reset the port >+to the state it was in before we suspended." >+ >+Then with 4547be7, this piece of code is removed. >+ >+And then Jason Wang added that back in ca2e71a and 891b9dd, to fix >+some breakage on OMAP3EVM platform. From ca2e71a we learned that the >+"set_termios" things is actually needed by both console is suspended >+and not suspended. >+ >+That's why I removed the console_suspended_enabled condition, and only >+call console_start() when we actually suspeneded it. >+ >+I also noticed in this thread: >+http://marc.info/?t=129079257100004&r=1&w=2, which talked about on >+some platforms, UART HW will be cut power whether or not we set >+no_console_suspend, and then on resume it does not work quite well. I >+have a similar HW, and this patch fixed this issue, don't know if this >+patch also works on their platforms. >+ >+[Update: Stanislav tested this patch on Zaurus and reported it improves >the >+situation. Thanks.] >+ >+CC: Greg KH <[email protected]> >+CC: Deepak Saxena <[email protected]> >+CC: Jason Wang <[email protected]> >+CC: Stanislav Brabec <[email protected]> >+CC: Daniel Drake <[email protected]> >+Signed-off-by: Yin Kangkai <[email protected]> >+--- >+ drivers/serial/serial_core.c | 6 +++--- >+ 1 files changed, 3 insertions(+), 3 deletions(-) >+ >+diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c >+index 9ffa5be..af4a4c1 100644 >+--- a/drivers/serial/serial_core.c >++++ b/drivers/serial/serial_core.c >+@@ -2060,7 +2060,7 @@ int uart_resume_port(struct uart_driver *drv, >struct uart_port *uport) >+ /* >+ * Re-enable the console device after suspending. >+ */ >+- if (console_suspend_enabled && uart_console(uport)) { >++ if (uart_console(uport)) { >+ /* >+ * First try to use the console cflag setting. >+ */ >+@@ -2073,9 +2073,9 @@ int uart_resume_port(struct uart_driver *drv, >struct uart_port *uport) >+ if (port->tty && port->tty->termios && termios.c_cflag == >0) >+ termios = *(port->tty->termios); >+ >+- uart_change_pm(state, 0); >+ uport->ops->set_termios(uport, &termios, NULL); >+- console_start(uport->cons); >++ if (console_suspend_enabled) >++ console_start(uport->cons); >+ } >+ >+ if (port->flags & ASYNC_SUSPENDED) { >+-- >+1.7.2.3 >+ > >++++++ >linux-2.6.37-2-3-serial-also-set-the-uartclk-value-in-resume-after-go.patc >h (new) >--- >linux-2.6.37-2-3-serial-also-set-the-uartclk-value-in-resume-after-go.patc >h >+++ >linux-2.6.37-2-3-serial-also-set-the-uartclk-value-in-resume-after-go.patc >h >+From 68795611f2434a0234c0c9670d6cf1420aa40621 Mon Sep 17 00:00:00 2001 >+From: Yin Kangkai <[email protected]> >+Date: Tue, 1 Feb 2011 10:06:01 +0800 >+Subject: [PATCH 2/3] serial: also set the uartclk value in resume after >goes to highspeed >+ >+For any reason if the NS16550A was not work in high speed mode (e.g. we >hold >+NS16550A from going to high speed mode in autoconfig_16550a()), now we >are >+resume from suspend, we should also set the uartclk to the correct >+value. Otherwise it is still the old 1843200 and that will bring issues. >+ >+Signed-off-by: Yin Kangkai <[email protected]> >+--- >+ drivers/serial/8250.c | 1 + >+ 1 files changed, 1 insertions(+), 0 deletions(-) >+ >+diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c >+index 09a5508..b57f40f 100644 >+--- a/drivers/serial/8250.c >++++ b/drivers/serial/8250.c >+@@ -2986,6 +2986,7 @@ void serial8250_resume_port(int line) >+ serial_outp(up, 0x04, tmp); >+ >+ serial_outp(up, UART_LCR, 0); >++ up->port.uartclk = 921600*16; >+ } >+ uart_resume_port(&serial8250_reg, &up->port); >+ } >+-- >+1.7.2.3 >+ > >++++++ >linux-2.6.37-3-3-serial-change-the-divisor-latch-only-when-prescalar-.patc >h (new) >--- >linux-2.6.37-3-3-serial-change-the-divisor-latch-only-when-prescalar-.patc >h >+++ >linux-2.6.37-3-3-serial-change-the-divisor-latch-only-when-prescalar-.patc >h >+From 7c93e9ac49c7df25ff3674f0f43601f8c7fec140 Mon Sep 17 00:00:00 2001 >+From: Yin Kangkai <[email protected]> >+Date: Tue, 1 Feb 2011 10:06:46 +0800 >+Subject: [PATCH 3/3] serial: change the divisor latch only when >prescalar actually changed. >+ >+In 8250.c original ns16550 autoconfig code, we change the divisor latch >when >+we goto to high speed mode, we're assuming the previous speed is legacy. >This >+some times is not true. >+ >+For example in a system with both CONFIG_SERIAL_8250 and >+CONFIG_SERIAL_8250_PNP set, in this case, the code (autoconfig) will >+be called twice, one in serial8250_init/probe() and the other is from >+serial_pnp_probe. When serial_pnp_probe calls the autoconfig for >NS16550A, >+it's already in high speed mode, change the divisor latch (quot << 3) in >this >+case will make the UART console garbled. >+ >+Signed-off-by: Yin Kangkai <[email protected]> >+--- >+ drivers/serial/8250.c | 33 +++++++++++++++++++++------------ >+ 1 files changed, 21 insertions(+), 12 deletions(-) >+ >+diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c >+index b57f40f..e928e06 100644 >+--- a/drivers/serial/8250.c >++++ b/drivers/serial/8250.c >+@@ -927,6 +927,24 @@ static int broken_efr(struct uart_8250_port *up) >+ return 0; >+ } >+ >++static inline int ns16550a_goto_highspeed(struct uart_8250_port *up) >++{ >++ unsigned char status; >++ >++ status = serial_in(up, 0x04); /* EXCR2 */ >++#define PRESL(x) ((x) & 0x30) >++ if (PRESL(status) == 0x10) { >++ /* already in high speed mode */ >++ return 0; >++ } else { >++ status &= ~0xB0; /* Disable LOCK, mask out PRESL[01] */ >++ status |= 0x10; /* 1.625 divisor for baud_base --> >921600 */ >++ serial_outp(up, 0x04, status); >++ } >++ return 1; >++} >++ >++ >+ /* >+ * We know that the chip has FIFOs. Does it have an EFR? The >+ * EFR is located in the same register position as the IIR and >+@@ -998,12 +1016,8 @@ static void autoconfig_16550a(struct >uart_8250_port *up) >+ quot = serial_dl_read(up); >+ quot <<= 3; >+ >+- status1 = serial_in(up, 0x04); /* EXCR2 */ >+- status1 &= ~0xB0; /* Disable LOCK, mask out >PRESL[01] */ >+- status1 |= 0x10; /* 1.625 divisor for baud_base >--> 921600 */ >+- serial_outp(up, 0x04, status1); >+- >+- serial_dl_write(up, quot); >++ if (ns16550a_goto_highspeed(up)) >++ serial_dl_write(up, quot); >+ >+ serial_outp(up, UART_LCR, 0); >+ >+@@ -2975,15 +2989,10 @@ void serial8250_resume_port(int line) >+ struct uart_8250_port *up = &serial8250_ports[line]; >+ >+ if (up->capabilities & UART_NATSEMI) { >+- unsigned char tmp; >+- >+ /* Ensure it's still in high speed mode */ >+ serial_outp(up, UART_LCR, 0xE0); >+ >+- tmp = serial_in(up, 0x04); /* EXCR2 */ >+- tmp &= ~0xB0; /* Disable LOCK, mask out PRESL[01] */ >+- tmp |= 0x10; /* 1.625 divisor for baud_base --> 921600 */ >+- serial_outp(up, 0x04, tmp); >++ ns16550a_goto_highspeed(up); >+ >+ serial_outp(up, UART_LCR, 0); >+ up->port.uartclk = 921600*16; >+-- >+1.7.2.3 >+ > >++++++ linux-2.6.37-ARCH_X86-apply-reboot-quirk-for-Intel-Oaktrail.patch >(new) >--- linux-2.6.37-ARCH_X86-apply-reboot-quirk-for-Intel-Oaktrail.patch >+++ linux-2.6.37-ARCH_X86-apply-reboot-quirk-for-Intel-Oaktrail.patch >+From c23257e9473fb104570c6bb7fc3a8f57cf8f8d58 Mon Sep 17 00:00:00 2001 >+From: Yin Kangkai <[email protected]> >+Date: Fri, 14 Jan 2011 17:09:03 +0800 >+Subject: [PATCH] ARCH_X86: apply reboot quirk for Intel Oaktrail >+ >+Intel Oaktrail FFVS needs a "reboot=bios" quirk to make the the reboot >+actually working. >+ >+Signed-off-by: Yin Kangkai <[email protected]> >+--- >+ arch/x86/kernel/reboot.c | 7 +++++++ >+ 1 files changed, 7 insertions(+), 0 deletions(-) >+ >+diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c >+index c495aa8..5beeaa0 100644 >+--- a/arch/x86/kernel/reboot.c >++++ b/arch/x86/kernel/reboot.c >+@@ -284,6 +284,13 @@ static struct dmi_system_id __initdata >reboot_dmi_table[] = { >+ DMI_MATCH(DMI_BOARD_NAME, "P4S800"), >+ }, >+ }, >++ { /* Handle problems with rebooting on Intel Oaktrail FFVS >*/ >++ .callback = set_bios_reboot, >++ .ident = "OakTrail platform", >++ .matches = { >++ DMI_MATCH(DMI_PRODUCT_NAME, "OakTrail platform"), >++ }, >++ }, >+ { } >+ }; >+ >+-- >+1.7.2.3 >+ > >++++++ >linux-2.6.37-USB-EHCI-fix-scheduling-while-atomic-during-suspend.patch >(new) >--- linux-2.6.37-USB-EHCI-fix-scheduling-while-atomic-during-suspend.patch >+++ linux-2.6.37-USB-EHCI-fix-scheduling-while-atomic-during-suspend.patch >+From 3cea3db869fb9584c30fea333703a309d45d89f1 Mon Sep 17 00:00:00 2001 >+From: Yin Kangkai <[email protected]> >+Date: Thu, 27 Jan 2011 00:26:20 +0800 >+Subject: [PATCH] USB: EHCI: fix scheduling while atomic during suspend >+ >+There is a msleep with spin lock held during ehci pci suspend, which will >+cause kernel BUG: scheduling while atomic. Fix that. >+ >+[ 184.139620] BUG: scheduling while atomic: kworker/u:11/416/0x00000002 >+[ 184.139632] 4 locks held by kworker/u:11/416: >+[ 184.139640] #0: (events_unbound){+.+.+.}, at: [<c104ddd4>] >process_one_work+0x1b3/0x4cb >+[ 184.139669] #1: ((&entry->work)){+.+.+.}, at: [<c104ddd4>] >process_one_work+0x1b3/0x4cb >+[ 184.139686] #2: (&__lockdep_no_validate__){+.+.+.}, at: >[<c127cde3>] __device_suspend+0x2c/0x154 >+[ 184.139706] #3: (&(&ehci->lock)->rlock){-.-...}, at: [<c132f3d8>] >ehci_pci_suspend+0x35/0x7b >+[ 184.139725] Modules linked in: serio_raw pegasus joydev mrst_gfx(C) >battery >+[ 184.139748] irq event stamp: 52 >+[ 184.139753] hardirqs last enabled at (51): [<c14fdaac>] >mutex_lock_nested+0x258/0x293 >+[ 184.139766] hardirqs last disabled at (52): [<c14fe7b4>] >_raw_spin_lock_irqsave+0xf/0x3e >+[ 184.139777] softirqs last enabled at (0): [<c10371c1>] >copy_process+0x3d2/0x109d >+[ 184.139789] softirqs last disabled at (0): [< (null)>] (null) >+[ 184.139802] Pid: 416, comm: kworker/u:11 Tainted: G C >2.6.37-6.3-adaptation-oaktrail #37 >+[ 184.139809] Call Trace: >+[ 184.139820] [<c102eeff>] __schedule_bug+0x5e/0x65 >+[ 184.139829] [<c14fbca5>] schedule+0xac/0xc4c >+[ 184.139840] [<c11d4845>] ? string+0x37/0x8b >+[ 184.139853] [<c1044f21>] ? lock_timer_base+0x1f/0x3e >+[ 184.139863] [<c14fe7da>] ? _raw_spin_lock_irqsave+0x35/0x3e >+[ 184.139876] [<c1061590>] ? trace_hardirqs_off+0xb/0xd >+[ 184.139885] [<c14fccdc>] schedule_timeout+0x283/0x2d9 >+[ 184.139896] [<c104516f>] ? process_timeout+0x0/0xa >+[ 184.139906] [<c14fcd47>] schedule_timeout_uninterruptible+0x15/0x17 >+[ 184.139916] [<c104566a>] msleep+0x10/0x16 >+[ 184.139926] [<c132f316>] ehci_adjust_port_wakeup_flags+0x69/0xf6 >+[ 184.139937] [<c132f3eb>] ehci_pci_suspend+0x48/0x7b >+[ 184.139946] [<c1326587>] suspend_common+0x52/0xbb >+[ 184.139956] [<c1326625>] hcd_pci_suspend+0x26/0x28 >+[ 184.139967] [<c11e7182>] pci_pm_suspend+0x5f/0xd0 >+[ 184.139976] [<c127ca3a>] pm_op+0x5d/0xf0 >+[ 184.139986] [<c127ceac>] __device_suspend+0xf5/0x154 >+[ 184.139996] [<c127d2c8>] async_suspend+0x16/0x3a >+[ 184.140006] [<c1058f54>] async_run_entry_fn+0x89/0x111 >+[ 184.140016] [<c104deb6>] process_one_work+0x295/0x4cb >+[ 184.140026] [<c1058ecb>] ? async_run_entry_fn+0x0/0x111 >+[ 184.140036] [<c104e3d0>] worker_thread+0x17f/0x298 >+[ 184.140045] [<c104e251>] ? worker_thread+0x0/0x298 >+[ 184.140055] [<c105277f>] kthread+0x64/0x69 >+[ 184.140064] [<c105271b>] ? kthread+0x0/0x69 >+[ 184.140075] [<c1002efa>] kernel_thread_helper+0x6/0x1a >+ >+v2: >+ - move spin_lock_irqsave to a smaller scope. >+ >+CC: Alan Stern <[email protected]> >+CC: David Brownell <[email protected]> >+CC: Greg Kroah-Hartman <[email protected]> >+CC: [email protected] >+Signed-off-by: Yin Kangkai <[email protected]> >+--- >+ drivers/usb/host/ehci-au1xxx.c | 2 +- >+ drivers/usb/host/ehci-hub.c | 7 +++++++ >+ drivers/usb/host/ehci-pci.c | 2 +- >+ 3 files changed, 9 insertions(+), 2 deletions(-) >+ >+diff --git a/drivers/usb/host/ehci-au1xxx.c >b/drivers/usb/host/ehci-au1xxx.c >+index 2baf8a8..a869e3c 100644 >+--- a/drivers/usb/host/ehci-au1xxx.c >++++ b/drivers/usb/host/ehci-au1xxx.c >+@@ -227,8 +227,8 @@ static int ehci_hcd_au1xxx_drv_suspend(struct device >*dev) >+ * mark HW unaccessible. The PM and USB cores make sure that >+ * the root hub is either suspended or stopped. >+ */ >+- spin_lock_irqsave(&ehci->lock, flags); >+ ehci_prepare_ports_for_controller_suspend(ehci, >device_may_wakeup(dev)); >++ spin_lock_irqsave(&ehci->lock, flags); >+ ehci_writel(ehci, 0, &ehci->regs->intr_enable); >+ (void)ehci_readl(ehci, &ehci->regs->intr_enable); >+ >+diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c >+index 86f0815..a40b20e 100644 >+--- a/drivers/usb/host/ehci-hub.c >++++ b/drivers/usb/host/ehci-hub.c >+@@ -111,6 +111,7 @@ static void ehci_adjust_port_wakeup_flags(struct >ehci_hcd *ehci, >+ { >+ int port; >+ u32 temp; >++ unsigned long flags; >+ >+ /* If remote wakeup is enabled for the root hub but disabled >+ * for the controller, we must adjust all the port wakeup flags >+@@ -120,6 +121,8 @@ static void ehci_adjust_port_wakeup_flags(struct >ehci_hcd *ehci, >+ if (!ehci_to_hcd(ehci)->self.root_hub->do_remote_wakeup || >do_wakeup) >+ return; >+ >++ spin_lock_irqsave(&ehci->lock, flags); >++ >+ /* clear phy low-power mode before changing wakeup flags */ >+ if (ehci->has_hostpc) { >+ port = HCS_N_PORTS(ehci->hcs_params); >+@@ -131,7 +134,9 @@ static void ehci_adjust_port_wakeup_flags(struct >ehci_hcd *ehci, >+ temp = ehci_readl(ehci, hostpc_reg); >+ ehci_writel(ehci, temp & ~HOSTPC_PHCD, >hostpc_reg); >+ } >++ spin_unlock_irqrestore(&ehci->lock, flags); >+ msleep(5); >++ spin_lock_irqsave(&ehci->lock, flags); >+ } >+ >+ port = HCS_N_PORTS(ehci->hcs_params); >+@@ -170,6 +175,8 @@ static void ehci_adjust_port_wakeup_flags(struct >ehci_hcd *ehci, >+ /* Does the root hub have a port wakeup pending? */ >+ if (!suspending && (ehci_readl(ehci, &ehci->regs->status) & >STS_PCD)) >+ usb_hcd_resume_root_hub(ehci_to_hcd(ehci)); >++ >++ spin_unlock_irqrestore(&ehci->lock, flags); >+ } >+ >+ static int ehci_bus_suspend (struct usb_hcd *hcd) >+diff --git a/drivers/usb/host/ehci-pci.c b/drivers/usb/host/ehci-pci.c >+index c84add2..b59d538 100644 >+--- a/drivers/usb/host/ehci-pci.c >++++ b/drivers/usb/host/ehci-pci.c >+@@ -380,8 +380,8 @@ static int ehci_pci_suspend(struct usb_hcd *hcd, >bool do_wakeup) >+ * mark HW unaccessible. The PM and USB cores make sure that >+ * the root hub is either suspended or stopped. >+ */ >+- spin_lock_irqsave (&ehci->lock, flags); >+ ehci_prepare_ports_for_controller_suspend(ehci, do_wakeup); >++ spin_lock_irqsave (&ehci->lock, flags); >+ ehci_writel(ehci, 0, &ehci->regs->intr_enable); >+ (void)ehci_readl(ehci, &ehci->regs->intr_enable); >+ >+-- >+1.7.2.3 >+ > >++++++ >linux-2.6.37-platform-driver-x86-ACPI-EC-Extra-driver-for-Oaktrai.patch >--- >linux-2.6.37-platform-driver-x86-ACPI-EC-Extra-driver-for-Oaktrai.patch >+++ >linux-2.6.37-platform-driver-x86-ACPI-EC-Extra-driver-for-Oaktrai.patch >@@ -1,393 +1,444 @@ >-From 577525d556f992eb774185d738532d26082b2300 Mon Sep 17 00:00:00 2001 >-From: Yin Kangkai <[email protected]> >-Date: Wed, 22 Dec 2010 10:53:36 +0800 >-Subject: [PATCH] platform-driver-x86: ACPI EC Extra driver for Oaktrail >- >-This driver implements an Extra ACPI EC driver for products based on >Intel >-Oaktrail platform. It is programming the EC space, through existing >ACPI EC >-driver, to provide user space layer the sysfs and rfkill interfaces to >-enable/disable the Camera, Bluetooth, GPS, WiFi, 3G, and to show the >status of >-Touchscreen. >- >-Signed-off-by: Yin Kangkai <[email protected]> >---- >- drivers/platform/x86/Kconfig | 9 + >- drivers/platform/x86/Makefile | 1 + >- drivers/platform/x86/intel_oaktrail.c | 338 >+++++++++++++++++++++++++++++++++ >- 3 files changed, 348 insertions(+), 0 deletions(-) >- create mode 100644 drivers/platform/x86/intel_oaktrail.c >- >-diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig >-index 2b4038a..d1f6981 100644 >---- a/drivers/platform/x86/Kconfig >-+++ b/drivers/platform/x86/Kconfig >-@@ -655,4 +655,13 @@ config XO1_RFKILL >- Support for enabling/disabling the WLAN interface on the OLPC >XO-1 >- laptop. >- >-+config INTEL_OAKTRAIL >-+ tristate "Intel Oaktrail Platform Extras" >-+ depends on ACPI >-+ depends on RFKILL >-+ ---help--- >-+ Intel Oaktrail platform need this driver to provide interfaces >to >-+ enable/disable the Camera, WiFi, BT etc. devices. If in doubt, >say Y >-+ here; it will only load on supported platforms. >-+ >- endif # X86_PLATFORM_DEVICES >-diff --git a/drivers/platform/x86/Makefile >b/drivers/platform/x86/Makefile >-index 7ff60e6..add8ab7 100644 >---- a/drivers/platform/x86/Makefile >-+++ b/drivers/platform/x86/Makefile >-@@ -35,3 +35,4 @@ obj-$(CONFIG_INTEL_IPS) += intel_ips.o >- obj-$(CONFIG_GPIO_INTEL_PMIC) += intel_pmic_gpio.o >- obj-$(CONFIG_XO1_RFKILL) += xo1-rfkill.o >- obj-$(CONFIG_IBM_RTL) += ibm_rtl.o >-+obj-$(CONFIG_INTEL_OAKTRAIL) += intel_oaktrail.o >-diff --git a/drivers/platform/x86/intel_oaktrail.c >b/drivers/platform/x86/intel_oaktrail.c >-new file mode 100644 >-index 0000000..66deb2e >---- /dev/null >-+++ b/drivers/platform/x86/intel_oaktrail.c >-@@ -0,0 +1,338 @@ >-+/*-*-linux-c-*-*/ >-+ >-+/* >-+ Copyright (C) 2010 Intel Corporation >-+ Author: Yin Kangkai ([email protected]) >-+ >-+ based on Compal driver >-+ >-+ Copyright (C) 2008 Cezary Jackiewicz <cezary.jackiewicz (at) >gmail.com> >-+ >-+ based on MSI driver >-+ >-+ Copyright (C) 2006 Lennart Poettering <mzxreary (at) 0pointer (dot) >de> >-+ >-+ This program is free software; you can redistribute it and/or modify >-+ it under the terms of the GNU General Public License as published by >-+ the Free Software Foundation; either version 2 of the License, or >-+ (at your option) any later version. >-+ >-+ 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. >-+ >-+ You should have received a copy of the GNU General Public License >-+ along with this program; if not, write to the Free Software >-+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA >-+ 02110-1301, USA. >-+ */ >-+ >-+/* >-+ * intel_oaktrail.c - Intel OakTrail Platform support. >-+ * >-+ * This driver exports a few files in >/sys/devices/platform/intel_oaktrail/: >-+ * >-+ * gps - GPS subsystem enabled: contains either 0 or 1. (rw) >-+ * wifi - WiFi subsystem enabled: contains either 0 or 1. (rw) >-+ * wwan - WWAN (3G) subsystem enabled: contains either 0 or 1. (rw) >-+ * camera - Camera subsystem enabled: contains either 0 or 1. (rw) >-+ * bluetooth - Bluetooth subsystem enabled: contains either 0 or 1. (rw) >-+ * touchscreen - Touchscreen subsystem enabled: contains either 0 or 1. >(ro) >-+ * >-+ * In addition to these platform device attributes the driver registers >itself >-+ * in the Linux rfkill subsystem and is available to userspace under >-+ * /sys/class/rfkill/rfkillX/ >-+ * >-+ * This driver might work on other products based on Oaktrail. If you >-+ * want to try it you can pass force=1 as argument to the module which >-+ * will force it to load even when the DMI data doesn't identify the >-+ * product as compatible. >-+ */ >-+ >-+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt >-+ >-+#include <linux/module.h> >-+#include <linux/kernel.h> >-+#include <linux/init.h> >-+#include <linux/acpi.h> >-+#include <linux/platform_device.h> >-+#include <linux/dmi.h> >-+#include <linux/rfkill.h> >-+ >-+#define DRIVER_NAME "intel_oaktrail" >-+#define DRIVER_VERSION "0.1" >-+ >-+#define OT_EC_DEVICE_STATE_ADDRESS 0xD6 >-+ >-+#define OT_EC_CAMERA_MASK (1 << 0) >-+#define OT_EC_BT_MASK (1 << 1) >-+#define OT_EC_GPS_MASK (1 << 2) >-+#define OT_EC_WIFI_MASK (1 << 3) >-+#define OT_EC_WWAN_MASK (1 << 4) >-+#define OT_EC_TS_MASK (1 << 5) >-+ >-+static int force; >-+module_param(force, bool, 0); >-+MODULE_PARM_DESC(force, "Force driver load, ignore DMI data"); >-+ >-+static struct platform_device *oaktrail_device; >-+static struct rfkill *bt_rfkill; >-+static struct rfkill *gps_rfkill; >-+static struct rfkill *wifi_rfkill; >-+static struct rfkill *wwan_rfkill; >-+ >-+#define SIMPLE_MASKED_STORE_SHOW(NAME, MASK) \ >-+static ssize_t NAME##_show(struct device *dev, > \ >-+ struct device_attribute *attr, char *buf) \ >-+{ \ >-+ u8 value; \ >-+ ec_read(OT_EC_DEVICE_STATE_ADDRESS, &value); \ >-+ return sprintf(buf, "%d\n", ((value & MASK) != 0)); \ >-+} \ >-+static ssize_t NAME##_store(struct device *dev, > \ >-+ struct device_attribute *attr, const char *buf, size_t count) \ >-+{ \ >-+ int state; \ >-+ u8 old_val; \ >-+ ec_read(OT_EC_DEVICE_STATE_ADDRESS, &old_val); \ >-+ if (sscanf(buf, "%d", &state) != 1 || (state < 0 || state > 1)) \ >-+ return -EINVAL; \ >-+ ec_write(OT_EC_DEVICE_STATE_ADDRESS, state ? \ >-+ (old_val | MASK) : (old_val & ~MASK)); \ >-+ return count; \ >-+} >-+ >-+SIMPLE_MASKED_STORE_SHOW(camera, OT_EC_CAMERA_MASK) >-+SIMPLE_MASKED_STORE_SHOW(bluetooth, OT_EC_BT_MASK) >-+SIMPLE_MASKED_STORE_SHOW(gps, OT_EC_GPS_MASK) >-+SIMPLE_MASKED_STORE_SHOW(wifi, OT_EC_WIFI_MASK) >-+SIMPLE_MASKED_STORE_SHOW(wwan, OT_EC_WWAN_MASK) >-+SIMPLE_MASKED_STORE_SHOW(touchscreen, OT_EC_TS_MASK) >-+ >-+static DEVICE_ATTR(camera, 0644, camera_show, camera_store); >-+static DEVICE_ATTR(bluetooth, 0644, bluetooth_show, bluetooth_store); >-+static DEVICE_ATTR(gps, 0644, gps_show, gps_store); >-+static DEVICE_ATTR(wifi, 0644, wifi_show, wifi_store); >-+static DEVICE_ATTR(wwan, 0644, wwan_show, wwan_store); >-+static DEVICE_ATTR(touchscreen, 0444, touchscreen_show, NULL); >-+ >-+static struct attribute *oaktrail_attributes[] = { >-+ &dev_attr_camera.attr, >-+ &dev_attr_bluetooth.attr, >-+ &dev_attr_gps.attr, >-+ &dev_attr_wifi.attr, >-+ &dev_attr_wwan.attr, >-+ &dev_attr_touchscreen.attr, >-+ NULL >-+}; >-+ >-+static struct attribute_group oaktrail_attribute_group = { >-+ .attrs = oaktrail_attributes >-+}; >-+ >-+static int oaktrail_rfkill_set(void *data, bool blocked) >-+{ >-+ u8 value; >-+ u8 result; >-+ unsigned long radio = (unsigned long) data; >-+ >-+ ec_read(OT_EC_DEVICE_STATE_ADDRESS, &result); >-+ >-+ if (!blocked) >-+ value = (u8) (result | radio); >-+ else >-+ value = (u8) (result & ~radio); >(640 more lines skipped) > >++++++ series >--- series >+++ series >@@ -101,3 +101,19 @@ > linux-2.6.37-oaktrail-apply-SDHCI_QUIRK_NO_HIGHSPEED-quirk.patch > linux-2.6.37-hid-remove-the-Sitronix-touch-panel-support-from-sta.patch > linux-2.6.37-platform-driver-x86-ACPI-EC-Extra-driver-for-Oaktrai.patch >+ >+# reboot quirk for oaktrail >+linux-2.6.37-ARCH_X86-apply-reboot-quirk-for-Intel-Oaktrail.patch >+ >+# EHCI BUG while suspending >+linux-2.6.37-USB-EHCI-fix-scheduling-while-atomic-during-suspend.patch >+ >+# serial fixes for suspend and resume >+linux-2.6.37-1-3-serial-core-reset-the-console-speed-on-resume.patch >+linux-2.6.37-2-3-serial-also-set-the-uartclk-value-in-resume-after-go.pat >ch >+linux-2.6.37-3-3-serial-change-the-divisor-latch-only-when-prescalar-.pat >ch >+ >+# >+# End of the Oaktrail Adaptation patches >+# >+##################################################################### > >_______________________________________________ >MeeGo-commits mailing list >[email protected] >http://lists.meego.com/listinfo/meego-commits _______________________________________________ MeeGo-packaging mailing list [email protected] http://lists.meego.com/listinfo/meego-packaging
