--- /dev/null
+From fc54ab72959edbf229b65ac74b2f122d799ca002 Mon Sep 17 00:00:00 2001
+From: Lin Ming <ming.m.lin@intel.com>
+Date: Mon, 16 Jul 2012 16:30:21 +0800
+Subject: ACPI: run _OSC after ACPI_FULL_INITIALIZATION
+
+From: Lin Ming <ming.m.lin@intel.com>
+
+commit fc54ab72959edbf229b65ac74b2f122d799ca002 upstream.
+
+The _OSC method may exist in module level code,
+so it must be called after ACPI_FULL_INITIALIZATION
+
+On some new platforms with Zero-Power-Optical-Disk-Drive (ZPODD)
+support, this fix is necessary to save power.
+
+Signed-off-by: Lin Ming <ming.m.lin@intel.com>
+Tested-by: Aaron Lu <aaron.lu@intel.com>
+Signed-off-by: Len Brown <len.brown@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/acpi/bus.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+--- a/drivers/acpi/bus.c
++++ b/drivers/acpi/bus.c
+@@ -994,8 +994,6 @@ static int __init acpi_bus_init(void)
+ status = acpi_ec_ecdt_probe();
+ /* Ignore result. Not having an ECDT is not fatal. */
+
+- acpi_bus_osc_support();
+-
+ status = acpi_initialize_objects(ACPI_FULL_INITIALIZATION);
+ if (ACPI_FAILURE(status)) {
+ printk(KERN_ERR PREFIX "Unable to initialize ACPI objects\n");
+@@ -1003,6 +1001,12 @@ static int __init acpi_bus_init(void)
+ }
+
+ /*
++ * _OSC method may exist in module level code,
++ * so it must be run after ACPI_FULL_INITIALIZATION
++ */
++ acpi_bus_osc_support();
++
++ /*
+ * _PDC control method may load dynamic SSDT tables,
+ * and we need to install the table handler before that.
+ */
--- /dev/null
+From 0eb5a35801df3c438ce3fc91310a415ea4452c00 Mon Sep 17 00:00:00 2001
+From: Fabio Estevam <fabio.estevam@freescale.com>
+Date: Thu, 4 Oct 2012 17:11:16 -0700
+Subject: drivers/dma/dmaengine.c: lower the priority of 'failed to get' dma channel message
+
+From: Fabio Estevam <fabio.estevam@freescale.com>
+
+commit 0eb5a35801df3c438ce3fc91310a415ea4452c00 upstream.
+
+Do the same as commit a03a202e95fd ("dmaengine: failure to get a
+specific DMA channel is not critical") to get rid of the following
+messages during kernel boot:
+
+ dmaengine_get: failed to get dma1chan0: (-22)
+ dmaengine_get: failed to get dma1chan1: (-22)
+ dmaengine_get: failed to get dma1chan2: (-22)
+ dmaengine_get: failed to get dma1chan3: (-22)
+ ..
+
+Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
+Cc: Vinod Koul <vinod.koul@intel.com>
+Cc: Dan Williams <dan.j.williams@intel.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/dma/dmaengine.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/dma/dmaengine.c
++++ b/drivers/dma/dmaengine.c
+@@ -582,7 +582,7 @@ void dmaengine_get(void)
+ list_del_rcu(&device->global_node);
+ break;
+ } else if (err)
+- pr_err("%s: failed to get %s: (%d)\n",
++ pr_debug("%s: failed to get %s: (%d)\n",
+ __func__, dma_chan_name(chan), err);
+ }
+ }
--- /dev/null
+From 0f6d93aa9d96cc9022b51bd10d462b03296be146 Mon Sep 17 00:00:00 2001
+From: Martin Michlmayr <tbm@cyrius.com>
+Date: Thu, 4 Oct 2012 17:11:25 -0700
+Subject: drivers/scsi/atp870u.c: fix bad use of udelay
+
+From: Martin Michlmayr <tbm@cyrius.com>
+
+commit 0f6d93aa9d96cc9022b51bd10d462b03296be146 upstream.
+
+The ACARD driver calls udelay() with a value > 2000, which leads to to
+the following compilation error on ARM:
+
+ ERROR: "__bad_udelay" [drivers/scsi/atp870u.ko] undefined!
+ make[1]: *** [__modpost] Error 1
+
+This is because udelay is defined on ARM, roughly speaking, as
+
+ #define udelay(n) ((n) > 2000 ? __bad_udelay() : \
+ __const_udelay((n) * ((2199023U*HZ)>>11)))
+
+The argument to __const_udelay is the number of jiffies to wait divided
+by 4, but this does not work unless the multiplication does not
+overflow, and that is what the build error is designed to prevent. The
+intended behavior can be achieved by using mdelay to call udelay
+multiple times in a loop.
+
+[jrnieder@gmail.com: adding context]
+Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
+Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
+Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/scsi/atp870u.c | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+--- a/drivers/scsi/atp870u.c
++++ b/drivers/scsi/atp870u.c
+@@ -1173,7 +1173,16 @@ wait_io1:
+ outw(val, tmport);
+ outb(2, 0x80);
+ TCM_SYNC:
+- udelay(0x800);
++ /*
++ * The funny division into multiple delays is to accomodate
++ * arches like ARM where udelay() multiplies its argument by
++ * a large number to initialize a loop counter. To avoid
++ * overflow, the maximum supported udelay is 2000 microseconds.
++ *
++ * XXX it would be more polite to find a way to use msleep()
++ */
++ mdelay(2);
++ udelay(48);
+ if ((inb(tmport) & 0x80) == 0x00) { /* bsy ? */
+ outw(0, tmport--);
+ outb(0, tmport);
--- /dev/null
+From f96972f2dc6365421cf2366ebd61ee4cf060c8d5 Mon Sep 17 00:00:00 2001
+From: Shawn Guo <shawn.guo@linaro.org>
+Date: Thu, 4 Oct 2012 17:12:23 -0700
+Subject: kernel/sys.c: call disable_nonboot_cpus() in kernel_restart()
+
+From: Shawn Guo <shawn.guo@linaro.org>
+
+commit f96972f2dc6365421cf2366ebd61ee4cf060c8d5 upstream.
+
+As kernel_power_off() calls disable_nonboot_cpus(), we may also want to
+have kernel_restart() call disable_nonboot_cpus(). Doing so can help
+machines that require boot cpu be the last alive cpu during reboot to
+survive with kernel restart.
+
+This fixes one reboot issue seen on imx6q (Cortex-A9 Quad). The machine
+requires that the restart routine be run on the primary cpu rather than
+secondary ones. Otherwise, the secondary core running the restart
+routine will fail to come to online after reboot.
+
+Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ kernel/sys.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/kernel/sys.c
++++ b/kernel/sys.c
+@@ -368,6 +368,7 @@ EXPORT_SYMBOL(unregister_reboot_notifier
+ void kernel_restart(char *cmd)
+ {
+ kernel_restart_prepare(cmd);
++ disable_nonboot_cpus();
+ if (!cmd)
+ printk(KERN_EMERG "Restarting system.\n");
+ else
--- /dev/null
+From e96875677fb2b7cb739c5d7769824dff7260d31d Mon Sep 17 00:00:00 2001
+From: Davidlohr Bueso <dave@gnu.org>
+Date: Thu, 4 Oct 2012 17:13:18 -0700
+Subject: lib/gcd.c: prevent possible div by 0
+
+From: Davidlohr Bueso <dave@gnu.org>
+
+commit e96875677fb2b7cb739c5d7769824dff7260d31d upstream.
+
+Account for all properties when a and/or b are 0:
+gcd(0, 0) = 0
+gcd(a, 0) = a
+gcd(0, b) = b
+
+Fixes no known problems in current kernels.
+
+Signed-off-by: Davidlohr Bueso <dave@gnu.org>
+Cc: Eric Dumazet <eric.dumazet@gmail.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ lib/gcd.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/lib/gcd.c
++++ b/lib/gcd.c
+@@ -9,6 +9,9 @@ unsigned long gcd(unsigned long a, unsig
+
+ if (a < b)
+ swap(a, b);
++
++ if (!b)
++ return a;
+ while ((r = a % b) != 0) {
+ a = b;
+ b = r;
--- /dev/null
+From c10c2aab634a3c61c46b98875988b2f53040bc9c Mon Sep 17 00:00:00 2001
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Date: Tue, 7 Aug 2012 19:42:44 +0100
+Subject: mfd: 88pm860x: Move _IO resources out of ioport_ioresource
+
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+
+commit c10c2aab634a3c61c46b98875988b2f53040bc9c upstream.
+
+The removal of mach/io.h from most ARM platforms also set the range of
+valid IO ports to be empty for most platforms when previously any 32
+bit integer had been valid. This makes it impossible to add IO resources
+as the added range is smaller than that of the root resource for IO ports.
+
+Since we're not really using IO memory at all fix this by defining our
+own root resource outside the normal tree and make that the parent of
+all IO resources. This also ensures we won't conflict with read IO ports
+if we ever run on a platform which happens to use them.
+
+Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Acked-by: Arnd Bergmann <arnd@arndb.de>
+Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
+Tested-by: Haojian Zhuang <haojian.zhuang@gmail.com>
+Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/mfd/88pm860x-core.c | 92 ++++++++++++++++++++++++++++++--------------
+ 1 file changed, 63 insertions(+), 29 deletions(-)
+
+--- a/drivers/mfd/88pm860x-core.c
++++ b/drivers/mfd/88pm860x-core.c
+@@ -21,40 +21,73 @@
+
+ #define INT_STATUS_NUM 3
+
++static struct resource io_parent = {
++ .start = 0,
++ .end = 0xffffffff,
++ .flags = IORESOURCE_IO,
++};
++
+ static struct resource bk_resources[] __devinitdata = {
+- {PM8606_BACKLIGHT1, PM8606_BACKLIGHT1, "backlight-0", IORESOURCE_IO,},
+- {PM8606_BACKLIGHT2, PM8606_BACKLIGHT2, "backlight-1", IORESOURCE_IO,},
+- {PM8606_BACKLIGHT3, PM8606_BACKLIGHT3, "backlight-2", IORESOURCE_IO,},
++ {PM8606_BACKLIGHT1, PM8606_BACKLIGHT1, "backlight-0", IORESOURCE_IO,
++ &io_parent,},
++ {PM8606_BACKLIGHT2, PM8606_BACKLIGHT2, "backlight-1", IORESOURCE_IO,
++ &io_parent,},
++ {PM8606_BACKLIGHT3, PM8606_BACKLIGHT3, "backlight-2", IORESOURCE_IO,
++ &io_parent,},
+ };
+
+ static struct resource led_resources[] __devinitdata = {
+- {PM8606_LED1_RED, PM8606_LED1_RED, "led0-red", IORESOURCE_IO,},
+- {PM8606_LED1_GREEN, PM8606_LED1_GREEN, "led0-green", IORESOURCE_IO,},
+- {PM8606_LED1_BLUE, PM8606_LED1_BLUE, "led0-blue", IORESOURCE_IO,},
+- {PM8606_LED2_RED, PM8606_LED2_RED, "led1-red", IORESOURCE_IO,},
+- {PM8606_LED2_GREEN, PM8606_LED2_GREEN, "led1-green", IORESOURCE_IO,},
+- {PM8606_LED2_BLUE, PM8606_LED2_BLUE, "led1-blue", IORESOURCE_IO,},
++ {PM8606_LED1_RED, PM8606_LED1_RED, "led0-red", IORESOURCE_IO,
++ &io_parent,},
++ {PM8606_LED1_GREEN, PM8606_LED1_GREEN, "led0-green", IORESOURCE_IO,
++ &io_parent,},
++ {PM8606_LED1_BLUE, PM8606_LED1_BLUE, "led0-blue", IORESOURCE_IO,
++ &io_parent,},
++ {PM8606_LED2_RED, PM8606_LED2_RED, "led1-red", IORESOURCE_IO,
++ &io_parent,},
++ {PM8606_LED2_GREEN, PM8606_LED2_GREEN, "led1-green", IORESOURCE_IO,
++ &io_parent,},
++ {PM8606_LED2_BLUE, PM8606_LED2_BLUE, "led1-blue", IORESOURCE_IO,
++ &io_parent,},
+ };
+
+ static struct resource regulator_resources[] __devinitdata = {
+- {PM8607_ID_BUCK1, PM8607_ID_BUCK1, "buck-1", IORESOURCE_IO,},
+- {PM8607_ID_BUCK2, PM8607_ID_BUCK2, "buck-2", IORESOURCE_IO,},
+- {PM8607_ID_BUCK3, PM8607_ID_BUCK3, "buck-3", IORESOURCE_IO,},
+- {PM8607_ID_LDO1, PM8607_ID_LDO1, "ldo-01", IORESOURCE_IO,},
+- {PM8607_ID_LDO2, PM8607_ID_LDO2, "ldo-02", IORESOURCE_IO,},
+- {PM8607_ID_LDO3, PM8607_ID_LDO3, "ldo-03", IORESOURCE_IO,},
+- {PM8607_ID_LDO4, PM8607_ID_LDO4, "ldo-04", IORESOURCE_IO,},
+- {PM8607_ID_LDO5, PM8607_ID_LDO5, "ldo-05", IORESOURCE_IO,},
+- {PM8607_ID_LDO6, PM8607_ID_LDO6, "ldo-06", IORESOURCE_IO,},
+- {PM8607_ID_LDO7, PM8607_ID_LDO7, "ldo-07", IORESOURCE_IO,},
+- {PM8607_ID_LDO8, PM8607_ID_LDO8, "ldo-08", IORESOURCE_IO,},
+- {PM8607_ID_LDO9, PM8607_ID_LDO9, "ldo-09", IORESOURCE_IO,},
+- {PM8607_ID_LDO10, PM8607_ID_LDO10, "ldo-10", IORESOURCE_IO,},
+- {PM8607_ID_LDO11, PM8607_ID_LDO11, "ldo-11", IORESOURCE_IO,},
+- {PM8607_ID_LDO12, PM8607_ID_LDO12, "ldo-12", IORESOURCE_IO,},
+- {PM8607_ID_LDO13, PM8607_ID_LDO13, "ldo-13", IORESOURCE_IO,},
+- {PM8607_ID_LDO14, PM8607_ID_LDO14, "ldo-14", IORESOURCE_IO,},
+- {PM8607_ID_LDO15, PM8607_ID_LDO15, "ldo-15", IORESOURCE_IO,},
++ {PM8607_ID_BUCK1, PM8607_ID_BUCK1, "buck-1", IORESOURCE_IO,
++ &io_parent,},
++ {PM8607_ID_BUCK2, PM8607_ID_BUCK2, "buck-2", IORESOURCE_IO,
++ &io_parent,},
++ {PM8607_ID_BUCK3, PM8607_ID_BUCK3, "buck-3", IORESOURCE_IO,
++ &io_parent,},
++ {PM8607_ID_LDO1, PM8607_ID_LDO1, "ldo-01", IORESOURCE_IO,
++ &io_parent,},
++ {PM8607_ID_LDO2, PM8607_ID_LDO2, "ldo-02", IORESOURCE_IO,
++ &io_parent,},
++ {PM8607_ID_LDO3, PM8607_ID_LDO3, "ldo-03", IORESOURCE_IO,
++ &io_parent,},
++ {PM8607_ID_LDO4, PM8607_ID_LDO4, "ldo-04", IORESOURCE_IO,
++ &io_parent,},
++ {PM8607_ID_LDO5, PM8607_ID_LDO5, "ldo-05", IORESOURCE_IO,
++ &io_parent,},
++ {PM8607_ID_LDO6, PM8607_ID_LDO6, "ldo-06", IORESOURCE_IO,
++ &io_parent,},
++ {PM8607_ID_LDO7, PM8607_ID_LDO7, "ldo-07", IORESOURCE_IO,
++ &io_parent,},
++ {PM8607_ID_LDO8, PM8607_ID_LDO8, "ldo-08", IORESOURCE_IO,
++ &io_parent,},
++ {PM8607_ID_LDO9, PM8607_ID_LDO9, "ldo-09", IORESOURCE_IO,
++ &io_parent,},
++ {PM8607_ID_LDO10, PM8607_ID_LDO10, "ldo-10", IORESOURCE_IO,
++ &io_parent,},
++ {PM8607_ID_LDO11, PM8607_ID_LDO11, "ldo-11", IORESOURCE_IO,
++ &io_parent,},
++ {PM8607_ID_LDO12, PM8607_ID_LDO12, "ldo-12", IORESOURCE_IO,
++ &io_parent,},
++ {PM8607_ID_LDO13, PM8607_ID_LDO13, "ldo-13", IORESOURCE_IO,
++ &io_parent,},
++ {PM8607_ID_LDO14, PM8607_ID_LDO14, "ldo-14", IORESOURCE_IO,
++ &io_parent,},
++ {PM8607_ID_LDO15, PM8607_ID_LDO15, "ldo-15", IORESOURCE_IO,
++ &io_parent,},
+ };
+
+ static struct resource touch_resources[] __devinitdata = {
+@@ -91,11 +124,12 @@ static struct resource charger_resources
+ };
+
+ static struct resource preg_resources[] __devinitdata = {
+- {PM8606_ID_PREG, PM8606_ID_PREG, "preg", IORESOURCE_IO,},
++ {PM8606_ID_PREG, PM8606_ID_PREG, "preg", IORESOURCE_IO,
++ &io_parent,},
+ };
+
+ static struct resource rtc_resources[] __devinitdata = {
+- {PM8607_IRQ_RTC, PM8607_IRQ_RTC, "rtc", IORESOURCE_IRQ,},
++ {PM8607_IRQ_RTC, PM8607_IRQ_RTC, "rtc", IORESOURCE_IRQ, &io_parent,},
+ };
+
+ static struct mfd_cell bk_devs[] = {
--- /dev/null
+From bee6e1fa617b1fb7f6f91033428410e05f5ab0ed Mon Sep 17 00:00:00 2001
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Date: Tue, 7 Aug 2012 19:42:43 +0100
+Subject: mfd: max8925: Move _IO resources out of ioport_ioresource
+
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+
+commit bee6e1fa617b1fb7f6f91033428410e05f5ab0ed upstream.
+
+The removal of mach/io.h from most ARM platforms also set the range of
+valid IO ports to be empty for most platforms when previously any 32
+bit integer had been valid. This makes it impossible to add IO resources
+as the added range is smaller than that of the root resource for IO ports.
+
+Since we're not really using IO memory at all fix this by defining our
+own root resource outside the normal tree and make that the parent of
+all IO resources. This also ensures we won't conflict with read IO ports
+if we ever run on a platform which happens to use them.
+
+Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com
+Acked-by: Arnd Bergmann <arnd@arndb.de>
+Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
+Tested-by: Haojian Zhuang <haojian.zhuang@gmail.com>
+Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/mfd/max8925-core.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+--- a/drivers/mfd/max8925-core.c
++++ b/drivers/mfd/max8925-core.c
+@@ -18,12 +18,19 @@
+ #include <linux/mfd/core.h>
+ #include <linux/mfd/max8925.h>
+
++static struct resource io_parent = {
++ .start = 0,
++ .end = 0xffffffff,
++ .flags = IORESOURCE_IO,
++};
++
+ static struct resource backlight_resources[] = {
+ {
+ .name = "max8925-backlight",
+ .start = MAX8925_WLED_MODE_CNTL,
+ .end = MAX8925_WLED_CNTL,
+ .flags = IORESOURCE_IO,
++ .parent = &io_parent,
+ },
+ };
+
+@@ -42,6 +49,7 @@ static struct resource touch_resources[]
+ .start = MAX8925_TSC_IRQ,
+ .end = MAX8925_ADC_RES_END,
+ .flags = IORESOURCE_IO,
++ .parent = &io_parent,
+ },
+ };
+
+@@ -60,6 +68,7 @@ static struct resource power_supply_reso
+ .start = MAX8925_CHG_IRQ1,
+ .end = MAX8925_CHG_IRQ1_MASK,
+ .flags = IORESOURCE_IO,
++ .parent = &io_parent,
+ },
+ };
+
+@@ -118,6 +127,7 @@ static struct mfd_cell onkey_devs[] = {
+ .start = MAX8925_##_start, \
+ .end = MAX8925_##_end, \
+ .flags = IORESOURCE_IO, \
++ .parent = &io_parent, \
+ }
+
+ static struct resource regulator_resources[] = {
media-rc-ite-cir-initialise-ite_dev-rdev-earlier.patch
media-gspca_pac7302-add-support-for-device-1ae7-2001-speedlink-snappy-microphone-sl-6825-sbk.patch
media-gspca_pac7302-make-red-balance-and-blue-balance-controls-work-again.patch
+acpi-run-_osc-after-acpi_full_initialization.patch
+mfd-max8925-move-_io-resources-out-of-ioport_ioresource.patch
+mfd-88pm860x-move-_io-resources-out-of-ioport_ioresource.patch
+lib-gcd.c-prevent-possible-div-by-0.patch
+kernel-sys.c-call-disable_nonboot_cpus-in-kernel_restart.patch
+drivers-scsi-atp870u.c-fix-bad-use-of-udelay.patch
+drivers-dma-dmaengine.c-lower-the-priority-of-failed-to-get-dma-channel-message.patch