[meego-commits] 5635: Changes to Trunk/kernel
Anas Nashif
nashif at linux.intel.com
Tue Jul 13 17:36:56 UTC 2010
Hi,
I have made the following changes to kernel in project Trunk. Please review and accept ASAP.
Thank You,
Anas Nashif
[This message was auto-generated]
---
Request #5635:
submit: Trunk:Testing/kernel(r82) -> Trunk/kernel
Message:
* Fri Jul 12 2010 Arjan van de Ven <arjan at linux.intel.com> - 2.6.35-rc4
- new ac patch
- Add MRST platform watchdog timer
- Fix OTG based battery charging
- Various USB OTG enhancements
- CAIF driver for ST-E modem
- LM3555 LED flash device for Intel Medfield Platform
- rebase to AHCI ALPM accounting patch
- refresh the PM accounting patch to include upstream feedback
State: new 2010-07-13T05:31:50 nashif
Comment: None
changes files:
--------------
--- kernel.changes
+++ kernel.changes
@@ -0,0 +1,10 @@
+* Fri Jul 12 2010 Arjan van de Ven <arjan at linux.intel.com> - 2.6.35-rc4
+- new ac patch
+ - Add MRST platform watchdog timer
+ - Fix OTG based battery charging
+ - Various USB OTG enhancements
+ - CAIF driver for ST-E modem
+ - LM3555 LED flash device for Intel Medfield Platform
+- rebase to AHCI ALPM accounting patch
+- refresh the PM accounting patch to include upstream feedback
+
old:
----
linux-2.6.33-ahci-fix-oops-on-dummy-port.patch
linux-2.6.35-runtime-pm-accounting.patch
new:
----
linux-2.6.35-rc4-ac-20100712.patch
linux-2.6.35-rc4-annotate-device-pm.patch
spec files:
-----------
--- kernel-ivi.spec
+++ kernel-ivi.spec
@@ -206,7 +206,7 @@
# The main consolidated MRST/MFLD tree from
# git//git.kernel.org/pub/scm/linux/kernel/git/alan/linux-2.6-mid-ref
#
-Patch200: linux-2.6.35-rc4-ac-20100707.patch
+Patch200: linux-2.6.35-rc4-ac-20100712.patch
Patch201: linux-2.6.35-pvr-get-rid-of-LinuxInitMutex.patch
#
@@ -338,10 +338,8 @@
# Patches to help PowerTOP
#
Patch704: linux-2.6.33-vfs-tracepoints.patch
-#note: need to fix conflicts and merge these two patches into one
-#linux-2.6.33-ahci-alpm-accounting.patch
-#linux-2.6.33-ahci-fix-oops-on-dummy-port.patch
-Patch705: linux-2.6.35-runtime-pm-accounting.patch
+Patch705: linux-2.6.33-ahci-alpm-accounting.patch
+Patch706: linux-2.6.35-rc4-annotate-device-pm.patch
#
# End of the boot time and power patches
@@ -365,7 +363,7 @@
# turn on "print fatal signals" by default, so that we can debug /sbin/init
# crashes
-Patch706: linux-2.6.35-fatal-signals.patch
+Patch707: linux-2.6.35-fatal-signals.patch
BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
@@ -528,7 +526,7 @@
# The main consolidated MRST/MFLD tree from
# git//git.kernel.org/pub/scm/linux/kernel/git/alan/linux-2.6-mid-ref
#
-# linux-2.6.35-rc4-ac-20100707.patch
+# linux-2.6.35-rc4-ac-20100712.patch
%patch200 -p1
# linux-2.6.35-pvr-get-rid-of-LinuxInitMutex.patch
%patch201 -p1
@@ -681,11 +679,10 @@
#
# linux-2.6.33-vfs-tracepoints.patch
%patch704 -p1
-#note: need to fix conflicts and merge these two patches into one
-#linux-2.6.33-ahci-alpm-accounting.patch
-#linux-2.6.33-ahci-fix-oops-on-dummy-port.patch
-# linux-2.6.35-runtime-pm-accounting.patch
+# linux-2.6.33-ahci-alpm-accounting.patch
%patch705 -p1
+# linux-2.6.35-rc4-annotate-device-pm.patch
+%patch706 -p1
#
# End of the boot time and power patches
@@ -710,7 +707,7 @@
# turn on "print fatal signals" by default, so that we can debug /sbin/init
# crashes
# linux-2.6.35-fatal-signals.patch
-%patch706 -p1
+%patch707 -p1
# Drop some necessary files from the source dir into the buildroot
cp $RPM_SOURCE_DIR/config-* .
--- kernel-mrst.spec
+++ kernel-mrst.spec
@@ -207,7 +207,7 @@
# The main consolidated MRST/MFLD tree from
# git//git.kernel.org/pub/scm/linux/kernel/git/alan/linux-2.6-mid-ref
#
-Patch200: linux-2.6.35-rc4-ac-20100707.patch
+Patch200: linux-2.6.35-rc4-ac-20100712.patch
Patch201: linux-2.6.35-pvr-get-rid-of-LinuxInitMutex.patch
#
@@ -339,10 +339,8 @@
# Patches to help PowerTOP
#
Patch704: linux-2.6.33-vfs-tracepoints.patch
-#note: need to fix conflicts and merge these two patches into one
-#linux-2.6.33-ahci-alpm-accounting.patch
-#linux-2.6.33-ahci-fix-oops-on-dummy-port.patch
-Patch705: linux-2.6.35-runtime-pm-accounting.patch
+Patch705: linux-2.6.33-ahci-alpm-accounting.patch
+Patch706: linux-2.6.35-rc4-annotate-device-pm.patch
#
# End of the boot time and power patches
@@ -366,7 +364,7 @@
# turn on "print fatal signals" by default, so that we can debug /sbin/init
# crashes
-Patch706: linux-2.6.35-fatal-signals.patch
+Patch707: linux-2.6.35-fatal-signals.patch
BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
@@ -529,7 +527,7 @@
# The main consolidated MRST/MFLD tree from
# git//git.kernel.org/pub/scm/linux/kernel/git/alan/linux-2.6-mid-ref
#
-# linux-2.6.35-rc4-ac-20100707.patch
+# linux-2.6.35-rc4-ac-20100712.patch
%patch200 -p1
# linux-2.6.35-pvr-get-rid-of-LinuxInitMutex.patch
%patch201 -p1
@@ -682,11 +680,10 @@
#
# linux-2.6.33-vfs-tracepoints.patch
%patch704 -p1
-#note: need to fix conflicts and merge these two patches into one
-#linux-2.6.33-ahci-alpm-accounting.patch
-#linux-2.6.33-ahci-fix-oops-on-dummy-port.patch
-# linux-2.6.35-runtime-pm-accounting.patch
+# linux-2.6.33-ahci-alpm-accounting.patch
%patch705 -p1
+# linux-2.6.35-rc4-annotate-device-pm.patch
+%patch706 -p1
#
# End of the boot time and power patches
@@ -711,7 +708,7 @@
# turn on "print fatal signals" by default, so that we can debug /sbin/init
# crashes
# linux-2.6.35-fatal-signals.patch
-%patch706 -p1
+%patch707 -p1
# Drop some necessary files from the source dir into the buildroot
cp $RPM_SOURCE_DIR/config-* .
--- kernel-n900.spec
+++ kernel-n900.spec
@@ -206,7 +206,7 @@
# The main consolidated MRST/MFLD tree from
# git//git.kernel.org/pub/scm/linux/kernel/git/alan/linux-2.6-mid-ref
#
-Patch200: linux-2.6.35-rc4-ac-20100707.patch
+Patch200: linux-2.6.35-rc4-ac-20100712.patch
Patch201: linux-2.6.35-pvr-get-rid-of-LinuxInitMutex.patch
#
@@ -338,10 +338,8 @@
# Patches to help PowerTOP
#
Patch704: linux-2.6.33-vfs-tracepoints.patch
-#note: need to fix conflicts and merge these two patches into one
-#linux-2.6.33-ahci-alpm-accounting.patch
-#linux-2.6.33-ahci-fix-oops-on-dummy-port.patch
-Patch705: linux-2.6.35-runtime-pm-accounting.patch
+Patch705: linux-2.6.33-ahci-alpm-accounting.patch
+Patch706: linux-2.6.35-rc4-annotate-device-pm.patch
#
# End of the boot time and power patches
@@ -365,7 +363,7 @@
# turn on "print fatal signals" by default, so that we can debug /sbin/init
# crashes
-Patch706: linux-2.6.35-fatal-signals.patch
+Patch707: linux-2.6.35-fatal-signals.patch
BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
@@ -528,7 +526,7 @@
# The main consolidated MRST/MFLD tree from
# git//git.kernel.org/pub/scm/linux/kernel/git/alan/linux-2.6-mid-ref
#
-# linux-2.6.35-rc4-ac-20100707.patch
+# linux-2.6.35-rc4-ac-20100712.patch
%patch200 -p1
# linux-2.6.35-pvr-get-rid-of-LinuxInitMutex.patch
%patch201 -p1
@@ -681,11 +679,10 @@
#
# linux-2.6.33-vfs-tracepoints.patch
%patch704 -p1
-#note: need to fix conflicts and merge these two patches into one
-#linux-2.6.33-ahci-alpm-accounting.patch
-#linux-2.6.33-ahci-fix-oops-on-dummy-port.patch
-# linux-2.6.35-runtime-pm-accounting.patch
+# linux-2.6.33-ahci-alpm-accounting.patch
%patch705 -p1
+# linux-2.6.35-rc4-annotate-device-pm.patch
+%patch706 -p1
#
# End of the boot time and power patches
@@ -710,7 +707,7 @@
# turn on "print fatal signals" by default, so that we can debug /sbin/init
# crashes
# linux-2.6.35-fatal-signals.patch
-%patch706 -p1
+%patch707 -p1
# Drop some necessary files from the source dir into the buildroot
cp $RPM_SOURCE_DIR/config-* .
--- kernel-netbook.spec
+++ kernel-netbook.spec
@@ -206,7 +206,7 @@
# The main consolidated MRST/MFLD tree from
# git//git.kernel.org/pub/scm/linux/kernel/git/alan/linux-2.6-mid-ref
#
-Patch200: linux-2.6.35-rc4-ac-20100707.patch
+Patch200: linux-2.6.35-rc4-ac-20100712.patch
Patch201: linux-2.6.35-pvr-get-rid-of-LinuxInitMutex.patch
#
@@ -338,10 +338,8 @@
# Patches to help PowerTOP
#
Patch704: linux-2.6.33-vfs-tracepoints.patch
-#note: need to fix conflicts and merge these two patches into one
-#linux-2.6.33-ahci-alpm-accounting.patch
-#linux-2.6.33-ahci-fix-oops-on-dummy-port.patch
-Patch705: linux-2.6.35-runtime-pm-accounting.patch
+Patch705: linux-2.6.33-ahci-alpm-accounting.patch
+Patch706: linux-2.6.35-rc4-annotate-device-pm.patch
#
# End of the boot time and power patches
@@ -365,7 +363,7 @@
# turn on "print fatal signals" by default, so that we can debug /sbin/init
# crashes
-Patch706: linux-2.6.35-fatal-signals.patch
+Patch707: linux-2.6.35-fatal-signals.patch
BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
@@ -528,7 +526,7 @@
# The main consolidated MRST/MFLD tree from
# git//git.kernel.org/pub/scm/linux/kernel/git/alan/linux-2.6-mid-ref
#
-# linux-2.6.35-rc4-ac-20100707.patch
+# linux-2.6.35-rc4-ac-20100712.patch
%patch200 -p1
# linux-2.6.35-pvr-get-rid-of-LinuxInitMutex.patch
%patch201 -p1
@@ -681,11 +679,10 @@
#
# linux-2.6.33-vfs-tracepoints.patch
%patch704 -p1
-#note: need to fix conflicts and merge these two patches into one
-#linux-2.6.33-ahci-alpm-accounting.patch
-#linux-2.6.33-ahci-fix-oops-on-dummy-port.patch
-# linux-2.6.35-runtime-pm-accounting.patch
+# linux-2.6.33-ahci-alpm-accounting.patch
%patch705 -p1
+# linux-2.6.35-rc4-annotate-device-pm.patch
+%patch706 -p1
#
# End of the boot time and power patches
@@ -710,7 +707,7 @@
# turn on "print fatal signals" by default, so that we can debug /sbin/init
# crashes
# linux-2.6.35-fatal-signals.patch
-%patch706 -p1
+%patch707 -p1
# Drop some necessary files from the source dir into the buildroot
cp $RPM_SOURCE_DIR/config-* .
--- kernel.spec
+++ kernel.spec
@@ -218,7 +218,7 @@
# The main consolidated MRST/MFLD tree from
# git//git.kernel.org/pub/scm/linux/kernel/git/alan/linux-2.6-mid-ref
#
-Patch200: linux-2.6.35-rc4-ac-20100707.patch
+Patch200: linux-2.6.35-rc4-ac-20100712.patch
Patch201: linux-2.6.35-pvr-get-rid-of-LinuxInitMutex.patch
#
@@ -350,10 +350,8 @@
# Patches to help PowerTOP
#
Patch704: linux-2.6.33-vfs-tracepoints.patch
-#note: need to fix conflicts and merge these two patches into one
-#linux-2.6.33-ahci-alpm-accounting.patch
-#linux-2.6.33-ahci-fix-oops-on-dummy-port.patch
-Patch705: linux-2.6.35-runtime-pm-accounting.patch
+Patch705: linux-2.6.33-ahci-alpm-accounting.patch
+Patch706: linux-2.6.35-rc4-annotate-device-pm.patch
#
# End of the boot time and power patches
@@ -377,7 +375,7 @@
# turn on "print fatal signals" by default, so that we can debug /sbin/init
# crashes
-Patch706: linux-2.6.35-fatal-signals.patch
+Patch707: linux-2.6.35-fatal-signals.patch
BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
@@ -570,7 +568,7 @@
# The main consolidated MRST/MFLD tree from
# git//git.kernel.org/pub/scm/linux/kernel/git/alan/linux-2.6-mid-ref
#
-# linux-2.6.35-rc4-ac-20100707.patch
+# linux-2.6.35-rc4-ac-20100712.patch
%patch200 -p1
# linux-2.6.35-pvr-get-rid-of-LinuxInitMutex.patch
%patch201 -p1
@@ -723,11 +721,10 @@
#
# linux-2.6.33-vfs-tracepoints.patch
%patch704 -p1
-#note: need to fix conflicts and merge these two patches into one
-#linux-2.6.33-ahci-alpm-accounting.patch
-#linux-2.6.33-ahci-fix-oops-on-dummy-port.patch
-# linux-2.6.35-runtime-pm-accounting.patch
+# linux-2.6.33-ahci-alpm-accounting.patch
%patch705 -p1
+# linux-2.6.35-rc4-annotate-device-pm.patch
+%patch706 -p1
#
# End of the boot time and power patches
@@ -752,7 +749,7 @@
# turn on "print fatal signals" by default, so that we can debug /sbin/init
# crashes
# linux-2.6.35-fatal-signals.patch
-%patch706 -p1
+%patch707 -p1
# Drop some necessary files from the source dir into the buildroot
cp $RPM_SOURCE_DIR/config-* .
other changes:
--------------
++++++ config-generic
--- config-generic
+++ config-generic
@@ -3496,3 +3496,4 @@
CONFIG_CAIF_SPI_SYNC=y
# CONFIG_APDS9802ALS is not set
# CONFIG_TOUCHSCREEN_CLEARPAD_TM1217 is not set
+# CONFIG_MFLD_LEDFLASH is not set
++++++ config-mrst
--- config-mrst
+++ config-mrst
@@ -149,3 +149,5 @@
# CONFIG_USB_G_MULTI_RNDIS is not set
# CONFIG_USB_G_MULTI_CDC is not set
CONFIG_TOUCHSCREEN_CY8CTMG110=y
+# CONFIG_MFLD_LEDFLASH is not set
+
++++++ linux-2.6.33-ahci-alpm-accounting.patch
--- linux-2.6.33-ahci-alpm-accounting.patch
+++ linux-2.6.33-ahci-alpm-accounting.patch
@@ -1,6 +1,4 @@
-From f62ff8c98080b4a9e66f82f793145b863b4e183a Mon Sep 17 00:00:00 2001
From: Arjan van de Ven <arjan at linux.intel.com>
-Date: Fri, 13 Nov 2009 16:54:37 -0800
Subject: [PATCH] libata: Add ALPM power state accounting to the AHCI driver
PowerTOP wants to be able to show the user how effective the ALPM link
@@ -29,38 +27,13 @@
(work to resolve "host0" to a more human readable name is in progress)
Signed-off-by: Arjan van de Ven <arjan at linux.intel.com>
----
- drivers/ata/ahci.c | 175 +++++++++++++++++++++++++++++++++++++++++++++++++++-
- 1 files changed, 173 insertions(+), 2 deletions(-)
-diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
-index a3241a1..448d684 100644
---- a/drivers/ata/ahci.c
-+++ b/drivers/ata/ahci.c
-@@ -72,6 +72,21 @@ MODULE_PARM_DESC(ignore_sss, "Ignore staggered spinup flag (0=don't ignore, 1=ig
- static int ahci_enable_alpm(struct ata_port *ap,
- enum link_pm policy);
- static void ahci_disable_alpm(struct ata_port *ap);
-+
-+static ssize_t ahci_alpm_show_active(struct device *dev,
-+ struct device_attribute *attr, char *buf);
-+static ssize_t ahci_alpm_show_slumber(struct device *dev,
-+ struct device_attribute *attr, char *buf);
-+static ssize_t ahci_alpm_show_partial(struct device *dev,
-+ struct device_attribute *attr, char *buf);
-+
-+static ssize_t ahci_alpm_show_accounting(struct device *dev,
-+ struct device_attribute *attr, char *buf);
-+
-+static ssize_t ahci_alpm_set_accounting(struct device *dev,
-+ struct device_attribute *attr,
-+ const char *buf, size_t count);
-+
- static ssize_t ahci_led_show(struct ata_port *ap, char *buf);
- static ssize_t ahci_led_store(struct ata_port *ap, const char *buf,
- size_t size);
-@@ -289,6 +304,13 @@ struct ahci_host_priv {
- u32 em_loc; /* enclosure management location */
+diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h
+index 7113c57..6a3a291 100644
+--- a/drivers/ata/ahci.h
++++ b/drivers/ata/ahci.h
+@@ -261,6 +261,13 @@ struct ahci_em_priv {
+ unsigned long led_state;
};
+enum ahci_port_states {
@@ -73,8 +46,8 @@
struct ahci_port_priv {
struct ata_link *active_link;
struct ahci_cmd_hdr *cmd_slot;
-@@ -304,6 +326,14 @@ struct ahci_port_priv {
- u32 intr_mask; /* interrupts to enable */
+@@ -279,6 +286,14 @@ struct ahci_port_priv {
+ int fbs_last_dev; /* save FBS.DEV of last FIS */
/* enclosure management info per PM slot */
struct ahci_em_priv em_priv[EM_MAX_SLOTS];
+
@@ -87,21 +60,46 @@
+ int previous_jiffies;
};
- static int ahci_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val);
-@@ -359,6 +389,12 @@ DEVICE_ATTR(ahci_host_cap2, S_IRUGO, ahci_show_host_cap2, NULL);
- DEVICE_ATTR(ahci_host_version, S_IRUGO, ahci_show_host_version, NULL);
- DEVICE_ATTR(ahci_port_cmd, S_IRUGO, ahci_show_port_cmd, NULL);
-
-+DEVICE_ATTR(ahci_alpm_active, S_IRUGO, ahci_alpm_show_active, NULL);
-+DEVICE_ATTR(ahci_alpm_partial, S_IRUGO, ahci_alpm_show_partial, NULL);
-+DEVICE_ATTR(ahci_alpm_slumber, S_IRUGO, ahci_alpm_show_slumber, NULL);
-+DEVICE_ATTR(ahci_alpm_accounting, S_IRUGO | S_IWUSR,
+ struct ahci_host_priv {
+diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c
+index 81e772a..c3250ee 100644
+--- a/drivers/ata/libahci.c
++++ b/drivers/ata/libahci.c
+@@ -59,6 +59,20 @@ MODULE_PARM_DESC(ignore_sss, "Ignore staggered spinup flag (0=don't ignore, 1=ig
+ static int ahci_enable_alpm(struct ata_port *ap,
+ enum link_pm policy);
+ static void ahci_disable_alpm(struct ata_port *ap);
++static ssize_t ahci_alpm_show_active(struct device *dev,
++ struct device_attribute *attr, char *buf);
++static ssize_t ahci_alpm_show_slumber(struct device *dev,
++ struct device_attribute *attr, char *buf);
++static ssize_t ahci_alpm_show_partial(struct device *dev,
++ struct device_attribute *attr, char *buf);
++
++static ssize_t ahci_alpm_show_accounting(struct device *dev,
++ struct device_attribute *attr, char *buf);
++
++static ssize_t ahci_alpm_set_accounting(struct device *dev,
++ struct device_attribute *attr,
++ const char *buf, size_t count);
++
+ static ssize_t ahci_led_show(struct ata_port *ap, char *buf);
+ static ssize_t ahci_led_store(struct ata_port *ap, const char *buf,
+ size_t size);
+@@ -118,6 +132,12 @@ static DEVICE_ATTR(ahci_host_caps, S_IRUGO, ahci_show_host_caps, NULL);
+ static DEVICE_ATTR(ahci_host_cap2, S_IRUGO, ahci_show_host_cap2, NULL);
+ static DEVICE_ATTR(ahci_host_version, S_IRUGO, ahci_show_host_version, NULL);
+ static DEVICE_ATTR(ahci_port_cmd, S_IRUGO, ahci_show_port_cmd, NULL);
++static DEVICE_ATTR(ahci_alpm_active, S_IRUGO, ahci_alpm_show_active, NULL);
++static DEVICE_ATTR(ahci_alpm_partial, S_IRUGO, ahci_alpm_show_partial, NULL);
++static DEVICE_ATTR(ahci_alpm_slumber, S_IRUGO, ahci_alpm_show_slumber, NULL);
++static DEVICE_ATTR(ahci_alpm_accounting, S_IRUGO | S_IWUSR,
+ ahci_alpm_show_accounting, ahci_alpm_set_accounting);
+
- static struct device_attribute *ahci_shost_attrs[] = {
- &dev_attr_link_power_management_policy,
- &dev_attr_em_message_type,
-@@ -367,6 +403,10 @@ static struct device_attribute *ahci_shost_attrs[] = {
+ static DEVICE_ATTR(em_buffer, S_IWUSR | S_IRUGO,
+ ahci_read_em_buffer, ahci_store_em_buffer);
+
+@@ -129,6 +149,10 @@ static struct device_attribute *ahci_shost_attrs[] = {
&dev_attr_ahci_host_cap2,
&dev_attr_ahci_host_version,
&dev_attr_ahci_port_cmd,
@@ -109,17 +107,17 @@
+ &dev_attr_ahci_alpm_partial,
+ &dev_attr_ahci_alpm_slumber,
+ &dev_attr_ahci_alpm_accounting,
+ &dev_attr_em_buffer,
NULL
};
-
-@@ -1165,9 +1205,14 @@ static int ahci_enable_alpm(struct ata_port *ap,
- * getting woken up due to spurious phy ready interrupts
+@@ -734,9 +758,14 @@ static int ahci_enable_alpm(struct ata_port *ap,
+ * getting woken up due to spurious phy ready interrupts
* TBD - Hot plug should be done via polling now, is
* that even supported?
+ *
+ * However, when accounting_active is set, we do want
+ * the interrupts for accounting purposes.
- */
+ */
- pp->intr_mask &= ~PORT_IRQ_PHYRDY;
- writel(pp->intr_mask, port_mmio + PORT_IRQ_MASK);
+ if (!pp->accounting_active) {
@@ -128,8 +126,8 @@
+ }
/*
- * Set a flag to indicate that we should ignore all PhyRdy
-@@ -2157,6 +2202,141 @@ static void ahci_error_intr(struct ata_port *ap, u32 irq_stat)
+ * Set a flag to indicate that we should ignore all PhyRdy
+@@ -1645,6 +1674,162 @@ static void ahci_error_intr(struct ata_port *ap, u32 irq_stat)
ata_port_abort(ap);
}
@@ -162,6 +160,7 @@
+ if (ap == NULL)
+ return;
+ pp = ap->private_data;
++
+ if (!pp) return;
+
+ new_state = get_current_alpm_state(ap);
@@ -198,8 +197,8 @@
+ struct ata_port *ap = ata_shost_to_port(shost);
+ struct ahci_port_priv *pp;
+
-+ if (!ap)
-+ return;
++ if (!ap || ata_port_is_dummy(ap))
++ return -EINVAL;
+ pp = ap->private_data;
+ account_alpm_stats(ap);
+
@@ -211,8 +210,12 @@
+{
+ struct Scsi_Host *shost = class_to_shost(dev);
+ struct ata_port *ap = ata_shost_to_port(shost);
-+ struct ahci_port_priv *pp = ap->private_data;
++ struct ahci_port_priv *pp;
+
++ if (!ap || ata_port_is_dummy(ap))
++ return -EINVAL;
++
++ pp = ap->private_data;
+ account_alpm_stats(ap);
+
+ return sprintf(buf, "%u\n", jiffies_to_msecs(pp->partial_jiffies));
@@ -223,20 +226,29 @@
+{
+ struct Scsi_Host *shost = class_to_shost(dev);
+ struct ata_port *ap = ata_shost_to_port(shost);
-+ struct ahci_port_priv *pp = ap->private_data;
++ struct ahci_port_priv *pp;
++
++ if (!ap || ata_port_is_dummy(ap))
++ return -EINVAL;
(61 more lines skipped)
++++++ linux-2.6.35-rc4-ac-20100712.patch (new)
--- linux-2.6.35-rc4-ac-20100712.patch
+++ linux-2.6.35-rc4-ac-20100712.patch
+diff --git a/Documentation/ABI/testing/sysfs-bus-devices-i2c-isl29020 b/Documentation/ABI/testing/sysfs-bus-devices-i2c-isl29020
+new file mode 100644
+index 0000000..bc71757
+--- /dev/null
++++ b/Documentation/ABI/testing/sysfs-bus-devices-i2c-isl29020
+@@ -0,0 +1,29 @@
++
++Where: /sys/bus/i2c/devices/.../sensing_range
++Date: April 2010
++Kernel Version: 2.6.36?
++Contact: alan.cox at intel.com
++Description: Reports the sensing range configured on the ISL29020
++ hardware (1/4/16/64000). Writing a value between 1 and 4
++ sets the sensing range to 1/4/16/64000.
++
++
++Where: /sys/bus/i2c/devices/.../power_state
++Date: April 2010
++Kernel Version: 2.6.36?
++Contact: alan.cox at intel.com
++Description: Write 1 to bring the device out of power saving mode and 0
++ to return it to power saving. When read returns 0 or 1
++ indicating the current power state.
++
++Where: /sys/bus/i2c/devices/.../lux_output
++Date: April 2010
++Kernel Version: 2.6.36?
++Contact: alan.cox at intel.com
++Description: Report the lux level being read by the sensor.
++
++
++
++
++
++
+diff --git a/Documentation/ABI/testing/sysfs-bus-i2c-devices-hm6352 b/Documentation/ABI/testing/sysfs-bus-i2c-devices-hm6352
+new file mode 100644
+index 0000000..fbedf77
+--- /dev/null
++++ b/Documentation/ABI/testing/sysfs-bus-i2c-devices-hm6352
+@@ -0,0 +1,21 @@
++Where: /sys/bus/i2c/devices/.../heading
++Date: April 2010
++Kernel Version: 2.6.36?
++Contact: alan.cox at intel.com
++Description: Reports the current heading from the compass as a floating
++ point value in degrees.
++
++Where: /sys/bus/i2c/devices/.../power_state
++Date: April 2010
++Kernel Version: 2.6.36?
++Contact: alan.cox at intel.com
++Description: Sets the power state of the device. 0 sets the device into
++ sleep mode, 1 wakes it up.
++
++Where: /sys/bus/i2c/devices/.../calibration
++Date: April 2010
++Kernel Version: 2.6.36?
++Contact: alan.cox at intel.com
++Description: Sets the calibration on or off (1 = on, 0 = off). See the
++ chip data sheet.
++
+diff --git a/Documentation/networking/caif/spi_porting.txt b/Documentation/networking/caif/spi_porting.txt
+new file mode 100644
+index 0000000..61d7c92
+--- /dev/null
++++ b/Documentation/networking/caif/spi_porting.txt
+@@ -0,0 +1,208 @@
++- CAIF SPI porting -
++
++- CAIF SPI basics:
++
++Running CAIF over SPI needs some extra setup, owing to the nature of SPI.
++Two extra GPIOs have been added in order to negotiate the transfers
++ between the master and the slave. The minimum requirement for running
++CAIF over SPI is a SPI slave chip and two GPIOs (more details below).
++Please note that running as a slave implies that you need to keep up
++with the master clock. An overrun or underrun event is fatal.
++
++- CAIF SPI framework:
++
++To make porting as easy as possible, the CAIF SPI has been divided in
++two parts. The first part (called the interface part) deals with all
++generic functionality such as length framing, SPI frame negotiation
++and SPI frame delivery and transmission. The other part is the CAIF
++SPI slave device part, which is the module that you have to write if
++you want to run SPI CAIF on a new hardware. This part takes care of
++the physical hardware, both with regard to SPI and to GPIOs.
++
++- Implementing a CAIF SPI device:
++
++ - Functionality provided by the CAIF SPI slave device:
++
++ In order to implement a SPI device you will, as a minimum,
++ need to implement the following
++ functions:
++
++ int (*init_xfer) (struct cfspi_xfer * xfer, struct cfspi_dev *dev):
++
++ This function is called by the CAIF SPI interface to give
++ you a chance to set up your hardware to be ready to receive
++ a stream of data from the master. The xfer structure contains
++ both physical and logical adresses, as well as the total length
++ of the transfer in both directions.The dev parameter can be used
++ to map to different CAIF SPI slave devices.
++
++ void (*sig_xfer) (bool xfer, struct cfspi_dev *dev):
++
++ This function is called by the CAIF SPI interface when the output
++ (SPI_INT) GPIO needs to change state. The boolean value of the xfer
++ variable indicates whether the GPIO should be asserted (HIGH) or
++ deasserted (LOW). The dev parameter can be used to map to different CAIF
++ SPI slave devices.
++
++ - Functionality provided by the CAIF SPI interface:
++
++ void (*ss_cb) (bool assert, struct cfspi_ifc *ifc);
++
++ This function is called by the CAIF SPI slave device in order to
++ signal a change of state of the input GPIO (SS) to the interface.
++ Only active edges are mandatory to be reported.
++ This function can be called from IRQ context (recommended in order
++ not to introduce latency). The ifc parameter should be the pointer
++ returned from the platform probe function in the SPI device structure.
++
++ void (*xfer_done_cb) (struct cfspi_ifc *ifc);
++
++ This function is called by the CAIF SPI slave device in order to
++ report that a transfer is completed. This function should only be
++ called once both the transmission and the reception are completed.
++ This function can be called from IRQ context (recommended in order
++ not to introduce latency). The ifc parameter should be the pointer
++ returned from the platform probe function in the SPI device structure.
++
++ - Connecting the bits and pieces:
++
++ - Filling in the SPI slave device structure:
++
++ Connect the necessary callback functions.
++ Indicate clock speed (used to calculate toggle delays).
++ Chose a suitable name (helps debugging if you use several CAIF
++ SPI slave devices).
++ Assign your private data (can be used to map to your structure).
++
++ - Filling in the SPI slave platform device structure:
++ Add name of driver to connect to ("cfspi_sspi").
++ Assign the SPI slave device structure as platform data.
++
++- Padding:
++
++In order to optimize throughput, a number of SPI padding options are provided.
++Padding can be enabled independently for uplink and downlink transfers.
++Padding can be enabled for the head, the tail and for the total frame size.
++The padding needs to be correctly configured on both sides of the link.
++The padding can be changed via module parameters in cfspi_sspi.c or via
++the sysfs directory of the cfspi_sspi driver (before device registration).
++
++- CAIF SPI device template:
++
++/*
++ * Copyright (C) ST-Ericsson AB 2010
++ * Author: Daniel Martensson / Daniel.Martensson at stericsson.com
++ * License terms: GNU General Public License (GPL), version 2.
++ *
++ */
++
++#include <linux/init.h>
++#include <linux/module.h>
++#include <linux/device.h>
++#include <linux/wait.h>
++#include <linux/interrupt.h>
++#include <linux/dma-mapping.h>
++#include <net/caif/caif_spi.h>
++
++MODULE_LICENSE("GPL");
++
++struct sspi_struct {
++ struct cfspi_dev sdev;
++ struct cfspi_xfer *xfer;
++};
++
++static struct sspi_struct slave;
++static struct platform_device slave_device;
++
++static irqreturn_t sspi_irq(int irq, void *arg)
++{
++ /* You only need to trigger on an edge to the active state of the
++ * SS signal. Once a edge is detected, the ss_cb() function should be
++ * called with the parameter assert set to true. It is OK
++ * (and even advised) to call the ss_cb() function in IRQ context in
++ * order not to add any delay. */
++
++ return IRQ_HANDLED;
++}
++
++static void sspi_complete(void *context)
++{
++ /* Normally the DMA or the SPI framework will call you back
(168170 more lines skipped)
++++++ linux-2.6.35-rc4-annotate-device-pm.patch (new)
--- linux-2.6.35-rc4-annotate-device-pm.patch
+++ linux-2.6.35-rc4-annotate-device-pm.patch
+From: Arjan van de Ven <arjan at linux.intel.com>
+Subject: [PATCH v2] pm: Add runtime PM statistics
+
+In order for PowerTOP to be able to report how well the new runtime PM is
+working for the various drivers, the kernel needs to export some basic
+statistics in sysfs.
+
+This patch adds two sysfs files in the runtime PM domain that expose the
+total time a device has been active, and the time a device has been
+suspended.
+
+With this PowerTOP can compute the activity percentage
+
+Active %age = 100 * (delta active) / (delta active + delta suspended)
+
+and present the information to the user.
+
+I've written the PowerTOP code (slated for version 1.12) already, and the
+output looks like this:
+
+Runtime Device Power Management statistics
+Active Device name
+ 10.0% 06:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller
+
+
+[version 2: fix stat update bugs noticed by Alan Stern]
+
+Signed-off-by: Arjan van de Ven <arjan at linux.intel.com>
+
+
+diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c
+index b0ec0e9..b78c401 100644
+--- a/drivers/base/power/runtime.c
++++ b/drivers/base/power/runtime.c
+@@ -123,6 +123,45 @@ int pm_runtime_idle(struct device *dev)
+ }
+ EXPORT_SYMBOL_GPL(pm_runtime_idle);
+
++
++/**
++ * update_pm_runtime_accounting - Update the time accounting of power states
++ * @dev: Device to update the accounting for
++ *
++ * In order to be able to have time accounting of the various power states
++ * (as used by programs such as PowerTOP to show the effectiveness of runtime
++ * PM), we need to track the time spent in each state.
++ * update_pm_runtime_accounting must be called each time before the
++ * runtime_status field is updated, to account the time in the old state
++ * correctly.
++ */
++void update_pm_runtime_accounting(struct device *dev)
++{
++ unsigned long now = jiffies;
++ int delta;
++
++ delta = now - dev->power.accounting_timestamp;
++
++ if (delta < 0)
++ delta = 0;
++
++ dev->power.accounting_timestamp = now;
++
++ if (dev->power.disable_depth > 0)
++ return;
++
++ if (dev->power.runtime_status == RPM_SUSPENDED)
++ dev->power.suspended_jiffies += delta;
++ else
++ dev->power.active_jiffies += delta;
++}
++
++static void __update_runtime_status(struct device *dev, enum rpm_status status)
++{
++ update_pm_runtime_accounting(dev);
++ dev->power.runtime_status = status;
++}
++
+ /**
+ * __pm_runtime_suspend - Carry out run-time suspend of given device.
+ * @dev: Device to suspend.
+@@ -197,7 +236,7 @@ int __pm_runtime_suspend(struct device *dev, bool from_wq)
+ goto repeat;
+ }
+
+- dev->power.runtime_status = RPM_SUSPENDING;
++ __update_runtime_status(dev, RPM_SUSPENDING);
+ dev->power.deferred_resume = false;
+
+ if (dev->bus && dev->bus->pm && dev->bus->pm->runtime_suspend) {
+@@ -228,7 +267,7 @@ int __pm_runtime_suspend(struct device *dev, bool from_wq)
+ }
+
+ if (retval) {
+- dev->power.runtime_status = RPM_ACTIVE;
++ __update_runtime_status(dev, RPM_ACTIVE);
+ if (retval == -EAGAIN || retval == -EBUSY) {
+ if (dev->power.timer_expires == 0)
+ notify = true;
+@@ -237,7 +276,7 @@ int __pm_runtime_suspend(struct device *dev, bool from_wq)
+ pm_runtime_cancel_pending(dev);
+ }
+ } else {
+- dev->power.runtime_status = RPM_SUSPENDED;
++ __update_runtime_status(dev, RPM_SUSPENDED);
+ pm_runtime_deactivate_timer(dev);
+
+ if (dev->parent) {
+@@ -381,7 +420,7 @@ int __pm_runtime_resume(struct device *dev, bool from_wq)
+ goto repeat;
+ }
+
+- dev->power.runtime_status = RPM_RESUMING;
++ __update_runtime_status(dev, RPM_RESUMING);
+
+ if (dev->bus && dev->bus->pm && dev->bus->pm->runtime_resume) {
+ spin_unlock_irq(&dev->power.lock);
+@@ -411,10 +450,10 @@ int __pm_runtime_resume(struct device *dev, bool from_wq)
+ }
+
+ if (retval) {
+- dev->power.runtime_status = RPM_SUSPENDED;
++ __update_runtime_status(dev, RPM_SUSPENDED);
+ pm_runtime_cancel_pending(dev);
+ } else {
+- dev->power.runtime_status = RPM_ACTIVE;
++ __update_runtime_status(dev, RPM_ACTIVE);
+ if (parent)
+ atomic_inc(&parent->power.child_count);
+ }
+@@ -848,7 +887,7 @@ int __pm_runtime_set_status(struct device *dev, unsigned int status)
+ }
+
+ out_set:
+- dev->power.runtime_status = status;
++ __update_runtime_status(dev, status);
+ dev->power.runtime_error = 0;
+ out:
+ spin_unlock_irqrestore(&dev->power.lock, flags);
+@@ -1077,6 +1116,7 @@ void pm_runtime_init(struct device *dev)
+ dev->power.request_pending = false;
+ dev->power.request = RPM_REQ_NONE;
+ dev->power.deferred_resume = false;
++ dev->power.accounting_timestamp = jiffies;
+ INIT_WORK(&dev->power.work, pm_runtime_work);
+
+ dev->power.timer_expires = 0;
+diff --git a/drivers/base/power/sysfs.c b/drivers/base/power/sysfs.c
+index a4c33bc..f45c316 100644
+--- a/drivers/base/power/sysfs.c
++++ b/drivers/base/power/sysfs.c
+@@ -6,6 +6,7 @@
+ #include <linux/string.h>
+ #include <linux/pm_runtime.h>
+ #include <asm/atomic.h>
++#include <linux/jiffies.h>
+ #include "power.h"
+
+ /*
+@@ -190,9 +191,34 @@ static ssize_t rtpm_status_show(struct device *dev,
+ return -EIO;
+ }
+
++static ssize_t rtpm_active_time_show(struct device *dev,
++ struct device_attribute *attr, char *buf)
++{
++ int ret;
++ spin_lock_irq(&dev->power.lock);
++ update_pm_runtime_accounting(dev);
++ ret = sprintf(buf, "%i\n", jiffies_to_msecs(dev->power.active_jiffies));
++ spin_unlock_irq(&dev->power.lock);
++ return ret;
++}
++
++static ssize_t rtpm_suspended_time_show(struct device *dev,
++ struct device_attribute *attr, char *buf)
++{
++ int ret;
++ spin_lock_irq(&dev->power.lock);
++ update_pm_runtime_accounting(dev);
++ ret = sprintf(buf, "%i\n",
++ jiffies_to_msecs(dev->power.suspended_jiffies));
++ spin_unlock_irq(&dev->power.lock);
++ return ret;
++}
++
+ static DEVICE_ATTR(runtime_usage, 0444, rtpm_usagecount_show, NULL);
+ static DEVICE_ATTR(runtime_active_kids, 0444, rtpm_children_show, NULL);
+ static DEVICE_ATTR(runtime_status, 0444, rtpm_status_show, NULL);
++static DEVICE_ATTR(runtime_active_time, 0444, rtpm_active_time_show, NULL);
++static DEVICE_ATTR(runtime_suspended_time, 0444, rtpm_suspended_time_show, NULL);
+ static DEVICE_ATTR(runtime_enabled, 0444, rtpm_enabled_show, NULL);
+
+ #endif
+@@ -234,6 +260,8 @@ static struct attribute * power_attrs[] = {
+ &dev_attr_async.attr,
+ #ifdef CONFIG_PM_RUNTIME
+ &dev_attr_runtime_usage.attr,
++ &dev_attr_runtime_suspended_time.attr,
(26 more lines skipped)
++++++ series
--- series
+++ series
@@ -51,7 +51,7 @@
# The main consolidated MRST/MFLD tree from
# git//git.kernel.org/pub/scm/linux/kernel/git/alan/linux-2.6-mid-ref
#
-linux-2.6.35-rc4-ac-20100707.patch
+linux-2.6.35-rc4-ac-20100712.patch
linux-2.6.35-pvr-get-rid-of-LinuxInitMutex.patch
#
@@ -183,10 +183,8 @@
# Patches to help PowerTOP
#
linux-2.6.33-vfs-tracepoints.patch
-#note: need to fix conflicts and merge these two patches into one
-#linux-2.6.33-ahci-alpm-accounting.patch
-#linux-2.6.33-ahci-fix-oops-on-dummy-port.patch
-linux-2.6.35-runtime-pm-accounting.patch
+linux-2.6.33-ahci-alpm-accounting.patch
+linux-2.6.35-rc4-annotate-device-pm.patch
#
# End of the boot time and power patches
++++++ deleted files:
--- linux-2.6.33-ahci-fix-oops-on-dummy-port.patch
--- linux-2.6.35-runtime-pm-accounting.patch
More information about the MeeGo-commits
mailing list